code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -10,7 +10,7 @@ work is not in vain.
Most of the time, if webpack is not working correctly for you, it is a simple configuration issue.
If you are still having difficulty after looking over your configuration carefully, please post
-a question to [StackOverflow with the webpack tag](http://stackoverflow.com/tags/webpack). Questions
+a question to [StackOverflow with the webpack tag](https://stackoverflow.com/tags/webpack). Questions
that include your webpack.config.js, relevant files, and the full error message are more likely to receive responses.
**If you have discovered a bug or have a feature suggestion, please [create an issue on GitHub](https://github.com/webpack/webpack/issues/new).**
@@ -43,7 +43,7 @@ Something that will increase the chance that your pull request is accepted:
* [Write tests](./test/README.md)
* Follow the existing coding style
-* Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
+* Write a [good commit message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
## Documentation
| 14 |
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml @@ -114,6 +114,7 @@ jobs:
echo "APPCENTER_NAME=GoodDollar/GoodDollar-Android-development" >> $GITHUB_ENV
echo "APPCENTER_TOKEN=${{ secrets.APPCENTER_ANDROID_DEV }}" >> $GITHUB_ENV
echo "APPCENTER_CODEPUSH_TOKEN=${{ secrets.APPCENTER_CODEPUSH_DEV }}" >> $GITHUB_ENV
+ echo "ANDROID_BUNDLE_PATH=./android/app/build/outputs/bundle/release/app-release.aab" >> $GITHUB_ENV
- name: Pre-checks - Env is QA
if: ${{ env.TARGET_BRANCH == 'staging' }}
run: |
| 0 |
diff --git a/rig.js b/rig.js @@ -6,7 +6,7 @@ import {makePromise, /*WaitQueue, */downloadFile} from './util.js';
import {renderer, scene, appManager} from './app-object.js';
import runtime from './runtime.js';
import Avatar from './avatars/avatars.js';
-import {FBXLoader} from './FBXLoader.js';
+// import {FBXLoader} from './FBXLoader.js';
import physicsMananager from './physics-manager.js';
import animationsJson from './animations/animations.js';
| 2 |
diff --git a/source/views/menu/MenuOptionView.js b/source/views/menu/MenuOptionView.js @@ -46,7 +46,10 @@ const MenuOptionView = Class({
}
},
- mousemove: function () {
+ mousemove: function (event) {
+ if (event.type === 'pointermove' && event.pointerType !== 'mouse') {
+ return;
+ }
if (!this.get('isFocused') && !this._focusTimeout) {
const popOverView = this.getParent(PopOverView);
if (popOverView && popOverView.hasSubView()) {
| 8 |
diff --git a/hp-manager.js b/hp-manager.js @@ -135,6 +135,12 @@ const makeHitTracker = ({
scene.add(damageMeshApp);
}
+ {
+ const soundFiles = sounds.getSoundFiles();
+ const audioSpec = soundFiles.enemyCut[Math.floor(Math.random() * soundFiles.enemyCut.length)];
+ sounds.playSound(audioSpec);
+ }
+
hitTracker.dispatchEvent({
type: 'hit',
collisionId,
| 0 |
diff --git a/src/geo/polygon.js b/src/geo/polygon.js * @returns {Point} center of a polygon assuming it's a circle
*/
PRO.circleCenter = function() {
- let points = this.points,
- length = points.length,
- incr = Math.floor(length / 3),
- A = points[0],
- B = points[incr],
- C = points[incr * 2],
- yDelta_a = B.y - A.y,
- xDelta_a = B.x - A.x,
- yDelta_b = C.y - B.y,
- xDelta_b = C.x - B.x,
- aSlope = yDelta_a / xDelta_a,
- bSlope = yDelta_b / xDelta_b,
- center = newPoint(0, 0, 0, null);
-
- center.x = (aSlope * bSlope * (A.y - C.y) + bSlope * (A.x + B.x) - aSlope * (B.x+C.x) )/(2* (bSlope-aSlope) );
- center.y = -1 * (center.x - (A.x+B.x) / 2) / aSlope + (A.y + B.y) / 2;
- center.z = A.z;
-
- return center;
+ let x=0, y=0, l=this.points.length;
+ for (let point of this.points) {
+ x += point.x;
+ y += point.y;
+ }
+ x /= l;
+ y /= l;
+ return newPoint(x, y, this.points[0].z, null);
+ // let points = this.points,
+ // length = points.length,
+ // incr = Math.floor(length / 3),
+ // A = points[0],
+ // B = points[incr],
+ // C = points[incr * 2],
+ // yDelta_a = B.y - A.y,
+ // xDelta_a = B.x - A.x,
+ // yDelta_b = C.y - B.y,
+ // xDelta_b = C.x - B.x,
+ // aSlope = yDelta_a / xDelta_a,
+ // bSlope = yDelta_b / xDelta_b,
+ // center = newPoint(0, 0, 0, null);
+ //
+ // center.x = (aSlope * bSlope * (A.y - C.y) + bSlope * (A.x + B.x) - aSlope * (B.x+C.x) )/(2* (bSlope-aSlope) );
+ // center.y = -1 * (center.x - (A.x+B.x) / 2) / aSlope + (A.y + B.y) / 2;
+ // center.z = A.z;
+ // return center;
};
/**
| 14 |
diff --git a/test/evaluation/falseNegative.js b/test/evaluation/falseNegative.js @@ -51,11 +51,11 @@ async function main() {
}
`({
text,
- }),
- ).then((data) => {
+ }).then((data) => {
progress.tick();
return data;
- }));
+ }),
+ ));
let invalidCount = 0;
allResults.forEach(({ data }, i) => {
| 1 |
diff --git a/.travis.yml b/.travis.yml @@ -24,7 +24,7 @@ env:
- TEST_SUITE=desktop
script:
- - xvfb-run -s '-screen 0 1024x768x24' polymer test --env saucelabs:$TEST_SUITE --expanded --verbose
+ - xvfb-run -s '-screen 0 1024x768x24' wct --env saucelabs:$TEST_SUITE --expanded --verbose
#- if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" && "$TRAVIS_BRANCH" != quick/* ]]; then
# npm i gemini@^4.0.0 gemini-sauce gemini-polyserve;
# gemini test test/visual;
| 14 |
diff --git a/tools/deployer/DeployParsing/DeployParser.py b/tools/deployer/DeployParsing/DeployParser.py @@ -9,13 +9,13 @@ CHAIN_ID = {
'kovan': '42',
}
CONTRACT_DIR = {
- 'Types': '',
- 'DelegateFactory': '',
- 'Indexer': '',
- 'Swap': '',
+ 'Types': '../../../source/types/deploys.json',
+ 'DelegateFactory': '../../../source/delegate/deploys.json',
+ 'Indexer': '../../../source/indexer/deploys.json',
+ 'Swap': '../../../source/swap/deploys.json',
'TransferHandlerRegistry': '',
- 'Validator': '',
- 'Wrapper': ''
+ 'Validator': '../../../source/validator/deploys.json',
+ 'Wrapper': '../../../source/wrapper/deploys.json'
}
@@ -41,5 +41,10 @@ def parse(file_input):
print(contract_name + ": " + contract_address)
+ with open(CONTRACT_DIR['Wrapper']) as data:
+ for line in data:
+ print(line)
+
+
if __name__ == "__main__":
parse("input.txt")
| 3 |
diff --git a/assets/js/modules/analytics-4/datastore/report.js b/assets/js/modules/analytics-4/datastore/report.js @@ -139,10 +139,7 @@ const baseSelectors = {
* @param {Object} options Options for generating the report.
* @param {string} options.startDate Required, unless dateRange is provided. Start date to query report data for as YYYY-mm-dd.
* @param {string} options.endDate Required, unless dateRange is provided. End date to query report data for as YYYY-mm-dd.
- * @param {string} options.dateRange Required, alternative to startDate and endDate. A date range string such as 'last-28-days'.
* @param {Array.<string>} options.metrics Required. List of metrics to query.
- * @param {boolean} [options.compareDateRanges] Optional. Only relevant with dateRange. Default false.
- * @param {boolean} [options.multiDateRange] Optional. Only relevant with dateRange. Default false.
* @param {string} [options.compareStartDate] Optional. Start date to compare report data for as YYYY-mm-dd.
* @param {string} [options.compareEndDate] Optional. End date to compare report data for as YYYY-mm-dd.
* @param {Array.<string>} [options.dimensions] Optional. List of dimensions to group results by. Default an empty array.
| 2 |
diff --git a/webpack.config.js b/webpack.config.js @@ -47,7 +47,10 @@ module.exports = {
root: 'Hammer',
commonjs: 'hammerjs',
commonjs2: 'hammerjs',
- amd: 'hammerjs'
+ amd: 'hammerjs',
+ // Since GeoJS's libraryTarget is "umd", defining this (undocumented) external library type
+ // will allow Webpack to create a better error message if a "hammerjs" import fails
+ umd: 'hammerjs'
}
},
plugins: [
| 7 |
diff --git a/theme/src/components/homeSlider.js b/theme/src/components/homeSlider.js @@ -23,7 +23,7 @@ const renderItem = item => (
const HomeSlider = ({ images }) => {
if (images && images.length > 0) {
const items = images.map(item => ({
- original: item.url,
+ original: item.image,
title: item.title,
description: item.description,
path: item.path || '',
| 1 |
diff --git a/src/components/signup/SmsForm.js b/src/components/signup/SmsForm.js @@ -81,7 +81,11 @@ class SmsForm extends React.Component<Props, State> {
await this.verifyOTP(otpValue)
this.handleSubmit()
} catch (e) {
+ if (e.ok === 0) {
+ log.warn('Verify otp failed', e.message, e)
+ } else {
log.error('Verify otp failed', e.message, e)
+ }
this.setState({
errorMessage: e.message || e,
| 0 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -85,6 +85,8 @@ Refer to the [reportTestDone method description](https://devexpress.github.io/te
### Bug Fixes
* HTML5 drag events are no longer simulated if `event.preventDefault` is called for the `mousedown` event ([#2529](https://github.com/DevExpress/testcafe/issues/2529))
+* File upload no longer causes an exception when there are several file inputs on the page ([#2642](https://github.com/DevExpress/testcafe/issues/2642))
+* File upload now works with inputs that have the `required` attribute ([#2509](https://github.com/DevExpress/testcafe/issues/2509))
* The `load` event listener is no longer triggered when added to an image ([testcafe-hammerhead/#1688](https://github.com/DevExpress/testcafe-hammerhead/issues/1688))
## v0.20.5 (2018-7-18)
| 0 |
diff --git a/assets/js/components/legacy-notifications/notification-counter.js b/assets/js/components/legacy-notifications/notification-counter.js @@ -26,7 +26,6 @@ import classnames from 'classnames';
*/
import { Component, createPortal } from '@wordpress/element';
import { _n, sprintf } from '@wordpress/i18n';
-import { addAction, removeAction } from '@wordpress/hooks';
/**
* Internal dependencies
@@ -47,21 +46,9 @@ class NotificationCounter extends Component {
}
componentDidMount() {
- // Wait until data is fully loaded before requesting notifications data.
- addAction(
- 'googlesitekit.dataLoaded',
- 'googlesitekit.dataLoadedGetTotalNotifications',
- () => {
- // Only handle the first completed data load.
- removeAction(
- 'googlesitekit.dataLoaded',
- 'googlesitekit.dataLoadedGetTotalNotifications'
- );
getTotalNotifications().then( ( count ) => {
this.setState( { count } );
} );
- }
- );
document.addEventListener(
'notificationDismissed',
| 2 |
diff --git a/source/gltf/accessor.js b/source/gltf/accessor.js @@ -127,19 +127,10 @@ class gltfAccessor extends GltfObject
return this.filteredView;
}
- if (this.bufferView !== undefined)
- {
- const bufferView = gltf.bufferViews[this.bufferView];
- const buffer = gltf.buffers[bufferView.buffer];
- const byteOffset = this.byteOffset + bufferView.byteOffset;
-
const componentSize = this.getComponentSize(this.componentType);
const componentCount = this.getComponentCount(this.type);
const arrayLength = this.count * componentCount;
- let stride = bufferView.byteStride !== 0 ? bufferView.byteStride : componentCount * componentSize;
- let dv = new DataView(buffer.buffer, byteOffset, this.count * stride);
-
let func = 'getFloat32';
switch (this.componentType)
{
@@ -167,20 +158,24 @@ class gltfAccessor extends GltfObject
this.filteredView = new Float32Array(arrayLength);
func = 'getFloat32';
break;
+ default:
+ return;
}
+ if (this.bufferView !== undefined) {
+ const bufferView = gltf.bufferViews[this.bufferView];
+ const buffer = gltf.buffers[bufferView.buffer];
+ const byteOffset = this.byteOffset + bufferView.byteOffset;
+ const stride = bufferView.byteStride !== 0 ? bufferView.byteStride : componentCount * componentSize;
+ const dataView = new DataView(buffer.buffer, byteOffset, this.count * stride);
for (let i = 0; i < arrayLength; ++i)
{
- let offset = Math.floor(i/componentCount) * stride + (i % componentCount) * componentSize;
- this.filteredView[i] = dv[func](offset, true);
+ const offset = Math.floor(i / componentCount) * stride + (i % componentCount) * componentSize;
+ this.filteredView[i] = dataView[func](offset, true);
}
}
- if (this.filteredView === undefined)
- {
- console.warn("Failed to convert buffer view to filtered view!: " + this.bufferView)
- }
- else if (this.sparse !== undefined)
+ if (this.sparse !== undefined)
{
this.applySparse(gltf, this.filteredView);
}
| 9 |
diff --git a/create-snowpack-app/cli/README.md b/create-snowpack-app/cli/README.md @@ -33,4 +33,5 @@ npx create-snowpack-app new-dir --template @snowpack/app-template-NAME [--use-ya
- [snowpack-react-ssr](https://github.com/matthoffner/snowpack-react-ssr) (React + Server Side Rendering)
- [snowpack-app-template-preact-hmr-tailwind](https://github.com/Mozart409/snowpack-app-template-preact-hmr-tailwind) (Snowpack + Preact + HMR + Tailwindcss)
- [snowpack-mdx-chakra](https://github.com/molebox/snowpack-mdx)(An opinionated template setup with MDX, Chakra-ui for styling, theme and components, and React Router v6 for routing.)
+- [snowpack-svelte-ts-tw](https://github.com/GarrettCannon/snowpack-svelte-ts-tw) (Snowpack + Svelte + Typescript + TailwindCSS)
- PRs that add a link to this list are welcome!
| 0 |
diff --git a/src/encoded/tests/datafixtures.py b/src/encoded/tests/datafixtures.py @@ -228,6 +228,7 @@ def experiment(testapp, lab, award):
}
return testapp.post_json('/experiment', item).json['@graph'][0]
+
@pytest.fixture
def base_experiment(testapp, lab, award):
item = {
@@ -238,6 +239,7 @@ def base_experiment(testapp, lab, award):
}
return testapp.post_json('/experiment', item, status=201).json['@graph'][0]
+
@pytest.fixture
def replicate(testapp, experiment, library):
item = {
| 1 |
diff --git a/lib/assets/javascripts/cartodb/common/dialogs/create/listing/imports_view.js b/lib/assets/javascripts/cartodb/common/dialogs/create/listing/imports_view.js @@ -197,7 +197,7 @@ module.exports = cdb.core.View.extend({
return true;
},
- _checkBigQueryImport: function () {
+ _checkBigQueryImport: function (imp, v) {
if (!cdb.config.get('oauth_bigquery')) {
v._setFailedTab('bigquery', 'key');
return false;
| 1 |
diff --git a/src/library/managers/PlayerManager.js b/src/library/managers/PlayerManager.js @@ -25,6 +25,7 @@ Does not include Ships and Gears which are managed by other Managers
statistics: {},
maxResource: 350000,
maxConsumable: 3000,
+ maxUseitem: 9999,
maxCoin: 350000,
init :function(){
@@ -473,9 +474,11 @@ Does not include Ships and Gears which are managed by other Managers
loadFleets :function(){
if(typeof localStorage.fleets != "undefined"){
var oldFleets = JSON.parse(localStorage.fleets);
- this.fleets = this.fleets.map(function(x,i){
- return (new KC3Fleet()).defineFormatted(oldFleets[i]);
- });
+ if(Array.isArray(oldFleets)){
+ this.fleets = this.fleets.map(fleet => (
+ (new KC3Fleet()).defineFormatted(fleet)
+ ));
+ }
}
return this;
},
@@ -563,12 +566,17 @@ Does not include Ships and Gears which are managed by other Managers
loadBases :function(){
if(typeof localStorage.bases != "undefined"){
var oldBases = JSON.parse(localStorage.bases);
- this.bases = oldBases.map(function(baseData){
- return (new KC3LandBase()).defineFormatted(baseData);
- });
+ if(Array.isArray(oldBases)){
+ this.bases = oldBases.map(baseData => (
+ (new KC3LandBase()).defineFormatted(baseData)
+ ));
+ }
}
if(typeof localStorage.baseConvertingSlots != "undefined"){
this.baseConvertingSlots = localStorage.getObject("baseConvertingSlots");
+ if(!Array.isArray(this.baseConvertingSlots)){
+ this.baseConvertingSlots = [];
+ }
}
return this;
},
| 8 |
diff --git a/src/content/en/ilt/pwa/lab-scripting-the-service-worker.md b/src/content/en/ilt/pwa/lab-scripting-the-service-worker.md @@ -321,7 +321,7 @@ navigator.serviceWorker.register('/service-worker.js', {
In the above example the scope of the service worker is set to `/kitten/`. The service worker intercepts requests from pages in `/kitten/` and `/kitten/lower/` but not from pages like `/kitten` or `/`.
-Note: You cannot set an arbitrary scope that is above the service worker's actual location. However, if your server worker is active on a client being served with the `Service-Worker-Allowed` header, you can specify a max scope for that service worker above the service worker's location.
+Note: You cannot set an arbitrary scope that is above the service worker's actual location. However, if your service worker is active on a client being served with the `Service-Worker-Allowed` header, you can specify a max scope for that service worker above the service worker's location.
#### For more information
| 1 |
diff --git a/audio-manager.js b/audio-manager.js @@ -3,6 +3,9 @@ import WSRTC from 'wsrtc/wsrtc.js';
const loadPromise = (async () => {
const audioContext = WSRTC.getAudioContext();
+ audioContext.gain = audioContext.createGain();
+ audioContext.gain.connect(audioContext.destination);
+
Avatar.setAudioContext(audioContext);
await audioContext.audioWorklet.addModule('avatars/microphone-worklet.js');
})();
| 0 |
diff --git a/app/src/scripts/dataset/tools/index.js b/app/src/scripts/dataset/tools/index.js @@ -105,7 +105,12 @@ class Tools extends Reflux.Component {
{
tooltip: 'Unpublish Dataset',
icon: 'fa-globe icon-ban',
- action: actions.publish.bind(this, dataset._id, false),
+ action: actions.publish.bind(
+ this,
+ dataset._id,
+ false,
+ this.props.history,
+ ),
display: isPublic && isSuperuser,
warn: true,
validations: [
| 1 |
diff --git a/sirepo/pkcli/db.py b/sirepo/pkcli/db.py @@ -12,8 +12,25 @@ def upgrade():
from pykern import pkio
from sirepo import simulation_db
from sirepo import server
+ import re
+
+ def _inc(m):
+ return m.group(1) + str(int(m.group(2)) + 1)
server.init()
- to_rename = []
- for d in pkio.sorted_glob(simulation_db.user_dir_name().join('*/fete')):
- d.rename(d.new(basename='warpvnd'))
+ for d in pkio.sorted_glob(simulation_db.user_dir_name().join('*/warppba')):
+ for fn in pkio.sorted_glob(d.join('*/sirepo-data.json')):
+ with open(str(fn)) as f:
+ t = f.read()
+ for old, new in (
+ ('"WARP example laser simulation"', '"Laser-Plasma Wakefield"'),
+ ('"Laser Pulse"', '"Laser-Plasma Wakefield"'),
+ ('"WARP example electron beam simulation"', '"Electron Beam"'),
+ ):
+ if not old in t:
+ continue
+ t = t.replace(old, new)
+ t = re.sub(r'(simulationSerial":\s+)(\d+)', _inc, t)
+ break
+ with open(str(fn), 'w') as f:
+ f.write(t)
| 10 |
diff --git a/vite.config.js b/vite.config.js import { defineConfig } from 'vite'
import reactRefresh from '@vitejs/plugin-react-refresh'
-import webaversePlugin from './rollup-webaverse-plugin.js'
+import rollupPlugin from 'metaversefile/plugins/rollup.js'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
- webaversePlugin(),
+ rollupPlugin(),
reactRefresh(),
],
server: {
| 4 |
diff --git a/Projects/Network/SA/Modules/AppBootstrapingProcess.js b/Projects/Network/SA/Modules/AppBootstrapingProcess.js @@ -315,7 +315,7 @@ exports.newNetworkModulesAppBootstrapingProcess = function newNetworkModulesAppB
store that node as our P2P Network Client Identity.
*/
if (SA.secrets.signingAccountSecrets.map.get(thisObject.userAppCodeName) === undefined) {
- throw ('Bad Configuration. Could not find any signing account node based on the configured thisObject.userAppCodeName = ' + thisObject.userAppCodeName)
+ throw ('Bad configuration! Could not find a signing account node or the corresponding signature file in the /My-Secrets folder based on the configured thisObject.userAppCodeName = ' + thisObject.userAppCodeName)
}
if (
networkClient.id === SA.secrets.signingAccountSecrets.map.get(thisObject.userAppCodeName).nodeId
| 7 |
diff --git a/packages/@uppy/react/src/Dashboard.d.ts b/packages/@uppy/react/src/Dashboard.d.ts @@ -15,6 +15,7 @@ export interface DashboardProps {
height?: number;
showProgressDetails?: boolean;
showLinkToFileUploadResult?: boolean;
+ showSelectedFiles?: boolean;
hideUploadButton?: boolean;
hideProgressAfterFinish?: boolean;
note?: string;
| 0 |
diff --git a/apps/img/views.py b/apps/img/views.py @@ -71,7 +71,7 @@ def serve_doc(req, id_source, annotated=False):
# filename is part of the response headers and that HTTP response headers can only contain ascii characters.
filename = ""
try:
- filename = M.Source.objects.get(pk=id_source).title.partition(".pdf")[0].encode("ascii").replace(" ", "_")
+ filename = M.Source.objects.get(pk=id_source).title.partition(".pdf")[0].replace(" ", "_").encode('ascii').decode('ascii')
except UnicodeEncodeError:
filename = id_source
filename = "%s%s%s" % (filename, qual, ".pdf")
| 1 |
diff --git a/modules/xerte/parent_templates/Nottingham/models_html5/crossword.html b/modules/xerte/parent_templates/Nottingham/models_html5/crossword.html }
});
- $('td').click(function() {
-
+ $('#crossword-table td').click(function() {
active = $(this).closest('table tbody').find('td').index(this);
if($('#crossword-table tbody tr td').eq(active).find('input')[0] !== undefined) {
rePosition();
num1+= startPositionArray[id][1]
relocateFocus(num1)
var counter = startPositionArray[id][1]
+
if (dir === "across") {
for (var j = 0; j < columns; j++) {
var temp = startPositionArray[id][0] * columns
- temp+= startPositionArray[id][1]
+ temp+= startPositionArray[id][1];
if ($('#crossword-table tbody tr td').eq(temp + j).find('input')[0] !== undefined && counter !== columns) {
$('#crossword-table tbody tr td').eq(temp + j).addClass('highlighted')
counter++
for (var j = 0; j < columns; j++) {
var temp = startPositionArray[id][0] * columns
temp+= startPositionArray[id][1]
-
- var add = j * columns
+ var add = j * columns;
if ($('#crossword-table tbody tr td').eq(temp + add).find('input')[0] !== undefined) {
$('#crossword-table tbody tr td').eq(temp + add).addClass('highlighted')
nextPosition = dir
}
hintClick = function (hint){
- var hintIndex = hint.id.substring(4);
addHighlightHint(hint.id.substring(4), hint.attributes.name.value)
}
| 1 |
diff --git a/client/src/components/views/CommInternal/core.js b/client/src/components/views/CommInternal/core.js @@ -115,6 +115,9 @@ class InternalCommCore extends Component {
>
{internalComm.outgoing}
{internalComm.state === "connected" ? ` - Connected` : ""}
+ {internalComm.incoming &&
+ !internalComm.outgoing &&
+ `Calling - ${internalComm.incoming}`}
</p>
</Col>
<Col sm={4}>
| 1 |
diff --git a/packages/siimple-css/scss/elements/rule.scss b/packages/siimple-css/scss/elements/rule.scss background-color: siimple-default-color("light");
padding: 0px;
margin-top: 15px;
- margin-bottm: 15px;
+ margin-bottom: 15px;
border: 0px;
//Rule first and last child
&:first-child {
| 1 |
diff --git a/src/traces/surface/convert.js b/src/traces/surface/convert.js @@ -241,7 +241,7 @@ proto.calcXnums = function(xlen) {
if(nums[i - 1] === 0) {
nums[i - 1] = 1;
} else {
- nums[i - 1] = Math.round(totalDist);
+ nums[i - 1] = Math.round(totalDist / nums[i - 1]);
}
}
@@ -273,7 +273,7 @@ proto.calcYnums = function(ylen) {
if(nums[i - 1] === 0) {
nums[i - 1] = 1;
} else {
- nums[i - 1] = Math.round(totalDist);
+ nums[i - 1] = Math.round(totalDist / nums[i - 1]);
}
}
| 1 |
diff --git a/app/templates/my-sessions/view.hbs b/app/templates/my-sessions/view.hbs {{/if}}
{{/link-to}}
{{#each model.speakers as |speaker|}}
+ {{#if (eq speaker.email authManager.currentUser.email)}}
{{#link-to 'events.view.speakers.edit' model.event.id speaker.id}}
<button class="ui blue button {{if device.isMobile 'fluid' 'right floated'}}">{{t 'Edit Speaker- '}}{{speaker.name}}</button>
{{#if device.isMobile}}
<div class="ui hidden fitted divider"></div>
{{/if}}
{{/link-to}}
+ {{/if}}
{{/each}}
{{#if isUpcoming}}
<button class="ui red button {{if device.isMobile 'fluid' 'right floated'}}" {{action 'openProposalDeleteModal'}}>{{t 'Withdraw Proposal'}}</button>
<div class="field">
<div class="ui divider"></div>
<h1 class="ui header"> {{model.title}} </h1>
+ <h4 class="ui header">
{{#each model.speakers as |speaker|}}
- <h4 class="ui header"> {{speaker.name}} </h4>
+ {{speaker.name}}
{{/each}}
+ </h4>
<h2 class="ui sub header"> <div class="ui gray-text">{{t 'From '}}{{moment-format model.startAt 'ddd, MMM DD h:mm A'}}{{t ' to '}}{{moment-format model.endsAt 'ddd, MMM DD h:mm A'}}</div> </h2>
</div>
<div class="ui divider"></div>
| 7 |
diff --git a/aleph/index/collections.py b/aleph/index/collections.py @@ -173,7 +173,7 @@ def get_collection_things(collection_id):
things = {}
for schema, count in schemata.get('values', {}).items():
schema = model.get(schema)
- if schema.is_a(Entity.THING):
+ if schema is not None and schema.is_a(Entity.THING):
things[schema.name] = count
return things
| 9 |
diff --git a/scripts/docs.js b/scripts/docs.js @@ -120,8 +120,8 @@ async function generateToc(docs) {
async function insertSourceLink(mdFile, srcFile) {
const link = BASE_SRC_URL + srcFile
- console.log('insert line', { link, mdFile })
- // return await execPromise(`echo "## Source\n[${link}](${link})\n" >> ${mdFile}`)
+ // console.log('insert line', { link, mdFile })
+ return await execPromise(`echo "## Source\n[${link}](${link})\n" >> ${mdFile}`)
}
async function generateDocs(baseFolder, deep, perFile = true) {
| 0 |
diff --git a/docs/middlewares.md b/docs/middlewares.md ## Available middlewares
- [cors](#cors)
+ - [doNotWaitForEmptyEventLoop](#donotwaitforemptyeventloop)
- [httpErrorHandler](#httperrorhandler)
- [jsonBodyParser](#jsonbodyparser)
- [s3KeyNormalizer](#s3keynormalizer)
- [validator](#validator)
- [urlencodeBodyParser](#urlencodebodyparser)
- - [doNotWaitForEmptyEventLoop](#donotwaitforemptyeventloop)
## [cors](/src/middlewares/cors.js)
| 5 |
diff --git a/docs/pages/plugins-manifest.md b/docs/pages/plugins-manifest.md @@ -113,7 +113,14 @@ function selectAll() {
##### Shortcut Values
-When setting the shortcut for a command, you can use any combination of the following keys, plus any regular character. Keep in mind that some characters may require users to press modifier keys on some international keyboard layouts. For example, to get `/` on a US keyboard you just need to press one key, but on a Spanish keyboard you need to press `shift 7` to get the same character. So a command with a `ctrl shift /` shortcut can't be triggered on a Spanish keyboard, because it gets interpreted as `ctrl /`.
+Command shortcuts can be set using any combination of the following keys, plus any regular character.
+
+Shortcuts need to use at least one modifier key (Command, Option, Control or Shift), you cannot define single key shortcuts in `manifest.json`.
+
+If your command tries to use any of the predefined Sketch shortcuts (say, `cmd s`), the shortcut will be ignored and pressing those keys will perform the default action in Sketch.
+
+Make sure to test your shortcuts with different international keyboard layouts. Certain characters can require users to press modifier keys. For example a shortcut like `shift /` would not work with a Spanish keyboard layout. Whereas a forward slash `/` has a dedicated key on a US keyboard, it requires pressing `shift 7` on a Spanish keyboard.
+
| Key | Value |
|---------------|-------------------------------------|
| 7 |
diff --git a/test/prop/2.arbitrary.js b/test/prop/2.arbitrary.js @@ -39,8 +39,8 @@ property('swap(m) = bichain(resolve)(reject)(m)', anyFuture, function (m){
return eq(swap(m))(bichain(resolve)(reject)(m));
});
-property('reject(x) = swap(resolve(x))', any, function (x){
- return eq(reject(x))(swap(resolve(x)));
+property('swap(resolve(x)) = reject(x)', any, function (x){
+ return eq(swap(resolve(x)))(reject(x));
});
property('swap(reject(x)) = resolve(x)', any, function (x){
| 7 |
diff --git a/userscript.user.js b/userscript.user.js @@ -21230,7 +21230,13 @@ var $$IMU_EXPORT$$;
bad_if: [{
headers: {
"content-length": "281567",
- "last-modified": "Tue, 19 Nov 2019 03:54:27 GMT"
+ "last-modified": function(value) {
+ if (/^Tue, 19 Nov 2019/i.test(value)) {
+ return true;
+ }
+
+ return false;
+ }
}
}]
};
@@ -48618,21 +48624,32 @@ var $$IMU_EXPORT$$;
}
function check_bad_if(badif, resp) {
- if (!badif || !(badif instanceof Array) || badif.length === 0)
+ if (_nir_debug_)
+ console_log("check_bad_if", badif, resp);
+
+ if (!badif || !(badif instanceof Array) || badif.length === 0) {
+ if (_nir_debug_)
+ console_log("check_bad_if (!badif)");
return false;
+ }
var headers = parse_headers(resp.responseHeaders);
var check_single_badif = function(badif) {
if (badif.headers) {
for (var header in badif.headers) {
- header = header.toLowerCase();
+ var header_lower = header.toLowerCase();
var found = false;
for (var i = 0; i < headers.length; i++) {
- if (headers[i].name.toLowerCase() === header) {
- if (headers[i].value === badif.headers[header]) {
- found = true;
+ if (headers[i].name.toLowerCase() === header_lower) {
+ if (typeof (badif.headers[header]) === "function") {
+ found = badif.headers[header](headers[i].value);
+ } else if (typeof (badif.headers[header]) === "string") {
+ found = headers[i].value === badif.headers[header];
+ }
+
+ if (found) {
break;
} else {
return false;
| 7 |
diff --git a/src/connectors/youtube.js b/src/connectors/youtube.js @@ -73,7 +73,10 @@ Connector.getTrackInfo = () => {
Connector.getTimeInfo = () => {
const videoElement = document.querySelector(videoSelector);
if (videoElement && !areChaptersAvailable()) {
- const { currentTime, duration } = videoElement;
+ let { currentTime, duration, playbackRate } = videoElement;
+
+ currentTime /= playbackRate;
+ duration /= playbackRate;
return { currentTime, duration };
}
| 7 |
diff --git a/src/components/play-mode/infobox/Infobox.jsx b/src/components/play-mode/infobox/Infobox.jsx @@ -85,6 +85,20 @@ export const Infobox = () => {
</div>
</> : null}
</div>
+ <div className={ styles.hints }>
+ <div className={ styles.hint }>
+ <div className={ styles.key }>E</div>
+ <div className={ styles.label }>Use</div>
+ </div>
+ <div className={ styles.hint }>
+ <div className={ styles.key }>Q</div>
+ <div className={ styles.label }>Lore</div>
+ </div>
+ <div className={ styles.hint }>
+ <div className={ styles.key }>R</div>
+ <div className={ styles.label }>Drop</div>
+ </div>
+ </div>
</div>
);
| 0 |
diff --git a/Specs/Scene/Cesium3DTilesetSpec.js b/Specs/Scene/Cesium3DTilesetSpec.js -import { Cartesian2 } from "../../Source/Cesium.js";
+import { Cartesian2, Cesium3DTileBatchTable } from "../../Source/Cesium.js";
import { Cartesian3 } from "../../Source/Cesium.js";
import { Cartographic } from "../../Source/Cesium.js";
import { Color } from "../../Source/Cesium.js";
@@ -2909,6 +2909,7 @@ describe(
conditions: [["${id} > 0", 'color("black")']],
},
});
+ scene.renderForSpecs();
expect(tileset.root.content.getFeature(0).color).toEqual(Color.WHITE);
expect(tileset.root.content.getFeature(1).color).toEqual(Color.BLACK);
}
@@ -2918,20 +2919,25 @@ describe(
it("handle else case when applying conditional show to a tileset", function () {
return Cesium3DTilesTester.loadTileset(scene, withBatchTableUrl).then(
function (tileset) {
- tileset.style = new Cesium3DTileStyle({
- show: {
- conditions: [["${id} > 0", 'show("false")']],
- },
- });
+ tileset.style = new Cesium3DTileStyle({ show: "${id} > 0" });
+ scene.renderForSpecs();
+ expect(tileset.root.content.getFeature(0).show).toBe(false);
+ expect(tileset.root.content.getFeature(1).show).toBe(true);
+
+ tileset.style = new Cesium3DTileStyle({ show: "${id} < 1" });
+ scene.renderForSpecs();
expect(tileset.root.content.getFeature(0).show).toBe(true);
expect(tileset.root.content.getFeature(1).show).toBe(false);
- tileset.style = new Cesium3DTileStyle({
- show: {
- conditions: [["${id} > 0", 'show("true")']],
- },
- });
+
+ tileset.style = new Cesium3DTileStyle({ show: "true" });
+ scene.renderForSpecs();
expect(tileset.root.content.getFeature(0).show).toBe(true);
expect(tileset.root.content.getFeature(1).show).toBe(true);
+
+ tileset.style = new Cesium3DTileStyle({ show: "false" });
+ scene.renderForSpecs();
+ expect(tileset.root.content.getFeature(0).show).toBe(false);
+ expect(tileset.root.content.getFeature(1).show).toBe(false);
}
);
});
| 3 |
diff --git a/src/renderer/component/viewers/threeViewer/index.jsx b/src/renderer/component/viewers/threeViewer/index.jsx @@ -210,7 +210,7 @@ class ThreeViewer extends React.PureComponent<Props, State> {
config.color = this.materialColor;
// Reset material
this.material.color.set(config.color);
- this.material.flatShading = false;
+ this.material.flatShading = true;
this.material.shininess = 30;
this.material.wireframe = false;
// Reset autoRotate
@@ -397,7 +397,7 @@ class ThreeViewer extends React.PureComponent<Props, State> {
// Create model material
this.material = new THREE.MeshPhongMaterial({
depthWrite: true,
- flatShading: false,
+ flatShading: true,
vertexColors: THREE.FaceColors,
});
| 13 |
diff --git a/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js b/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js @@ -163,7 +163,9 @@ TokensStrategy.prototype.authenticate = function(req) {
authenticateUserToken(req).then(user => {
this.success(user,{scope:user.permissions});
}).catch(err => {
- log.trace("token authentication failure: "+err.stack)
+ if (err) {
+ log.trace("token authentication failure: "+err.stack?err.stack:err)
+ }
this.fail(401);
});
}
| 9 |
diff --git a/articles/tutorials/sending-events-to-splunk.md b/articles/tutorials/sending-events-to-splunk.md @@ -23,6 +23,10 @@ When enabled, this rule will start sending events that will show up on Splunk's

+::: panel Securely Storing Credentials
+This example has your Splunk credentials hard-coded into the Rule, but if you would prefer, you can store them instead in the `configuration` object (see the [Settings](${manage_url}/#/rules) under the list of your Rules). This allows you to use those credentials in multiple Rules if you require, and also prevents you from having to store them directly in the Rule code.
+:::
+
```js
function(user, context, callback) {
user.app_metadata = user.app_metadata || {};
| 0 |
diff --git a/edit.js b/edit.js @@ -270,8 +270,8 @@ const highlightMesh = makeHighlightMesh();
highlightMesh.visible = false;
scene.add(highlightMesh);
const anchorMeshes = [];
-const rayMesh = makeRayMesh();
-scene.add(rayMesh);
+/* const rayMesh = makeRayMesh();
+scene.add(rayMesh); */
const q = parseQuery(location.search);
(async () => {
@@ -1014,9 +1014,9 @@ function animate(timestamp, frame) {
const _updateAnchors = () => {
const transforms = rigManager.getRigTransforms();
const {position, quaternion} = transforms[0];
- rayMesh.position.copy(position);
+ /* rayMesh.position.copy(position);
rayMesh.quaternion.copy(quaternion);
- rayMesh.scale.z = 10;
+ rayMesh.scale.z = 10; */
highlightMesh.visible = false;
for (const anchorMesh of anchorMeshes) {
| 2 |
diff --git a/physics-manager.js b/physics-manager.js @@ -193,6 +193,7 @@ physicsManager.addCookedGeometry = (buffer, position, quaternion, scale) => {
physicsMesh.visible = false
physicsObject.add(physicsMesh)
physicsObject.physicsMesh = physicsMesh
+ physicsMesh.updateMatrixWorld()
return physicsObject
}
@@ -252,6 +253,7 @@ physicsManager.addCookedConvexGeometry = (
physicsMesh.visible = false
physicsObject.add(physicsMesh)
physicsObject.physicsMesh = physicsMesh;
+ physicsMesh.updateMatrixWorld()
return physicsObject
}
@@ -277,6 +279,7 @@ physicsManager.addShape = (shapeAddress, id) => {
physicsMesh.visible = false
physicsObject.add(physicsMesh)
physicsObject.physicsMesh = physicsMesh;
+ physicsMesh.updateMatrixWorld()
return physicsObject
};
physicsManager.addConvexShape = (shapeAddress, position, quaternion, scale, dynamic) => {
@@ -311,8 +314,9 @@ physicsManager.addConvexShape = (shapeAddress, position, quaternion, scale, dyna
physicsMesh.visible = false
// physicsMesh.visible = true
physicsObject.add(physicsMesh)
- physicsObject.physicsMesh = physicsMesh
- // physicsObject.updateMatrixWorld();
+ physicsObject.physicsMesh = physicsMesh;
+ physicsMesh.updateMatrixWorld();
+ // scene.add(physicsMesh);
return physicsObject
};
physicsManager.getGeometryForPhysicsId = (physicsId) =>
| 0 |
diff --git a/src/components/wallet/Wallet.js b/src/components/wallet/Wallet.js @@ -194,13 +194,12 @@ export function Wallet() {
<Translate id='button.receive'/>
</FormButton>
</div>
+ {sortedTokens?.length ?
+ <>
<div className='sub-title tokens'>
<span><Translate id='wallet.tokens' /></span>
<span><Translate id='wallet.balance' /></span>
</div>
- {sortedTokens?.length ?
- <>
- <div className='sub-title tokens'><Translate id='wallet.tokens' /></div>
<Tokens tokens={sortedTokens} />
</>
: undefined
| 1 |
diff --git a/packages/mjml-navbar/src/Navbar.js b/packages/mjml-navbar/src/Navbar.js @@ -22,6 +22,11 @@ export default class MjNavbar extends BodyComponent {
'ico-padding-top': 'unit(px,%)',
'ico-padding-right': 'unit(px,%)',
'ico-padding-bottom': 'unit(px,%)',
+ 'padding': 'unit(px,%){1,4}',
+ 'padding-left': 'unit(px,%)',
+ 'padding-top': 'unit(px,%)',
+ 'padding-right': 'unit(px,%)',
+ 'padding-bottom': 'unit(px,%)',
'ico-text-decoration': 'string',
'ico-line-height': 'unit(px,%)',
}
| 11 |
diff --git a/packages/ember-application/lib/initializers/dom-templates.js b/packages/ember-application/lib/initializers/dom-templates.js @@ -6,7 +6,7 @@ import {
import { environment } from 'ember-environment';
import Application from '../system/application';
-let bootstrap = () => { };
+let bootstrap = function() { };
Application.initializer({
name: 'domTemplates',
| 13 |
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml @@ -130,12 +130,12 @@ jobs:
- name: Build Android Release
env:
RELEASE_ANDROID_PASSPHRASE: ${{ secrets.RELEASE_ANDROID_PASSPHRASE }}
- ENVFILE: '../.env.${{ env.ENV }}'
+ ENVFILE: '.env.${{ env.ENV }}'
BUILD_NUMBER: ${{ github.run_number }}
run: |
BUILD_VERSION=`node -pe "require('./package.json')['version']"`
echo "Creating release using env: ${ENVFILE}"
- cd android && ENVFILE=${{ env.ENVFILE }} ./gradlew bundleRelease
+ cd android && ./gradlew bundleRelease
- name: Build Universal APK
uses: skywall/[email protected]
| 13 |
diff --git a/src/js/controllers/buy-bitcoin/purchase-history.controller.js b/src/js/controllers/buy-bitcoin/purchase-history.controller.js .module('bitcoincom.controllers')
.controller('buyBitcoinPurchaseHistoryController', purchaseHistoryController);
- function purchaseHistoryController($scope) {
+ function purchaseHistoryController(
+ popupService,
+ $scope, $ionicHistory
+ ) {
var vm = this;
vm.history = [];
moonPayService.getTransactions().then(
function onGetTransactionsSuccess(transactions) {
vm.history = transactions;
+ },
+ function onGetTransactionsError(err) {
+ var title = gettextCatalog.getString('Error Getting Transaction History');
+ var message = err.message || gettextCatalog.getString('An error occurred when getting your transaction history.');
+ var okText = gettextCatalog.getString('Go Back');
+ popupService.showAlert(title, message,
+ function onAlertDismissed() {
+ $ionicHistory.goBack();
+ },
+ okText
+ );
}
);
}
| 9 |
diff --git a/index.js b/index.js @@ -50,10 +50,10 @@ const middy = (handler) => {
const errorMiddlewares = []
const instance = (event, context, callback) => {
- instance.event = event;
- instance.context = context;
- instance.response = null;
- instance.error = null;
+ instance.event = event
+ instance.context = context
+ instance.response = null
+ instance.error = null
const terminate = (err) => {
if (err) {
| 14 |
diff --git a/src/pages/strategy/sortielogs.js b/src/pages/strategy/sortielogs.js + JSON.stringify(sortieData), "_blank");
} else {
window.open("https://kc3kai.github.io/kancolle-replay/battleplayer.html#"
- + encodeURIComponent(JSON.stringify(sortieData), "_blank"));
+ + encodeURIComponent(JSON.stringify(sortieData)), "_blank");
}
self.exportingReplay = false;
$("body").css("opacity", "1");
| 1 |
diff --git a/polyfills/requestIdleCallback/polyfill.js b/polyfills/requestIdleCallback/polyfill.js var scheduledAnimationFrameId;
var scheduledAnimationFrameTimeout;
- var frameDeadline = 0;
-
- var messageChannel = new MessageChannel();
- var port = messageChannel.port2;
-
// We start out assuming that we run at 30fps (1 frame per 33.3ms) but then
// the heuristic tracking will adjust this value to a faster fps if we get
// more frequent animation frames.
var previousFrameTime = 33;
var activeFrameTime = 33;
+ var frameDeadline = 0;
+
+ var port; // The object to `postMessage` on.
+ var messageKey;
+ var messageChannelSupport = typeof MessageChannel === 'object';
+
+ // We use the postMessage trick to defer idle work until after the repaint.
+ if (messageChannelSupport) {
+ // Use MessageChannel if supported.
+ var messageChannel = new MessageChannel();
+ port = messageChannel.port2;
+ messageChannel.port1.onmessage = processIdleCallbacks;
+ } else {
+ // TODO add `MessageChannel` polyfill to polyfill.io.
+ // Otherwise fallback to document messaging. It is less efficient as
+ // all message event listeners within a project will be called each
+ // frame whilst idle callbacks remain.
+ messageKey = 'polyfillIdleCallback' + Math.random().toString(36).slice(2);
+ port = window;
+ window.addEventListener('message', function (event) {
+ // IE8 returns true when a strict comparison with `window` is made.
+ if (event.source != window || event.data !== messageKey) {
+ return;
+ }
+ processIdleCallbacks();
+ });
+ }
+
function timeRemaining() {
return frameDeadline - performance.now();
};
function scheduleIdleWork() {
if (!isIdleScheduled) {
isIdleScheduled = true;
- port.postMessage('*');
+ port.postMessage(messageKey, '*');
}
}
}
}
- // We use the postMessage trick to defer idle work until after the repaint.
- messageChannel.port1.onmessage = function () {
-
+ function processIdleCallbacks () {
isIdleScheduled = false;
isCallbackRunning = true;
| 0 |
diff --git a/app/assets/stylesheets/editor-3/_tab-pane.scss b/app/assets/stylesheets/editor-3/_tab-pane.scss -@import 'cdb-utilities/mixins';
-
.Tab-pane,
.Tab-paneContent {
- @include display-flex();
- @include flex(1 1 auto);
- @include flex-direction(column);
+ display: flex;
+ flex: 1 1 auto;
+ flex-direction: column;
min-height: 0;
}
}
.Tab-paneContentInner {
- @include display-flex();
- @include flex(1 1 auto);
+ display: flex;
+ flex: 1 1 auto;
}
| 2 |
diff --git a/app/containers/SettingsList.js b/app/containers/SettingsList.js @@ -891,14 +891,14 @@ class SettingsList extends Component {
<Grid.Column width={12}>
<Checkbox
data-tid="showPaperPreviewCheckbox"
- label={<label className={styles.label}>Show paper preview</label>}
+ label={<label className={styles.label}>Show guide layout</label>}
checked={defaultShowPaperPreview}
onChange={this.onChangeShowPaperPreview}
/>
</Grid.Column>
</Grid.Row>
<Grid.Row>
- <Grid.Column width={4}>Layout</Grid.Column>
+ <Grid.Column width={4}>Guide layout</Grid.Column>
<Grid.Column width={12}>
<Dropdown
data-tid="paperLayoutOptionsDropdown"
| 10 |
diff --git a/lighthouse-cli/types/types.ts b/lighthouse-cli/types/types.ts @@ -10,6 +10,10 @@ interface AuditResult {
};
}
+interface AuditResults {
+ [metric: string]: AuditResult
+}
+
interface AuditFullResult {
rawValue: boolean|number;
displayValue: string;
@@ -26,6 +30,10 @@ interface AuditFullResult {
};
}
+interface AuditFullResults {
+ [metric: string]: AuditFullResult
+}
+
interface AggregationResultItem {
overall: number;
name: string;
@@ -42,7 +50,7 @@ interface Aggregation {
interface Results {
url: string;
aggregations: Array<Aggregation>;
- audits: Object;
+ audits: AuditFullResults;
lighthouseVersion: string;
artifacts?: Object;
initialUrl: string;
@@ -54,5 +62,7 @@ export {
Aggregation,
AggregationResultItem,
AuditResult,
+ AuditResults,
AuditFullResult,
+ AuditFullResults,
}
| 7 |
diff --git a/content/docs/for-developers/sending-email/rubyonrails.md b/content/docs/for-developers/sending-email/rubyonrails.md @@ -58,7 +58,7 @@ If you don't have a user model quite yet, generate one quickly.
$ rails generate scaffold user name email login
$ rake db:migrate
```
-Now in the controller for the user model `app/controllers/users_controller.rb`, add a call to UserNotifierMailer.send_signup_email when a user is saved.
+Now in the controller for the user model `app/controllers/users_controller.rb`, add a call to `UserNotifierMailer.send_signup_email` when a user is saved.
``` ruby
class UsersController < ApplicationController
| 7 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -1760,6 +1760,43 @@ const menuMesh = (() => {
offset -= 0.1;
}
};
+ const _renderObjects = () => {
+ _clearItems();
+
+ let offset = itemsOffset;
+
+ const featuredObjects = [
+ {
+ name: 'weapons',
+ url: `https://avaer.github.io/weapons/index.js`,
+ },
+ {
+ name: 'hookshot',
+ url: `https://avaer.github.io/hookshot/index.js`,
+ },
+ ];
+ for (const featuredObject of featuredObjects) {
+ const item = makeItem(`https://preview.exokit.org/[https://raw.githubusercontent.com/avaer/vrm-samples/master/vroid/male.vrm]/preview.png`, featuredObject.name, undefined, undefined, ['add']);
+ item.position.y = offset;
+ item.onenter = async horizontalIndex => {
+ const xrCamera = renderer.xr.getSession() ? renderer.xr.getCamera(camera) : camera;
+ localVector.copy(xrCamera.position)
+ .add(localVector2.set(0, 0, -1.5).applyQuaternion(xrCamera.quaternion));
+ world.addObject(featuredObject.url, null, localVector, xrCamera.quaternion);
+ /* if (horizontalIndex === 0) {
+ console.log('open', worldObject.instanceId);
+ // world.removeObject(worldObject.instanceId);
+ } else {
+ world.removeObject(worldObject.instanceId);
+ _clearItems();
+ _renderScene();
+ } */
+ };
+ object.add(item);
+ items.push(item);
+ offset -= 0.1;
+ }
+ };
const _renderScene = () => {
_clearItems();
@@ -1802,7 +1839,9 @@ const menuMesh = (() => {
tabs.position.y = offset;
tabs.ontabchange = i => {
const selectedTab = tabNames[i];
- if (selectedTab === 'Scene') {
+ if (selectedTab === 'Objects') {
+ _renderObjects();
+ } else if (selectedTab === 'Scene') {
_renderScene();
} else {
_renderAll();
| 0 |
diff --git a/DeletedUsersHelper.user.js b/DeletedUsersHelper.user.js // @description Additional capability and improvements to display/handle deleted users
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.22
+// @version 1.22.1
//
// @include https://*stackoverflow.com/*
// @include https://*serverfault.com/*
const year = d.getFullYear().toString().slice(2);
const month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][d.getMonth()];
- const networkAccounts = '\n\nNetwork Account: ' + $('.details a').first().attr('href');
const regdate = '\n' + $('.details .row').first().text().trim().replace(/\s+/g, ' ').replace('Joined network:', 'Joined network:').replace('Joined site:', '\nJoined site: ').split(/\s*\n\s*/).map(function(v) {
if(v.contains('ago')) v = v.split(':')[0] + ': ' + month + " " + d.getDate() + " '" + year;
else if(v.contains('yesterday')) v = v.split(':')[0] + ': ' + month + ' ' + d.getDate() + " '" + year;
return v;
}).join('\n');
- const str = data.text().replace(/Credentials(.|\s)+$/, '').trim().replace(/\s+/g, ' ').replace('Email:', 'Email: ').replace(' Real Name:', '\nReal Name: ').replace(' IP Address:', '\nIP Address:');
- const reason = str + networkAccounts + regdate;
+ const str = data.text().replace(/Credentials(.|\s)+$/, '').trim().replace(/\s+/g, ' ').replace('Email:', 'Email: ').replace(' Real Name:', '\nReal Name:').replace(/ IP Address:.+/, '');
+ const reason = str + regdate;
$('#deleteReasonDetails, #destroyReasonDetails').val('\n\n' + reason);
});
| 2 |
diff --git a/packages/app/src/components/Sidebar.tsx b/packages/app/src/components/Sidebar.tsx @@ -191,20 +191,23 @@ const Sidebar: FC<Props> = (props: Props) => {
resizableContainer.current.style.width = `${newWidth}px`;
}, []);
- const hoverHandler = useCallback((isHover: boolean) => {
+ const hoverOnResizableContainerHandler = useCallback(() => {
if (!isCollapsed || isDrawerMode) {
return;
}
- setHover(isHover);
-
- if (isHover) {
+ setHover(true);
setContentWidth(currentProductNavWidth);
+ }, [isCollapsed, isDrawerMode, setContentWidth, currentProductNavWidth]);
+
+ const hoverOutHandler = useCallback(() => {
+ if (!isCollapsed || isDrawerMode) {
+ return;
}
- if (!isHover) {
+
+ setHover(false);
setContentWidth(sidebarMinimizeWidth);
- }
- }, [isCollapsed, isDrawerMode, setContentWidth, currentProductNavWidth]);
+ }, [isCollapsed, isDrawerMode, setContentWidth]);
const toggleNavigationBtnClickHandler = useCallback(() => {
const newValue = !isCollapsed;
@@ -268,6 +271,11 @@ const Sidebar: FC<Props> = (props: Props) => {
useEffect(() => {
document.addEventListener('mousemove', draggableAreaMoveHandler);
document.addEventListener('mouseup', dragableAreaMouseUpHandler);
+ // cleanup
+ return function cleanup() {
+ document.removeEventListener('mousemove', draggableAreaMoveHandler);
+ document.removeEventListener('mouseup', dragableAreaMouseUpHandler);
+ };
}, [draggableAreaMoveHandler, dragableAreaMouseUpHandler]);
return (
@@ -275,15 +283,14 @@ const Sidebar: FC<Props> = (props: Props) => {
<div className={`grw-sidebar d-print-none ${isDrawerMode ? 'grw-sidebar-drawer' : ''} ${isDrawerOpened ? 'open' : ''}`}>
<div className="data-layout-container">
<div className="navigation">
- <div className="grw-navigation-wrap">
+ <div className="grw-navigation-wrap" onMouseLeave={hoverOutHandler}>
<div className="grw-global-navigation">
{ isMounted ? <GlobalNavigation></GlobalNavigation> : <GlobalNavigationSkelton></GlobalNavigationSkelton> }
</div>
<div
ref={resizableContainer}
className="grw-contextual-navigation"
- onMouseEnter={() => hoverHandler(true)}
- onMouseLeave={() => hoverHandler(false)}
+ onMouseEnter={hoverOnResizableContainerHandler}
onMouseMove={draggableAreaMoveHandler}
onMouseUp={dragableAreaMouseUpHandler}
style={{ width: isCollapsed ? sidebarMinimizeWidth : currentProductNavWidth }}
| 7 |
diff --git a/src/styles/styles.js b/src/styles/styles.js @@ -1392,12 +1392,10 @@ const styles = {
textInputFullCompose: {
alignSelf: 'flex-end',
-
- // textAlignVertical: 'flex-end',
flex: 1,
maxHeight: '100%',
marginVertical: 0,
- overflow: 'hidden',
+ overflow: 'scroll',
paddingVertical: 5,
},
| 11 |
diff --git a/dbseed.js b/dbseed.js @@ -26,7 +26,7 @@ admin.initializeApp({ projectId })
const db = admin.firestore()
-async function seedDatabase() {
+async function seedData() {
try {
for (let i = 0; i < seedSize; i++) {
const job = {
@@ -75,4 +75,4 @@ async function seedDatabase() {
}
}
-seedDatabase()
+seedData()
| 10 |
diff --git a/world.js b/world.js @@ -10,6 +10,7 @@ import WSRTC from 'wsrtc/wsrtc.js';
import hpManager from './hp-manager.js';
// import {rigManager} from './rig.js';
import {AppManager} from './app-manager.js';
+import {chatManager} from './chat-manager.js';
// import {getState, setState} from './state.js';
// import {makeId} from './util.js';
import {scene, postSceneOrthographic, postScenePerspective, sceneHighPriority, sceneLowPriority} from './renderer.js';
@@ -54,6 +55,7 @@ const extra = {
}; */
let mediaStream = null;
+let speechRecognition = null;
world.micEnabled = () => !!mediaStream;
world.enableMic = async () => {
await WSRTC.waitForReady();
@@ -64,6 +66,49 @@ world.enableMic = async () => {
const localPlayer = metaversefileApi.useLocalPlayer();
localPlayer.setMicMediaStream(mediaStream);
+
+ let final_transcript = '';
+ const localSpeechRecognition = new webkitSpeechRecognition();
+ // speechRecognition.continuous = true;
+ // speechRecognition.interimResults = true;
+ // speechRecognition.lang = document.querySelector("#select_dialect").value;
+ localSpeechRecognition.onstart = () => {
+ // document.querySelector("#status").style.display = "block";
+ };
+ localSpeechRecognition.onerror = e => {
+ // document.querySelector("#status").style.display = "none";
+ console.log('speech recognition error', e);
+ };
+ localSpeechRecognition.onend = () => {
+ // document.querySelector("#status").style.display = "none";
+ final_transcript = final_transcript
+ .replace(/celia|sylvia|sileo|cilia|tilia|zilia/gi, 'Scillia')
+ console.log('speech:', [final_transcript]);
+ if (final_transcript) {
+ chatManager.addMessage(final_transcript, {
+ timeout: 3000,
+ });
+ }
+
+ if (localSpeechRecognition === speechRecognition) {
+ final_transcript = '';
+ localSpeechRecognition.start();
+ }
+ };
+ // let isFinal = false;
+ localSpeechRecognition.onresult = event => {
+ for (let i = event.resultIndex; i < event.results.length; ++i) {
+ final_transcript += event.results[i][0].transcript;
+ // isFinal = isFinal || event.results[i].isFinal;
+ }
+ /* console.log('got result', final_transcript, event);
+ if (isFinal) {
+ console.log('final_transcript', final_transcript);
+ } */
+ };
+ localSpeechRecognition.start();
+
+ speechRecognition = localSpeechRecognition;
};
world.disableMic = () => {
if (mediaStream) {
@@ -77,6 +122,10 @@ world.disableMic = () => {
const localPlayer = metaversefileApi.useLocalPlayer();
localPlayer.setMicMediaStream(null);
}
+ if (speechRecognition) {
+ speechRecognition.stop();
+ speechRecognition = null;
+ }
};
world.toggleMic = () => {
if (mediaStream) {
| 0 |
diff --git a/main.js b/main.js @@ -67,7 +67,7 @@ function mergeObjects() {
let finalObj = {}
for (let obj of arguments) {
for (let key in obj) {
- finalObk[key] = obj[key]
+ finalObj[key] = obj[key]
}
}
return finalObj
@@ -82,7 +82,7 @@ function writeWindowSize(win, cb) {
size.width = dimens[0]
size.height = dimens[1]
- size.maximized = win.isMaximized
+ size.maximized = win.isMaximized()
fs.writeFile(WINDOW_SIZE_FILE, JSON.stringify(size) + "\n", {
encoding: "utf8"
| 1 |
diff --git a/test/integration/globals.test.js b/test/integration/globals.test.js @@ -251,9 +251,8 @@ describe('globals :: ', function() {
});
- it('should expose `async` as a global, using the custom async', function() {
- assert(_.isArray(result.async));
- assert(_.contains(result.async, 'owl'));
+ it('should NO LONGER expose `async` as a global', function() {
+ assert.equal(result.async, false);
});
it('should expose `_` as a global, using the custom lodash', function() {
| 1 |
diff --git a/packages/medusa-plugin-brightpearl/src/services/brightpearl.js b/packages/medusa-plugin-brightpearl/src/services/brightpearl.js @@ -229,7 +229,7 @@ class BrightpearlService extends BaseService {
const authData = await this.getAuthData()
const orderId = fromOrder.metadata.brightpearl_sales_order_id
if (orderId) {
- let accountingCode = "4000"
+ let accountingCode = this.options.sales_account_code || "4000"
if (
fromRefund.reason === "discount" &&
this.options.discount_account_code
| 11 |
diff --git a/articles/migrations/index.md b/articles/migrations/index.md @@ -111,8 +111,8 @@ To get a valid Access Token for these endpoints during authorization, you have t
For example, the [GET /api/v2/users/{id} endpoint](/api/management/v2#!/Users/get_users_by_id) requires two scopes: `read:users` and `read:user_idp_tokens`. For detailed steps and code samples, see [How to get an Access Token](/tokens/access-token#how-to-get-an-access-token).
-:::panel-warning Account Linking exception
-There are two ways of invoking the [POST/api/v2/users/{id}/identities](/api/management/v2#!/Users/post_identities) endpoint (follow the link for details). The use case where we send the **user_id** to link with, as part of the payload, **will not be available for Access Tokens issued to end users**. This use case requires a Dashboard Admin token. The other use case, where the second identity is established by attaching an ID Token, can be used with a valid Access Token, as described above.
+:::panel-warning Account Linking available only for admins
+You can link two accounts by invoking the [POST/api/v2/users/{id}/identities](/api/management/v2#!/Users/post_identities) endpoint. This **will not be available for Access Tokens issued to end users**, but only to administrators of your tenant.
:::
Applications must be updated by June 1, 2018, when the ability to use ID Tokens will be disabled. Migration guides will be available by February 2018.
| 3 |
diff --git a/vaadin-grid-table-cell.html b/vaadin-grid-table-cell.html if (this._reorderGhost) {
e.preventDefault();
- // TODO: WTF doesn't bubble in tests?
- // var event = new CustomEvent('dragend', {bubbles: true});
- // this.dispatchEvent(event);
- this.fire('dragend');
+ var event = new CustomEvent('dragend', {bubbles: true});
+ this.dispatchEvent(event);
this._reorderGhost.style.visibility = 'hidden';
this._reorderGhost = null;
}
| 4 |
diff --git a/module/actor-sheet.js b/module/actor-sheet.js @@ -543,17 +543,25 @@ export class GurpsActorSheet extends ActorSheet {
)
html.find('#qnotes').dblclick(ex => {
- const n = this.actor.data.data.additionalresources.qnotes || ''
- Dialog.prompt({
+ let n = this.actor.data.data.additionalresources.qnotes || ''
+ n = n.replace(/<br>/g, "\n")
+ let actor = this.actor
+ new Dialog({
title: 'Edit Quick Note',
- content: `Enter a Quick Note (a great place to put an On-the-Fly formula!):<br><br><input id="i" type="text" value="${n}" placeholder=""></input><br><br>Examples:
+ content: `Enter a Quick Note (a great place to put an On-the-Fly formula!):<br><br><textarea rows="4" id="i">${n}</textarea><br><br>Examples:
<br>[+1 due to shield]<br>[Dodge +3 retreat]<br>[Dodge +2 Feverish Defense *Cost 1FP]`,
- label: 'OK',
+ buttons: {
+ save: {
+ icon: '<i class="fas fa-save"></i>',
+ label: "Save",
callback: html => {
const i = html[0].querySelector('#i')
- this.actor.update({ 'data.additionalresources.qnotes': i.value })
+ actor.update({ 'data.additionalresources.qnotes': i.value.replace(/\n/g, "<br>") })
+ }
},
- })
+ },
+ render: true,
+ }).render(true);
})
}
| 11 |
diff --git a/src/angular/projects/spark-core-angular/src/lib/components/sprk-pagination/sprk-pagination.component.ts b/src/angular/projects/spark-core-angular/src/lib/components/sprk-pagination/sprk-pagination.component.ts @@ -160,27 +160,29 @@ import {
<a
(click)="goForward($event, currentPage)"
[ngClass]="{
- 'sprk-c-Pagination__link': true,
+ 'sprk-c-Pagination__icon': true,
'sprk-b-Link': true,
'sprk-b-Link--disabled': isLastPage()
}"
href="#"
[attr.data-analytics]="analyticsStringLinkNext">
- {{ nextLinkText }}
+ <span class="sprk-u-ScreenReaderText">Next</span>
+ <sprk-icon iconType="chevron-right"></sprk-icon>
</a>
</li>
</sprk-unordered-list>
</nav>
<nav aria-label="Pagination Navigation" [ngClass]="getClasses()" *ngIf="paginationType === 'pager'">
- <sprk-unordered-list listType="bare" additionalClasses="sprk-c-Pagination">
+ <sprk-unordered-list listType="horizontal" additionalClasses="sprk-c-Pagination sprk-o-HorizontalList--spacing-large">
<li class="sprk-c-Pagination__item">
<a
(click)="goBack($event, currentPage)"
[ngClass]="{ 'sprk-b-Link': true, 'sprk-b-Link--standalone': true, 'sprk-b-Link--disabled': currentPage === 1 }"
href="#"
[attr.data-analytics]="analyticsStringLinkPrev">
- {{ prevLinkText }}
+ <span class="sprk-u-ScreenReaderText">{{ prevLinkText }}</span>
+ <sprk-icon iconType="chevron-left"></sprk-icon>
</a>
</li>
@@ -193,7 +195,8 @@ import {
'sprk-b-Link--disabled': isLastPage() }"
href="#"
[attr.data-analytics]="analyticsStringLinkNext">
- {{ nextLinkText }}
+ <span class="sprk-u-ScreenReaderText">{{ nextLinkText }}</span>
+ <sprk-icon iconType="chevron-right"></sprk-icon>
</a>
</li>
</sprk-unordered-list>
| 3 |
diff --git a/app/views/camaleon_cms/admin/settings/custom_fields/form.html.erb b/app/views/camaleon_cms/admin/settings/custom_fields/form.html.erb </optgroup>
<optgroup label="<%= t('camaleon_cms.admin.settings.others') %>">
- <% value = "User,#{current_site.id}" %>
+ <% value = "#{PluginRoutes.static_system_info['user_model'] || 'User'},#{current_site.id}" %>
<option value="<%= value %>" data-help="<%= t('camaleon_cms.admin.settings.tooltip.add_custom_field_users') %>"><%= t('camaleon_cms.admin.sidebar.users') %></option>
<% value = "Site,#{current_site.id}" %>
<option value="<%= value %>" data-help="<%= t('camaleon_cms.admin.settings.tooltip.add_custom_field_sites') %>"><%= t('camaleon_cms.admin.sidebar.site_settings') %></option>
| 4 |
diff --git a/lib/core.js b/lib/core.js @@ -1995,7 +1995,7 @@ module.exports = function reglCore (
useVAO = useVAO && !!binding
return binding
})
- if (useVAO) {
+ if (useVAO && staticBindings.length > 0) {
var vao = attributeState.getVAO(attributeState.createVAO(staticBindings))
result.drawVAO = new Declaration(null, null, null, function (env, scope) {
return env.link(vao)
| 9 |
diff --git a/website/src/_posts/2019-03-0.30.md b/website/src/_posts/2019-03-0.30.md @@ -46,8 +46,8 @@ npm install --save @uppy/robodog
Or import it using an HTML script tag:
```html
-<link rel="stylesheet" href="https://transloadit.edgly.net/releases/uppy/v0.30.2/robodog.min.css">
-<script src="https://transloadit.edgly.net/releases/uppy/v0.30.2/robodog.min.js"></script>
+<link rel="stylesheet" href="https://transloadit.edgly.net/releases/uppy/v0.30.3/robodog.min.css">
+<script src="https://transloadit.edgly.net/releases/uppy/v0.30.3/robodog.min.js"></script>
```
<img src="https://media.giphy.com/media/MqGA1Za9ar6lG/giphy.gif">
| 3 |
diff --git a/src/workingtitle-vcockpits-instruments-cj4/html_ui/Pages/VCockpit/Instruments/Airliners/CJ4/FMC/CJ4_FMC_DirectToPage.js b/src/workingtitle-vcockpits-instruments-cj4/html_ui/Pages/VCockpit/Instruments/Airliners/CJ4/FMC/CJ4_FMC_DirectToPage.js @@ -83,21 +83,21 @@ class CJ4_FMC_DirectToPage {
//trying to build an alternate of fmc.activateDirectToWaypoint which deletes all enroute waypoints,
//then tries to activate the approach
+ let fplnWaypoints = fmc.flightPlanManager.getWaypoints().length;
+ console.log("fplnWaypints:" + fplnWaypoints)
+ let removeWaypointForApproachMethod = (callback = EmptyCallback.Void) => {
+ let i = 1;
let destinationIndex = fmc.flightPlanManager.getWaypoints().findIndex(w => {
return w.icao === fmc.flightPlanManager.getDestination().icao;
});
console.log("destinationIndex:" + destinationIndex);
-
- let fplnWaypoints = fmc.flightPlanManager.getWaypoints().length;
- console.log("fplnWaypints:" + fplnWaypoints)
- let i = 1;
- let removeWaypointForApproachMethod = (callback = EmptyCallback.Void) => {
if (i < destinationIndex) {
- fmc.flightPlanManager.removeWaypoint(1, i === destinationIndex - 1, () => {
- i++;
+ fmc.flightPlanManager.removeWaypoint(1, i === destinationIndex, () => {
+ //i++;
removeWaypointForApproachMethod(callback);
});
+ fmc.flightPlanManager.setCurrentFlightPlanIndex(1);
}
else {
callback();
@@ -105,10 +105,10 @@ class CJ4_FMC_DirectToPage {
};
removeWaypointForApproachMethod(() => {
fmc.flightPlanManager.tryAutoActivateApproach();
+ CJ4_FMC_RoutePage.ShowPage2(fmc);
});
-
//adding this approach waypoint to the end of the current enroute flight plan
//fmc.insertWaypoint(directWaypoint.ident, fmc.flightPlanManager.getEnRouteWaypointsLastIndex() + 1);
@@ -116,8 +116,8 @@ class CJ4_FMC_DirectToPage {
//fmc.activateRoute();
//temporary log to see flight plan after insert
- let waypointsNew = fmc.flightPlanManager.getWaypoints().map(waypoint => waypoint.ident);
- console.log("fpln after mod:" + JSON.stringify(waypointsNew, null, 2));
+ //let waypointsNew = fmc.flightPlanManager.getWaypoints().map(waypoint => waypoint.ident);
+ //console.log("fpln after mod:" + JSON.stringify(waypointsNew, null, 2));
//get new last enroute waypoint and activate DTO
//let newDirectWaypoint = fmc.flightPlanManager.getWaypoint(fmc.flightPlanManager.getEnRouteWaypointsLastIndex(), NaN, false);
@@ -127,8 +127,8 @@ class CJ4_FMC_DirectToPage {
// fmc.flightPlanManager.activateApproach();
//});
//fmc.flightPlanManager.tryAutoActivateApproach();
- console.log("app active now?:" + fmc.flightPlanManager.isActiveApproach());
- console.log("idx:" + fmc.flightPlanManager.getActiveWaypointIndex());
+ //console.log("app active now?:" + fmc.flightPlanManager.isActiveApproach());
+ //console.log("idx:" + fmc.flightPlanManager.getActiveWaypointIndex());
//let dtoApproachIndex = getAppIndexByIdent(directWaypoint.ident); //get the approach index of the DTO wpt
| 1 |
diff --git a/src/components/signup/SignupState.js b/src/components/signup/SignupState.js @@ -95,7 +95,6 @@ const Signup = ({ navigation }: { navigation: any, screenProps: any }) => {
}),
smsValidated: false,
isEmailConfirmed: skipEmail,
- jwt: '',
skipEmail: skipEmail,
skipPhone: skipMobile,
skipSMS: skipMobile,
| 2 |
diff --git a/src/modules/Scales.js b/src/modules/Scales.js @@ -253,7 +253,7 @@ export default class Range {
// no data in the chart. Either all series collapsed or user passed a blank array
gl.xAxisScale = this.linearScale(0, 5, 5)
} else {
- gl.xAxisScale = this.niceScale(
+ gl.xAxisScale = this.linearScale(
minX,
maxX,
x.tickAmount ? x.tickAmount : diff < 5 && diff > 1 ? diff + 1 : 5,
| 14 |
diff --git a/data/defaultSettings.js b/data/defaultSettings.js @@ -29,7 +29,7 @@ const defaultSettings = {
"atb": null,
"trackersWhitelistTemporary": "https://duckduckgo.com/contentblocking/trackers-whitelist-temporary.txt",
"trackersWhitelistTemporary-etag": null,
- "trackersWhitelist": "https://duckduckgo.com/contentblocking.js?l=trackers-whitelist",
+ "trackersWhitelist": "https://duckduckgo.com/contentblocking/trackers-whitelist.txt",
"trackersWhitelist-etag": null,
"generalEasylist": "https://duckduckgo.com/contentblocking.js?l=easylist",
"generalEasylist-etag": null,
| 3 |
diff --git a/app/controllers/carto/api/data_import_presenter.rb b/app/controllers/carto/api/data_import_presenter.rb @@ -133,13 +133,6 @@ module Carto
display_name || @data_import.id
end
rescue => e
- CartoDB.notify_debug(
- 'Error extracting display name',
- data_import_id: @data_import.id,
- service_item_id: @data_import.service_item_id,
- data_source: @data_import.data_source,
- exception: e.inspect
- )
@data_import.id
end
| 2 |
diff --git a/js/webcomponents/bisweb_grapherelement.js b/js/webcomponents/bisweb_grapherelement.js @@ -613,7 +613,7 @@ class GrapherModule extends HTMLElement {
}
//if there's a valid task region paint it in the image, otherwise ignore it
- if (taskIndex) {
+ if (taskIndex !== null) {
let keys = Object.keys(tasks.rawTasks.runs[taskLabel]), index = 1;
for (let key of keys) {
let task = tasks.formattedTasks[taskIndex].regions[key];
| 1 |
diff --git a/BUILDING.md b/BUILDING.md @@ -42,32 +42,57 @@ browserify index.js > bundle.js
## Angular CLI
-Currently Angular CLI uses Webpack under the hood to bundle and build your Angular application.
-Sadly it doesn't allow you to override its Webpack config in order to add the plugin mentioned in the [Webpack](#webpack) section.
-Without this plugin your build will fail when it tries to build glslify for WebGL plots.
+Since Angular uses webpack under the hood and doesn't allow easily to change it's webpack configuration. There is some work needed using a custom-webpack builder to get things going.
-Currently 2 solutions exists to circumvent this issue:
+1. Install [`@angular-builders/custom-webpack`](https://www.npmjs.com/package/@angular-builders/custom-webpack) and [[email protected]+](https://github.com/hughsk/ify-loader)
+2. Create a new `extra-webpack.config.js` beside `angular.json`.
-1) If you need to use WebGL plots, you can create a Webpack config from your Angular CLI project with [ng eject](https://github.com/angular/angular-cli/wiki/eject). This will allow you to follow the instructions regarding Webpack.
-2) If you don't need to use WebGL plots, you can make a custom build containing only the required modules for your plots. The clean way to do it with Angular CLI is not the method described in the [Modules](https://github.com/plotly/plotly.js/blob/master/README.md#modules) section of the README but the following:
-
-```typescript
-// in the Component you want to create a graph
-import * as Plotly from 'plotly.js';
+> extra-webpack.config.json
+```javascript
+module.exports = {
+ module: {
+ rules: [
+ {
+ test: /\.js$/,
+ loader: 'ify-loader'
+ }
+ ]
+ },
+};
```
+3. Change the builder in `angular.json` to `"@angular-builders/custom-webpack:browser` and configure it correctly to use our new webpack config.
+
+> angular.json
```json
-// in src/tsconfig.app.json
-// List here the modules you want to import
-// this example is for scatter plots
{
- "compilerOptions": {
- "paths": {
- "plotly.js": [
- "../node_modules/plotly.js/lib/core.js",
- "../node_modules/plotly.js/lib/scatter.js"
- ]
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "version": 1,
+ "newProjectRoot": "projects",
+ "projects": {
+ "MY_PROJECT_NAME": {
+ "root": "",
+ "sourceRoot": "src",
+ "projectType": "application",
+ "prefix": "app",
+ "schematics": {
+ "@schematics/angular:component": {
+ "styleext": "scss"
+ }
+ },
+ "architect": {
+ "build": {
+ "builder": "@angular-builders/custom-webpack:browser",
+ "options": {
+ ....
+ "customWebpackConfig": {
+ "path": "./extra-webpack.config.js",
+ "replaceDuplicatePlugins": true,
+ "mergeStrategies": {"module.rules": "merge"}
}
}
}
+...
```
+It's important to set `projects.x.architect.build.builder` and `projects.x.architect.build.options.customWebpackConfig`.
+If you have more projects in your `angular.json` make sure to adjust their settings accordingly.
| 0 |
diff --git a/gears/carto_gears_api/test/dummy/app/assets/javascripts/application.js b/gears/carto_gears_api/test/dummy/app/assets/javascripts/application.js -// This is a manifest file that'll be compiled into application.js, which will include all the files
-// listed below.
-//
-// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
-// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
-//
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
-// the compiled file.
-//
-// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
-// GO AFTER THE REQUIRES BELOW.
-//
-//= require jquery
-//= require jquery_ujs
-//= require_tree .
| 2 |
diff --git a/src/core/mapbox/FeatureFilter.js b/src/core/mapbox/FeatureFilter.js +import { extend } from '../util';
+
/*eslint-disable no-var*/
/*!
Feature Filter by
@@ -125,19 +127,15 @@ export function compileStyle(styles) {
}
const compiled = [];
for (let i = 0; i < styles.length; i++) {
+ let filter;
if (styles[i]['filter'] === true) {
- compiled.push({
- filter: function () {
- return true;
- },
- symbol: styles[i].symbol
- });
+ filter = function () { return true; };
} else {
- compiled.push({
- filter: createFilter(styles[i]['filter']),
- symbol: styles[i].symbol
- });
+ filter = createFilter(styles[i]['filter']);
}
+ compiled.push(extend({}, styles[i], {
+ filter : filter
+ }));
}
return compiled;
}
| 3 |
diff --git a/src/reducers/json.js b/src/reducers/json.js @@ -15,6 +15,8 @@ import postMethods from './posts'
import relationshipMethods from './relationships'
import v3Reducer from './v3_reducer'
+const { OrderedSet } = Immutable;
+
// adding methods and accessing them from this object
// allows the unit tests to stub methods in this module
const methods = {}
@@ -62,7 +64,9 @@ methods.appendPageId = (state, pageName, mappingType, id) => {
if (page) {
const ids = page.get('ids', Immutable.List())
if (!ids.includes(`${id}`)) {
- return state.setIn([MAPPING_TYPES.PAGES, pageName, 'ids'], ids.unshift(`${id}`))
+ const newIds = OrderedSet.isOrderedSet(ids) ? OrderedSet([`${id}`]).merge(ids) :
+ ids.unshift(`${id}`)
+ return state.setIn([MAPPING_TYPES.PAGES, pageName, 'ids'], newIds)
}
}
return state.setIn([MAPPING_TYPES.PAGES, pageName], Immutable.fromJS({
@@ -72,7 +76,9 @@ methods.appendPageId = (state, pageName, mappingType, id) => {
methods.removePageId = (state, pageName, id) => {
let existingIds = state.getIn([MAPPING_TYPES.PAGES, pageName, 'ids'])
- if (existingIds) {
+ if (existingIds && OrderedSet.isOrderedSet(existingIds)) {
+ return state.setIn([MAPPING_TYPES.PAGES, pageName, 'ids'], existingIds.delete(`${id}`))
+ } else if (existingIds) {
const index = existingIds.indexOf(`${id}`)
if (index !== -1) {
existingIds = existingIds.splice(index, 1)
| 9 |
diff --git a/token-metadata/0x239B0Fa917d85c21cf6435464C2c6aa3D45f6720/metadata.json b/token-metadata/0x239B0Fa917d85c21cf6435464C2c6aa3D45f6720/metadata.json "symbol": "ETH3L",
"address": "0x239B0Fa917d85c21cf6435464C2c6aa3D45f6720",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/token-metadata/0xCC4304A31d09258b0029eA7FE63d032f52e44EFe/metadata.json b/token-metadata/0xCC4304A31d09258b0029eA7FE63d032f52e44EFe/metadata.json "symbol": "SWAP",
"address": "0xCC4304A31d09258b0029eA7FE63d032f52e44EFe",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/guide/english/cplusplus/while-loop/index.md b/guide/english/cplusplus/while-loop/index.md @@ -5,9 +5,11 @@ title: While-loop
A while loop statement repeatedly executes a target statement as long as a given condition is true.
Syntax:
+```C++
while(condition) {
statement(s);
}
+```
A key point of the while loop is that the loop might not ever run.
When the condition is tested and the result is false, the loop body will be skipped and the first statement after the while loop will be executed.
@@ -50,4 +52,4 @@ value of a: 19
### Sources
-www.tutorialspoint.com
+- www.tutorialspoint.com
| 7 |
diff --git a/source/transfers/contracts/TransferHandlerRegistry.sol b/source/transfers/contracts/TransferHandlerRegistry.sol @@ -14,7 +14,7 @@ contract TransferHandlerRegistry {
);
// Mapping of bytes4 to contract interface type
- mapping (bytes4 => ITransferHandler) private _transferHandlerMapping;
+ mapping (bytes4 => ITransferHandler) public transferHandlers;
/**
* @notice Adds handler to mapping
@@ -23,8 +23,8 @@ contract TransferHandlerRegistry {
*/
function addTransferHandler(bytes4 kind, ITransferHandler transferHandler)
external {
- require(address(_transferHandlerMapping[kind]) == address(0), "HANDLER_EXISTS_FOR_KIND");
- _transferHandlerMapping[kind] = transferHandler;
+ require(address(transferHandlers[kind]) == address(0), "HANDLER_EXISTS_FOR_KIND");
+ transferHandlers[kind] = transferHandler;
emit AddTransferHandler(kind, address(transferHandler));
}
@@ -36,6 +36,6 @@ contract TransferHandlerRegistry {
*/
function getTransferHandler(bytes4 kind) external
view returns (ITransferHandler) {
- return _transferHandlerMapping[kind];
+ return transferHandlers[kind];
}
}
\ No newline at end of file
| 10 |
diff --git a/components/bases-locales/bases-adresse-locales/dataset/header.js b/components/bases-locales/bases-adresse-locales/dataset/header.js @@ -36,7 +36,7 @@ class Header extends React.Component {
</Info>
)}
</div>
- {logo && <Image width={240} height={140} src={logo} alt={`${name}-logo`} />}
+ {logo && <Image objectFit='contain' width={240} height={140} src={logo} alt={`${name}-logo`} />}
<style jsx>{`
.head {
| 0 |
diff --git a/examples/particles/js/game.js b/examples/particles/js/game.js @@ -4,7 +4,7 @@ var game = {
// Run on page load.
onload: function () {
// init the video
- if (!me.video.init(800, 600, {wrapper : "screen", scale : me.device.devicePixelRatio})) {
+ if (!me.video.init(800, 600, {wrapper : "screen", scale : me.device.devicePixelRatio, renderer : me.video.CANVAS})) {
alert("Your browser does not support HTML5 canvas.");
return;
}
| 1 |
diff --git a/src/kiri-mode/cam/client.js b/src/kiri-mode/cam/client.js @@ -392,6 +392,7 @@ CAM.init = function(kiri, api) {
}, 250);
}
function onDown(ev) {
+ let mobile = ev.touches;
func.surfaceDone();
func.traceDone();
let target = ev.target, clist = target.classList;
@@ -435,8 +436,12 @@ CAM.init = function(kiri, api) {
}
API.conf.save();
func.opRender();
+ if (mobile) {
+ el.ontouchmove = onDown;
+ el.ontouchend = undefined;
+ }
};
- tracker.onmousemove = (ev) => {
+ function onMove(ev) {
ev.stopPropagation();
ev.preventDefault();
if (ev.buttons === 0) {
@@ -447,13 +452,19 @@ CAM.init = function(kiri, api) {
let rect = el.getBoundingClientRect();
let left = rect.left;
let right = rect.left + rect.width;
- if (ev.pageX >= left && ev.pageX <= right) {
+ let tar = mobile ? ev.touches[0] : ev;
+ if (tar.pageX >= left && tar.pageX <= right) {
let mid = (left + right) / 2;
try { listel.removeChild(target); } catch (e) { }
- el.insertAdjacentElement(ev.pageX < mid ? "beforebegin" : "afterend", target);
+ el.insertAdjacentElement(tar.pageX < mid ? "beforebegin" : "afterend", target);
}
}
- };
+ }
+ tracker.onmousemove = onMove;
+ if (mobile) {
+ el.ontouchmove = onMove;
+ el.ontouchend = cancel;
+ }
}
if (moto.space.info.mob) {
el.ontouchstart = (ev) => {
@@ -463,12 +474,7 @@ CAM.init = function(kiri, api) {
onEnter(ev);
}
};
- // el.ontouchmove = (ev) => {
- // console.log('touch.move');
- // };
- // el.ontouchend = (ev) => {
- // console.log('touch.end');
- // };
+ el.ontouchmove = onDown;
} else {
el.onmousedown = onDown;
el.onmouseenter = onEnter;
| 11 |
diff --git a/src/views/Wallet/WalletNFTs.vue b/src/views/Wallet/WalletNFTs.vue >Check out Stratos</a
>
</div>
+ <div class="d-flex justify-content-center">
+ <a
+ class="text-primary font-weight-bold"
+ href="https://blog.liquality.io/nfts-are-here-manage-your-collections-from-multiple-chains-on-your-liquality-wallet/"
+ target="_blank"
+ rel="noopener noreferrer"
+ >Learn how it works</a
+ >
+ </div>
</div>
</div>
</template>
| 3 |
diff --git a/articles/support/matrix.md b/articles/support/matrix.md @@ -88,7 +88,7 @@ The following matrix lists the level of support Auth0 will provide with regards
<td>***</td>
</tr>
<tr>
- <td>Microsoft Internet Explorer 10</td>
+ <td>Microsoft Internet Explorer 11</td>
<td>**</td>
</tr>
<tr>
| 0 |
diff --git a/instancing.js b/instancing.js @@ -781,7 +781,8 @@ export class InstancedGeometryAllocator {
texture.name = name;
texture.minFilter = THREE.NearestFilter;
texture.magFilter = THREE.NearestFilter;
- // texture.needsUpdate = true;
+ // texture.flipY = true;
+ texture.needsUpdate = true;
texture.itemSize = itemSize;
return texture;
});
| 0 |
diff --git a/examples/project_website/base.html b/examples/project_website/base.html //file: "./data/calcium.json",
file: "./data/production.json",
//file: "./data/digital-education-sg.json",
+ // other attributes:
+ is_streamgraph: false, // set true for streamgraph data
+ show_area: true, // set false for streamgraph data
}]
- data_config.is_streamgraph = true;
- data_config.show_area = false;
+ data_config.is_streamgraph = data_config.files[0].is_streamgraph;
+ data_config.show_area = data_config.files[0].show_area;
data_config.server_url = window.location.href.replace(/[^/]*$/, '') + "./headstart/server/";
</script>
</body>
| 1 |
diff --git a/lib/plugins/sustainable/pug/index.pug b/lib/plugins/sustainable/pug/index.pug @@ -29,7 +29,7 @@ table
td #{sustainable.co2PerParty.firstParty.median || Number(sustainable.co2PerParty.firstParty).toFixed(3)} grams
tr
td 1 page view third party
- td #{sustainable.co2PerParty.thirdParty.median || Number(sustainable.co2PerParty.thirdParty).toFixed(3)} grams
+ td #{sustainable.co2PerParty.thirdParty.median === 0 ? 0 : sustainable.co2PerParty.thirdParty.median || Number(sustainable.co2PerParty.thirdParty).toFixed(3)} grams
tr
td 1000 page views total
td #{sustainable.co2PerPageView.median || Number(sustainable.co2PerPageView).toFixed(3)} kg
@@ -38,7 +38,7 @@ table
td #{sustainable.co2PerParty.firstParty.median || Number(sustainable.co2PerParty.firstParty).toFixed(3)} kg
tr
td 1000 page views third party
- td #{sustainable.co2PerParty.thirdParty.median || Number(sustainable.co2PerParty.thirdParty).toFixed(3)} kg
+ td #{sustainable.co2PerParty.thirdParty.median === 0 ? 0 : sustainable.co2PerParty.thirdParty.median || Number(sustainable.co2PerParty.thirdParty).toFixed(3)} kg
if (options.sustainable && options.sustainable.pageViews)
tr
td #{options.sustainable.pageViews} page views
| 9 |
diff --git a/approved.yaml b/approved.yaml @@ -773,3 +773,15 @@ shadowrun5thedition:
combatmaster:
- "CombatMaster"
- "Utility"
+
+deltagreen:
+ - "Delta Green"
+ - "System Toolbox"
+
+wildshaperesizer:
+ - "WildShapeResizer"
+ - "Utility"
+
+savageworldsstatuschanger:
+ - "SavageWorldsStatusChanger"
+ - "System Toolbox"
\ No newline at end of file
| 3 |
diff --git a/ui/src/components/editor/editor-caret.js b/ui/src/components/editor/editor-caret.js @@ -234,7 +234,7 @@ export class Caret {
}
else if (cmd === 'viewsource') {
this.vm.isViewingSource = !this.vm.isViewingSource
- this.vm.setContent(this.vm.value)
+ this.vm.__setContent(this.vm.value)
done()
return
}
| 1 |
diff --git a/edit.js b/edit.js @@ -5511,12 +5511,13 @@ pe.domElement.addEventListener('drop', async e => {
const sx = Math.floor(localVector.x/currentChunkMesh.subparcelSize);
const sy = Math.floor(localVector.y/currentChunkMesh.subparcelSize);
const sz = Math.floor(localVector.z/currentChunkMesh.subparcelSize);
- const subparcel = world.getSubparcel(sx, sy, sz);
+ world.editSubparcel(sx, sy, sz, subparcel => {
subparcel.packages.push({
dataHash,
position: localVector.toArray(),
quaternion: localQuaternion.toArray(),
});
+ });
currentChunkMesh.updatePackages();
// const p = await XRPackage.download(dataHash);
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.