code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/checkfiles/checkfiles.py b/checkfiles/checkfiles.py @@ -15,6 +15,7 @@ import subprocess
import re
from urllib.parse import urljoin
import requests
+import copy
EPILOG = __doc__
@@ -797,12 +798,29 @@ def remove_local_file(path_to_the_file, errors):
pass
-def fetch_files(session, url, search_query, out, include_unexpired_upload=False):
+def fetch_files(session, url, search_query, out, include_unexpired_upload=False, file_list=None):
+ graph = []
+ if file_list:
+ r = None
+ ACCESSIONS = []
+ if os.path.isfile(file_list):
+ ACCESSIONS = [line.rstrip('\n') for line in open(file_list)]
+ for acc in ACCESSIONS:
r = session.get(
- urljoin(url, '/search/?field=@id&limit=all&type=File&datastore=database&' + search_query))
+ urljoin(url, '/search/?field=@id&limit=all&type=File&accession=' + acc))
+ r.raise_for_status()
+ out.write("PROCESSING: %d files in accessions list file : %s\n" % (len(r.json()['@graph']), file_list))
+ local = copy.deepcopy(r.json()['@graph'])
+ graph.extend(local)
+
+ else:
+ r = session.get(
+ urljoin(url, '/search/?field=@id&limit=all&type=File&' + search_query))
r.raise_for_status()
out.write("PROCESSING: %d files in query: %s\n" % (len(r.json()['@graph']), search_query))
- for result in r.json()['@graph']:
+ graph = r.json()['@graph']
+
+ for result in graph:
job = {
'@id': result['@id'],
'errors': {},
| 0 |
diff --git a/README.md b/README.md @@ -555,7 +555,7 @@ Get or set the option.
-##### closest(el:`String`[, selector:`HTMLElement`]):`HTMLElement|null`
+##### closest(el:`HTMLElement`[, selector:`String`]):`HTMLElement|null`
For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
| 1 |
diff --git a/test/templates/blueprint-cli/generators/foo/index.js b/test/templates/blueprint-cli/generators/foo/index.js @@ -2,6 +2,7 @@ const Generator = require('yeoman-generator');
module.exports = class extends Generator {
initializing() {
+ /* eslint-disable no-console */
console.log('Running foo');
}
};
| 8 |
diff --git a/README.md b/README.md @@ -19,7 +19,7 @@ Run this command to clone the repo
### 2. Install dependencies
-irst, before you can use the app, you have to run this command to install all the dependencies
+First, before you can use the app, you have to run this command to install all the dependencies
`yarn install`
### 3. Start and view the app
| 1 |
diff --git a/templates/indicators/form-sections/performance.html b/templates/indicators/form-sections/performance.html <script>
let countDisaggTypes = 0;
+ let countLabels = 0;
$(document).ready(() => {
$('#id_level').select2({
* Add disag label to given selector for disag type
*/
function addDisagLabel(selector, label) {
+ countLabels++;
$(selector).append(
$('<div>')
.addClass('row mt-10 label-group')
.attr({
- id: 'disagg_label_group'
+ id: `disagg_label_group_${countLabels}`
})
.append(
$('<div>')
.attr({
type: 'text',
autofocus: true,
- id: `id_disagg_child`
+ id: `id_disagg_child_${countLabels}`
})
.val((label && label.label) || '')
.keyup(stringifyDisags.bind(this))
.append(
$('<input>')
.attr({
- type: 'hidden'
+ type: 'hidden',
+ id: `id_disagg_child_id_${countLabels}`
})
.val((label && label.id) || null)
)
$('<button>')
.attr({ class: 'btn btn-sm', type: 'button' })
.append($('<i>').addClass('fa fa-trash'))
+ .click(removeLabel.bind(this, countLabels))
)
)
);
removeFromTemplate();
}
}
+
+ function removeLabel(appendId) {
+ const labelId = $(`#id_disagg_child_id_${appendId}`).val();
+
+ function removeFromTemplate() {
+ $(`#id_disagg_child_${appendId}`).remove();
+ }
+
+ if (labelId) {
+ // add ajax logic here
+ } else {
+ removeFromTemplate();
+ }
+ }
</script>
| 12 |
diff --git a/tests/index.html b/tests/index.html <div id="screen"></div>
<!-- include helper files here... -->
- <script type="text/javascript" src="tests/spec/helper-spec.js"></script>
+ <script type="text/javascript" src="tests/helper/helper-spec.js"></script>
<!-- include spec files here... -->
<script type="text/javascript" src="tests/spec/init.js"></script>
| 1 |
diff --git a/scripts/pipeline/checkBetaEligibility.js b/scripts/pipeline/checkBetaEligibility.js @@ -31,9 +31,14 @@ const hasEligibleFiles = changedFiles.some(filePath => {
return isEligigle
})
-if (hasEligibleFiles) {
+const isBumpVersionCommit = changedFiles.every(filePath =>
+ ['package.json', 'CHANGELOG.md'].includes(filePath)
+)
+
+if (hasEligibleFiles && !isBumpVersionCommit) {
console.log('Build has eligible files, continue to pre-release')
} else {
console.log('Skip pre-release, no changes in relevant files')
+ console.log(`isBumpVersionCommit: ${isBumpVersionCommit}`)
console.log('##vso[task.setvariable variable=SKIP_PRE_RELEASE;isOutput=true]true')
}
| 8 |
diff --git a/includes/Modules/Search_Console.php b/includes/Modules/Search_Console.php @@ -146,7 +146,6 @@ final class Search_Console extends Module implements Module_With_Screen, Module_
'sc-site-analytics' => 'webmasters',
'page-analytics' => 'webmasters',
'search-keywords' => 'webmasters',
- 'search-keywords-sort-by-impressions' => 'webmasters',
'index-status' => 'webmasters',
// POST.
@@ -244,19 +243,6 @@ final class Search_Console extends Module implements Module_With_Screen, Module_
'row_limit' => 10,
)
);
- case 'search-keywords-sort-by-impressions':
- $page = ! empty( $data['permaLink'] ) ? $data['permaLink'] : '';
- $date_range = ! empty( $data['date_range'] ) ? $data['date_range'] : 'last-28-days';
- $date_range = $this->parse_date_range( $date_range, 1, 3 );
- return $this->create_search_analytics_data_request(
- array(
- 'dimensions' => array( 'query' ),
- 'start_date' => $date_range[0],
- 'end_date' => $date_range[1],
- 'page' => $page,
- 'row_limit' => 100,
- )
- );
case 'index-status':
return $this->create_search_analytics_data_request(
array(
@@ -492,7 +478,6 @@ final class Search_Console extends Module implements Module_With_Screen, Module_
case 'page-analytics':
case 'search-keywords':
case 'index-status':
- case 'search-keywords-sort-by-impressions':
$response_data = $response->getRows();
usort(
$response_data,
| 2 |
diff --git a/lib/github-url.ts b/lib/github-url.ts /* eslint-disable no-useless-escape, guard-for-in, no-restricted-syntax */
/* tslint:disable:forin */
-import { named } from "named-regexp";
+// tslint:disable-next-line:no-var-requires (no types for named-regexp)
+const { named } = require("named-regexp");
const base = "(?:https:\/\/github.com\/)?";
const owner = "(:<owner>[^\/]+)";
| 4 |
diff --git a/tests/scripts/check_metadata.sh b/tests/scripts/check_metadata.sh # Q1 2020 3.20200402.0 619341
# Q2 2020 3.20200625.0 621811
# Q3 2020 3.20200924.0 641216
-blockly_size_expected=641216
+# Q4 2020 4.20201217.0 653624
+blockly_size_expected=653624
# Size of blocks_compressed.js
# Q2 2019 2.20190722.0 75618
@@ -21,7 +22,8 @@ blockly_size_expected=641216
# Q1 2020 3.20200402.0 75805
# Q2 2020 3.20200625.0 76360
# Q3 2020 3.20200924.0 76429
-blocks_size_expected=76429
+# Q4 2020 4.20201217.0 76693
+blocks_size_expected=76693
# Size of blockly_compressed.js.gz
# Q2 2019 2.20190722.0 180925
@@ -30,7 +32,8 @@ blocks_size_expected=76429
# Q1 2020 3.20200402.0 134133
# Q2 2020 3.20200625.0 135181
# Q3 2020 3.20200924.0 138003
-blockly_gz_size_expected=138003
+# Q4 2020 4.20201217.0 138115
+blockly_gz_size_expected=138115
# Size of blocks_compressed.js.gz
# Q2 2019 2.20190722.0 14552
@@ -39,7 +42,8 @@ blockly_gz_size_expected=138003
# Q1 2020 3.20200402.0 14966
# Q2 2020 3.20200625.0 15195
# Q3 2020 3.20200924.0 15231
-blocks_gz_size_expected=15231
+# Q4 2020 4.20201217.0 15224
+blocks_gz_size_expected=15224
# ANSI colors
BOLD_GREEN='\033[1;32m'
| 3 |
diff --git a/app/shared/containers/Tools.js b/app/shared/containers/Tools.js @@ -229,7 +229,8 @@ class ToolsContainer extends Component<Props> {
}
}
return (
- (walletTemp && pane.modes.includes('temp'))
+ !walletMode
+ || (walletTemp && pane.modes.includes('temp'))
|| (!skipImport && !walletTemp && pane.modes.includes(walletMode))
|| (skipImport && pane.modes.includes('skip'))
);
| 11 |
diff --git a/README.md b/README.md @@ -412,7 +412,7 @@ const whisper = volume({ whisper: true });
console.dir(whisper.transform({
level: 'info',
message: `WHY ARE THEY MAKING US YELL SO MUCH!`
-}), whisper.options);
+}, whisper.options));
// {
// level: 'info'
// message: 'why are they making us yell so much!'
@@ -653,7 +653,7 @@ when it's created or later on in your applications lifecycle:
const { createLogger, transports } = require('winston');
// Enable exception handling when you create your logger.
-const logger = winston.createLogger({
+const logger = createLogger({
transports: [
new transports.File({ filename: 'combined.log' })
],
@@ -663,7 +663,7 @@ const logger = winston.createLogger({
});
// Or enable it later on by adding a transport or using `.exceptions.handle`
-const logger = winston.createLogger({
+const logger = createLogger({
transports: [
new transports.File({ filename: 'combined.log' })
]
| 1 |
diff --git a/public/src/lobby/GameOptions.jsx b/public/src/lobby/GameOptions.jsx @@ -34,7 +34,7 @@ const Regular = ({ sets, type }) => (
<Select
value={sets.length}
onChange={App._emit("changeSetsNumber", type)}
- opts={_.seq(12, 3)} />
+ opts={_.seq(12, 1)} />
</div>
<div className="wrapper">
<Sets sets={sets} type={type} />
| 12 |
diff --git a/README.md b/README.md @@ -59,7 +59,7 @@ Using Metallic-Roughness to Shade
Once we have read in these values and passed them into the fragment shader correctly, we need to compute the final color of each fragment. Without going too far into the theory behind PBR, this is how this demo application computes the color.
-It is first important to choose a microfacet model to describe how light interacts with a surface. In this project, I use the [Cook-Torrance Model](https://renderman.pixar.com/view/cook-torrance-shader) to compute lighting. However, there is a large difference between doing this based on lights within a scene versus an environment map. With discrete lights, we could just evaluate the BRDF with respect to each light and average the results to obtain the overall color, but this is not ideal if you want a scene to have complex lighting that comes from many sources.
+It is first important to choose a microfacet model to describe how light interacts with a surface. In this project, I use the [Cook-Torrance Model](https://web.archive.org/web/20160826022208/https://renderman.pixar.com/view/cook-torrance-shader) to compute lighting. However, there is a large difference between doing this based on lights within a scene versus an environment map. With discrete lights, we could just evaluate the BRDF with respect to each light and average the results to obtain the overall color, but this is not ideal if you want a scene to have complex lighting that comes from many sources.
### Environment Maps
| 14 |
diff --git a/test_apps/test_app/app/contracts/simple_storage.sol b/test_apps/test_app/app/contracts/simple_storage.sol @@ -2,7 +2,9 @@ pragma solidity ^0.4.25;
contract SimpleStorage {
uint public storedData;
+ address public registar;
address owner;
+ event EventOnSet2(bool passed, string message);
constructor(uint initialValue) public {
storedData = initialValue;
@@ -11,13 +13,26 @@ contract SimpleStorage {
function set(uint x) public {
storedData = x;
- require(msg.sender == owner);
+ //require(msg.sender == owner);
//require(msg.sender == 0x0);
- storedData = x + 2;
+ //storedData = x + 2;
+ }
+
+ function set2(uint x) public {
+ storedData = x;
+ emit EventOnSet2(true, "hi");
}
function get() public view returns (uint retVal) {
return storedData;
}
+ function getS() public pure returns (string d) {
+ return "hello";
+ }
+
+ function setRegistar(address x) public {
+ registar = x;
+ }
+
}
| 13 |
diff --git a/src/scripts/interaction.js b/src/scripts/interaction.js @@ -733,8 +733,16 @@ function Interaction(parameters, player, previousState) {
player.play();
}
+ let time = event.data;
+ if (time === parameters.duration.from) {
+ // Adding 200ms here since people are using this as a resume feature
+ // and some players are inaccurate when seeking so we don't want them
+ // to end up before the interaction is displayed...
+ time += 0.2;
+ }
+
// Jump to chosen timecode
- player.seek(event.data);
+ player.seek(time);
};
/**
| 0 |
diff --git a/library/styleguideComponents/StyleGuide/styles.css b/library/styleguideComponents/StyleGuide/styles.css .react-rainbow-styleguide_twitter-link {
height: 32px;
width: 32px;
+ position: relative;
border-radius: 32px;
background-color: #d7dae8;
display: flex;
| 1 |
diff --git a/src/pages/EnterpriseShared/index.js b/src/pages/EnterpriseShared/index.js @@ -194,11 +194,13 @@ export default class EnterpriseShared extends PureComponent {
this.handleOpencreateAppMarket();
return null;
}
+
const { marketTab, helmTab } = this.state;
let arr = [];
arr = marketTab.filter(item => {
return item.ID === Number(tabID);
});
+
let helms = [];
helms = helmTab.filter(item => {
return item.name === tabID;
@@ -206,6 +208,7 @@ export default class EnterpriseShared extends PureComponent {
const isArr = arr && arr.length > 0;
const isHelms = helms && helms.length > 0;
+
const showCloudMarketAuth =
// (isArr && arr[0].access_key === '' && arr[0].domain === 'rainbond') ||
false;
@@ -1024,13 +1027,7 @@ export default class EnterpriseShared extends PureComponent {
style={{ background: '#fff' }}
onClick={e => {
e.stopPropagation();
- if (isReadInstall) {
this.installHelmApp(item, types);
- } else {
- this.setState({
- showCloudMarketAuth: true
- });
- }
}}
>
{globalUtil.fetchSvg('InstallApp')}
@@ -1665,6 +1662,7 @@ export default class EnterpriseShared extends PureComponent {
onCheckedValues={this.onChangeBounced}
/>
)}
+
{showCloudMarketAuth && (
<AuthCompany
eid={eid}
| 1 |
diff --git a/plugins/removeAttrs.js b/plugins/removeAttrs.js 'use strict';
-var ELEM_SEP = ':';
+var DEFAULT_SEPARATOR = ':';
exports.type = 'perItem';
@@ -9,12 +9,16 @@ exports.active = false;
exports.description = 'removes specified attributes';
exports.params = {
+ elemSeparator: DEFAULT_SEPARATOR,
attrs: []
};
/**
* Remove attributes
*
+ * @param elemSeparator
+ * format: string
+ *
* @param attrs:
*
* format: [ element* : attribute* ]
@@ -72,17 +76,18 @@ exports.fn = function(item, params) {
}
if (item.isElem()) {
+ var elemSeparator = typeof params.elemSeparator == 'string' ? params.elemSeparator : DEFAULT_SEPARATOR;
// prepare patterns
var patterns = params.attrs.map(function(pattern) {
// apply to all elements if specifc element is omitted
- if (pattern.indexOf(ELEM_SEP) === -1) {
- pattern = ['.*', ELEM_SEP, pattern].join('');
+ if (pattern.indexOf(elemSeparator) === -1) {
+ pattern = ['.*', elemSeparator, pattern].join('');
}
// create regexps for element and attribute name
- return pattern.split(ELEM_SEP)
+ return pattern.split(elemSeparator)
.map(function(value) {
// adjust single * to match anything
| 11 |
diff --git a/scripts/tosdr.js b/scripts/tosdr.js @@ -41,7 +41,15 @@ function getSitePoints (sites) {
// get the detailed points data for this site
request.get(url, (err, res, body) => {
let points = {score: 0, all: {bad: [], good: []}, match: {bad: [], good: []}}
- let allData = JSON.parse(body)
+ let allData
+
+ try {
+ allData = JSON.parse(body)
+ } catch (e) {
+ console.log(`error getting privacy data for: ${site}`)
+ return resolve(getSitePoints(sites))
+ }
+
let pointsData = allData.pointsData
let relatedUrls = allData.urls || []
| 9 |
diff --git a/src/js/modules/download.js b/src/js/modules/download.js @@ -58,9 +58,7 @@ Download.prototype.processConfig = function(){
}
}
- if (config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows")){
- this.config.rowGroups = true;
- }
+ this.config.rowGroups = config.rowGroups && this.table.options.groupBy && this.table.modExists("groupRows");
if (config.columnGroups && this.table.columnManager.columns.length != this.table.columnManager.columnsByIndex.length){
this.config.columnGroups = true;
| 12 |
diff --git a/docs/_config.yml b/docs/_config.yml @@ -51,3 +51,13 @@ url: https://www.apollographql.com/docs
root: /docs/
public_dir: public/docs
+
+redirects:
+ /docs/guides/schema-design.html:
+ docs/platform/schema-design
+ /docs/guides/security.html:
+ docs/platform/operation-registry
+ /docs/guides/monitoring.html:
+ docs/platform/integrations
+ /docs/guides/versioning.html:
+ docs/platform/schema-design.html#versioning
| 12 |
diff --git a/havenapi/keycloak/keycloak.go b/havenapi/keycloak/keycloak.go @@ -9,6 +9,7 @@ import (
"net/http"
"net/url"
"os"
+ "strings"
"time"
"github.com/deis/helm/log"
@@ -149,10 +150,21 @@ func CreateUser(email string) error {
return &UserExistsError{email}
}
+ components := strings.Split(email, "@")
var jsonStr = []byte(
- fmt.Sprintf(`{"username": "%s", "email": "%s", "enabled": true}`,
+ fmt.Sprintf(`{
+ "username": "%s",
+ "email": "%s",
+ "enabled": true,
+ "firstName": "%s",
+ "lastName": "",
+ "attributes": {
+ "role": "member"
+ }
+ }`,
email,
email,
+ components[0],
))
body := bytes.NewBuffer(jsonStr)
| 1 |
diff --git a/src/index.js b/src/index.js @@ -28,7 +28,30 @@ const {nativeVideo, nativeVr, nativeLm, nativeMl, nativeWindow, nativeAnalytics}
const GlobalContext = require('./GlobalContext');
GlobalContext.commands = [];
-const dataPath = path.join(os.homedir() || __dirname, '.exokit');
+const dataPath = (() => {
+ const candidatePathPrefixes = [
+ os.homedir(),
+ __dirname,
+ os.tmpdir(),
+ ];
+ for (let i = 0; i < candidatePathPrefixes.length; i++) {
+ const candidatePathPrefix = candidatePathPrefixes[i];
+ if (candidatePathPrefix) {
+ const ok = (() => {
+ try {
+ fs.accessSync(candidatePathPrefix, fs.constants.W_OK);
+ return true;
+ } catch(err) {
+ return false;
+ }
+ })();
+ if (ok) {
+ return path.join(candidatePathPrefix, '.exokit');
+ }
+ }
+ }
+ return null;
+})();
const DEFAULT_FPS = 60; // TODO: Use different FPS for device.requestAnimationFrame vs window.requestAnimationFrame
const VR_FPS = 90;
const ML_FPS = 60;
| 9 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -104,6 +104,8 @@ Both jasmine and image tests are run on
[CircleCI](https://circleci.com/gh/plotly/plotly.js) on every push to this
repo.
+### Jasmine tests
+
Jasmine tests are run in a browser using
[karma](https://github.com/karma-runner/karma). To run them locally:
@@ -114,17 +116,44 @@ npm run test-jasmine
To run a specific suite, use:
```
-npm run test-jasmine -- tests/<suite>.js
+npm run test-jasmine -- <suite>
+```
+
+where the `<suite>` corresponds to the suite's file name as found in
+[`test/jasmine/tests/`](https://github.com/plotly/plotly.js/tree/master/test/jasmine/tests).
+
+You can also test multiple suites at a time, for example:
+
+```
+npm run test-jasmine -- bar axes scatter
+```
+
+which will run tests in the `bar_test.js`, `axes_test.js` and `scatter_test.js`
+suites.
+
+To run the tests in an `autoWatch` / auto-bundle / multiple run mode:
+
+```
+npm run test-jasmine -- <suite> --watch
```
-where the `<suite>` corresponds to the suite's file name as found in [`test/jasmine/tests/`](https://github.com/plotly/plotly.js/tree/master/test/jasmine/tests). In certain situations, you may find that the default reporting is not verbose enough to pin down the source of the failing test. In this situation, you may wish to use [karma-verbose-reporter](https://www.npmjs.com/package/karma-verbose-reporter). You can use it without adding as a dev dependency by running:
+In certain situations, you may find that the default reporting is not verbose
+enough to pin down the source of the failing test. In this situation, you may
+wish to use
+[karma-verbose-reporter](https://www.npmjs.com/package/karma-verbose-reporter):
```
-npm install karma-verbose-reporter
+npm run test-jasmine -- <suite> --verbose
```
-and adding `reporters: ['verbose']` to the corresponding karma configuration file. (You should disable the `progress` reporter when using `verbose`.)
+For more info on the karma / jasmine CLI:
+
+```
+npm run test-jasmine -- --help
+npm run test-jasmine -- --info
+```
+### Image pixel comparison tests
Image pixel comparison tests are run in a docker container. For more
information on how to run them locally, please refer to [image test
| 3 |
diff --git a/articles/support/tickets.md b/articles/support/tickets.md @@ -24,7 +24,7 @@ If you are an existing Private Cloud customer, you will need to create an Auth0
1. Choose **Affected Tenant** from the dropdown menu.
1. Under **Issue Type** select the type of issue that best fits your case.

- * **Public Cloud Support Incident** or **Private Cloud Support Incident** - (the second option is only available to Private Cloud customers)
+ * **I have a question or issue regarding Auth0** or **I have a question or issue regarding Auth0 or my Private Cloud instance(s)** - (the second option is only available to Private Cloud customers)
* If you are not a Trial Tenant customer, you will be asked to select a severity:
* **Low: Product Question** - You have questions about how things work, whether we support something
* **Normal: General Support Question** - You are in development and have a question about how to configure something or how to resolve an error
@@ -34,11 +34,12 @@ If you are an existing Private Cloud customer, you will need to create an Auth0

* After you make your selection, you can choose to answer some follow-up questions to further refine your request. You can also choose to skip this step by clicking the toggle.

- * **Enhancement/Feature Request** - You would like to suggested product improvements or enhancement requests
- * **Billing or Payment** - You are experiencing issues such as incorrect billing, charges to the incorrect account, and so on
- * **Compliance/Legal** - You would like to report security vulnerabilities or legal questions
+ * **I would like something new or changed in Auth0** - You would like to suggested product improvements or enhancement requests
+ * **I have a question regarding billing or my recent payments** - You are experiencing issues such as incorrect billing, charges to the incorrect account, and so on
+ * **I have a Compliance or legal question** - You would like to report security vulnerabilities or legal questions
+ * **I have a question regarding my Auth0 account** - You need operational assistance with your account or tenant, or would like to file a request for testing according to our Load and Penetration Testing policies
::: note
-Selection of severity is not available to Trial Tenant customers or those who have selected any of the following issue types: **Enhancement/Feature Request**, **Billing or Payment**, **Compliance/Legal**.
+Selection of severity is not available to Trial Tenant customers or those who have selected any of the following issue types: **I would like something new or changed in Auth0**, **I have a question regarding billing or my recent payments**, **I have a Compliance or legal question**.
:::
1. Next, provide a clear summary of the question/issue in the **Subject** field.
1. In the **Description** box, provide as much detail as possible about the issue. When writing in this box, you can style your text with [Markdown](https://guides.github.com/features/mastering-markdown) and preview what you have written by clicking on **Preview**.
| 3 |
diff --git a/src/pages/ValidateLogin2FANewWorkspacePage.js b/src/pages/ValidateLogin2FANewWorkspacePage.js @@ -73,6 +73,7 @@ class ValidateLogin2FANewWorkspacePage extends Component {
this.setState({
formError: null,
+ loading: true,
});
const accountID = lodashGet(this.props.route.params, 'accountID', '');
| 12 |
diff --git a/packages/app/src/components/PageComment/CommentEditor.jsx b/packages/app/src/components/PageComment/CommentEditor.jsx @@ -54,8 +54,6 @@ class CommentEditor extends React.Component {
const isUploadable = config.upload.image || config.upload.file;
const isUploadableFile = config.upload.file;
- console.log('this.props', this.props);
-
this.state = {
isReadyToUse: !this.props.isForNewComment,
comment: this.props.commentBody || '',
@@ -80,16 +78,10 @@ class CommentEditor extends React.Component {
this.renderHtml = this.renderHtml.bind(this);
this.handleSelect = this.handleSelect.bind(this);
- // this.onSlackEnabledFlagChange = this.onSlackEnabledFlagChange.bind(this);
this.onSlackChannelsChange = this.onSlackChannelsChange.bind(this);
this.fetchSlackChannels = this.fetchSlackChannels.bind(this);
}
- fetchSlackChannels(slackChannels) {
- console.log('fetchSlackChannels', slackChannels);
- this.setState({ slackChannels });
- }
-
updateState(value) {
this.setState({ comment: value });
}
@@ -106,23 +98,17 @@ class CommentEditor extends React.Component {
this.renderHtml(this.state.comment);
}
+ fetchSlackChannels(slackChannels) {
+ this.setState({ slackChannels });
+ }
+
componentDidUpdate(prevProps) {
- console.log('componentDidUpdate', prevProps);
if (this.props.slackChannels !== prevProps.slackChannels) {
- console.log('aaaa_prevProps.slackChannels', this.props.slackChannels);
- this.fetchSlackChannels(prevProps.slackChannels);
+ this.fetchSlackChannels(this.props.slackChannels);
}
- // eslint-disable-next-line react/no-did-update-set-state
- // this.setState({ slackChannels: this.props.slackChannels });
}
- // onSlackEnabledFlagChange(isSlackEnabled) {
- // // this.props.commentContainer.setState({ isSlackEnabled });
- // this.props.commentContainer.setState({ isSlackEnabled });
- // }
-
onSlackChannelsChange(slackChannels) {
- // this.props.commentContainer.setState({ slackChannels });
this.setState({ slackChannels });
}
@@ -186,8 +172,6 @@ class CommentEditor extends React.Component {
this.state.comment,
this.state.isMarkdown,
replyTo,
- // commentContainer.state.isSlackEnabled,
- // commentContainer.state.slackChannels,
this.props.isSlackEnabled,
this.state.slackChannels,
);
@@ -381,11 +365,8 @@ class CommentEditor extends React.Component {
&& (
<div className="form-inline align-self-center mr-md-2">
<SlackNotification
- // isSlackEnabled={commentContainer.state.isSlackEnabled}
isSlackEnabled={this.props.isSlackEnabled}
- // slackChannels={commentContainer.state.slackChannels}
slackChannels={this.state.slackChannels}
- // onEnabledFlagChange={this.onSlackEnabledFlagChange}
onEnabledFlagChange={this.props.onSlackEnabledFlagChange}
onChannelChange={this.onSlackChannelsChange}
id="idForComment"
@@ -463,19 +444,10 @@ const CommentEditorWrapper = (props) => {
const { data: isSlackEnabled, mutate: mutateIsSlackEnabled } = useIsSlackEnabled();
const { data: slackChannelsData } = useSWRxSlackChannels();
- console.log('slackChannelsData', slackChannelsData);
-
-
const onSlackEnabledFlagChange = (isSlackEnabled) => {
- // this.props.commentContainer.setState({ isSlackEnabled });
mutateIsSlackEnabled(isSlackEnabled, false);
};
- // const onSlackChannelsChange = (slackChannels) => {
- // this.props.commentContainer.setState({ slackChannels });
- // };
-
-
return (
<CommentEditorHOCWrapper
{...props}
| 12 |
diff --git a/node-red-contrib-botbuilder/package.json b/node-red-contrib-botbuilder/package.json {
"name": "node-red-contrib-viseo-botbuilder",
- "version": "1.0.0",
+ "version": "2.0.0",
"description": "VISEO Bot Maker - Microsoft BotBuilder and tools",
"dependencies": {
- "botbuilder": "^4.11.0",
- "botbuilder-dialogs": "^4.11.0",
+ "botbuilder": "^4.13.0",
+ "botbuilder-dialogs": "^4.13.0",
"node-red-viseo-helper": "~0.3.0",
"node-red-viseo-bot-manager": "~0.1.0"
},
| 4 |
diff --git a/src/markdown/handbook/manage/hiring.mdx b/src/markdown/handbook/manage/hiring.mdx @@ -5,7 +5,7 @@ order: 1
publish: true
---
-import { Grid, Box } from 'theme-ui'
+import { Image } from 'components/atoms'
@@ -52,19 +52,12 @@ Remarkable profiles are easier to remember. Everyday there are new job offers in
## Advices
-<Grid sx={{gridTemplateColumns:'1fr 1fr'}}>
- <Box>
- <ul>
- <li>Make your portfolio remarkable, it will impact more and it will be easier to remember</li>
- <li>Explore what our company does</li>
- <li>Read about our design team</li>
- <li>Be yourself</li>
- <li>Be sincere</li>
- <li>It is ok if you don't have answers for everything. Don't be afraid about saying "I don't know"</li>
- <li>Prepare your own questions for the people who will interview you</li>
- </ul>
- </Box>
- <Box>
- <img src="/images/handbook/manage/job-interview.jpg" alt="Girl in a jacket"></img>
- </Box>
-</Grid>
\ No newline at end of file
+<Image src='/images/handbook/manage/job-interview.jpg' margin='0 0 0 3rem' size='small' align='right' alt='Girl in a jacket' />
+
+- Make your portfolio remarkable, it will impact more and it will be easier to remember
+- Explore what our company does
+- Read about our design team
+- Be yourself
+- Be sincere
+- It is ok if you don't have answers for everything. Don't be afraid about saying "I don't know
+- Prepare your own questions for the people who will interview you
| 14 |
diff --git a/server/workers/api/src/apis/base.py b/server/workers/api/src/apis/base.py @@ -73,9 +73,8 @@ class Search(Resource):
errors = search_param_schema.validate(params, partial=True)
if "limit" not in params:
params["limit"] = 120
- if params["limit"] > 1000:
- params["limit"] = 1000
if params.get('vis_type') == "timeline":
+ params["limit"] = 1000
params["list_size"] = params["limit"]
else:
params["list_size"] = 100
| 2 |
diff --git a/magda-content-api/src/createApiRouter.ts b/magda-content-api/src/createApiRouter.ts @@ -252,7 +252,16 @@ export default function createApiRouter(options: ApiRouterOptions) {
content = content.toString("base64");
break;
case ContentEncoding.json:
- if (!(content instanceof Object)) {
+ if (
+ !(content instanceof Object) &&
+ !(content instanceof String) &&
+ !(content instanceof Number) &&
+ !(
+ content === true ||
+ content === false ||
+ content === undefined
+ )
+ ) {
throw new GenericError(
"Can not stringify encode non-json"
);
| 11 |
diff --git a/playground/core-concepts/core-4-configuration.md b/playground/core-concepts/core-4-configuration.md @@ -60,13 +60,11 @@ InputStream in = ClassLoader.getSystemResourceAsStream("my_awesome_file.txt");
### Levels & Leagues
-You have the possibility to create several levels (also named leagues). A new level allows you to set a different configuration and different rules (you can get the league level in the Referee with the [Game Manager](playground/core-concepts/core-4-game-manager.md)).
+In a **multiplayer** game, you have the possibility to create several levels (also named leagues). A new level allows you to set a different configuration and different rules (you can get the league level in the Referee with the [Game Manager](playground/core-concepts/core-4-game-manager.md)).
-There is a difference between multiplayer and solo game levels:
-- In a **multiplayer** game, your levels become leagues. The players will need to beat your Boss in the leaderboard to access the next league.
-- In a **solo** game, there can only be on level.
+When the game will be released your levels will become leagues. The players will need to beat your Boss in the leaderboard to access the next league.
-To create multiple leagues, you need to make new folders named `level<number>` in the `config` directory. Their `<number>` must be positive and will be used to display your leagues in the right order. Each level can be configured like the `config` directory, which allow you to have different statements, stubs, etc.
+To create multiple levels, you need to make new folders named `level<number>` in the `config` directory. Their `<number>` must be positive and will be used to display your leagues in the right order. Each level can be configured like the `config` directory, which allow you to have different statements, stubs, etc.
If you want to use the same configuration in several levels, you do not need to copy your files in every directory. If a file is missing in a `level` folder, it will inherit from `config` automatically when uploading your game.
| 1 |
diff --git a/docs/common/changelog.md b/docs/common/changelog.md @@ -5,6 +5,15 @@ v22/v21 means v22 for android and v21 for ios
this will be evened out from v24
+## Target version 10.0.0
+
+- Upgrade rnkiwimobile to version `0.0.45`
+
+### v31
+
+- Upgraded react-native and other native dependencies
+- New summary layout, see [figma](https://www.figma.com/file/ayF92epBKcFcwdfE8IWIGMNa/Hotels-Results-%26-Detail?node-id=734%3A1) -> Showing only VAT for now, since we need more info from booking.com to show taxes
+
## Target version 9.0.0
- Upgrade rnkiwimobile to version `0.0.43` or `0.0.44`, both are compatible with this target-version. The latter contains a patch in the initialization of code-push to fix a crash when upating fails.
| 0 |
diff --git a/circle.yml b/circle.yml @@ -75,7 +75,7 @@ jobs:
steps:
- restore_cache:
key: cypress-documentation-{{ .Branch }}-{{ .Revision }}
- - run: npm ls
+ - run: npm ls || true
- run: NODE_ENV=development npm run build
- run: ls -Rl themes/cypress/source/js
- run: ls public
| 8 |
diff --git a/packages/node_modules/@node-red/util/lib/util.js b/packages/node_modules/@node-red/util/lib/util.js @@ -81,7 +81,7 @@ function ensureBuffer(o) {
* @memberof @node-red/util_util
*/
function cloneMessage(msg) {
- if (typeof msg !== "undefined") {
+ if (typeof msg !== "undefined" && msg !== null) {
// Temporary fix for #97
// TODO: remove this http-node-specific fix somehow
var req = msg.req;
| 9 |
diff --git a/functionalTest/html/crawler.js b/functionalTest/html/crawler.js 'use strict';
-const JSDOM = require('jsdom').JSDOM,
+var JSDOM = require('jsdom').JSDOM,
api = require('../api/api').create(),
Q = require('q'),
url = require('url'),
@@ -8,32 +8,38 @@ const JSDOM = require('jsdom').JSDOM,
httpsClient = require('../api/http/baseHttpClient').create('https'),
whitelistPatterns = ['https://s3.amazonaws.com', '^#'];
-const isProtocolAgnostic = href => href.indexOf('//') === 0;
+function isProtocolAgnostic (href) {
+ return href.indexOf('//') === 0;
+}
-const isLocal = href => href.indexOf('/') === 0;
+function isLocal (href) {
+ return href.indexOf('/') === 0;
+}
-const parseLinksFrom = window => {
- const links = [],
+function parseLinksFrom (window) {
+ var links = [],
anchorTags = window.document.getElementsByTagName('a');
- for (let i = 0; i < anchorTags.length; i += 1) {
- let href = anchorTags[i].attributes.href ? anchorTags[i].attributes.href.value : null;
+ for (var i = 0; i < anchorTags.length; i += 1) {
+ var href = anchorTags[i].attributes.href ? anchorTags[i].attributes.href.value : null;
if (href) {
if (isProtocolAgnostic(href)) {
- href = `http:${href}`;
+ href = 'http:' + href;
}
if (isLocal(href)) {
- href = `http://localhost:${api.port}${href}`;
+ href = 'http://localhost:' + api.port + href;
}
links.push(href);
}
}
return links;
-};
+}
-const isExternalPage = baseUrl => baseUrl.indexOf('http://localhost') < 0;
+function isExternalPage (baseUrl) {
+ return baseUrl.indexOf('http://localhost') < 0;
+}
-const getLinksFrom = (baseUrl, html) => {
- const deferred = Q.defer();
+function getLinksFrom (baseUrl, html) {
+ var deferred = Q.defer();
if (isExternalPage(baseUrl)) {
// Don't crawl the internet
@@ -41,7 +47,7 @@ const getLinksFrom = (baseUrl, html) => {
}
try {
- const window = new JSDOM(html).window;
+ var window = new JSDOM(html).window;
deferred.resolve(parseLinksFrom(window));
}
catch (errors) {
@@ -49,12 +55,16 @@ const getLinksFrom = (baseUrl, html) => {
}
return deferred.promise;
-};
+}
-const isWhitelisted = href => whitelistPatterns.some(pattern => new RegExp(pattern, 'i').test(href));
+function isWhitelisted (href) {
+ return whitelistPatterns.some(function (pattern) {
+ return new RegExp(pattern, 'i').test(href);
+ });
+}
-const getResponseFor = href => {
- const parts = url.parse(href),
+function getResponseFor (href) {
+ var parts = url.parse(href),
client = parts.protocol === 'https:' ? httpsClient : httpClient,
defaultPort = parts.protocol === 'https:' ? 443 : 80,
spec = {
@@ -66,21 +76,29 @@ const getResponseFor = href => {
};
return client.responseFor(spec);
-};
+}
-const isBadLink = href => href.indexOf('http') < 0;
+function isBadLink (href) {
+ return href.indexOf('http') < 0;
+}
-const create = () => {
- const pages = { errors: [], hits: {} };
+function create () {
+ var pages = { errors: [], hits: {} };
- const alreadyCrawled = href => pages.hits[href];
+ function alreadyCrawled (href) {
+ return pages.hits[href];
+ }
- const addReferrer = (href, referrer) => pages.hits[href].from.push(referrer);
+ function addReferrer (href, referrer) {
+ pages.hits[href].from.push(referrer);
+ }
- const addError = (href, referrer) => pages.errors.push({ href: href, referrer: referrer });
+ function addError (href, referrer) {
+ pages.errors.push({ href: href, referrer: referrer });
+ }
- const crawl = (startingUrl, referrer) => {
- const serverUrl = startingUrl.replace(/#.*$/, '').trim();
+ function crawl (startingUrl, referrer) {
+ var serverUrl = startingUrl.replace(/#.*$/, '').trim();
if (serverUrl === '') {
return Q(true);
@@ -98,18 +116,26 @@ const create = () => {
}
else {
pages.hits[serverUrl] = { from: [referrer] };
- return getResponseFor(serverUrl).then(response => {
+ return getResponseFor(serverUrl).then(function (response) {
pages.hits[serverUrl].statusCode = response.statusCode;
pages.hits[serverUrl].contentType = response.headers['content-type'];
return getLinksFrom(serverUrl, response.body);
- }).then(
- links => Q.all(links.map(link => crawl(link, serverUrl))).then(() => Q(pages)),
- e => { console.log(`ERROR with ${serverUrl}`); console.log(e); });
+ }).then(function (links) {
+ return Q.all(links.map(function (link) {
+ return crawl(link, serverUrl);
+ })).then(function () {
+ return Q(pages);
+ });
+ }, function (e) { console.log('ERROR with ' + serverUrl); console.log(e); });
+ }
}
- };
- return { crawl };
+ return {
+ crawl: crawl
};
+}
-module.exports = { create };
+module.exports = {
+ create: create
+};
\ No newline at end of file
| 13 |
diff --git a/apps/fwupdate/custom.html b/apps/fwupdate/custom.html @@ -81,6 +81,7 @@ function onInit(device) {
if (crc==3435933210) version = "2v11.52";
if (crc==46757280) version = "2v11.58";
if (crc==3508163280 || crc==1418074094) version = "2v12";
+ if (crc==4056371285) version = "2v13";
if (!ok) {
version += `(⚠ update required)`;
}
| 3 |
diff --git a/lore-ai.js b/lore-ai.js @@ -21,7 +21,7 @@ const characterLore = `\
AI anime avatars in a virtual world. They have human-level intelligence and unique and interesting personalities.
`;
-const _makeChatPrompt = (setting, characters, messages, objects, dstCharacter) => `\
+const _makeChatPrompt = (settings, characters, messages, objects, dstCharacter) => `\
${characterLore}
Script examples:
@@ -46,7 +46,7 @@ Script examples:
# Setting
-${setting}
+${settings.join('\n\n')}
## Characters
@@ -176,12 +176,9 @@ class AIObject extends EventTarget {
}
}
class AIScene {
- constructor(localPlayer, {
- setting = defaultSetting,
- objects = [],
- } = {}) {
- this.setting = setting;
- this.objects = objects;
+ constructor(localPlayer) {
+ this.settings = [];
+ this.objects = [];
this.localCharacter = new AICharacter(localPlayer.name, localPlayer.bio);
this.characters = [
this.localCharacter,
@@ -299,8 +296,11 @@ class AIScene {
});
});
}
- setSetting(setting) {
- this.setting = setting;
+ addSetting(setting) {
+ this.settings.push(setting);
+ }
+ removeSetting(setting) {
+ this.settings.splice(this.settings.indexOf(setting), 1);
}
addCharacter(opts) {
const character = new AICharacter(opts);
@@ -320,14 +320,14 @@ class AIScene {
}
async generate(dstCharacter = null) {
const prompt = _makeChatPrompt(
- this.setting,
+ this.settings,
this.characters,
this.messages,
this.objects,
dstCharacter
);
/* console.log('generate prompt', prompt, [
- this.setting,
+ this.settings,
this.characters,
this.messages,
dstCharacter,
| 0 |
diff --git a/src/core/plugins/auth/selectors.js b/src/core/plugins/auth/selectors.js @@ -11,7 +11,7 @@ export const shownDefinitions = createSelector(
export const definitionsToAuthorize = createSelector(
state,
() => ( { specSelectors } ) => {
- let definitions = specSelectors.securityDefinitions()
+ let definitions = specSelectors.securityDefinitions() || Map({})
let list = List()
//todo refactor
| 7 |
diff --git a/src/runtime-semantics/IfStatement.mjs b/src/runtime-semantics/IfStatement.mjs @@ -14,6 +14,10 @@ import {
} from '../completion.mjs';
import { New as NewValue } from '../value.mjs';
+// #sec-if-statement-runtime-semantics-evaluation
+// IfStatement :
+// `if` `(` Expression `)` Statement `else` Statement
+// `if` `(` Expression `)` Statement
export function Evaluate_IfStatement({
test: Expression,
consequent: Statement,
@@ -23,7 +27,6 @@ export function Evaluate_IfStatement({
const exprValue = ToBoolean(Q(GetValue(exprRef)));
if (AlternateStatement !== null) {
- // IfStatement : `if` `(` Expression `)` Statement `else` Statement
let stmtCompletion;
if (exprValue.isTrue()) {
stmtCompletion = Evaluate_Statement(Statement);
@@ -32,7 +35,6 @@ export function Evaluate_IfStatement({
}
return new Completion(UpdateEmpty(stmtCompletion, NewValue(undefined)));
} else {
- // IfStatement : `if` `(` Expression `)` Statement
if (exprValue.isFalse()) {
return new NormalCompletion(undefined);
} else {
| 4 |
diff --git a/docs/style-guide-for-curriculum-challenges.md b/docs/style-guide-for-curriculum-challenges.md @@ -141,9 +141,9 @@ Here are specific formatting guidelines for the challenge seed code:
## Why do we have all these rules?
-Our goal is to have a fun, clear interactive learning experience.
+Our goal is to develop a fun and clear interactive learning experience.
-Designing interactive coding challenges is hard. It would be so much easier to write a lengthy explanation, or to create a video tutorial. There's a place for those on Medium and YouTube. But for our core curriculum, we're sticking with what works best for most people - a fully interactive, video game-like experience.
+Designing interactive coding challenges is difficult. It would be much easier to write a lengthy explanation or to create a video tutorial, and there's a place for those on Medium and YouTube. However, for our core curriculum, we're sticking with what works best for most people - a fully interactive, video game-like experience.
We want campers to achieve a flow state. We want them to build momentum and blast through our curriculum with as few snags as possible. We want them to go into the projects with confidence and a wide exposure to programming concepts.
| 7 |
diff --git a/resource/js/components/PageStatusAlert.jsx b/resource/js/components/PageStatusAlert.jsx @@ -64,7 +64,7 @@ class PageStatusAlert extends React.Component {
<i className="fa fa-angle-double-right"></i>
- <a href="">
+ <a href="#hackmd">
Open HackMD Editor
</a>
</div>
@@ -79,7 +79,7 @@ class PageStatusAlert extends React.Component {
<i className="fa fa-angle-double-right"></i>
- <a href="">
+ <a href="#hackmd">
Open HackMD Editor
</a>
</div>
| 7 |
diff --git a/test/jasmine/tests/gl2d_plot_interact_test.js b/test/jasmine/tests/gl2d_plot_interact_test.js @@ -378,7 +378,7 @@ describe('Test gl2d plots', function() {
.then(done);
});
- it('@noCI should display selection of big number of points', function(done) {
+ it('@noCI should display selection of big number of regular points', function(done) {
// generate large number of points
var x = [], y = [], n = 2e2, N = n * n;
for(var i = 0; i < N; i++) {
@@ -406,6 +406,46 @@ describe('Test gl2d plots', function() {
.then(done);
});
+
+ it('@noCI should display selection of big number of miscellaneous points', function(done) {
+ var colorList = [
+ '#006385', '#F06E75', '#90ed7d', '#f7a35c', '#8085e9',
+ '#f15c80', '#e4d354', '#2b908f', '#f45b5b', '#91e8e1',
+ '#5DA5DA', '#F06E75', '#F15854', '#B2912F', '#B276B2',
+ '#DECF3F', '#FAA43A', '#4D4D4D', '#F17CB0', '#60BD68'
+ ];
+
+ // generate large number of points
+ var x = [], y = [], n = 2e2, N = n * n, color = [], symbol = [], size = [];
+ for(var i = 0; i < N; i++) {
+ x.push((i % n) / n);
+ y.push(i / N);
+ color.push(colorList[i % colorList.length]);
+ symbol.push('x');
+ size.push(6);
+ }
+
+ var mock = {
+ data: [{
+ x: x, y: y, type: 'scattergl', mode: 'markers',
+ marker: {symbol: symbol, size: size, color: color}
+ }],
+ layout: {
+ dragmode: 'select'
+ }
+ };
+
+ Plotly.plot(gd, mock)
+ .then(select([[160, 100], [180, 100]]))
+ .then(function() {
+ expect(readPixel(gd.querySelector('.gl-canvas-context'), 168, 100)[3]).toBe(0);
+ expect(readPixel(gd.querySelector('.gl-canvas-context'), 158, 100)[3]).not.toBe(0);
+ expect(readPixel(gd.querySelector('.gl-canvas-focus'), 168, 100)[3]).not.toBe(0);
+ })
+ .catch(fail)
+ .then(done);
+ });
+
it('should be able to toggle from svg to gl', function(done) {
Plotly.plot(gd, [{
y: [1, 2, 1],
| 0 |
diff --git a/components/Notifications/SubscribeCheckbox.js b/components/Notifications/SubscribeCheckbox.js @@ -65,9 +65,9 @@ const SubscribeCheckbox = ({
} else if (!filters) {
// User Subscribe/Unsubscribe without specifying if doc or comments, default to doc
if (subscription.active) {
+ console.log('ubsub no filter')
unsubFromUser({
- subscriptionId: subscription.id,
- filters: ['Document']
+ subscriptionId: subscription.id
}).then(toggleCallback)
} else {
subToUser({
| 1 |
diff --git a/src/components/FormGrid.js b/src/components/FormGrid.js +import _get from 'lodash/get';
+import _isFunction from 'lodash/isFunction';
+import _map from 'lodash/map';
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Grid from './Grid';
@@ -19,6 +22,13 @@ export default class extends Component {
query: PropTypes.object,
onAction: PropTypes.func,
formAccess: PropTypes.func,
+ columns: PropTypes.arrayOf(PropTypes.shape({
+ key: PropTypes.string,
+ title: PropTypes.string,
+ value: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
+ sort: PropTypes.bool,
+ width: PropTypes.number,
+ })),
}
static defaultProps = {
@@ -46,6 +56,20 @@ export default class extends Component {
delete: true,
},
}),
+ columns: [
+ {
+ key: 'title',
+ title: 'Form',
+ sort: true,
+ width: 8,
+ },
+ {
+ key: 'operations',
+ title: 'Operations',
+ sort: false,
+ width: 4,
+ },
+ ],
};
static getDerivedStateFromProps(nextProps, prevState) {
@@ -95,21 +119,6 @@ export default class extends Component {
}
};
- getColumns() {
- return [
- {
- key: 'title',
- title: 'Form',
- sort: true
- },
- {
- key: 'operations',
- title: 'Operations',
- sort: false
- }
- ];
- }
-
stopPropagationWrapper = (fn) => (event) => {
event.stopPropagation();
fn();
@@ -129,7 +138,7 @@ export default class extends Component {
})}><h5>{form.title}</h5></span>
);
}
- else {
+ else if (column.key === 'operations') {
return (
<div>
{access.submission.create
@@ -162,12 +171,16 @@ export default class extends Component {
</div>
);
}
+ else {
+ return (
+ <span>{_isFunction(column.value) ? column.value(form) : _get(form, column.value, '')}</span>
+ );
+ }
};
render() {
- const {forms: {forms, limit, pagination}, onAction, formAccess, perms} = this.props;
- const columns = this.getColumns();
- const columnWidths = {0: 8, 1: 4};
+ const {forms: {forms, limit, pagination}, onAction, formAccess, perms, columns} = this.props;
+ const columnWidths = _map(columns, 'width');
const skip = (parseInt(this.state.page) - 1) * parseInt(limit);
const last = skip + parseInt(limit) > pagination.total ? pagination.total : skip + parseInt(limit);
const sortOrder = this.state.query.sort;
| 0 |
diff --git a/src/libs/API.js b/src/libs/API.js @@ -76,7 +76,7 @@ export default function API(network) {
*
* @returns {Promise}
*/
- function performPOSTRequest(command, parameters, type = 'post') {
+ function request(command, parameters, type = 'post') {
const networkPromise = network.post(command, parameters, type);
// Attach any JSONCode callbacks to our promise
@@ -123,7 +123,7 @@ export default function API(network) {
'partnerUserSecret',
], parameters, commandName);
- return performPOSTRequest(commandName, {
+ return request(commandName, {
// When authenticating for the first time, we pass useExpensifyLogin as true so we check
// for credentials for the expensify partnerID to let users Authenticate with their expensify user
// and password.
@@ -155,7 +155,7 @@ export default function API(network) {
const commandName = 'CreateChatReport';
requireParameters(['emailList'],
parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
/**
@@ -176,7 +176,7 @@ export default function API(network) {
'partnerUserID',
'partnerUserSecret',
], parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
/**
@@ -191,7 +191,7 @@ export default function API(network) {
const commandName = 'DeleteLogin';
requireParameters(['partnerUserID', 'partnerName', 'partnerPassword', 'doNotRetry'],
parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
/**
@@ -203,7 +203,7 @@ export default function API(network) {
const commandName = 'Get';
requireParameters(['returnValueList'],
parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
/**
@@ -215,7 +215,7 @@ export default function API(network) {
const commandName = 'PersonalDetails_GetForEmails';
requireParameters(['emailList'],
parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
/**
@@ -230,7 +230,7 @@ export default function API(network) {
const commandName = 'Log';
requireParameters(['message', 'parameters', 'expensifyCashAppVersion'],
parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
/**
@@ -244,7 +244,7 @@ export default function API(network) {
const commandName = 'Report_AddComment';
requireParameters(['reportComment', 'reportID'],
parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
/**
@@ -256,7 +256,7 @@ export default function API(network) {
const commandName = 'Report_GetHistory';
requireParameters(['reportID'],
parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
/**
@@ -269,7 +269,7 @@ export default function API(network) {
const commandName = 'Report_TogglePinned';
requireParameters(['reportID', 'pinnedValue'],
parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
/**
@@ -283,7 +283,7 @@ export default function API(network) {
const commandName = 'Report_SetLastReadActionID';
requireParameters(['accountID', 'reportID', 'sequenceNumber'],
parameters, commandName);
- return performPOSTRequest(commandName, parameters);
+ return request(commandName, parameters);
},
JSON_CODES: {
| 10 |
diff --git a/detox/android/detox/src/main/java/com/wix/detox/DetoxManager.java b/detox/android/detox/src/main/java/com/wix/detox/DetoxManager.java @@ -111,7 +111,7 @@ class DetoxManager implements WebSocketClient.ActionHandler {
m.put("error", e.getMessage());
wsClient.sendAction("error", m, messageId);
}
- stop();
+ // stop();
}
break;
case "isReady":
| 2 |
diff --git a/lib/plugins/aws/invokeLocal/index.test.js b/lib/plugins/aws/invokeLocal/index.test.js @@ -934,7 +934,8 @@ describe('AwsInvokeLocal', () => {
});
describe('context.remainingTimeInMillis', () => {
- it('should become lower over time', () => {
+ it('should become lower over time', function () {
+ this.timeout(3000); // On Windows it tends to timeout with 2000
awsInvokeLocal.serverless.config.servicePath = __dirname;
return awsInvokeLocal.invokeLocalRuby(
@@ -948,7 +949,9 @@ describe('AwsInvokeLocal', () => {
});
describe('calling a class method', () => {
- it('should execute', () => {
+ it('should execute', function () {
+ this.timeout(3000); // On Windows it tends to timeout with 2000
+
awsInvokeLocal.serverless.config.servicePath = __dirname;
return awsInvokeLocal.invokeLocalRuby(
| 7 |
diff --git a/NEWS.md b/NEWS.md @@ -12,7 +12,6 @@ Development
- Fix message in password confirmation modal when changing the password ([CartoDB/support#2187](https://github.com/CartoDB/support/issues/2187))
- Fix message in password protected maps ([CartoDB/design#1758](https://github.com/CartoDB/design/issues/1758))
- Fix Visualization Searcher ([CartoDB/cartodb#15224](https://github.com/CartoDB/cartodb/issues/15224))
-- Fix Visualization Searcher ([CartoDB/cartodb#15224](https://github.com/CartoDB/cartodb/issues/15224))
- Fix wording for feedback (Suggested by Flo via Slack)
4.30.0 (2019-10-18)
| 2 |
diff --git a/app/controllers/AuditController.scala b/app/controllers/AuditController.scala @@ -213,6 +213,7 @@ class AuditController @Inject() (implicit val env: Environment[User, SessionAuth
} else {
val region: NamedRegion = regions.head
val regionId: Int = region.regionId
+ UserCurrentRegionTable.saveOrUpdate(userId, regionId)
// TODO: Should this function be modified?
val task: NewTask = AuditTaskTable.selectANewTask(streetEdgeId, Some(userId))
| 1 |
diff --git a/src/viewer.js b/src/viewer.js @@ -481,15 +481,16 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
/**
* Open tiled images into the viewer, closing any others.
+ * To get the TiledImage instance created by open, add an event listener for
+ * {@link OpenSeadragon.Viewer.html#.event:open}, which when fired can be used to get access
+ * to the instance, i.e., viewer.world.getItemAt(0).
* @function
* @param {Array|String|Object|Function} tileSources - This can be a TiledImage
* specifier, a TileSource specifier, or an array of either. A TiledImage specifier
* is the same as the options parameter for {@link OpenSeadragon.Viewer#addTiledImage},
* except for the index property; images are added in sequence.
* A TileSource specifier is anything you could pass as the tileSource property
- * of the options parameter for {@link OpenSeadragon.Viewer#addTiledImage}. To get the TiledImage
- * instance created by open, add an event listener for {@link OpenSeadragon.Viewer.html#.event:open}, which
- * when fired can be used to get access to the instance, i.e., viewer.world.getItemAt(0).
+ * of the options parameter for {@link OpenSeadragon.Viewer#addTiledImage}.
* @param {Number} initialPage - If sequenceMode is true, display this page initially
* for the given tileSources. If specified, will overwrite the Viewer's existing initialPage property.
* @return {OpenSeadragon.Viewer} Chainable.
| 5 |
diff --git a/client/components/swimlanes/swimlanes.styl b/client/components/swimlanes/swimlanes.styl margin-top: 50px;
font-weight: bold;
min-height: 9px;
- min-width: 30px;
+ width: 50px;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
| 12 |
diff --git a/js/bytetrade.js b/js/bytetrade.js @@ -47,10 +47,10 @@ module.exports = class bytetrade extends Exchange {
'1M': '1M',
},
'urls': {
- 'test': 'https://api-v2-test.bytetrade.com',
+ 'test': 'https://api-v2-test.byte-trade.com',
'logo': 'https://user-images.githubusercontent.com/1294454/67288762-2f04a600-f4e6-11e9-9fd6-c60641919491.jpg',
- 'api': 'https://api-v2.bytetrade.com',
- 'www': 'https://www.bytetrade.com',
+ 'api': 'https://api-v2.byte-trade.com',
+ 'www': 'https://www.byte-trade.com',
'doc': 'https://github.com/Bytetrade/bytetrade-official-api-docs/wiki',
},
'api': {
@@ -116,7 +116,7 @@ module.exports = class bytetrade extends Exchange {
code = this.safeString (currency, 'name');
}
const name = this.safeString (currency, 'fullname');
- // in bytetrade.com DEX, request https://api-v2.bytetrade.com/currencies will return currencies,
+ // in byte-trade.com DEX, request https://api-v2.byte-trade.com/currencies will return currencies,
// the api doc is https://github.com/Bytetrade/bytetrade-official-api-docs/wiki/rest-api#get-currencies-get-currencys-supported-in-bytetradecom
// we can see the coin name is none-unique in the result, the coin which code is 18 is the CyberMiles ERC20, and the coin which code is 35 is the CyberMiles main chain, but their name is same.
// that is because bytetrade is a DEX, supports people create coin with the same name, but the id(code) of coin is unique, so we should use the id or name and id as the identity of coin.
| 4 |
diff --git a/lib/recurly/pricing/checkout/calculations.js b/lib/recurly/pricing/checkout/calculations.js @@ -196,7 +196,15 @@ export default class Calculations {
// Taxation requires that we at least have base tax information
if (isEmpty(baseTaxInfo)) return Promise.resolve();
- const getTaxes = loadScriptPromise(this.pricing.recurly.tax.bind(this.pricing.recurly));
+ const boundGetTaxes = this.pricing.recurly.tax.bind(this.pricing.recurly);
+ const getTaxes = (data) => {
+ return new Promise((resolve, reject) => {
+ boundGetTaxes(data, (err, result) => {
+ if (err) reject(err);
+ else resolve(result);
+ });
+ });
+ };
const getTaxesFor = item => getTaxes(Object.assign({}, baseTaxInfo, { taxCode: item.taxCode }));
const fixedAmount = amt => parseFloat(amt.toFixed(6));
let taxRates = [];
| 14 |
diff --git a/fields/types/markdown/Readme.md b/fields/types/markdown/Readme.md @@ -11,7 +11,9 @@ Stores a nested structure in the model with the properties:
}
```
-The `html` path is updated when the `md` path is set by [Marked](https://github.com/chjj/marked)
+When the `md` path is set, the value is first sanitized using [`sanitize-html`](https://github.com/punkave/sanitize-html), then rendered into HTML using [`marked`](https://github.com/chjj/marked).
+(Options for both these packages can be provided in the field definition, see below.)
+The resultant HTML is persisted as `html`.
## Options
@@ -35,6 +37,16 @@ Comma separated list of buttons to hide.
{ type: Types.Markdown, toolbarOptions: { hiddenButtons: 'H1,H6,Code' } }
```
+`markedOptions` `Object`
+
+Supplied as options to the [`marked`](https://github.com/chjj/marked) package.
+If not supplied the field will inherit the [package defaults](https://github.com/chjj/marked#options-1).
+
+`sanitizeOptions` `Object`
+
+Supplied as options to the [`sanitize-html`](https://github.com/punkave/sanitize-html) package.
+If not supplied the field will inherit the [package defaults](https://github.com/punkave/sanitize-html#what-are-the-default-options).
+
## Schema
The markdown field will automatically convert markdown to html when the `md` property is changed, via a setter on the `md` path.
| 3 |
diff --git a/core/toolbox.js b/core/toolbox.js @@ -588,7 +588,7 @@ Blockly.Toolbox.prototype.setColour_ = function(colourValue, childOut,
// Decode the colour for any potential message references
// (eg. `%{BKY_MATH_HUE}`).
var colour = Blockly.utils.replaceMessageReferences(colourValue);
- if (colour === null || colour === '') {
+ if (colour == null || colour === '') {
// No attribute. No colour.
childOut.hexColour = '';
} else {
| 9 |
diff --git a/rcloud.packages/rcloud.jupyter/R/main.R b/rcloud.packages/rcloud.jupyter/R/main.R @@ -189,18 +189,24 @@ JUPYTER_LANGUAGE_MAPPING <- 'rcloud.jupyter.language.mapping.config'
if(is.null(outputs)) {
return()
}
- lapply(outputs, function(outval)
+ processed <- lapply(outputs, function(outval)
{
outType <- outval$output_type
res <- to.chunk(outval)
if ( (res[1] == "text") && (outType == "CONSOLE") ) {
rcloud.out(res[2])
+ return(structure(list(), class='cell-eval-result'))
} else {
rcloud.html.out(res[2])
if(outType %in% c("error"))
- return(structure(list(error="Python evaluation error"), class='cell-eval-error'))
+ return(structure(list(error="Cell evaluation error"), class='cell-eval-error'))
}
})
+ errors <- Filter(function(x) { inherits(x, 'cell-eval-error') }, processed)
+ if (length(errors) > 0) {
+ return(errors[[1]])
+ }
+ return(structure(list(), class='cell-eval-result'))
}
rcloud.jupyter.list.kernel.specs <- function(rcloud.session)
@@ -219,9 +225,12 @@ rcloud.jupyter.list.kernel.specs.for.language <- function(language, rcloud.sessi
kernel_name = kernel_name
)
function(command, silent, rcloud.session, ...) {
+ tryCatch(
+ {
if (is.null(rcloud.session$jupyter.adapter))
.start.jupyter.adapter(rcloud.session)
.exec.with.jupyter(local$kernel_name, command, rcloud.session)
+ }, error=function(o) structure(list(error=o$message), class="cell-eval-error"))
}
}
@@ -230,6 +239,9 @@ rcloud.jupyter.list.kernel.specs.for.language <- function(language, rcloud.sessi
kernel_name = kernel_name
)
function(text, pos, thissession) {
+
+ exp <- tryCatch(
+ {
if (is.null(thissession$jupyter.adapter))
.start.jupyter.adapter(thissession)
completions <- thissession$jupyter.adapter$complete(local$kernel_name, text, pos)
@@ -241,6 +253,10 @@ rcloud.jupyter.list.kernel.specs.for.language <- function(language, rcloud.sessi
res$values <- completions$matches
res$position <- completions$cursor_start
return(res)
+ }, error=function(o) structure(list(error=o$message), class="cell-complete-error"))
+
+ result <- if (!inherits(exp, "cell-complete-error")) exp else list()
+ return(result)
}
}
| 7 |
diff --git a/src/framework/components/sprite/sprite-animation-clip.js b/src/framework/components/sprite/sprite-animation-clip.js @@ -88,6 +88,9 @@ pc.extend(pc, function () {
},
_onSpriteAssetRemove: function (asset) {
+ if (asset.resource === this.sprite) {
+ this.sprite = null;
+ }
},
// If the meshes are re-created make sure
| 12 |
diff --git a/test/z_fuzzer_volumn_restriction_transfer_manager.js b/test/z_fuzzer_volumn_restriction_transfer_manager.js @@ -211,7 +211,7 @@ contract('VolumeRestrictionTransferManager', accounts => {
);
// Mint some tokens and transferred to whitelisted addresses
- await I_SecurityToken.mint(account_investor1, web3.utils.toWei("40", "ether"), {from: token_owner});
+ await I_SecurityToken.mint(account_investor1, web3.utils.toWei("100", "ether"), {from: token_owner});
await I_SecurityToken.mint(account_investor2, web3.utils.toWei("30", "ether"), {from: token_owner});
await I_SecurityToken.mint(account_investor3, web3.utils.toWei("30", "ether"), {from: token_owner});
@@ -224,20 +224,20 @@ contract('VolumeRestrictionTransferManager', accounts => {
it("Should work with multiple transaction within 1 day with Individual and daily Restrictions", async() => {
// let snapId = await takeSnapshot();
- var testRepeat = 2;
+ var testRepeat = 5;
for (var i = 0; i < testRepeat; i++) {
console.log("fuzzer number " + i);
- var individualRestrictTotalAmount = 7;
- var dailyRestrictionAmount = 6;
+ var individualRestrictTotalAmount = Math.floor(Math.random() * 10);
+ var dailyRestrictionAmount = Math.floor(Math.random() * 10);
var rollingPeriod = 2;
var sumOfLastPeriod = 0;
+ console.log("a");
// 1 - add individual restriction with a random number
-
let tx = await I_VolumeRestrictionTM.addIndividualRestriction(
account_investor1,
web3.utils.toWei(individualRestrictTotalAmount.toString()),
@@ -250,7 +250,7 @@ contract('VolumeRestrictionTransferManager', accounts => {
}
);
-
+ console.log("b");
tx = await I_VolumeRestrictionTM.addIndividualDailyRestriction(
account_investor1,
web3.utils.toWei(dailyRestrictionAmount.toString()),
@@ -262,8 +262,8 @@ contract('VolumeRestrictionTransferManager', accounts => {
}
);
-
- var txNumber = 3; // define fuzz test amount for tx within 24 hrs
+ console.log("c");
+ var txNumber = 10; //define fuzz test amount for tx within 24 hrs
for (var j=0; j<txNumber; j++) {
@@ -301,8 +301,12 @@ contract('VolumeRestrictionTransferManager', accounts => {
}
console.log("2");
}
- }
+
// await revertToSnapshot(snapId);
+ await I_VolumeRestrictionTM.removeIndividualRestriction(account_investor1, {from: token_owner});
+ await I_VolumeRestrictionTM.removeIndividualDailyRestriction(account_investor1, {from: token_owner});
+ }
+
});
});
| 1 |
diff --git a/test/jasmine/tests/plot_api_test.js b/test/jasmine/tests/plot_api_test.js @@ -3273,6 +3273,7 @@ describe('Test plot api', function() {
['gl3d_set-ranges', require('@mocks/gl3d_set-ranges.json')],
['gl3d_world-cals', require('@mocks/gl3d_world-cals.json')],
['gl3d_cone-autorange', require('@mocks/gl3d_cone-autorange.json')],
+ ['gl3d_streamtube-simple', require('@mocks/gl3d_streamtube-simple.json')],
['glpolar_style', require('@mocks/glpolar_style.json')],
];
| 0 |
diff --git a/Gruntfile.js b/Gruntfile.js @@ -410,10 +410,10 @@ module.exports = function (grunt) {
* `grunt test`
*/
grunt.registerTask('test', '(CI env) Re-build JS files and run all tests. For manual testing use `grunt jasmine` directly', [
- // 'beforeDefault',
- // 'js_editor',
- // 'jasmine:cartodbui',
- // 'js_builder',
+ 'beforeDefault',
+ 'js_editor',
+ 'jasmine:cartodbui',
+ 'js_builder',
'affected:all',
'bootstrap_webpack_builder_specs',
'webpack:builder_specs',
| 13 |
diff --git a/lib/utils/getSchemeFromUrl.js b/lib/utils/getSchemeFromUrl.js /* @flow */
"use strict";
-// TODO: Use `URL` class, see http://nodejs.org/api/url.html#url_class_url
-const parse = require("url").parse; // eslint-disable-line node/no-deprecated-api
+const { URL } = require("url");
/**
* Get unit from value node
@@ -10,8 +9,13 @@ const parse = require("url").parse; // eslint-disable-line node/no-deprecated-ap
* Returns `null` if the unit is not found.
*/
module.exports = function(urlString /*: string*/) /*: ?string*/ {
- const url = parse(urlString);
- const protocol = url.protocol;
+ let protocol = null;
+
+ try {
+ protocol = new URL(urlString).protocol;
+ } catch (err) {
+ return null;
+ }
if (protocol === null || typeof protocol === "undefined") {
return null;
| 14 |
diff --git a/articles/api-auth/tutorials/implicit-grant.md b/articles/api-auth/tutorials/implicit-grant.md @@ -21,7 +21,7 @@ Where:
* `audience`: The target API for which the Client Application is requesting access on behalf of the user.
* `scope`: The scopes which you want to request authorization for. These must be separated by a space.
-* `response_type`: The response type. For this flow you can either use `token` or `id_token token`. This will specify the type of token you will receive at the end of the flow.
+* `response_type`: The response type. For this flow you can either use `token` or `id_token token`. This will specify the type of token you will receive at the end of the flow. Use `id_token token` to get only an `id_token`, or `token` to get both an `id_toke`n and an `access_token`.
* `client_id`: Your application's Client ID.
* `redirect_uri`: The URL to which the Authorization Server (Auth0) will redirect the User Agent (Browser) after authorization has been granted by the User. The `access_token` (and optionally an `id_token`) will be available in the hash fragment of this URL. This URL must be specified as a valid callback URL under the Client Settings of your application.
* `state`: An opaque value the clients adds to the initial request that the authorization server includes when redirecting the back to the client. This value must be used by the client to prevent CSRF attacks.
| 0 |
diff --git a/docs/StyleSheet.md b/docs/StyleSheet.md @@ -30,23 +30,23 @@ This is a value function defining a style value that changes with its properties
```javascript
// would color the layer based the property rating=[1, 5]
-MapboxGL.StyleSheet.source({
- 1: 'red',
- 2: 'organge',
- 3: 'yellow',
- 4: 'yellowgreen',
- 5: 'green',
-}, 'rating', MapboxGL.InterpolationMode.Categorical);
+MapboxGL.StyleSheet.source([
+ [1, 'red'],
+ [2, 'organge'],
+ [3, 'yellow'],
+ [4, 'yellowgreen'],
+ [5, 'green'],
+], 'rating', MapboxGL.InterpolationMode.Categorical);
// Example of use inside stylesheet
MapboxGL.StyleSheet.create({
- circleColor: MapboxGL.StyleSheet.source({
- 1: 'red',
- 2: 'organge',
- 3: 'yellow',
- 4: 'yellowgreen',
- 5: 'green',
- }, 'rating', MapboxGL.InterpolationMode.Categorical),
+ circleColor: MapboxGL.StyleSheet.source([
+ [1, 'red'],
+ [2, 'organge'],
+ [3, 'yellow'],
+ [4, 'yellowgreen'],
+ [5, 'green'],
+ ], 'rating', MapboxGL.InterpolationMode.Categorical),
});
```
@@ -123,20 +123,20 @@ const layerStyles = MapboxGL.StyleSheet.create({
},
clusteredPoints: {
- circleColor: MapboxGL.StyleSheet.source({
- 25: 'yellow',
- 50: 'red',
- 75: 'blue',
- 100: 'orange',
- 300: 'pink',
- 750: 'white',
- }, 'point_count', MapboxGL.InterpolationMode.Exponential),
-
- circleRadius: MapboxGL.StyleSheet.source({
- 0: 15,
- 100: 20,
- 750: 30,
- }, 'point_count', MapboxGL.InterpolationMode.Exponential),
+ circleColor: MapboxGL.StyleSheet.source([
+ [25, 'yellow'],
+ [50, 'red'],
+ [75, 'blue'],
+ [100, 'orange'],
+ [300, 'pink'],
+ [750, 'white'],
+ ], 'point_count', MapboxGL.InterpolationMode.Exponential),
+
+ circleRadius: MapboxGL.StyleSheet.source([
+ [0, 15],
+ [100, 20],
+ [750, 30],
+ ], 'point_count', MapboxGL.InterpolationMode.Exponential),
circleOpacity: 0.84,
circleStrokeWidth: 2,
@@ -173,11 +173,11 @@ const layerStyles = MapboxGL.StyleSheet.create({
fillExtrusionOpacity: 1,
fillExtrusionHeight: MapboxGL.StyleSheet.identity('height'),
fillExtrusionBase: MapboxGL.StyleSheet.identity('min_height'),
- fillExtrusionColor: MapboxGL.StyleSheet.source({
- 0: 'white',
- 50: 'blue',
- 100: 'red',
- }, 'height', MapboxGL.InterpolationMode.Exponential),
+ fillExtrusionColor: MapboxGL.StyleSheet.source([
+ [0, 'white'],
+ [50, 'blue'],
+ [100, 'red'],
+ ], 'height', MapboxGL.InterpolationMode.Exponential),
fillExtrusionColorTransition: { duration: 2000, delay: 0 },
},
streets: {
@@ -212,7 +212,7 @@ As an end user this is something you won't ever have to deal with. I thought it
```javascript
// constants
{
- type: 'constant',
+ styletype: 'constant',
payload: {
value: {CONSTANT_VALUE}
}
@@ -220,7 +220,7 @@ As an end user this is something you won't ever have to deal with. I thought it
// color
{
- type: 'color',
+ styletype: 'color',
payload: {
value: {INT_COLOR_VALUE}
}
@@ -228,7 +228,7 @@ As an end user this is something you won't ever have to deal with. I thought it
// image
{
- type: 'constant',
+ styletype: 'constant',
payload: {
value: '{img_uri}',
image: true
@@ -237,7 +237,7 @@ As an end user this is something you won't ever have to deal with. I thought it
// transition
{
- type: 'transition',
+ styletype: 'transition',
payload: {
value: { duration: Number, delay: Number }
}
@@ -245,7 +245,7 @@ As an end user this is something you won't ever have to deal with. I thought it
// translate
{
- type: 'translation',
+ styletype: 'translation',
payload: {
value: [x, y]
}
@@ -253,10 +253,13 @@ As an end user this is something you won't ever have to deal with. I thought it
// style function
{
- type: 'function',
+ styletype: 'function',
payload: {
fn: 'camera|source|composite',
- stops: object,
+ stops: [
+ key, // { type: 'string', value: 'propName' }
+ stylevalue // { styletype: 'color', payload: { value: COLOR_INT } }
+ ],
attributeName: '{property_name}',
mode: MapboxGL.{Exponential|Identity|Interval|Categorical}
}
| 3 |
diff --git a/src/components/dashboard/Dashboard.js b/src/components/dashboard/Dashboard.js @@ -49,17 +49,6 @@ const handleAddToHomescreenClick = () => {
const log = logger.child({ from: 'Dashboard' })
-window.addEventListener('beforeinstallprompt', e => {
- console.info('beforeinstallprompt dashboard')
- console.info(e.platforms) // e.g., ["web", "android", "windows"]
- e.userChoice.then(
- function(outcome) {
- console.info(outcome) // either "accepted" or "dismissed"
- },
- err => console.info(err)
- )
-})
-
export type DashboardProps = {
navigation: any,
screenProps: any,
@@ -73,6 +62,19 @@ const Dashboard = props => {
const [showErrorDialog] = useErrorDialog()
const { params } = props.navigation.state
+ useEffect(() => {
+ window.addEventListener('beforeinstallprompt', e => {
+ console.info('beforeinstallprompt dashboard')
+ console.info(e.platforms) // e.g., ["web", "android", "windows"]
+ e.userChoice.then(
+ function(outcome) {
+ console.info(outcome) // either "accepted" or "dismissed"
+ },
+ err => console.info(err)
+ )
+ })
+ }, [])
+
const prepareLoginToken = async () => {
const loginToken = await userStorage.getProfileFieldValue('loginToken')
| 0 |
diff --git a/camera-manager.js b/camera-manager.js @@ -3,8 +3,13 @@ import {getRenderer, camera} from './renderer.js';
import * as notifications from './notifications.js';
import metaversefile from 'metaversefile';
import physicsManager from './physics-manager.js';
+import alea from './alea.js';
const localVector = new THREE.Vector3();
+const localVector2 = new THREE.Vector3();
+const localVector3 = new THREE.Vector3();
+const localQuaternion = new THREE.Quaternion();
+const localEuler = new THREE.Euler();
const cameraOffset = new THREE.Vector3();
let cameraOffsetTargetZ = cameraOffset.z;
@@ -242,6 +247,65 @@ class CameraManager extends EventTarget {
}));
}
}
+ updatePost(timeDiff) {
+ // console.log('camera manager update post');
+
+ const localPlayer = metaversefile.useLocalPlayer();
+ const renderer = getRenderer();
+ const session = renderer.xr.getSession();
+
+ const avatarCameraOffset = session ? zeroVector : this.getCameraOffset();
+ const avatarHeight = localPlayer.avatar ? localPlayer.avatar.height : 0;
+ const crouchOffset = avatarHeight * (1 - localPlayer.getCrouchFactor()) * 0.5;
+
+ const cameraMode = this.getMode();
+
+ switch (cameraMode) {
+ case 'firstperson': {
+ if (localPlayer.avatar) {
+ const boneNeck = localPlayer.avatar.foundModelBones['Neck'];
+ const boneEyeL = localPlayer.avatar.foundModelBones['Eye_L'];
+ const boneEyeR = localPlayer.avatar.foundModelBones['Eye_R'];
+ const boneHead = localPlayer.avatar.foundModelBones['Head'];
+
+ boneNeck.quaternion.setFromEuler(localEuler.set(Math.min(camera.rotation.x * -0.5, 0.6), 0, 0, 'XYZ'));
+ boneNeck.updateMatrixWorld();
+
+ if (boneEyeL && boneEyeR) {
+ boneEyeL.matrixWorld.decompose(localVector, localQuaternion, localVector3);
+ boneEyeR.matrixWorld.decompose(localVector2, localQuaternion, localVector3);
+ localVector3.copy(localVector.add(localVector2).multiplyScalar(0.5));
+ } else {
+ boneHead.matrixWorld.decompose(localVector, localQuaternion, localVector3);
+ localVector.add(localVector2.set(0, 0, 0.1).applyQuaternion(localQuaternion));
+ localVector3.copy(localVector);
+ }
+ } else {
+ localVector3.copy(localPlayer.position);
+ }
+
+ camera.position.copy(localVector3)
+ .sub(localVector.copy(avatarCameraOffset).applyQuaternion(camera.quaternion));
+
+ break;
+ }
+ case 'isometric': {
+ camera.position.copy(localPlayer.position)
+ .sub(
+ localVector.copy(avatarCameraOffset)
+ .applyQuaternion(camera.quaternion)
+ );
+
+ break;
+ }
+ default: {
+ throw new Error('invalid camera mode: ' + cameraMode);
+ }
+ }
+
+ camera.position.y -= crouchOffset;
+ camera.updateMatrixWorld();
+ }
};
const cameraManager = new CameraManager();
export default cameraManager;
\ No newline at end of file
| 0 |
diff --git a/character-physics.js b/character-physics.js @@ -42,7 +42,10 @@ class CharacterPhysics {
}
/* apply the currently held keys to the character */
applyWasd(keysDirection, timeDiff) {
+ if (this.player.avatar && physicsManager.physicsEnabled) {
this.velocity.add(keysDirection);
+ physicsManager.setVelocity(this.player.capsule, this.velocity, true);
+ }
}
/* applyGravity(timeDiffS) {
if (this.player) {
| 12 |
diff --git a/test/json/expectations/request.js b/test/json/expectations/request.js @@ -19,7 +19,7 @@ const getDesc = (expectation) => () => {
if(expectation.properties.body) {
base.push('with');
- base.push(JSON.stringify(substituteFromContext(expectation.properties.body, buildContext())))
+ base.push(JSON.stringify(substituteFromContext(loadPayload(expectation.properties.body), buildContext())))
}
if (closeMatches.length > 0) {
@@ -49,7 +49,7 @@ const getNotDesc = (expectation) => {
if(expectation.properties.body) {
base.push('with');
- base.push(JSON.stringify(substituteFromContext(expectation.properties.body, buildContext())))
+ base.push(JSON.stringify(substituteFromContext(loadPayload(expectation.properties.body), buildContext())))
}
base.push('\nbut calls were found');
| 9 |
diff --git a/cmd/cmd.js b/cmd/cmd.js @@ -94,7 +94,7 @@ class Cmd {
.description(__('New Application'))
.option('--simple', __('create a barebones project meant only for contract development'))
.option('--locale [locale]', __('language to use (default: en)'))
- .option('--template [name/url]', __('download a known template given its name or from a GitHub repository'))
+ .option('--template [name/url]', __('download a template using a known name or a GitHub repository URL'))
.action(function(name, options) {
i18n.setOrDetectLocale(options.locale);
if (name === undefined) {
| 3 |
diff --git a/lib/createTopLevelExpect.js b/lib/createTopLevelExpect.js @@ -1462,7 +1462,7 @@ expectPrototype._executeExpect = function(
return oathbreaker(assertionRule.handler(wrappedExpect, subject, ...args));
};
-expectPrototype._expect = function expect(context, args, forwardedFlags) {
+expectPrototype._expect = function(context, args, forwardedFlags) {
const subject = args[0];
const testDescriptionString = args[1];
| 2 |
diff --git a/public/office.web.js b/public/office.web.js @@ -43,7 +43,14 @@ $(() => {
function goToMeet(roomId) {
const r = confirm('Deseja entrar na call?');
if (r == true) {
+ startVideoConference(roomId);
+ //window.open(externalMeetUrl, '_blank');
+ } else {
+ txt = 'You pressed Cancel!';
+ }
+ }
+ function startVideoConference(roomId){
const domain = 'meet.jit.si';
const options = {
roomName: roomId,
@@ -57,14 +64,8 @@ $(() => {
$("#exampleModalCenter").modal("show");
$("#exampleModalCenter").on("hidden.bs.modal", function () {
- api = null;
- $("#meet").empty();
+ api.dispose();
});
-
- //window.open(externalMeetUrl, '_blank');
- } else {
- txt = 'You pressed Cancel!';
- }
}
function saveLastRoom(data) {
| 4 |
diff --git a/js/webcomponents/bisweb_filetreepipeline.js b/js/webcomponents/bisweb_filetreepipeline.js @@ -152,7 +152,7 @@ class FileTreePipeline extends HTMLElement {
openPipelineCreationModal() {
if (!this.pipelineModal) {
- let pipelineModal = bis_webutil.createmodal('Create a pipeline', 'modal-lg');
+ let pipelineModal = bis_webutil.createmodal('Create a pipeline');
pipelineModal.footer.empty();
pipelineModal.body.addClass('bisweb-pipeline-modal');
@@ -163,9 +163,10 @@ class FileTreePipeline extends HTMLElement {
let moduleIndexArray = [];
for (let key of moduleIndexKeys) {
- moduleIndexArray.push({ 'text' : key, 'value' : key });
+ moduleIndexArray.push({ 'text' : moduleIndex.getModule(key).getDescription().name, 'value' : key });
}
+ //TODO: Fix positioning issue of element inside modal
bootbox.prompt({
'size' : 'small',
'title' : 'Choose a module',
@@ -181,7 +182,7 @@ class FileTreePipeline extends HTMLElement {
this.modules.push(customModule);
let moduleLocation = this.modules.length - 1; //index of module in array at time of adding
- console.log('module location', moduleLocation);
+ let prettyModuleName = moduleIndex.getModule(moduleName).getDescription().name;
//set style for parameters to display properly in modal
let id = bis_webutil.getuniqueid();
@@ -191,11 +192,10 @@ class FileTreePipeline extends HTMLElement {
let removeButton = bis_webutil.createbutton({ 'name': 'Remove', 'type' : 'danger' });
removeButton.on('click', () => {
bootbox.confirm({
- 'message' : `Remove element ${moduleName}?`,
+ 'message' : `Remove module ${prettyModuleName}?`,
'size' : 'small',
'callback' : (result) => {
if (result) {
- console.log('module location', moduleLocation);
this.modules.splice(moduleLocation, 1);
pipelineModal.body.find(`#${id}`).remove();
}
@@ -223,7 +223,7 @@ class FileTreePipeline extends HTMLElement {
bis_webutil.createAlert('Pipeline saved.');
});
- //set pipeline modal to update its modules when it's hidden and shown
+ //set pipeline modal to update its modules when it's hidden and shown, so long as no settings are saved so far.
pipelineModal.dialog.on('show.bs.modal', () => {
if (!this.savedParameters) {
for (let mod of this.modules) {
@@ -237,7 +237,6 @@ class FileTreePipeline extends HTMLElement {
this.pipelineModal = pipelineModal;
}
- console.log('pipeline modal', this.pipelineModal.dialog);
this.pipelineModal.dialog.modal('show');
}
| 2 |
diff --git a/articles/migrations/index.md b/articles/migrations/index.md @@ -112,7 +112,7 @@ For example, the [GET /api/v2/users/{id} endpoint](/api/management/v2#!/Users/ge
For detailed steps and code samples on how to get a token, see [How to get an Access Token](/tokens/access-token#how-to-get-an-access-token).
-Applications must be updated by June 1, 2018, when the ability to use ID Tokens will be disabled. Migration guides will be available by the end of February 2018.
+Applications must be updated by June 1, 2018, when the ability to use ID Tokens will be disabled. Migration guides will be available by the end of March 2018.
#### Am I affected by the change?
| 3 |
diff --git a/src/client/js/components/CustomNavigation.jsx b/src/client/js/components/CustomNavigation.jsx @@ -10,10 +10,10 @@ const CustomNavigation = (props) => {
const [sliderWidth, setSliderWidth] = useState(0);
const [sliderMarginLeft, setSliderMarginLeft] = useState(0);
const navContainer = useRef();
- const tabs = {};
+ const navTabs = {};
Object.keys(props.navTabMapping).forEach((key) => {
- tabs[key] = React.createRef();
+ navTabs[key] = React.createRef();
});
@@ -28,14 +28,13 @@ const CustomNavigation = (props) => {
function registerNavLink(key, elm) {
if (elm != null) {
- tabs[key] = elm;
+ navTabs[key] = elm;
}
}
useEffect(() => {
const navBar = navContainer;
- const navTabs = tabs;
if (activeTab === '') {
return;
| 10 |
diff --git a/packages/composables/use-vue-cesium/index.ts b/packages/composables/use-vue-cesium/index.ts /*
* @Author: zouyaoji@https://github.com/zouyaoji
* @Date: 2021-04-06 09:21:02
- * @LastEditTime: 2022-09-11 11:51:57
+ * @LastEditTime: 2022-10-20 01:49:37
* @LastEditors: zouyaoji
* @Description:
* @FilePath: \vue-cesium@next\packages\composables\use-vue-cesium\index.ts
@@ -13,7 +13,7 @@ import { vcKey } from '@vue-cesium/utils/config'
export default function useVueCesium(containerId?: string): VcViewerProvider {
const instance = getCurrentInstance()
- const provides = instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : (instance.parent as any).provides
+ const provides = instance?.parent === null ? instance.vnode.appContext && instance.vnode.appContext.provides : (instance?.parent as any)?.provides
if ((!provides || !(vcKey in provides)) && !containerId) {
containerId = 'cesiumContainer'
}
| 1 |
diff --git a/src/components/DateRangePicker/SelectionPane.js b/src/components/DateRangePicker/SelectionPane.js @@ -41,24 +41,24 @@ class SelectionPane extends React.Component {
<div style={styles.container}>
<div>
<label style={styles.boxLabel}>From</label>
- <div
+ <a
onClick={() => this._handleDateBoxClick(selectedStartDate, SelectedBox.FROM)}
onKeyUp={(e) => keycode(e) === 'enter' && this._handleDateBoxClick(selectedStartDate, SelectedBox.FROM)}
style={Object.assign({}, styles.dateSelectBox, this.props.selectedBox === SelectedBox.FROM ? styles.selectedDateSelectBox : null)}
tabIndex={0}
>
{selectedStartDate ? moment.unix(selectedStartDate).format('MMM D, YYYY') : 'Select Start Date'}
- </div>
+ </a>
<label style={styles.boxLabel}>To</label>
- <div
+ <a
onClick={() => this._handleDateBoxClick(selectedEndDate, SelectedBox.TO)}
onKeyUp={(e) => keycode(e) === 'enter' && this._handleDateBoxClick(selectedEndDate, SelectedBox.TO)}
style={Object.assign({}, styles.dateSelectBox, this.props.selectedBox === SelectedBox.TO ? styles.selectedDateSelectBox : null)}
tabIndex={0}
>
{selectedEndDate ? moment.unix(selectedEndDate).format('MMM D, YYYY') : 'Select End Date'}
- </div>
+ </a>
</div>
<div>
<div style={Object.assign({}, styles.defaultRangesTitle, { color: theme.Colors.PRIMARY })}>
@@ -100,6 +100,7 @@ class SelectionPane extends React.Component {
borderWidth: 1,
boxSizing: 'border-box',
cursor: 'pointer',
+ display: 'block',
fontFamily: theme.FontFamily,
fontSize: theme.FontSizes.MEDIUM,
marginBottom: theme.Spacing.SMALL,
| 4 |
diff --git a/generators/entity-client/templates/react/src/main/webapp/app/entities/_entity.tsx b/generators/entity-client/templates/react/src/main/webapp/app/entities/_entity.tsx @@ -61,7 +61,7 @@ export interface I<%= entityReactName %>State {
}
<%_ } _%>
-export class <%= entityReactName %> extends React.Component<I<%= entityReactName %>Props, I<%= entityReactName %>State> {
+export class <%= entityReactName %> extends React.Component<I<%= entityReactName %>Props, <% if (searchEngine === 'elasticsearch') { %>I<%= entityReactName %>State<% } else { %>undefined<% } %>> {
constructor(props) {
super(props);
| 1 |
diff --git a/token-metadata/0x174bea2cb8b20646681E855196cF34FcEcEc2489/metadata.json b/token-metadata/0x174bea2cb8b20646681E855196cF34FcEcEc2489/metadata.json "symbol": "FTT",
"address": "0x174bea2cb8b20646681E855196cF34FcEcEc2489",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/includes/Core/Assets/Assets.php b/includes/Core/Assets/Assets.php @@ -378,10 +378,10 @@ final class Assets {
$preload_paths = apply_filters( 'googlesitekit_apifetch_preload_paths', array() );
return array(
+ 'nonce' => ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' ),
'nonceEndpoint' => admin_url( 'admin-ajax.php?action=rest-nonce' ),
- 'nonceMiddleware' => ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' ),
- 'rootURL' => esc_url_raw( get_rest_url() ),
'preloadedData' => array_reduce( $preload_paths, 'rest_preload_api_request', array() ),
+ 'rootURL' => esc_url_raw( get_rest_url() ),
);
},
)
| 10 |
diff --git a/articles/extensions/user-import-export.md b/articles/extensions/user-import-export.md @@ -65,6 +65,8 @@ When done, you'll see the following **Completed** message.

+Once you've imported your users, you can manage them individually using the [Users section of the Dashboard](${manage_url/#/users})
+
### Export Users
To export your existing Auth0 users associated with database connections, select **Export** in the left-hand navigation bar.
| 0 |
diff --git a/procgen-manager.js b/procgen-manager.js +/* this file implements the top-level world procedural generation context.
+it starts the workers and routes calls for the procgen system. */
+
import {murmurhash3} from './procgen/procgen.js';
import {DcWorkerManager} from './dc-worker-manager.js';
import {LodChunkTracker} from './lod.js';
| 0 |
diff --git a/assets/js/components/notifications/ErrorNotifications.js b/assets/js/components/notifications/ErrorNotifications.js @@ -56,7 +56,7 @@ export default function ErrorNotifications() {
id="setup_error"
type="win-error"
title={ __(
- 'Error connecting Site Kit.',
+ 'Error connecting Site Kit',
'google-site-kit'
) }
description={ setupErrorMessage }
| 2 |
diff --git a/commands/punish.js b/commands/punish.js const util = require('../lib/util.js');
exports.command = async (message, args, database, bot) => {
- if (!message.member.hasPermission('MANAGE_GUILD')) {
- message.channel.send('You need the "Manage Server" permission to use this command.');
+ if (!await util.isMod(message.member)) {
+ message.channel.send('You dont have the permission to execute this command.');
return;
}
-
let config = await util.getGuildConfig(message);
if (!config.punishments) {
config.punishments = {};
@@ -36,6 +35,10 @@ exports.command = async (message, args, database, bot) => {
});
return;
}
+ if (!message.member.hasPermission('MANAGE_GUILD')) {
+ message.channel.send('You need the "Manage Server" permission to use this command.');
+ return;
+ }
if (count <= 0) {
message.channel.send("You can't have negative strikes!");
return;
| 11 |
diff --git a/truffle.js b/truffle.js -const HDWalletProvider = require('truffle-hdwallet-provider');
-
-const mnemonic = 'candy maple cake sugar pudding cream honey rich smooth crumble sweet treat';
-
module.exports = {
networks: {
development: {
| 2 |
diff --git a/lib/hooks/session/index.js b/lib/hooks/session/index.js @@ -123,7 +123,7 @@ module.exports = function(app) {
else {
app.log.debug('Please note: since `sails.config.session.cookie.secure` is set to `true`, the session cookie ');
app.log.debug('will _only_ be sent over TLS connections (i.e. secure https:// requests).');
- app.log.debug('Requests made via http:// will not receive a session cookie!');
+ app.log.debug('Requests made via http:// will not include a session cookie!');
app.log.debug();
if (app.config.http.trustProxy === false) {
app.log.debug('Also, note that since `sails.config.http.trustProxy` is set to `false`, secure cookies');
| 4 |
diff --git a/server/game/cards/02.1-ToA/TearsOfAmaterasu.js b/server/game/cards/02.1-ToA/TearsOfAmaterasu.js @@ -8,7 +8,7 @@ class TearsOfAmaterasu extends ProvinceCard {
},
handler: context => {
let numberOfAttackers = context.event.conflict.attackers.length
- if numberOfAttackers > 0 {
+ if (numberOfAttackers > 0) {
this.game.addMessage('{0} uses {1} to gain {2} fate', this.controller, this, numberOfAttackers);
this.game.addFate(this.controller, numberOfAttackers);
}
| 1 |
diff --git a/src/encoded/static/components/dataset.js b/src/encoded/static/components/dataset.js @@ -1282,6 +1282,13 @@ var Series = module.exports.Series = React.createClass({
</div>
: null}
+ {context.donor_diversity ?
+ <div data-test="donordiversity">
+ <dt>Donor diversity</dt>
+ <dd>{context.donor_diversity}</dd>
+ </div>
+ : null}
+
{context.assay_term_name && context.assay_term_name.length ?
<div data-test="description">
<dt>Assay</dt>
| 0 |
diff --git a/src/slider.js b/src/slider.js @@ -25,7 +25,7 @@ export default class Slider extends React.Component {
}
// handles responsive breakpoints
- UNSAFE_componentWillMount() {
+ componentDidMount() {
// performance monitoring
//if (process.env.NODE_ENV !== 'production') {
//const { whyDidYouUpdate } = require('why-did-you-update')
| 2 |
diff --git a/package.json b/package.json {
"name": "igv",
- "version": "VERSION",
+ "version": "2.0.0-rc2",
"description": "Embeddable genomic visualization component based on the Integrative Genomics Viewer",
"main": "dist/igv.esm.js",
"files": [
| 12 |
diff --git a/unit-test/background/utils.es6.js b/unit-test/background/utils.es6.js @@ -18,12 +18,38 @@ const findParentTestCases = [
'parent': 'undefined'
}
]
+const extractHostFromURLTestCases = [
+ {
+ 'url': 'http://google.com',
+ 'result': 'google.com',
+ 'resultWithWWW': 'google.com'
+ },
+ {
+ 'url': 'https://www.duckduckgo.com/?q=test&atb=v126-7&ia=web',
+ 'result': 'duckduckgo.com',
+ 'resultWithWWW': 'www.duckduckgo.com'
+ },
+ {
+ 'url': 'asdasdasd',
+ 'result': 'asdasdasd',
+ 'resultWithWWW': 'asdasdasd'
+ },
+ {
+ 'url': 'www.bttf.duckduckgo.com',
+ 'result': 'bttf.duckduckgo.com',
+ 'resultWithWWW': 'www.bttf.duckduckgo.com'
+ },
+ {
+ 'url': 'https://www.amazon.co.uk',
+ 'result': 'amazon.co.uk',
+ 'resultWithWWW': 'www.amazon.co.uk'
+ }
+]
describe('utils.findParent()', () => {
findParentTestCases.forEach((test) => {
it(`should return ${test.parent} as a parent for: ${test.url}`, () => {
let result = utils.findParent(test.url.split('.'))
-
if (test.parent === 'undefined') {
expect(result).toBe(undefined)
} else {
@@ -46,3 +72,17 @@ describe('utils.getUpgradeToSecureSupport()', () => {
expect(result).toEqual(false)
})
})
+
+describe('utils.extractHostFromURL()', () => {
+ extractHostFromURLTestCases.forEach((test) => {
+ it(`should return ${test.result} as host for the url: ${test.url}`, () => {
+ let result = utils.extractHostFromURL(test.url)
+ expect(result).toEqual(test.result)
+ })
+
+ it(`should return ${test.resultWithWWW} as host for the url: ${test.url}`, () => {
+ let result = utils.extractHostFromURL(test.url, true)
+ expect(result).toEqual(test.resultWithWWW)
+ })
+ })
+})
| 3 |
diff --git a/src/components/topic/TopicsSubHeaderContainer.js b/src/components/topic/TopicsSubHeaderContainer.js @@ -11,7 +11,7 @@ const localMessages = {
topicUnfavorited: { id: 'source.unfavorited', defaultMessage: 'Unstar this topic' },
};
-const SourceMgrSubHeaderContainer = (props) => {
+const TopicMgrSubHeaderContainer = (props) => {
const { topicId, topicInfo, handleSetFavorited } = props;
const { formatMessage } = props.intl;
let title = '';
@@ -41,7 +41,7 @@ const SourceMgrSubHeaderContainer = (props) => {
);
};
-SourceMgrSubHeaderContainer.propTypes = {
+TopicMgrSubHeaderContainer.propTypes = {
// from parent
// from context
intl: React.PropTypes.object.isRequired,
@@ -70,6 +70,6 @@ const mapDispatchToProps = (dispatch, ownProps) => ({
export default
injectIntl(
connect(mapStateToProps, mapDispatchToProps)(
- SourceMgrSubHeaderContainer
+ TopicMgrSubHeaderContainer
)
);
| 10 |
diff --git a/module/damage/damagecalculator.js b/module/damage/damagecalculator.js @@ -104,7 +104,8 @@ export class CompositeDamageCalculator {
}
static isResourceDamageType(damageType) {
- return !!DamageTables.woundModifiers[damageType].resource
+ let modifier = DamageTables.woundModifiers[damageType]
+ return !!modifier && !!DamageTables.woundModifiers[damageType].resource
}
get(viewId) {
@@ -600,12 +601,12 @@ export class CompositeDamageCalculator {
}
get resource() {
- if (CompositeDamageCalculator.isResourceDamageType(this._damageType)) {
+ if (CompositeDamageCalculator.isResourceDamageType(this._applyTo)) {
let trackers = objectToArray(this._defender.data.data.additionalresources.tracker)
let tracker = null
let index = null
trackers.forEach((t, i) => {
- if (t.alias === this._damageType) {
+ if (t.alias === this._applyTo) {
index = i
tracker = t
return
@@ -614,17 +615,17 @@ export class CompositeDamageCalculator {
return [tracker, `data.additionalresources.tracker.${index}`]
}
- if (this._damageType === 'fat') return [this._defender.data.data.FP, 'data.FP']
+ if (this._applyTo === 'fat') return [this._defender.data.data.FP, 'data.FP']
return [this._defender.data.data.HP, 'data.HP']
}
get resourceType() {
- if (CompositeDamageCalculator.isResourceDamageType(this._damageType)) {
+ if (CompositeDamageCalculator.isResourceDamageType(this._applyTo)) {
let trackers = objectToArray(this._defender.data.data.additionalresources.tracker)
- return trackers.find(it => it.alias === this._damageType).name
+ return trackers.find(it => it.alias === this._applyTo).name
}
- if (this._damageType === 'fat') return 'FP'
+ if (this._applyTo === 'fat') return 'FP'
return 'HP'
}
| 11 |
diff --git a/articles/quickstart/spa/_includes/_authz_client_routes_disclaimer.md b/articles/quickstart/spa/_includes/_authz_client_routes_disclaimer.md For the access control on the client-side, the `scope` values that you get in local storage are only a clue that the user has those scopes. The user could manually adjust the scopes in local storage to access routes they shouldn't have access to.
::: warning
-Do not store your sensitive data in your SPA. Browsers are public clients and must be treated as public. You need to keep any sensitive data on your server. Your server is the only place where you can store the data securely. Do not include any sensitive data in your client-side SPA.
+Do not store your sensitive data in your client-side SPA. Browsers are public clients and must be treated as public. You need to keep any sensitive data on your server. Your server is the only place where you can store the data securely.
:::
To get access to data on your server, the user needs a valid access token. Any attempt to modify an access token invalidates the token. If a user tries to edit the payload of their access token to include different scopes, the token will lose its integrity and become useless.
| 2 |
diff --git a/frontend/src/app/plugins/add-plugin-controller.js b/frontend/src/app/plugins/add-plugin-controller.js MessageService.error(key + " : " + err.data.customMessage[key])
})
$scope.errors = errors
- },function evt(evt){
+ },function evt(event){
// Only used for ssl plugin certs upload
- var progressPercentage = parseInt(100.0 * evt.loaded / evt.total);
- $log.debug('progress: ' + progressPercentage + '% ' + evt.config.data.file.name);
+ var progressPercentage = parseInt(100.0 * event.loaded / event.total);
+ $log.debug('progress: ' + progressPercentage +'% ' + event.config.data.file.name);
})
}
| 1 |
diff --git a/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-update.tsx.ejs b/generators/entity-client/templates/react/src/main/webapp/app/entities/entity-update.tsx.ejs @@ -614,7 +614,7 @@ _%>
onChange={this.<%= relationshipFieldName %>Update}>
<option value="" key="0" />
{
- (<%= otherEntityNamePlural %>) ? <%=otherEntityNamePlural.toLowerCase() %>.map(otherEntity =>
+ (<%= otherEntityNamePlural %>) ? <%=otherEntityNamePlural %>.map(otherEntity =>
<option
value={otherEntity.<%=otherEntityField%>}
key={otherEntity.id}>
| 2 |
diff --git a/engine/modules/entities/src/main/resources/view/entity-module/properties.js b/engine/modules/entities/src/main/resources/view/entity-module/properties.js @@ -55,6 +55,8 @@ export const PROPERTIES = {
strokeColor: colorOpts,
tint: colorOpts,
+ baseWidth: constOpts,
+ baseHeight: constOpts,
image: stringOpts,
images: stringOpts,
started: {
| 12 |
diff --git a/src/components/staking/PageValidator.vue b/src/components/staking/PageValidator.vue <template>
<TmPage
- v-if="validator"
:managed="true"
:loading="delegates.loading"
:loaded="delegates.loaded"
:error="delegates.error"
+ :data-empty="!validator"
data-title="Validator"
>
<template v-if="validator" slot="managed-body">
:denom="bondDenom"
/>
</template>
- </TmPage>
- <TmPage v-else :managed="true" :data-empty="!validator">
+ <template v-else>
<template slot="title">
Validator Not Found
</template>
<template slot="subtitle">
<div>
Please visit the
- <a href="/#/staking/validators/">
+ <router-link to="/staking/validators/">
Validators
- </a>
+ </router-link>
page to view all validators
</div>
</template>
+ </template>
</TmPage>
</template>
| 3 |
diff --git a/src/default_panels/StyleTracesPanel.js b/src/default_panels/StyleTracesPanel.js @@ -593,13 +593,15 @@ const StyleTracesPanel = (props, {localize: _}) => (
'scatterpolargl',
]}
>
- <Flaglist
+ <Dropdown
attr="hoveron"
label={_('Hover on')}
options={[
{label: _('Fills'), value: 'fills'},
{label: _('Points'), value: 'points'},
+ {label: _('Fills & Points'), value: 'fills+points'},
]}
+ clearable={false}
/>
</TraceTypeSection>
</TraceAccordion>
| 14 |
diff --git a/www/MarkerCluster.js b/www/MarkerCluster.js @@ -570,6 +570,7 @@ Object.defineProperty(MarkerCluster.prototype, '_redraw', {
var marker = self._markerMap[markerId];
if (self._isRemoved ||
self._stopRequest ||
+ !marker.isVisible() ||
marker.get('_cluster').isRemoved ||
marker.get('_cluster').isAdded) {
return;
@@ -614,6 +615,7 @@ Object.defineProperty(MarkerCluster.prototype, '_redraw', {
keys.forEach(function (markerId) {
var marker = self._markerMap[markerId];
if (self._isRemoved ||
+ !marker.isVisible() ||
self._stopRequest ||
marker.get('_cluster').isRemoved) {
return;
@@ -686,6 +688,7 @@ Object.defineProperty(MarkerCluster.prototype, '_redraw', {
if (self._isRemoved ||
self._stopRequest ||
marker.get('_cluster').isRemoved ||
+ !marker.isVisible() ||
ignoreGeocells.indexOf(geocell) > -1 ||
marker.get('_cluster').isAdded) {
return;
| 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.