code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/README.md b/README.md @@ -175,7 +175,7 @@ We use [marked](https://github.com/chjj/marked) to parse Markdown. To customise
```javascript
Reveal.initialize({
// Options which are passed into marked
- // See https://github.com/chjj/marked#options-1
+ // See https://marked.js.org/#/USING_ADVANCED.md#options
markdown: {
smartypants: true
}
| 1 |
diff --git a/packages/app/src/server/models/user.js b/packages/app/src/server/models/user.js /* eslint-disable no-use-before-define */
+import { generateGravatarSrc } from '~/utils/gravatar';
import loggerFactory from '~/utils/logger';
+
const crypto = require('crypto');
const debug = require('debug')('growi:models:user');
@@ -227,9 +229,7 @@ module.exports = function(crowi) {
userSchema.methods.generateImageUrlCached = async function() {
if (this.isGravatarEnabled) {
- const email = this.email || '';
- const hash = md5(email.trim().toLowerCase());
- return `https://gravatar.com/avatar/${hash}`;
+ return generateGravatarSrc(this.email);
}
if (this.image != null) {
return this.image;
| 14 |
diff --git a/lib/editor/result-view.js b/lib/editor/result-view.js @@ -23,6 +23,8 @@ export default class ResultView {
this.lastEdWidth = -1
+ this.isVisible = true
+
// HACK: compatibility to proto-repl:
this.classList = {add() {}}
@@ -169,6 +171,7 @@ export default class ResultView {
this.isVisible = false
this.left = 0
this.shouldRedraw = false
+ this.overlayElement = this.complete.parentElement
if (this.overlayElement) {
let rect = this.getView().getBoundingClientRect()
let parentRect = this.getView().parentElement.getBoundingClientRect()
| 12 |
diff --git a/lib/waterline/utils/query/deferred.js b/lib/waterline/utils/query/deferred.js @@ -66,6 +66,19 @@ var Deferred = module.exports = function(context, method, wlQueryInfo) {
// criteria clauses (like `where`, `limit`, etc.) as properties, then we can
// safely assume that it is relying on shorthand: i.e. simply specifying what
// would normally be the `where` clause, but at the top level.
+ //
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ // Note that this is necessary out here in addition to what's in FS2Q, because
+ // normalization does not occur until we _actually_ execute the query. In other
+ // words, we need this code to allow for hybrid usage like:
+ // ```
+ // User.find({ name: 'Santa' }).where({ age: { '>': 1000 } }).limit(30)
+ // ```
+ // vs.
+ // ```
+ // User.find({ limit: 30 }).where({ name: 'Santa', age: { '>': 1000 } })
+ // ```
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
var recognizedClauses = _.intersection(_.keys(this._wlQueryInfo.criteria), RECOGNIZED_S2Q_CRITERIA_CLAUSE_NAMES);
if (recognizedClauses.length === 0) {
this._wlQueryInfo.criteria = {
| 0 |
diff --git a/src/Member.js b/src/Member.js @@ -45,7 +45,7 @@ class Member {
* @param {Number} duration
* @return {Promise<Boolean>} success
*/
- async dmUser(verb, reason, duration) {
+ async dmPunishedUser(verb, reason, duration) {
if (duration)
return await this.guild.sendDM(this.user, `You have been ${verb} from \`${this.guild.guild.name}\` for ${util.secToTime(duration)} | ${reason}`);
else
| 10 |
diff --git a/app-template/bitcoincom/google-services.json b/app-template/bitcoincom/google-services.json "storage_bucket": "bitcoin-com-wallet.appspot.com"
},
"client": [
- {
- "client_info": {
- "mobilesdk_app_id": "1:432300239540:android:3be699f352c30a45",
- "android_client_info": {
- "package_name": "com.bitcoin.wallet"
- }
- },
- "oauth_client": [
- {
- "client_id": "432300239540-aeh6b8eebnkgq0e3tv0g0a0t1qhkhhcc.apps.googleusercontent.com",
- "client_type": 3
- }
- ],
- "api_key": [
- {
- "current_key": "AIzaSyDphC3flCVFFOENAy9tMgOUFxC6_H8JWMs"
- }
- ],
- "services": {
- "analytics_service": {
- "status": 1
- },
- "appinvite_service": {
- "status": 1,
- "other_platform_oauth_client": []
- },
- "ads_service": {
- "status": 2
- }
- }
- },
{
"client_info": {
"mobilesdk_app_id": "1:432300239540:android:e23224cd1aed3778",
| 3 |
diff --git a/.github/stale.yml b/.github/stale.yml @@ -5,7 +5,7 @@ daysUntilStale: 180
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
-daysUntilClose: 30
+daysUntilClose: 14
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
| 12 |
diff --git a/modules/Cockpit/cli/install/addon.php b/modules/Cockpit/cli/install/addon.php @@ -5,16 +5,16 @@ if (!COCKPIT_CLI) return;
$url = $app->param('url', null);
$name = $app->param('name', null);
-if (!$url) {
- return CLI::writeln('No addon url defined', false);;
-}
-
if (!$name) {
return CLI::writeln('No addon name defined', false);;
}
$name = str_replace(['.', '/', ' '], '', $name);
+if (!$url) {
+ $url = "https://github.com/agentejo/{$name}/archive/master.zip";
+}
+
$fs = $app->helper('fs');
$tmppath = $app->path('#tmp:').'/'.$name;
$error = false;
| 11 |
diff --git a/src/functions/genfrac.js b/src/functions/genfrac.js @@ -190,6 +190,13 @@ const mathmlBuilder = (group, options) => {
mml.buildGroup(group.denom, options),
]);
+ if (!group.hasBarLine) {
+ node.setAttribute("linethickness", "0px");
+ } else if (group.barSize) {
+ const ruleWidth = calculateSize(group.barSize, options);
+ node.setAttribute("linethickness", ruleWidth + "em");
+ }
+
const style = adjustStyle(group.size, options.style);
if (style.size !== options.style.size) {
node = new mathMLTree.MathNode("mstyle", [node]);
@@ -198,13 +205,6 @@ const mathmlBuilder = (group, options) => {
node.setAttribute("scriptlevel", "0");
}
- if (!group.hasBarLine) {
- node.setAttribute("linethickness", "0px");
- } else if (group.barSize) {
- const ruleWidth = calculateSize(group.barSize, options);
- node.setAttribute("linethickness", ruleWidth + "em");
- }
-
if (group.leftDelim != null || group.rightDelim != null) {
const withDelims = [];
| 7 |
diff --git a/server/workers/dataprocessing/src/streamgraph.py b/server/workers/dataprocessing/src/streamgraph.py @@ -24,7 +24,8 @@ class Streamgraph(object):
self.logger.addHandler(handler)
def get_streamgraph_data(self, metadata, query, n=12, method="tfidf"):
- df = pd.DataFrame.from_records(metadata)
+ metadata = pd.DataFrame.from_records(metadata)
+ df = metadata.copy()
df.year = pd.to_datetime(df.year)
df = df[df.subject.map(lambda x: x is not None)]
df.subject = df.subject.map(lambda x: [s for s in x.split("; ")] if isinstance(x, str) else "")
@@ -36,8 +37,9 @@ class Streamgraph(object):
boundaries = self.get_boundaries(df)
daterange = self.get_daterange(boundaries)
data = pd.merge(counts, boundaries, on='year')
- top_n = self.get_top_n(metadata, query, n, method)
- data = (data[data.subject.str.contains('|'.join(top_n), flags=re.IGNORECASE)]
+ top_n = self.get_top_n(metadata.copy(), query, n, method)
+ sanitized_top_n = [re.escape(t) for t in top_n]
+ data = (data[data.subject.str.contains('|'.join(sanitized_top_n), flags=re.IGNORECASE)]
.sort_values("year")
.reset_index(drop=True))
sg_data = {}
@@ -80,8 +82,7 @@ class Streamgraph(object):
boundaries = df[["boundary_label", "year"]].drop_duplicates()
return boundaries
- def get_top_n(self, metadata, query, n, method):
- df = pd.DataFrame.from_records(metadata)
+ def get_top_n(self, df, query, n, method):
df = df[df.subject.map(lambda x: len(x) > 2)]
corpus = df.subject.tolist()
# set stopwords , stop_words='english'
@@ -139,7 +140,7 @@ class Streamgraph(object):
x = pd.DataFrame(daterange, columns=["year"])
temp = []
for item in top_n:
- tmp = (pd.merge(data[data.subject.str.contains(item, flags=re.IGNORECASE)], x,
+ tmp = (pd.merge(data[data.subject.str.contains(item, case=False, regex=False)], x,
left_on="year", right_on="year",
how="right")
.groupby("year")
| 1 |
diff --git a/lib/grammars.coffee b/lib/grammars.coffee @@ -138,6 +138,12 @@ module.exports =
'C++':
if GrammarUtils.OperatingSystem.isDarwin()
+ "Selection Based":
+ command: "bash"
+ args: (context) ->
+ code = context.getCode(true)
+ tmpFile = GrammarUtils.createTempFileWithCode(code, ".cpp")
+ ["-c", "xcrun clang++ -fcolor-diagnostics -std=c++14 -Wall -include stdio.h -include iostream '" + tmpFile + "' -o /tmp/cpp.out && /tmp/cpp.out"]
"File Based":
command: "bash"
args: (context) -> ['-c', "xcrun clang++ -fcolor-diagnostics -std=c++14 -Wall -include stdio.h -include iostream '" + context.filepath + "' -o /tmp/cpp.out && /tmp/cpp.out"]
@@ -158,6 +164,12 @@ module.exports =
'C++14':
if GrammarUtils.OperatingSystem.isDarwin()
+ "Selection Based":
+ command: "bash"
+ args: (context) ->
+ code = context.getCode(true)
+ tmpFile = GrammarUtils.createTempFileWithCode(code, ".cpp")
+ ["-c", "xcrun clang++ -fcolor-diagnostics -std=c++14 -Wall -include stdio.h -include iostream '" + tmpFile + "' -o /tmp/cpp.out && /tmp/cpp.out"]
"File Based":
command: "bash"
args: (context) -> ['-c', "xcrun clang++ -fcolor-diagnostics -std=c++14 -Wall -include stdio.h -include iostream '" + context.filepath + "' -o /tmp/cpp.out && /tmp/cpp.out"]
| 0 |
diff --git a/scenes/SceneMiners.js b/scenes/SceneMiners.js @@ -28,12 +28,7 @@ export default class SceneMiners extends React.Component {
const sources = json.data;
sources.forEach((group) => {
- miners = [
- ...group.minerAddresses.map((entity) => {
- return { location: group.name, ...entity };
- }),
- ...miners,
- ];
+ miners = [...group.minerAddresses, ...miners];
});
} catch (e) {}
@@ -57,7 +52,7 @@ export default class SceneMiners extends React.Component {
data={{
columns: [
{
- key: "miner",
+ key: "id",
name: "Miner",
width: "96px",
},
@@ -82,7 +77,12 @@ export default class SceneMiners extends React.Component {
width: "100%",
},
],
- rows: this.state.miners,
+ rows: this.state.miners.map((each) => {
+ return {
+ ...each,
+ ...each.storageAsk,
+ };
+ }),
}}
/>
</Section>
| 3 |
diff --git a/.github/workflows/run_affected_tests.yml b/.github/workflows/run_affected_tests.yml @@ -65,6 +65,10 @@ on:
# List paths for which changes should *not* trigger this workflow:
- '!lib/**/_tools/**'
+ workflow_dispatch:
+ files:
+ description: 'List of changed files for which to run affected tests (space separated):'
+
# Workflow jobs:
jobs:
@@ -112,16 +116,30 @@ jobs:
make init
timeout-minutes: 5
- # Get list of changed directories:
- - name: 'Get list of changed directories'
- id: changed-directories
+ # Get list of changed files from PR and push events:
+ - name: 'Get list of changed files'
+ if: github.event_name != 'workflow_dispatch'
+ id: changed-files
uses: tj-actions/changed-files@v35
with:
separator: ' '
dir_names: 'true'
+ # Get list of changed files from workflow dispatch event:
+ - name: 'Get list of changed files (from user input)'
+ if: github.event_name == 'workflow_dispatch'
+ id: changed-files-user-input
+ run: |
+ echo "::set-output name=all_changed_files::${{ github.event.inputs.files }}"
+ timeout-minutes: 5
+
# Run JavaScript tests:
- name: 'Run JavaScript tests'
run: |
- . "$GITHUB_WORKSPACE/.github/workflows/scripts/run_affected_tests" ${{ steps.changed-directories.outputs.all_changed_files }}
+ if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
+ all_changed_files="${{ steps.changed-files-user-input.outputs.all_changed_files }}"
+ else
+ all_changed_files="${{ steps.changed-files.outputs.all_changed_files }}"
+ fi
+ . "$GITHUB_WORKSPACE/.github/workflows/scripts/run_affected_tests" "$all_changed_files"
timeout-minutes: 15
| 11 |
diff --git a/slick.grid.js b/slick.grid.js @@ -2097,7 +2097,7 @@ if (typeof Slick === "undefined") {
c = columns[columnOrIndexOrId];
}
else if (typeof columnOrIndexOrId === 'string') {
- for (i = 0; i < columns.length; i++) {
+ for (var i = 0; i < columns.length; i++) {
if (columns[i].Id === columnOrIndexOrId) { c = columns[i]; }
}
}
@@ -2222,7 +2222,7 @@ if (typeof Slick === "undefined") {
function LogColWidths () {
var s = "Col Widths:";
- for (i = 0; i < columns.length; i++) { s += ' ' + columns[i].width; }
+ for (var i = 0; i < columns.length; i++) { s += ' ' + columns[i].width; }
console.log(s);
}
| 1 |
diff --git a/src/utils/wallet.js b/src/utils/wallet.js @@ -475,7 +475,15 @@ class Wallet {
}
async getLedgerAccountIds() {
- const publicKey = await this.getLedgerPublicKey()
+ let publicKey
+ try {
+ publicKey = await this.getLedgerPublicKey()
+ } catch (error) {
+ if (error.id === 'U2FNotSupported') {
+ throw new WalletError(error.message, 'signInLedger.getLedgerAccountIds.U2FNotSupported')
+ }
+ throw error
+ }
await store.dispatch(setLedgerTxSigned(true))
// TODO: getXXX methods shouldn't be modifying the state
await setKeyMeta(publicKey, { type: 'ledger' })
| 9 |
diff --git a/articles/_includes/_api-auth-customize-tokens.md b/articles/_includes/_api-auth-customize-tokens.md -You can use [Rules](/rules) to change the returned scopes of the `access_token` and/or add claims to it (and the `id_token`) with a script like this:
+You can use [Rules](/rules) to change the returned scopes of the Access Token and/or add claims to it (and the ID Token) with a script like this:
```javascript
function(user, context, callback) {
| 10 |
diff --git a/packages/idyll-document/src/utils/index.js b/packages/idyll-document/src/utils/index.js @@ -12,7 +12,9 @@ export const buildExpression = (acc, expr, isEventHandler) => {
node => {
switch (node.type) {
case 'Identifier':
- if (Object.keys(acc).indexOf(node.name) > -1) {
+ const isPropertyAccess =
+ node.parent.source().indexOf(`.${node.name}`) > -1;
+ if (!isPropertyAccess && Object.keys(acc).indexOf(node.name) > -1) {
identifiers.push(node.name);
node.update('__idyllStateProxy.' + node.source());
}
@@ -85,7 +87,6 @@ export const evalExpression = (acc, expr, key, context) => {
const isEventHandler =
key && (key.match(/^on[A-Z].*/) || key.match(/^handle[A-Z].*/));
let e = buildExpression(acc, expr, isEventHandler);
-
if (isEventHandler) {
return function() {
eval(e);
| 1 |
diff --git a/scripts/preinstall/darwin.bash.sh b/scripts/preinstall/darwin.bash.sh @@ -4,7 +4,8 @@ tmp_dir=$(mktemp -d -t parsr-install)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" &&
brew install qpdf imagemagick tesseract tesseract-lang tcl-tk ghostscript mupdf-tools pandoc &&
+brew upgrade python &&
curl https://bootstrap.pypa.io/get-pip.py -o $tmp_dir/get-pip.py &&
-python $tmp_dir/get-pip.py &&
+python3 $tmp_dir/get-pip.py &&
pip install pdfminer.six camelot-py[cv] PyPDF2 &&
rm -rf $tmp_dir
\ No newline at end of file
| 0 |
diff --git a/packages/mjml/src/index.js b/packages/mjml/src/index.js +import path from 'path'
+import fs from 'fs'
+
import mjml2html, { registerComponent } from 'mjml-core'
import { registerDependencies } from 'mjml-validator'
@@ -46,4 +49,18 @@ registerComponent(CarouselImage)
registerDependencies(require('./dependencies'))
+
+try {
+ const mjmlConfig = fs.readFileSync(path.join(process.cwd(), '.mjmlconfig'));
+ const custom_comps = JSON.parse(mjmlConfig).packages
+
+ custom_comps.forEach((compPath) => {
+ registerComponent(require(path.join(process.cwd(), compPath)));
+ })
+} catch(e) {
+ if (e.code !== 'ENOENT') {
+ console.log('Error when registering custom components : ', e)
+ }
+}
+
export default mjml2html
| 9 |
diff --git a/resource/js/components/HeaderSearchBox/SearchForm.js b/resource/js/components/HeaderSearchBox/SearchForm.js @@ -60,7 +60,7 @@ export default class SearchForm extends React.Component {
crowi={this.crowi}
onChange={this.onChange}
emptyLabel={emptyLabel}
- placeholder="keyword1-keyword2"
+ placeholder="Search ..."
/>
<InputGroup.Button>
<Button type="submit" bsStyle="link">
| 13 |
diff --git a/docs/installation.md b/docs/installation.md # Installation
## Requirements
-BGPalerter requires a machine with *minimum* 2GB RAM. However, I strongly recommend 4GB.
+BGPalerter requires a machine with *minimum* 2GB RAM and swap enabled. However, I recommend 4GB.
+If you are using small AWS EC2 instances (or similar), remember to activate the swap.
## Running BGPalerter from binaries - Quick Setup
| 7 |
diff --git a/public/javascripts/adalog/tree/projectlist.js b/public/javascripts/adalog/tree/projectlist.js @@ -9,8 +9,9 @@ define([
var ProjectList = function (selector, options) {
this.selector = selector;
- this.enabled = options.sbt_project_gen_enabled || utils.get_body_data("sbt_project_gen_enabled");
- if (this.enabled === "true") {
+ this.enabled = options.sbt_project_gen_enabled === "true" || utils.get_body_data("sbt_project_gen_enabled") === "true";
+ console.log("is Sbt project generation enabled:" + this.enabled);
+ if (this.enabled) {
this.element = $(selector);
this.style();
this.bind_events();
| 7 |
diff --git a/bin/ns-upload.sh b/bin/ns-upload.sh @@ -49,15 +49,17 @@ fi
# use token authentication if the user has a token set in their API_SECRET environment variable
if [[ "${API_SECRET,,}" =~ "token=" ]]; then
- API_SECRET_HEADER=""
REST_ENDPOINT="${REST_ENDPOINT}?${API_SECRET}"
+ (test "$ENTRIES" != "-" && cat $ENTRIES || cat )| (
+ curl -m 30 -s -X POST --data-binary @- \
+ -H "content-type: application/json" \
+ $REST_ENDPOINT
+ ) && ( test -n "$OUTPUT" && touch $OUTPUT ; logger "Uploaded $ENTRIES to $NIGHTSCOUT_HOST" ) || logger "Unable to upload to $NIGHTSCOUT_HOST"
else
- API_SECRET_HEADER='-H "API-SECRET: $API_SECRET"'
-fi
-
(test "$ENTRIES" != "-" && cat $ENTRIES || cat )| (
curl -m 30 -s -X POST --data-binary @- \
- ${API_SECRET_HEADER} -H "content-type: application/json" \
+ -H "API-SECRET: $API_SECRET" \
+ -H "content-type: application/json" \
$REST_ENDPOINT
) && ( test -n "$OUTPUT" && touch $OUTPUT ; logger "Uploaded $ENTRIES to $NIGHTSCOUT_HOST" ) || logger "Unable to upload to $NIGHTSCOUT_HOST"
-
+fi
| 1 |
diff --git a/config/_app.yml b/config/_app.yml @@ -37,6 +37,9 @@ friends:
url: 'https://getbootstrap.com/'
- name: nixCraft
url: 'https://www.cyberciti.biz/'
+ - name: Edubirdie
+ url: 'https://edubirdie.com/'
+ nofollow: false
redirects:
- name: legacy
from: /legacy/
| 0 |
diff --git a/screenshot.html b/screenshot.html }, '*', [arrayBuffer]);
} else if (type === 'png' || type === 'jpg') {
const canvas = await (async () => {
+ const _renderDefaultCanvas = async () => {
+ const uiRenderer = _makeUiRenderer();
+
+ const htmlString = _makeIconString(hash, ext);
+ const result = await uiRenderer.render(htmlString, width, height);
+ const {data, anchors} = result;
+ const canvas = document.createElement('canvas');
+ canvas.width = width;
+ canvas.height = height;
+ const ctx = canvas.getContext('2d');
+ ctx.drawImage(data, 0, 0);
+ return canvas;
+ };
+
if (['glb', 'vrm', 'vox'].includes(ext)) {
const {renderer, scene, camera} = _makeRenderer();
- const o = await (async () => {
+ let o;
+ try {
switch (ext) {
case 'glb':
- case 'vrm':
- return await _loadGltf();
- case 'vox':
- return await _loadVox();
- default:
- return null;
+ case 'vrm': {
+ o = await _loadGltf();
+ break;
}
- })();
+ case 'vox': {
+ o = await _loadVox();
+ break;
+ }
+ }
+ } catch (err) {
+ console.warn(err);
+ }
+ if (o) {
scene.add(o);
const boundingBox = new THREE.Box3().setFromObject(o);
renderer.render(scene, camera);
return renderer.domElement;
} else {
- const uiRenderer = _makeUiRenderer();
-
- const htmlString = _makeIconString(hash, ext);
- const result = await uiRenderer.render(htmlString, width, height);
- const {data, anchors} = result;
- const canvas = document.createElement('canvas');
- canvas.width = width;
- canvas.height = height;
- const ctx = canvas.getContext('2d');
- ctx.drawImage(data, 0, 0);
- return canvas;
+ return await _renderDefaultCanvas();
+ }
+ } else {
+ return await _renderDefaultCanvas();
}
})();
| 0 |
diff --git a/lib/assets/javascripts/unpoly/viewport.coffee.erb b/lib/assets/javascripts/unpoly/viewport.coffee.erb @@ -506,13 +506,37 @@ up.viewport = do ->
The scroll positions will be associated with the current URL.
They can later be restored by calling [`up.viewport.restoreScroll()`](/up.viewport.restoreScroll)
- at the same URL.
+ at the same URL, or by following a link with an [`[up-restore-scroll]`](/a-up-follow#up-restore-scroll)
+ attribute.
- Unpoly automatically saves scroll positions whenever a fragment was updated on the page.
+ Unpoly automatically saves scroll positions before a [fragment update](/up.replace)
+ you will rarely need to call this function yourself.
+
+ \#\#\# Examples
+
+ Should you need to save the current scroll positions outside of a [fragment update](/up.replace),
+ you may call:
+
+ up.viewport.saveScroll()
+
+ Instead of saving the current scroll positions for the current URL, you may also pass another
+ url or vertical scroll positionsfor each viewport:
+
+ up.viewport.saveScroll({
+ url: '/inbox',
+ tops: {
+ 'body': 0,
+ '.sidebar', 100,
+ '.main', 320
+ }
+ })
@function up.viewport.saveScroll
@param {string} [options.url]
+ The URL for which to save scroll positions.
+ If omitted, the current browser location is used.
@param {Object<string, number>} [options.tops]
+ An object mapping viewport selectors to vertical scroll positions in pixels.
@experimental
###
saveScroll = (options = {}) ->
| 7 |
diff --git a/local_modules/Exchange/Views/Body.html b/local_modules/Exchange/Views/Body.html </tr>
<tr>
<td>
- <div class="field_title form-field-title uppercase">
+ <div class="field_title form-field-title">
<div style="position: relative; left: 0px; top: 0px; padding: 2px 0 0 0;">
- <span class="field_title form-field-title label-spacing" style="margin-top: 0px;">XMR.to UUID</span>
+ <span class="field_title form-field-title label-spacing uppercase" style="margin-top: 0px;">XMR.to UUID</span>
<div id="provider_order_id" class="textInput currencyOutput" type="text" placeholder="0.00"></div>
<div class="currencySelect"><option value="XMR" style="text-align: center;"> </option></select>
</div>
| 2 |
diff --git a/content/articles/phpunit-bigger-picture/index.md b/content/articles/phpunit-bigger-picture/index.md @@ -17,14 +17,13 @@ In this tutorial, we'll be discussing the basic concepts of PHPUnit. Then, I'll
- [Conclusion](#conclusion)
### Prerequisites
-To follow this tutorial along, you should already be familiar with basic PHP concepts. It would be best to have PHP installed in your local development environment to help you test as you read.
+To follow this tutorial along, you should already be familiar with basic PHP concepts. It would be best to have PHP installed on your local development environment to help you test as you read.
### Objectives
This tutorial aims to teach you everything you need to know about Unit Testings. By the end, you should be able to structure your PHP application, write basic unit tests using assertions and show the results on your terminal.
### Getting started with PHPUnit
-Unit testing ensures that every single unit of your source code is working as expected. Writing these tests is very important as they help in error diagnosis if an error occurs while running your application.
-One way to achieve this is by using the PHPUnit.
+Unit testing ensures that every single unit of your source code is working as expected. Writing these tests is very important as they help in error diagnosis if an error occurs while running your application. One way to achieve this is by using the PHPUnit.
It would be best if you did unit testings so that they are independent of each other, which means that when a test case returns false, for instance, it should only pinpoint the error location and not otherwise.
@@ -41,7 +40,7 @@ Depending on your internet connectivity, this takes a few minutes. On completion
```bash
./vendor/bin/phpunit --version
```
-***Output***
+***Expected Output***
```bash
# note that this version may vary from your PHPUnit version
@@ -58,9 +57,9 @@ Writing unit tests has a set of rules to be followed as described below:
### Writing unit tests
Now that we've installed PHPUnit, let's proceed and structure our project as shown in the screenshot below:
-
+
-As a rule of the thump, it's essential to write the tests before writing the actual code. So now, let proceed and write our test cases which we'll then use in our application.
+As a rule of the thump, it's essential to write the tests before writing the actual code. So now, let's proceed and write our test cases which we'll then use in our application.
In the `myTests` directory, create a file `ModularArithmenticTest.php` and add the following:
@@ -77,7 +76,7 @@ public function testDivisionTheorem()
```
In the above file, you notice that we've followed every rule we defined in the previous section. We begin by creating a file, `ModularArithmenticTest.php`. Inside this script, we create a class with the same name as that of the file. We then extend the `\PHPUnit\Framework\TestCase` class. Inside the class, we define the method `testDivisionTheorem()` prefixed with `test`.
-This method `testDivisionTheorem()` has `$divisionTheorem` object that we instantiate from the `Division` class. It's important to note that we've not defined the `Division` class, as we're defining our test cases first. The `divisionTheorem` has the `setValues([])` that takes a single argument of type array.
+This method `testDivisionTheorem()` has `$divisionTheorem` object that we instantiate from the `Division` class. It's important to note that we've not defined the `Division` class, as we're defining our test cases first. The `divisionTheorem` has the `setValues(arg1,arg2)` that takes two arguments.
This method also calls the `assertEquals()` method from the current class. This method takes in two parameters and compares them to check if they are indeed equal.
@@ -138,7 +137,6 @@ First, update your `composer.json` file as shown below:
}
}
```
-
The update states that we're using the directory `Application` and `Application` namespace.
Run the following command to update this composer file:
@@ -181,3 +179,5 @@ At the root of your application, run the followings commands:
```
### Conclusion
In this tutorial, we've discussed the basic concepts of PHPUnit 8. Then, we've seen how we create the test classes to test an application. We've also configured the XML file for ease of testings.
+
+Happy coding!
| 1 |
diff --git a/src/agent/index.js b/src/agent/index.js @@ -162,13 +162,13 @@ const commandHandlers = {
'T': traceLogDump,
'T-': traceLogClear,
'T*': traceLog,
- 'dtS': stalkTraceEverything,
- 'dtS?': stalkTraceEverythingHelp,
- 'dtSj': stalkTraceEverythingJson,
- 'dtS*': stalkTraceEverythingR2,
- 'dtSf': stalkTraceFunction,
- 'dtSfj': stalkTraceFunctionJson,
- 'dtSf*': stalkTraceFunctionR2,
+ 'dts': stalkTraceEverything,
+ 'dts?': stalkTraceEverythingHelp,
+ 'dtsj': stalkTraceEverythingJson,
+ 'dts*': stalkTraceEverythingR2,
+ 'dtsf': stalkTraceFunction,
+ 'dtsfj': stalkTraceFunctionJson,
+ 'dtsf*': stalkTraceFunctionR2,
'di': interceptHelp,
'di0': interceptRet0,
'di1': interceptRet1,
@@ -2260,14 +2260,23 @@ function stalkTraceFunctionJson (args) {
}
function stalkTraceEverything (args) {
+ if (args.length === 0) {
+ return 'Warnnig: dts is experimental and slow\nUsage: dts [symbol]';
+ }
return _stalkTraceSomething(_stalkEverythingAndGetEvents, args);
}
function stalkTraceEverythingR2 (args) {
+ if (args.length === 0) {
+ return 'Warnnig: dts is experimental and slow\nUsage: dts* [symbol]';
+ }
return _stalkTraceSomethingR2(_stalkEverythingAndGetEvents, args);
}
function stalkTraceEverythingJson (args) {
+ if (args.length === 0) {
+ return 'Warnnig: dts is experimental and slow\nUsage: dtsj [symbol]';
+ }
return _stalkTraceSomethingJson(_stalkEverythingAndGetEvents, args);
}
@@ -2598,9 +2607,9 @@ function isPromise(value) {
}
function stalkTraceEverythingHelp() {
-return `Usage: dtS[j*] [symbol|address] - Trace given symbol using the Frida Stalker
-dtSf[*j] [sym|addr] Trace address or symbol using the stalker
-dtS[*j] seconds Trace all threads for given seconds using the stalker
+return `Usage: dts[j*] [symbol|address] - Trace given symbol using the Frida Stalker
+dtsf[*j] [sym|addr] Trace address or symbol using the stalker
+dts[*j] seconds Trace all threads for given seconds using the stalker
`;
}
| 10 |
diff --git a/articles/quickstart/spa/angular2/_includes/_centralized_login.md b/articles/quickstart/spa/angular2/_includes/_centralized_login.md @@ -86,6 +86,7 @@ export class AuthService {
public handleAuthentication(): void {
this.auth0.parseHash((err, authResult) => {
if (authResult && authResult.accessToken && authResult.idToken) {
+ window.location.hash = '';
this.localLogin(authResult);
this.router.navigate(['/home']);
} else if (err) {
| 2 |
diff --git a/templates/indicators/form-sections/performance.html b/templates/indicators/form-sections/performance.html .append(
$('<button>')
.attr({
- type: 'button'
+ type: 'button',
+ title: "Delete disaggregation type"
})
- .addClass('btn btn-sm')
+ .addClass('btn btn-sm btn-danger')
.append($('<i>').addClass('fa fa-trash'))
.click(removeDisagType.bind(this, countDisaggTypes))
)
.addClass('col-md-1')
.append(
$('<button>')
- .attr({ class: 'btn btn-sm', type: 'button' })
- .append($('<i>').addClass('fa fa-trash'))
+ .attr({ class: 'btn btn-sm', type: 'button', title: "Delete disaggregation label" })
+ .append($('<i>').addClass('fa fa-trash text-danger'))
.click(removeLabel.bind(this, countLabels))
)
)
function removeFromTemplate() {
$(`#disagg_type_group_${appendId}`).remove();
+ toastr.success("Disaggregation type has been removed!");
}
if (disagId) {
function removeFromTemplate() {
$(`#disagg_label_group_${appendId}`).remove();
+ toastr.success("Label has been removed!");
}
const csrftoken = $('[name=csrfmiddlewaretoken]').val();
| 0 |
diff --git a/doc/INSTALL.md b/doc/INSTALL.md # Setting up RCloud
-## Installing using VM images
+## Installing using VM or Docker images
-(https://github.com/att/rcloud/wiki/Cloud-Images)
+There are [DockerHub images](https://hub.docker.com/r/urbanek/rcloud-aas) as well as [VM images](https://github.com/att/rcloud/wiki/Cloud-Images) available with ready-to-run RCloud for simple configurations.
## Installing on your system
### Prerequisites
@@ -243,6 +243,4 @@ started as root, e.g., `sudo conf/start`. Again, use only if you know
what you're doing since misconfiguring RCloud run as root can have
grave security implications.
-## Installing from Docker Hub
-https://hub.docker.com/r/urbanek/rcloud-aas
| 5 |
diff --git a/apps/speedalt/app.js b/apps/speedalt/app.js /*
Speed and Altitude [speedalt]
Mike Bennett mike[at]kereru.com
+1.16 : Use new GPS settings module
*/
-var v = '1.15';
+var v = '1.16';
var buf = Graphics.createArrayBuffer(240,160,2,{msb:true});
// Load fonts
@@ -269,8 +270,6 @@ function setButtons(){
// Power saving on/off
setWatch(function(e){
- var dur = e.time - e.lastTime;
- if ( dur < 2 ) { // Short press.
pwrSav=!pwrSav;
if ( pwrSav ) {
LED1.reset();
@@ -283,8 +282,6 @@ function setButtons(){
Bangle.setLCDPower(1);
LED1.set();
}
- }
- else gpsOff(); // long press, power off LP GPS
}, BTN2, {repeat:true,edge:"falling"});
// Toggle between alt or dist
@@ -328,31 +325,10 @@ function savSettings() {
require("Storage").write('speedalt.json',settings);
}
-// Is low power GPS service available to use?
-function isLP() {
- if (WIDGETS.gpsservice == undefined) return(0);
- return(1);
-}
-
function setLpMode(m) {
if (tmrLP) {clearInterval(tmrLP);tmrLP = false;} // Stop any scheduled drop to low power
- if ( !lp ) return;
- var s = WIDGETS.gpsservice.gps_get_settings();
- if ( m !== s.power_mode || !s.gpsservice ) {
- s.gpsservice = true;
- s.power_mode = m;
- WIDGETS.gpsservice.gps_set_settings(s);
- WIDGETS.gpsservice.reload();
- }
-}
-
-function gpsOff() {
- if ( !lp ) return;
- var s = WIDGETS.gpsservice.gps_get_settings();
- s.gpsservice = false;
- s.power_mode = 'SuperE';
- WIDGETS.gpsservice.gps_set_settings(s);
- WIDGETS.gpsservice.reload();
+ if ( !gpssetup ) return;
+ gpssetup.setPowerMode({power_mode:m})
}
// =Main Prog
@@ -404,21 +380,29 @@ Bangle.on('lcdPower',function(on) {
else stopDraw();
});
+var gpssetup;
+try {
+ gpssetup = require("gpssetup")
+} catch(e) {
+ gpssetup = false;
+}
+
// All set up. Lets go.
g.clear();
Bangle.loadWidgets();
Bangle.drawWidgets();
onGPS(lf);
+Bangle.setGPSPower(1);
-var lp = isLP(); // Low power GPS widget installed?
-if ( lp ) {
- setLpMode('SuperE');
- setInterval(()=>onGPS(WIDGETS.gpsservice.gps_get_fix()), 1000);
+if ( gpssetup ) {
+ gpssetup.setPowerMode({power_mode:"SuperE"}).then(function() { Bangle.setGPSPower(1); });
+// setInterval(()=>onGPS(WIDGETS.gpsservice.gps_get_fix()), 1000);
}
else {
Bangle.setGPSPower(1);
- Bangle.on('GPS', onGPS);
}
+Bangle.on('GPS', onGPS);
+
setButtons();
setInterval(updateClock, 30000);
| 4 |
diff --git a/examples/with-fela/pages/_document.js b/examples/with-fela/pages/_document.js @@ -18,7 +18,7 @@ export default class MyDocument extends Document {
render () {
const styleNodes = this.props.sheetList.map(({ type, media, css }) => (
- <style data-fela-type={type} media={media}>{css}</style>
+ <style data-fela-type={type} media={media} dangerouslySetInnerHTML={{ __html: css }} />
))
return (
| 7 |
diff --git a/docs/reference.rst b/docs/reference.rst @@ -664,6 +664,17 @@ First, message `@taguibot <https://t.me/taguibot>`_ to authorise it to send mess
telegram 1234567890 Hello Alena,\n\nYour HR onboarding bot has completed successfully.
+.. code-block:: none
+ // show full response from Telegram Bot API
+ echo `telegram_result`
+
+.. code-block:: none
+ // check JSON response ok property for success
+ if telegram_json.ok equals to true
+ echo Message sent successfully.
+ else
+ echo Message sending failed.
+
Note that the telegram step requires an internet connection. This feature is being hosted at https://tebel.org, but the `source code <https://github.com/kelaberetiv/TagUI/tree/master/src/telegram>`_ is on GitHub if you wish to host this feature on your own cloud or server. The implementation is in pure PHP without any dependencies.
The only info logged is chat_id, length of the message, datetime stamp (to prevent abuse). If you wish to host on your own, first read through this link to learn more about Telegram Bot API, creating your bot API token and setting up the webhook - https://core.telegram.org/bots
| 7 |
diff --git a/templates/master/elasticsearch/es.js b/templates/master/elasticsearch/es.js @@ -11,7 +11,7 @@ var properties={
"VolumeSize": 10,
"VolumeType": "gp2"
},
- "ElasticsearchVersion": "7.7",
+ "ElasticsearchVersion": "7.9",
"SnapshotOptions": {
"AutomatedSnapshotStartHour": "0"
},
| 3 |
diff --git a/src/tagui_parse.php b/src/tagui_parse.php @@ -853,7 +853,7 @@ $params = trim(substr($raw_intent." ",1+strpos($raw_intent." "," ")));
if (substr($params,0,3) != "to ") $params = "to " . $params; // handle user missing out to separator
$param1 = trim(substr($params,0,strpos($params,"to "))); $param2 = trim(substr($params,3+strpos($params,"to ")));
if ($param2 == "") echo "ERROR - " . current_line() . " location missing for " . $raw_intent . "\n";
-else return "casper.then(function() {"."{techo('".$raw_intent."');\n".$twb.".download('".abs_file($param2)."');}".end_fi()."});"."\n\n";}
+else return "casper.then(function() {"."{techo('".esc_bs($raw_intent)."');\n".$twb.".download('".abs_file($param2)."');}".end_fi()."});"."\n\n";}
function receive_intent($raw_intent) {$twb = $GLOBALS['tagui_web_browser'];
$params = trim(substr($raw_intent." ",1+strpos($raw_intent." "," ")));
| 7 |
diff --git a/assets/src/utils/filters/SearchBar.test.js b/assets/src/utils/filters/SearchBar.test.js @@ -2,23 +2,22 @@ import React from 'react';
import SearchBar from './SearchBar'
import {shallow} from 'enzyme';
import {expect} from 'chai';
+import sinon from 'sinon';
describe('<Search />', () => {
let searchBarComponent;
+ const searchTerm = 'texto de teste';
+ const onChange = () => {
+ };
it('should render with empty search term', () => {
- searchBarComponent = shallow(<SearchBar onChange={() => {
- }}/>)
+ searchBarComponent = shallow(<SearchBar onChange={onChange}/>);
expect(searchBarComponent.state().searchTerm).to.equal("");
});
it('should clear search term when click in NavigationClose icon', () => {
- const searchTerm = 'texto de teste';
- const onChange = () => {
- };
-
searchBarComponent = shallow(<SearchBar onChange={onChange}/>);
searchBarComponent.setState({searchTerm});
@@ -32,4 +31,19 @@ describe('<Search />', () => {
expect(searchBarComponent.state().searchTerm).to.be.equal("");
});
+
+ it('should call onchange function passing the search term', () => {
+
+ const onChangeSpy = sinon.spy(onChange);
+
+ searchBarComponent = shallow(<SearchBar onChange={onChangeSpy}/>);
+
+ const textField = searchBarComponent.find('TextField');
+
+ textField.props().onChange({}, searchTerm);
+
+ expect(onChangeSpy.calledWith(searchTerm)).to.be.true;
+
+ expect(searchBarComponent.state().searchTerm).to.be.equal(searchTerm);
+ })
});
\ No newline at end of file
| 0 |
diff --git a/examples/CenterMode.js b/examples/CenterMode.js @@ -8,26 +8,12 @@ export default class CenterMode extends Component {
centerMode: true,
infinite: true,
centerPadding: '60px',
- slidesToShow: 4,
+ slidesToShow: 3,
speed: 500,
};
- const settings2 = {
- ...settings,
- infinite: false
- }
- const settings3 = {
- ...settings,
- slidesToShow: 3
- }
- const settings4 = {
- ...settings,
- slidesToShow: 3,
- infinite: false
- }
return (
<div>
<h2>Center Mode</h2>
- <h4>Infinite, Even</h4>
<Slider {...settings}>
<div><h3>1</h3></div>
<div><h3>2</h3></div>
@@ -36,31 +22,6 @@ export default class CenterMode extends Component {
<div><h3>5</h3></div>
<div><h3>6</h3></div>
</Slider>
- <h4>Finite, Even</h4>
- <Slider {...settings2}>
- <div><h3>1</h3></div>
- <div><h3>2</h3></div>
- <div><h3>3</h3></div>
- <div><h3>4</h3></div>
- <div><h3>5</h3></div>
- <div><h3>6</h3></div>
- </Slider>
- <h4>Infinite, Odd</h4>
- <Slider {...settings3}>
- <div><h3>1</h3></div>
- <div><h3>2</h3></div>
- <div><h3>3</h3></div>
- <div><h3>4</h3></div>
- <div><h3>5</h3></div>
- </Slider>
- <h4>Finite, Odd</h4>
- <Slider {...settings4}>
- <div><h3>1</h3></div>
- <div><h3>2</h3></div>
- <div><h3>3</h3></div>
- <div><h3>4</h3></div>
- <div><h3>5</h3></div>
- </Slider>
</div>
);
}
| 2 |
diff --git a/docs/meta_schema.json b/docs/meta_schema.json "type":"array"
},
"items":{
+ "oneOf":[
+ {
+ "title": "Schema",
"$ref":"#/definitions/schema"
},
+ {
+ "title": "Array of schemas",
+ "type": "array",
+ "$ref": "#/definitions/schemaArray",
+ "format": "table"
+ }
+ ]
+ },
"uniqueItems":{
"type":"boolean"
},
| 11 |
diff --git a/packages/insomnia-app/app/ui/css/editor/theme.less b/packages/insomnia-app/app/ui/css/editor/theme.less border-left: 1px solid var(--color-font);
}
+ .CodeMirror-foldmarker {
+ color: var(--color-surprise);
+ text-shadow: none;
+ font-family: inherit;
+ line-height: .3;
+ cursor: pointer;
+ padding: 0 var(--padding-xs);
+ }
+
.cm-animate-fat-cursor,
&.cm-fat-cursor .CodeMirror-cursor {
background-color: rgba(255, 139, 147, 0.5) !important;
| 7 |
diff --git a/app/models/user.rb b/app/models/user.rb @@ -1578,9 +1578,6 @@ class User < Sequel::Model
def regenerate_api_key
invalidate_varnish_cache
update api_key: ::User.make_token
- rescue CartoDB::CentralCommunicationFailure => e
- CartoDB::Logger.error(message: 'Error updating api key for mobile_apps in Central', exception: e, user: self.inspect)
- raise e
end
# This is set temporary on user creation with invitation,
| 2 |
diff --git a/plugins/object_storage/app/services/service_layer_ng/object_storage_service.rb b/plugins/object_storage/app/services/service_layer_ng/object_storage_service.rb @@ -420,17 +420,23 @@ module ServiceLayerNg
end
def public_url(container_name, object_path = nil)
- # similar to https://github.com/fog/fog-openstack/blob/master/lib/fog/storage/openstack/requests/public_url.rb
return nil if container_name.nil?
- url = "#{api.object_storage.uri}/#{CGI.escape(container_name)}"
+ url = "#{api.object_storage.uri}/#{escape(container_name)}"
if object_path.nil?
# path to container listing needs a trailing slash to work in a browser
url << '/'
else
- url << "/#{CGI.escape(object_path)}"
+ url << "/#{escape(object_path)}"
end
url
end
+ # https://github.com/fog/fog-openstack/blob/bd69c6f3a80bb4a984d6fc67971a496cc923ac98/lib/fog/openstack.rb#L588
+ def escape(str, extra_exclude_chars = '')
+ str.gsub(/([^a-zA-Z0-9_.-#{extra_exclude_chars}]+)/) do
+ '%' + $1.unpack('H2' * $1.bytesize).join('%').upcase
+ end
+ end
+
end
end
\ No newline at end of file
| 14 |
diff --git a/src/resources/views/fields/table.blade.php b/src/resources/views/fields/table.blade.php } elseif (is_string($items) && !is_array(json_decode($items))) {
$items = '[]';
}
-
- echo '<pre>'; var_dump($items); echo '</pre>';
?>
<div data-field-type="table" data-field-name="{{ $field['name'] }}" @include('crud::inc.field_wrapper_attributes') >
// add rows with the information from the database
if($rows != '[]') {
$.each($rows, function(key) {
- console.log('adding initial row no '+key);
addItem();
$tableWrapper.find('tbody tr:last').find('input[data-name="item.' + column + '"]').val(value);
});
+ // if it's the last row, update the JSON
if ($rows.length == key+1) {
- console.log('got to the end');
updateTableFieldJson();
}
});
}
});
+
$tableWrapper.find('[data-button-type=addItem]').click(function() {
if($max > -1) {
- var totalRows = $tableWrapper.find('tbody tr:visible').length;
+ var totalRows = $tableWrapper.find('tbody tr').not('.clonable').length;
if(totalRows < $max) {
addItem();
$tableWrapper.find('tbody').append($tableWrapper.find('tbody .clonable').clone().show().removeClass('clonable'));
}
- $(this).on('click', '.remove-item', function() {
+ $tableWrapper.on('click', '.removeItem', function() {
+ var totalRows = $tableWrapper.find('tbody tr').not('.clonable').length;
+ if (totalRows > $min) {
$(this).closest('tr').remove();
updateTableFieldJson();
return false;
+ }
});
- $(this).find('tbody').on('change', function() {
+ $(this).find('tbody').on('keyup', function() {
updateTableFieldJson();
});
+
function updateTableFieldJson() {
- var $rows = $tableWrapper.find('tbody tr:visible');
+ var $rows = $tableWrapper.find('tbody tr').not('.clonable');
var $fieldName = $tableWrapper.attr('data-field-name');
var $hiddenField = $($tableWrapper).find('input[name='+$fieldName+']');
- console.log("updateTableFieldJson - Counting "+$rows.length+" rows.");
-
var json = '[';
var otArr = [];
var tbl2 = $rows.each(function(i) {
var itArr = [];
x.each(function() {
if(this.value.length > 0) {
- itArr.push('"' + $(this).attr('data-name').replace('item.','') + '":"' + this.value.replace(/(['"])/g, "\\$1") + '"');
+ var key = $(this).attr('data-name').replace('item.','');
+ var value = this.value.replace(/(['"])/g, "\\$1"); // escapes single and double quotes
+
+ itArr.push('"' + key + '":"' + value + '"');
}
});
otArr.push('{' + itArr.join(',') + '}');
var totalRows = $rows.length;
$hiddenField.val( totalRows ? json : null );
-
- console.log('updateTableFieldJson - HIDDEN INPUT value was set to: '+(totalRows ? json : null));
}
// on page load, make sure the input has the old values
| 1 |
diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/input_haspopup_invalid_ruleunit/input_list.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/input_haspopup_invalid_ruleunit/input_list.html <body>
<main>
<!-- fail case 1, no type specified-->
- <input list="listbox1" id="browser1" role='combobox' aria-haspopup="listbox">
+ <input list="listbox1" id="browser1" aria-haspopup="listbox">
<datalist role="listbox" id="listbox1">
<option value="Zebra">Zebra</option>
<option value="Zoom" id="selected_option3">Zoom</option>
<option value="Spanish">Spanish</option>
</datalist>
- <!-- not triggerred, no failure/pass case -->
+ <!-- not triggerred, no failure/pass case, added no triggering explicit role-->
<input list="function-types" type='text' role='combobox' id="browser3" />
- <!-- not triggerred, no failure/pass case -->
- <input list="function-types" type='number' id="browser4" aria-haspopup="listbox">
+ <!-- not triggerred, no failure/pass case, added no triggering explicit role -->
+ <input list="function-types" type='number' role='combobox' id="browser4" aria-haspopup="listbox">
<datalist id="function-types">
<option value="function">function</option>
<option value="=>">arrow function</option>
| 3 |
diff --git a/generators/client/templates/angular/webpack/_webpack.common.js b/generators/client/templates/angular/webpack/_webpack.common.js @@ -107,7 +107,6 @@ module.exports = (options) => {
utils.root('<%= MAIN_SRC_DIR %>app'), {}
),
new CopyWebpackPlugin([
- { from: './node_modules/core-js/client/shim.min.js', to: 'core-js-shim.min.js' },
{ from: './node_modules/swagger-ui/dist/css', to: 'swagger-ui/dist/css' },
{ from: './node_modules/swagger-ui/dist/lib', to: 'swagger-ui/dist/lib' },
{ from: './node_modules/swagger-ui/dist/swagger-ui.min.js', to: 'swagger-ui/dist/swagger-ui.min.js' },
| 2 |
diff --git a/Gruntfile.js b/Gruntfile.js @@ -44,10 +44,16 @@ module.exports = function (grunt) {
version: '11.0',
platform: 'windows 8.1'
},
- 'SL_EDGE': {
+ 'SL_IE13': {
base: 'SauceLabs',
- browserName: 'microsoftedge',
- version: '20',
+ browserName: 'internet explorer',
+ version: '13',
+ platform: 'windows 10'
+ },
+ 'SL_IE14': {
+ base: 'SauceLabs',
+ browserName: 'internet explorer',
+ version: '14',
platform: 'windows 10'
},
'SL_CHROME': {
| 14 |
diff --git a/README.md b/README.md @@ -146,6 +146,7 @@ The component accepts the following props:
|**`search`**|boolean|true|Show/hide search icon from toolbar
|**`print`**|boolean|true|Show/hide print icon from toolbar
|**`download`**|boolean|true|Show/hide download icon from toolbar
+|**`viewColumns`**|boolean|true|Show/hide viewColumns icon from toolbar
|**`onRowsSelect`**|function||Callback function that triggers when row(s) are selected. `function(currentRowsSelected: array, rowsSelected: array) => void`
|**`onRowsDelete`**|function||Callback function that triggers when row(s) are deleted. `function(rowsDeleted: array) => void`
|**`onChangePage`**|function||Callback function that triggers when a page has changed. `function(currentPage: number) => void`
| 0 |
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -702,7 +702,6 @@ final class Analytics extends Module
$profile = new Google_Service_Analytics_Profile();
$profile->setName( $profile_name );
$profile = $this->get_service( 'analytics' )->management_profiles->insert( $data['accountID'], $data['propertyID'], $profile );
-
return $profile;
case 'POST:create-property':
if ( ! isset( $data['accountID'] ) ) {
| 2 |
diff --git a/lib/plugins/aws/invokeLocal/index.js b/lib/plugins/aws/invokeLocal/index.js @@ -302,12 +302,10 @@ class AwsInvokeLocal {
Object.keys(zip.files)
.map(filename => zip.files[filename].async('nodebuffer').then(fileData => {
if (filename.endsWith(path.sep)) {
- mkdirp.sync(path.join(
- '.serverless', 'invokeLocal', 'artifact', filename));
return BbPromise.resolve();
}
mkdirp.sync(path.join(
- '.serverless', 'invokeLocal', 'artifact'));
+ '.serverless', 'invokeLocal', 'artifact', path.dirname(filename)));
return fs.writeFileAsync(path.join(
'.serverless', 'invokeLocal', 'artifact', filename), fileData, {
mode: zip.files[filename].unixPermissions,
| 9 |
diff --git a/codegens/powershell-restmethod/lib/index.js b/codegens/powershell-restmethod/lib/index.js @@ -38,6 +38,10 @@ function parseURLEncodedBody (body) {
* @param {boolean} trim trim body option
*/
function parseFormData (body, trim) {
+ if (_.isEmpty(body)) {
+ return '$body = $null\n';
+ }
+
var bodySnippet = '$multipartContent = [System.Net.Http.MultipartFormDataContent]::new()\n';
_.forEach(body, function (data) {
if (!data.disabled) {
| 9 |
diff --git a/src/components/resource.js b/src/components/resource.js @@ -130,7 +130,12 @@ module.exports = function(app) {
});
};
- // Close all open dialogs on state change.
+ // Close all open dialogs on state change (using UI-Router).
+ $scope.$on('$stateChangeStart', function() {
+ ngDialog.closeAll(false);
+ });
+
+ // Close all open dialogs on route change (using ngRoute).
$scope.$on('$routeChangeStart', function() {
ngDialog.closeAll(false);
});
| 9 |
diff --git a/assets/js/modules/pagespeed-insights/dashboard/util.js b/assets/js/modules/pagespeed-insights/dashboard/util.js /**
* WordPress dependencies
*/
-import { __ } from '@wordpress/i18n';
import { CATEGORY_FAST, CATEGORY_AVERAGE, CATEGORY_SLOW } from '../components/constants';
/**
@@ -40,80 +39,3 @@ export function getScoreCategory( score ) {
return CATEGORY_SLOW;
}
-
-/**
- * Retrieve the score category label based on the given score.
- *
- * @param {number} score Score between 1.0 and 0.0.
- *
- * @return {string} Score category label.
- */
-export const getScoreCategoryLabel = ( score ) => {
- const category = getScoreCategory( score );
-
- if ( 'fast' === category ) {
- return __( 'Fast', 'google-site-kit' );
- }
-
- if ( 'average' === category ) {
- return __( 'Average', 'google-site-kit' );
- }
-
- return __( 'Slow', 'google-site-kit' );
-};
-
-export const PageSpeedReportScoreCategoryWrapper = ( props ) => {
- const { score, children } = props;
- const className = `googlesitekit-pagespeed-report__score-category-wrapper googlesitekit-pagespeed-report__score-category-wrapper--${ getScoreCategory( score ) }`;
- const iconClassName = `googlesitekit-pagespeed-report__score-icon googlesitekit-pagespeed-report__score-icon--${ getScoreCategory( score ) }`;
-
- return (
- <span className={ className }>
- { children } <span className={ iconClassName }></span>
- </span>
- );
-};
-
-export const PageSpeedReportScoreGauge = ( props ) => {
- const { score } = props;
- const percentage = parseInt( score * 100, 10 );
- const className = `
- googlesitekit-percentage-circle
- googlesitekit-percentage-circle--${ getScoreCategory( score ) }
- googlesitekit-percentage-circle--percent-${ percentage }
- `;
-
- return (
- <div className="googlesitekit-pagespeed-report__score-gauge">
- <div className={ className }>
- <div className="googlesitekit-percentage-circle__text">{ percentage }</div>
- <div className="googlesitekit-percentage-circle__slice">
- <div className="googlesitekit-percentage-circle__bar"></div>
- <div className="googlesitekit-percentage-circle__fill"></div>
- </div>
- </div>
- <span className="googlesitekit-pagespeed-report__score-gauge-label screen-reader-only">
- { __( 'Performance', 'google-site-kit' ) }
- </span>
- </div>
- );
-};
-
-export const PageSpeedReportScale = () => {
- return (
- <div className="googlesitekit-pagespeed-report__scale">
- <span>
- { __( 'Scale:', 'google-site-kit' ) }
- </span>
- <span className="googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--fast">
- { __( '90-100 (fast)', 'google-site-kit' ) }
- </span>
- <span className="googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--average">
- { __( '50-89 (average)', 'google-site-kit' ) }
- </span>
- <span className="googlesitekit-pagespeed-report__scale-range googlesitekit-pagespeed-report__scale-range--slow">
- { __( '0-49 (slow)', 'google-site-kit' ) }
- </span>
- </div>
- );
-};
| 2 |
diff --git a/src/components/Workspace.jsx b/src/components/Workspace.jsx @@ -116,7 +116,7 @@ export default class Workspace extends React.Component {
this._handleClickInstructionsEditButton();
}}
>
- 
+ 
</span>
}
</div>
| 4 |
diff --git a/docs/contributing.md b/docs/contributing.md @@ -17,7 +17,7 @@ Developer documentaion is available [here](https://github.com/uber/deck.gl/tree/
### Node Version Requirement
-Running deck.gl as a dependency in another project (e.g. via `npm i deck.gl`) requires Node `4.x` or higher. Building deck.gl from source has a dependency on Node `8.x` or higher. Either upgrade to a supported version, or install something like [nvm](https://github.com/creationix/nvm) to manage Node versions.
+Running deck.gl as a dependency in another project (e.g. via `npm i deck.gl`) requires Node `4.x` or higher. Building deck.gl from source has a dependency on Node `10.x` or higher. Either upgrade to a supported version, or install something like [nvm](https://github.com/creationix/nvm) to manage Node versions.
### Install yarn
| 3 |
diff --git a/website_code/scripts/xapi_dashboard.js b/website_code/scripts/xapi_dashboard.js @@ -793,6 +793,7 @@ xAPIDashboard.prototype.displayMCQQuestionInformation = function(contentDiv, que
var interactionObjectUrl = interaction.url;
contentDiv.append(XAPI_DASHBOARD_QUESTION + " " + question.name["en-US"]);
var options = "<div>" + XAPI_DASHBOARD_ANSWERS + "<ol>";
+ choices = question.choices;
question.choices.forEach(function(option) {
var correct = "";
if (question.correctResponsesPattern.indexOf(option.id) != -1) {
@@ -816,6 +817,29 @@ xAPIDashboard.prototype.displayMCQQuestionInformation = function(contentDiv, que
chart.yAxis.axisLabel(XAPI_DASHBOARD_GRAPH_CHOICE_YAXIS);
chart.width(500);
chart.height(500);
+ chart.color(function(d){
+ if(d.correct)
+ {
+ return "green";
+ }
+ return "red";
+
+ });
+ },
+ post : function(data)
+ {
+ data.contents.forEach(function(d){
+ origAnswer = d.in;
+ answers = origAnswer.split("[,]");
+ updatedAnswers = [];
+ answers.forEach(function(a)
+ {
+ updatedAnswers.push(choices.map(c => c.id).indexOf(a) + 1);
+ })
+ d.in = updatedAnswers.join(",");
+ d.correct = question.correctResponsesPattern.indexOf(origAnswer) != -1;
+ });
+
}
});
| 10 |
diff --git a/src/containers/FlightDirector/SoftwarePanels/canvas.js b/src/containers/FlightDirector/SoftwarePanels/canvas.js @@ -229,7 +229,8 @@ export default class PanelCanvas extends Component {
loc={draggingCable.location}
/>
)}
- {cables.map(c => (
+ {cables &&
+ cables.map(c => (
<DraggingLine
width={width}
height={height}
@@ -254,6 +255,7 @@ export default class PanelCanvas extends Component {
/>
)}
{edit &&
+ connections &&
connections.map(c => (
<DraggingLine
width={width}
@@ -269,7 +271,8 @@ export default class PanelCanvas extends Component {
))}
</svg>
- {components.map(c => (
+ {components &&
+ components.map(c => (
<PageComponent
key={c.id}
{...c}
| 1 |
diff --git a/metaverse_components/npc.js b/metaverse_components/npc.js @@ -24,6 +24,8 @@ try {
const npcVoiceName = component.voice ?? 'Shining armor';
const npcBio = component.bio ?? 'A generic avatar.';
// const npcAvatarUrl = app.getComponent('avatarUrl') ?? `/avatars/Drake_hacker_v6_Guilty.vrm`;
+ // const npcThemeSongUrl = component.themeSongUrl ?? '';
+ const npcDetached = !!component.detached;
let npcWear = component.wear ?? [];
if (!Array.isArray(npcWear)) {
npcWear = [npcWear];
@@ -31,7 +33,7 @@ try {
let live = true;
let vrmApp = app;
- let npcPlayer = null;
+ app.npcPlayer = null;
/* e.waitUntil(*/(async () => {
// const u2 = npcAvatarUrl;
// const m = await metaversefile.import(u2);
@@ -59,6 +61,7 @@ try {
position,
quaternion,
scale,
+ detached: npcDetached,
});
// if (!live) return;
@@ -89,21 +92,21 @@ try {
// scene.add(vrmApp);
- npcPlayer = newNpcPlayer;
+ app.npcPlayer = newNpcPlayer;
})()// );
- app.getPhysicsObjects = () => npcPlayer ? [npcPlayer.characterController] : [];
+ app.getPhysicsObjects = () => app.npcPlayer ? [app.npcPlayer.characterController] : [];
app.addEventListener('hit', e => {
- if (!npcPlayer.hasAction('hurt')) {
+ if (!app.npcPlayer.hasAction('hurt')) {
const newAction = {
type: 'hurt',
animation: 'pain_back',
};
- npcPlayer.addAction(newAction);
+ app.npcPlayer.addAction(newAction);
setTimeout(() => {
- npcPlayer.removeAction('hurt');
+ app.npcPlayer.removeAction('hurt');
}, hurtAnimationDuration * 1000);
}
});
@@ -136,12 +139,12 @@ try {
character.addEventListener('say', e => {
console.log('got character say', e.data);
const {message, emote, action, object, target} = e.data;
- chatManager.addPlayerMessage(npcPlayer, message);
+ chatManager.addPlayerMessage(app.npcPlayer, message);
if (emote === 'supersaiyan' || action === 'supersaiyan' || /supersaiyan/i.test(object) || /supersaiyan/i.test(target)) {
const newSssAction = {
type: 'sss',
};
- npcPlayer.addAction(newSssAction);
+ app.npcPlayer.addAction(newSssAction);
} else if (action === 'follow' || (object === 'none' && target === localPlayer.name)) { // follow player
targetSpec = {
type: 'follow',
@@ -171,11 +174,11 @@ try {
const runSpeed = walkSpeed * 8;
const speedDistanceRate = 0.07;
useFrame(({timestamp, timeDiff}) => {
- if (npcPlayer && physics.getPhysicsEnabled()) {
+ if (app.npcPlayer && physics.getPhysicsEnabled()) {
if (targetSpec) {
const target = targetSpec.object;
const v = localVector.setFromMatrixPosition(target.matrixWorld)
- .sub(npcPlayer.position);
+ .sub(app.npcPlayer.position);
v.y = 0;
const distance = v.length();
if (targetSpec.type === 'moveto' && distance < 2) {
@@ -184,15 +187,15 @@ try {
const speed = Math.min(Math.max(walkSpeed + ((distance - 1.5) * speedDistanceRate), 0), runSpeed);
v.normalize()
.multiplyScalar(speed * timeDiff);
- npcPlayer.characterPhysics.applyWasd(v);
+ app.npcPlayer.characterPhysics.applyWasd(v);
}
}
- npcPlayer.eyeballTarget.copy(localPlayer.position);
- npcPlayer.eyeballTargetEnabled = true;
+ app.npcPlayer.eyeballTarget.copy(localPlayer.position);
+ app.npcPlayer.eyeballTargetEnabled = true;
- npcPlayer.updatePhysics(timestamp, timeDiff);
- npcPlayer.updateAvatar(timestamp, timeDiff);
+ app.npcPlayer.updatePhysics(timestamp, timeDiff);
+ app.npcPlayer.updateAvatar(timestamp, timeDiff);
}
});
@@ -201,8 +204,8 @@ try {
// scene.remove(vrmApp);
- if (npcPlayer) {
- npcManager.destroyNpc(npcPlayer);
+ if (app.npcPlayer) {
+ npcManager.destroyNpc(app.npcPlayer);
}
loreAIScene.removeCharacter(character);
| 0 |
diff --git a/Gruntfile.js b/Gruntfile.js @@ -436,7 +436,7 @@ module.exports = function (grunt) {
/**
* `grunt test:browser` compile all Builder specs and launch a webpage in the browser.
*/
- grunt.registerTask('test:browser', 'Build all Builder specs', [
+ grunt.registerTask('test:browser:builder', 'Build all Builder specs', [
'generate_builder_specs',
'bootstrap_webpack_builder_specs',
'webpack:builder_specs',
@@ -448,7 +448,7 @@ module.exports = function (grunt) {
/**
* `grunt dashboard_specs` compile dashboard specs
*/
- grunt.registerTask('dashboard_specs', 'Build only dashboard specs', [
+ grunt.registerTask('test:browser:dashboard', 'Build only dashboard specs', [
'generate_dashboard_specs',
'bootstrap_webpack_dashboard_specs',
'webpack:dashboard_specs',
| 10 |
diff --git a/packages/app/src/server/models/named-query.ts b/packages/app/src/server/models/named-query.ts @@ -20,7 +20,9 @@ const schema = new Schema<NamedQueryDocument, NamedQueryModel>({
name: { type: String, required: true, unique: true },
aliasOf: { type: String },
resolverName: { type: String, enum: SearchResolverName },
- creator: { type: ObjectId, ref: 'User', index: true },
+ creator: {
+ type: ObjectId, ref: 'User', index: true, default: null,
+ },
});
schema.pre('validate', async function(this, next) {
| 12 |
diff --git a/userscript.user.js b/userscript.user.js @@ -56975,6 +56975,8 @@ var $$IMU_EXPORT$$;
// some sites have z-index: 99999999999999 (http://www.topstarnews.net/)
// this gets scaled down to 2147483647 in the elements panel, but it gets seen as higher than 9999* by the browser
var maxzindex = Number.MAX_SAFE_INTEGER;
+ // sites like topstarnews under Firefox somehow change sans-serif as the default font
+ var sans_serif_font = '"Noto Sans", Arial, Helvetica, sans-serif';
function keycode_to_str(event) {
var x = event.which;
@@ -57922,7 +57924,7 @@ var $$IMU_EXPORT$$;
btn.style.lineHeight = "1em";
//btn.style.whiteSpace = "nowrap";
btn.style.fontSize = "14px";
- btn.style.fontFamily = "sans-serif";
+ btn.style.fontFamily = sans_serif_font;
apply_styles(btn, settings.mouseover_ui_styles);
btn.style.zIndex = maxzindex - 1;
@@ -58102,7 +58104,7 @@ var $$IMU_EXPORT$$;
set_el_all_initial(images_total_input);
images_total_input.style.display = "none";
images_total_input.style.backgroundColor = "white";
- images_total_input.style.fontFamily = "sans-serif";
+ images_total_input.style.fontFamily = sans_serif_font;
images_total_input.style.fontSize = galleryinput_fontsize;
images_total_input.style.padding = "1px";
images_total_input.style.paddingLeft = "2px";
| 7 |
diff --git a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.html b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.html * @param {string} topic
* @returns `true` if it is a valid topic
*/
- function validateMQTTPublishTopic(topic) {
- if(!topic || topic == "") {
+ function validateMQTTPublishTopic(topic, opts) {
+ if(!topic || topic == "" || !/[\+#\b\f\n\r\t\v\0]/.test(topic)) {
return true;
}
- return !/[\+#\b\f\n\r\t\v\0]/.test(topic);
+ return RED._("node-red:mqtt.errors.invalid-topic");
}
RED.nodes.registerType('mqtt-broker',{
category: 'config',
| 4 |
diff --git a/README.md b/README.md -<p align="center">
- <a href="https://tailwindcss.com/" target="_blank"><img width="200" src="https://tailwindcss.com/img/tailwind.svg"></a><br>
+<p>
+ <a href="https://tailwindcss.com/" target="_blank"><img width="350" src="https://refactoringui.nyc3.cdn.digitaloceanspaces.com/tailwind-logo.svg"></a><br>
A utility-first CSS framework for rapidly building custom user interfaces.
</p>
-<p align="center">
+<p>
<a href="https://travis-ci.org/tailwindcss/tailwindcss"><img src="https://img.shields.io/travis/tailwindcss/tailwindcss/master.svg" alt="Build Status"></a>
<a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
<a href="https://github.com/tailwindcss/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a>
| 14 |
diff --git a/source/components/NumericInput.js b/source/components/NumericInput.js @@ -168,6 +168,15 @@ class NumericInputBase extends Component<NumericInputProps, State> {
};
}
+ // Case: Just minus sign was entered
+ if (valueToProcess === groupSeparator) {
+ return {
+ value: null,
+ caretPosition: 0,
+ fallbackInputValue: null,
+ };
+ }
+
/**
* ========= CLEAN THE INPUT =============
*/
| 9 |
diff --git a/app/redux/ducks/translations.js b/app/redux/ducks/translations.js import apiClient from 'panoptes-client/lib/api-client';
import counterpart from 'counterpart';
-counterpart.setFallbackLocale('en');
+const DEFAULT_LOCALE = counterpart.getLocale();
+
+counterpart.setFallbackLocale(DEFAULT_LOCALE);
// Actions
const ERROR = 'pfe/translations/ERROR';
const LOAD = 'pfe/translations/LOAD';
@@ -9,7 +11,7 @@ const SET_LOCALE = 'pfe/translations/SET_LOCALE';
const SET_STRINGS = 'pfe/translations/SET_STRINGS';
const initialState = {
- locale: 'en',
+ locale: DEFAULT_LOCALE,
strings: {
project: {},
workflow: {
| 14 |
diff --git a/docs/installation.rst b/docs/installation.rst @@ -18,7 +18,7 @@ If using BIG-IP 14.0 or later
`````````````````````````````
If you are using BIG-IP 14.0 or later, the |14| is enforced. As mentioned in the Prerequisites, you must change your **admin** password before attempting to upload or install Declarative Onboarding.
-- To change your admin password using the Configuration utility, simply go to the BIG-IP Configuration utility (https://IP address of BIG-IP) and login using **admin** as the Username and Password. You are forced to change your password.
+- To change your admin password using the Configuration utility, simply go to the BIG-IP Configuration utility ``https://(IP address of BIG-IP)`` and login using **admin** as the Username and Password. You are forced to change your password.
- To change your admin password using the CLI, SSH into the BIG-IP. Log on as **root** with the password of **default**. You are forced to change your root password. After changing your root password, you receive a message saying the admin password was also changed but marked as expired. Type the following command to change the admin password: **modify auth user admin prompt-for-password**, and then type a new admin password.
| 1 |
diff --git a/NiL.JS/Core/Context.cs b/NiL.JS/Core/Context.cs @@ -152,9 +152,6 @@ namespace NiL.JS.Core
var c = this;
if (_thisBind == null)
{
- if (_strict)
- return JSValue.undefined;
-
for (; c._thisBind == null;)
{
if (c._parent._parent == null)
| 2 |
diff --git a/app/src/renderer/components/wallet/PageSend.vue b/app/src/renderer/components/wallet/PageSend.vue @@ -119,7 +119,12 @@ export default {
title: 'Successfully Sent',
body: `Successfully sent ${amount} ${denom.toUpperCase()} to ${address}`
})
+
+ // resets send transaction form
this.resetForm()
+
+ // refreshes user transaction history
+ this.$store.dispatch('queryWalletHistory')
}
})
},
| 3 |
diff --git a/src/renderer/layer/CanvasRenderer.js b/src/renderer/layer/CanvasRenderer.js @@ -365,10 +365,6 @@ class CanvasRenderer extends Class {
this.onCanvasCreate();
- this.layer.fire('canvascreate', {
- 'context' : this.context,
- 'gl' : this.gl
- });
}
onCanvasCreate() {
@@ -376,8 +372,8 @@ class CanvasRenderer extends Class {
}
createContext() {
- //Be compatible with layer renderers that create context by themselves in overrided createCanvas
- if (this.gl || this.context) {
+ //Be compatible with layer renderers that overrides create canvas and create gl/context
+ if (this.gl && this.gl.canvas === this.canvas || this.context) {
return;
}
this.context = this.canvas.getContext('2d');
@@ -449,6 +445,20 @@ class CanvasRenderer extends Class {
if (!this.canvas) {
this.createCanvas();
this.createContext();
+ /**
+ * canvascreate event, fired when canvas created.
+ *
+ * @event Layer#canvascreate
+ * @type {Object}
+ * @property {String} type - canvascreate
+ * @property {Layer} target - layer
+ * @property {CanvasRenderingContext2D} context - canvas's context
+ * @property {WebGLRenderingContext2D} gl - canvas's webgl context
+ */
+ this.layer.fire('canvascreate', {
+ 'context' : this.context,
+ 'gl' : this.gl
+ });
} else {
this.clearCanvas();
}
| 3 |
diff --git a/bin/enforcers/open-api.js b/bin/enforcers/open-api.js @@ -33,31 +33,37 @@ function OpenAPIEnforcer(data) {
* @param {string} [request.method='get']
* @param {string} [request.path='/']
* @param {object} [options]
+ * @param {boolean} [options.allowOtherFormDataParameters=false] Allow form data that is not specified in the OAS document
* @param {boolean} [options.allowOtherQueryParameters=false]
* @param {boolean} [options.allowOtherCookieParameters=true]
* @param {boolean} [options.bodyDeserializer] A function to call to deserialize the body into it's expected type.
- * @returns {EnforcerResult}
+ * @returns {Promise<{ body:*, headers:object, method:string, path:object, query:object }>}
*/
-OpenAPIEnforcer.prototype.request = function(request, options) {
+OpenAPIEnforcer.prototype.request = async function (request, options) {
// validate input parameters
- if (!util.isPlainObject(request)) throw Error('Invalid request. Expected a plain object. Received: ' + request);
+ if (!request || typeof request !== 'object') throw Error('Invalid request. Expected a non-null object. Received: ' + request);
if (request.hasOwnProperty('body') && !(typeof request.body === 'string' || typeof request.body === 'object')) throw Error('Invalid body provided');
if (request.hasOwnProperty('headers') && !util.isObjectStringMap(request.headers)) throw Error('Invalid request headers. Expected an object with string keys and string values');
if (request.hasOwnProperty('method') && typeof request.method !== 'string') throw Error('Invalid request method. Expected a string');
- if (request.hasOwnProperty('path') && typeof request.path !== 'string') throw Error('Invalid request path. Expected a string');
+ if (!request.hasOwnProperty('path')) throw Error('Missing required request path');
+ if (typeof request.path !== 'string') throw Error('Invalid request path. Expected a string');
+
+ if (!options) options = {};
+ if (typeof options !== 'object') throw Error('Invalid options. Expected an object. Received: ' + options);
+ if (!options.hasOwnProperty('allowOtherFormDataParameters')) options.allowOtherFormDataParameters = false;
+ if (!options.hasOwnProperty('allowOtherQueryParameters')) options.allowOtherQueryParameters = false;
+ if (!options.hasOwnProperty('allowOtherCookieParameters')) options.allowOtherCookieParameters = true;
const exception = Exception('Request has one or more errors');
const method = request.hasOwnProperty('method') ? request.method.toLowerCase() : 'get';
- let [ path, query ] = request.hasOwnProperty('path') ? request.path.split('?') : ['/'];
- path = util.edgeSlashes(path, true, false);
- req.query = query || '';
+ const path = util.edgeSlashes(request.path.split('?')[0], true, false);
// find the path that matches the request
const pathMatch = this.paths.findMatch(path);
if (!pathMatch) {
exception('Path not found');
exception.statusCode = 404;
- return new Result(exception, null);
+ throw Error(exception);
}
// check that a valid method was specified
@@ -65,21 +71,14 @@ OpenAPIEnforcer.prototype.request = function(request, options) {
if (!pathEnforcer.methods.includes(method)) {
exception('Method not allowed: ' + method.toUpperCase());
exception.statusCode = 405;
- exception.headers = { Allow: this.methods.join(', ') };
- return new Result(exception, null);
+ exception.headers = { Allow: this.methods.map(v => v.toUpperCase()).join(', ') };
+ throw Error(exception);
}
- // TODO: working here - prepare to send to operation for parameter parsing
- const operation = pathEnforcer[method];
- const req = {
- header: request.hasOwnProperty('headers') ? Object.assign({}, request.headers) : {}
- path,
- query
- };
- req.cookie = req.header.cookies || '';
- delete req.header.cookies;
-
- return path[method].request(request);
+ const opts = Object.assign({}, options, { pathParametersValueMap: pathMatch.params });
+ const [ err, req ] = await path[method].request(request, opts);
+ if (err) throw Error(err);
+ return req;
};
OpenAPIEnforcer.prototype.requestOld = function(request, options) {
@@ -233,13 +232,3 @@ function isObjectStringMap(obj) {
}
return true;
}
\ No newline at end of file
-
-function processInput(exception, parameter, data, success) {
- if (!data.error) data = parameter.schema.deserialize(data.value);
- if (!data.error) data.error = parameter.schema.validate(data.value);
- if (data.error) {
- if (exception) exception(data.error);
- } else {
- success(data.value);
- }
-}
\ No newline at end of file
| 3 |
diff --git a/components/combobox/combobox.jsx b/components/combobox/combobox.jsx @@ -1217,7 +1217,7 @@ class Combobox extends React.Component {
className={classNames('slds-form-element', props.classNameContainer)}
>
<Label
- assistiveText={this.props.assistiveText.label}
+ assistiveText={this.props.assistiveText}
htmlFor={this.getId()}
label={labels.label}
required={labels.labelRequired}
| 13 |
diff --git a/src/auth.js b/src/auth.js @@ -46,6 +46,7 @@ async function verifyProfile(profile, fieldName) {
const now = new Date().toISOString();
const email = profile.emails && profile.emails[0].value;
const avatar = profile.photos && profile.photos[0].value;
+ const username = profile.displayName ? profile.displayName : profile.username;
// Find user with such email
//
@@ -89,7 +90,7 @@ async function verifyProfile(profile, fieldName) {
type: 'basic',
body: {
email,
- name: profile.displayName,
+ name: username,
avatarUrl: avatar,
[fieldName]: profile.id,
createdAt: now,
| 1 |
diff --git a/server/preprocessing/other-scripts/streamgraph.R b/server/preprocessing/other-scripts/streamgraph.R @@ -84,32 +84,10 @@ if (service == 'linkedcat' || service == 'linkedcat_authorview' || service == "l
sg_data$subject <- (sg_data$subject
%>% subset(stream_item %in% top_12_subject)
%>% arrange(match(stream_item, top_12_subject), year))
- sg_data$area <- (merge(metadata
- %>% select(boundary_label, year, area, id)
- %>% rename(stream_item=area)
- %>% mutate(count=1)
- %>% group_by(year, stream_item, .drop=FALSE)
- %>% summarise(count=sum(count), ids=paste(id, collapse=", ")),
- metadata
- %>% select(boundary_label, year)
- %>% distinct(),
- by.x = "year", by.y = "year"))
- top_12_area <- (sg_data$area
- %>% group_by(stream_item)
- %>% summarise(sum = sum(count))
- %>% arrange(desc(sum))
- %>% drop_na()
- %>% head(12)
- %>% select(stream_item)
- %>% pull())
- sg_data$area <- (sg_data$area
- %>% subset(stream_item %in% top_12_area)
- %>% arrange(match(stream_item, top_12_area), year))
#sg_data$bkl_caption <- metadata %>% separate_rows(bkl_caption, sep="; ") %>% group_by(boundary_label, bkl_caption) %>% summarize(count = uniqueN(id), ids = list(unique(id)))
output <- list()
output$x <- sg_data$x
output$subject <- post_process(sg_data$subject)
- output$area <- post_process(sg_data$area)
}
| 2 |
diff --git a/website/content/docs/uploadcare.md b/website/content/docs/uploadcare.md @@ -46,7 +46,7 @@ using the image or file widgets.
## Configuring the Uploadcare Widget
The Uploadcare widget can be configured with settings that are outlined [in their
-docs](https://uploadcare.com/docs/uploads/widget/config/). The widget itself accepts configration
+docs](https://uploadcare.com/docs/file_uploads/widget/options/). The widget itself accepts configration
through global variables and data properties on HTML elements, but with Netlify CMS you can pass
configuration options directly through your `config.yml`.
| 3 |
diff --git a/src/encoded/tests/data/inserts/biosample.json b/src/encoded/tests/data/inserts/biosample.json "_test": "has references",
"accession": "ENCBS000AAA",
"aliases": [
- "richard-myers:MCF-7 rep 3"
+ "richard-myers:MCF-7 rep 3",
+ "andrew-fire:biosample 1"
],
"award": "ENCODE2",
"biosample_term_id": "EFO:0001203",
| 0 |
diff --git a/packages/bitcore-wallet-service/src/lib/chain/doge/index.ts b/packages/bitcore-wallet-service/src/lib/chain/doge/index.ts @@ -130,6 +130,7 @@ export class DogeChain extends BtcChain implements IChain {
const txpSize = baseTxpSize + selected.length * sizePerInput;
fee = Math.round(baseTxpFee + selected.length * feePerInput);
+ fee = Math.max(fee, this.bitcoreLibDoge.Transaction.DUST_AMOUNT);
logger.debug('Tx size: ' + Utils.formatSize(txpSize) + ', Tx fee: ' + Utils.formatAmountInBtc(fee));
@@ -201,6 +202,7 @@ export class DogeChain extends BtcChain implements IChain {
logger.debug('Using big input: ', Utils.formatUtxos(input));
total = input.satoshis;
fee = Math.round(baseTxpFee + feePerInput);
+ fee = Math.max(fee, this.bitcoreLibDoge.Transaction.DUST_AMOUNT);
netTotal = total - fee;
selected = [input];
}
| 12 |
diff --git a/imports/ui/css/earth.css b/imports/ui/css/earth.css @@ -4132,7 +4132,6 @@ blockquote {
width: 28px;
height: 28px;
margin-right: 5px;
- float: left;
}
.micro-label {
@@ -5114,6 +5113,7 @@ blockquote {
font-weight: 400;
}
.paper {
+ border-radius: 0px;
box-shadow: none;
}
.paper.paper-execute {
@@ -5156,6 +5156,7 @@ blockquote {
padding: 10px;
}
.vote.vote-search.vote-feed {
+ margin-bottom: 5px;
box-shadow: none;
}
.option {
@@ -5311,6 +5312,9 @@ blockquote {
bottom: 0px;
width: 100%;
}
+ .type.content {
+ padding-top: 40px;
+ }
.vote-cta {
width: 100%;
}
@@ -5323,14 +5327,35 @@ blockquote {
.polis.remove {
width: 100%;
}
+ .cast {
+ box-shadow: none;
+ }
.menu.menu-empty {
font-weight: 400;
}
.menu-item {
font-weight: 400;
}
+ .feed {
+ padding-right: 5px;
+ padding-left: 5px;
+ }
+ .content.content-feed {
+ padding: 55px 5px 5px;
+ }
.content.content-agora {
- margin-top: -20px;
+ margin-top: -35px;
+ padding-top: 1px;
+ }
+ .split.split-right {
+ top: 35px;
+ }
+ .split.split-left {
+ margin-top: 55px;
+ }
+ .proposal-feed {
+ padding-right: 10px;
+ padding-left: 10px;
}
.subfeed-title {
margin-right: -10px;
| 7 |
diff --git a/app/containers/Wallet.js b/app/containers/Wallet.js @@ -7,6 +7,7 @@ import { FormGroup } from 'material-ui/Form';
import Button from 'material-ui/Button';
import WalletHistory from '../components/WalletHistory';
import SendAdaForm from '../components/SendAdaForm';
+import Loading from '../components/ui/loading/Loading';
import ExplorerApi from '../api/ExplorerApi';
import CardanoNodeApi from '../api/CardanoNodeApi';
import { toPublicHex } from '../utils/crypto/cryptoUtils';
@@ -21,13 +22,18 @@ class Wallet extends Component {
swapIndex: this.HISTORY_TAB_INDEX,
address: toPublicHex(this.props.wallet), // TODO: Change to a correct format
balance: -1,
- txsHistory: []
+ txsHistory: [],
+ loading: true
};
}
componentWillMount() {
+ this.updateWalletInfo()
+ .then(() => {
this.setState({
- intervalId: this.updateWalletInfo()
+ intervalId: setInterval(this.updateWalletInfo, 15 * 1000),
+ loading: false
+ });
});
}
@@ -80,30 +86,27 @@ class Wallet extends Component {
}
updateWalletInfo = () => {
- function run() {
console.log('[Wallet.updateWalletInfo.run] Running');
- // TODO: Swap lines
// ExplorerApi.wallet.getInfo(this.props.wallet)
- ExplorerApi.wallet.getInfo('DdzFFzCqrhsq3S51xpvLmBZrtBCHNbRQX8q3eiaR6HPLJpSakXQXrczPRiqCvLMMdNhdKBmoU7ovjyMcVDngBsuLHA66qPnYUvvJVveL')
+ return ExplorerApi.wallet.getInfo('DdzFFzCqrhsq3S51xpvLmBZrtBCHNbRQX8q3eiaR6HPLJpSakXQXrczPRiqCvLMMdNhdKBmoU7ovjyMcVDngBsuLHA66qPnYUvvJVveL')
.then((walletInfo) => {
this.setState({
address: this.getAddress(walletInfo),
balance: this.getBalance(walletInfo),
txsHistory: this.getTxsHistory(walletInfo)
});
+ return Promise.resolve();
});
}
- return setInterval(run.bind(this), 15 * 1000);
- }
render() {
return (
<div>
<FormGroup>
<Button onClick={() => openAddress(this.state.address)} >
- Address: {formatCID(this.state.address)}
+ Address: {!this.state.loading ? formatCID(this.state.address) : '...'}
</Button>
- <Button disabled> Balance: {this.state.balance} </Button>
+ <Button disabled> Balance: {!this.state.loading ? this.state.balance : '...'} </Button>
</FormGroup>
<AppBar position="static" color="default">
<Tabs value={this.state.swapIndex} onChange={this.onTabChange} fullWidth>
@@ -116,9 +119,14 @@ class Wallet extends Component {
index={this.state.swapIndex}
onChangeIndex={this.onSwipChange}
>
+ {
+ !this.state.loading ?
<WalletHistory
txs={this.state.txsHistory}
/>
+ :
+ <Loading />
+ }
<SendAdaForm onSubmit={inputs => this.onSendTransaction(inputs)} />
</SwipeableViews>
</div>
| 7 |
diff --git a/token-metadata/0x314bD765cAB4774b2E547eB0aA15013e03FF74d2/metadata.json b/token-metadata/0x314bD765cAB4774b2E547eB0aA15013e03FF74d2/metadata.json "symbol": "PARTY",
"address": "0x314bD765cAB4774b2E547eB0aA15013e03FF74d2",
"decimals": 6,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/cypress/platform/viewer.js b/cypress/platform/viewer.js @@ -44,7 +44,7 @@ const contentLoadedApi = function() {
(svgCode, bindFunctions) => {
div.innerHTML = svgCode;
- bindFunctions(div);
+ if (bindFunctions) bindFunctions(div);
},
div
);
| 1 |
diff --git a/themes/home/Page.js b/themes/home/Page.js @@ -9,12 +9,13 @@ const themes = [{
name: 'Material',
url: 'material',
imgUrl: '~/img/material.png',
- description: "Material design theme."
+ description: `This theme is based on Google's ground-breaking Material design principles. It closely follows their detailed specifications on colors, shapes, shadows and motion effects.
+ The best part is, you can easily choose one of the many predefined color schemes or define your own unique look.`
},{
name: 'Frost',
url: 'frost',
imgUrl: '~/img/frost.png',
- description: "Winter inspired theme."
+ description: "Frost is another beautiful theme inspired by winter colors. It feauters minimalistic design, whose beauty lies in a lot of small eye pleasing details."
}, {
name: 'Dark',
url: 'dark',
| 7 |
diff --git a/shaders.js b/shaders.js @@ -960,6 +960,21 @@ const _ensureLoadMesh = p => {
}
}; */
+/* const redBuildMeshMaterial = new THREE.ShaderMaterial({
+ vertexShader: `
+ void main() {
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position * 1.05, 1.);
+ }
+ `,
+ fragmentShader: `
+ void main() {
+ gl_FragColor = vec4(${new THREE.Color(0xff7043).toArray().join(', ')}, 0.5);
+ }
+ `,
+ // side: THREE.DoubleSide,
+ transparent: true,
+}); */
+
export {
/* LAND_SHADER,
WATER_SHADER,
| 0 |
diff --git a/src/logged_out/components/home/PricingSection.js b/src/logged_out/components/home/PricingSection.js import React from "react";
import PropTypes from "prop-types";
-import { Grid, Typography, isWidthUp, withWidth } from "@material-ui/core";
+import classNames from "classnames";
+import {
+ Grid,
+ Typography,
+ isWidthUp,
+ withWidth,
+ withStyles
+} from "@material-ui/core";
import PriceCard from "./PriceCard";
import calculateSpacing from "./calculateSpacing";
+const styles = theme => ({
+ containerFix: {
+ [theme.breakpoints.down("md")]: {
+ paddingLeft: theme.spacing(6),
+ paddingRight: theme.spacing(6)
+ },
+ [theme.breakpoints.down("sm")]: {
+ paddingLeft: theme.spacing(4),
+ paddingRight: theme.spacing(4)
+ },
+ [theme.breakpoints.down("xs")]: {
+ paddingLeft: theme.spacing(2),
+ paddingRight: theme.spacing(2)
+ }
+ }
+});
+
function PricingSection(props) {
- const { width } = props;
+ const { width, classes } = props;
return (
<div className="lg-p-top" style={{ backgroundColor: "#FFFFFF" }}>
<Typography variant="h3" align="center" className="lg-mg-bottom">
Pricing
</Typography>
- <div className="container-fluid">
- <Grid container spacing={calculateSpacing(width)}>
- <Grid item xs={12} sm={6} lg={3} data-aos="zoom-in-up">
+ <div className={classNames("container-fluid", classes.containerFix)}>
+ <Grid
+ container
+ spacing={calculateSpacing(width)}
+ className={classes.gridContainer}
+ >
+ <Grid
+ item
+ xs={12}
+ sm={6}
+ lg={3}
+ data-aos="zoom-in-up"
+ justify="space-evenly"
+ >
<PriceCard
title="Starter"
pricing={
@@ -93,4 +128,6 @@ PricingSection.propTypes = {
width: PropTypes.string.isRequired
};
-export default withWidth()(PricingSection);
+export default withStyles(styles, { withTheme: true })(
+ withWidth()(PricingSection)
+);
| 7 |
diff --git a/src/commands/move.js b/src/commands/move.js @@ -50,7 +50,7 @@ async function selectChannelFn (m, data) {
curErrors += translate('commands.move.meMissingEmbedLinks', { id: selected.id })
}
for (const feed of feeds) {
- if (feed.channel === selected.id && feed.link === selectedFeed.link && feed._id !== selectedFeed.id) {
+ if (feed.channel === selected.id && feed.url === selectedFeed.url && feed._id !== selectedFeed._id) {
errors += translate('commands.move.linkAlreadyExists')
}
}
| 1 |
diff --git a/resources/functions/handler/WindowStateHandler.js b/resources/functions/handler/WindowStateHandler.js @@ -9,12 +9,8 @@ exports.WindowStateHandler = function () {
app.previousPage = app.win.webContents.getURL()
app.win.webContents.setWindowOpenHandler(({url}) => {
- if (url.startsWith('https://discord.gg/') || url.startsWith('https://apple.com/') || url.startsWith('https://www.apple.com/') || url.startsWith('https://support.apple.com/') || url.startsWith('https://beta.music.apple.com') || url.startsWith('https://music.apple.com')) { // for security (pretty pointless ik)
shell.openExternal(url).then(() => console.log(`[WindowStateHandler] User has opened ${url} which has been redirected to browser.`));
return {action: 'deny'}
- }
- console.log(`[WindowStateHandler] User has attempted to open ${url} which was blocked.`)
- return {action: 'deny'}
})
app.win.webContents.on('unresponsive', async () => {
| 2 |
diff --git a/README.md b/README.md [](https://github.com/metarhia/impress/actions?query=workflow%3A%22Testing+CI%22+branch%3Amaster)
[](https://www.codacy.com/app/metarhia/impress)
[](https://snyk.io/test/github/metarhia/impress)
-[](https://www.npmjs.com/package/impress)
[](https://www.npmjs.com/package/impress)
[](https://www.npmjs.com/package/impress)
[](https://github.com/metarhia/impress/blob/master/LICENSE)
-[Impress](https://github.com/metarhia/impress) application server for
-[node.js](http://nodejs.org). All decisions are made and optimized for security,
-performance, high-intensive network operations, scalability, interactivity, rapid
-development practices, and clean project structure.
+Enterprise application server for [node.js](http://nodejs.org): secure,
+lightweight, interactive, and scalable.
+
+## Description
+
+**First** Node.js server scaled with **multithreading** and extra thin workload
+**isolation**. Optimized for **high-intensive** data exchange, rapid development,
+and **clean architecture**. Provides everything you need out of the box for
+**reliable** and **efficient backend**, network communication with web and mobile
+clients, protocol-agnostic **API**, run-time type validation, real-time and
+in-memory data processing, and **reliable stateful** services.
+
+**Weak sides**: not a good choice for content publishing including blogs and
+online stores, server-side rendering, serving static content and stateless
+services.
+
+**Strong sides**: security and architecture for enterprise-level applications,
+long-lived connections over websocket to minimize overhead for cryptographic
+handshake, no third-party dependencies.
## Quick start
-- Install with `npm install impress` or copy project template from
- [metarhia/Example](https://github.com/metarhia/Example)
-- Start server with `node server.js` or select execution mode (test, dev, prod)
- use `MODE=dev node server.js`
+- See project template: [metarhia/Example](https://github.com/metarhia/Example)
+- Start server with `node server.js`
- See [documentation and specifications](https://github.com/metarhia/Contracts)
- and project home page: https://metarhia.com
+
+API endpoint example: `application/api/example.1/citiesByCountry.js`
+
+```js
+async ({ countryId }) => {
+ const fields = ['cityId', 'name'];
+ const where = { countryId };
+ const data = await domain.db.select('City', fields, where);
+ return { result: 'success', data };
+};
+```
+
+You can call it from client-side:
+
+```js
+const res = await metacom.api.example.citiesByCountry({ countryId: 3 });
+```
### Metarhia and Impress application server way
| 7 |
diff --git a/spec/factories/users.rb b/spec/factories/users.rb @@ -71,7 +71,7 @@ FactoryGirl.define do
salt 'kkkkkkkkk'
api_key '21ee521b8a107ea55d61fd7b485dd93d54c0b9d2'
- table_quota 5
+ table_quota nil
quota_in_bytes 5000000
id { UUIDTools::UUID.timestamp_create.to_s }
builder_enabled nil # Most tests still assume editor
| 2 |
diff --git a/app/shared/components/Wallet/Panel/Form/Stake.js b/app/shared/components/Wallet/Panel/Form/Stake.js @@ -166,8 +166,13 @@ class WalletPanelFormStake extends Component<Props> {
return true;
}
+ const cpuDifference = cpuOriginal.minus(decimalCpuAmount);
+ const netDifference = netOriginal.minus(decimalNetAmount);
+ const cpuWeightDecimal = Decimal(account.cpu_weight / 10000);
+ const netWeightDecimal = Decimal(account.net_weight / 10000);
+
if (account.account_name === accountName &&
- (!decimalCpuAmount.greaterThan(0) || !decimalNetAmount.greaterThan(0))) {
+ (cpuWeightDecimal.equals(cpuDifference) || netWeightDecimal.equals(netDifference))) {
return 'no_stake_left';
}
| 11 |
diff --git a/src/encoded/audit/experiment.py b/src/encoded/audit/experiment.py @@ -808,9 +808,20 @@ def check_experiment_dnase_seq_standards(experiment,
'lack read depth information.'
yield AuditFailure('missing read depth', detail, level='WARNING')
+ hotspot_assemblies = {}
+ for hotspot_file in hotspots_files:
+ if 'assembly' in hotspot_file:
+ hotspot_assemblies[hotspot_file['accession']] = hotspot_file['assembly']
+
+ signal_assemblies = {}
+ for signal_file in signal_files:
+ if 'assembly' in signal_file:
+ signal_assemblies[signal_file['accession']] = signal_file['assembly']
+
hotspot_quality_metrics = get_metrics(hotspots_files,
'HotspotQualityMetric',
desired_assembly)
+
if hotspot_quality_metrics is not None and \
len(hotspot_quality_metrics) > 0:
for metric in hotspot_quality_metrics:
@@ -825,6 +836,7 @@ def check_experiment_dnase_seq_standards(experiment,
"ENCODE processed hotspots files {} ".format(file_names_string) + \
"produced by {} ".format(pipelines[0]['title']) + \
"( {} ) ".format(pipelines[0]['@id']) + \
+ assemblies_detail(get_assemblies(hotspot_assemblies, file_names)) + \
"have a SPOT score of {0:.2f}. ".format(metric["SPOT score"]) + \
"According to ENCODE standards, " + \
"SPOT score of 0.4 or higher is considered a product of high quality " + \
@@ -834,6 +846,7 @@ def check_experiment_dnase_seq_standards(experiment,
"SPOT score of 0.25 is considered minimally acceptable " + \
"for rare and hard to find primary tissues. (See {} )".format(
link_to_standards)
+
if 0.3 <= metric["SPOT score"] < 0.4:
yield AuditFailure('low spot score', detail, level='WARNING')
elif 0.25 <= metric["SPOT score"] < 0.3:
@@ -858,13 +871,13 @@ def check_experiment_dnase_seq_standards(experiment,
for f in metric['quality_metric_of']:
file_names.append(f['@id'])
file_names_string = str(file_names).replace('\'', ' ')
-
detail = 'Replicate concordance in DNase-seq expriments is measured by ' + \
'calculating the Pearson correlation between signal quantification ' + \
'of the replicates. ' + \
'ENCODE processed signal files {} '.format(file_names_string) + \
'produced by {} '.format(pipelines[0]['title']) + \
'( {} ) '.format(pipelines[0]['@id']) + \
+ assemblies_detail(get_assemblies(signal_assemblies, file_names)) + \
'have a Pearson correlation of {0:.2f}. '.format(metric['Pearson correlation']) + \
'According to ENCODE standards, in an {} '.format(experiment['replication_type']) + \
'assay a Pearson correlation value > {} '.format(threshold) + \
@@ -876,6 +889,18 @@ def check_experiment_dnase_seq_standards(experiment,
detail, level='NOT_COMPLIANT')
+def assemblies_detail(assemblies):
+ assemblies_detail = ''
+ if assemblies:
+ if len(assemblies) > 1:
+ assemblies_detail = "for {} assemblies ".format(
+ str(assemblies).replace('\'', ' '))
+ else:
+ assemblies_detail = "for {} assembly ".format(
+ assemblies[0])
+ return assemblies_detail
+
+
def check_experiment_rna_seq_standards(value,
fastq_files,
alignment_files,
| 0 |
diff --git a/content/questions/promise-all-resolve-order/index.md b/content/questions/promise-all-resolve-order/index.md @@ -29,4 +29,4 @@ const all = Promise.all([
<!-- explanation -->
-The order in which the Promises resolves does not matter to `Promise.all`. We can reliably count on them returning in the same array order in which they were provided.
+The order in which the Promises resolve does not matter to `Promise.all`. We can reliably count on them to be returned in the same order in which they were provided in the array argument.
| 3 |
diff --git a/src/plugins/docker/command-handlers.js b/src/plugins/docker/command-handlers.js @@ -192,11 +192,11 @@ export function restart(api) {
}
export function removeSwarm(api) {
- const list = nodemiral.taskList('Removing swarm');
+ const list = nodemiral.taskList('Destroy Swarm Cluster');
const servers = Object.keys(api.getConfig().servers);
const sessions = api.getSessionsForServers(servers);
- list.executeScript('Removing swarm', {
+ list.executeScript('Leave Swarm Cluster', {
script: api.resolvePath(__dirname, 'assets/swarm-leave.sh')
});
@@ -207,6 +207,7 @@ export function removeSwarm(api) {
export function ps(api) {
const args = api.getArgs();
+
args.shift();
each(uniqueSessions(api), (session, cb) => {
session.execute(`sudo docker ${args.join(' ')} 2>&1`, (err, code, logs) => {
| 7 |
diff --git a/src/pages/MetricDocs/Sections/MetricName.js b/src/pages/MetricDocs/Sections/MetricName.js @@ -66,8 +66,8 @@ const Metrics: ComponentType<*> = ({ metrics, setUri }) => {
(
userInput
? (
- item.metric.indexOf(userInput.replace(/[^a-z6028\s]/gi, "")) > -1 ||
- item.metric_name.indexOf(userInput.replace(/[^a-z6028\s]/gi, "")) > -1
+ item.metric.toLowerCase().indexOf(userInput.replace(/[^a-z6028\s]/gi, "")) > -1 ||
+ item.metric_name.toLowerCase().indexOf(userInput.replace(/[^a-z6028\s]/gi, "")) > -1
)
: true
) &&
@@ -102,7 +102,7 @@ const Metrics: ComponentType<*> = ({ metrics, setUri }) => {
</div>
<input name={ "metric-search" } inputMode={ "search" } type={ "search" } autoComplete={ "off" }
placeholder={ "Search metrics" }
- onChange={ ({ target }) => setUserInput(target.value) }
+ onChange={ ({ target }) => setUserInput(target.value.toLowerCase()) }
value={ userInput || "" }
style={{ maxWidth: "20em" }}
className={ "govuk-input" } maxLength={ "120" }/>
| 7 |
diff --git a/app/models/update_action.rb b/app/models/update_action.rb @@ -93,7 +93,7 @@ class UpdateAction < ActiveRecord::Base
end
def self.email_updates_to_user(subscriber, start_time, end_time)
- Rails.logger.info "email_updates_to_user: #{subscriber}"
+ Rails.logger.debug "email_updates_to_user: #{subscriber}"
user = subscriber
user = User.find_by_id(subscriber.to_i) unless subscriber.is_a?(User)
user ||= User.find_by_login(subscriber)
@@ -121,7 +121,7 @@ class UpdateAction < ActiveRecord::Base
!user.prefers_user_observation_email_notification? && u.notification == "created_observations" ||
!user.prefers_taxon_or_place_observation_email_notification? && u.notification == "new_observations"
end.compact
- Rails.logger.info "email_updates_to_user: #{subscriber}, updates: #{updates.size}"
+ Rails.logger.debug "email_updates_to_user: #{subscriber}, updates: #{updates.size}"
return if updates.blank?
UpdateAction.preload_associations(updates, [ :resource, :notifier, :resource_owner ] )
@@ -132,9 +132,9 @@ class UpdateAction < ActiveRecord::Base
Taxon.preload_associations(ids + obs, { taxon: [ :photos, { taxon_names: :place_taxon_names } ] } )
User.preload_associations(with_users, { user: :site })
updates.delete_if{ |u| u.resource.nil? || u.notifier.nil? }
- Rails.logger.info "email_updates_to_user: #{subscriber}, emailing updates: #{updates.size}"
+ Rails.logger.debug "email_updates_to_user: #{subscriber}, emailing updates: #{updates.size}"
Emailer.updates_notification(user, updates).deliver_now
- Rails.logger.info "email_updates_to_user: #{subscriber} finished"
+ Rails.logger.debug "email_updates_to_user: #{subscriber} finished"
end
def self.load_additional_activity_updates(updates, user_id)
| 5 |
diff --git a/test/tests/atb.js b/test/tests/atb.js (function() {
bkg.settings.ready().then(() => {
QUnit.module("ATB");
- testATBrewrite()
testATBInstall()
})
})()
-function testATBrewrite() {
- QUnit.test("ATB module url rewrite", function (assert) {
-
- // don't update atb values if they don't already exist
- bkg.settings.updateSetting('set_atb', null);
- bkg.ATB.updateSetAtb().then().catch((message) => {
- assert.ok(message, 'should not set a new atb if one doesnt exist already: ' + message);
- });
-
- // test getting new atb values from atb.js
- var fakeSetAtb = "fakeatbvalue";
- bkg.settings.updateSetting('set_atb', fakeSetAtb);
- bkg.ATB.updateSetAtb().then((res) => {
- assert.ok(bkg.settings.getSetting('set_atb') === res, "should have a new set_atb value: " + res)
- });
-
- // test anchor tag rewrite
- bkg.settings.updateSetting('atb', 'v70-6')
- bkg.settings.updateSetting('set_atb', 'v70-6')
- });
-}
-
function testATBInstall () {
QUnit.test("ATB install flow", function (assert) {
// test atb rewrite in new tab
| 2 |
diff --git a/src/TemplatePassthrough.js b/src/TemplatePassthrough.js @@ -28,7 +28,7 @@ class TemplatePassthrough {
return path.normalize(TemplatePath.join(outputDir, outputPath));
}
- getGlobOutputPath(globFile) {
+ getOutputPathForGlobFile(globFile) {
return TemplatePath.join(
this.getOutputPath(),
TemplatePath.getLastPathSegment(globFile)
@@ -82,7 +82,11 @@ class TemplatePassthrough {
const files = await this.getFiles(this.inputPath);
const promises = files.map(inputFile =>
- this.copy(inputFile, this.getGlobOutputPath(inputFile), copyOptions)
+ this.copy(
+ inputFile,
+ this.getOutputPathForGlobFile(inputFile),
+ copyOptions
+ )
);
return Promise.all(promises).catch(err => {
| 10 |
diff --git a/src/reducers/account/index.js b/src/reducers/account/index.js @@ -11,7 +11,8 @@ import {
resetAccounts,
checkCanEnableTwoFactor,
get2faMethod,
- getLedgerKey
+ getLedgerKey,
+ getBalance
} from '../../actions/account'
const initialState = {
@@ -108,7 +109,9 @@ const account = handleActions({
[resetAccounts]: (state) => ({
...state,
loginResetAccounts: true
- })
+ }),
+ [getBalance]: (state, { payload, ready, meta }) => {
+ }
}, initialState)
export default reduceReducers(
| 9 |
diff --git a/client/deck-validator.js b/client/deck-validator.js @@ -25,10 +25,16 @@ function getStronghold(deck) {
}
function isCardInReleasedPack(packs, card) { // eslint-disable-line no-unused-vars
- let cardPack = card.pack_cards[0].pack.id;
- let pack = _.find(packs, pack => {
+ let cardPack = '';
+ let pack = false;
+
+ if(card.pack_cards.length > 0) {
+ cardPack = card.pack_cards[0].pack.id;
+ pack = _.find(packs, pack => {
return cardPack === pack.id;
});
+ }
+
if(!pack) {
return false;
| 9 |
diff --git a/src/screens/DonateScreen/index.js b/src/screens/DonateScreen/index.js @@ -38,7 +38,10 @@ class DonateScreen extends React.PureComponent<Props, State> {
};
onAmountSelected = (selectedAmount: string) => {
- this.setState({ selectedAmount, otherAmount: null });
+ this.setState({
+ selectedAmount: selectedAmount.substr(1),
+ otherAmount: null
+ });
};
onOtherAmountFocus = () => {
@@ -50,7 +53,7 @@ class DonateScreen extends React.PureComponent<Props, State> {
};
onDonatePress = () => {
- const amount = this.state.amount || "0";
+ const amount = this.state.selectedAmount || this.state.otherAmount || "0";
Linking.openURL(
`https://donate.prideinlondon.org/?amount=${encodeURIComponent(amount)}`
);
| 0 |
diff --git a/devices.js b/devices.js @@ -114,7 +114,7 @@ const devices = [
vendor: 'Xiaomi',
description: 'Aqara double key wireless wall switch',
supports: 'left, right and both click',
- fromZigbee: [fz.xiaomi_battery_3v, fz.WXKG02LM_click],
+ fromZigbee: [fz.xiaomi_battery_3v, fz.WXKG02LM_click, fz.ignore_basic_change],
toZigbee: [],
ep: {'left': 1, 'right': 2, 'both': 3},
},
| 8 |
diff --git a/index.d.ts b/index.d.ts @@ -48,7 +48,7 @@ export type HTMLRendererConfig = BaseRendererConfig & {
};
export type AnimationConfig = {
- container: HTMLElement;
+ container: Element;
renderer?: 'svg' | 'canvas' | 'html';
loop?: boolean | number;
autoplay?: boolean;
@@ -72,7 +72,7 @@ type LottiePlayer = {
searchAnimations(animationData?: any, standalone?: boolean, renderer?: string);
loadAnimation(params: AnimationConfigWithPath | AnimationConfigWithData): AnimationItem;
destroy(name?: string);
- registerAnimation(element: HTMLElement, animationData?: any);
+ registerAnimation(element: Element, animationData?: any);
setQuality(quality: string | number);
}
| 14 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.