code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/source/core/Date.js b/source/core/Date.js @@ -76,7 +76,7 @@ Object.assign( Date, {
});
const pad = function ( num, nopad, character ) {
- return ( nopad || num > 9 ) ? num : ( character || '0' ) + num;
+ return ( nopad || num > 9 ? '' : ( character || '0' ) ) + num;
};
const aDay = 86400000; // milliseconds in a day
@@ -350,6 +350,10 @@ Object.assign( Date.prototype, {
H - Hour of the day in 24h clock (00-23).
I - Hour of the day in 12h clock (01-12).
j - Day of the year as a decimal number (001-366).
+ k - Hour of the day in 12h clock (0-23), padded with a space if single
+ digit.
+ l - Hour of the day in 12h clock (1-12), padded with a space if single
+ digit.
m - Month of the year (01-12).
M - Minute of the hour (00-59).
n - Newline character.
@@ -376,6 +380,7 @@ Object.assign( Date.prototype, {
X - The locale's appropriate time representation.
y - Year without century (00-99).
Y - Year with century (0-9999)
+ z - Timezone offset
Z - Timezone name or abbreviation.
% - A '%' character.
@@ -391,7 +396,7 @@ Object.assign( Date.prototype, {
return format ?
format.replace(/%(-)?([%A-Za-z])/g,
function ( string, nopad, character ) {
- let num, str;
+ let num, str, offset, sign, hoursOffset, minutesOffset;
switch ( character ) {
case 'a':
// Abbreviated day of the week, e.g. 'Mon'.
@@ -435,11 +440,25 @@ Object.assign( Date.prototype, {
case 'I':
// Hour of the day in 12h clock (01-12).
num = utc ? date.getUTCHours() : date.getHours();
- return num ? pad( num < 13 ? num : num - 12, nopad ) : 12;
+ return num ? pad( num < 13 ? num : num - 12, nopad ) : '12';
case 'j':
// Day of the year as a decimal number (001-366).
num = date.getDayOfYear( utc );
- return nopad ? num : num < 100 ? '0' + pad( num ) : pad( num );
+ return nopad ?
+ num + '' :
+ num < 100 ? '0' + pad( num ) : pad( num );
+ case 'k':
+ // Hour of the day in 12h clock (0-23), padded with a space if
+ // single digit.
+ return pad(
+ utc ? date.getUTCHours() : date.getHours(), nopad, ' ' );
+ case 'l':
+ // Hour of the day in 12h clock (1-12), padded with a space if
+ // single digit.
+ num = utc ? date.getUTCHours() : date.getHours();
+ return num ?
+ pad( num < 13 ? num : num - 12, nopad, ' ' ) :
+ '12';
case 'm':
// Month of the year (01-12).
return pad(
@@ -513,6 +532,16 @@ Object.assign( Date.prototype, {
case 'Y':
// Year with century (0-9999).
return utc ? date.getUTCFullYear() : date.getFullYear();
+ case 'z':
+ // Timezone offset
+ offset = date.getTimezoneOffset();
+ sign = ( offset > 0 ? '-' : '+' );
+ offset = Math.abs( offset );
+ hoursOffset = ~~( offset / 60 );
+ minutesOffset = offset - ( 60 * hoursOffset );
+ return sign +
+ '%\'02n'.format( hoursOffset ) +
+ ':%\'02n'.format( minutesOffset );
case 'Z':
// Timezone name or abbreviation.
return ( /\((.*)\)/.exec( date.toString() ) || [ '' ] ).pop();
| 0 |
diff --git a/app/src/components/MeetingViews/Filmstrip.js b/app/src/components/MeetingViews/Filmstrip.js @@ -123,6 +123,9 @@ class Filmstrip extends React.PureComponent
const root = this.rootContainer.current;
+ if (!root)
+ return;
+
const availableWidth = root.clientWidth;
// Grid is:
// 4/5 speaker
| 1 |
diff --git a/core/rendered_type_expr.js b/core/rendered_type_expr.js @@ -186,33 +186,6 @@ Blockly.RenderedTypeExpr.shape['typeVar'] = {
}
};
-/**
- * @static
- * @return {Blockly.RenderedTypeExpr}
- */
-Blockly.RenderedTypeExpr.generateTypeVar = function() {
- var name = Blockly.TypeExpr.generateTypeVarName_();
- return new Blockly.RenderedTypeExpr.TVAR(name, null);
-}
-
-/**
- * Creates type instances representing function.
- * @param {!Array.<!Blockly.RenderedTypeExpr>} types List of types in order to
- * be nested inside the function type.
- * @return {!Blockly.RenderedTypeExpr.FUN} The created function type.
- */
-Blockly.RenderedTypeExpr.createFunType = function(types) {
- goog.asserts.assert(2 <= types.length);
- var returnType = types[types.length - 1];
- var second = types[types.length - 2];
- var result = new Blockly.RenderedTypeExpr.FUN(second, returnType);
- for (var i = types.length - 3; 0 <= i; i--) {
- var type = types[i];
- result = new Blockly.RenderedTypeExpr.FUN(type, result);
- }
- return result;
-};
-
/**
* Create a list of record to present highlights for the type expression.
* @return {Array<{color: string, path: string}>}
| 2 |
diff --git a/_data/conferences.yml b/_data/conferences.yml year: 2022
id: sigir22
link: https://sigir.org/sigir2022/
- deadline: '2022-01-31 23:59:00'
+ deadline: '2022-01-28 23:59:00'
timezone: UTC-12
date: July 11-15, 2022
place: Madrid, Spain
- abstract_deadline: '2022-01-24 23:59:00'
- note: '<b>NOTE</b>: Mandatory abstract deadline on January 24, 2022. More info <a href=''https://sigir.org/sigir2022/call-for-papers/''>here</a>.'
+ abstract_deadline: '2022-01-21 23:59:00'
+ note: '<b>NOTE</b>: Mandatory abstract deadline on January 21, 2022. More info <a href=''https://sigir.org/sigir2022/call-for-papers/''>here</a>.'
sub: DM
- title: MIDL
| 3 |
diff --git a/assets/js/components/surveys/SurveyQuestionSingleSelectChoice.js b/assets/js/components/surveys/SurveyQuestionSingleSelectChoice.js @@ -50,7 +50,7 @@ const SurveyQuestionSingleSelectChoice = ( {
return (
<div className="googlesitekit-single-select__choice">
<Radio
- id={ text }
+ id={ text.replace( / /g, '-' ) }
value={ answer_ordinal } // eslint-disable-line camelcase
checked={ isChecked }
name={ text }
| 14 |
diff --git a/semantics.json b/semantics.json "type": "video",
"label": "Video files",
"importance": "high",
- "description": "Select the video files you wish to use in your interactive video. To ensure maximum support in browsers at least add a version of the video in webm and mp4 formats."
+ "description": "Select the video files you wish to use in your interactive video. To ensure maximum support in browsers at least add a version of the video in webm and mp4 formats.",
+ "extraAttributes": ["metadata"]
},
{
"name": "startScreenOptions",
| 0 |
diff --git a/edit.js b/edit.js @@ -750,6 +750,9 @@ shieldSlider.addEventListener('change', async e => {
}
}
});
+const scaleSlider = document.getElementById('scale-slider');
+scaleSlider.addEventListener('change', async e => {
+});
document.getElementById('toggle-stage-button').addEventListener('click', e => {
floorMesh.visible = !floorMesh.visible;
});
| 0 |
diff --git a/package.json b/package.json {
"name": "spearmint",
- "version": "0.5.0",
+ "version": "0.6.0",
"description": "An open-source developer tool that simplifies testing and hopes to help increase awareness about web accessibility.",
"author": "spearmintjs",
"build": {
| 3 |
diff --git a/examples/react-native-expo/App.js b/examples/react-native-expo/App.js @@ -3,7 +3,7 @@ import React from 'react'
import {
Text,
View,
- Button,
+ AsyncStorage,
// TouchableOpacity,
TouchableHighlight
// Image,
@@ -13,6 +13,34 @@ import Uppy from '@uppy/core'
import Tus from '@uppy/tus'
import UppyFilePicker from './react-native/file-picker'
+function hashCode (str) {
+ var hash = 0
+ if (str.length === 0) {
+ return hash
+ }
+ for (var i = 0; i < str.length; i++) {
+ var char = str.charCodeAt(i)
+ hash = ((hash << 5) - hash) + char
+ hash = hash & hash // Convert to 32bit integer
+ }
+ return hash
+}
+
+function customFingerprint (file, options) {
+ console.log('_____________________')
+ console.log('FILE:')
+ console.log(file)
+ console.log('_____________________')
+ let exifHash = 'noexif'
+ if (file.exif) {
+ exifHash = hashCode(JSON.stringify(file.exif))
+ }
+ console.log(exifHash)
+ const fingerprint = ['tus', file.name || 'noname', file.size || 'nosize', exifHash].join('/')
+ console.log(fingerprint)
+ return fingerprint
+}
+
export default class App extends React.Component {
constructor () {
super()
@@ -40,7 +68,11 @@ export default class App extends React.Component {
console.log('Is this React Native?', this.isReactNative)
this.uppy = Uppy({ autoProceed: true, debug: true })
- this.uppy.use(Tus, { endpoint: 'https://master.tus.io/files/' })
+ this.uppy.use(Tus, {
+ endpoint: 'https://master.tus.io/files/',
+ urlStorage: AsyncStorage,
+ fingerprint: customFingerprint
+ })
this.uppy.on('upload-progress', (file, progress) => {
this.setState({
progress: progress.bytesUploaded,
@@ -58,8 +90,8 @@ export default class App extends React.Component {
uploadComplete: true,
uploadStarted: false
})
- console.log('Upload complete:')
- console.log(result)
+ // console.log('Upload complete:')
+ // console.log(result)
})
}
@@ -186,23 +218,57 @@ function PauseResumeButton (props) {
return null
}
+ // return (
+ // <Button
+ // onPress={props.onPress}
+ // color="#bb00cc"
+ // title={props.isPaused ? 'Resume' : 'Pause'}
+ // accessibilityLabel={props.isPaused ? 'Resume' : 'Pause'}
+ // />
+ // )
+
return (
- <Button
+ <TouchableHighlight
onPress={props.onPress}
- color="#bb00cc"
- title={props.isPaused ? 'Resume' : 'Pause'}
- accessibilityLabel={props.isPaused ? 'Resume' : 'Pause'}
- />
+ style={{
+ backgroundColor: '#006bb7',
+ padding: 10
+ }}>
+ <Text
+ style={{
+ color: '#fff',
+ textAlign: 'center',
+ fontSize: 17
+ }}>{props.isPaused ? 'Resume' : 'Pause'}</Text>
+ </TouchableHighlight>
)
}
-function SelectAndUploadFileWithUppy (props) {
+function SelectFiles (props) {
return (
- <View style={{
- flex: 1,
- paddingVertical: 100
+ <TouchableHighlight
+ onPress={props.showFilePicker}
+ style={{
+ backgroundColor: '#006bb7',
+ padding: 15
}}>
- <Text>Uppy running in React Native</Text>
+ <Text
+ style={{
+ color: '#fff',
+ textAlign: 'center',
+ fontSize: 17
+ }}>Select files</Text>
+ </TouchableHighlight>
+ )
+}
+
+function SelectAndUploadFileWithUppy (props) {
+ return (
+ <View>
+ <Text style={{
+ fontSize: 25,
+ marginBottom: 20
+ }}>Uppy in React Native</Text>
{/* <TouchableOpacity onPress={props.selectPhotoTapped}>
{ props.state.file === null
? <Text>Select a Photo</Text>
@@ -220,8 +286,7 @@ function SelectAndUploadFileWithUppy (props) {
/>
}
</TouchableOpacity> */}
- <Text>Status: {props.state.status}</Text>
- <Text>{props.state.progress} of {props.state.total}</Text>
+ <SelectFiles showFilePicker={props.showFilePicker} />
<ProgressBar
progress={props.state.progress}
total={props.state.total}
@@ -231,10 +296,8 @@ function SelectAndUploadFileWithUppy (props) {
onPress={props.togglePauseResume}
uploadStarted={props.state.uploadStarted}
uploadComplete={props.state.uploadComplete} />
- <TouchableHighlight
- onPress={props.showFilePicker}>
- <Text>Select files from Uppy</Text>
- </TouchableHighlight>
+ <Text>{props.state.status ? 'Status: ' + props.state.status : null}</Text>
+ <Text>{props.state.progress} of {props.state.total}</Text>
</View>
)
}
| 0 |
diff --git a/css/base.css b/css/base.css padding: 0;
box-sizing: border-box;
font-size: 16px;
- font-family: '.SFNSText-Regular', 'Helvetica Neue', 'Arial', sans-serif;
+ font-family: '.SFNSText-Regular', 'BlinkMacSystemFont', 'Helvetica Neue', 'Segoe UI', 'Arial', sans-serif;
}
[hidden] {
display: none !important;
| 7 |
diff --git a/articles/libraries/lock/v9/customization.md b/articles/libraries/lock/v9/customization.md @@ -3,9 +3,10 @@ section: libraries
description: How to configure user options with Lock V9
---
+# Lock: User configurable options
+
<%= include('../_includes/_lock-version-9') %>
-## Lock: User configurable options
The **Auth0Lock** can be customized through the `options` parameter sent to the `.show()` methods.
```js
| 0 |
diff --git a/next.config.js b/next.config.js @@ -35,4 +35,9 @@ module.exports = {
FB_AUTH_PROVIDER_X509_CERT_URL: process.env.FB_AUTH_PROVIDER_X509_CERT_URL,
FB_CLIENT_X509_CERT_URL: process.env.FB_CLIENT_X509_CERT_URL,
},
+ eslint: {
+ // Warning: Dangerously allow production builds to successfully complete even if
+ // your project has ESLint errors.
+ ignoreDuringBuilds: true,
+ },
}
| 8 |
diff --git a/App.js b/App.js @@ -35,6 +35,13 @@ import store, { observeStore } from "./src/redux/store"
const Routes = require('./src/page')
const AppUser = require('./src/AppUser')
+import { YellowBox } from 'react-native';
+
+YellowBox.ignoreWarnings([
+ 'Warning: isMounted(...) is deprecated in plain JavaScript React classes.',
+ 'Module RCTImageLoader requires main queue setup'
+]);
+
let Router
| 8 |
diff --git a/runtime.js b/runtime.js @@ -913,8 +913,13 @@ const _loadScript = async (file, {files = null, parentUrl = null, contentId = nu
console.log('hit', mesh);
};
+ const jitterObject = new THREE.Object3D();
+ mesh.add(jitterObject);
+ const appObject = new THREE.Object3D()
+ jitterObject.add(appObject);
+
const app = appManager.createApp(appId);
- app.object = mesh;
+ app.object = appObject;
app.contentId = contentId;
const localImportMap = _clone(importMap);
localImportMap.app = _makeAppUrl(appId);
| 0 |
diff --git a/src/govuk/components/accordion/accordion.yaml b/src/govuk/components/accordion/accordion.yaml @@ -22,11 +22,11 @@ params:
params:
- name: heading.text
type: string
- required: false
+ required: true
description: The title of each section. If `heading.html` is supplied, this is ignored. This is used both as the title for each section, and as the button to open or close each section.
- name: heading.html
type: string
- required: false
+ required: true
description: The HTML content of the header for each section which is used both as the title for each section, and as the button to open or close each section.
- name: summary.text
type: string
| 12 |
diff --git a/token-metadata/0xB3e2Cb7CccfE139f8FF84013823Bf22dA6B6390A/metadata.json b/token-metadata/0xB3e2Cb7CccfE139f8FF84013823Bf22dA6B6390A/metadata.json "symbol": "ICNQ",
"address": "0xB3e2Cb7CccfE139f8FF84013823Bf22dA6B6390A",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/accessibility-checker-engine/src/v4/rules/aria_semantics.ts b/accessibility-checker-engine/src/v4/rules/aria_semantics.ts @@ -140,7 +140,7 @@ export let aria_attribute_allowed: Rule = {
"level": eRulePolicy.VIOLATION,
"toolkitLevel": eToolkitLevel.LEVEL_ONE
}],
- act: "5c01ea",
+ act: ["5c01ea", { "46ca7f": { "Pass": "pass", "Fail_invalid_role_attr": "fail"}}],
run: (context: RuleContext, options?: {}, contextHierarchies?: RuleContextHierarchy): RuleResult | RuleResult[] => {
const ruleContext = context["dom"].node as Element;
| 3 |
diff --git a/module/actor/actor.js b/module/actor/actor.js @@ -107,6 +107,7 @@ export class GurpsActor extends Actor {
// Oh how I wish we had a typesafe model!
// I hate treating everything as "maybe its a number, maybe its a string...?!"
let sizemod = this.getGurpsActorData().traits.sizemod.toString()
+ if (sizemod.match(/^\d/g)) sizemod = `+${sizemod}`
if (sizemod !== '0' && sizemod !== '+0') {
this.getGurpsActorData().conditions.target.modifiers.push(
i18n_f('GURPS.modifiersSize', { sm: sizemod }, '{sm} for Size Modifier')
| 1 |
diff --git a/src/helpers/analytics/raven.js b/src/helpers/analytics/raven.js // @flow
import Raven from 'raven-js';
-if (process.env.NODE_ENV === 'production' && process.env.SENTRY_DSN_CLIENT) {
+if (
+ process.env.NODE_ENV === 'production' &&
+ process.env.SENTRY_DSN_CLIENT &&
+ process.env.SENTRY_DSN_CLIENT !== 'undefined'
+) {
Raven.config(process.env.SENTRY_DSN_CLIENT, {
whitelistUrls: [/spectrum\.chat/, /www\.spectrum\.chat/],
environment: process.env.NODE_ENV,
| 9 |
diff --git a/packages/@uppy/core/src/index.js b/packages/@uppy/core/src/index.js @@ -953,6 +953,14 @@ class Uppy {
this.cancelAll()
}
+ logout () {
+ this.iteratePlugins(plugin => {
+ if (plugin.provider && plugin.provider.logout) {
+ plugin.provider.logout()
+ }
+ })
+ }
+
_calculateProgress (file, data) {
if (!this.getFile(file.id)) {
this.log(`Not setting progress for a file that has been removed: ${file.id}`)
| 0 |
diff --git a/README.md b/README.md @@ -97,9 +97,9 @@ For customer support, you can also [contact](https://mymonero.com/support) us di
# Contributing & Testing
-## Setting up Your Repository
+## Getting the Source Code
-### General
+### Download & Install
1. Clone or otherwise download this repository. Then, in your terminal, `cd` into the repo directory.
| 1 |
diff --git a/CommentFlagsHelper.user.js b/CommentFlagsHelper.user.js // @description Always expand comments (with deleted) and highlight expanded flagged comments, Highlight common chatty and rude keywords
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 4.4.1
+// @version 4.4.2
//
// @include https://*stackoverflow.com/admin/dashboard*
// @include https://*serverfault.com/admin/dashboard*
@@ -580,9 +580,10 @@ table.comments tr.roa-comment > td {
.js-mod-history-container {
position: relative;
display: block !important;
- height: 150px;
+ max-height: 150px;
+ margin: 10px 8px 15px !important;
overflow-y: auto;
- background: white;
+ background: #fafafa;
z-index: 1;
}
.js-mod-history-container:after {
@@ -686,13 +687,6 @@ table.flagged-posts tr.js-flagged-post:first-child > td {
position: relative;
z-index: 1;
}
-.js-mod-history-container {
- margin: 10px 8px 15px !important;
- background: #f6f6f6;
-}
-.js-mod-history {
- padding: 5px 12px;
-}
.visited-post {
opacity: 0.7;
}
| 2 |
diff --git a/Source/Core/loadKTX.js b/Source/Core/loadKTX.js /*global define*/
define([
+ './Check',
'../ThirdParty/when',
'./CompressedTextureBuffer',
'./defined',
- './DeveloperError',
'./loadArrayBuffer',
'./PixelFormat',
'./RuntimeError'
], function(
+ Check,
when,
CompressedTextureBuffer,
defined,
- DeveloperError,
loadArrayBuffer,
PixelFormat,
RuntimeError) {
@@ -72,9 +72,7 @@ define([
*/
function loadKTX(urlOrBuffer, headers, request) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(urlOrBuffer)) {
- throw new DeveloperError('urlOrBuffer is required.');
- }
+ Check.defined('urlOrBuffer', urlOrBuffer);
//>>includeEnd('debug');
var loadPromise;
| 3 |
diff --git a/cloud-config/run-scripts/app-final.sh b/cloud-config/run-scripts/app-final.sh @@ -28,15 +28,3 @@ sudo echo "127.0.0.0 $PUBLIC_DNS_NAME" | sudo tee --append /etc/hosts
sudo mv /etc/mailname /etc/mailname.OLD
sudo echo "$PUBLIC_DNS_NAME" | sudo tee --append /etc/mailname
sudo service postfix restart
-
-# Add team ssh public keys from s3
-auth_keys_file='/home/ubuntu/.ssh/authorized_keys'
-auth_keys_file2='/home/ubuntu/.ssh/authorized_keys2'
-mv "$auth_keys_file" "$auth_keys_file2"
-aws s3 cp --region=us-west-2 $ENCD_S3_AUTH_KEYS "$auth_keys_file"
-if [ ! -f "$auth_keys_file" ] || [ ! -f "$auth_keys_file2" ]; then
- echo -e "\n\t$ENCD_INSTALL_TAG $(basename $0) ENCD FAILED: ssh auth keys"
- # Build has failed
- touch "$encd_failed_flag"
- exit 1
-fi
| 2 |
diff --git a/lib/assets/core/javascripts/cartodb3/components/img-loader-view.js b/lib/assets/core/javascripts/cartodb3/components/img-loader-view.js var $ = require('jquery');
var CoreView = require('backbone/core-view');
var utils = require('../helpers/utils');
+var _ = require('underscore');
var IMAGE_FILE_ATTRS = {
width: '18px',
height: '18px'
};
+var VIEWBOX = _.template('0 0 <%- w %> <%- h %>');
module.exports = CoreView.extend({
initialize: function (opts) {
if (!opts.imageClass) { throw new Error('Image class is mandatory.'); }
@@ -32,6 +34,22 @@ module.exports = CoreView.extend({
$svg = $svg.removeAttr('xmlns:a');
$svg.attr('class', self._imageClass + ' js-image');
+ var bbox = {
+ w: 18,
+ h: 18
+ };
+
+ if (!$svg.attr('viewBox')) {
+ if ($svg.attr('height') && $svg.attr('width')) {
+ bbox = {
+ w: svg.width.baseVal.value,
+ h: svg.height.baseVal.value
+ };
+ }
+
+ $svg.attr('viewBox', VIEWBOX(bbox));
+ }
+
for (var attribute in IMAGE_FILE_ATTRS) {
$svg.attr(attribute, IMAGE_FILE_ATTRS[attribute]);
}
@@ -39,6 +57,7 @@ module.exports = CoreView.extend({
self.$el.empty().append($svg);
$svg.css('fill', self._color);
+ $svg.find('g').css('fill', 'inherit');
$svg.find('path').css('fill', 'inherit');
});
} else {
| 12 |
diff --git a/test/unit/environment.test.js b/test/unit/environment.test.js @@ -13,15 +13,13 @@ require('tap').mochaGlobals()
// environment when testing.
delete process.env.NODE_ENV
-const a = require('async')
const path = require('path')
-const fs = require('fs')
+const fs = require('fs/promises')
const spawn = require('child_process').spawn
const chai = require('chai')
const expect = chai.expect
const should = chai.should()
const environment = require('../../lib/environment')
-const rimraf = require('rimraf')
function find(settings, name) {
const items = settings.filter(function (candidate) {
@@ -259,12 +257,44 @@ describe('the environment scraper', function () {
describe('with symlinks', function () {
const nmod = path.resolve(__dirname, '../helpers/node_modules')
+ const makeDir = async (dirp, mkdirDb) => {
+ const code = await fs
+ .mkdir(dirp)
+ .then(() => null)
+ .catch((err) => {
+ if (err.code !== 'EEXIST') {
+ return err
+ }
+ return null
+ })
+ // vestigial--mkdirDb is the async callback, invisibly appended to arguments when apply is used
+ if (mkdirDb) {
+ return mkdirDb(code)
+ }
+ return code
+ }
+ const makePackage = async (pkg, dep) => {
+ const dir = path.join(nmod, pkg)
- beforeEach(function (done) {
- if (!fs.existsSync(nmod)) {
- fs.mkdirSync(nmod)
+ // Make the directory tree.
+ await makeDir(dir) // make the directory
+ await makeDir(path.join(dir, 'node_modules')) // make the modules subdirectory
+
+ // Make the package.json
+ const pkgJSON = { name: pkg, dependencies: {} }
+ pkgJSON.dependencies[dep] = '*'
+ await fs.writeFile(path.join(dir, 'package.json'), JSON.stringify(pkgJSON))
+
+ // Make the dep a symlink.
+ const depModule = path.join(dir, 'node_modules', dep)
+ return fs.symlink(path.join(nmod, dep), depModule, 'dir')
}
+ beforeEach(async function (done) {
+ await fs.access(nmod).catch(async () => {
+ await fs.mkdir(nmod)
+ })
+
// node_modules/
// a/
// package.json
@@ -274,54 +304,25 @@ describe('the environment scraper', function () {
// package.json
// node_modules/
// a (symlink)
- a.parallel([a.apply(makePackage, 'a', 'b'), a.apply(makePackage, 'b', 'a')], done)
+ await makePackage('a', 'b')
+ await makePackage('b', 'a')
+ done()
})
- afterEach(function (done) {
+ afterEach(async function (done) {
const aDir = path.join(nmod, 'a')
const bDir = path.join(nmod, 'b')
- a.each([aDir, bDir], rimraf, done)
- })
-
- function makePackage(pkg, dep, cb) {
- const dir = path.join(nmod, pkg)
- a.series(
- [
- // Make the directory tree.
- a.apply(makeDir, dir),
- a.apply(makeDir, path.join(dir, 'node_modules')),
-
- // Make the package.json
- function (pkgCb) {
- const pkgJSON = { name: pkg, dependencies: {} }
- pkgJSON.dependencies[dep] = '*'
- fs.writeFile(path.join(dir, 'package.json'), JSON.stringify(pkgJSON), pkgCb)
- },
-
- // Make the dep a symlink.
- function (symCb) {
- const depModule = path.join(dir, 'node_modules', dep)
- fs.symlink(path.join(nmod, dep), depModule, 'dir', function (err) {
- symCb(err && err.code !== 'EEXIST' ? err : null)
- })
- }
- ],
- cb
- )
-
- function makeDir(dirp, mkdirDb) {
- fs.mkdir(dirp, function (err) {
- mkdirDb(err && err.code !== 'EEXIST' ? err : null)
+ await fs.rm(aDir, { recursive: true, force: true })
+ await fs.rm(bDir, { recursive: true, force: true })
+ done()
})
- }
- }
it('should not crash when encountering a cyclical symlink', function (done) {
execChild(done)
})
- it('should not crash when encountering a dangling symlink', function (done) {
- rimraf.sync(path.join(nmod, 'a'))
+ it('should not crash when encountering a dangling symlink', async function (done) {
+ await fs.rm(path.join(nmod, 'a'), { recursive: true, force: true })
execChild(done)
})
| 14 |
diff --git a/token-metadata/0x46761eE2f1EcEc5B6E82fa8FeE60e388EcE0890d/metadata.json b/token-metadata/0x46761eE2f1EcEc5B6E82fa8FeE60e388EcE0890d/metadata.json "symbol": "EFS",
"address": "0x46761eE2f1EcEc5B6E82fa8FeE60e388EcE0890d",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/components/service-mesh-patterns-Table/table.style.js b/src/components/service-mesh-patterns-Table/table.style.js @@ -5,6 +5,7 @@ export const TableWrapper = styled.div`
table{
border-collapse:collapse;
box-shadow:0px 2px 16px rgba(0,0,0,0.2);
+ width: 75vw;
td{
padding:0.5rem;
| 1 |
diff --git a/tools/pre-swap-checker/contracts/PreSwapChecker.sol b/tools/pre-swap-checker/contracts/PreSwapChecker.sol @@ -23,7 +23,6 @@ contract PreSwapChecker {
bytes4 constant internal ERC721_INTERFACE_ID = 0x80ac58cd;
bytes4 constant internal ERC20_INTERFACE_ID = 0x36372b07;
- bytes4 constant internal CK_INTERFACE_ID = 0x9a20483d;
IWETH public wethContract;
| 2 |
diff --git a/assets/images/workspace-default-avatar.svg b/assets/images/workspace-default-avatar.svg -<svg viewBox="0 0 81 80" xmlns="http://www.w3.org/2000/svg"><rect x=".5" width="80" height="80" rx="40"/><path d="M51.125 24.25h-20.25c-.675 0-1.125.45-1.125 1.125v31.5c0 .675.45 1.125 1.125 1.125h7.2v-7.875c0-.675.45-1.125 1.125-1.125h3.825c.675 0 1.125.45 1.125 1.125V58h7.2c.675 0 1.125-.45 1.125-1.125v-31.5c-.225-.675-.675-1.125-1.35-1.125zm-4.5 20.25h-11.25c-.675 0-1.125-.45-1.125-1.125s.45-1.125 1.125-1.125h11.25c.675 0 1.125.45 1.125 1.125S47.3 44.5 46.625 44.5zm0-6.75h-11.25c-.675 0-1.125-.45-1.125-1.125s.45-1.125 1.125-1.125h11.25c.675 0 1.125.45 1.125 1.125s-.45 1.125-1.125 1.125zm0-6.75h-11.25c-.675 0-1.125-.45-1.125-1.125s.45-1.125 1.125-1.125h11.25c.675 0 1.125.45 1.125 1.125S47.3 31 46.625 31z"/></svg>
+<svg viewBox="0 0 81 80" xmlns="http://www.w3.org/2000/svg"><rect x=".5" width="80" height="80" rx="40"/><path d="M51.125 24.25h-20.25c-.675 0-1.125.45-1.125 1.125v31.5c0 .675.45 1.125 1.125 1.125h7.2v-7.875c0-.675.45-1.125 1.125-1.125h3.825c.675 0 1.125.45 1.125 1.125V58h7.2c.675 0 1.125-.45 1.125-1.125v-31.5c-.225-.675-.675-1.125-1.35-1.125zm-4.5 20.25h-11.25c-.675 0-1.125-.45-1.125-1.125s.45-1.125 1.125-1.125h11.25c.675 0 1.125.45 1.125 1.125S47.3 44.5 46.625 44.5zm0-6.75h-11.25c-.675 0-1.125-.45-1.125-1.125s.45-1.125 1.125-1.125h11.25c.675 0 1.125.45 1.125 1.125s-.45 1.125-1.125 1.125zm0-6.75h-11.25c-.675 0-1.125-.45-1.125-1.125s.45-1.125 1.125-1.125h11.25c.675 0 1.125.45 1.125 1.125S47.3 31 46.625 31z" fill="#fff"/></svg>
| 13 |
diff --git a/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift b/web3swift/KeystoreManager/Classes/EthereumKeystoreV3.swift @@ -65,19 +65,19 @@ public class EthereumKeystoreV3: AbstractKeystore {
}
}
- public init? (password: String = "BANKEXFOUNDATION") throws {
+ public init? (password: String = "BANKEXFOUNDATION", aesMode: String = "aes-128-cbc") throws {
guard var newPrivateKey = SECP256K1.generatePrivateKey() else {return nil}
defer {Data.zero(&newPrivateKey)}
- try encryptDataToStorage(password, keyData: newPrivateKey)
+ try encryptDataToStorage(password, keyData: newPrivateKey, aesMode: aesMode)
}
- public init? (privateKey: Data, password: String = "BANKEXFOUNDATION") throws {
+ public init? (privateKey: Data, password: String = "BANKEXFOUNDATION", aesMode: String = "aes-128-cbc") throws {
guard privateKey.count == 32 else {return nil}
guard SECP256K1.verifyPrivateKey(privateKey: privateKey) else {return nil}
- try encryptDataToStorage(password, keyData: privateKey)
+ try encryptDataToStorage(password, keyData: privateKey, aesMode: aesMode)
}
- fileprivate func encryptDataToStorage(_ password: String, keyData: Data?, dkLen: Int=32, N: Int = 4096, R: Int = 6, P: Int = 1) throws {
+ fileprivate func encryptDataToStorage(_ password: String, keyData: Data?, dkLen: Int=32, N: Int = 4096, R: Int = 6, P: Int = 1, aesMode: String = "aes-128-cbc") throws {
if (keyData == nil) {
throw AbstractKeystoreError.encryptionError("Encryption without key data")
}
@@ -87,8 +87,19 @@ public class EthereumKeystoreV3: AbstractKeystore {
let last16bytes = derivedKey[(derivedKey.count - 16)...(derivedKey.count-1)]
let encryptionKey = derivedKey[0...15]
guard let IV = Data.randomBytes(length: 16) else {throw AbstractKeystoreError.noEntropyError}
- let aecCipher = try? AES(key: encryptionKey.bytes, blockMode: CBC(iv: IV.bytes), padding: .noPadding)
- guard let encryptedKey = try aecCipher?.encrypt(keyData!.bytes) else {throw AbstractKeystoreError.aesError}
+ var aesCipher : AES?
+ switch aesMode {
+ case "aes-128-cbc":
+ aesCipher = try? AES(key: encryptionKey.bytes, blockMode: CBC(iv: IV.bytes), padding: .noPadding)
+ case "aes-128-ctr":
+ aesCipher = try? AES(key: encryptionKey.bytes, blockMode: CTR(iv: IV.bytes), padding: .noPadding)
+ default:
+ aesCipher = nil
+ }
+ if aesCipher == nil {
+ throw AbstractKeystoreError.aesError
+ }
+ guard let encryptedKey = try aesCipher?.encrypt(keyData!.bytes) else {throw AbstractKeystoreError.aesError}
let encryptedKeyData = Data(bytes:encryptedKey)
var dataForMAC = Data()
dataForMAC.append(last16bytes)
@@ -96,7 +107,7 @@ public class EthereumKeystoreV3: AbstractKeystore {
let mac = dataForMAC.sha3(.keccak256)
let kdfparams = KdfParamsV3(salt: saltData.toHexString(), dklen: dkLen, n: N, p: P, r: R, c: nil, prf: nil)
let cipherparams = CipherParamsV3(iv: IV.toHexString())
- let crypto = CryptoParamsV3(ciphertext: encryptedKeyData.toHexString(), cipher: "aes-128-cbc", cipherparams: cipherparams, kdf: "scrypt", kdfparams: kdfparams, mac: mac.toHexString(), version: nil)
+ let crypto = CryptoParamsV3(ciphertext: encryptedKeyData.toHexString(), cipher: aesMode, cipherparams: cipherparams, kdf: "scrypt", kdfparams: kdfparams, mac: mac.toHexString(), version: nil)
guard let pubKey = Web3.Utils.privateToPublic(keyData!) else {throw AbstractKeystoreError.keyDerivationError}
guard let addr = Web3.Utils.publicToAddress(pubKey) else {throw AbstractKeystoreError.keyDerivationError}
self.address = addr
@@ -110,7 +121,7 @@ public class EthereumKeystoreV3: AbstractKeystore {
throw AbstractKeystoreError.encryptionError("Failed to decrypt a keystore")
}
defer {Data.zero(&keyData!)}
- try self.encryptDataToStorage(newPassword, keyData: keyData!)
+ try self.encryptDataToStorage(newPassword, keyData: keyData!, aesMode: self.keystoreParams!.crypto.cipher)
}
fileprivate func getKeyData(_ password: String) throws -> Data? {
| 11 |
diff --git a/static/intro-to-storybook/netlify-settings.png b/static/intro-to-storybook/netlify-settings.png Binary files a/static/intro-to-storybook/netlify-settings.png and b/static/intro-to-storybook/netlify-settings.png differ
| 3 |
diff --git a/src/web/App.mjs b/src/web/App.mjs @@ -89,7 +89,7 @@ class App {
document.body.classList.remove("loaded");
// Bake initial input
- this.getAllInput();
+ this.manager.input.bakeAll();
}.bind(this), 1000);
// Clear the loading message interval
@@ -182,12 +182,6 @@ class App {
this.manager.worker.silentBake(recipeConfig);
}
- /**
- * Gets the user's input data for all tabs.
- */
- getAllInput() {
- this.manager.input.bakeAll();
- }
/**
* Sets the user's input data.
@@ -195,7 +189,8 @@ class App {
* @param {string} input - The string to set the input to
*/
setInput(input) {
- // Assume that there aren't any inputs
+ // Get the currently active tab.
+ // If there isn't one, assume there are no inputs so use inputNum of 1
let inputNum = this.manager.input.getActiveTab();
if (inputNum === -1) inputNum = 1;
this.manager.input.updateInputValue(inputNum, input);
@@ -423,7 +418,11 @@ class App {
}
/**
- * Checks for input and recipe in the URI parameters and loads them if present.
+ * Searches the URI parameters for recipe and input parameters.
+ * If recipe is present, replaces the current recipe with the recipe provided in the URI.
+ * If input is present, decodes and sets the input to the one provided in the URI.
+ *
+ * @fires Manager#statechange
*/
loadURIParams() {
this.autoBakePause = true;
@@ -456,7 +455,7 @@ class App {
if (this.uriParams.input) {
try {
const inputData = fromBase64(this.uriParams.input);
- this.setInput(inputData, false);
+ this.setInput(inputData);
} catch (err) {}
}
| 2 |
diff --git a/lib/global-admin/addon/components/account-group-row/template.hbs b/lib/global-admin/addon/components/account-group-row/template.hbs <td data-title="{{dt.name}}" class="pr-15">
- <a href="{{href-to "global-admin.security.accounts.detail" model.id}}">
<IdentityBlock
@principalId={{ model.id }}
@wide={{ false }}
/>
- </a>
</td>
<td data-title="{{dt.globalRoleName}}">
| 2 |
diff --git a/src/plugins/meteor/assets/meteor-deploy-check.sh b/src/plugins/meteor/assets/meteor-deploy-check.sh @@ -61,11 +61,11 @@ while [[ true ]]; do
fi
if [[ -z $CONTAINER_IP ]]; then
- echo "Container has no IP Address, likely from it restarting."
+ echo "Container has no IP Address, likely from the app crashing."
noIPCount=$((noIPCount+1))
if [ "$noIPCount" "==" "$MAX_NO_IP_COUNT" ]; then
- echo "Too much time spent restarting." 1>&2
+ echo "Container spent too much time restarting." 1>&2
revert_app
exit 1
fi
| 7 |
diff --git a/src/web/App.mjs b/src/web/App.mjs @@ -157,6 +157,8 @@ class App {
action: "autobake",
data: this.manager.input.getActiveTab()
});
+
+ this.manager.controls.toggleBakeButtonFunction(false, true);
} else {
this.manager.controls.showStaleIndicator();
}
| 12 |
diff --git a/src/input/input.js b/src/input/input.js @@ -72,7 +72,7 @@ export function handlePaste(e, cm) {
let pasted = e.clipboardData && e.clipboardData.getData("Text")
if (pasted) {
e.preventDefault()
- if (!cm.isReadOnly() && !cm.options.disableInput)
+ if (!cm.isReadOnly() && !cm.options.disableInput && cm.hasFocus())
runInOp(cm, () => applyTextInput(cm, pasted, 0, null, "paste"))
return true
}
| 1 |
diff --git a/src/utils/misc/getRandomId.js b/src/utils/misc/getRandomId.js const crypto = require('crypto-extra')
+const ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz'
+
function getRandomId(length) {
- const alphabet = '0123456789abcdefghijklmnopqrstuvwxyz'
- return crypto.randomString(length, alphabet)
+ return crypto.randomString(length, ALPHABET)
}
module.exports = getRandomId
| 5 |
diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js @@ -43,6 +43,7 @@ class CloseAccountPage extends Component {
CloseAccount.clearError();
this.state = {
isConfirmModalVisible: false,
+ confirmModalPrompt: '',
};
}
@@ -52,10 +53,12 @@ class CloseAccountPage extends Component {
onSubmit(values) {
User.closeAccount(values.reasonForLeaving);
+ this.hideConfirmModal();
}
showConfirmModal() {
- this.setState({isConfirmModalVisible: true});
+ const prompt = 'If you proceed with closing your account, any outstanding money requests will be cancelled or declined.';
+ this.setState({isConfirmModalVisible: true, confirmModalPrompt: prompt});
}
hideConfirmModal() {
@@ -127,7 +130,7 @@ class CloseAccountPage extends Component {
onConfirm={this.hideConfirmModal}
onCancel={this.hideConfirmModal}
isVisible={this.state.isConfirmModalVisible}
- prompt="Foo!"
+ prompt={this.state.confirmModalPrompt}
confirmText={this.props.translate('common.close')}
shouldShowCancelButton
/>
| 12 |
diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js }
}
- this.$element.find('option').each(function (index) {
+ var $selectOptions = this.$element.find('option');
+
+ $selectOptions.each(function (index) {
var $this = $(this);
liIndex++;
$parent = $this.parent(),
isOptgroup = $parent[0].tagName === 'OPTGROUP',
isOptgroupDisabled = isOptgroup && $parent[0].disabled,
- isDisabled = this.disabled || isOptgroupDisabled;
+ isDisabled = this.disabled || isOptgroupDisabled,
+ prevHiddenIndex;
if (icon !== '' && isDisabled) {
icon = '<span>' + icon + '</span>';
}
if (that.options.hideDisabled && (isDisabled && !isOptgroup || isOptgroupDisabled)) {
+ // set prevHiddenIndex - the index of the first hidden option in a group of hidden options
+ // used to determine whether or not a divider should be placed after an optgroup if there are
+ // hidden options between the optgroup and the first visible option
+ prevHiddenIndex = $this.data('prevHiddenIndex');
+ $this.next().data('prevHiddenIndex', (prevHiddenIndex !== undefined ? prevHiddenIndex : index));
+
liIndex--;
return;
}
} else if ($this.data('divider') === true) {
_li.push(generateLI('', index, 'divider'));
} else if ($this.data('hidden') === true) {
+ // set prevHiddenIndex - the index of the first hidden option in a group of hidden options
+ // used to determine whether or not a divider should be placed after an optgroup if there are
+ // hidden options between the optgroup and the first visible option
+ prevHiddenIndex = $this.data('prevHiddenIndex');
+ $this.next().data('prevHiddenIndex', (prevHiddenIndex !== undefined ? prevHiddenIndex : index));
+
_li.push(generateLI(generateA(text, optionClass, inline, tokens), index, 'hidden is-hidden'));
} else {
var showDivider = this.previousElementSibling && this.previousElementSibling.tagName === 'OPTGROUP';
// if previous element is not an optgroup and hideDisabled is true
if (!showDivider && that.options.hideDisabled) {
- // get previous elements
- var $prev = $(this).prevAll();
-
- for (var i = 0; i < $prev.length; i++) {
- // find the first element in the previous elements that is an optgroup
- if ($prev[i].tagName === 'OPTGROUP') {
- var optGroupDistance = 0;
-
- // loop through the options in between the current option and the optgroup
- // and check if they are hidden or disabled
- for (var d = 0; d < i; d++) {
- var prevOption = $prev[d];
- if (prevOption.disabled || $(prevOption).data('hidden') === true) optGroupDistance++;
- }
+ prevHiddenIndex = $this.data('prevHiddenIndex');
- // if all of the options between the current option and the optgroup are hidden or disabled, show the divider
- if (optGroupDistance === i) showDivider = true;
+ if (prevHiddenIndex !== undefined) {
+ // select the element **before** the first hidden element in the group
+ var prevHidden = $selectOptions.eq(prevHiddenIndex)[0].previousElementSibling;
- break;
+ if (prevHidden && prevHidden.tagName === 'OPTGROUP' && !prevHidden.disabled) {
+ showDivider = true;
}
}
}
| 7 |
diff --git a/src/components/tooltip/README.md b/src/components/tooltip/README.md @@ -458,7 +458,7 @@ To close a **specific tooltip**, pass the trigger element's `id`, or the `id` of
was provided via the `id` prop), as the argument:
```js
-this.$root.$emit('bv::show::tooltip', 'my-trigger-button-id')
+this.$root.$emit('bv::hide::tooltip', 'my-trigger-button-id')
```
To open a **specific tooltip**, pass the trigger element's `id`, or the `id` of the tooltip (if one
| 3 |
diff --git a/package.json b/package.json }
},
"lint-staged": {
- "!(dist|-viewer/public)/**/*.ts": "tslint"
+ "!(dist|-viewer/public)/**/*.ts, !train_model/*": "tslint"
},
"dependencies": {
"@google-cloud/vision": "1.11.0",
| 8 |
diff --git a/content/billing/billing.md b/content/billing/billing.md @@ -34,3 +34,11 @@ To change the card used for payments, click **Edit** in the credit card section
### Disabling billing
To disable billing, click **Disable billing** in the Billing details section. On disabling billing, you will be immediately charged for the used paid features.
+
+## Billing per Team User
+
+For pay-as-you-go team plans, each team user is billed at the rate on the [pricing page](https://codemagic.io/pricing/). See the [counting team users](../teams/users) guide for details on how we count team users.
+
+## Billing per build minute
+
+For pay-as-you-go team and user plans, each build minute is billed at the rate on our [pricing page](https://codemagic.io/pricing/) based on the build [machine type](../specs/machine-type) used for the build. Builds that time out or fail because of a Codemagic service error will not count towards billing usage. Builds that fail for any other reason will count towards billing usage.
| 3 |
diff --git a/src/Input/Input.spec.js b/src/Input/Input.spec.js @@ -55,6 +55,15 @@ describe('<Input />', () => {
});
});
+ it('should call focus function on input property when focus is invoked', () => {
+ const wrapper = shallow(<Input />);
+ const instance = wrapper.instance();
+ instance.input = spy();
+ instance.input.focus = spy();
+ instance.focus();
+ assert.strictEqual(instance.input.focus.callCount, 1);
+ });
+
describe('controlled', () => {
let wrapper;
let handleDirty;
| 0 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -1520,6 +1520,16 @@ class Avatar {
return -1;
}
};
+ const _getMorphTargetInfluenceIndexForRegex = (morphTargetDictionary, regex) => {
+ let index = 0;
+ for (const k in morphTargetDictionary) {
+ if (regex.test(k)) {
+ return index;
+ }
+ index++;
+ }
+ return -1;
+ };
/* const _getBlendShapeIndexForName = name => {
const blendShapes = this.vrmExtension && this.vrmExtension.blendShapeMaster && this.vrmExtension.blendShapeMaster.blendShapeGroups;
if (Array.isArray(blendShapes)) {
@@ -1549,7 +1559,7 @@ class Avatar {
const funIndex = _getBlendShapeIndexForPresetName('fun');
const joyIndex = _getBlendShapeIndexForPresetName('joy');
const sorrowIndex = _getBlendShapeIndexForPresetName('sorrow');
- // const surprisedIndex = _getBlendShapeIndexForName('surprised');
+ const surpriseIndex = _getMorphTargetInfluenceIndexForRegex(morphTargetDictionary, /surprise/i);
// const extraIndex = _getBlendShapeIndexForName('extra');
return [
morphTargetInfluences,
@@ -1565,7 +1575,7 @@ class Avatar {
funIndex,
joyIndex,
sorrowIndex,
- // surprisedIndex,
+ surpriseIndex,
// extraIndex,
];
} else {
@@ -3200,7 +3210,7 @@ class Avatar {
funIndex,
joyIndex,
sorrowIndex,
- // surprisedIndex,
+ surpriseIndex,
// extraIndex,
] = visemeMapping;
@@ -3279,6 +3289,10 @@ class Avatar {
index = sorrowIndex;
break;
}
+ case 'surprise': {
+ index = surpriseIndex;
+ break;
+ }
default: {
const match = emote.emotion.match(/^emotion-([0-9]+)$/);
if (match) {
| 0 |
diff --git a/assets/js/modules/analytics-4/datastore/accounts.test.js b/assets/js/modules/analytics-4/datastore/accounts.test.js @@ -55,27 +55,27 @@ describe( 'modules/analytics-4 accounts', () => {
status: 200,
} );
- const initialProperties = registry.select( STORE_NAME ).getAccountSummaries();
- expect( initialProperties ).toBeUndefined();
+ const initialAccountSummaries = registry.select( STORE_NAME ).getAccountSummaries();
+ expect( initialAccountSummaries ).toBeUndefined();
await untilResolved( registry, STORE_NAME ).getAccountSummaries();
expect( fetchMock ).toHaveFetched( accountSummariesEndpoint );
- const properties = registry.select( STORE_NAME ).getAccountSummaries();
+ const accountSummaries = registry.select( STORE_NAME ).getAccountSummaries();
expect( fetchMock ).toHaveFetchedTimes( 1 );
- expect( properties ).toEqual( fixtures.accountSummaries );
- expect( properties ).toHaveLength( fixtures.accountSummaries.length );
+ expect( accountSummaries ).toEqual( fixtures.accountSummaries );
+ expect( accountSummaries ).toHaveLength( fixtures.accountSummaries.length );
} );
it( 'should not make a network request if properties for this account are already present', async () => {
registry.dispatch( STORE_NAME ).receiveGetAccountSummaries( fixtures.accountSummaries );
- const properties = registry.select( STORE_NAME ).getAccountSummaries();
+ const accountSummaries = registry.select( STORE_NAME ).getAccountSummaries();
await untilResolved( registry, STORE_NAME ).getAccountSummaries();
expect( fetchMock ).not.toHaveFetched( accountSummariesEndpoint );
- expect( properties ).toEqual( fixtures.accountSummaries );
- expect( properties ).toHaveLength( fixtures.accountSummaries.length );
+ expect( accountSummaries ).toEqual( fixtures.accountSummaries );
+ expect( accountSummaries ).toHaveLength( fixtures.accountSummaries.length );
} );
it( 'should dispatch an error if the request fails', async () => {
@@ -94,8 +94,8 @@ describe( 'modules/analytics-4 accounts', () => {
await untilResolved( registry, STORE_NAME ).getAccountSummaries();
expect( fetchMock ).toHaveFetchedTimes( 1 );
- const properties = registry.select( STORE_NAME ).getAccountSummaries();
- expect( properties ).toBeUndefined();
+ const accountSummaries = registry.select( STORE_NAME ).getAccountSummaries();
+ expect( accountSummaries ).toBeUndefined();
expect( console ).toHaveErrored();
} );
} );
| 10 |
diff --git a/packages/bitcore-node/test/util/verify.ts b/packages/bitcore-node/test/util/verify.ts @@ -9,6 +9,7 @@ import { WalletAddressModel } from '../../src/models/walletAddress';
import { Storage } from '../../src/services/storage';
import config from '../../src/config';
import logger from '../../src/logger';
+import { ChainStateProvider } from '../../src/providers/chain-state';
const SATOSHI = 100000000.0;
@@ -21,7 +22,7 @@ export async function blocks(info: ChainNetwork, creds: {
port: number;
}) {
const rpc = new AsyncRPC(creds.username, creds.password, creds.host, creds.port);
- const tip = await BlockModel.getLocalTip(info);
+ const tip = await ChainStateProvider.getLocalTip({chain:info.chain, network:info.network});
const heights = new Array(tip.height).fill(false);
const times = new Array(tip.height).fill(0);
const normalizedTimes = new Array(tip.height).fill(0);
@@ -33,7 +34,7 @@ export async function blocks(info: ChainNetwork, creds: {
});
while (true) {
- const block: IBlock = await cursor.next();
+ const block: IBlock | null = await cursor.next();
if (!block) break;
if (!block.processed) continue;
logger.info(`verifying block ${block.hash}: ${block.height}`);
@@ -151,7 +152,7 @@ export async function transactions(info: ChainNetwork, creds: {
});
while (true) {
- const tx: ITransaction = await txcursor.next();
+ const tx: ITransaction | null = await txcursor.next();
if (!tx) {
break;
}
| 1 |
diff --git a/plugins/resource_management/app/views/resource_management/application/_data_age.html.haml b/plugins/resource_management/app/views/resource_management/application/_data_age.html.haml -# render the data age only if there is data
-if @view_services
.col-md-10.col-md-offset-2.small.text-muted
- Usage data last updated #{data_age_as_string(@view_services.map(&:min_updated_at).min, @view_services.map(&:max_updated_at).max)}
+ Usage data last updated #{data_age_as_string(@view_services.map(&:min_updated_at).reject(:nil?).min, @view_services.map(&:max_updated_at).reject(:nil?).max)}
-# allow the calling view to embed a "Sync Now" button
= yield
| 8 |
diff --git a/index.css b/index.css @@ -961,15 +961,17 @@ header.builtin.import .wallet.import, header.builtin.locked .wallet.locked, head
height: 300px;
overflow: hidden;
}
-.tokens > .token:hover .actions {
+.tokens > .token:hover .actions,
+.tokens > .token:hover .label
+{
transform: none;
opacity: 1;
}
-.tokens > .token:hover img {
+.tokens > .token:hover > .preview img {
transform: scale(1.3);
}
-.tokens > .token img {
+.tokens > .token > .preview img {
transition: transform 0.3s ease-out;
}
@@ -988,9 +990,10 @@ header.builtin.import .wallet.import, header.builtin.locked .wallet.locked, head
transition: all 0.5s cubic-bezier(0, 1, 0, 1);
}
-.tokens > .token .action {
+.tokens > .token .actions .action {
display: flex;
padding: 5px;
+ font-size: 16px;
cursor: pointer;
}
@@ -1022,6 +1025,27 @@ header.builtin.import .wallet.import, header.builtin.locked .wallet.locked, head
/* outline: none; */
}
+.tokens > .token .label {
+ margin-top: auto;
+ padding: 5px;
+ font-weight: 600;
+ text-transform: uppercase;
+ transform: translatex(-10px);
+ opacity: 0;
+ transition: all 0.5s cubic-bezier(0, 1, 0, 1);
+}
+.tokens > .token .world-objects {
+ display: flex;
+ padding: 5px;
+}
+.tokens > .token .world-objects .world-object img {
+ width: 20px;
+ height: 20px;
+ margin-right: 5px;
+ margin-bottom: 5px;
+ border-radius: 3px;
+}
+
.big-buttons {
display: inline-flex;
margin-top: 30px;
@@ -1366,10 +1390,6 @@ header.unlocking + .main .blocker .button
font-size: 16px;
}
-.token .action {
- font-size: 16px;
-}
-
/* .cardCode {
margin-bottom: 5px;
margin-top: 5px;
| 0 |
diff --git a/embark-ui/src/components/DataWrapper.js b/embark-ui/src/components/DataWrapper.js @@ -9,14 +9,14 @@ const DataWrapper = ({error, loading, shouldRender, render, ...rest}) => {
return <Error error={error} />;
}
- if (loading) {
- return <Loading />;
- }
-
if (shouldRender) {
return render(rest);
}
+ if (loading) {
+ return <Loading />;
+ }
+
return <React.Fragment />;
};
| 7 |
diff --git a/magda-web-client/src/config.js b/magda-web-client/src/config.js @@ -40,7 +40,8 @@ const baseExternalUrl =
? window.location.protocol + "//" + window.location.host + "/"
: baseUrl;
-const fetchOptions = window.magda_server_config
+const fetchOptions =
+ `${window.location.protocol}//${window.location.host}/` !== baseUrl
? {
credentials: "include"
}
| 12 |
diff --git a/scripts/release/daemon-mcu.sh b/scripts/release/daemon-mcu.sh @@ -78,6 +78,9 @@ mkdir -p "$LogDir"
stdout=${LogDir}/${command}.stdout
pid=${LogDir}/${command}.pid
+CommandDir=${command//-/_}
+StartCmd=""
+
# Set default scheduling priority
if [ "$OWT_NICENESS" = "" ]; then
export OWT_NICENESS=0
@@ -95,6 +98,8 @@ case $startStop in
check_node_version || exit 1
rotate_log $stdout
echo "starting $command, stdout -> $stdout"
+
+
case ${command} in
management-api )
cd ${OWT_HOME}/management_api
@@ -212,8 +217,16 @@ case $startStop in
echo $! > ${pid}
;;
* )
+ if [ -d ${OWT_HOME}/${CommandDir} ]; then
+ cd ${OWT_HOME}/${CommandDir}
+ StartCmd=$(node -e "process.stdout.write(require('./package.json').scripts.start)")
+ nohup nice -n ${OWT_NICENESS} ${StartCmd} \
+ > "${stdout}" 2>&1 </dev/null &
+ echo $! > ${pid}
+ else
echo $usage
exit 1
+ fi
;;
esac
| 11 |
diff --git a/uri.js b/uri.js @@ -17,7 +17,7 @@ function parseUri(uri, callbacks){
// pairing / start a chat
// var arrPairingMatches = value.match(/^([\w\/+]{44})@([\w.:\/-]+)(?:#|%23)([\w\/+]+)$/);
- var arrPairingMatches = value.replace('%23', '#').match(/^([\w\/+]{44})@([\w.:\/-]+)#([\w\/+-]+)$/);
+ var arrPairingMatches = value.replace('%23', '#').match(/^([\w\/+]{44})@([\w.:\/-]+)#(.+)$/);
if (arrPairingMatches){
objRequest.type = "pairing";
objRequest.pubkey = arrPairingMatches[1];
| 11 |
diff --git a/app/views/carto/oauth_provider/_scopes.html.erb b/app/views/carto/oauth_provider/_scopes.html.erb -<% my_test_scopes_by_category = [
- {
- description: "Personal user data",
- scopes: [
- {name: "Username", new: true},
- {name: "Email addreses", new: true},
- {name: "Organization name", new: true}
- ]
- },
- {
- description: "Access to list your datasets",
- icon: "money",
- scopes: [
- {name: "reqs_per_tile", new: false},
- {name: "twitter_theforcewakens", new: false},
- {name: "omg", new: true},
- {name: "omg 2", new: true},
- {name: "omg 3", new: true},
- {name: "omg 4", new: true},
- {name: "omg 5", new: true}
- ]
- },
-] %>
-
-
<% @scopes_by_category.each do |category| %>
<div class='oauth-scopes-category'>
<% if category[:icon]%>
| 2 |
diff --git a/package.json b/package.json "start-server": "cross-env concurrently --kill-others \"npm run start-api-server\" \"npm run start-ds-bitfinex\"",
"start-api-server": "cross-env ALGO_LOG=true ALGO_LOG_DIR=logs node scripts/start-api-server.js",
"start-ds-bitfinex": "cross-env node scripts/start-ds-bitfinex.js",
- "start": "cd ./bfx-hf-ui-core && cross-env REACT_APP_DEV=1 REACT_APP_WSS_URL=ws://localhost:45000 REACT_APP_DS_URL=ws://localhost:23521 REACT_APP_UFX_PUBLIC_API_URL=http://localhost:45001 REACT_APP_IS_ELECTRON_APP=true node scripts/start.js",
+ "start": "cd ./bfx-hf-ui-core && cross-env REACT_APP_DEV=1 REACT_APP_WSS_URL=ws://localhost:45000 REACT_APP_DS_URL=ws://localhost:23521 REACT_APP_UFX_API_URL=http://localhost:45001 REACT_APP_UFX_PUBLIC_API_URL=http://localhost:45001 REACT_APP_IS_ELECTRON_APP=true node scripts/start.js",
"prebuild": "cd ./bfx-hf-ui-core && git checkout -- .",
- "build": "npm run fetch-core && npm run update-core && npm run preinstall && cd bfx-hf-ui-core && cross-env GENERATE_SOURCEMAP=false npm run build-css && cross-env REACT_APP_WSS_URL=ws://localhost:45000 REACT_APP_DS_URL=ws://localhost:23521 REACT_APP_UFX_PUBLIC_API_URL=http://localhost:45001 REACT_APP_IS_ELECTRON_APP=true node scripts/build.js",
+ "build": "npm run fetch-core && npm run update-core && npm run preinstall && cd bfx-hf-ui-core && cross-env GENERATE_SOURCEMAP=false npm run build-css && cross-env REACT_APP_WSS_URL=ws://localhost:45000 REACT_APP_DS_URL=ws://localhost:23521 REACT_APP_UFX_API_URL=http://localhost:45001 REACT_APP_UFX_PUBLIC_API_URL=http://localhost:45001 REACT_APP_IS_ELECTRON_APP=true node scripts/build.js",
"update-core": "git submodule update --remote --merge",
"fetch-core": "git submodule update --init --recursive",
"postbuild": "run-script-os",
| 3 |
diff --git a/apps/widbaroalarm/widget.js b/apps/widbaroalarm/widget.js @@ -30,13 +30,13 @@ const interval = setting("interval");
let history3 =
storage.readJSON(LOG_FILE, true) || []; // history of recent 3 hours
-function showAlarm(body, key) {
+function showAlarm(body, key, type) {
if (body == undefined)
return;
stop = true;
E.showPrompt(body, {
- title : "Pressure alarm",
+ title : "Pressure " + (type != undefined ? type : "alarm"),
buttons : {"Ok" : 1, "Dismiss" : 2, "Pause" : 3}
}).then(function(v) {
const tsNow = Math.round(Date.now() / 1000); // seconds
@@ -91,16 +91,19 @@ function handlePressureValue(pressure) {
history3.push(d);
+ // delete oldest entries until we have max 50
+ while (history3.length > 50) {
+ history3.shift();
+ }
+
// delete entries older than 3h
for (let i = 0; i < history3.length; i++) {
if (history3[i]["ts"] < ts - (3 * 60 * 60)) {
history3.shift();
+ } else {
+ break;
}
}
- // delete oldest entries until we have max 50
- while (history3.length > 50) {
- history3.shift();
- }
// write data to storage
storage.writeJSON(LOG_FILE, history3);
@@ -120,8 +123,8 @@ function checkForAlarms(pressure, ts) {
// Is below the alarm threshold?
if (pressure <= setting("min")) {
if (!doWeNeedToAlarm("lowWarnTs")) {
- showAlarm("Pressure low: " + Math.round(pressure) + " hPa",
- "lowWarnTs");
+ showAlarm("Pressure low: " + Math.round(pressure) + " hPa", "lowWarnTs",
+ "low");
alreadyWarned = true;
}
} else {
@@ -134,7 +137,7 @@ function checkForAlarms(pressure, ts) {
if (pressure >= setting("max")) {
if (doWeNeedToAlarm("highWarnTs")) {
showAlarm("Pressure high: " + Math.round(pressure) + " hPa",
- "highWarnTs");
+ "highWarnTs", "high");
alreadyWarned = true;
}
} else {
@@ -162,7 +165,7 @@ function checkForAlarms(pressure, ts) {
showAlarm((Math.round(diffPressure * 10) / 10) +
" hPa/3h from " + Math.round(oldestPressure) +
" to " + Math.round(pressure) + " hPa",
- "dropWarnTs");
+ "dropWarnTs", "drop");
}
} else {
if (ts > setting("dropWarnTs"))
@@ -180,7 +183,7 @@ function checkForAlarms(pressure, ts) {
showAlarm((Math.round(diffPressure * 10) / 10) +
" hPa/3h from " + Math.round(oldestPressure) +
" to " + Math.round(pressure) + " hPa",
- "raiseWarnTs");
+ "raiseWarnTs", "raise");
}
} else {
if (ts > setting("raiseWarnTs"))
@@ -249,23 +252,23 @@ function turnOff() {
Bangle.setBarometerPower(false, "widbaroalarm");
}
-function reload() { getPressureValue(); }
-
function draw() {
if (global.WIDGETS != undefined && typeof global.WIDGETS === "object") {
global.WIDGETS["baroalarm"] = {
width : setting("show") ? 24 : 0,
- reload : reload,
area : "tr",
draw : draw
};
}
g.reset();
- if (setting("show")) {
- g.setFont("6x8", 1).setFontAlign(1, 0);
- const x = this.x, y = this.y;
+
if (this.x == undefined)
return; // widget not yet there
+
+ g.clearRect(this.x, this.y, this.x + this.width - 1, this.y + 23);
+
+ if (setting("show")) {
+ g.setFont("6x8", 1).setFontAlign(1, 0);
if (medianPressure == undefined) {
// trigger a new check
getPressureValue();
@@ -273,12 +276,12 @@ function draw() {
// lets load last value from log (if available)
if (history3.length > 0) {
medianPressure = history3[history3.length - 1]["p"];
- g.drawString(Math.round(medianPressure), x + 24, y + 6);
+ g.drawString(Math.round(medianPressure), this.x + 24, this.y + 6);
} else {
- g.drawString("...", x + 24, y + 6);
+ g.drawString("...", this.x + 24, this.y + 6);
}
} else {
- g.drawString(Math.round(medianPressure), x + 24, y + 6);
+ g.drawString(Math.round(medianPressure), this.x + 24, this.y + 6);
}
if (threeHourAvrPressure == undefined) {
@@ -287,7 +290,8 @@ function draw() {
if (threeHourAvrPressure != undefined) {
if (medianPressure != undefined) {
const diff = Math.round(medianPressure - threeHourAvrPressure);
- g.drawString((diff > 0 ? "+" : "") + diff, x + 24, y + 6 + 10);
+ g.drawString((diff > 0 ? "+" : "") + diff, this.x + 24,
+ this.y + 6 + 10);
}
}
}
@@ -296,5 +300,5 @@ function draw() {
if (interval > 0) {
setInterval(getPressureValue, interval * 60000);
}
-draw();
+getPressureValue();
})();
| 7 |
diff --git a/src/components/profile/ProfileDataTable.js b/src/components/profile/ProfileDataTable.js @@ -55,9 +55,6 @@ const ProfileDataTable = ({ profile, onChange, errors: errorsProp, editable, the
/>
</Section.Row>
</Section.Row>
- <Section.Row>
- {errors.mobile ? <Section.Text style={styles.phoneError}>{errors.mobile}</Section.Text> : null}
- </Section.Row>
</Section.Stack>
) : (
<InputRounded
| 2 |
diff --git a/hooks/src/index.js b/hooks/src/index.js @@ -84,47 +84,47 @@ const createHook = (create, shouldRun) => (...args) => {
return (hook._value = hook._run(...args));
};
-export const useState = createHook((hook, inst, initialValue) => {
+export const useState = createHook((hook, component, initialValue) => {
const stateId = 'hs' + hook._index;
const ret = [
- inst.state[stateId] = typeof initialValue == 'function' ? initialValue() : initialValue,
+ component.state[stateId] = typeof initialValue == 'function' ? initialValue() : initialValue,
value => {
const setter = {};
ret[0] = setter[stateId] = typeof value == 'function' ? value(ret[0]) : value;
stateChanged = true;
- inst.setState(setter);
+ component.setState(setter);
}
];
return () => ret;
});
-export const useReducer = createHook((hook, inst, reducer, initialState, initialAction) => {
+export const useReducer = createHook((hook, component, reducer, initialState, initialAction) => {
const stateId = 'hr' + hook._index;
const ret = [
- inst.state[stateId] = initialAction ? reducer(initialState, initialAction) : initialState,
+ component.state[stateId] = initialAction ? reducer(initialState, initialAction) : initialState,
action => {
const setter = {};
ret[0] = setter[stateId] = reducer(ret[0], action);
stateChanged = true;
- inst.setState(setter);
+ component.setState(setter);
}
];
return () => ret;
});
-export const useEffect = hasWindow ? createHook((hook, inst) => {
+export const useEffect = hasWindow ? createHook((hook, component) => {
return callback => {
- const effect = [hook, callback, inst];
- inst.__hooks._pendingEffects.push(effect);
+ const effect = [hook, callback, component];
+ component.__hooks._pendingEffects.push(effect);
afterPaint(effect);
};
}, propsChanged) : noop;
-export const useLayoutEffect = hasWindow ? createHook((hook, inst) => {
- return callback => inst.__hooks._pendingLayoutEffects.push([hook, callback]);
+export const useLayoutEffect = hasWindow ? createHook((hook, component) => {
+ return callback => component.__hooks._pendingLayoutEffects.push([hook, callback]);
}, propsChanged) : noop;
-export const useRef = createHook((hook, inst, initialValue) => {
+export const useRef = createHook((hook, component, initialValue) => {
const ref = { current: initialValue };
return () => ref;
});
@@ -148,13 +148,13 @@ function onPaint() {
mc.port2.onmessage = () => {
afterPaintEffects.splice(0, afterPaintEffects.length).forEach(effect => {
- const inst = effect[2];
- const effects = inst.__hooks._pendingEffects;
+ const component = effect[2];
+ const effects = component.__hooks._pendingEffects;
for (let j = 0; j < effects.length; j++) {
if (effects[j] === effect) {
effects.splice(j, 1);
- if (inst._parentDom) invokeEffect(effect);
+ if (component._parentDom) invokeEffect(effect);
break;
}
}
| 10 |
diff --git a/app/models/carto/user_db_service.rb b/app/models/carto/user_db_service.rb @@ -13,10 +13,6 @@ module Carto
@user = user
end
- def rebuild_quota_trigger
- # TODO: Implement/clone from Sequel model
- end
-
def build_search_path(user_schema = nil, quote_user_schema = true)
user_schema ||= @user.database_schema
UserDBService.build_search_path(user_schema, quote_user_schema)
@@ -28,11 +24,5 @@ module Carto
quote_char = quote_user_schema ? "\"" : ""
"#{quote_char}#{user_schema}#{quote_char}, #{SCHEMA_CARTODB}, #{SCHEMA_CDB_DATASERVICES_API}, #{SCHEMA_PUBLIC}"
end
-
-
- def load_cartodb_functions
- #TODO: Implement
- end
-
end
end
| 2 |
diff --git a/includes/Modules/Analytics_4.php b/includes/Modules/Analytics_4.php @@ -534,8 +534,6 @@ final class Analytics_4 extends Module
return array_map( array( self::class, 'filter_webdatastream_with_ids' ), $webdatastreams );
case 'GET:webdatastreams-batch':
return self::parse_webdatastreams_batch( $response );
- case 'GET:container-lookup':
- return (array) $response;
case 'GET:container-destinations':
return (array) $response->getDestination();
}
| 2 |
diff --git a/public/app/js/cbus-sync.js b/public/app/js/cbus-sync.js @@ -168,50 +168,6 @@ cbus.sync = {};
}, (err, res, body) => {
if (err || statusCodeNotOK(res.statusCode)) {
cbus.sync.auth.retry(cbus.sync.subscriptions.pull, arguments);
- } else {
- body = JSON.parse(body);
- let delta = {
- add: body.add,
- remove: body.remove
- };
-
- localforage.setItem("cbus_sync_subscriptions_pull_timestamp", body.timestamp);
-
- var addDoneCount = 0;
- for (let i = 0, l = body.add.length; i < l; i++) {
- cbus.server.getPodcastInfo(body.add[i], podcastInfo => {
- podcastInfo.url = body.add[i];
- cbus.data.subscribeFeed(podcastInfo, false, false, true);
- addDoneCount++;
- if (addDoneCount === body.add.length) {
- cb(true, delta);
- }
- });
- }
-
- for (let i = 0, l = body.remove.length; i < l; i++) {
- cbus.data.unsubscribeFeed({ url: body.remove[i] }, false, true);
- }
-
- if (body.add.length === 0) {
- cb(true, delta);
- }
- }
- });
- });
- };
-
- cbus.sync.subscriptions.pullDry = function(deviceID, cb) {
- var sinceTimestamp = 0;
- localforage.getItem("cbus_sync_subscriptions_pull_timestamp", function(err, val) {
- if (val) sinceTimestamp = val;
-
- request.get({
- url: `${base}/api/2/subscriptions/${username}/${deviceID}.json?since=${sinceTimestamp}`,
- auth: auth
- }, (err, res, body) => {
- if (err || statusCodeNotOK(res.statusCode)) {
- cbus.sync.auth.retry(cbus.sync.subscriptions.pullDry, arguments);
} else {
body = JSON.parse(body);
localforage.setItem("cbus_sync_subscriptions_pull_timestamp", body.timestamp);
@@ -255,7 +211,7 @@ cbus.sync = {};
for (let i = 0; i < syncedDevices.length; i++) {
let adds = [];
let removes = [];
- cbus.sync.subscriptions.pullDry(syncedDevices[i], (delta) => {
+ cbus.sync.subscriptions.pull(syncedDevices[i], (delta) => {
if (!delta) {
cb(false);
} else {
| 14 |
diff --git a/resource/js/util/markdown-it/toc-and-anchor.js b/resource/js/util/markdown-it/toc-and-anchor.js @@ -9,6 +9,7 @@ export default class TocAndAnchorConfigurer {
configure(md) {
md.use(require('markdown-it-toc-and-anchor-with-slugid').default, {
+ tocLastLevel: 3,
anchorLinkBefore: false,
anchorLinkSymbol: '',
anchorLinkSymbolClassName: 'fa fa-link',
| 12 |
diff --git a/packages/create-snowpack-app/templates/app-template-react/src/index.jsx b/packages/create-snowpack-app/templates/app-template-react/src/index.jsx import React from "react";
import ReactDOM from "react-dom";
-import App from "./App.js";
+import App from "./App";
import "./index.css";
ReactDOM.render(
| 2 |
diff --git a/app/shared/components/Tools/Ping.js b/app/shared/components/Tools/Ping.js import React, { Component } from 'react';
import debounceRender from 'react-debounce-render';
import { translate } from 'react-i18next';
-import { defer, find, isEmpty, map, orderBy, remove, sum } from 'lodash';
+import { defer, filter, isEmpty, map, orderBy, remove, sum, uniqBy } from 'lodash';
import ToolsPingControls from './Ping/Controls';
import ToolsPingHeader from './Ping/Header';
@@ -78,9 +78,10 @@ class ToolsPing extends Component<Props> {
Object.keys(producersInfo).forEach((key) => {
const producer = producersInfo[key];
if (producer.nodes && producer.nodes.length) {
- const node = find(producer.nodes, {
+ const nodes = filter(producer.nodes, {
node_type: 'full'
});
+ nodes.forEach((node) => {
if (node && node.ssl_endpoint) {
endpoints.push({
host: node.ssl_endpoint,
@@ -92,10 +93,11 @@ class ToolsPing extends Component<Props> {
producer: producer.producer_account_name
});
}
+ });
}
});
this.setState({
- endpoints,
+ endpoints: uniqBy(endpoints, 'host'),
total: endpoints.length
});
}
| 11 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -9,6 +9,7 @@ Are you ready to contribute to JHipster? We'd love to have you on board, and we
- [Generator development setup](#setup)
- [Coding Rules](#rules)
- [Git Commit Guidelines](#commit)
+ - [Financial Contributions](#financial-contributions)
## <a name="question"></a> Questions and help
This is the JHipster bug tracker, and it is used for [Issues and Bugs](#issue) and for [Feature Requests](#feature). It is **not** a help desk or a support forum.
@@ -304,7 +305,7 @@ Fix #1234
[feature-template]: https://github.com/jhipster/generator-jhipster/issues/new?body=*%20**Overview%20of%20the%20request**%0A%0A%3C!--%20what%20is%20the%20query%20or%20request%20--%3E%0A%0A*%20**Motivation%20for%20or%20Use%20Case**%20%0A%0A%3C!--%20explain%20why%20this%20is%20a%20required%20for%20you%20--%3E%0A%0A%0A*%20**Browsers%20and%20Operating%20System**%20%0A%0A%3C!--%20is%20this%20a%20problem%20with%20all%20browsers%20or%20only%20IE8%3F%20--%3E%0A%0A%0A*%20**Related%20issues**%20%0A%0A%3C!--%20has%20a%20similar%20issue%20been%20reported%20before%3F%20--%3E%0A%0A*%20**Suggest%20a%20Fix**%20%0A%0A%3C!--%20if%20you%20can%27t%20fix%20this%20yourself%2C%20perhaps%20you%20can%20point%20to%20what%20might%20be%0A%20%20causing%20the%20problem%20(line%20of%20code%20or%20commit)%20--%3E
-## Financial contributions
+## <a name="financial-contributions"></a> Financial contributions
We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/generator-jhipster).
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
@@ -315,7 +316,7 @@ Anyone can file an expense. If the expense makes sense for the development of th
### Contributors
-Thank you to all the people who have already contributed to generator-jhipster!
+Thank you to all the people who have already contributed to JHipster!
<a href="graphs/contributors"><img src="https://opencollective.com/generator-jhipster/contributors.svg?width=890" /></a>
| 3 |
diff --git a/src/iframeResizer.js b/src/iframeResizer.js }
function sendPageInfoToIframe(iframe,iframeId) {
- function debouncedTrigger() {
trigger(
'Send Page Info',
'pageInfo:' + getPageInfo(),
);
}
- debouce(debouncedTrigger,32);
- }
-
function startPageInfoMonitor() {
function setListener(type,func) {
}
}
+ function debouncedMessageSender() {
['scroll','resize'].forEach(function(evt) {
log(id, type + evt + ' listener for sendPageInfo');
func(window,evt,sendPageInfo);
});
}
+ debouce(debouncedMessageSender,32);
+ }
+
function stop() {
setListener('Remove ', removeEventListener);
}
| 5 |
diff --git a/engine/components/physics/crash/CrashComponent.js b/engine/components/physics/crash/CrashComponent.js @@ -41,24 +41,29 @@ var PhysicsComponent = IgeEventingClass.extend({
var type = body.fixtures[0].shape.type;
// console.log(body.fixtures[0].shape.type);
// console.log(entity, body);
-
+ var crashBody;
var x = entity._translate.x;
var y = entity._translate.y;
var igeId = body.fixtures[0].igeId;
if (type === 'circle') {
var radius = entity._bounds2d.x;
- entity.fixtures[0].shape.data = this.crash.Circle(new this.crash.Vector(x, y), radius, true, { igeId: igeId });
+ // entity.fixtures[0].shape.data = this.crash.Circle(new this.crash.Vector(x, y), radius, true, { igeId: igeId });
+ crashBody = this.crash.Circle(new this.crash.Vector(x, y), radius, true, { igeId: igeId });
}
else if (type === 'rectangle') {
var width = entity._bounds2d.x;
var height = entity._bounds2d.y;
- entity.fixtures[0].shape.data = this.crash.Box(new this.crash.Vector(x, y), width, height, true, { igeId: igeId });
+ // entity.fixtures[0].shape.data = this.crash.Box(new this.crash.Vector(x, y), width, height, true, { igeId: igeId });
+ crashBody = this.crash.Circle(new this.crash.Vector(x, y), radius, true, { igeId: igeId });
}
else {
console.log('body shape is wrong');
+ // added return here
+ return;
}
- return entity.fixtures[0].shape.data;
+ // return entity.fixtures[0].shape.data;
+ return crashBody;
},
gravity: function (x, y) {
| 13 |
diff --git a/phpcs.xml b/phpcs.xml <!-- Check for cross-version support for PHP 5.6 and higher. -->
<config name="testVersion" value="5.6-"/>
+ <config name="minimum_supported_wp_version" value="4.7"/>
<rule ref="PHPCompatibility" />
</ruleset>
| 12 |
diff --git a/nin/dasBoot/PathController.js b/nin/dasBoot/PathController.js @@ -116,6 +116,9 @@ PathController.prototype.get3Dpoint = function(frame) {
var current = this.getCurrentPath(frame);
var duration = current.endFrame - current.startFrame;
var t = (frame - current.startFrame) / duration;
+ if (t < 0) {
+ t = 0;
+ }
if (current.easing == 'smoothstep') {
t = smoothstep(0, 1, t);
} else if (current.easing == 'easeIn') {
| 11 |
diff --git a/src/server/routes/apiv3/bookmarks.js b/src/server/routes/apiv3/bookmarks.js @@ -4,6 +4,7 @@ const logger = loggerFactory('growi:routes:apiv3:bookmarks'); // eslint-disable-
const express = require('express');
const { body, query, param } = require('express-validator');
+const { serializeUserSecurely } = require('../../models/serializers/user-serializer');
const router = express.Router();
@@ -205,13 +206,20 @@ module.exports = (crowi) => {
populate: {
path: 'lastUpdateUser',
model: 'User',
- select: User.USER_PUBLIC_FIELDS,
},
},
page,
limit,
},
);
+
+ // serialize user
+ paginationResult.docs = paginationResult.docs.map((doc) => {
+ const serializedDoc = doc;
+ serializedDoc.page.lastUpdateUser = serializeUserSecurely(doc.page.lastUpdateUser);
+ return serializedDoc;
+ });
+
return res.apiv3({ paginationResult });
}
catch (err) {
| 14 |
diff --git a/types/inferschematype.d.ts b/types/inferschematype.d.ts -import { Schema, InferSchemaType, SchemaType, SchemaTypeOptions, TypeKeyBaseType, Types, NumberSchemaDefinition, StringSchemaDefinition, BooleanSchemaDefinition, DateSchemaDefinition } from 'mongoose';
+import {
+ Schema,
+ InferSchemaType,
+ SchemaType,
+ SchemaTypeOptions,
+ TypeKeyBaseType,
+ Types,
+ NumberSchemaDefinition,
+ StringSchemaDefinition,
+ BooleanSchemaDefinition,
+ DateSchemaDefinition,
+ ObtainDocumentType,
+ DefaultTypeKey
+} from 'mongoose';
declare module 'mongoose' {
/**
@@ -138,7 +151,8 @@ type ObtainDocumentPathType<PathValueType, TypeKey extends TypeKeyBaseType> = Pa
? InferSchemaType<PathValueType>
: ResolvePathType<
PathValueType extends PathWithTypePropertyBaseType<TypeKey> ? PathValueType[TypeKey] : PathValueType,
- PathValueType extends PathWithTypePropertyBaseType<TypeKey> ? Omit<PathValueType, TypeKey> : {}
+ PathValueType extends PathWithTypePropertyBaseType<TypeKey> ? Omit<PathValueType, TypeKey> : {},
+ TypeKey
>;
/**
@@ -153,7 +167,7 @@ type PathEnumOrString<T extends SchemaTypeOptions<string>['enum']> = T extends (
* @param {Options} Options Document definition path options except path type.
* @returns Number, "Number" or "number" will be resolved to string type.
*/
-type ResolvePathType<PathValueType, Options extends SchemaTypeOptions<PathValueType> = {}> =
+type ResolvePathType<PathValueType, Options extends SchemaTypeOptions<PathValueType> = {}, TypeKey extends TypeKeyBaseType = DefaultTypeKey> =
PathValueType extends Schema ? InferSchemaType<PathValueType> :
PathValueType extends (infer Item)[] ? IfEquals<Item, never, any, ResolvePathType<Item>>[] :
PathValueType extends StringSchemaDefinition ? PathEnumOrString<Options['enum']> :
@@ -169,5 +183,5 @@ type ResolvePathType<PathValueType, Options extends SchemaTypeOptions<PathValueT
IfEquals<PathValueType, ObjectConstructor> extends true ? any:
IfEquals<PathValueType, {}> extends true ? any:
PathValueType extends typeof SchemaType ? PathValueType['prototype'] :
- PathValueType extends {} ? PathValueType :
+ PathValueType extends Record<string, any> ? ObtainDocumentType<PathValueType, any, TypeKey> :
unknown;
| 1 |
diff --git a/character-controller.js b/character-controller.js @@ -236,6 +236,11 @@ class StatePlayer extends PlayerBase {
if (!cancelFn.isLive()) return;
this.avatar = nextAvatar;
+ this.dispatchEvent({
+ type: 'avatarchange',
+ app,
+ });
+
const avatarHeight = this.avatar.height;
const heightFactor = 1.6;
const contactOffset = 0.1/heightFactor * avatarHeight;
| 0 |
diff --git a/src/components/Card/ShareOptions.js b/src/components/Card/ShareOptions.js // @flow
import React from "react"
+import { useLocation } from "react-router";
+
import URLs from "common/urls";
+import { getParams, getParamValueFor } from "common/utils";
+
+
+const ShareOptions = ({ subject, label }) => {
+ const cardLabel = `card-${label}`;
+ const hash = `#${encodeURI(cardLabel)}`;
+ const { pathname, search: query } = useLocation();
+ const url = `https://${URLs.baseUrl}${pathname}${query.replace("&", "%26")}${hash}`;
+ const urlParams = getParams(query);
+ const areaName = getParamValueFor(urlParams, "areaName", "the United Kingdom");
+ const tweetUri = (
+ `https://twitter.com/intent/tweet?url=${encodeURI(url.replace("#", "%23"))}&text=` +
+ encodeURI(
+ `See latest charts & data for "${subject}" in ${ areaName } on ` +
+ `#UKCovid19 Dashboard.\n`
+ ).replace("#", "%23").replace("&", "%26")
+ );
-const ShareOptions = ({ subject, label, pathname }) => {
+ const body = `See latest charts and data for "${subject}" in ${ areaName }
+on the official UK Coronavirus Dashboard:
- const hash = "#card-heading-" + encodeURI(label);
- const enc_hash = hash.replace("#", "%23");
- const baseUrl = URLs["baseUrl"];
- const tweetUri = "https://twitter.com/intent/tweet?url=" +
- encodeURI(`${baseUrl}${pathname}`) + enc_hash + encodeURI(`&text=${subject} -`)
+${url}
- const copy_to_clipboard = (href) => {
- let textField = document.createElement('textarea');
- textField.innerText = "" + href;
+Click on the link or copy and paste it into your browser.
+`;
+
+
+ const copy_to_clipboard = () => {
+ const textField = document.createElement('textarea');
+ textField.innerText = url;
document.body.appendChild(textField);
textField.select();
document.execCommand('copy');
@@ -26,24 +46,23 @@ const ShareOptions = ({ subject, label, pathname }) => {
<a id={`copy-url-${label}`}
className={ 'govuk-link govuk-link--no-visited-state' }
- onClick={ (e) => copy_to_clipboard(e.target.href) }
- rel={ 'noreferrer noopener' }
- href={ `${pathname}${hash}` }>
- Copy Link
+ onClick={ copy_to_clipboard }
+ href={ hash }>
+ Copy link
</a>
<a className={ 'govuk-link govuk-link--no-visited-state' }
rel={ 'noreferrer noopener' }
- target="_blank"
- href={encodeURI(`mailto:?Subject=Coronavirus Dashboard - ${subject}&body=${baseUrl}${pathname}${hash}`)}>
+ target={ "_blank" }
+ href={encodeURI(`mailto:?Subject=Coronavirus Dashboard - ${subject}&body=${body}`)}>
Email
</a>
<a className={ 'govuk-link govuk-link--no-visited-state' }
rel={ 'noreferrer noopener' }
- target="_blank"
+ target={ "_blank" }
href={ tweetUri }>
- Twitter
+ Tweet
</a>
</>
| 7 |
diff --git a/src/article/models/modelConstants.js b/src/article/models/modelConstants.js // annotations that are simple annotations
-export const RICH_TEXT_ANNOS = ['bold', 'italic', 'small-caps', 'superscript', 'subscript']
+export const RICH_TEXT_ANNOS = ['bold', 'italic', 'superscript', 'subscript']
-export const EXTENDED_FORMATTING = ['monospace', 'strike-through', 'underline', 'overline']
+export const EXTENDED_FORMATTING = ['monospace', 'small-caps', 'strike-through', 'underline', 'overline']
export const LINKS_AND_XREFS = ['xref', 'external-link']
| 5 |
diff --git a/assets/src/edit-story/components/library/panes/media/common/paginatedMediaGallery.js b/assets/src/edit-story/components/library/panes/media/common/paginatedMediaGallery.js @@ -45,6 +45,7 @@ import {
MediaGalleryMessage,
} from '../common/styles';
import { ReactComponent as UnsplashLogoFull } from '../../../../../icons/unsplash_logo_full.svg';
+import theme from '../../../../../theme';
import { ProviderType } from './providerType';
const ROOT_MARGIN = 300;
@@ -64,8 +65,8 @@ const AttributionPill = styled.div`
`;
const LOGO_PROPS = {
- fill: '#fff',
- 'marginLeft': '6px',
+ fill: theme.colors.fg.v1,
+ marginLeft: '6px',
height: '14px',
};
| 4 |
diff --git a/packages/cli/src/utils/runWithTruffle.js b/packages/cli/src/utils/runWithTruffle.js @@ -14,7 +14,9 @@ export default async function runWithTruffle(script, options) {
config.network = network
Contracts.setSyncTimeout((_.isNil(timeout) ? DEFAULT_TIMEOUT : timeout) * 1000)
if (options.compile) await Truffle.compile(config)
- initTruffle(config).then(() => script({ network, txParams }))
+ await initTruffle(config)
+ await script({ network, txParams })
+ process.exit(0)
}
function initTruffle(config) {
| 0 |
diff --git a/embark-ui/src/components/Blocks.js b/embark-ui/src/components/Blocks.js @@ -17,7 +17,7 @@ const Blocks = ({blocks, showLoadMore, loadMore}) => (
{blocks.map(block => (
<div className="explorer-row" key={block.number}>
<CardTitleIdenticon id={block.hash}>Block
- <Link className="align-top" to={`/embark/explorer/blocks/${block.number}`}>
+ <Link to={`/embark/explorer/blocks/${block.number}`}>
{block.number}
</Link>
</CardTitleIdenticon>
| 2 |
diff --git a/app/templates/_package.json b/app/templates/_package.json "require-dir": "^1.0.0",
<% if (client === "ng1") { %>
"angular-mocks": "^1.6.10",
+ "gulp-angular-embed-templates": "^2.3.0",
+ "gulp-nginclude": "^0.4.8",
<% } %>
"gulp-babel": "^7.0.1",
"gulp-concat": "^2.4.3",
"gulp-typescript": "~4.0.2",
"gulp-clean-css": "^2.0.3",
"gulp-rename": "^1.2.0",
- "gulp-angular-embed-templates": "^2.3.0",
- "gulp-nginclude": "^0.4.8",
"gulp-uglify": "^3.0.0",
"gulp-rev": "^7.1.2",
"gulp-usemin": "^0.3.24",
| 5 |
diff --git a/test/RewardsIntegrationTests.js b/test/RewardsIntegrationTests.js @@ -357,15 +357,45 @@ contract('Rewards Integration Tests', async accounts => {
await synthetix.mint({ from: owner });
// Only Account 1 claims rewards
- // await logFeesByPeriod(account1);
const rewardsAmount = third(periodOneMintableSupplyMinusMinterReward);
const feesByPeriod = await feePoolWeb3.methods.feesByPeriod(account1).call();
+ // await logFeesByPeriod(account1);
+ // [1] ---------------------feesByPeriod----------------------
+ // [1] Account 0xa4E5a88e601847Be0021582fC8fa4E760B342f4e
+ // [1] Fee Period[0] Fees: 0 Rewards: 480702564102564102564102
+ // [1] Fee Period[1] Fees: 0 Rewards: 480702564102564102564102
+ // [1] Fee Period[2] Fees: 0 Rewards: 0
+ // [1] Fee Period[3] Fees: 0 Rewards: 480702564102564102564102
+ // [1] Fee Period[4] Fees: 0 Rewards: 480702564102564102564102
+ // [1] Fee Period[5] Fees: 0 Rewards: 480702564102564102564102
+ // [1] --------------------------------------------------------
+
assert.bnEqual(feesByPeriod[0][1], rewardsAmount);
assert.bnEqual(feesByPeriod[1][1], rewardsAmount);
- assert.bnEqual(feesByPeriod[2][1], 0, '1');
+ assert.bnEqual(feesByPeriod[2][1], 0);
assert.bnEqual(feesByPeriod[3][1], rewardsAmount);
assert.bnEqual(feesByPeriod[4][1], rewardsAmount);
+ assert.bnEqual(feesByPeriod[5][1], rewardsAmount);
+
+ // Only 1 account claims rewards
+ feePool.claimFees(sUSD, { from: account1 });
+
+ // await logFeesByPeriod(account1);
+ // ] ---------------------feesByPeriod----------------------
+ // [1] Account 0xa4E5a88e601847Be0021582fC8fa4E760B342f4e
+ // [1] Fee Period[0] Fees: 0 Rewards: 480702564102564102564102
+ // [1] Fee Period[1] Fees: 0 Rewards: 0
+ // [1] Fee Period[2] Fees: 0 Rewards: 0
+ // [1] Fee Period[3] Fees: 0 Rewards: 0
+ // [1] Fee Period[4] Fees: 0 Rewards: 0
+ // [1] Fee Period[5] Fees: 0 Rewards: 0
+ // [1] --------------------------------------------------------
+
+ // Assert account 1 has all their rewards minus the week they left the system
+ const totalRewardsClaimable = rewardsAmount.mul(web3.utils.toBN('4'));
+ const account1EscrowEntry = await rewardEscrow.getVestingScheduleEntry(account1, 0);
+ assert.bnEqual(account1EscrowEntry[1], totalRewardsClaimable);
});
// it('should allocate correct SNX rewards as others leave the system', async () => {
| 3 |
diff --git a/Readme.md b/Readme.md @@ -46,14 +46,3 @@ Before doing this be sure you ran the script to build gooni:
```
GOONI_DIR=/path/to/gooni ./scripts/build-binaries.sh
```
-
-### Troubleshooting
-
-You may encounter (particularly in the results page) errors related to the
-`sqlite3` module not being found. If that happens you will have to rebuild
-electron with your current sqlite3 version with:
-
-```
-npm run electron-rebuild
-```
-
| 2 |
diff --git a/test/Integration/http2-test.js b/test/Integration/http2-test.js @@ -3,7 +3,7 @@ const Lab = require('@hapi/lab');
const Helper = require('../helper.js');
const Validate = require('../../lib/validate.js');
const Http2 = require('http2');
-const Fs = require('fs/promises');
+const Fs = require('fs').promises;
const Path = require('path');
const expect = Code.expect;
| 1 |
diff --git a/src/Model/helpers.js b/src/Model/helpers.js @@ -27,13 +27,14 @@ export async function fetchChildren(model: Model): Promise<Model[]> {
const childrenKeys = Object.keys(associations).filter(key => associations[key].type === 'has_many')
const promises = childrenKeys.map(async key => {
- let children = await model[key].fetch()
+ const children = await model[key].fetch()
const childrenPromises = children.map(async child => {
return fetchChildren(child)
})
- const results = await Promise.all(childrenPromises)
- results.forEach(res => {children = children.concat(res)})
- return children
+ const grandchildren = await Promise.all(childrenPromises)
+ let result = []
+ grandchildren.forEach(elt => {result = [...result, ...elt]})
+ return [...result, ...children]
})
const results = await Promise.all(promises)
| 7 |
diff --git a/automod/triggers.go b/automod/triggers.go @@ -668,7 +668,7 @@ func (s *SlowmodeTrigger) Description() string {
return "Triggers when a user has x attachments within y seconds in a single channel"
}
if s.Links {
- return "Triggers when a channel has x links within y seconds"
+ return "Triggers when a user has x links within y seconds in a single channel"
}
return "Triggers when a user has x messages in y seconds in a single channel."
}
| 1 |
diff --git a/articles/api/authentication/_userinfo.md b/articles/api/authentication/_userinfo.md @@ -91,18 +91,14 @@ This endpoint will work only if `openid` was granted as a scope for the `access_
### Remarks
- The sample auth0.js script uses the library version 8. If you are using auth0.js version 7, please see this [reference guide](/libraries/auth0js/v7).
- The auth0.js `parseHash` method, requires that your tokens are signed with `RS256`, rather than `HS256`. For more information about this, check the [Auth0.js v8 Migration Guide](/libraries/auth0js/migration-guide#the-parsehash-method).
-- This API endpoint will return a HTTP Response Header that provides relevant data on the endpoint [rate limit](/policies/rate-limits). This includes numeric information detailing your status:
-
-**X-RateLimit-Limit**: Request limit
-
-**X-RateLimit-Remaining**: Requests available for the current time frame
-
-**X-RateLimit-Reset**: Time until the rate limit resets (in UTC epoch seconds)
-
-
+- This endpoint will return three HTTP Response Headers, that provide relevant data on its rate limits:
+ `X-RateLimit-Limit`: Number of requests allowed per minute.
+ `X-RateLimit-Remaining`: Number of requests available. Each new request reduces this number by 1. For each minute that passes, requests are added back, so this number increases by 1 each time.
+ `X-RateLimit-Reset`: Remaining time until the rate limit (`X-RateLimit-Limit`) resets. The value is in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time).
### More Information
- [Auth0.js v8 Reference: Extract the authResult and get user info](/libraries/auth0js#extract-the-authresult-and-get-user-info)
+- [Auth0 API Rate Limit Policy](/policies/rate-limits)
## Get Token Info
| 0 |
diff --git a/examples/loadtest/client.js b/examples/loadtest/client.js @@ -19,14 +19,12 @@ let broker = new ServiceBroker({
console.log("Client started. nodeID:", broker.nodeID, " PID:", process.pid);
function work() {
- const p = Promise.all(times(100, () => {
let payload = { a: random(0, 100), b: random(0, 100) };
- return broker.call("math.add", payload)
+ const p = broker.call("math.add", payload)
.then(() => broker._callCount++)
.catch(err => console.warn(err.message));
- }));
- if (broker.transit.pendingRequests.size < 10 * 1000)
+ if (broker.transit.pendingRequests.size < 1 * 1000)
setImmediate(work);
else
p.then(() => setImmediate(work));
| 3 |
diff --git a/src/libs/actions/User.js b/src/libs/actions/User.js @@ -267,7 +267,8 @@ function triggerNotifications(onyxUpdates) {
const reportAction = _.chain(update.value)
.values()
.compact()
- .first()
+ .sort((actionA, actionB) => moment(actionA).unix() - moment(actionB).unix())
+ .last() // We want to notify for the most recent action
.value();
Report.showReportActionNotification(reportID, reportAction);
});
| 4 |
diff --git a/src/og/control/Sun.js b/src/og/control/Sun.js @@ -10,7 +10,6 @@ import { LightSource } from "../light/LightSource.js";
import { Quat } from "../math/Quat.js";
import { Vec3 } from "../math/Vec3.js";
-const ACTIVATION_HEIGHT = 12079000.0;
/**
* Real Sun geocentric position control that place the Sun on the right place by the Earth.
* @class
@@ -39,6 +38,8 @@ class Sun extends Control {
*/
// this._isCameraSunlight = false;
+ this.activationHeight = options.activationHeight || 12079000.0;
+
this.offsetVertical = options.offsetVertical || -5000000;
this.offsetHorizontal = options.offsetHorizontal || 5000000;
@@ -106,7 +107,7 @@ class Sun extends Control {
this._currDate = this._clockPtr.currentDate;
if (!this._stopped) {
var cam = this.renderer.activeCamera;
- if (cam.getHeight() < ACTIVATION_HEIGHT || !this._active) {
+ if (cam.getHeight() < this.activationHeight || !this._active) {
this._lightOn = true;
this._f = 1;
var n = cam.eye.normal(),
| 11 |
diff --git a/src/background/app.js b/src/background/app.js @@ -186,10 +186,13 @@ const commands = {
});
},
SetClipboard: setClipboard,
- TabOpen(data) {
+ TabOpen(data, src) {
+ const srcTab = src.tab || {};
return browser.tabs.create({
url: data.url,
active: data.active,
+ windowId: srcTab.windowId,
+ index: srcTab.index + 1,
})
.then(tab => ({ id: tab.id }));
},
| 1 |
diff --git a/test/jasmine/tests/heatmap_test.js b/test/jasmine/tests/heatmap_test.js @@ -589,4 +589,38 @@ describe('heatmap hover', function() {
});
});
+ describe('for xyz-column traces', function() {
+
+ beforeAll(function(done) {
+ gd = createGraphDiv();
+
+ Plotly.plot(gd, [{
+ type: 'heatmap',
+ x: [1, 2, 3],
+ y: [1, 1, 1],
+ z: [10, 4, 20],
+ text: ['a', 'b', 'c'],
+ hoverinfo: 'text'
+ }])
+ .then(done);
+ });
+
+ afterAll(destroyGraphDiv);
+
+ it('should find closest point and should', function(done) {
+ var pt = _hover(gd, 0.5, 0.5)[0];
+
+ expect(pt.index).toEqual([0, 0], 'have correct index');
+ assertLabels(pt, 1, 1, 10, 'a');
+
+ Plotly.relayout(gd, 'xaxis.range', [1, 2]).then(function() {
+ var pt2 = _hover(gd, 1.5, 0.5)[0];
+
+ expect(pt2.index).toEqual([0, 1], 'have correct index');
+ assertLabels(pt2, 2, 1, 4, 'b');
+ })
+ .then(done);
+ });
+
+ });
});
| 0 |
diff --git a/generators/client/templates/react/src/main/webapp/app/modules/administration/user-management/user-management.tsx.ejs b/generators/client/templates/react/src/main/webapp/app/modules/administration/user-management/user-management.tsx.ejs @@ -132,11 +132,11 @@ export class UserManagement extends React.Component<IUserManagementProps, IPagin
<td>{user.email}</td>
<td>
{user.activated ? (
- <Button color="success" onClick={this.toggleActive({ user }) }>
+ <Button color="success" onClick={this.toggleActive(user) }>
Activated
</Button>
) : (
- <Button color="danger" onClick={this.toggleActive({ user }) }>
+ <Button color="danger" onClick={this.toggleActive(user) }>
Deactivated
</Button>
)}
| 2 |
diff --git a/contribs/gmf/src/datasource/ExternalDataSourcesManager.js b/contribs/gmf/src/datasource/ExternalDataSourcesManager.js @@ -322,6 +322,8 @@ const exports = class {
const id = exports.getId(layer);
const service = capabilities['Service'];
+ url = url !== undefined ? url : service['OnlineResource'];
+
let dataSource;
// (1) Get data source from cache if it exists, otherwise create it
| 4 |
diff --git a/src/js/wallet/card.deposit.controller.js b/src/js/wallet/card.deposit.controller.js max: Number(response.max)
};
}).catch(function (response) {
- notificationService.error(response.message);
+ remotePartyErrorHandler('get limits', response);
});
updateReceiveAmount();
}
+ function remotePartyErrorHandler(operationName, response) {
+ if (response) {
+ if (response.data)
+ notificationService.error(response.data.message);
+ else if (response.statusText)
+ notificationService.error('Failed to ' + operationName + '. Error code: ' + response.status +
+ '<br/>Message: ' + response.statusText);
+ }
+ else {
+ notificationService.error('Operation failed: ' + operationName);
+ }
+ }
+
function updateReceiveAmount() {
if (deferred) {
deferred.reject();
card.getAmount = '';
}
}).catch(function (value) {
- if (value && value.message)
- notificationService.error(value.message);
+ remotePartyErrorHandler('get rates', value);
});
fiatService.getRate(applicationContext.account.address, card.payAmount, card.payCurrency.code, card.crypto)
| 7 |
diff --git a/src/core/operations/DNSOverHTTPS.mjs b/src/core/operations/DNSOverHTTPS.mjs @@ -51,11 +51,27 @@ class DNSOverHTTPS extends Operation {
value: [
"A",
"AAAA",
- "TXT",
- "MX",
+ "ANAME",
+ "CERT",
+ "CNAME",
"DNSKEY",
+ "HTTPS",
+ "IPSECKEY",
+ "LOC",
+ "MX",
"NS",
- "PTR"
+ "OPENPGPKEY",
+ "PTR",
+ "RRSIG",
+ "SIG",
+ "SOA",
+ "SPF",
+ "SRV",
+ "SSHFP",
+ "TA",
+ "TXT",
+ "URI",
+ "ANY"
]
},
{
| 0 |
diff --git a/webpack.config.js b/webpack.config.js @@ -187,30 +187,6 @@ module.exports = ( env, argv ) => {
extractComments: false,
} ),
],
- splitChunks: {
- cacheGroups: {
- default: false,
- vendors: false,
-
- // vendor chunk
- vendor: {
- name: 'vendor',
- chunks: 'all',
- test: /node_modules/,
- priority: 20,
- },
-
- // commons chunk
- commons: {
- name: 'commons',
- minChunks: 2,
- chunks: 'initial',
- priority: 10,
- reuseExistingChunk: true,
- enforce: true,
- },
- },
- },
},
externals,
resolve,
| 2 |
diff --git a/www/views/advancedSettings.html b/www/views/advancedSettings.html <span class="toggle-label" translate>Play Sounds</span>
</ion-toggle>
<div class="comment" translate>
- If enabled, sounds will be played whenever you send, recieve, change representative, or unlock your wallet.
+ If enabled, sounds will be played whenever you send, receive, change representative, or unlock your wallet.
</div>
<div class="item item-divider"></div>
| 1 |
diff --git a/modules/xerte/parent_templates/Nottingham/models_html5/QRcode.html b/modules/xerte/parent_templates/Nottingham/models_html5/QRcode.html this.init = function() {
// Load in the required scripts before we can begin
// Uses new loadjs
- loadjs([x_templateLocation + 'common_html5/js/qrcode/qrcode.min.js'], {
+ loadjs.path(x_templateLocation + 'common_html5/js/qrcode/');
+ loadjs(['qrcode.min.js'], {
success: function() {
QRcode.begin();
}
| 1 |
diff --git a/src/sockets/sockets.ts b/src/sockets/sockets.ts @@ -2817,7 +2817,7 @@ function joinGame(roomId) {
// if the room has not started yet, throw them into the room
// console.log("Game status is: " + rooms[roomId].getStatus());
- if (rooms[roomId].getStatus() === 'Waiting') {
+ if (rooms[roomId].getStatus() === 'Waiting' && this.request.user.inRoomId === roomId) {
const ToF = rooms[roomId].playerSitDown(this);
console.log(
`${this.request.user.username} has joined room ${roomId}: ${ToF}`,
| 1 |
diff --git a/pages/docs/reference/java-interop.md b/pages/docs/reference/java-interop.md @@ -161,12 +161,12 @@ Some non-primitive built-in classes are also mapped:
Java's boxed primitive types are mapped to nullable Kotlin types:
| **Java type** | **Kotlin type** |
-|---------------------|------------------|
+|-------------------------|------------------|
| `java.lang.Byte` | `kotlin.Byte?` |
| `java.lang.Short` | `kotlin.Short?` |
| `java.lang.Integer` | `kotlin.Int?` |
| `java.lang.Long` | `kotlin.Long?` |
-| `java.lang.Char` | `kotlin.Char?` |
+| `java.lang.Character` | `kotlin.Char?` |
| `java.lang.Float` | `kotlin.Float?` |
| `java.lang.Double` | `kotlin.Double?` |
| `java.lang.Boolean` | `kotlin.Boolean?` |
| 14 |
diff --git a/app/assets/src/components/views/nextclade/NextcladeModal.jsx b/app/assets/src/components/views/nextclade/NextcladeModal.jsx @@ -115,30 +115,14 @@ export default class NextcladeModal extends React.Component {
};
handleFileUpload = async file => {
- const fileContents = await this.readUploadedFile(file);
+ // Stringify, then parse to remove excess whitespace
+ const fileContents = JSON.stringify(JSON.parse(await file.text()));
this.setState({
referenceTree: file,
referenceTreeContents: fileContents,
});
};
- readUploadedFile = inputFile => {
- const reader = new FileReader();
-
- return new Promise((resolve, reject) => {
- reader.onerror = () => {
- reader.abort();
- reject(reader.error);
- };
-
- reader.onload = () => {
- // stringify-parse to remove excess whitespace
- resolve(JSON.stringify(JSON.parse(reader.result)));
- };
- reader.readAsText(inputFile);
- });
- };
-
handleSelectTreeType = selectedTreeType => {
this.setState({
selectedTreeType,
| 14 |
diff --git a/src/components/SearchFilter.js b/src/components/SearchFilter.js import React, { Component } from 'react';
import { connect } from 'react-redux';
-import { mapValues, xor } from 'lodash';
+import { mapValues, size, xor } from 'lodash';
import { endpoint } from '../api';
import filters from '../filters';
@@ -60,8 +60,12 @@ class SearchFilter extends Component {
onCountriesOpen() {
if (this.state.queryCountries === null) {
- endpoint.get('search', {params: {q: this.state.query.q, facet: 'countries'}})
- .then(({ data }) => this.setState({
+ endpoint.get('search', {params: {
+ q: this.state.query.q,
+ facet: 'countries',
+ facet_size: this.props.countriesCount,
+ limit: 0
+ }}).then(({ data }) => this.setState({
queryCountries: data.facets.countries.values
}));
}
@@ -69,8 +73,12 @@ class SearchFilter extends Component {
onCollectionsOpen() {
if (this.state.queryCollectionIds === null) {
- endpoint.get('search', {params: {q: this.props.queryText, facet: 'collection_id'}})
- .then(({ data }) => this.setState({
+ endpoint.get('search', {params: {
+ q: this.props.queryText,
+ facet: 'collection_id',
+ facet_size: this.props.collectionsCount,
+ limit: 0
+ }}).then(({ data }) => this.setState({
queryCollectionIds: data.facets.collection_id.values.map(collection => collection.id)
}));
}
@@ -141,7 +149,9 @@ class SearchFilter extends Component {
const mapStateToProps = ({ metadata, collections }) => ({
countries: metadata.countries,
- collections: mapValues(collections.results, 'label')
+ countriesCount: size(metadata.countries),
+ collections: mapValues(collections.results, 'label'),
+ collectionsCount: size(collections.results)
});
SearchFilter = connect(mapStateToProps)(SearchFilter);
| 12 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.