code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/package.json b/package.json "all": "npm run lint && npm run test && npm run accept",
"accept": "npm run compile && accept/run",
"babel-watch": "babel src -d dist --watch --source-maps",
- "coverage": "babel-node node_modules/.bin/babel-istanbul cover _mocha test/app test/cli test/cmd test/integration test/dist/lib --report html -- -R spec",
- "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --compilers js:babel-register test/ && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage",
+ "coverage": "nyc --temp-dir=./coverage/tmp/ npm test",
+ "coveralls": "npm run coverage && nyc report --reporter=text-lcov --temp-dir=./coverage/tmp/ | coveralls",
"doctoc": "doctoc --title '## Table of Contents' README.md",
"clean": "rm -rf ./dist",
"lint": "eslint . --ext .js --ignore-path .gitignore -f unix",
| 14 |
diff --git a/src/index.ts b/src/index.ts @@ -323,7 +323,7 @@ export async function install(
export async function cli(args: string[]) {
const {help, sourceMap, optimize = false, strict = false, clean = false, dest = 'web_modules', remoteUrl = 'https://cdn.pika.dev', remotePackage: remotePackages = []} = yargs(args);
- const destLoc = path.join(cwd, dest);
+ const destLoc = path.resolve(cwd, dest);
if (help) {
printHelp();
| 14 |
diff --git a/docs/src/pages/options/installing-icon-libraries.md b/docs/src/pages/options/installing-icon-libraries.md @@ -10,7 +10,7 @@ related:
**This page refers to using [webfont icons](/vue-components/icon#webfont-icons) only.** Svg icons do not need any installation step.
:::
-You'll most likely want icons in your website/app and Quasar offers an easy way out of the box for the following icon libraries: [Material Icons](https://material.io/icons/) , [Font Awesome](https://fontawesome.com/icons), [Ionicons](http://ionicons.com/), [MDI](https://materialdesignicons.com/), [Eva Icons](https://akveo.github.io/eva-icons), [Themify Icons](https://themify.me/themify-icons), [Line Awesome](https://icons8.com/line-awesome) and [Bootstrap Icons](https://icons.getbootstrap.com/). But you can [add support for others](/vue-components/icon#custom-mapping) by yourself.
+You'll most likely want icons in your website/app and Quasar offers an easy way out of the box for the following icon libraries: [Material Icons](https://fonts.google.com/icons?icon.set=Material+Icons), [Material Symbols](https://fonts.google.com/icons?icon.set=Material+Symbols), [Font Awesome](https://fontawesome.com/icons), [Ionicons](http://ionicons.com/), [MDI](https://materialdesignicons.com/), [Eva Icons](https://akveo.github.io/eva-icons), [Themify Icons](https://themify.me/themify-icons), [Line Awesome](https://icons8.com/line-awesome) and [Bootstrap Icons](https://icons.getbootstrap.com/). But you can [add support for others](/vue-components/icon#custom-mapping) by yourself.
::: tip
In regards to webfont icons, you can choose to install one or more of these icon libraries.
| 1 |
diff --git a/package.json b/package.json "test:unit": "cross-env NODE_ENV=mochatest npx karma start --single-run",
"test:stories": "npm run test:dom-snapshot && npm run test:accessibility",
"test:dom-snapshot": "cross-env NODE_ENV=test npx jest --runInBand --config=tests/story-based-tests.dom-snapshot-test.config.json",
- "test:image-snapshot": "cross-env NODE_ENV=testwithrequirehook npx jest --runInBand --config=tests/story-based-tests.snapshot-test.config.json",
+ "test:image-snapshot": "cross-env NODE_ENV=test npx jest --runInBand --config=tests/story-based-tests.snapshot-test.config.json",
"test:dom-snapshot:update": "cross-env NODE_ENV=test npx jest --updateSnapshot --config=tests/story-based-tests.dom-snapshot-test.config.json",
"test:image-snapshot:update": "cross-env NODE_ENV=test npm run static:build && npx jest --updateSnapshot --config=tests/story-based-tests.snapshot-test.config.json",
- "test:accessibility": "cross-env NODE_ENV=testwithrequirehook PORT=8002 npm run static:build && npx jest --runInBand --config=tests/story-based-tests.accessibility-test.config.json",
+ "test:accessibility": "cross-env NODE_ENV=test PORT=8002 npm run static:build && npx jest --runInBand --config=tests/story-based-tests.accessibility-test.config.json",
"test:a11y": "npm run test:accessibility",
"travis-ci": "cross-env NODE_ENV=test scripts/travis-ci.sh",
"upload-diffs": "scripts/upload-diffs.sh",
| 1 |
diff --git a/test/test-utils/src/abacus-client.js b/test/test-utils/src/abacus-client.js @@ -127,7 +127,12 @@ const waitUntilUsageIsProcessed = (token, documentUrlLocation, callback) => {
request.get(documentUrlLocation, {
headers: getHeaders(token)
}, (err, res) => {
- if (res.statusCode && res.statusCode === httpStatus.OK) return cb(undefined, true);
+ if (err)
+ return cb(err);
+
+ if (res.statusCode && res.statusCode === httpStatus.OK)
+ return cb(undefined, true);
+
return cb(undefined, false);
});
};
| 9 |
diff --git a/contracts/Proxy.sol b/contracts/Proxy.sol @@ -109,7 +109,6 @@ contract Proxy is Owned {
if iszero(result) { revert(free_ptr, returndatasize) }
return(free_ptr, returndatasize)
}
- //target.setMessageSender(0);
}
modifier onlyTarget {
| 2 |
diff --git a/articles/clients/client-grant-types.md b/articles/clients/client-grant-types.md @@ -101,7 +101,7 @@ By default, Public Clients are created with the following `grant_types`:
* `refresh_token`
::: note
-Public clients **cannot** utilize the `client_credentials` grant type. To add this grant type to a Client using the Management API, set the **token_endpoint_auth_method** to `client_secret_post` or `client_secret_basic`. Either of these will indicate the Client is confidential, not public.
+Public clients **cannot** utilize the `client_credentials` grant type. To add this grant type to a Client using the [Management API](/api/management/v2#!/Clients/patch_clients_by_id), set the **token_endpoint_auth_method** to `client_secret_post` or `client_secret_basic`. Either of these will indicate the Client is confidential, not public.
:::
### Confidential Clients
| 0 |
diff --git a/package.json b/package.json "babel-plugin-es6-promise": "1.0.0",
"babel-plugin-transform-object-assign": "6.8.0",
"babel-plugin-transform-proto-to-assign": "6.9.0",
- "babel-plugin-yo-yoify": "0.4.0",
+ "babel-plugin-yo-yoify": "0.6.0",
"babel-polyfill": "6.9.1",
"babel-preset-es2015": "6.24.0",
"babel-register": "6.9.0",
| 3 |
diff --git a/src/tools/auth0/handlers/logStreams.ts b/src/tools/auth0/handlers/logStreams.ts @@ -9,7 +9,7 @@ export const schema = {
id: { type: 'string' },
type: { type: 'string' },
name: { type: 'string' },
- status: { type: 'string', enum: ['active', 'paused'] },
+ status: { type: 'string', enum: ['active', 'paused', 'suspended'] },
sink: { type: 'object' },
filters: {
type: 'array',
| 11 |
diff --git a/templates/small_site_profile_map.html b/templates/small_site_profile_map.html -<!-- <div id="map"></div> -->
<script>
- function initMap() {
- // The map, centered at Uluru
- var map = new google.maps.Map(document.getElementById('map'), {
- zoom: 3,
- center: locations[0] ? locations[0] : { lat: 0, lng: 0 },
- });
+ let map = L.map('map', {
+ zoomSnap: 3
+ }).setView([-1.2921, 36.8219], 13);
- // Create an array of alphabetical characters used to label the markers.
- var labels = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
-
- // Add some markers to the map.
- // Note: The code uses the JavaScript Array.prototype.map() method to
- // create an array of markers based on a given "locations" array.
- // The map() method here has nothing to do with the Google Maps API.
- var markers = locations.map(function(location, i) {
- return new google.maps.Marker({
- position: location,
- label: labels[i % labels.length],
+ let my_divicon = L.divIcon({
+ className: 'arrow_box'
});
+
+ L.tileLayer(
+ 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png', {
+ 'attribution': 'Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL.'
+ }
+ ).addTo(map);
+
+ let locations = [];
+
+ //for each site we create a marker, add it to the map and a list
+ {% for site in get_locations %}
+ let marker{{ forloop.counter0 }} = L.marker([Number('{{site.latitude}}'), Number('{{site.longitude}}')], {
+ draggable:false
});
- // Add a marker clusterer to manage the markers.
- var markerCluster = new MarkerClusterer(map, markers, {
- imagePath:
- 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m',
+ marker{{ forloop.counter0 }}.url = '/workflow/siteprofile_update/{{ site.id }}/';
+ marker{{ forloop.counter0 }}.on('click', function(){
+ window.location.pathname = (this.url);
});
- }
- var locations = []
- {% for location in get_locations %}
- locations.push({
- lat: +"{{location.latitude}}",
- lng: +"{{location.longitude}}"
- })
+
+ marker{{ forloop.counter0 }}.addTo(map);
+ locations.push(marker{{ forloop.counter0 }})
{% endfor %}
+
+ locations = [...locations];
+
+ // we use the list of site markers to autozoom the map
+ // (featureGroup leaflet.js)
+
+ // this check will catch empty lists that cause the following function
+ // to break the rendering of the map
+ if (locations !== undefined || locations.length != 0) {
+ let group = new L.featureGroup(
+ locations
+ );
+ map.fitBounds(group.getBounds());
+ }
</script>
-<!--Load the API from the specified URL
-* The async attribute allows the browser to render the page while the API loads
-* The key parameter will contain your own API key (which is not needed for this tutorial)
-* The callback parameter executes the initMap() function
--->
-<script src="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js"></script>
-<script
- async
- defer
- src="https://maps.googleapis.com/maps/api/js?key={{map_api_key}}&callback=initMap"
-></script>
| 14 |
diff --git a/lib/helpers/initialize_keystore.js b/lib/helpers/initialize_keystore.js @@ -55,7 +55,13 @@ you are expected to provide your own during provider#initialize');
}
const keystore = await getKeyStore(conf);
- assert(keystore.get({ use: 'sig', alg: 'RS256' }), 'RS256 signing must be supported but no viable key was provided');
+ const implicit = instance(this).configuration('responseTypes').find(type => type.includes('token'));
+ if (implicit) {
+ assert(
+ keystore.get({ use: 'sig', alg: 'RS256' }),
+ 'RS256 signing must be supported but no viable key was provided',
+ );
+ }
instance(this).keystore = keystore;
keystore.all().forEach(registerKey, this);
};
| 11 |
diff --git a/src/js/services/nanoService.js b/src/js/services/nanoService.js @@ -470,7 +470,7 @@ angular.module('canoeApp.services')
// aliasService.lookupAddress(account.id, function (err, ans) {
// if (err) {
// $log.debug(err)
- // root.setWallet(wallet, cb)
+ root.setWallet(wallet, cb)
// } else {
// $log.debug('Answer from alias server looking up ' + account.id + ': ' + JSON.stringify(ans))
// if (ans && ans.aliases.length > 0) {
| 1 |
diff --git a/src/util/videoUtils.ts b/src/util/videoUtils.ts @@ -7,13 +7,6 @@ import { GEHelper } from '../graphicEngine/GEHelper';
import VideoWorker from './workers/video.worker.ts';
import { clamp } from 'lodash';
-class MediaUtilsClass {
- initialize() {}
- reset() {}
- destroy() {}
- compatabilityChecker() {} // throws error if failed
-}
-
type FlipStatus = {
horizontal: boolean;
vertical: boolean;
@@ -48,7 +41,7 @@ type DetectedObject = {
};
type IndicatorType = 'pose' | 'face' | 'object';
-class VideoUtils extends MediaUtilsClass {
+class VideoUtils implements MediaUtilsInterface {
// canvasVideo SETTING, used in all canvas'
public CANVAS_WIDTH: number = 480;
public CANVAS_HEIGHT: number = 270;
@@ -93,7 +86,6 @@ class VideoUtils extends MediaUtilsClass {
private imageCapture: any; // capturing class ImageCapture
constructor() {
- super();
this.videoOnLoadHandler = this.videoOnLoadHandler.bind(this);
}
async initialize() {
| 5 |
diff --git a/src/drivers/webextension/images/icons/Preact.svg b/src/drivers/webextension/images/icons/Preact.svg <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M13.8294 0L27.6588 7.9844V23.9532L13.8294 31.9376L0 23.9532V7.9844L13.8294 0Z" fill="#673AB8"/>
-<path d="M4.13746 23.4585C5.71037 25.5084 11.3281 23.8378 16.6851 19.7273C22.0421 15.6168 25.1096 10.6228 23.5367 8.57292C21.9638 6.52307 16.346 8.19358 10.9891 12.3041C5.63213 16.4147 2.56455 21.4086 4.13746 23.4585Z" stroke="white" stroke-width="1"/>
-<path d="M23.5205 23.4425C25.0934 21.3927 22.0258 16.3987 16.6688 12.2882C11.3119 8.17762 5.69411 6.5071 4.1212 8.55696C2.54829 10.6068 5.61587 15.6008 10.9728 19.7113C16.3298 23.8219 21.9476 25.4924 23.5205 23.4425Z" stroke="white" stroke-width="1"/>
-<path d="M13.8396 18.1304C15.0109 18.1304 15.9605 17.1808 15.9605 16.0095C15.9605 14.8382 15.0109 13.8887 13.8396 13.8887C12.6683 13.8887 11.7188 14.8382 11.7188 16.0095C11.7188 17.1808 12.6683 18.1304 13.8396 18.1304Z" fill="white"/>
+<path d="M15.8564 0L29.7128 8V24L15.8564 32L2 24V8L15.8564 0Z" fill="#673AB8"/>
+<path d="M15.8564 0L29.7128 8V24L15.8564 32L2 24V8L15.8564 0Z" fill="#673AB8"/>
+<path d="M6.14558 23.5045C7.72156 25.5584 13.3503 23.8845 18.7177 19.766C24.0852 15.6475 27.1587 10.6437 25.5827 8.58982C24.0067 6.53596 18.378 8.20974 13.0106 12.3283C7.64317 16.4469 4.5696 21.4506 6.14558 23.5045Z" stroke="white"/>
+<path d="M25.5664 23.4883C27.1424 21.4345 24.0688 16.4308 18.7013 12.3122C13.334 8.19363 7.70521 6.51984 6.12922 8.57371C4.55324 10.6276 7.62681 15.6313 12.9942 19.7498C18.3617 23.8685 23.9905 25.5422 25.5664 23.4883Z" stroke="white"/>
+<path d="M15.8666 18.1658C17.0402 18.1658 17.9917 17.2143 17.9917 16.0407C17.9917 14.8671 17.0402 13.9158 15.8666 13.9158C14.6931 13.9158 13.7417 14.8671 13.7417 16.0407C13.7417 17.2143 14.6931 18.1658 15.8666 18.1658Z" fill="white"/>
</svg>
| 1 |
diff --git a/core/algorithm-operator/lib/templates/algorithm-builder.js b/core/algorithm-operator/lib/templates/algorithm-builder.js @@ -20,6 +20,7 @@ const jobTemplate = {
}
},
spec: {
+ serviceAccountName: 'algorithm-builder-serviceaccount',
containers: [
{
name: ALGORITHM_BUILDS,
| 0 |
diff --git a/config/sidebar.yml b/config/sidebar.yml @@ -35,8 +35,8 @@ articles:
- title: SSO for Regular Web Apps
url: /architecture-scenarios/application/web-app-sso
- # - title: SPA + API
- # url: /architecture-scenarios/application/spa-api
+ - title: SPA + API
+ url: /architecture-scenarios/application/spa-api
# - title: Mobile + API
# url: /architecture-scenarios/application/mobile-api
| 0 |
diff --git a/src/kea/logic/reducer.js b/src/kea/logic/reducer.js @@ -57,7 +57,7 @@ export function convertReducerArrays (reducers) {
let reducerObject = {
value: value,
type: type,
- reducer: createReducer(reducer, value)
+ reducer: typeof reducer === 'function' ? reducer : createReducer(reducer, value)
}
if (options) {
| 11 |
diff --git a/token-metadata/0x15bCDFAd12498DE8a922E62442Ae4CC4bd33bd25/metadata.json b/token-metadata/0x15bCDFAd12498DE8a922E62442Ae4CC4bd33bd25/metadata.json "symbol": "WALT",
"address": "0x15bCDFAd12498DE8a922E62442Ae4CC4bd33bd25",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/components/ContactCard/contact.style.js b/src/components/ContactCard/contact.style.js @@ -25,10 +25,10 @@ const ContactWrapper = styled.section`
border-radius: 10px;
}
.inputrow{
- margin-bottom: 5px;
+ margin-bottom: 10px;
}
.firstcol {
- padding-right: 0;
+ padding-right: 5px;
}
.lastcol {
padding-left: 5px;
@@ -61,6 +61,7 @@ const ContactWrapper = styled.section`
background: #ebc017;
color: #000000;
}
+ margin-top: 12px;
}
.section-title{
h3 {
| 7 |
diff --git a/sources/osgUtil/ComposerPostProcess.js b/sources/osgUtil/ComposerPostProcess.js @@ -940,8 +940,8 @@ utils.createPrototypeObject(
// when reading out of texture assigned zone
// 0 - do nothing
- // 1 - black color when fetching out of bound
- // 2 - clamp uv to thresold (usually vec2(1.0))
+ // 1 - clamp uv
+ // 2 - black color
if (method !== undefined) this._methodWrapUV = method;
if (threshold !== undefined) this._thresholdWrapUV = threshold;
this._texInfos = undefined;
@@ -958,15 +958,16 @@ utils.createPrototypeObject(
// see setMethodWrapUV
var val = this._thresholdWrapUV.toExponential();
if (this._methodWrapUV === 1) {
- var prefix = 'step((uv).x, ' + val + ') * step((uv).y, ' + val + ') * ';
- bodySimple = prefix + bodySimple;
- bodyNearest = prefix + bodyNearest;
- bodyBias = prefix + bodyBias;
- } else if (this._methodWrapUV === 2) {
- var replaceValue = 'min(uv, vec2(' + val + '))';
+ var replaceValue = 'min(uv, 1.0 - ' + val + ' / %size.xy)';
bodySimple = bodySimple.replace(/(uv)/g, replaceValue);
bodyNearest = bodyNearest.replace(/(uv)/g, replaceValue);
bodyBias = bodyBias.replace(/(uv)/g, replaceValue);
+ } else if (this._methodWrapUV === 2) {
+ var prefix = 'step((uv).x, 1.0 - ' + val + ' / %size.x) *';
+ prefix += 'step((uv).y, 1.0 - ' + val + ' / %size.y) * ';
+ bodySimple = prefix + bodySimple;
+ bodyNearest = prefix + bodyNearest;
+ bodyBias = prefix + bodyBias;
}
this._texInfos = {
| 7 |
diff --git a/docs/content/widgets/configs/Window.js b/docs/content/widgets/configs/Window.js @@ -20,7 +20,6 @@ export default {
},
closable: {
key: true,
- alias: 'closeable',
type: 'boolean',
description: <cx><Md>
Controls the close button visibility. Defaults to `true`.
| 2 |
diff --git a/src/botPage/bot/Interpreter.js b/src/botPage/bot/Interpreter.js @@ -98,7 +98,7 @@ export default class Interpreter {
}
globalObserver.emit('Error', e);
const { initArgs, tradeOptions } = this.bot.tradeEngine;
- this.stop();
+ this.terminateSession();
this.init();
this.$scope.observer.register('Error', onError);
this.bot.tradeEngine.init(...initArgs);
| 9 |
diff --git a/generators/client/templates/angular/_package.json b/generators/client/templates/angular/_package.json "@angular/platform-browser": "4.3.2",
"@angular/platform-browser-dynamic": "4.3.2",
"@angular/router": "4.3.2",
- "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.1",
+ "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.4",
"bootstrap": "4.0.0-beta",
"core-js": "2.4.1",
"font-awesome": "4.7.0",
| 3 |
diff --git a/token-metadata/0x045Eb7e34e94B28C7A3641BC5e1A1F61f225Af9F/metadata.json b/token-metadata/0x045Eb7e34e94B28C7A3641BC5e1A1F61f225Af9F/metadata.json "symbol": "ZPAE",
"address": "0x045Eb7e34e94B28C7A3641BC5e1A1F61f225Af9F",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md Thanks for your interest in plotly.js!
+### Translations:
+
+- Make a PR directly to the main repository
+- Label it `type: translation`
+- Please @ mention a few other speakers of this language who can help review your translations.
+- If you've omitted any keys from [dist/translation_keys.txt](https://github.com/plotly/plotly.js/blob/master/dist/translation-keys.txt) - which means they will fall back on the US English text - just make a short comment about why in the PR description: the English text works fine in your language, or you would like someone else to help translating those, or whatever the reason.
+- You should only update files in `lib/locales/`, not those in `dist/`
+
+### Features, Bug fixes, and others:
+
Developers are strongly encouraged to first make a PR to their own plotly.js fork and ask one of the maintainers to review the modifications there. Once the pull request is deemed satisfactory, the developer will be asked to make a pull request to the main plotly.js repo and may be asked to squash some commits before doing so.
Before opening a pull request, developer should:
| 0 |
diff --git a/src/tree/TextureManager.mjs b/src/tree/TextureManager.mjs @@ -160,12 +160,10 @@ export default class TextureManager {
_freeManagedTextureSource(textureSource) {
if (textureSource.isLoaded()) {
- // add VRAM tracking if using the webgl renderer
- this._updateVramUsage(textureSource, -1);
-
this._nativeFreeTextureSource(textureSource);
this._addMemoryUsage(-textureSource.w * textureSource.h);
+ // add VRAM tracking if using the webgl renderer
this._updateVramUsage(textureSource, -1);
}
| 2 |
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js @@ -5,7 +5,7 @@ const ObservableStore = require('obs-store')
const ethUtil = require('ethereumjs-util')
const EthQuery = require('ethjs-query')
const TxProviderUtil = require('../lib/tx-utils')
-const PendingTransactionUtils = require('../lib/pending-tx-watchers')
+const PendingTransactionWatchers = require('../lib/pending-tx-watchers')
const createId = require('../lib/random-id')
const NonceTracker = require('../lib/nonce-tracker')
@@ -37,7 +37,7 @@ module.exports = class TransactionController extends EventEmitter {
this.query = new EthQuery(this.provider)
this.txProviderUtils = new TxProviderUtil(this.provider)
- this.pendingTxUtils = new PendingTransactionUtils({
+ this.pendingTxWatcher = new PendingTransactionWatchers({
provider: this.provider,
nonceTracker: this.nonceTracker,
getBalance: (address) => this.ethStore.getState().accounts[address].balance,
@@ -50,16 +50,16 @@ module.exports = class TransactionController extends EventEmitter {
},
})
- this.pendingTxUtils.on('txWarning', this.updateTx.bind(this))
- this.pendingTxUtils.on('txFailed', this.setTxStatusFailed.bind(this))
- this.pendingTxUtils.on('txConfirmed', this.setTxStatusConfirmed.bind(this))
+ this.pendingTxWatcher.on('txWarning', this.updateTx.bind(this))
+ this.pendingTxWatcher.on('txFailed', this.setTxStatusFailed.bind(this))
+ this.pendingTxWatcher.on('txConfirmed', this.setTxStatusConfirmed.bind(this))
- this.blockTracker.on('rawBlock', this.pendingTxUtils.checkForTxInBlock.bind(this))
+ this.blockTracker.on('rawBlock', this.pendingTxWatcher.checkForTxInBlock.bind(this))
// this is a little messy but until ethstore has been either
// removed or redone this is to guard against the race condition
// where ethStore hasent been populated by the results yet
- this.blockTracker.once('latest', () => this.blockTracker.on('latest', this.pendingTxUtils.resubmitPendingTxs.bind(this)))
- this.blockTracker.on('sync', this.pendingTxUtils.queryPendingTxs.bind(this))
+ this.blockTracker.once('latest', () => this.blockTracker.on('latest', this.pendingTxWatcher.resubmitPendingTxs.bind(this)))
+ this.blockTracker.on('sync', this.pendingTxWatcher.queryPendingTxs.bind(this))
// memstore is computed from a few different stores
this._updateMemstore()
this.store.subscribe(() => this._updateMemstore())
| 10 |
diff --git a/src/components/picker.js b/src/components/picker.js @@ -10,15 +10,6 @@ import { deepMerge, measureScrollbar } from '../utils'
import { Anchors, Category, Emoji, Preview, Search } from '.'
-const RECENT_CATEGORY = { id: 'recent', name: 'Recent', emojis: null }
-const SEARCH_CATEGORY = {
- id: 'search',
- name: 'Search',
- emojis: null,
- anchor: false,
-}
-const CUSTOM_CATEGORY = { id: 'custom', name: 'Custom', emojis: [] }
-
const I18N = {
search: 'Search',
notfound: 'No Emoji Found',
@@ -41,6 +32,15 @@ export default class Picker extends React.PureComponent {
constructor(props) {
super(props)
+ this.RECENT_CATEGORY = { id: 'recent', name: 'Recent', emojis: null }
+ this.CUSTOM_CATEGORY = { id: 'custom', name: 'Custom', emojis: [] }
+ this.SEARCH_CATEGORY = {
+ id: 'search',
+ name: 'Search',
+ emojis: null,
+ anchor: false,
+ }
+
this.i18n = deepMerge(I18N, props.i18n)
this.state = {
skin: store.get('skin') || props.skin,
@@ -51,7 +51,7 @@ export default class Picker extends React.PureComponent {
let allCategories = [].concat(data.categories)
if (props.custom.length > 0) {
- CUSTOM_CATEGORY.emojis = props.custom.map(emoji => {
+ this.CUSTOM_CATEGORY.emojis = props.custom.map(emoji => {
return {
...emoji,
// `<Category />` expects emoji to have an `id`.
@@ -60,9 +60,7 @@ export default class Picker extends React.PureComponent {
}
})
- allCategories.push(CUSTOM_CATEGORY)
- } else if (CUSTOM_CATEGORY.emojis.length > 0) {
- CUSTOM_CATEGORY.emojis = [];
+ allCategories.push(this.CUSTOM_CATEGORY)
}
this.hideRecent = true
@@ -122,22 +120,22 @@ export default class Picker extends React.PureComponent {
let includeRecent =
props.include && props.include.length
- ? props.include.indexOf(RECENT_CATEGORY.id) > -1
+ ? props.include.indexOf(this.RECENT_CATEGORY.id) > -1
: true
let excludeRecent =
props.exclude && props.exclude.length
- ? props.exclude.indexOf(RECENT_CATEGORY.id) > -1
+ ? props.exclude.indexOf(this.RECENT_CATEGORY.id) > -1
: false
if (includeRecent && !excludeRecent) {
this.hideRecent = false
- this.categories.unshift(RECENT_CATEGORY)
+ this.categories.unshift(this.RECENT_CATEGORY)
}
if (this.categories[0]) {
this.categories[0].first = true
}
- this.categories.unshift(SEARCH_CATEGORY)
+ this.categories.unshift(this.SEARCH_CATEGORY)
this.setAnchorsRef = this.setAnchorsRef.bind(this)
this.handleAnchorClick = this.handleAnchorClick.bind(this)
@@ -174,7 +172,7 @@ export default class Picker extends React.PureComponent {
}
componentWillUnmount() {
- SEARCH_CATEGORY.emojis = null
+ this.SEARCH_CATEGORY.emojis = null
clearTimeout(this.leaveTimeout)
clearTimeout(this.firstRenderTimeout)
@@ -199,7 +197,7 @@ export default class Picker extends React.PureComponent {
}
// Use Array.prototype.find() when it is more widely supported.
- const emojiData = CUSTOM_CATEGORY.emojis.filter(
+ const emojiData = this.CUSTOM_CATEGORY.emojis.filter(
customEmoji => customEmoji.id === emoji.id
)[0]
for (let key in emojiData) {
@@ -240,7 +238,7 @@ export default class Picker extends React.PureComponent {
this.updateCategoriesSize()
this.handleScrollPaint()
- if (SEARCH_CATEGORY.emojis) {
+ if (this.SEARCH_CATEGORY.emojis) {
component.updateDisplay('none')
}
})
@@ -263,8 +261,8 @@ export default class Picker extends React.PureComponent {
let activeCategory = null
- if (SEARCH_CATEGORY.emojis) {
- activeCategory = SEARCH_CATEGORY
+ if (this.SEARCH_CATEGORY.emojis) {
+ activeCategory = this.SEARCH_CATEGORY
} else {
var target = this.scroll,
scrollTop = target.scrollTop,
@@ -313,7 +311,7 @@ export default class Picker extends React.PureComponent {
}
handleSearch(emojis) {
- SEARCH_CATEGORY.emojis = emojis
+ this.SEARCH_CATEGORY.emojis = emojis
for (let i = 0, l = this.categories.length; i < l; i++) {
let component = this.categoryRefs[`category-${i}`]
@@ -348,7 +346,7 @@ export default class Picker extends React.PureComponent {
}
}
- if (SEARCH_CATEGORY.emojis) {
+ if (this.SEARCH_CATEGORY.emojis) {
this.handleSearch(null)
this.search.clear()
@@ -450,7 +448,7 @@ export default class Picker extends React.PureComponent {
emojisToShowFilter={emojisToShowFilter}
include={include}
exclude={exclude}
- custom={CUSTOM_CATEGORY.emojis}
+ custom={this.CUSTOM_CATEGORY.emojis}
autoFocus={autoFocus}
/>
@@ -471,10 +469,10 @@ export default class Picker extends React.PureComponent {
native={native}
hasStickyPosition={this.hasStickyPosition}
i18n={this.i18n}
- recent={category.id == RECENT_CATEGORY.id ? recent : undefined}
+ recent={category.id == this.RECENT_CATEGORY.id ? recent : undefined}
custom={
- category.id == RECENT_CATEGORY.id
- ? CUSTOM_CATEGORY.emojis
+ category.id == this.RECENT_CATEGORY.id
+ ? this.CUSTOM_CATEGORY.emojis
: undefined
}
emojiProps={{
| 12 |
diff --git a/articles/rules/index.md b/articles/rules/index.md @@ -48,6 +48,22 @@ A Rule is a function with the following arguments:
Because of the async nature of Node.js, it is important to always call the <code>callback</code> function, or else the script will timeout.
</div>
+### Global Functions
+
+If you need to use a function in multiple Rules, you can place the shared function in its own Rule. Within this rule, assign the function to the global object so that you can later call the function in a separate rule.
+
+```js
+if (!global.foo) {
+ global.foo = function () { };
+}
+
+if (!global.bar) {
+ global.bar = function (baz) { };
+}
+```
+
+Rules containing shared functions should be placed at the top of the Rules list in the Management Dashboard. If this is not the case, calling these functions results in an undefined function error when the Rules execute.
+
## Examples
To create a Rule, or try the examples below, go to [New Rule](${manage_url}/#/rules/create) in the Rule Editor on the dashboard.
| 0 |
diff --git a/packages/webpack-plugin/lib/platform/template/normalize-component-rules.js b/packages/webpack-plugin/lib/platform/template/normalize-component-rules.js @@ -17,20 +17,23 @@ module.exports = function normalizeComponentRules (cfgs, spec) {
const eventRules = (cfg.event || []).concat(spec.event.rules)
el.attrsList.forEach((attr) => {
const testKey = 'name'
- const rAttr = runRules(spec.directive, attr, {
+ let rAttr = runRules(spec.directive, attr, {
target,
testKey,
data: {
eventRules,
attrsMap: el.attrsMap
}
- }) || runRules(cfg.props, attr, {
+ })
+ if (rAttr === undefined) {
+ rAttr = runRules(cfg.props, attr, {
target,
testKey,
data: {
attrsMap: el.attrsMap
}
})
+ }
if (Array.isArray(rAttr)) {
rAttrsList.push(...rAttr)
} else if (rAttr === false) {
| 1 |
diff --git a/services/importer/lib/importer/downloader.rb b/services/importer/lib/importer/downloader.rb @@ -178,7 +178,7 @@ module CartoDB
def download_and_store
file = Tempfile.new(FILENAME_PREFIX, encoding: 'ascii-8bit')
- bound_request(@translated_url, file).run
+ bound_request(file).run
file_path = if @filename
new_file_path = File.join(Pathname.new(file.path).dirname, @filename)
@@ -195,8 +195,8 @@ module CartoDB
file.unlink
end
- def bound_request(url, file)
- request = Typhoeus::Request.new(url, typhoeus_options)
+ def bound_request(file)
+ request = http_client.request(@translated_url, typhoeus_options)
request.on_headers do |response|
@http_response_code = response.code
| 4 |
diff --git a/test/unit/api_spec.js b/test/unit/api_spec.js @@ -80,7 +80,7 @@ describe('api', function() {
loadingTask.promise
];
Promise.all(promises).then(function (data) {
- expect((data[0].loaded / data[0].total) > 0).toEqual(true);
+ expect((data[0].loaded / data[0].total) >= 0).toEqual(true);
expect(data[1] instanceof PDFDocumentProxy).toEqual(true);
expect(loadingTask).toEqual(data[1].loadingTask);
loadingTask.destroy().then(done);
| 11 |
diff --git a/test/routes/v3/launches.test.js b/test/routes/v3/launches.test.js @@ -63,6 +63,8 @@ test('It should return all launches', async () => {
expect(payload).toHaveProperty('orbit_params.epoch');
expect(payload).toHaveProperty('orbit_params.mean_motion');
expect(payload).toHaveProperty('orbit_params.raan');
+ expect(payload).toHaveProperty('orbit_params.mean_anomaly');
+ expect(payload).toHaveProperty('orbit_params.arg_of_pericenter');
expect(payload).toHaveProperty('mass_returned_kg');
expect(payload).toHaveProperty('mass_returned_lbs');
expect(payload).toHaveProperty('flight_time_sec');
@@ -99,6 +101,7 @@ test('It should return all launches', async () => {
expect(item).toHaveProperty('ships');
expect(item).toHaveProperty('launch_success');
expect(item).toHaveProperty('links');
+ expect(item).toHaveProperty('links.flickr_images');
expect(item).toHaveProperty('details');
expect(item).toHaveProperty('static_fire_date_utc');
expect(item).toHaveProperty('static_fire_date_unix');
| 3 |
diff --git a/benchmark/createFixtures2.js b/benchmark/createFixtures2.js @@ -9,8 +9,8 @@ try {
function genModule(prefix, depth, asyncDepth, multiplex, r, circular) {
var source = [];
- var async = depth >= asyncDepth;
- if(!async)
+ var isAsync = depth >= asyncDepth;
+ if(!isAsync)
circular.push(path.resolve(fixtures, prefix + "/index.js"));
source.push("(function() {");
var m = (r % multiplex) + 1;
@@ -23,7 +23,7 @@ function genModule(prefix, depth, asyncDepth, multiplex, r, circular) {
sum += genModule(prefix + "/" + i, depth - 1, asyncDepth, multiplex, (r + i + depth) * m + i + depth, circular);
source.push("require(" + JSON.stringify("./" + i) + ");");
if(i === 0) {
- if(async)
+ if(isAsync)
source.push("}); require.ensure([], function() {");
}
}
| 10 |
diff --git a/iris/mutations/communityMember/removeCommunityModerator.js b/iris/mutations/communityMember/removeCommunityModerator.js @@ -69,12 +69,17 @@ export default async (_: any, { input }: Input, { user }: GraphQLContext) => {
return new UserError('This person is not a moderator in your community.');
}
- if (!currentUserPermission.isOwner) {
- return new UserError('You must own this community to manage moderators.');
+ if (!currentUserPermission.isOwner && !currentUserPermission.isModerator) {
+ return new UserError(
+ 'You must own or moderate this community to manage moderators.'
+ );
}
// all checks pass
- if (currentUserPermission.isOwner && userToEvaluatePermission.isModerator) {
+ if (
+ (currentUserPermission.isOwner || currentUserPermission.isModerator) &&
+ userToEvaluatePermission.isModerator
+ ) {
// remove as moderator in community and all channels, this should be expected UX
const allChannelsInCommunity = await getChannelsByUserAndCommunity(
communityId,
| 11 |
diff --git a/app/features/move.js b/app/features/move.js @@ -153,7 +153,7 @@ function dragDrop(e) {
}
function createDropzoneUI(el) {
- const hover = document.createElement('visbug-hover')
+ const hover = document.createElement('visbug-corners')
hover.position = {el}
document.body.appendChild(hover)
| 4 |
diff --git a/src/lib/Canvas.js b/src/lib/Canvas.js @@ -351,6 +351,10 @@ Canvas.prototype = {
},
finmouseup: function(e) {
+ if (!this.mousedown) {
+ // ignore document:mouseup unless preceded by a canvas:mousedown
+ return;
+ }
if (this.isDragging()) {
this.dispatchNewMouseKeysEvent(e, 'fin-canvas-dragend', {
dragstart: this.dragstart,
| 8 |
diff --git a/aws/cloudformation/util.go b/aws/cloudformation/util.go @@ -1049,6 +1049,7 @@ func UserAccountScopedStackName(basename string,
return "", awsNameErr
}
userName := strings.Replace(awsName, " ", "-", -1)
+ userName = strings.Replace(userName, ".", "-", -1)
return fmt.Sprintf("%s-%s", basename, userName), nil
}
| 9 |
diff --git a/assets/js/util/index.js b/assets/js/util/index.js @@ -735,10 +735,10 @@ export const findTagInHtmlContent = ( html, module ) => {
export const getExistingTag = async( module ) => {
try {
- let tagFound = data.getCache( module, 'existingTag', 3600 );
+ let tagFound = data.getCache( module, 'existingTag', 300 );
if ( ! tagFound ) {
- const html = await fetch( googlesitekit.admin.siteURL ).then( res => {
+ const html = await fetch( `${googlesitekit.admin.siteURL}?tagverify=1×tamp=${Date.now()}` ).then( res => {
return res.text();
} );
| 12 |
diff --git a/src/logged_out/components/footer/Footer.js b/src/logged_out/components/footer/Footer.js @@ -20,16 +20,22 @@ const styles = theme => ({
},
footerInner: {
backgroundColor: theme.palette.common.darkBlack,
+ paddingTop: theme.spacing(8),
+ paddingLeft: theme.spacing(7),
+ paddingRight: theme.spacing(7),
+ paddingBottom: theme.spacing(6),
+ [theme.breakpoints.up("sm")]: {
+ paddingTop: theme.spacing(10),
+ paddingLeft: theme.spacing(16),
+ paddingRight: theme.spacing(16),
+ paddingBottom: theme.spacing(10)
+ },
[theme.breakpoints.up("md")]: {
paddingTop: theme.spacing(10),
paddingLeft: theme.spacing(10),
paddingRight: theme.spacing(10),
paddingBottom: theme.spacing(10)
- },
- paddingTop: theme.spacing(8),
- paddingLeft: theme.spacing(6),
- paddingRight: theme.spacing(6),
- paddingBottom: theme.spacing(6)
+ }
},
brandText: {
fontFamily: "'Baloo Bhaijaan', cursive",
| 7 |
diff --git a/.github/stale.yml b/.github/stale.yml # Number of days of inactivity before an issue becomes stale
-daysUntilStale: 951
+daysUntilStale: 948
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
| 3 |
diff --git a/post-processing.js b/post-processing.js @@ -9,7 +9,7 @@ import {UnrealBloomPass} from 'three/examples/jsm/postprocessing/UnrealBloomPass
import {AdaptiveToneMappingPass} from 'three/examples/jsm/postprocessing/AdaptiveToneMappingPass.js';
// import {BloomPass} from 'three/examples/jsm/postprocessing/BloomPass.js';
// import {AfterimagePass} from 'three/examples/jsm/postprocessing/AfterimagePass.js';
-import {BokehPass} from 'three/examples/jsm/postprocessing/BokehPass.js';
+import {BokehPass} from './BokehPass.js';
import {SSAOPass} from './SSAOPass.js';
import {RenderPass} from './RenderPass';
import {
| 4 |
diff --git a/packages/project-disaster-trail/src/components/Game/DurationBar.js b/packages/project-disaster-trail/src/components/Game/DurationBar.js @@ -7,37 +7,13 @@ const durationBarStyle = css`
height: 40px;
margin: 0;
background-color: #721d7c;
- -moz-animation: scroll-left 30s linear 5s;
- -webkit-animation: scroll-left 30s linear 5s;
animation: scroll-left 30s linear 5s;
- -moz-animation-fill-mode: forwards;
- -webit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
- @-moz-keyframes scroll-left {
- 0% {
- -moz-transform: translateX(0px);
- }
- 100% {
- -moz-transform: translateX(-100%);
- }
- }
- @-webkit-keyframes scroll-left {
- 0% {
- -webkit-transform: translateX(0px);
- }
- 100% {
- -webkit-transform: translateX(-100%);
- }
- }
@keyframes scroll-left {
0% {
- -moz-transform: translateX(0); /* Browser bug fix */
- -webkit-transform: translateX(0); /* Browser bug fix */
transform: translateX(0);
}
100% {
- -moz-transform: translateX(-100%); /* Browser bug fix */
- -webkit-transform: translateX(-100%); /* Browser bug fix */
transform: translateX(-100%);
}
}
@@ -52,8 +28,6 @@ const durationBarStepStyle = css`
color: #ffffff;
vertical-align: middle;
- /* margin: 0 10px 0 10px; */
- /* padding-top: 2px; */
font-family: "Roboto", sans-serif;
font-size: 1.5em;
text-align: center;
| 2 |
diff --git a/metaversefile-api.js b/metaversefile-api.js +/*
+metaversefile uses plugins to load files from the metaverse and load them as apps.
+it is an interface between raw data and the engine.
+metaversfile can load many file types, including javascript.
+*/
+
import * as THREE from 'three';
import {GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader.js';
import {DRACOLoader} from 'three/examples/jsm/loaders/DRACOLoader.js';
| 0 |
diff --git a/token-metadata/0x722f97A435278B7383a1e3c47F41773bebF3232C/metadata.json b/token-metadata/0x722f97A435278B7383a1e3c47F41773bebF3232C/metadata.json "symbol": "UCM",
"address": "0x722f97A435278B7383a1e3c47F41773bebF3232C",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/website/themes/uppy/layout/layout.ejs b/website/themes/uppy/layout/layout.ejs @@ -97,7 +97,7 @@ if (page.series) {
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<% } else { %>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="//kvz.github.io/on-the-githubs/js/jquery.on-the-githubs.min.js"></script>
<script type="text/javascript">
$('.on-the-githubs').onthegithubs();
| 3 |
diff --git a/lib/transaction/transaction.js b/lib/transaction/transaction.js @@ -66,7 +66,7 @@ var MAX_BLOCK_SIZE = 1000000;
Transaction.DUST_AMOUNT = 546;
// Margin of error to allow fees in the vecinity of the expected value but doesn't allow a big difference
-Transaction.FEE_SECURITY_MARGIN = 15;
+Transaction.FEE_SECURITY_MARGIN = 150;
// max amount of satoshis in circulation
Transaction.MAX_MONEY = 21000000 * 1e8;
@@ -78,7 +78,7 @@ Transaction.NLOCKTIME_BLOCKHEIGHT_LIMIT = 5e8;
Transaction.NLOCKTIME_MAX_VALUE = 4294967295;
// Value used for fee estimation (satoshis per kilobyte)
-Transaction.FEE_PER_KB = 10000;
+Transaction.FEE_PER_KB = 100000;
// Safe upper bound for change address script size in bytes
Transaction.CHANGE_OUTPUT_MAX_SIZE = 20 + 4 + 34 + 4;
| 4 |
diff --git a/packages/ERTP/core/config/inviteConfig.js b/packages/ERTP/core/config/inviteConfig.js @@ -6,9 +6,9 @@ import { makeCoreMintKeeper } from './coreMintKeeper';
import { insist } from '../../util/insist';
import { mustBeComparable } from '../../util/sameStructure';
-const insistOptDescription = optDescription => {
- insist(!!optDescription)`optDescription must be truthy ${optDescription}`;
- mustBeComparable(optDescription);
+const insistDescription = description => {
+ insist(!!description)`description must be truthy ${description}`;
+ mustBeComparable(description);
};
function makeInviteConfig() {
@@ -16,7 +16,7 @@ function makeInviteConfig() {
...noCustomization,
makeMintKeeper: makeCoreMintKeeper,
extentOpsName: 'inviteExtentOps',
- extentOpsArgs: [insistOptDescription],
+ extentOpsArgs: [insistDescription],
});
}
| 10 |
diff --git a/modules/actor/actor-wfrp4e.js b/modules/actor/actor-wfrp4e.js @@ -4324,7 +4324,7 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
testDifficulty: difficulty,
slBonus,
successBonus,
- prefillTooltip: "These effects MAY be causing these bonuses\n" + tooltip.map(t => t.trim()).join("\n")
+ prefillTooltip: (game.i18n.localize("EFFECT.Tooltip")+"\n" + tooltip.map(t => t.trim()).join("\n")
}
}
| 14 |
diff --git a/lib/modules/apostrophe-ui/public/css/components/fields.less b/lib/modules/apostrophe-ui/public/css/components/fields.less .apos-field-input-select-wrapper
{
position: relative;
+ display: flex;
+ align-items: center;
&:after
{
content: "\f0d7";
position: absolute;
- top: 50%;
- transform: translateY(-50%);
right: @apos-padding-3;
.fa;
pointer-events: none;
| 14 |
diff --git a/src/core/background/object/song.js b/src/core/background/object/song.js @@ -274,6 +274,10 @@ define((require) => {
return false;
}
+ if (typeof(song.getUniqueId) !== 'function') {
+ return false;
+ }
+
return this.getUniqueId() === song.getUniqueId();
}
| 7 |
diff --git a/demo/module_manager.js b/demo/module_manager.js @@ -258,7 +258,7 @@ async function iterateModules(_moduleType) {
async function selectAction() {
let options = ['Add a module','Pause / unpause a module','Remove a module','Change module budget','Mint tokens','Permanentally end minting','Exit'];
let index = readlineSync.keyInSelect(options, chalk.yellow('What do you want to do?'), {cancel: false});
- console.log("Selected:",options[index]);
+ console.log("\nSelected:",options[index]);
switch (index) {
case 0:
await addModule();
@@ -284,13 +284,32 @@ async function selectAction() {
displayModules()
}
+function backToMenu() {
+ let options = ['Return to Menu','Exit'];
+ let index = readlineSync.keyInSelect(options, chalk.yellow('What do you want to do?'), {cancel: false});
+ switch (index) {
+ case 0:
+ break;
+ case 1:
+ process.exit();
+ }
+}
+
// Actions
async function addModule() {
- console.log(`This option is not yet available.`)
+ console.log(chalk.red(`
+ *********************************
+ This option is not yet available.
+ *********************************`));
+ backToMenu();
}
async function pauseModule() {
- console.log(`This option is not yet available.`)
+ console.log(chalk.red(`
+ *********************************
+ This option is not yet available.
+ *********************************`));
+ backToMenu();
}
async function removeModule() {
@@ -327,14 +346,19 @@ async function removeModule() {
}
}
let index = readlineSync.keyInSelect(options, chalk.yellow('Which module whould you like to remove?'), {cancel: false});
- console.log("Selected:",options[index]);
- let GAS = Math.round(1.5 * (await securityToken.methods.removeModule(modules[index].module.type,modules[index].index).estimateGas({from: User})));
+ console.log("\nSelected:",options[index]);
+ let GAS = Math.round(2 * (await securityToken.methods.removeModule(modules[index].module.type,modules[index].index).estimateGas({from: User})));
console.log(chalk.black.bgYellowBright(`---- Transaction executed: removeModule - Gas limit provided: ${GAS} ----`));
await securityToken.methods.removeModule(modules[index].module.type,modules[index].index).send({from: User, gas: GAS, gasPrice: DEFAULT_GAS_PRICE });
+ backToMenu()
}
async function changeBudget() {
- console.log(`This option is not yet available.`)
+ console.log(chalk.red(`
+ *********************************
+ This option is not yet available.
+ *********************************`));
+ backToMenu();
}
async function mintTokens() {
@@ -349,10 +373,15 @@ async function mintTokens() {
let tx = await securityToken.methods.mint(_investor, web3.utils.toWei(_amount)).send({ from: User, gas: GAS, gasPrice: DEFAULT_GAS_PRICE });
(tx) ? console.log('Minting Successful') : console.log('Minting Failed');
}
+ backToMenu()
}
async function endMinting() {
- console.log(`This option is not yet available.`)
+ console.log(chalk.red(`
+ *********************************
+ This option is not yet available.
+ *********************************`));
+ backToMenu();
}
// Helpers
| 7 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -33,7 +33,7 @@ fabric-android-secrets: &fabric-android-secrets
ruby-dependencies: &ruby-dependencies
run:
name: Download Ruby Dependencies
- command: bundle check || bundle install --path vendor/bundle
+ command: bundle install --path vendor/bundle
android-dependencies: &android-dependencies
run:
name: Download Android Dependencies
@@ -345,7 +345,7 @@ jobs:
- run:
command: |
bundle exec fastlane release \
- submit:true \
+ submit:true
e2e-ios:
macos:
| 2 |
diff --git a/src/ace.jsx b/src/ace.jsx @@ -171,6 +171,9 @@ export default class ReactAce extends PureComponent {
if (!isEqual(nextProps.markers, oldProps.markers)) {
this.handleMarkers(nextProps.markers || []);
}
+ if (!isEqual(nextProps.scrollMargins, oldProps.scrollMargins)) {
+ this.handleScrollMargins(nextProps.scrollMargins)
+ }
if (this.editor && this.editor.getValue() !== nextProps.value) {
// editor.setValue is a synchronous function call, change event is emitted before setValue return.
this.silent = true;
@@ -188,6 +191,10 @@ export default class ReactAce extends PureComponent {
}
}
+ handleScrollMargins(margins = [0, 0, 0, 0]) {
+ this.editor.renderer.setScrollMargins(margins[0], margins[1], margins[2], margins[3])
+ }
+
componentWillUnmount() {
this.editor.destroy();
this.editor = null;
| 9 |
diff --git a/node-red-contrib-iadvize/package.json b/node-red-contrib-iadvize/package.json {
"name": "node-red-contrib-viseo-iadvize",
- "version": "0.1.0",
+ "version": "0.1.1",
"description" : "VISEO Bot Maker - iAdvize",
"dependencies": {
"node-red-viseo-bot-manager": "~0.1.0",
| 9 |
diff --git a/src/components/Story/StoryFull.less b/src/components/Story/StoryFull.less margin: 8px 0;
}
- & p {
+ & p:not(:empty) {
letter-spacing: 0.7px;
text-align: justify;
margin: 32px 0;
font-size: 18px;
}
+
& img {
margin: 0 auto;
max-width: 100%;
| 8 |
diff --git a/config/redirects.js b/config/redirects.js @@ -1208,5 +1208,9 @@ module.exports = [
{
from: '/quickstart/backend/nodejs/00-getting-started',
to: '/quickstart/backend/nodejs'
+ },
+ {
+ from: '/quickstart/backend/aspnet-core-webapi/00-getting-started',
+ to: '/quickstart/backend/aspnet-core-webapi'
}
];
| 0 |
diff --git a/EXAMPLES.md b/EXAMPLES.md - A basic, three-dependency @pika/web project: [[Source]](https://glitch.com/edit/#!/pika-web-example-simple) [[Live Demo]](https://pika-web-example-simple.glitch.me/)
- A Preact + HTM project: [[Source]](https://glitch.com/edit/#!/pika-web-example-preact-htm) [[Live Demo]](https://pika-web-example-preact-htm.glitch.me)
- An Electron project, using Three.js: [[Source]](https://github.com/br3tt/electron-three)
+- A Preact + TypeScript project [[Source]](https://glitch.com/edit/#!/pika-web-ts-preact) [[Live Demo]](https://pika-web-ts-preact.glitch.me/)
## Call for Examples (CFE)
| 0 |
diff --git a/nin/frontend/app/scripts/directives/editor/GraphEditor.js b/nin/frontend/app/scripts/directives/editor/GraphEditor.js @@ -33,7 +33,15 @@ class GraphEditor extends React.Component {
generateDepths() {
let deepestLevel = 0;
let depths = {};
- let seen = new Set();
+
+ depths.root = {
+ x: 0,
+ y: 0,
+ id: 'root',
+ counter: 0,
+ };
+
+ let counter = 1;
function recurse(level, currentNodes) {
let nextLevel = [];
@@ -41,16 +49,17 @@ class GraphEditor extends React.Component {
for (let i = 0; i < currentNodes.length; i++) {
let node = currentNodes[i];
- seen.add(node.id);
- depths[node.id] = {
- x: level,
- y: -i
- };
for (let child in node.inputs) {
let source = node.inputs[child].source;
- if (source && !seen.has(source.node.id)) {
- seen.add(source.node.id);
+ if(source) {
+ depths[source.node.id] = {
+ x: level + 1,
+ y: 0,
+ id: source.node.id,
+ counter
+ };
+ counter++;
nextLevel.push(source.node);
}
}
@@ -63,6 +72,21 @@ class GraphEditor extends React.Component {
recurse(0, [this.props.nodes.root]);
+ const positions = [];
+ for(let i = 0; i <= deepestLevel; i++) {
+ positions[i] = [];
+ }
+ for(let nodeId in depths) {
+ positions[depths[nodeId].x].push(depths[nodeId]);
+ }
+
+ for(let x in positions) {
+ for(let y in positions[x]) {
+ const depth = positions[x][y];
+ depths[depth.id].y = positions[x].length / 2 - y;
+ }
+ }
+
let offset = 0;
for (let nodeId in this.props.nodes) {
if (depths[nodeId] === undefined) {
| 7 |
diff --git a/test/es2017/asyncGenerators.js b/test/es2017/asyncGenerators.js @@ -84,4 +84,34 @@ module.exports = function () {
}
)
});
+
+ it('should handle async iterables in each (errors)', (done) => {
+ const calls = []
+ async.each(new AsyncIterable(5),
+ async (val) => {
+ calls.push(val)
+ if (val === 3) throw new Error('fail')
+ await delay(5)
+ }, (err) => {
+ expect(err.message).to.equal('fail')
+ expect(calls).to.eql([0, 1, 2, 3])
+ done()
+ }
+ )
+ })
+
+ it('should handle async iterables in each (cancelled)', async () => {
+ const calls = []
+ async.each(new AsyncIterable(5),
+ (val, cb) => {
+ calls.push(val)
+ if (val === 3) cb(false)
+ cb()
+ }, () => {
+ throw new Error('should not get here')
+ }
+ )
+ await delay(10)
+ expect(calls).to.eql([0, 1, 2, 3])
+ })
}
| 7 |
diff --git a/README.md b/README.md @@ -111,7 +111,7 @@ and become a member of the CxJS community.
This repository is used to develop main npm packages, documentation and gallery.
-First, install the packages using `npm` or `yarn`. ()Currently yarn is the preferred tool as npm is having issues around :link for symlinks [npm/npm#15900](https://github.com/npm/npm/pull/15900))
+First, install the packages using `npm` or `yarn`. (Currently [yarn](https://yarnpkg.com/en/) is the preferred tool as npm is having issues around :link for symlinks - [npm/npm#15900](https://github.com/npm/npm/pull/15900))
```bash
$ npm install
| 0 |
diff --git a/src/js/modules/Import/Import.js b/src/js/modules/Import/Import.js @@ -21,7 +21,7 @@ class Import extends Module{
}
loadDataCheck(data){
- return typeof data === "string";
+ return this.table.options.importFormat && (typeof data === "string" || (Array.isArray(data) && data.length && Array.isArray(data));
}
loadData(data, params, config, silent, previousData){
@@ -46,6 +46,8 @@ class Import extends Module{
importer = importFormat;
}
+ console.log("i", importer)
+
if(!importer){
console.error("Import Error - Importer not found:", importFormat);
}
| 3 |
diff --git a/bl-languages/de_DE.json b/bl-languages/de_DE.json "disabled-plugins": "Deaktivierte Plugins",
"remove-logo": "Logo entfernen",
"preview": "Vorschau",
- "author-can-write-and-edit-their-own-content": "Author: Can write and edit their own content. Editor: Can write and edit the content of others."
+ "author-can-write-and-edit-their-own-content": "Autor: Kann Inhalte erstellen und bearbeiten. Editor: Kann Inhalte erstellen und eigene sowie fremde Inhalte bearbeiten."
}
| 3 |
diff --git a/avatars/vrarmik/LegsManager.js b/avatars/vrarmik/LegsManager.js @@ -171,6 +171,8 @@ class LegsManager {
this.lastHmdPosition = new THREE.Vector3();
this.hmdVelocity = new THREE.Vector3();
+
+ this.enabled = true;
}
Start() {
@@ -182,6 +184,7 @@ class LegsManager {
}
Update() {
+ if (this.enabled) {
Helpers.updateMatrixWorld(this.leftLeg.transform);
Helpers.updateMatrixWorld(this.leftLeg.upperLeg);
Helpers.updateMatrixWorld(this.leftLeg.lowerLeg);
@@ -455,5 +458,6 @@ class LegsManager {
this.rightLeg.Update();
}
}
+}
export default LegsManager;
| 0 |
diff --git a/package.json b/package.json "version": "0.0.1",
"private": true,
"scripts": {
- "start": "node node_modules/react-native/local-cli/cli.js start",
- "test": "jest",
+ "android": "react-native run-android",
+ "ios": "react-native run-ios",
"lint": "eslint app",
- "relay": "relay-compiler --verbose --src ./app/screens --schema ./app/schema.graphql"
+ "relay": "relay-compiler --verbose --src ./app/screens --schema ./app/schema.graphql",
+ "start": "node node_modules/react-native/local-cli/cli.js start",
+ "test": "jest"
},
"dependencies": {
"react": "16.0.0-beta.5",
| 0 |
diff --git a/src/client/js/components/PageList/BookmarkList.jsx b/src/client/js/components/PageList/BookmarkList.jsx @@ -12,7 +12,7 @@ import PaginationWrapper from '../PaginationWrapper';
import Page from './Page';
-const logger = loggerFactory('growi:MyBookmarkList');
+const logger = loggerFactory('growi:BookmarkList');
const BookmarkList = (props) => {
const { t, appContainer, userId } = props;
| 10 |
diff --git a/writer.js b/writer.js @@ -98,6 +98,8 @@ function saveJoint(objJoint, objValidationState, preCommitCallback, onDone) {
conn.addQuery(arrQueries, "INSERT "+conn.getIgnore()+" INTO addresses (address) VALUES(?)", [author.address]);
conn.addQuery(arrQueries, "INSERT INTO unit_authors (unit, address, definition_chash) VALUES(?,?,?)",
[objUnit.unit, author.address, definition_chash]);
+ if (storage.isGenesisUnit(objUnit.unit))
+ conn.addQuery(arrQueries, "UPDATE unit_authors SET _mci=0 WHERE unit=?", [objUnit.unit]);
if (!objUnit.content_hash){
for (var path in author.authentifiers)
conn.addQuery(arrQueries, "INSERT INTO authentifiers (unit, address, path, authentifier) VALUES(?,?,?,?)",
| 12 |
diff --git a/src/components/Visualizations/GaugeChart.jsx b/src/components/Visualizations/GaugeChart.jsx @@ -25,7 +25,7 @@ const Styled = styled.div`
}
.gauge:before, .meter { width:10em; height:5em; }
- .gauge:before { border-radius:5em 5em 0 0; background:${constants.colorRed}; }
+ .gauge:before { border-radius:5em 5em 0 0; background:#2a2a2a; }
.gauge:after {
position:absolute;
@@ -44,7 +44,7 @@ const Styled = styled.div`
transform:rotate(${props => props.percent}turn);
}
- .percentage .meter { background:${constants.colorGreen}; }
+ .percentage .meter { background:${props => props.meterColor}; }
.percentage-container {
position:absolute;
bottom:-.75em;
@@ -57,7 +57,7 @@ const Styled = styled.div`
.percentage-indicator {
font:bold 1.25em/1.6 sans-serif;
- color:${constants.colorGreen};
+ color:${props => props.meterColor};
white-space:pre;
vertical-align:baseline;
@@ -89,8 +89,19 @@ const Styled = styled.div`
`;
const computeMeterPercent = value => 0.005 * value;
+const computeMeterColor = (value) => {
+ if (value < 45) {
+ return 'rgb(179,132,91)';
+ } else if (value < 50) {
+ return 'rgb(156,148,96)';
+ } else if (value < 53) {
+ return 'rgb(140,159,99)';
+ }
+ return 'rgb(117,176,103)';
+};
+
const GaugeChart = ({ value, caption }) => (
- <Styled percent={computeMeterPercent(value)}>
+ <Styled percent={computeMeterPercent(value)} meterColor={computeMeterColor(value)}>
<div className="gauge percentage">
<div className="meter" />
<div className="percentage-container">
| 13 |
diff --git a/lib/shared/addon/components/cru-cluster/component.js b/lib/shared/addon/components/cru-cluster/component.js @@ -73,8 +73,10 @@ export default Component.extend(ViewNewEdit, ChildHook, {
kontainerDrivers: computed('model.kontainerDrivers.@each.{id,state}', function() {
let nope = ['import', 'rancherkubernetesengine'];
- let builtIn = get(this, 'model.kontainerDrivers').filter( (d) => d.active && d.builtIn && !nope.includes(d.id));
- let custom = get(this, 'model.kontainerDrivers').filter( (d) => d.active && !d.builtIn && d.hasUi);
+ let kDrivers = get(this, 'model.kontainerDrivers') || [];
+ let builtIn = kDrivers.filter( (d) => d.active && d.builtIn && !nope.includes(d.id));
+ let custom = kDrivers.filter( (d) => d.active && !d.builtIn && d.hasUi);
+
return {
builtIn,
| 1 |
diff --git a/src/upgrade/upgrade_utils.js b/src/upgrade/upgrade_utils.js @@ -20,7 +20,6 @@ const TMP_PATH = '/tmp';
const EXTRACTION_PATH = `${TMP_PATH}/test`;
const NEW_TMP_ROOT = `${EXTRACTION_PATH}/noobaa-core`;
const PACKAGE_FILE_NAME = 'new_version.tar.gz';
-const CORE_DIR = "/root/node_modules/noobaa-core";
const SPAWN_SCRIPT = `${NEW_TMP_ROOT}/src/deploy/NVA_build/two_step_upgrade_checkups_spawn.sh`;
const ERRORS_PATH = `${TMP_PATH}/new_tests_errors.json`;
@@ -377,35 +376,8 @@ function do_yum_update() {
}
-function packages_upgrade() {
- dbg.log0(`fix SCL issue (centos-release-SCL)`);
- return promise_utils.exec(`yum -y remove centos-release-SCL`, {
- ignore_rc: false,
- return_stdout: true,
- trim_stdout: true
- })
- .then(() => {
- dbg.log0('packages_upgrade: Removed centos-release-SCL');
- })
- .then(() => promise_utils.exec(`cp -f ${EXTRACTION_PATH}/noobaa-core/src/deploy/NVA_build/rsyslog.repo /etc/yum.repos.d/rsyslog.repo`, {
- ignore_rc: false,
- return_stdout: true,
- trim_stdout: true
- }))
- .then(() => promise_utils.exec(`cp -f ${EXTRACTION_PATH}/noobaa-core/src/deploy/NVA_build/RPM-GPG-KEY-Adiscon ${CORE_DIR}/src/deploy/NVA_build/RPM-GPG-KEY-Adiscon`, {
- ignore_rc: false,
- return_stdout: true,
- trim_stdout: true
- }))
- .then(() => promise_utils.exec(`yum -y install centos-release-scl`, {
- ignore_rc: false,
- return_stdout: true,
- trim_stdout: true
- }))
- .then(() => {
- dbg.log0('packages_upgrade: Installed centos-release-scl');
- })
- .then(() => {
+async function packages_upgrade() {
+ try {
const packages_to_install = [
'sudo',
'lsof',
@@ -433,25 +405,27 @@ function packages_upgrade() {
'pv', // pipe viewer
];
dbg.log0(`install additional packages`);
- return promise_utils.exec(`yum install -y ${packages_to_install.join(' ')}`, {
+ const res = await promise_utils.exec(`yum install -y ${packages_to_install.join(' ')}`, {
ignore_rc: false,
return_stdout: true,
trim_stdout: true
- })
- .then(res => {
- dbg.log0(res);
});
- })
- .then(() => promise_utils.exec(`systemctl enable rngd && systemctl start rngd`, {
+ dbg.log0(res);
+
+ await promise_utils.exec(`systemctl enable rngd && systemctl start rngd`, {
ignore_rc: false,
return_stdout: true,
trim_stdout: true
- }))
- .then(do_yum_update)
- .catch(err => {
+ });
+
+ await do_yum_update();
+
+ } catch (err) {
dbg.error('packages_upgrade: Failure', err);
throw new Error('COULD_NOT_INSTALL_PACKAGES');
- });
+ }
+
+
}
function extract_package() {
| 2 |
diff --git a/src/article/models/ExternalLink.js b/src/article/models/ExternalLink.js -import { STRING, Fragmenter } from 'substance'
+import { STRING } from 'substance'
import Annotation from './Annotation'
export default class ExternalLink extends Annotation {
- static get fragmentation () { return Fragmenter.SHOULD_NOT_SPLIT }
+ shouldNotSplit () { return true }
}
+
ExternalLink.schema = {
type: 'external-link',
href: STRING,
| 4 |
diff --git a/web-stories.php b/web-stories.php * Plugin URI: https://wp.stories.google/
* Author: Google
* Author URI: https://opensource.google.com/
- * Version: 1.7.0-alpha.0
+ * Version: 1.7.0-rc.1
* Requires at least: 5.3
* Requires PHP: 5.6
* Text Domain: web-stories
@@ -40,7 +40,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
-define( 'WEBSTORIES_VERSION', '1.7.0-alpha.0' );
+define( 'WEBSTORIES_VERSION', '1.7.0-rc.1' );
define( 'WEBSTORIES_DB_VERSION', '3.0.7' );
define( 'WEBSTORIES_AMP_VERSION', '2.1.1' ); // Version of the AMP library included in the plugin.
define( 'WEBSTORIES_PLUGIN_FILE', __FILE__ );
| 6 |
diff --git a/configs/bootstrap-v4.json b/configs/bootstrap-v4.json {
"index_name": "bootstrap-v4",
"start_urls": [
- "https://getbootstrap.com/"
+ "https://v4-alpha.getbootstrap.com/"
],
"stop_urls": [],
"selectors": {
- "lvl0": ".bd-content h1",
- "lvl1": ".bd-content h2",
- "lvl2": ".bd-content h3",
+ "lvl0": ".bd-pageheader h1",
+ "lvl1": ".bd-content h1",
+ "lvl2": ".bd-content h2",
+ "lvl3": ".bd-content h3",
+ "lvl4": ".bd-content h4",
+ "lvl5": ".bd-content h5",
"text": ".bd-content p, .bd-content li"
},
"min_indexed_level": 1,
| 13 |
diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon-nan-polymorphic/addon.cpp b/lib/node_modules/@stdlib/strided/common/examples/addon-nan-polymorphic/addon.cpp @@ -104,8 +104,7 @@ namespace addon_strided_add {
uint8_t *arrays[3];
int64_t strides[3];
int64_t shape[1];
- uint8_t scalarX;
- uint8_t scalarY;
+ int64_t sargs; // WARNING: we assume no more than 64 input strided array arguments, which seems a reasonable assumption
int64_t nargs;
int64_t nout;
int64_t nin;
@@ -149,14 +148,14 @@ namespace addon_strided_add {
// Input strided array arguments are every other argument beginning from the second argument...
for ( i = 1; i < n; i += 2 ) {
- if ( info[ i ]->IsArrayBufferView() ) {
j = ( i-1 ) / 2;
+ if ( info[ i ]->IsArrayBufferView() ) {
TypedArrayContents<uint8_t> TypedArray( info[ i ] );
arrays[ j ] = *TypedArray;
types[ j ] = typed_array_data_type( info[ i ] );
strides[ j ] *= stdlib_ndarray_bytes_per_element( types[ j ] );
} else if ( info[ i ]->IsNumber() ) {
- scalarX = 1; // TODO
+ sargs |= (1<<j);
} else {
ThrowTypeError( "invalid input argument. Input strided array argument must be a typed array or scalar." );
return;
@@ -165,11 +164,11 @@ namespace addon_strided_add {
// Output strided array arguments are every other argument beginning from the argument following the last input strided array stride argument...
for ( i = n; i < nargs; i++ ) {
+ j = ( i-1 ) / 2;
if ( !info[ i ]->IsArrayBufferView() ) {
ThrowTypeError( "invalid input argument. Output strided array arguments must be typed arrays." );
return;
} else {
- j = ( i-1 ) / 2;
TypedArrayContents<uint8_t> TypedArray( info[ i ] );
arrays[ j ] = *TypedArray;
types[ j ] = typed_array_data_type( info[ i ] );
@@ -183,11 +182,10 @@ namespace addon_strided_add {
// Input strided array arguments are every other argument beginning from the second argument...
for ( i = 1; i < n; i += 2 ) {
+ j = ( i-1 ) / 2;
if ( info[ i ]->IsNumber() ) {
- scalarX = 1; // TODO
+ sargs |= (1<<j);
} else if ( info[ i ]->IsObject() && !info[ i ]->IsNull() ) {
- j = ( i-1 ) / 2;
-
// Assume a typed array:
TypedArrayContents<uint8_t> TypedArray( info[ i ] );
arrays[ j ] = *TypedArray;
@@ -202,9 +200,8 @@ namespace addon_strided_add {
// Output strided array arguments are every other argument beginning from the argument following the last input strided array stride argument...
for ( i = n; i < nargs; i++ ) {
- if ( info[ i ]->IsObject() && !info[ i ]->IsNull() ) {
j = ( i-1 ) / 2;
-
+ if ( info[ i ]->IsObject() && !info[ i ]->IsNull() ) {
// Assume a typed array:
TypedArrayContents<uint8_t> TypedArray( info[ i ] );
arrays[ j ] = *TypedArray;
| 4 |
diff --git a/src/components/api-request.js b/src/components/api-request.js @@ -486,7 +486,7 @@ export default class ApiRequest extends LitElement {
reqBodyFormHtml = this.formDataTemplate(reqBody.schema, reqBody.mimeType, (ex[0] ? ex[0].exampleValue : ''));
}
}
- } else if ((RegExp('^audio/|^image/|^video/|/octet-stream$|/tar$|/zip$|/7z$|/pdf$').test(this.selectedRequestBodyType))) {
+ } else if ((RegExp('^audio/|^image/|^video/|^font/|tar$|zip$|7z$|rtf$|msword$|excel$|/pdf$|/octet-stream$').test(this.selectedRequestBodyType))) {
if (reqBody.mimeType === this.selectedRequestBodyType) {
reqBodyFileInputHtml = html`
<div class = "small-font-size bold-text row">
@@ -1020,7 +1020,7 @@ export default class ApiRequest extends LitElement {
}
});
fetchOptions.body = formDataParams;
- } else if ((RegExp('^audio|^image|^video|octet-stream$|tar$|zip$|7z$|pdf$').test(requestBodyType))) {
+ } else if ((RegExp('^audio/|^image/|^video/|^font/|tar$|zip$|7z$|rtf$|msword$|excel$|/pdf$|/octet-stream$').test(requestBodyType))) {
const bodyParamFileEl = requestPanelEl.querySelector('.request-body-param-file');
if (bodyParamFileEl && bodyParamFileEl.files[0]) {
fetchOptions.body = bodyParamFileEl.files[0];
@@ -1079,7 +1079,7 @@ export default class ApiRequest extends LitElement {
resp.json().then((respObj) => {
me.responseText = JSON.stringify(respObj, null, 2);
});
- } else if (RegExp('octet-stream|tar|zip|7z|pdf').test(contentType)) {
+ } else if (RegExp('^font/|tar$|zip$|7z$|rtf$|msword$|excel$|/pdf$|/octet-stream$').test(contentType)) {
me.responseIsBlob = true;
me.responseBlobType = 'download';
} else if (RegExp('^audio|^image|^video').test(contentType)) {
| 7 |
diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx @@ -127,7 +127,6 @@ class Blocks extends React.Component {
if (this.props.vm.editingTarget && !this.state.workspaceMetrics[this.props.vm.editingTarget.id]) {
this.onWorkspaceMetricsChange();
}
-
this.ScratchBlocks.Events.disable();
this.workspace.clear();
@@ -152,6 +151,7 @@ class Blocks extends React.Component {
}
handlePromptCallback (data) {
this.state.prompt.callback(data);
+ this.props.vm.createVariable(data);
this.handlePromptClose();
}
handlePromptClose () {
| 4 |
diff --git a/components/Profile/index.js b/components/Profile/index.js @@ -220,7 +220,8 @@ export default compose(
graphql(getPublicUser, {
options: props => ({
variables: {
- userId: props.userId
+ userId: props.userId,
+ limit: 7
}
})
})
| 4 |
diff --git a/test/Air/Air.test.js b/test/Air/Air.test.js @@ -57,6 +57,18 @@ describe('#AirService', () => {
});
});
+ describe('availability', () => {
+ it('should check if correct function from service is called', () => {
+ const availability = sinon.spy(() => {});
+ const service = () => ({ availability });
+ const createAirService = proxyquire('../../src/Services/Air/Air', {
+ './AirService': service,
+ });
+ createAirService({ auth }).availability({});
+ expect(availability.calledOnce).to.be.equal(true);
+ });
+ });
+
describe('toQueue', () => {
it('should check if correct function from service is called', () => {
const gdsQueue = sinon.spy(() => {});
| 0 |
diff --git a/edit.js b/edit.js @@ -4633,97 +4633,6 @@ const _tickPlanetAnimation = factor => {
}
}; */
-const cometFireMesh = (() => {
- const radius = 1;
- const opacity = 0.5;
- const _makeSphereGeometry = (radius, color, position, scale) => {
- const geometry = new THREE.SphereBufferGeometry(radius, 8, 5);
- for (let i = 0; i < geometry.attributes.position.array.length; i += 3) {
- if (geometry.attributes.position.array[i + 1] > 0) {
- geometry.attributes.position.array[i] = Math.sign(geometry.attributes.position.array[i]);
- geometry.attributes.position.array[i + 2] = Math.sign(geometry.attributes.position.array[i + 2]);
- }
- }
-
- geometry
- .applyMatrix4(new THREE.Matrix4().makeTranslation(position.x, position.y, position.z))
- .applyMatrix4(new THREE.Matrix4().makeScale(scale.x, scale.y, scale.z));
-
- const c = new THREE.Color(color);
- const colors = new Float32Array(geometry.attributes.position.array.length);
- for (let i = 0; i < colors.length; i += 3) {
- c.toArray(colors, i);
- }
- geometry.setAttribute('color', new THREE.BufferAttribute(colors, 3));
-
- return geometry;
- };
- const cometFireGeometry = BufferGeometryUtils.mergeBufferGeometries([
- _makeSphereGeometry(radius, 0x5c6bc0, new THREE.Vector3(0, 0.9, 0), new THREE.Vector3(0.8, 10, 0.8)),
- _makeSphereGeometry(radius, 0xef5350, new THREE.Vector3(0, 0.7, 0), new THREE.Vector3(2, 5, 2)),
- _makeSphereGeometry(radius, 0xffa726, new THREE.Vector3(0, 0, 0), new THREE.Vector3(1, 1, 1)),
- ]);
- const cometFireMaterial = new THREE.ShaderMaterial({
- uniforms: {
- uAnimation: {
- type: 'f',
- value: 0,
- },
- },
- vertexShader: `\
- #define PI 3.1415926535897932384626433832795
-
- uniform float uAnimation;
- attribute vec3 color;
- attribute float y;
- attribute vec3 barycentric;
- // varying float vY;
- varying vec2 vUv;
- // varying float vOpacity;
- varying vec3 vColor;
- void main() {
- // vY = y * ${opacity.toFixed(8)};
- // vUv = uv.x + uAnimation;
- vUv = uv;
- // vOpacity = 0.8 + 0.2 * (sin(uAnimation*5.0*PI*2.0)+1.0)/2.0;
- // vOpacity *= 1.0-(uv.y/0.5);
- // vOpacity = (0.5 + 0.5 * (sin(uv.x*PI*2.0/0.05) + 1.0)/2.0) * (0.3 + 1.0-uv.y/0.5);
- /* vec3 p = position;
- if (p.y > 0.0) {
- p.x = sign(p.x) * 1.0;
- p.z = sign(p.z) * 1.0;
- } */
- gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
- vColor = color;
- }
- `,
- fragmentShader: `\
- #define PI 3.1415926535897932384626433832795
-
- uniform float uAnimation;
- uniform sampler2D uCameraTex;
- // varying float vY;
- varying vec2 vUv;
- // varying float vOpacity;
- varying vec3 vColor;
-
- void main() {
- vec3 c2 = vColor * (2.0-vUv.y/0.5);
- float a = 0.2 + (0.5 + 0.5 * pow((sin((vUv.x + uAnimation) *PI*2.0/0.1) + 1.0)/2.0, 2.0)) * (1.0-vUv.y/0.5);
- gl_FragColor = vec4(c2, a);
- }
- `,
- side: THREE.DoubleSide,
- transparent: true,
- depthWrite: false,
- });
- const cometFireMesh = new THREE.Mesh(cometFireGeometry, cometFireMaterial);
- cometFireMesh.position.y = 1;
- cometFireMesh.frustumCulled = false;
- return cometFireMesh;
-})();
-scene.add(cometFireMesh);
-
const hpMesh = (() => {
const mesh = new THREE.Object3D();
@@ -5509,7 +5418,6 @@ function animate(timestamp, frame) {
for (const animal of animals) {
animal.update();
}
- cometFireMesh.material.uniforms.uAnimation.value = (Date.now() % 2000) / 2000;
hpMesh.update();
if (skybox) {
skybox.material.uniforms.iTime.value = ((Date.now() - startTime) % 3000) / 3000;
| 2 |
diff --git a/tests/e2e/specs/modules/tagmanager/setup.test.js b/tests/e2e/specs/modules/tagmanager/setup.test.js @@ -81,12 +81,12 @@ describe( 'setting up the TagManager module with no existing account', () => {
// Ensure account and container are selected by default.
await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /test account a/i } );
- await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /gtm-abcxyz/i } );
+ await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /test container x/i } );
// Ensure "Set up a new container" option is present in container select.
- await expect( page ).toClick( '.mdc-select', { text: /gtm-abcxyz/i } );
+ await expect( page ).toClick( '.mdc-select', { text: /test container x/i } );
await expect( page ).toMatchElement( '.mdc-menu-surface--open .mdc-list-item', { text: /set up a new container/i } );
- await expect( page ).toClick( '.mdc-menu-surface--open .mdc-list-item', { text: /gtm-abcxyz/i } );
+ await expect( page ).toClick( '.mdc-menu-surface--open .mdc-list-item', { text: /test container x/i } );
await Promise.all( [
expect( page ).toClick( 'button', { text: /confirm \& continue/i } ),
@@ -109,7 +109,7 @@ describe( 'setting up the TagManager module with no existing account', () => {
// Ensure account and container are selected by default.
await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /test account a/i } );
- await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /gtm-abcxyz/i } );
+ await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /test container x/i } );
// Ensure choosing a different account loads the proper values.
await expect( page ).toClick( '.mdc-select', { text: /test account a/i } );
@@ -120,7 +120,7 @@ describe( 'setting up the TagManager module with no existing account', () => {
// Ensure proper account and container are now selected.
await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /test account b/i } );
- await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /gtm-bcdwxy/i } );
+ await expect( page ).toMatchElement( '.mdc-select__selected-text', { text: /test container y/i } );
await Promise.all( [
expect( page ).toClick( 'button', { text: /confirm \& continue/i } ),
| 3 |
diff --git a/token-metadata/0x6a6c2adA3Ce053561C2FbC3eE211F23d9b8C520a/metadata.json b/token-metadata/0x6a6c2adA3Ce053561C2FbC3eE211F23d9b8C520a/metadata.json "symbol": "TON",
"address": "0x6a6c2adA3Ce053561C2FbC3eE211F23d9b8C520a",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/packages/yoroi-ergo-connector/example-cardano/index.js b/packages/yoroi-ergo-connector/example-cardano/index.js @@ -476,12 +476,12 @@ showUtxos.addEventListener('click', () => {
function alertError (text) {
toggleSpinner('hide');
- alertEl.className = 'alert alert-danger'
+ alertEl.className = 'alert alert-danger overflow-scroll'
alertEl.innerHTML = text
}
function alertSuccess(text) {
- alertEl.className = 'alert alert-success'
+ alertEl.className = 'alert alert-success overflow-scroll'
alertEl.innerHTML = text
}
@@ -670,7 +670,7 @@ function createTxHandler(e) {
cardanoApi.experimental.createTx(txReq, true).then(txHex => {
toggleSpinner('hide')
- alertSuccess('Creating tx succeeds: ' + txHex)
+ alertSuccess(`<p> Creating tx succeeds: ${txHex} <p/>`)
unsignedTransactionHex = txHex
}).catch(error => {
console.error(error)
| 9 |
diff --git a/assets/js/googlesitekit/modules/datastore/modules.js b/assets/js/googlesitekit/modules/datastore/modules.js @@ -536,7 +536,7 @@ const baseActions = {
recoveredModules.push( slug );
} else {
- errors.push( error );
+ errors.push( [ slug, error ] );
}
}
@@ -558,19 +558,26 @@ const baseActions = {
}
}
+ const response = {
+ success: {
+ ...Object.fromEntries(
+ recoveredModules.map( ( slug ) => [ slug, true ] )
+ ),
+ ...Object.fromEntries(
+ errors.map( ( [ slug ] ) => [ slug, false ] )
+ ),
+ },
+ };
+
if ( errors.length ) {
return {
- response: {
- success: false,
- },
- error: errors,
+ response,
+ error: Object.fromEntries( errors ),
};
}
return {
- response: {
- success: true,
- },
+ response,
};
}
),
| 7 |
diff --git a/src/og/camera/PlanetCamera.js b/src/og/camera/PlanetCamera.js @@ -551,9 +551,9 @@ class PlanetCamera extends Camera {
let slope = n.dot(eyeNorm);
if (minSlope) {
- let dSlope = slope - this.slope;
+ //let dSlope = slope - this.slope;
- if (slope < minSlope && dSlope < 0) return;
+ //if (slope < minSlope && dSlope < 0) return;
if (
(slope > 0.1 && v.dot(eyeNorm) > 0) ||
| 2 |
diff --git a/app/Deprecate.jsx b/app/Deprecate.jsx @@ -13,11 +13,6 @@ export default class Deprecate extends React.Component {
<div>
<Translate content="migration.text_1" component="h4" />
<Translate content="migration.text_2" component="p" unsafe />
-
-
- <Settings {...this.props} deprecated />
-
-
</div>
);
}
@@ -32,14 +27,19 @@ export default class Deprecate extends React.Component {
render() {
return (
- <div className="grid-frame vertical">
- <div className="grid-block">
- <div className="grid-content" style={{paddingTop: "2rem"}}>
+ <div className="grid-frame">
+ <div className="grid-block vertical">
+
+ <div className="grid-content large-offset-2 large-8 shrink" style={{paddingBottom: "3rem"}}>
+
<Translate content="migration.title" component="h2" />
<Translate content="migration.announcement_1" unsafe component="p" />
<p><a href="https://wallet.bitshares.org" target='blank' rel='noopener noreferrer'>https://wallet.bitshares.org</a></p>
+
{this.hasWallet() ? this.renderForWallet() : this.renderForCloud()}
+
</div>
+ {this.hasWallet() ? <Settings {...this.props} deprecated /> : null}
</div>
</div>
);
| 7 |
diff --git a/test/jasmine/tests/bar_test.js b/test/jasmine/tests/bar_test.js @@ -981,12 +981,10 @@ describe('Bar.crossTraceCalc (formerly known as setPositions)', function() {
it('should set unit width for categories in overlay mode', function() {
var gd = mockBarPlot([{
- type: 'bar',
x: ['a', 'b', 'c'],
y: [2, 2, 2]
},
{
- type: 'bar',
x: ['a', 'c'],
y: [1, 1]
}], {
@@ -996,6 +994,20 @@ describe('Bar.crossTraceCalc (formerly known as setPositions)', function() {
expect(gd.calcdata[1][0].t.bardelta).toBe(1);
});
+ it('should set unit width for categories case of missing data for defined category', function() {
+ var gd = mockBarPlot([{
+ x: ['a', 'c'],
+ y: [1, 2]
+ }, {
+ x: ['a', 'c'],
+ y: [1, 2],
+ }], {
+ xaxis: { categoryarray: ['a', 'b', 'c'] }
+ });
+
+ expect(gd.calcdata[1][0].t.bardelta).toBe(1);
+ });
+
describe('should relative-stack bar within the same trace that overlap under barmode=group', function() {
it('- base case', function() {
var gd = mockBarPlot([{
| 0 |
diff --git a/index.js b/index.js @@ -20,7 +20,6 @@ module.exports = Enforcer;
const dataTypeFormats = require('./bin/data-type-formats');
const Exception = require('./bin/exception');
-const freeze = require('./bin/freeze');
const RefParser = require('json-schema-ref-parser');
const Super = require('./bin/super');
const util = require('./bin/util');
@@ -43,8 +42,8 @@ async function Enforcer(definition, options) {
if (!options.hasOwnProperty('hideWarnings')) options.hideWarnings = false;
const refParser = new RefParser();
- definition = await refParser.dereference(definition);
definition = util.copy(definition);
+ definition = await refParser.dereference(definition);
let exception = Exception('One or more errors exist in the OpenAPI definition');
const hasSwagger = definition.hasOwnProperty('swagger');
@@ -67,7 +66,6 @@ async function Enforcer(definition, options) {
if (!options.hideWarnings && warnings) console.warn(warnings.toString());
if (exception && exception.hasException) throw Error(exception.toString());
- if (options.freeze) freeze.deep(openapi);
return openapi;
}
| 2 |
diff --git a/token-metadata/0x37236CD05b34Cc79d3715AF2383E96dd7443dCF1/metadata.json b/token-metadata/0x37236CD05b34Cc79d3715AF2383E96dd7443dCF1/metadata.json "symbol": "SLP",
"address": "0x37236CD05b34Cc79d3715AF2383E96dd7443dCF1",
"decimals": 0,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/exampleSite/content/_index/table.md b/exampleSite/content/_index/table.md @@ -15,7 +15,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Buttons"
- color = "link p-0"
+ color = "link"
url = "fragments/buttons"
[[rows.values]]
@@ -24,7 +24,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Contact"
- color = "link p-0"
+ color = "link"
url = "fragments/contact"
[[rows.values]]
@@ -33,7 +33,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Content"
- color = "link p-0"
+ color = "link"
url = "fragments/content"
[[rows.values]]
@@ -42,7 +42,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Copyright"
- color = "link p-0"
+ color = "link"
url = "fragments/copyright"
[[rows.values]]
@@ -51,7 +51,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Embed"
- color = "link p-0"
+ color = "link"
url = "fragments/embed"
[[rows.values]]
@@ -60,7 +60,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Footer"
- color = "link p-0"
+ color = "link"
url = "fragments/footer"
[[rows.values]]
@@ -69,7 +69,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Hero"
- color = "link p-0"
+ color = "link"
url = "fragments/hero"
[[rows.values]]
@@ -78,7 +78,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Item"
- color = "link p-0"
+ color = "link"
url = "fragments/item"
[[rows.values]]
@@ -87,7 +87,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Items"
- color = "link p-0"
+ color = "link"
url = "fragments/items"
[[rows.values]]
@@ -96,7 +96,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Logos"
- color = "link p-0"
+ color = "link"
url = "fragments/logos"
[[rows.values]]
@@ -105,7 +105,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Member"
- color = "link p-0"
+ color = "link"
url = "fragments/member"
[[rows.values]]
@@ -114,7 +114,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Nav"
- color = "link p-0"
+ color = "link"
url = "fragments/nav"
[[rows.values]]
@@ -123,7 +123,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Portfolio"
- color = "link p-0"
+ color = "link"
url = "fragments/portfolio"
[[rows.values]]
@@ -132,7 +132,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Header"
- color = "link p-0"
+ color = "link"
url = "fragments/header"
[[rows.values]]
@@ -141,7 +141,7 @@ subtitle = "Customize your page with our various fragments"
[[rows]]
[[rows.values]]
button = "Table"
- color = "link p-0"
+ color = "link"
url = "fragments/table"
[[rows.values]]
| 2 |
diff --git a/src/og/layer/Material.js b/src/og/layer/Material.js @@ -11,7 +11,7 @@ const Material = function (segment, layer) {
this.isLoading = false;
this.texture = null;
this.pickingMask = null;
- this.image = null;
+ //this.image = null;
this.textureExists = false;
this.appliedNodeId = 0;
this.texOffset = [0.0, 0.0, 1.0, 1.0];
@@ -34,7 +34,7 @@ Material.prototype.abortLoading = function () {
Material.prototype.applyImage = function (img) {
if (this.segment.initialized) {
this._updateTexture = null;
- this.image = img;
+ //this.image = img;
this.texture = this.segment.handler.createTexture(img);
this.appliedNodeId = this.segment.node.nodeId;
this.isReady = true;
| 2 |
diff --git a/site/tutorials/tutorial-one-dotnet.md b/site/tutorials/tutorial-one-dotnet.md @@ -196,7 +196,7 @@ exist already. The message content is a byte array, so you can encode
whatever you like there.
When the code above finishes running, the channel and the connection
-will be disposed.
+will be disposed. That's it for our publisher.
[Here's the whole Send.cs
class](https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/dotnet/Send/Send.cs).
@@ -215,9 +215,9 @@ class](https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/dotnet/Send/Se
### Receiving
-That's it for our publisher. Our consumer is pushed messages from
-RabbitMQ, so unlike the publisher which publishes a single message, we'll
-keep it running to listen for messages and print them out.
+As for the consumer, it is pushed messages from
+RabbitMQ. So unlike the publisher which publishes a single message, we'll
+keep the consumer running continuously to listen for messages and print them out.
<div class="diagram">
<img src="/img/tutorials/receiving.png" alt="[|||] -> (C)" height="100" />
@@ -258,7 +258,7 @@ class Receive
}
</pre>
-Note that we declare the queue here, as well. Because we might start
+Note that we declare the queue here as well. Because we might start
the consumer before the publisher, we want to make sure the queue exists
before we try to consume messages from it.
| 5 |
diff --git a/packages/lib-classifier/src/components/Classifier/components/FieldGuide/components/FieldGuide/components/FieldGuideItem/FieldGuideItem.js b/packages/lib-classifier/src/components/Classifier/components/FieldGuide/components/FieldGuide/components/FieldGuideItem/FieldGuideItem.js @@ -17,12 +17,19 @@ counterpart.registerTranslations('en', en)
const StyledButton = styled(Button)`
padding: 0;
- &:hover > svg, &:focus > svg {
- fill: ${props => props.theme.global.colors['dark-5']};
- stroke: ${props => props.theme.global.colors['dark-5']};
+
+ &:hover > svg,
+ &:focus > svg {
+ fill: ${props => props.theme.dark
+ ? props.theme.global.colors['light-2']
+ : props.theme.global.colors['dark-5']
+ };
+ stroke: ${props => props.theme.dark
+ ? props.theme.global.colors['light-2']
+ : props.theme.global.colors['dark-5']
+ };
}
`
-
const markdownTitleComponent = {
h3: (nodeProps) => <SpacedHeading level='3' margin='none'>{nodeProps.children}</SpacedHeading>
}
| 12 |
diff --git a/source/Overture/views/View.js b/source/Overture/views/View.js @@ -236,6 +236,25 @@ var View = NS.Class({
View.parent.destroy.call( this );
},
+ // --- Screen reader accessibility ---
+
+ /**
+ Property: O.View#ariaAttributes
+ Type: Object|null
+
+ A set of aria attributes to apply to the layer node. The key is the name
+ of the attribute, excluding the 'aria-' prefix. The role attribute can
+ also be set here.
+
+ Example value:
+
+ {
+ role: 'menu',
+ modal: 'true'
+ }
+ */
+ ariaAttributes: null,
+
// --- Layer ---
/**
@@ -293,6 +312,7 @@ var View = NS.Class({
unselectable: this.get( 'allowTextSelection' ) ? undefined : 'on'
});
this.didCreateLayer( layer );
+ this.redrawAriaAttributes( layer );
return layer;
}.property(),
@@ -600,7 +620,7 @@ var View = NS.Class({
}
}
return this;
- }.observes( 'className', 'layerStyles' ),
+ }.observes( 'className', 'layerStyles', 'ariaAttributes' ),
/**
Method: O.View#redraw
@@ -686,6 +706,27 @@ var View = NS.Class({
this.didResize();
},
+ /**
+ Method: O.View#redrawLayerStyles
+
+ Sets the style attribute on the layer to match the layerStyles property
+ of the view. Called automatically when the layerStyles property changes.
+
+ Parameters:
+ layer - {Element} The view's layer.
+ */
+ redrawAriaAttributes: function ( layer ) {
+ var ariaAttributes = this.get( 'ariaAttributes' );
+ var attribute, value;
+ for ( attribute in ariaAttributes ) {
+ value = ariaAttributes[ attribute ];
+ if ( attribute !== 'role' ) {
+ attribute = 'aria-' + attribute;
+ }
+ layer.setAttribute( attribute, value );
+ }
+ },
+
// --- Dimensions ---
/**
| 0 |
diff --git a/css/style.css b/css/style.css --appblack: #232a36;
--appimage: white;
}
+
:root .light-mode {
--appbg: #232a36;
--apppink: #7868e6;
@@ -147,6 +148,7 @@ h6 {
.ulstyle li a:active {
color: white !important;
}
+
.stopwrap {
white-space: nowrap;
overflow-y: hidden;
@@ -156,6 +158,20 @@ h6 {
display: grid;
}
+.form__field {
+ font-family: mainfont;
+ font-size: 0.9375rem !important;
+ letter-spacing: 0.125rem;
+ width: 100%;
+ border: 0;
+ border-bottom: 0.0625rem solid var(--appimage);
+ outline: 0;
+ color: white;
+ padding: 0.4375rem 0;
+ background: transparent;
+ transition: border-color 0.2s;
+}
+
.carddis {
width: 100%;
background: white;
@@ -185,6 +201,7 @@ h6 {
background-color: rgba(255, 244, 253, 0.993);
font-weight: bolder;
}
+
.favouritecontainer {
position: absolute;
left: 80%;
@@ -202,10 +219,12 @@ h6 {
overflow-y: auto !important;
overflow-x: hidden !important;
}
+
#favourite:ul {
padding-right: 0;
list-style: none;
}
+
.favourites {
border-radius: 1.125rem;
border: 0.0625rem solid var(--apppink);
@@ -216,6 +235,7 @@ h6 {
color: white !important;
cursor: pointer;
}
+
.nofavourites {
border-radius: 1.125rem;
border: 0.0625rem solid var(--apppink);
@@ -247,6 +267,7 @@ h6 {
background-color: rgb(255, 136, 231);
cursor: pointer;
}
+
@media screen and (max-width: 37.5rem) {
.favouritecontainer {
left: 5%;
@@ -282,17 +303,18 @@ h6 {
color: white !important;
cursor: pointer;
}
-
}
::selection {
color: var(--appblack);
background-color: var(--apppink);
}
+
.mainheading {
color: white;
display: inline;
}
+
.searchbar-container {
position: relative;
display: flex;
@@ -301,6 +323,7 @@ h6 {
text-align: center;
margin-left: 40vh;
}
+
#search-txt {
border: none;
background: none !important;
@@ -313,6 +336,7 @@ h6 {
line-height: 2.5rem;
width: 0rem;
}
+
.searchbtn {
background: azure;
color: #f1faee;
@@ -325,6 +349,7 @@ h6 {
align-items: center;
outline: none !important;
}
+
#box {
display: flex;
flex-direction: row;
@@ -337,10 +362,12 @@ h6 {
padding: 0.625rem;
transform: translateX(50%,50%);
}
+
#box:hover > #search-txt {
width: 15rem;
padding: 0 0.375rem;
}
+
#box:hover > .searchbtn {
background: #0bd54f;
}
@@ -354,20 +381,6 @@ h6 {
color: black;
}
-.form__field {
- font-family: mainfont;
- font-size: 0.9375rem !important;
- letter-spacing: 0.125rem;
- width: 100%;
- border: 0;
- /* border-bottom: 0.0625rem solid var(--appimage); */
- outline: 0;
- color: white;
- padding: 0.4375rem 0;
- background: transparent;
- transition: border-color 0.2s;
-}
-
.bi {
background-image: linear-gradient(
to right top,
@@ -384,10 +397,12 @@ h6 {
height: 1.25rem;
filter: invert(100%);
}
+
.katex {
font-size: 1.5625rem !important;
display: flex;
}
+
#numberfact {
font-family: mainfont;
letter-spacing: 0.125rem;
| 1 |
diff --git a/components/Discussion/enhancers.js b/components/Discussion/enhancers.js import {gql, graphql} from 'react-apollo'
+import uuid from 'uuid/v4'
const meQuery = gql`
query discussionMe($discussionId: ID!) {
@@ -276,12 +277,16 @@ mutation discussionSubmitComment($discussionId: ID!, $parentId: ID, $content: St
`, {
props: ({ownProps: {discussionId, parentId: ownParentId, orderBy}, mutate}) => ({
submitComment: (parentId, content) => {
+ // Generate a new UUID for the comment. We do this client-side so that we can
+ // properly handle subscription notifications.
+ const id = uuid()
+
mutate({
- variables: {discussionId, parentId, content},
+ variables: {discussionId, parentId, id, content},
optimisticResponse: {
submitComment: {
__typename: 'Comment',
- id: '00000000-0000-0000-0000-000000000000',
+ id,
content,
score: 0,
userVote: null,
@@ -325,13 +330,24 @@ mutation discussionSubmitComment($discussionId: ID!, $parentId: ID, $content: St
const insertComment = (parent) => {
if (!parent.comments) { parent.comments = {} }
- // If the comment already exists in the list (becuase it was delivered
- // to the client through a subscription), remove it so that the new comment
- // remains at the head of the list.
- const currentNodes = (parent.comments.nodes || [])
- .filter(comment => comment.id !== submitComment.id)
+ const currentNodes = parent.comments.nodes || []
+ if (currentNodes.some(comment => comment.id === submitComment.id)) {
+ // The comment already exists in the list. This happens when it arrives
+ // through a subscription before we receive the mutation response.
+ parent.comments.nodes = [
+ comment,
+ ...currentNodes.filer(comment => comment.id !== submitComment.id)
+ ]
+
+ parent.comments.totalCount = parent.comments.totalCount - 1
+ if (parent.comments.totalCount === 0) {
+ parent.comments.pageInfo.hasNextPage = false
+ }
+ } else {
+ // The comment is not in the client yet.
parent.comments.nodes = [comment, ...currentNodes]
}
+ }
if (parentId) {
modifyComment(data.discussion, parentId, insertComment)
| 6 |
diff --git a/src/DOM.js b/src/DOM.js @@ -309,7 +309,7 @@ Node.DOCUMENT_TYPE_NODE = 10;
Node.DOCUMENT_FRAGMENT_NODE = 11;
module.exports.Node = Node;
-const _setAttributeRaw = (el, prop, value) => {
+const _setAttributeRaw = (el, prop, value, notify = true) => {
if (prop === 'length') {
el.attrs.length = value;
} else {
@@ -320,11 +320,11 @@ const _setAttributeRaw = (el, prop, value) => {
value,
};
el.attrs.push(attr);
- el._emit('attribute', prop, value, null);
+ notify && el._emit('attribute', prop, value, null);
} else {
const oldValue = attr.value;
attr.value = value;
- el._emit('attribute', prop, value, oldValue);
+ notify && el._emit('attribute', prop, value, oldValue);
}
}
};
@@ -2199,7 +2199,9 @@ class HTMLIFrameElement extends HTMLSrcableElement {
const parentWindow = this.ownerDocument.defaultView;
const options = parentWindow[symbols.optionsSymbol];
- url = _normalizeUrl(url, options.baseUrl);
+ url = _normalizeUrl(res.url, options.baseUrl);
+ // passively update .src with the final url (which can differ in case of redirects)
+ _setAttributeRaw(this, 'src', url, false);
const parent = {};
const top = parentWindow === parentWindow.top ? parent : {};
this.contentWindow = _makeWindow({
| 4 |
diff --git a/js/web-server.js b/js/web-server.js @@ -16,15 +16,21 @@ const helper = {
console.log(
moment().format('YYMMDD.HHmmss'),
[...arguments]
- .map(v => util.inspect(v, {breakLength:Infinity, colors:clearJS}))
+ .map(v => util.inspect(v, {
+ maxArrayLength: null,
+ breakLength: Infinity,
+ colors: debug,
+ compact: true,
+ sorted: true,
+ depth: null
+ }))
.join(' ')
);
}
};
function log(o) {
- if (!o.time) o.time = time();
- helper.log(obj2string(o));
+ helper.log(o);
}
function promise(resolve, reject) {
@@ -525,7 +531,7 @@ function minify(path) {
* @param {Function} next
*/
function handleJS(req, res, next) {
- if (!(req.gs.local || clearJS || clearOK.indexOf(req.gs.path) >= 0)) {
+ if (!(req.gs.local || debug || clearOK.indexOf(req.gs.path) >= 0)) {
return reply404(req, res);
}
@@ -546,7 +552,7 @@ function handleJS(req, res, next) {
var mtime = f.mtime.getTime();
if (!cached || cached.mtime != mtime) {
- if (clearJS) {
+ if (debug) {
fs.readFile(fpath, null, function(err, code) {
if (err) {
return reply404(req,res);
@@ -704,15 +710,15 @@ function rewriteHTML(req, res, next) {
* Setup / Global
********************************************* */
-var clearJS = false,
- noLocal = false
+var debug = false,
+ nolocal = false
port = 8080,
args = process.argv.slice(2);
args.forEach((arg, index) => {
switch (arg) {
- case 'nolocal': noLocal = true; break;
- case 'debug': clearJS = true; break;
+ case 'nolocal': nolocal = true; break;
+ case 'debug': debug = true; break;
case 'port': port = process.argv[index+3]; break;
}
});
@@ -734,7 +740,7 @@ var ver = require('../js/license.js'),
serveStatic = require('serve-static'),
compression = require('compression')(),
querystring = require('querystring'),
- ipLocal = noLocal ? [] : ["127.0.0.1", "::1", "::ffff:127.0.0.1"],
+ ipLocal = nolocal ? [] : ["127.0.0.1", "::1", "::ffff:127.0.0.1"],
currentDir = process.cwd(),
ipSaveDelay = 2000,
startTime = time(),
@@ -841,15 +847,6 @@ var ver = require('../js/license.js'),
inject = {},
injectKeys = ["kiri", "meta"];
-// level.createReadStream().on('data', o => {
-// let k = o.key.toString();
-// let v = o.value.toString();
-// if (v.length > 80) {
-// v = `[${v.length}] ${v.substring(0,70)}...`;
-// }
-// helper.log(`${k} = ${v}`);
-// });
-
/* *********************************************
* Promises-based leveldb interface
********************************************* */
@@ -1017,7 +1014,7 @@ function initModule(file, dir) {
full: arg => { modPaths.push(fullpath(arg)) },
static: arg => { modPaths.push(serveStatic(arg)) },
code: (endpoint, path) => {
- if (clearJS) {
+ if (debug) {
code[endpoint] = fs.readFileSync(path);
} else {
code[endpoint] = minify(path);
@@ -1095,5 +1092,4 @@ handler.use(fullpath({
.listen(port);
helper.log("------------------------------------------");
-helper.log({port, debug: clearJS, nolocal: noLocal});
-helper.log({version: ver.VERSION});
+helper.log({port, debug, nolocal, version: ver.VERSION});
| 7 |
diff --git a/source/_ext/ghreference.py b/source/_ext/ghreference.py @@ -36,20 +36,24 @@ class GitHubReference(Directive):
if '.md' in line.path:
uri = 'https://github.com/' + self.arguments[0] + '/blob/gh-pages/' + line.path
version = line.path.split('.md')[0]
+ else:
+ uri = self.docs_url + self.arguments[0].split('/')[1] + '/' + line.path
+ version = line.path.split('/')[-1]
+
if count == 1:
version = version + ' (next)'
elif count == 2:
version = version + ' (latest)'
- else:
- uri = self.docs_url + self.arguments[0].split('/')[1] + '/' + line.path
- version = line.path.split('/')[-1]
+
if not any(excluded_file_name in version for excluded_file_name in self.excluded_file_names):
item = nodes.list_item()
item_p = nodes.paragraph()
item_p += nodes.reference(text=version, refuri=uri)
item += item_p
node_list += item
+
count += 1
+
return [node_list]
| 1 |
diff --git a/bot/src/start.js b/bot/src/start.js @@ -103,7 +103,12 @@ function createBot() {
const monochrome = new Monochrome(options);
+ let handledReady = false;
monochrome.getErisBot().on('ready', () => {
+ if (handledReady) {
+ return;
+ }
+
monochrome.reactionButtonManager = new ReactionButtons
.ReactionButtonManager(monochrome.getErisBot().user.id);
@@ -120,6 +125,8 @@ function createBot() {
process.on('uncaughtException', (err) => {
monochrome.getLogger().fatal({ event: 'UNCAUGHT_EXCEPTION', err });
});
+
+ handledReady = true;
});
return monochrome;
| 9 |
diff --git a/src/encoded/static/components/app.js b/src/encoded/static/components/app.js @@ -40,8 +40,8 @@ const portal = {
title: 'Data',
children: [
{ id: 'assaymatrix', title: 'Experiment matrix', url: '/matrix/?type=Experiment&status=released' },
- { id: 'assaysearch', title: 'Search', url: '/search/?type=Experiment&status=released' },
- { id: 'assaysummary', title: 'Summary', url: '/summary/?type=Experiment&status=released' },
+ { id: 'assaysearch', title: 'Experiment search', url: '/search/?type=Experiment&status=released' },
+ { id: 'functional-char-assays', title: 'Functional characterization search', url: '/search/?type=FunctionalCharacterizationExperiment' },
{ id: 'sep-mm-1' },
{ id: 'cloud', title: 'Cloud Resources' },
{ id: 'aws-link', title: 'AWS Open Data', url: 'https://registry.opendata.aws/encode-project/', tag: 'cloud' },
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.