code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/context/directory/handlers/attackProtection.js b/src/context/directory/handlers/attackProtection.js @@ -19,11 +19,7 @@ function parse(context) { if (!existsMustBeDir(files.directory)) { return { - attackProtection: { - breachedPasswordDetection: {}, - bruteForceProtection: {}, - suspiciousIpThrottling: {} - } + attackProtection: undefined }; }
12
diff --git a/examples/hello-world-webpack2/README.md b/examples/hello-world-webpack2/README.md -* [hello-world-webpack2](./hello-world-webpack.md): Bundles a minimal app with - [webpack 2](https://github.com/webpack/webpack) and serves it with webpack-dev-server. +<div align="center"> + <img width="150" heigth="150" src="https://webpack.js.org/assets/icon-square-big.svg" /> +</div> + +## Hello World: Webpack2 + +Uses [Webpack](https://github.com/webpack/webpack) to bundle files and serves it +with [webpack-dev-server](https://webpack.js.org/guides/development/#webpack-dev-server). + +Commands: +* `npm start` is the development target, and will serves the app on port 3000. +* `npm run build` is the production target, to create the final bundle. + +Remarks: +* In a real application you would likely want to add things like hot reloading for development + and a minification step etc to the production build step etc. +* These steps have been omitted here in order to keep the example as simple as possible.
3
diff --git a/articles/tutorials/generic-oauth2-connection-examples.md b/articles/tutorials/generic-oauth2-connection-examples.md @@ -257,20 +257,23 @@ In the JSON below, replace all instances of the following placeholders: node -p -e 'JSON.stringify(require("fs").readFileSync("EXAMPLE.key").toString("ascii"));' ``` -``` +```har { - "name": "jira", - "strategy": "oauth1", - "options": { - "consumerKey": "CONSUMER_KEY" , - "consumerSecret": "CONSUMER_SECRET", - "requestTokenURL": "JIRA_URL/plugins/servlet/oauth/request-token", - "accessTokenURL": "JIRA_URL/plugins/servlet/oauth/access-token", - "userAuthorizationURL": "JIRA_URL/plugins/servlet/oauth/authorize", - "signatureMethod": "RSA-SHA1", - "scripts": { - "fetchUserProfile": "function(token, tokenSecret, ctx, cb) {\n // Based on passport-atlassian-oauth\n // https://github.com/tjsail33/passport-atlassian-oauth/blob/a2e444b0c3969dfd7caf4524ce4a4c379656ba2e/lib/passport-atlassian-oauth/strategy.js\n var jiraUrl = 'JIRA_URL';\n var OAuth = new require('oauth').OAuth;\n var oauth = new OAuth(ctx.requestTokenURL, ctx.accessTokenURL, ctx.client_id, ctx.client_secret, '1.0', null, 'RSA-SHA1');\n function oauthRequest(url, cb) {\n return oauth._performSecureRequest(token, tokenSecret, 'GET', url, null, '', 'application/json', cb);\n }\n oauthRequest(jiraUrl + '/rest/auth/1/session', function(err, body, res) {\n if (err) return cb(err);\n if (res.statusCode !== 200) return cb(new Error('StatusCode: ' + r.statusCode));\n var json;\n try {\n json = JSON.parse(body);\n } catch(ex) {\n return cb(new Error('Invalid JSON returned from JIRA', ex));\n }\n var profileUrl = jiraUrl + '/rest/api/2/user?expand=groups&username=' + encodeURIComponent(json.name);\n oauthRequest(profileUrl, function(err, body, res) {\n if (err) return cb(err);\n if (res.statusCode !== 200) return cb(new Error('StatusCode: ' + r.statusCode));\n try {\n json = JSON.parse(body);\n } catch(ex) {\n return cb(new Error('Invalid JSON returned from JIRA', ex));\n }\n // Auth0-specific mappings, customize as n:qeeded\n // https:///user-profile/normalized\n return cb(null, {\n user_id: json.name,\n username: json.name,\n email: json.emailAddress,\n name: json.displayName,\n groups: json.groups,\n picture: json.avatarUrls['48x48'],\n active: json.active,\n self: json.self,\n timezone: json.timeZone,\n locale: json.locale\n });\n });\n });\n}\n" - } - } + "method": "POST", + "url": "https://YOURACCOUNT.auth0.com/api/v2/connections", + "httpVersion": "HTTP/1.1", + "cookies": [], + "headers": [{ + "name": "Authorization", + "value": "Bearer ABCD" + }], + "queryString": [], + "postData": { + "mimeType": "application/json", + "text": "{ \"name\": \"jira\", \"strategy\": \"oauth1\", \"options\": { \"consumerKey\", \"CONSUMER_KEY\", \"consumerSecret\": \"CONSUMER_SECRET\", \"requestTokenURL\": \"JIRA_URL/plugins/servlet/oauth/request-token\", \"accessTokenURL\": \"JIRA_URL/plugins/servlet/oauth/access-token\", \"userAuthorizationURL\": \"JIRA_URL/plugins/servlet/oauth/authorize\", \"signatureMethod\": \"RSA-SHA1\", \"scripts\": { \"fetchUserProfile\": \"function(token, tokenSecret, ctx, cb) {\n // Based on passport-atlassian-oauth\n // https://github.com/tjsail33/passport-atlassian-oauth/blob/a2e444b0c3969dfd7caf4524ce4a4c379656ba2e/lib/passport-atlassian-oauth/strategy.js\n var jiraUrl = 'JIRA_URL';\n var OAuth = new require('oauth').OAuth;\n var oauth = new OAuth(ctx.requestTokenURL, ctx.accessTokenURL, ctx.client_id, ctx.client_secret, '1.0', null, 'RSA-SHA1');\n function oauthRequest(url, cb) {\n return oauth._performSecureRequest(token, tokenSecret, 'GET', url, null, '', 'application/json', cb);\n }\n oauthRequest(jiraUrl + '/rest/auth/1/session', function(err, body, res) {\n if (err) return cb(err);\n if (res.statusCode !== 200) return cb(new Error('StatusCode: ' + r.statusCode));\n var json;\n try {\n json = JSON.parse(body);\n } catch(ex) {\n return cb(new Error('Invalid JSON returned from JIRA', ex));\n }\n var profileUrl = jiraUrl + '/rest/api/2/user?expand=groups&username=' + encodeURIComponent(json.name);\n oauthRequest(profileUrl, function(err, body, res) {\n if (err) return cb(err);\n if (res.statusCode !== 200) return cb(new Error('StatusCode: ' + r.statusCode));\n try {\n json = JSON.parse(body);\n } catch(ex) {\n return cb(new Error('Invalid JSON returned from JIRA', ex));\n }\n // Auth0-specific mappings, customize as n:qeeded\n // https:///user-profile/normalized\n return cb(null, {\n user_id: json.name,\n username: json.name,\n email: json.emailAddress,\n name: json.displayName,\n groups: json.groups,\n picture: json.avatarUrls['48x48'],\n active: json.active,\n self: json.self,\n timezone: json.timeZone,\n locale: json.locale\n });\n });\n });\n}\n" + }, + "headersSize": -1, + "bodySize": -1, + "comment": "" } ```
0
diff --git a/src/buttons/component.jsx b/src/buttons/component.jsx @@ -155,15 +155,10 @@ export const Buttons : Component<ButtonProps> = create({ } }; - const orderPromise = original(data, actions); - - if (!ZalgoPromise.isPromise(orderPromise)) { - throw new Error(`Expected createOrder to return a promise for an order id`); - } + const orderPromise = ZalgoPromise.resolve(original(data, actions)); if (getEnv() === ENV.PRODUCTION) { - return ZalgoPromise.resolve(orderPromise) - .timeout(ORDER_CREATE_TIMEOUT, + return orderPromise.timeout(ORDER_CREATE_TIMEOUT, new Error(`Timed out waiting ${ ORDER_CREATE_TIMEOUT }ms for order to be created`)); }
11
diff --git a/README.md b/README.md ### Build reactive [Single Page Applications (SPAs)](https://en.wikipedia.org/wiki/Single-page_application) with [Rails](https://rubyonrails.org) and [Stimulus](https://stimulusjs.org) -This project supports building [Single Page Applications (SPAs)](https://en.wikipedia.org/wiki/Single-page_application) +This project supports building [reactive applications](https://en.wikipedia.org/wiki/Reactive_programming) with the Rails tooling you already know and love. Works perfectly with [server rendered HTML](https://guides.rubyonrails.org/action_view_overview.html), [Russian doll caching](https://edgeguides.rubyonrails.org/caching_with_rails.html#russian-doll-caching),
14
diff --git a/layouts/partials/helpers/fragments-renderer.html b/layouts/partials/helpers/fragments-renderer.html {{- $root := $layout_info.root -}} {{- range sort ($page_scratch.Get "page_fragments") "Params.weight" -}} - {{- if not (isset .Params "slot") -}} + {{/* If a fragment contains a slot variable in it's frontmatter it should not + be rendered on the page. It would be later handled by the slot helper. */}} + {{- if (not (isset .Params "slot")) (ne .Params.slot "") -}} {{/* Cleanup .Name to be more useful within fragments */}} {{- $name := cond (eq $page .) .File.BaseFileName (strings.TrimSuffix ".md" (replace .Name "/index.md" "")) -}} {{- $bg := .Params.background | default "light" }}
0
diff --git a/src/components/metadata/MetaObject.js b/src/components/metadata/MetaObject.js @@ -34,7 +34,7 @@ export class MetaObject extends Component { {items} <a onClick={() => addField(namePrefix)} className="add-field-object" title="Add new key/value pair"> - New key/value pair + New key/value pair under <strong>{fieldKey}</strong> </a> </div> );
7
diff --git a/test/fixtures/docker-compose.yml b/test/fixtures/docker-compose.yml @@ -3,11 +3,11 @@ version: '2.0' services: cop: - image: hyperledger/fabric-cop + image: hyperledger/fabric-ca ports: - "8888:8888" - command: sh -c 'cop server start -ca ~/.cop/ec.pem -ca-key ~/.cop/ec-key.pem -config /etc/hyperledger/fabric-cop/cop.json -address "0.0.0.0"' - container_name: cop + command: sh -c 'fabric-ca server start -ca /.fabric-ca/ec.pem -ca-key /.fabric-ca/ec-key.pem -config /etc/hyperledger/fabric-ca/server-config.json -address "0.0.0.0"' + container_name: ca orderer: image: hyperledger/fabric-orderer
10
diff --git a/versioned_docs/version-6.x/drawer-navigator.md b/versioned_docs/version-6.x/drawer-navigator.md @@ -42,7 +42,7 @@ import 'react-native-gesture-handler'; > Note: If you are building for Android or iOS, do not skip this step, or your app may crash in production even if it works fine in development. This is not applicable to other platforms. -The Drawer Navigator supports both Reanimated 1 and Reanimated 2. If you want to use Reanimated 2, make sure to configure it following the [installation guide](https://docs.swmansion.com/react-native-reanimated/docs/installation). +The Drawer Navigator supports both Reanimated 1 and Reanimated 2. If you want to use Reanimated 2, make sure to configure it following the [installation guide](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation). ## API Definition
1
diff --git a/truffle-ci.js b/truffle-ci.js @@ -35,10 +35,6 @@ module.exports = { }, }, mocha: { - enableTimeouts: false, - reporter: "mocha-junit-reporter", - reporterOptions: { - mochaFile: './test-results/mocha/results.xml' - } + enableTimeouts: false } };
3
diff --git a/lib/plugins/interactiveCli/setupAws.js b/lib/plugins/interactiveCli/setupAws.js @@ -74,7 +74,7 @@ http://slss.io/aws-creds-setup`); return openBrowser('https://portal.aws.amazon.com/billing/signup').then(() => inquirer.prompt({ message: 'Press Enter to continue after creating an AWS account', - name: 'junk', + name: 'createAwsAccountPrompt', }) ); } @@ -89,7 +89,7 @@ http://slss.io/aws-creds-setup`); .then(() => inquirer.prompt({ message: 'Press Enter to continue after creating an AWS user with access keys', - name: 'junk', + name: 'generateAwsCredsPrompt', }) ) .then(() => {
7
diff --git a/articles/rules/redirect.md b/articles/rules/redirect.md @@ -31,25 +31,30 @@ function (user, context, callback) { Once all rules have finished executing, the user will be redirected to the specified URL. +Auth0 will also pass a state value in that URL, for example `https://example.com/foo?state=abc123`. + +<div class="alert alert-info"><strong>What is state?</strong> State is an opaque value the clients adds to the initial request that Auth0 includes when redirecting back to the client. We highly recommend using this param, since it can be used by the client to prevent <a href="/security/common-threats#cross-site-request-forgery-xsrf-or-csrf-">CSRF attacks</a>.</div> + +You need to extract this value since you will need it in order to resume the authentication transaction after the redirect (see `THE_ORIGINAL_STATE` at the next paragraph). + ## What to do afterwards -An authentication transaction that has been interrupted by setting `context.redirect` can be resumed by redirecting the user to the following URL: +An authentication transaction that has been interrupted, by setting `context.redirect`, can be resumed by redirecting the user to the following URL: ```text https://${account.namespace}/continue?state=THE_ORIGINAL_STATE ``` -::: panel-info State -State is an opaque value the clients adds to the initial request that Auth0 includes when redirecting back to the client. We highly recommend using this param, since it can be used by the client to prevent [CSRF attacks](/security/common-threats#cross-site-request-forgery-xsrf-or-csrf-). By `THE_ORIGINAL_STATE` we mean the value you provided during user authentication. -::: +By `THE_ORIGINAL_STATE` we mean the value that Auth0 generated and sent to the redirect URL. For example, if your rule redirected to `https://example.com/foo`, Auth0 would use a redirect URL similar to: `https://example.com/foo?state=abc123` (`abc123` being the `THE_ORIGINAL_STATE`). In this case in order to resume the authentication transaction you should redirect to `https://${account.namespace}/continue?state=abc123`. + +To extract the state value, check the `request.query` object for Database logins (`context.request.query.state`), or the `request.body` object for Social/Enterprise logins (`context.request.body.state`). When a user has been redirected to the `/continue` endpoint, all rules will be run again. ::: panel-danger Caution -Make sure to send back the original state to the `/continue` endpoint, otherwise Auth0 will loose the context of the login transaction. +Make sure to send back the original state to the `/continue` endpoint, otherwise Auth0 will lose the context of the login transaction and the user will not be able to login due to to an `invalid_request` error. ::: - To distinguish between user-initiated logins and resumed login flows, the `context.protocol` property can be checked: ```js
0
diff --git a/lib/config/index.js b/lib/config/index.js @@ -796,6 +796,14 @@ Config.prototype._fromPassed = function _fromPassed(external, internal, arbitrar return } + if (key === 'ignored_params') { + warnDeprecated(key, 'attributes.exclude') + } + + if (key === 'capture_params') { + warnDeprecated(key, 'attributes.enabled') + } + try { var node = external[key] } catch (err) { @@ -811,6 +819,14 @@ Config.prototype._fromPassed = function _fromPassed(external, internal, arbitrar internal[key] = node } }, this) + + function warnDeprecated(key, replacement) { + logger.warn( + 'Config key %s is deprecated, please use %s instead', + key, + replacement + ) + } } /**
14
diff --git a/assets/js/components/legacy-setup/wizard-step-authentication.js b/assets/js/components/legacy-setup/wizard-step-authentication.js @@ -30,7 +30,6 @@ import { Component } from '@wordpress/element'; /** * Internal dependencies */ -import { trackEvent } from '../../util'; import Button from '../Button'; import Link from '../Link'; import OptIn from '../OptIn'; @@ -76,11 +75,7 @@ class WizardStepAuthentication extends Component { ) } <p> <Button - onClick={ async () => { - await trackEvent( - 'plugin_setup', - 'signin_with_google' - ); + onClick={ () => { document.location = connectURL; } } >
2
diff --git a/_data/conferences.yml b/_data/conferences.yml place: Sydney, Australia sub: ML -- name: UAI - year: 2017 - id: UAI17 - link: http://auai.org/uai2017/index.php - deadline: "2017-03-30 23:59:59" - date: August 11-August 15, 2017 - place: Sydney, Australia - sub: ML - - name: IROS year: 2017 id: iros17 place: Venice, Italy sub: CV +- name: UAI + year: 2017 + id: uai17 + link: http://auai.org/uai2017/index.php + deadline: "2017-03-31 23:59:59" + timezone: Pacific/Samoa + date: August 11-15, 2017 + place: Sydney, Australia + sub: ML + - name: ECML-PKDD year: 2017 id: ecml17 place: San Diego, California sub: NLP -- name: UAI - year: 2016 - id: uai16 - link: http://auai.org/uai2016/cfp.php - deadline: "2016-03-01 23:59:59" - date: June 25-29, 2016 - place: New York City, USA - sub: ML - - name: COLING year: 2016 id: coling16
2
diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js @@ -8,11 +8,17 @@ const valuesFor = require('../util').valuesFor module.exports = connect(mapStateToProps)(TxList) function mapStateToProps (state) { + const network = state.metamask.network + const unapprovedMsgs = valuesFor(state.metamask.unapprovedMsgs) + + const shapeShiftTxList = (network === '1') ? state.metamask.shapeShiftTxList : undefined + const transactions = state.metamask.selectedAddressTxList || [] + + const txsToRender = !shapeShiftTxList ? transactions.concat(unapprovedMsgs) : transactions.concat(unapprovedMsgs, shapeShiftTxList) + .sort((a, b) => b.time - a.time) + return { - network: state.metamask.network, - unapprovedMsgs: valuesFor(state.metamask.unapprovedMsgs), - shapeShiftTxList: state.metamask.shapeShiftTxList, - transactions: state.metamask.selectedAddressTxList || [], + txsToRender, conversionRate: state.metamask.conversionRate, } } @@ -33,16 +39,9 @@ const contentDivider = h('div', { TxList.prototype.render = function () { - const { transactions, network, unapprovedMsgs, conversionRate } = this.props - - var shapeShiftTxList - if (network === '1') { - shapeShiftTxList = this.props.shapeShiftTxList - } - const txsToRender = !shapeShiftTxList ? transactions.concat(unapprovedMsgs) : transactions.concat(unapprovedMsgs, shapeShiftTxList) - .sort((a, b) => b.time - a.time) + const { txsToRender, conversionRate } = this.props - console.log("transactions to render", txsToRender) + console.log('transactions to render', txsToRender) return h('div.flex-column.tx-list-container', {}, [
5
diff --git a/.travis.yml b/.travis.yml @@ -10,8 +10,3 @@ install: after_script: - if [[ `node --version` == *v0.10* ]]; then cat ./coverage/lcov-report/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi - -env: - global: - - SAUCE_USERNAME="$SAUCE_DEV_NAME" - - SAUCE_ACCESS_KEY="$SAUCE_DEV_KEY"
2
diff --git a/src/core/config/createCoreConfigs.js b/src/core/config/createCoreConfigs.js @@ -32,7 +32,5 @@ export default () => ({ .unique() .required(), onBeforeEventSend: callback().default(noop), - datastreamConfigOverrides: validateConfigOverride, - // TODO: Remove this - configurationOverrides: validateConfigOverride + datastreamConfigOverrides: validateConfigOverride });
2
diff --git a/lib/node_modules/@stdlib/fs/write-file/docs/repl.txt b/lib/node_modules/@stdlib/fs/write-file/docs/repl.txt Flag. Default: 'w'. options.mode: integer (optional) - Mode. Default: 0o666; + Mode. Default: 0o666. clbk: Function Callback to invoke upon writing data to a file. Flag. Default: 'w'. options.mode: integer (optional) - Mode. Default: 0o666; + Mode. Default: 0o666. Returns -------
14
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/pagebrowser/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/pagebrowser/template.vue --> <template> <transition name="fade"> - <div v-if="isVisible" class="modal-container"> - <div id="pathBrowserModal" class="modal default"> + <div v-if="isVisible" class="pathbrowser pagebrowser modal-container"> + <div id="pageBrowserModal" class="modal default modal-fixed-footer"> <div class="modal-content"> - <div class="row"> - <div class="col s12"> - <ul class="tabs"> - <li class="tab col s4"><a href="#" v-on:click="select('browse')">Browse</a></li> - <!-- <li class="tab col s4"><a href="#" v-on:click="select('cards')">Cards</a></li> --> - <li class="tab col s8"><a href="#"> - <input placeholder="search" type="text" v-model="search" style="width: 100%"> - </a></li> + <h4>Page Browser</h4> + <input placeholder="search" + type="text" + v-model="search" + style="width: 100%" /> + <template v-if="tab === 'browse'"> + <h6>{{path}}</h6> + <ul v-if="!search" class="browse-list"> + <li v-on:click.stop.prevent="selectParent"> + <i class="material-icons">folder</i> <label>..</label> + </li> + <li v-if="isFolder(item)" + v-for="item in nodes.children" + v-on:click.stop.prevent="selectFolder(item)"> + <i class="material-icons">folder</i> + <label>{{item.name}}</label> + </li> </ul> - <div class="col s12" v-if="tab === 'browse'"> - <div v-if="!search" class="collection" style="height: 300px; overflow: scroll;"> - <a href="#!" v-on:click.stop.prevent="selectParent" class="collection-item">{{path}}</a> - <template v-for="item in nodes.children"> - <a class="collection-item" v-if="isFolder(item)" v-on:click.stop.prevent="selectFolder(item)">[] {{item.name}}</a> - </template> - </div> - <div v-else style="height: 300px; overflow: scroll;"> + <div v-else> <table > <thead> <tr> </tbody> </table> </div> - </div> - <!--<div class="col s12" v-if="tab === 'cards'">--> - <!--<form action="#">--> - <!--<p class="range-field">--> - <!--<input type="range" id="test5" min="2" max="5" v-model="cardSize"/>--> - <!--</p>--> - <!--</form>--> - <!--<div class="row" style="height: 300px; overflow: scroll;">--> - <!--<div class="col" v-bind:class="cardClass" >--> - <!--<div class="card" v-bind:style="cardStyle" v-on:click.stop.prevent="selectParent()">--> - <!--<div class="card-image active">--> - <!--<div>..</div>--> - <!--</div>--> - <!--</div>--> - <!--</div>--> - <!--<template v-for="item in nodes.children" v-if="searchFilter(item)">--> - <!--<div class="col" v-bind:class="cardClass" >--> - <!--<div class="card" v-bind:style="cardStyle" v-if="isFolder(item)" v-bind:src="item.path" v-on:click.stop.prevent="selectFolder(item)">--> - <!--<div class="card-image active">--> - <!--<div>{{item.name}}</div>--> - <!--</div>--> - <!--</div>--> - <!--<div class="card" v-bind:style="cardStyle" v-if="isFile(item)" v-bind:src="item.path" v-on:click.stop.prevent="selectFolder(item)">--> - <!--<div class="card-image active">--> - <!--<img v-if="isFile(item)" v-bind:src="item.path" v-on:click.stop.prevent="selectItem(item)">--> - <!--</div>--> - <!--</div>--> - <!--</div>--> - <!--</template>--> - <!--</div>--> - <!--</div>--> - <div class="col s12" v-if="tab === 'search'"> - <input placeholder="search" type="text" value=""> - </div> - </div> - <!--<div class="col s6">--> - <!--<h6>Preview</h6>--> - <!--<div style="max-height: 300px; width: 100%; overflow: scroll;">--> - <!--<img v-bind:src="preview" style="max-width: 100%">--> - <!--</div>--> - <!--</div>--> - </div> + </template> + <input v-if="tab === 'search'" + placeholder="search" + type="text" + value="" /> </div> <div class="modal-footer"> - <div class="row"> - <div class="col s10"> - <input type="text" v-bind:value="preview"> - </div> - <div class="col s2"> - <button v-on:click="onHide">cancel</button> - <button v-on:click="onOk">select</button> - </div> - </div> - <!-- - <button - type="button" - v-on:click="onOk" - class="modal-action modal-close waves-effect waves-light btn-flat"> - ok - </button> - --> + + <!-- <input type="text" v-bind:value="preview"> --> + + <button v-on:click="onHide" class="modal-action modal-close waves-effect waves-light btn-flat">cancel</button> + <button v-on:click="onOk" class="modal-action modal-close waves-effect waves-light btn-flat">select</button> </div> </div> <div v-on:click="onHide" class="modal-overlay"></div>
7
diff --git a/bin/local-env/install-wordpress.sh b/bin/local-env/install-wordpress.sh @@ -53,8 +53,6 @@ wp user create author [email protected] --role=author --user_pass=password --qu echo -e $(status_message "Author created! Username: author Password: password") wp user create contributor [email protected] --role=contributor --user_pass=password --quiet echo -e $(status_message "Contributor created! Username: contributor Password: password") -# Assign the existing Hello World post to the author. -wp post update 1 --post_author=2 --quiet # Make sure the uploads and upgrade folders exist and we have permissions to add files. echo -e $(status_message "Ensuring that files can be uploaded...")
2
diff --git a/app/models/user/UserCurrentRegionTable.scala b/app/models/user/UserCurrentRegionTable.scala @@ -57,31 +57,20 @@ object UserCurrentRegionTable { def assignEasyRegion(userId: UUID): Int = db.withSession { implicit session => val regionIds: Set[Int] = MissionTable.selectIncompleteRegions(userId) - // Assign one of the unaudited regions that are easy. - // TODO: Assign one of the least-audited regions that are easy. - val completions: List[RegionCompletion] = - RegionCompletionTable.regionCompletions + // Takes the 5 regions with highest average street priority, and picks one at random to assign. + val highestPriorityRegions: List[(Int, Option[Double])] = StreetEdgeRegionTable.streetEdgeRegionTable .filter(_.regionId inSet regionIds) .filterNot(_.regionId inSet difficultRegionIds) - .filter(region => region.auditedDistance / region.totalDistance < 0.9999) - .sortBy(region => region.auditedDistance / region.totalDistance).take(10).list - - val regionId: Int = completions match { - case Nil => - // Indicates amongst the unaudited regions of the user, there are no unaudited regions across all users - // In this case, pick any easy region amongst regions that are not audited by the user - scala.util.Random.shuffle(regionIds).filterNot(difficultRegionIds.contains(_)).head - case _ => - // Pick an easy region that is unaudited. - // TODO: Pick an easy region that is least audited. - scala.util.Random.shuffle(completions).head.regionId + .innerJoin(StreetEdgePriorityTable.streetEdgePriorities).on(_.streetEdgeId === _.streetEdgeId) + .map { case (_edgeRegion, _edgePriority) => (_edgeRegion.regionId, _edgePriority.priority) } + .groupBy(_._1).map { case (_regionId, group) => (_regionId, group.map(_._2).avg) } // get average priority + .sortBy(_._2.desc).take(5).list // take the 5 with highest average priority - } - if (!isAssigned(userId)) { - save(userId, regionId) - regionId - } else { - update(userId, regionId) + // If the list of easy regions is empty, try assigning any region the user hasn't finished. + val chosenRegionId: Option[Int] = scala.util.Random.shuffle(highestPriorityRegions).headOption.map(_._1) + chosenRegionId match { + case Some(regionId) => update(userId, regionId) + case _ => assignNextRegion(userId) } }
3
diff --git a/packages/vulcan-ui-material/lib/components/core/Datatable.jsx b/packages/vulcan-ui-material/lib/components/core/Datatable.jsx @@ -122,12 +122,12 @@ class Datatable extends PureComponent { return <Components.DatatableContents columns={this.props.data.length ? Object.keys(this.props.data[0]) : undefined} - {...this.props} results={this.props.data} count={this.props.data.length} totalCount={this.props.data.length} showEdit={false} showNew={false} + {...this.props} />; } else {
1
diff --git a/angular/projects/spark-angular/src/lib/components/inputs/sprk-checkbox-group/sprk-checkbox-group.component.ts b/angular/projects/spark-angular/src/lib/components/inputs/sprk-checkbox-group/sprk-checkbox-group.component.ts @@ -60,7 +60,7 @@ export class SprkCheckboxGroupComponent implements AfterContentInit { * `<sprk-checkbox-item>` components. */ @ContentChildren(SprkCheckboxItemComponent, { descendants: true }) - checkboxs: QueryList<SprkCheckboxItemComponent>; + checkboxes: QueryList<SprkCheckboxItemComponent>; /** * @ignore @@ -95,8 +95,8 @@ export class SprkCheckboxGroupComponent implements AfterContentInit { * @ignore */ ngAfterContentInit(): void { - if (this.checkboxs && this.error) { - this.checkboxs.forEach((checkbox) => { + if (this.checkboxes && this.error) { + this.checkboxes.forEach((checkbox) => { checkbox.input.ref.nativeElement.setAttribute( 'aria-describedby', this.error.ref.nativeElement.id || this.error_id,
3
diff --git a/js/bitstamp.js b/js/bitstamp.js @@ -1160,7 +1160,6 @@ module.exports = class bitstamp extends Exchange { // yfi_withdrawal_fee: '0.00070000', // yfieur_fee: '0.000', // yfiusd_fee: '0.000', - // // zrx_available: '0.00000000', // zrx_balance: '0.00000000', // zrx_reserved: '0.00000000', @@ -1172,36 +1171,42 @@ module.exports = class bitstamp extends Exchange { // const result = {}; let infoObject = []; + let infoObjectLen = undefined; let prevCode = undefined; + let mainCurrencyId = undefined; const ids = Object.keys (response); for (let i = 0; i < ids.length; i++) { const id = ids[i]; const currencyId = id.split ('_')[0]; const code = this.safeCurrencyCode (currencyId); + if (codes !== undefined && !this.inArray (code, codes)) { + continue; + } if (id.indexOf ('_available') >= 0) { - if (infoObject.length > 0) { - console.log (result); - console.log (prevCode); + mainCurrencyId = currencyId; + result[code] = { + 'deposit': undefined, + 'withdraw': undefined, + 'info': undefined, + }; + infoObjectLen = infoObject.length; + if (infoObjectLen > 0) { result[prevCode]['info'] = infoObject; - } infoObject = []; - } else { + } + } + if (currencyId === mainCurrencyId) { infoObject.push ( { [id]: this.safeNumber (response, id) } ); } if (id.indexOf ('_withdrawal_fee') >= 0) { - if (codes !== undefined && !this.inArray (code, codes)) { - continue; + result[code]['withdraw'] = this.safeNumber (response, id); } - result[code] = { - 'deposit': undefined, - 'withdraw': this.safeNumber (response, id), - 'info': undefined, - }; + prevCode = this.safeCurrencyCode (mainCurrencyId); + if (i === ids.length - 1 && infoObjectLen > 0) { + result[prevCode]['info'] = infoObject; } - // console.log (infoObject); - prevCode = code; } return result; }
9
diff --git a/apps/dtlaunch/app-b2.js b/apps/dtlaunch/app-b2.js @@ -182,9 +182,14 @@ const returnToClock = function() { }; // taken from Icon Launcher with minor alterations +var timeoutToClock; +const updateTimeoutToClock = function(){ if (settings.timeOut!="Off"){ let time=parseInt(settings.timeOut); //the "s" will be trimmed by the parseInt - var timeoutToClock = setTimeout(returnToClock,time*1000); + if (timeoutToClock) clearTimeout(timeoutToClock); + timeoutToClock = setTimeout(returnToClock,time*1000); } +}; +updateTimeoutToClock(); } // end of app scope
3
diff --git a/package.json b/package.json { "name": "prettier-atom", "main": "./dist/main.js", - "version": "0.55.0", + "version": "0.55.1", "description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration", "keywords": [ "atom",
6
diff --git a/token-metadata/0xE41d2489571d322189246DaFA5ebDe1F4699F498/metadata.json b/token-metadata/0xE41d2489571d322189246DaFA5ebDe1F4699F498/metadata.json "symbol": "ZRX", "address": "0xE41d2489571d322189246DaFA5ebDe1F4699F498", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/openneuro-server/src/graphql/resolvers/snapshots.js b/packages/openneuro-server/src/graphql/resolvers/snapshots.js @@ -33,6 +33,21 @@ export const snapshot = (obj, { datasetId, tag }, context) => { } export const participantCount = async (obj, { modality }) => { + const queryHasSubjects = { + 'summary.subjects': { + $exists: true, + }, + } + const matchQuery = modality + ? { + $and: [ + queryHasSubjects, + { + 'summary.modalities.0': modality, + }, + ], + } + : queryHasSubjects const aggregateResult = await DatasetModel.aggregate([ { $match: { @@ -62,18 +77,7 @@ export const participantCount = async (obj, { modality }) => { }, }, { - $match: { - $and: [ - { - 'summary.subjects': { - $exists: true, - }, - }, - { - 'summary.modalities.0': modality, - }, - ], - }, + $match: matchQuery, }, { $group: { @@ -84,9 +88,10 @@ export const participantCount = async (obj, { modality }) => { }, }, ]).exec() - return Array.isArray(aggregateResult) - ? aggregateResult[0].participantCount - : null + if (Array.isArray(aggregateResult)) { + if (aggregateResult.length) return aggregateResult[0].participantCount + else return 0 + } else return null } const sortSnapshots = (a, b) =>
9
diff --git a/docs/quicktips/inline-js.md b/docs/quicktips/inline-js.md @@ -45,7 +45,7 @@ Capture the JavaScript into a variable and run it through the filter (this sampl <!-- capture the JS content as a Nunjucks variable --> {% set js %}{% include "sample.js" %}{% endset %} <!-- feed it through our jsmin filter to minify --> -<style>{{ js | jsmin | safe }}</style> +<script>{{ js | jsmin | safe }}</script> ``` {% endraw %}
3
diff --git a/src/models/Service.js b/src/models/Service.js @@ -189,13 +189,16 @@ export default class Service { this.isError = false; }); - this.webview.addEventListener('did-frame-finish-load', () => { + const didLoad = () => { this.isLoading = false; if (!this.isError) { this.isFirstLoad = false; } - }); + }; + + this.webview.addEventListener('did-frame-finish-load', didLoad.bind(this)); + this.webview.addEventListener('did-navigate', didLoad.bind(this)); this.webview.addEventListener('did-fail-load', (event) => { debug('Service failed to load', this.name, event);
7
diff --git a/src/domain/session/room/timeline/linkify.js b/src/domain/session/room/timeline/linkify.js @@ -3,8 +3,8 @@ export function linkify(text, callback) { const matches = text.matchAll(regex); let curr = 0; for (let match of matches) { - callback(match[0], true); callback(text.slice(curr, match.index), false); + callback(match[0], true); const len = match[0].length; curr = match.index + len; }
1
diff --git a/README.md b/README.md @@ -42,11 +42,21 @@ and integrate with: If you already have Node/Go setup, all you have to do is run: +```shell $ npm install -g generator-ng-fullstack +``` -then to create a new app: +Or, if you want to run the latest (in development) version: +```shell +$ npm install -g generator-ng-fullstack@next +``` + +Then, to create a new app, simply run: + +```shell $ yo ng-fullstack +``` and answer the on-screen questions. When it's done, you should have [this](https://github.com/ericmdantas/generator-ng-fullstack/wiki/Getting-Started#result) structure. The default starter project is our [Todo App](https://github.com/ericmdantas/generator-ng-fullstack/wiki/ToDo-Walkthrough).
3
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -134,6 +134,24 @@ Released: 2019-02-11 This release adds support for the new Instagram API, image and archive icons to the Dashboard, fixes upload retries and moves OneDrive out of beta. +| Package | Version | Package | Version | +|-|-|-|-| +| @uppy/aws-s3-multipart | 1.5.0 | @uppy/onedrive | 1.0.0 | +| @uppy/aws-s3 | 1.5.0 | @uppy/progress-bar | 1.3.5 | +| @uppy/companion | 1.9.0 | @uppy/provider-views | 1.5.3 | +| @uppy/core | 1.8.0 | @uppy/react | 1.4.3 | +| @uppy/dashboard | 1.6.0 | @uppy/robodog | 1.5.0 | +| @uppy/drag-drop | 1.4.3 | @uppy/status-bar | 1.5.0 | +| @uppy/dropbox | 1.3.6 | @uppy/thumbnail-generator | 1.5.3 | +| @uppy/facebook | 0.2.3 | @uppy/transloadit | 1.5.0 | +| @uppy/file-input | 1.4.3 | @uppy/tus | 1.5.3 | +| @uppy/form | 1.3.6 | @uppy/url | 1.4.3 | +| @uppy/golden-retriever | 1.3.5 | @uppy/utils | 2.2.0 | +| @uppy/google-drive | 1.4.0 | @uppy/webcam | 1.5.2 | +| @uppy/informer | 1.4.0 | @uppy/xhr-upload | 1.5.0 | +| @uppy/instagram | 1.3.6 | uppy | 1.9.0 | +| @uppy/locales | 1.11.1 | - | - | + - @uppy/companion: support new Instagram Graph API (#1966 / @ifedapoolarewaju) - @uppy/companion: add option to set http method for remote multipart uploads (#2047 / @ifedapoolarewaju) - @uppy/core: core: setState(modifiedFiles) in onBeforeUpload (#2028 / @arturi)
0
diff --git a/src/core/scene/a-scene.js b/src/core/scene/a-scene.js @@ -327,7 +327,7 @@ module.exports.AScene = registerElement('a-scene', { // Exiting VR in embedded mode, no longer need fullscreen styles. if (self.hasAttribute('embedded')) { self.removeFullScreenStyles(); } self.resize(); - if (self.isIOS) { utils.forceCanvasResizeSafariMobile(this.canvas); } + if (self.isIOS) { utils.forceCanvasResizeSafariMobile(self.canvas); } self.emit('exit-vr', {target: self}); }
1
diff --git a/src/lime/tools/Library.hx b/src/lime/tools/Library.hx @@ -5,14 +5,14 @@ import hxp.Path; class Library { public var embed:Null<Bool>; - public var generate:Bool; + public var generate:Null<Bool>; public var name:String; public var prefix:String; - public var preload:Bool; + public var preload:Null<Bool>; public var sourcePath:String; public var type:String; - public function new(sourcePath:String, name:String = "", type:String = null, embed:Null<Bool> = null, preload:Bool = false, generate:Bool = false, + public function new(sourcePath:String, name:String = "", type:String = null, embed:Null<Bool> = null, preload:Null<Bool> = null, generate:Null<Bool> = null, prefix:String = "") { this.sourcePath = sourcePath;
11
diff --git a/userscript.user.js b/userscript.user.js @@ -20922,9 +20922,16 @@ var $$IMU_EXPORT$$; } if (domain_nosub === "fc2.com" && /^video[0-9]*-thumbnail[0-9]*\./.test(domain)) { - // https://video-thumbnail2.fc2.com/w480/vip.video83000.fc2.com/up/thumb2/201808/03/1/201808031dv6cvPL.jpg // https://video8-thumbnail2.fc2.com/up/thumb/202003/16/r/20200316ruCdutuy.jpg - return src.replace(/^[a-z]+:\/\/[^/]+\/+[wh][0-9]+\/+([^/]+\.fc2\.com\/)/, "http://$1"); + // https://video2-thumbnail2.fc2.com/up/member/85/09/mb_pict_icon_14390985.JPG?20200116211601 + // https://video2-thumbnail2.fc2.com/up/member/85/09/mb_pict_14390985.JPG?20200116211601 + // https://video-thumbnail2.fc2.com/w240h135/vip.video52000.fc2.com/up/thumb2/202001/26/v/20200126vgUPMh2x.jpg + // http://vip.video52000.fc2.com/up/thumb2/202001/26/v/20200126vgUPMh2x.jpg + newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+(?:[wh][0-9]+){1,2}\/+([^/]+\.fc2\.com\/)/, "http://$1"); + if (newsrc !== src) + return newsrc; + + return src.replace(/(\/member\/+[0-9]+\/+[0-9]+\/+mb_pict_)icon_/, "$1"); } if (domain === "photos.hancinema.net" ||
7
diff --git a/src/collection.js b/src/collection.js @@ -90,9 +90,11 @@ var _ = Mavo.Collection = $.Class({ if (this.initialItems > 1) { // Add extra items + this.mavo.treeBuilt.then(() => { for (let i=1; i<this.initialItems; i++) { this.add(); } + }); } Mavo.hooks.run("collection-init-end", this);
1
diff --git a/src/contourFeature.js b/src/contourFeature.js @@ -129,8 +129,7 @@ var contourFeature = function (arg) { minValue, maxValue, val, range, i, k; var result = this.createMesh({ used: function (d, i) { - var val = valueFunc(d, i); - return !isNaN(val) && val !== null; + return util.isNonNullFinite(valueFunc(d, i)); }, opacity: m_this.style.get('opacity'), value: valueFunc
4
diff --git a/.github/lock.yml b/.github/lock.yml @@ -9,11 +9,11 @@ skipCreatedBefore: false # Issues and pull requests with these labels will be ignored. Set to `[]` to disable exemptLabels: - - STATE: Need response - - STATE: Need clarification + - `STATE: Need response` + - `STATE: Need clarification` # Label to add before locking, such as `outdated`. Set to `false` to disable -lockLabel: 'STATE: auto-locked' +lockLabel: `STATE: Auto-locked` # Comment to post before locking. Set to `false` to disable lockComment: >
0
diff --git a/packages/build/src/plugins/child/utils.js b/packages/build/src/plugins/child/utils.js @@ -23,7 +23,7 @@ const getUtil = async function(varName, packageName, pluginPath) { return {} } - const util = require(utilPath) + const util = await resolveUtil(utilPath, varName) return { [varName]: util } } @@ -36,4 +36,15 @@ const getUtilPath = async function(packageName, pluginPath) { } } +const resolveUtil = async function(utilPath, varName) { + try { + const util = require(utilPath) + const utilA = typeof util === 'function' ? util() : util + const utilB = await utilA + return utilB + } catch (error) { + throw new Error(`Could not load core utility '${varName}': ${error.stack}`) + } +} + module.exports = { getUtils }
7
diff --git a/src/components/fx/hover.js b/src/components/fx/hover.js @@ -653,8 +653,8 @@ function _hover(gd, evt, subplot, noHoverEvent) { var isGrouped = (fullLayout.boxmode === 'group' || fullLayout.violinmode === 'group'); findHoverPoints( - getVal('x', winningPoint, isGrouped), - getVal('y', winningPoint, isGrouped) + customVal('x', winningPoint, isGrouped), + customVal('y', winningPoint, isGrouped) ); // Remove duplicated hoverData points @@ -1898,7 +1898,7 @@ function orderPeriod(hoverData, hovermode) { hoverData = first.concat(last); } -function getVal(axLetter, winningPoint, isGrouped) { +function customVal(axLetter, winningPoint, isGrouped) { var cd0 = winningPoint.cd[winningPoint.index]; var ax = winningPoint[axLetter + 'a']; var val = winningPoint[axLetter + 'Val'];
10
diff --git a/app/modules/main/containers/Sections/Home/Setup/Backup.js b/app/modules/main/containers/Sections/Home/Setup/Backup.js @@ -214,7 +214,7 @@ class AccountSetupBackup extends Component<Props> { placeholder="Select a printer from the list" onChange={this.setPrinter} options={printers} - value={printers[0].key} + value={printer} /> ) : (
12
diff --git a/src/scripts/interaction.js b/src/scripts/interaction.js @@ -1398,6 +1398,9 @@ function Interaction(parameters, player, previousState) { action.params = action.params || {}; instance = H5P.newRunnable(action, player.contentId, undefined, undefined, {parent: player, editing: player.editor !== undefined}); + if (self.maxScore == undefined && instance.getMaxScore) { + self.maxScore = instance.getMaxScore(); + } // Getting initial score from instance (if it has previous state) if (action.userDatas && hasScoreData(instance)) { @@ -1418,10 +1421,9 @@ function Interaction(parameters, player, previousState) { }); if (isInteractiveVideoParent && isCompletedOrAnswered && event.getMaxScore()) { - // Allow subcontent types to have null scores so that they can be dynamically graded - // See iv-open-ended-question + // Allow subcontent types to have null scores so that they can be dynamically graded. See iv-open-ended-question self.score = (event.getScore() == null ? 0 : event.getScore()); - self.maxScore = event.getMaxScore(); + self.maxScore = (self.maxScore ? self.maxScore : event.getMaxScore()); adaptivity(); }
7
diff --git a/articles/extensions/authorization-extension.md b/articles/extensions/authorization-extension.md @@ -17,7 +17,7 @@ The Auth0 Authorization Extension provides user authorization support in Auth0. First make sure you have a Client created that can support the Authorization extension. Supported client types for the Authorization extension are: **Native**, **Single Page Web Applications** and **Regular Web Applications**. Clients with no type assigned or non-interactive clients are not supported. -To install the Authorization extension, click on the "Auth0 Authorization" box on the main [Extensions](${manage_url}/#/extensions) page of the Management Portal. You will be prompted to install the app. +To install the Authorization extension, click on the "Auth0 Authorization" box on the main [Extensions](${manage_url}/#/extensions) page of the Management Portal. You will be prompted to install the app. You will also need to choose where to store the data which is documented under [Storage Types](#storage-types). ![Install Authorization Extension](/media/articles/extensions/authorization/app-install-v2.png) @@ -271,14 +271,56 @@ And then clicking **Import/Export**. Use this form to copy and/or paste, or edit JSON data and then click either the **IMPORT** or **EXPORT** button when finished, depending on your use case. -## Storage +## Storage Types -The extension uses the internal Webtask storage capabilities, which are limited to 500 KB. Here are some examples of what this means in terms of scenarios: +### Webtask Storage + +The extension will use Webtask Storage by default, which is limited to 500 KB. Here are some examples of what this means in terms of scenarios: - If you have 1000 groups and 3000 users, where each user is member of 3 groups about 475 KB of data would be used. - If you have 20 groups and 7000 users, where each user is member of 3 groups about 480 KB of data would be used. -Think you need more? [Contact support.](${env.DOMAIN_URL_SUPPORT}) +> Note regarding concurrency: Webtask Storage is a file based storage platform, which means writes in parallel can cause issues. The storage logic tries to take this into account as much as possible, but if you automate the creation of groups/roles/permissions we suggest you make sequential calls to the API. + +### Amazon S3 + +The extension also allows you to config Amazon S3 as a storage provider. In order to use Amazon S3 you will need to: + + 1. Create an S3 bucket + 2. Create an IAM user and get the Key ID and Key for that user + 3. Create a policy for the IAM user which allows the user to make changes to the bucket + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "s3:DeleteObject", + "s3:GetObject", + "s3:ListBucket", + "s3:PutObject" + ], + "Resource": [ + "arn:aws:s3:::NAME-OF-YOUR-BUCKET/*" + ] + }, + { + "Effect": "Allow", + "Action": [ + "s3:ListBucket" + ], + "Resource": [ + "arn:aws:s3:::NAME-OF-YOUR-BUCKET" + ], + "Condition": {} + } + ] +} +``` + +> Note regarding concurrency: Webtask Storage is a file based storage platform, which means writes in parallel can cause issues. The storage logic tries to take this into account as much as possible, but if you automate the creation of groups/roles/permissions we suggest you make sequential calls to the API. ## Troubleshooting @@ -289,4 +331,3 @@ If this happens, chances are you created roles and permissions for one applicati ### My application/client is not shown in the dropdown when setting up the extension The supported client types for the Authorization extension are: **Native**, **Single Page Web Applications** and **Regular Web Applications**. Clients with no type assigned or non-interactive clients are not supported. -
3
diff --git a/src/encoded/tests/data/inserts/experiment.json b/src/encoded/tests/data/inserts/experiment.json "description": "RNA Evaluation K562 Long Poly-A+ RNA-seq from Gingeras", "lab": "thomas-gingeras", "status": "released", + "supersedes": "ENCSR000AES", "date_released": "2016-01-01", "submitted_by": "[email protected]", "uuid": "a357b33b-cdaa-4312-91c0-086bfec24181" "biosample_type": "immortalized cell line", "description": "RNA Evaluation K562 Small Total RNA-seq from Gingeras", "lab": "thomas-gingeras", - "status": "released", + "status": "archived", "date_released": "2016-01-01", "submitted_by": "[email protected]", "uuid": "d8e3c296-ae36-417b-855a-8bfbe3d33e3b"
0
diff --git a/lib/fetching/content-services/crowd-tangle-content-service.js b/lib/fetching/content-services/crowd-tangle-content-service.js @@ -80,7 +80,9 @@ CrowdTangleContentService.prototype._httpRequest = function(params, callback) { CrowdTangleContentService.prototype._completeUrl = function() { // add one second to last report date to start fetching from // if it is the first time fetching data, initialize start date to an old date - var startDate = this._lastReportDate ? new Date(this._lastReportDate.getTime() + 1000).toISOString() : new Date("January 1, 1995"); + var initialStartDate = new Date(); + initialStartDate.setHours(initialStartDate.getHours() - 3); + var startDate = this._lastReportDate ? new Date(this._lastReportDate.getTime() + 1000).toISOString() : initialStartDate; return url.format({ protocol: 'https', hostname: this._baseUrl,
12
diff --git a/docs/contributing/common-scenarios.html b/docs/contributing/common-scenarios.html <li>Open a pull request, with a description of the deficiency of the polyfill and how you've fixed it. Ideally link to spec documentation that specifies the behaviour that you are correcting. Finally, tell us how this aspect of the feature is treated in native implementations (so, for example if you can correct a polyfill to acheive better conformance to the spec but this then deviates from how all browsers have consistently implemented it natively, we'll probably prefer to respect the implementation rather than the spec)</li> <li>State your agreement to our <a href='https://polyfill.io/v2/docs/contributing#contribution-terms'>contribution terms</a>.</li> </ol> + + <h3 id='bug-polyfill'>The polyfill bundle is causing an error in your app</h3> + + <p>You've got an error in your website that you've tracked down to the code you're loading from the polyfill service.</p> + + <ol> + <li>Create a test case using an online tool like <a href="https://jsbin.com">JSBin</a>, which loads <strong>only</strong> the polyfill service script, and then includes inline any code required to trigger the problem (which should be no more than a few lines).</li> + <li>Raise a new issue on our issue tracker, and include: + <ul> + <li>A description of the problem (what you expected, what actually happened)</li> + <li>A link to your test case on JSBin (or jsfiddle/codepen/whatever)</li> + <li>The exact name and version number of the browser you're testing in</li> + <li>If relevant, the console output or a screenshot of the problem</li> + </ul></li> + </ol> + + <p>We ask for a JSBin demo because often these kinds of errors are actually errors in the host website's code, and even if they are a problem in the polyfill, we don't have the resources to debug your application. Please also make sure you disable any browser plugins when you are testing in JSBin, so you are certain that you are only running the test code.</p> </div> {{>footer}}
0
diff --git a/protocols/peer/test/Peer-unit.js b/protocols/peer/test/Peer-unit.js @@ -6,7 +6,6 @@ const { passes, emitted, reverted, - fails, } = require('@airswap/test-utils').assert const { takeSnapshot, revertToSnapShot } = require('@airswap/test-utils').time const { EMPTY_ADDRESS } = require('@airswap/order-utils').constants @@ -70,8 +69,8 @@ contract('Peer Unit Tests', async accounts => { describe('Test setters', async () => { it('Test setRule permissions as not owner', async () => { - //not owner is not apart of whitelist and should fail - await fails( + //not owner is not apart of admin and should fail + await reverted( peer.setRule( TAKER_TOKEN, MAKER_TOKEN, @@ -79,12 +78,13 @@ contract('Peer Unit Tests', async accounts => { PRICE_COEF, EXP, { from: notOwner } - ) + ), + 'CALLER_NOT_ADMIN' ) }) - it('Test setRule permissions after not owner is whitelisted', async () => { - //test again after adding not owner to whitelist + it('Test setRule permissions after not owner is admin', async () => { + //test again after adding not owner to admin await peer.addToAdmins(notOwner) await passes( peer.setRule( @@ -143,19 +143,19 @@ contract('Peer Unit Tests', async accounts => { }) it('Test unsetRule permissions as not owner', async () => { - //not owner is not apart of whitelist and should fail - await fails( + //not owner is not apart of admin and should fail + await reverted( peer.unsetRule( TAKER_TOKEN, MAKER_TOKEN, { from: notOwner }, - 'CALLER_NOT_WHITELISTED' - ) + ), + 'CALLER_NOT_ADMIN' ) }) - it('Test unsetRule permissions after not owner is whitelisted', async () => { - //test again after adding not owner to whitelist + it('Test unsetRule permissions after not owner is admin', async () => { + //test again after adding not owner to admin await peer.addToAdmins(notOwner) await passes(peer.unsetRule(TAKER_TOKEN, MAKER_TOKEN, { from: notOwner })) }) @@ -200,36 +200,36 @@ contract('Peer Unit Tests', async accounts => { }) }) - describe('Test whitelist', async () => { - it('Test adding to whitelist as owner', async () => { + describe('Test admin', async () => { + it('Test adding to admin as owner', async () => { await passes(peer.addToAdmins(notOwner)) }) - it('Test adding to whitelist as not owner', async () => { - await fails(peer.addToAdmins(notOwner, { from: notOwner })) + it('Test adding to admin as not owner', async () => { + await reverted(peer.addToAdmins(notOwner, { from: notOwner })) }) - it('Test removal from whitelist', async () => { + it('Test removal from admin', async () => { await peer.addToAdmins(notOwner) await passes(peer.removeFromAdmins(notOwner)) }) - it('Test removal of owner from whitelist', async () => { - await fails(peer.removeFromAdmins(owner), 'OWNER_MUST_BE_ADMIN') + it('Test removal of owner from admin', async () => { + await reverted(peer.removeFromAdmins(owner), 'OWNER_MUST_BE_ADMIN') }) - it('Test removal from whitelist as not owner', async () => { - await fails(peer.removeFromAdmins(notOwner, { from: notOwner })) + it('Test removal from admin as not owner', async () => { + await reverted(peer.removeFromAdmins(notOwner, { from: notOwner })) }) - it('Test adding to whitelist event emitted', async () => { + it('Test adding to admin event emitted', async () => { let trx = await peer.addToAdmins(notOwner) await emitted(trx, 'AdminAdded', e => { return e.account == notOwner }) }) - it('Test removing from whitelist event emitted', async () => { + it('Test removing from admin event emitted', async () => { let trx = await peer.removeFromAdmins(notOwner) await emitted(trx, 'AdminRemoved', e => { return e.account == notOwner @@ -244,7 +244,7 @@ contract('Peer Unit Tests', async accounts => { equal(val, notOwner, 'owner was not passed properly') val = await peer.isAdmin.call(owner) - equal(val, false, 'owner should no longer be whitelisted') + equal(val, false, 'owner should no longer be admin') }) it('Test ownership after transfer', async () => {
3
diff --git a/README.md b/README.md @@ -250,7 +250,7 @@ The `constants` key contains the following values: ### Utilities -Several utilities are providing with the `utils` argument to event handlers: +Several utilities are provided with the `utils` argument to event handlers: - [`build`](#error-reporting): to report errors or cancel builds - [`status`](#logging): to display information in the deploy summary @@ -259,6 +259,16 @@ Several utilities are providing with the `utils` argument to event handlers: - [`git`](/packages/git-utils/README.md): to retrieve git-related information such as the list of modified/created/deleted files +```js +// index.js + +module.exports = { + onPreBuild: async ({ utils: { build, status, cache, run, git } }) => { + await run.command('eslint src/ test/') + }, +} +``` + ### Error reporting Exceptions thrown inside event handlers are reported in logs as bugs. You should handle errors with `try`/`catch` blocks
7
diff --git a/userscript.user.js b/userscript.user.js @@ -21725,9 +21725,32 @@ var $$IMU_EXPORT$$; domain_nosub === "gog-statics.com") && domain.match(/images.*\./)) { // https://images-2.gog.com/859a7d00d0c0d46c8c4a215906479580f06837daa13d90837deba59ad51fdd8a_product_card_screenshot_112.jpg // https://images-2.gog.com/859a7d00d0c0d46c8c4a215906479580f06837daa13d90837deba59ad51fdd8a.jpg + // https://images-3.gog-statics.com/e81916c6d3612e5423b32e6c641e9589fc5e34cf5b6ccbba09d912f51fa8c4bd_bs_logo_small.webp + // https://images-3.gog-statics.com/e81916c6d3612e5423b32e6c641e9589fc5e34cf5b6ccbba09d912f51fa8c4bd_bs_logo_big.webp + newsrc = src.replace(/(\/[0-9a-f]{10,}_bs_logo)_small(\.[^/.]+)(?:[?#].*)?$/, "$1_big$2"); + if (newsrc !== src) + return newsrc; + + // https://images-2.gog-statics.com/c9410707e8fa68b3fcd414f217c4f72b653fbc4dca6abf17c603d924149e3398_bs_background_500.webp + // https://images-2.gog-statics.com/c9410707e8fa68b3fcd414f217c4f72b653fbc4dca6abf17c603d924149e3398_bs_background_800.webp + // https://images-2.gog-statics.com/c9410707e8fa68b3fcd414f217c4f72b653fbc4dca6abf17c603d924149e3398_bs_background_1275.webp + newsrc = src.replace(/(\/[0-9a-f]{10,}_bs_background)_(?:500|800)(\.[^/.]+)(?:[?#].*)?$/, "$1_1275$2"); + if (newsrc !== src) + return newsrc; + return src.replace(/(\/[0-9a-f]*)_[^/.]*(\.[^/.]*)$/, "$1$2"); } + if (domain === "items.gog.com") { + // https://items.gog.com/in_other_waters/mp4/IOW_Convo_brine_600px.gif.mp4 + if (/\/mp4\/+[^/]+\.mp4(?:[?#].*)?$/.test(src)) { + return { + url: src, + video: true + }; + } + } + if (domain === "www.destructoid.com") { // https://www.destructoid.com/ul/494427-AB-t.jpg // https://www.destructoid.com//ul/494427-AB.jpg'); -- yes, not a typo
7
diff --git a/src/client/js/components/Admin/SlackIntegration/CustomBotWithProxyIntegrationCard.jsx b/src/client/js/components/Admin/SlackIntegration/CustomBotWithProxyIntegrationCard.jsx @@ -22,12 +22,12 @@ const CustomBotWithProxyIntegrationCard = () => { dangerouslySetInnerHTML={{ __html: t('admin:slack_integration.integration_sentence.integration_is_not_complete') }} /> <div className="row m-0"> - <hr className="border-danger align-self-center admin-border col"></hr> + <hr className="align-self-center admin-border-danger border-danger col"></hr> <div className="circle text-center bg-primary border-light"> <p className="text-light font-weight-bold m-0 pt-3">Proxy</p> <p className="text-light font-weight-bold">Server</p> </div> - <hr className="border-danger align-self-center admin-border col"></hr> + <hr className="align-self-center admin-border-danger border-danger col"></hr> </div> </div>
7
diff --git a/package.json b/package.json "name": "find-and-replace", "main": "./lib/find", "description": "Find and replace within buffers and across the project.", - "version": "0.215.11", + "version": "0.215.12", "license": "MIT", "activationCommands": { "atom-workspace": [
6
diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js @@ -107,7 +107,7 @@ class AttachmentModal extends PureComponent { return ( <> <Modal - type={CONST.MODAL.MODAL_TYPE.CENTERED} + type={modalType} onSubmit={this.submitAndClose} onClose={() => this.setState({isModalOpen: false})} isVisible={this.state.isModalOpen}
4
diff --git a/src/services/milestones/milestones.hooks.js b/src/services/milestones/milestones.hooks.js @@ -33,8 +33,7 @@ const restrict = () => context => { ]; // reviewers can mark Completed or Canceled - if (['Completed', 'Canceled'].includes(data.status) && - data.mined === false) { + if (['Completed', 'Canceled'].includes(data.status) && data.mined === false) { if (!reviewers.includes(user.address)) { throw new errors.Forbidden( @@ -49,9 +48,7 @@ const restrict = () => context => { key => !approvedKeys.includes(key), ); keysToRemove.forEach(key => delete data[key]); - } else if (data.status === 'InProgress' && - milestone.status !== data.status) { - + } else if (data.status === 'InProgress' && milestone.status !== data.status) { // reject milestone if (!reviewers.includes(user.address)) { throw new errors.Forbidden('Only the reviewer reject a milestone'); @@ -64,7 +61,7 @@ const restrict = () => context => { key => !approvedKeys.includes(key), ); keysToRemove.forEach(key => delete data[key]); - } else if (milestone.status === 'proposed') { + } else if (milestone.status === 'proposed' && data.status === 'pending') { // accept proposed milestone if (user.address !== milestone.campaignOwnerAddress) { throw new errors.Forbidden( @@ -74,18 +71,20 @@ const restrict = () => context => { const approvedKeys = ['txHash', 'status', 'mined', 'ownerAddress']; - // data.ownerAddress = user.address - const keysToRemove = Object.keys(data).map( key => !approvedKeys.includes(key), ); keysToRemove.forEach(key => delete data[key]); - } else if (!milestone.status && user.address !== milestone.ownerAddress) { + } else if (user.address !== milestone.ownerAddress) { throw new errors.Forbidden(); - } else { - + } else if (milestone.status !== 'proposed') { // this data is stored on-chain & can't be updated - const keysToRemove = ['maxAmount', 'reviewerAddress', 'recipientAddress', 'campaignReviewerAddress']; + const keysToRemove = [ + 'maxAmount', + 'reviewerAddress', + 'recipientAddress', + 'campaignReviewerAddress', + ]; keysToRemove.forEach(key => delete data[key]); } };
11
diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js }, findLis: function () { - this.$lis = this.$menuInner.find('li'); + this.$lis = this.$menuInner.find('.inner > li'); return this.$lis; }, render: function () { var that = this, $selectOptions = this.$element.find('option'), - $lis = that.findLis(), selectedItems = [], selectedItemsInTitle = [];
7
diff --git a/core/algorithm-builder/lib/builds/build-algorithm-image.sh b/core/algorithm-builder/lib/builds/build-algorithm-image.sh #!/usr/bin/env bash -# This script used to create a specific algorithm +# This script used to create a specific algorithm image source $PWD/lib/builds/build-utils.sh
3
diff --git a/core/field_bound_variable.js b/core/field_bound_variable.js @@ -196,7 +196,7 @@ Blockly.FieldBoundVariable.prototype.getValue = function() { * @override */ Blockly.FieldBoundVariable.prototype.setText = function(newText) { - if (!newText) { + if (newText !== null) { var text = String(newText); if (this.data_) { this.data_.setVariableName(newText); @@ -205,8 +205,8 @@ Blockly.FieldBoundVariable.prototype.setText = function(newText) { // later. this.defaultVariableName_ = text; } - } Blockly.FieldBoundVariable.superClass_.setText.call(this, text); + } }; /**
12
diff --git a/base/battle/Battle.ts b/base/battle/Battle.ts @@ -1426,6 +1426,13 @@ So, if a character will die after 5 turns and you land another Curse on them, it this.battle_menu.destroy_menu(); this.target_window.destroy(); this.animation_manager.destroy(); + + if (this.allies_defeated) { + const hero = this.data.info.main_char_list[this.data.hero.key_name]; + hero.current_hp = 1; + hero.remove_permanent_status(permanent_status.DOWNED); + } + if (this.before_fade_finish_callback) { return this.before_fade_finish_callback(!this.allies_defeated); }
12
diff --git a/src/client/js/components/PageRenameModal.jsx b/src/client/js/components/PageRenameModal.jsx @@ -47,6 +47,8 @@ const PageRenameModal = (props) => { * @param {string} value */ function inputChangeHandler(value) { + setErrorCode(null); + setErrorMessage(null); setPageNameInput(value); }
7
diff --git a/world.js b/world.js @@ -10,7 +10,7 @@ import WSRTC from 'wsrtc/wsrtc.js'; import hpManager from './hp-manager.js'; // import {rigManager} from './rig.js'; import {AppManager} from './app-manager.js'; -import {chatManager} from './chat-manager.js'; +// import {chatManager} from './chat-manager.js'; // import {getState, setState} from './state.js'; // import {makeId} from './util.js'; import {scene, postSceneOrthographic, postScenePerspective, sceneHighPriority, sceneLowPriority} from './renderer.js'; @@ -19,6 +19,7 @@ import {appsMapName, playersMapName} from './constants.js'; import {playersManager} from './players-manager.js'; import * as metaverseModules from './metaverse-modules.js'; import {createParticleSystem} from './particle-system.js'; +// import voiceInput from './voice-input/voice-input.js'; import * as sounds from './sounds.js'; const localEuler = new THREE.Euler(); @@ -54,102 +55,7 @@ const extra = { states: new Float32Array(15), }; */ -let mediaStream = null; -let speechRecognition = null; -world.micEnabled = () => !!mediaStream; -world.enableMic = async () => { - await WSRTC.waitForReady(); - mediaStream = await WSRTC.getUserMedia(); - if (wsrtc) { - wsrtc.enableMic(mediaStream); - } - - const localPlayer = metaversefileApi.useLocalPlayer(); - localPlayer.setMicMediaStream(mediaStream); -}; -world.disableMic = () => { - if (mediaStream) { - if (wsrtc) { - wsrtc.disableMic(); - } else { - WSRTC.destroyUserMedia(mediaStream); - } - mediaStream = null; - - const localPlayer = metaversefileApi.useLocalPlayer(); - localPlayer.setMicMediaStream(null); - } - if (world.speechEnabled) { - world.disableSpeech(); - } -}; -world.toggleMic = () => { - if (world.micEnabled()) { - world.disableMic(); - } else { - world.enableMic(); - } -}; - -world.speechEnabled = () => !!speechRecognition; -world.enableSpeech = () => { - let final_transcript = ''; - const localSpeechRecognition = new webkitSpeechRecognition(); - - /* const names = [ - 'Scillia', - ]; - const grammar = '#JSGF V1.0; grammar names; public <name> = ' + names.join(' | ') + ' ;' - const speechRecognitionList = new webkitSpeechGrammarList(); - speechRecognitionList.addFromString(grammar, 1); - localSpeechRecognition.grammars = speechRecognitionList; - localSpeechRecognition.maxAlternatives = 10; */ - localSpeechRecognition.interimResults = false; - localSpeechRecognition.maxAlternatives = 1; - // localSpeechRecognition.continuous = true; - // localSpeechRecognition.interimResults = true; - // localSpeechRecognition.lang = document.querySelector("#select_dialect").value; - /* localSpeechRecognition.onstart = () => { - // document.querySelector("#status").style.display = "block"; - }; */ - localSpeechRecognition.onerror = e => { - console.log('speech recognition error', e); - }; - localSpeechRecognition.onend = () => { - /* final_transcript = final_transcript - .replace(/celia|sylvia|sileo|cilia|tilia|zilia/gi, 'Scillia'); */ - console.log('speech:', [final_transcript]); - if (final_transcript) { - chatManager.addMessage(final_transcript, { - timeout: 3000, - }); - } - - if (localSpeechRecognition === speechRecognition) { - final_transcript = ''; - localSpeechRecognition.start(); - } - }; - localSpeechRecognition.onresult = event => { - for (let i = event.resultIndex; i < event.results.length; ++i) { - final_transcript += event.results[i][0].transcript; - } - }; - localSpeechRecognition.start(); - - speechRecognition = localSpeechRecognition; -}; -world.disableSpeech = () => { - speechRecognition.stop(); - speechRecognition = null; -}; -world.toggleSpeech = () => { - if (world.speechEnabled()) { - world.disableSpeech(); - } else { - world.enableSpeech(); - } -}; +world.getConnection = () => wsrtc; world.connectState = state => { state.setResolvePriority(1);
2
diff --git a/edit.js b/edit.js @@ -1024,8 +1024,9 @@ const [ noise: methodIndex++, marchingCubes: methodIndex++, bakeGeometry: methodIndex++, + getSubparcel: methodIndex++, + releaseSubparcel: methodIndex++, chunk: methodIndex++, - releaseUpdate: methodIndex++, mine: methodIndex++, releaseMine: methodIndex++, light: methodIndex++, @@ -1151,7 +1152,7 @@ const [ } { const subparcelSharedPtr = callStack.ou32[offset++]; - w.requestReleaseUpdate(subparcelSharedPtr); + w.requestReleaseSubparcel(subparcelSharedPtr); } }, }; @@ -1802,8 +1803,29 @@ const [ } return [landCullResults, vegetationCullResults]; }; - w.requestReleaseUpdate = subparcelSharedPtr => new Promise((accept, reject) => { - callStack.allocRequest(METHODS.releaseUpdate, 1, true, offset => { + w.getSubparcel = (tracker, x, y, z) => new Promise((accept, reject) => { + callStack.allocRequest(METHODS.getSubparcel, 4, true, offset => { + callStack.u32[offset] = tracker; + callStack.u32[offset + 1] = x; + callStack.u32[offset + 2] = y; + callStack.u32[offset + 3] = z; + }, offset => { + const subparcelSharedPtr = callStack.ou32[offset++]; + const subparcelPtr = callStack.ou32[offset++]; + if (subparcelSharedPtr) { + const numObjects = moduleInstance.HEAPU32[(subparcelPtr + planet.Subparcel.offsets.numObjects)/Uint32Array.BYTES_PER_ELEMENT]; + console.log('got num objects', numObjects); + + w.requestReleaseSubparcel() + .then(accept, reject); + } else { + console.log('no subparcel'); + } + }); + }); + window.getSubparcel = (x, y, z) => w.getSubparcel(tracker, x, y, z); + w.requestReleaseSubparcel = subparcelSharedPtr => new Promise((accept, reject) => { + callStack.allocRequest(METHODS.releaseSubparcel, 1, true, offset => { callStack.u32[offset] = subparcelSharedPtr; }, offset => { accept();
0
diff --git a/edit.js b/edit.js @@ -12,7 +12,7 @@ import {downloadFile, readFile, bindUploadFileButton} from './util.js'; // import {wireframeMaterial, getWireframeMesh, meshIdToArray, decorateRaycastMesh, VolumeRaycaster} from './volume.js'; // import './gif.js'; import {RigManager} from './rig.js'; -import {makeCubeMesh, /*makeUiFullMesh,*/ makeTextMesh, makeToolsMesh, makeDetailsMesh, makeInventoryMesh, intersectUi, makeRayMesh} from './vr-ui.js'; +import {makeCubeMesh, /*makeUiFullMesh,*/ makeTextMesh, makeToolsMesh, makeDetailsMesh, makeInventoryMesh, makeIconMesh, intersectUi, makeRayMesh} from './vr-ui.js'; import {makeLineMesh, makeTeleportMesh} from './teleport.js'; import {makeAnimalFactory} from './animal.js'; import { @@ -6831,16 +6831,27 @@ const _uploadImg = async file => { meshComposer.addMesh(mesh); }; const _uploadScript = async file => { - const text = await (() => { + const text = await new Promise((accept, reject) => { const fr = new FileReader(); fr.onload = function() { accept(this.result); }; fr.onerror = reject; fr.readAsText(file); - })(); - console.log('got text', text); - eval(text); + }); + const mesh = makeIconMesh(); + mesh.geometry.boundingBox = new THREE.Box3( + new THREE.Vector3(-1, -1/2, -0.1), + new THREE.Vector3(1, 1/2, 0.1), + ); + const xrCamera = currentSession ? renderer.xr.getCamera(camera) : camera; + mesh.position.copy(xrCamera.position) + .add(new THREE.Vector3(0, 0, -1.5).applyQuaternion(xrCamera.quaternion)); + mesh.quaternion.copy(xrCamera.quaternion); + mesh.frustumCulled = false; + meshComposer.addMesh(mesh); + console.log('got text', mesh); + // eval(text); }; const _handleFileUpload = async file => { const match = file.name.match(/\.(.+)$/);
0
diff --git a/src/common/mining-pools/pool/pool-management/pool-work/Pool-Work-Validation.js b/src/common/mining-pools/pool/pool-management/pool-work/Pool-Work-Validation.js @@ -46,6 +46,9 @@ class PoolWorkValidation{ work.hashHex = work.hash.toString("hex"); + if ( this._worksDuplicate[work.hashHex] ) + return; + let isPOS = BlockchainGenesis.isPoSActivated(work.h); if ( !isPOS && typeof work.timeDiff === "number") { @@ -74,18 +77,22 @@ class PoolWorkValidation{ return; forced = true; + } else { //POW + + this._worksDuplicate [ work.hashHex ] = new Date().getTime(); + } if ( work.result || forced ){ - await this._validateWork(workData); + const out = await this._validateWork(workData); - } else { + //marking the POS as a validated already solution + if (isPOS && out && out.result) + this._worksDuplicate [ work.hashHex ] = new Date().getTime(); - if ( this._worksDuplicate[work.hashHex] ) - return; + } else { - this._worksDuplicate [ work.hashHex ] = new Date().getTime(); this.addWork(workData); @@ -146,7 +153,7 @@ class PoolWorkValidation{ let prevBlock = this.poolWorkManagement.poolWork.findBlockById( work.work.id, work.work.height ); if ( prevBlock ) - await this.poolWorkManagement.processWork( work.minerInstance, work.work, prevBlock ); + return this.poolWorkManagement.processWork( work.minerInstance, work.work, prevBlock ); else Log.error("_validateWork didn't work as the block " + work.work.id + " was not found", Log.LOG_TYPE.POOLS, work.work );
7
diff --git a/public/javascripts/SVLabel/src/SVLabel/onboarding/InitialMissionInstruction.js b/public/javascripts/SVLabel/src/SVLabel/onboarding/InitialMissionInstruction.js @@ -42,12 +42,15 @@ function InitialMissionInstruction(compass, mapService, neighborhoodContainer, p this._instructForGSVLabelDisappearing = function () { if (!svl.isOnboarding()) { // Instruct the user about GSV labels disappearing when they have labeled and walked for the first time - var labels = svl.labelContainer.getCurrentLabels(); - var prev_labels = svl.labelContainer.getPreviousLabels(); + var labels = labelContainer.getCurrentLabels(); + var prev_labels = labelContainer.getPreviousLabels(); if (labels.length == 0) { labels = prev_labels; } - if (labels.length > 0) { + var labelCount = labels.length; + var nOnboardingLabels = 7; + if (labelCount > 0) { + if (svl.missionContainer.isTheFirstMission() && labelCount != nOnboardingLabels) { var title = "Labels on the image disappear"; var message = "If you turn back now to look at your labels, they would not appear on the Street View " + "image after you have taken a step. " + @@ -57,6 +60,7 @@ function InitialMissionInstruction(compass, mapService, neighborhoodContainer, p mapService.blinkGoogleMaps(); } } + } }; this._instructToFollowTheGuidance = function () {
1
diff --git a/package.json b/package.json "json-6": "^1.1.4", "key-did-provider-ed25519": "^1.1.0", "key-did-resolver": "^1.4.0", + "maxrects-packer": "^2.7.2", "metaversefile": "./packages/totum", "node-fetch": "^3.1.0", "openai-api": "^1.2.6",
0
diff --git a/data_preparation.rst b/data_preparation.rst @@ -338,110 +338,3 @@ This can be aggregated to multiple resolutions using `clodius aggregate multivec The `--chromsizes-filename` option lists the chromosomes that are in the input file and their sizes. The `--starting-resolution` option indicates that the base resolution for the input data is 1000 base pairs. - -Development ------------ - -In order ot display large datasets at multiple resolutions, HiGlass requires -the input data to be aggregated at multiple resolutions. For Hi-C data, this is -done using the `cooler <https://github.com/mirnylab/cooler/>`_ package. For -other types of data it is done using the `clodius -<https://github.com/hms-dbmi/clodius>`_ package. - -Example -^^^^^^^ - -Let's say that we have a new datatype that we want to use in higlass. In this -example, we'll use HDF5 to store an array of length 100000 at multiple -resolutions. Each resolution will be half of the previous one and will be stored -as an array in the HDF5 file. - -To begin, we'll create an HDF5 and add a group that will store the -different resolutions: - -.. code-block:: python - - import h5py - import numpy as np - - f = h5py.File('/tmp/my_file.multires', 'w') - - f.create_group('resolutions') - -We'll add our highest resolution data directly: - -.. code-block:: python - - array_length = 100000 - f['resolutions'].create_dataset('1', (array_length,)) - f['resolutions']['1'][:] = np.array(range(array_length)) - - print(f['resolutions']['1'][:5]) - -This should output ``[ 0. 1. 2. 3. 4.]``. Next we want to recursively -aggregate this data so that adjacent entries are summed. This can be -accomplished in a concise manner using numpy's ``.resize(-1,2).sum(axis=1)`` -function. - -How many recursions do we need? In the end, we want to be able to fit all -the data into one 1024 element tile. This means that after n aggregations, -we need to have less than 1024 elements. - -.. code-block:: python - - tile_size = 1024 - max_zoom = math.ceil(math.log(array_length / tile_size) / math.log(2)) - - - - -Building for development -^^^^^^^^^^^^^^^^^^^^^^^^ - -The recommended way to develop ``clodius`` is to use a `conda`_ environment and -install ``clodius`` with develop mode: - -.. _conda: https://conda.io/docs/intro.html - -.. code-block:: bash - - python setup.py develop - -Note that making changes to the ``clodius/fast.pyx`` `cython`_ module requires an -explicit recompile step: - -.. _cython: http://docs.cython.org/en/latest/src/quickstart/cythonize.html - -.. code-block:: bash - - python setup.py build_ext --inplace - -Testing -^^^^^^^ - -The unit tests for clodius can be run using `nosetests`_:: - - nosetests tests - -Individual unit tests can be specified by indicating the file and function -they are defined in:: - - nosetests test/cli_test.py:test_clodius_aggregate_bedgraph - - -.. _nosetests: http://nose.readthedocs.io/en/latest/ - - - -Building the documentation -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Building the documentation from the root directory is a matter of running -``sphinx-build``:: - - sphinx-build docs -b html docs/_build/html - -To view the documentation, go to the build directory and start an http server:: - - cd docs/_build/html - python -m http 8081
2
diff --git a/screenshot.html b/screenshot.html } else { return await _renderDefaultCanvas(); } + } else if (['png', 'jpg', 'gif'].includes(ext)) { + const img = await new Promise((accept, reject) => { + const img = new Image(); + img.onload = () => { + accept(img); + }; + img.onerror = reject; + img.src = url; + }); + const canvas = document.createElement('canvas'); + canvas.width = img.width; + canvas.height = img.height; + const ctx = canvas.getContext('2d'); + ctx.drawImage(img, 0, 0); + return canvas; } else { return await _renderDefaultCanvas(); }
0
diff --git a/server.js b/server.js (function() { var express = require('express'); var compression = require('compression'); + var fs = require('fs'); var url = require('url'); var request = require('request'); + var gzipHeader = Buffer.from("1F8B08", "hex"); + var yargs = require('yargs').options({ 'port' : { 'default' : 8080, var mime = express.static.mime; mime.define({ 'application/json' : ['czml', 'json', 'geojson', 'topojson'], + 'application/octet-stream' : ['b3dm', 'i3dm', 'pnts', 'cmpt'], 'image/crn' : ['crn'], 'image/ktx' : ['ktx'], 'model/gltf+json' : ['gltf'], res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); next(); }); + + function checkGzipAndNext(req, res, next) { + var reqUrl = url.parse(req.url, true); + var filePath = reqUrl.pathname.substring(1); + + var readStream = fs.createReadStream(filePath, { start: 0, end: 2 }); + readStream.on('error', function(err) { + next(); + }); + + readStream.on('data', function(chunk) { + if (chunk.equals(gzipHeader)) { + res.header('Content-Encoding', 'gzip'); + } + next(); + }); + } + + var knownTilesetFormats = [/\.b3dm/, /\.pnts/, /\.i3dm/, /\.cmpt/, /\.glb/, /tileset.*\.json$/]; + app.get(knownTilesetFormats, checkGzipAndNext); + app.use(express.static(__dirname)); function getRemoteUrlFromParam(req) {
11
diff --git a/src/components/dashboard/FaceVerification/api/FaceVerificationApi.js b/src/components/dashboard/FaceVerification/api/FaceVerificationApi.js @@ -157,7 +157,7 @@ class FaceVerificationApi { const { success, error } = response || {} - if (!success) { + if (false === success) { // non - success - throwing an exception with failed response const exception = new Error(error)
0
diff --git a/tests/e2e/plugins/module-setup-tagmanager.php b/tests/e2e/plugins/module-setup-tagmanager.php @@ -116,7 +116,6 @@ add_action( 'methods' => 'GET', 'callback' => function ( $request ) use ( $accounts, $containers ) { $account_id = $request['accountID'] ?: $accounts[0]['accountId']; - $containers = filter_by_context( $containers, $request['usageContext'] ); return array( 'accounts' => $accounts, @@ -134,7 +133,6 @@ add_action( array( 'methods' => 'GET', 'callback' => function ( $request ) use ( $containers ) { - $containers = filter_by_context( $containers, $request['usageContext'] ); return filter_by_account_id( $containers, $request['accountID'] ); },
2
diff --git a/docs/source/docs/examples/cards.blade.md b/docs/source/docs/examples/cards.blade.md @@ -19,46 +19,46 @@ title: "Cards" </div> </div> -## Classic card example +## Stacked @component('_partials.code-sample', ['class' => 'p-10 flex justify-center']) <div class="max-w-sm rounded overflow-hidden shadow-lg"> <img class="w-full" src="{{ $page->baseUrl }}/img/card-top.jpg"> <div class="px-6 py-4"> <div class="font-bold text-xl mb-2">The Coldest Sunset</div> - <p class="text-slate text-base"> + <p class="text-grey-darker text-base"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, nulla! Maiores et perferendis eaque, exercitationem praesentium nihil. </p> </div> <div class="px-6 py-4"> - <span class="inline-block bg-smoke-light rounded-full px-3 py-1 text-sm font-semibold text-slate mr-2">#photography</span> - <span class="inline-block bg-smoke-light rounded-full px-3 py-1 text-sm font-semibold text-slate mr-2">#travel</span> - <span class="inline-block bg-smoke-light rounded-full px-3 py-1 text-sm font-semibold text-slate">#winter</span> + <span class="inline-block bg-grey-lighter rounded-full px-3 py-1 text-sm font-semibold text-grey-darker mr-2">#photography</span> + <span class="inline-block bg-grey-lighter rounded-full px-3 py-1 text-sm font-semibold text-grey-darker mr-2">#travel</span> + <span class="inline-block bg-grey-lighter rounded-full px-3 py-1 text-sm font-semibold text-grey-darker">#winter</span> </div> </div> @endcomponent -## Advanced card example +## Horizontal @component('_partials.code-sample', ['class' => 'p-10 flex justify-center']) <div class="max-w-md flex"> <div class="rounded rounded-l w-128 text-center overflow-hidden"> <img class="block h-64" src="{{ $page->baseUrl }}/img/card-left.jpg"> </div> - <div class="border-t border-r border-b border-smoke rounded rounded-r p-4 flex flex-col justify-between"> + <div class="border-t border-r border-b border-grey-light rounded rounded-r p-4 flex flex-col justify-between"> <div> - <p class="text-sm text-slate-light flex items-center"> - <svg class="text-slate-lighter w-3 h-3 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M4 8V6a6 6 0 1 1 12 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h1zm5 6.73V17h2v-2.27a2 2 0 1 0-2 0zM7 6v2h6V6a3 3 0 0 0-6 0z"/></svg> + <p class="text-sm text-grey-dark flex items-center"> + <svg class="text-grey w-3 h-3 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M4 8V6a6 6 0 1 1 12 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h1zm5 6.73V17h2v-2.27a2 2 0 1 0-2 0zM7 6v2h6V6a3 3 0 0 0-6 0z"/></svg> Members only </p> - <div class="font-bold text-xl mb-2">Can coffee make you a better developer?</div> - <p class="text-slate text-base">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, nulla! Maiores et perferendis eaque, exercitationem praesentium nihil.</p> + <div class="text-black font-bold text-xl mb-2">Can coffee make you a better developer?</div> + <p class="text-grey-darker text-base">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, nulla! Maiores et perferendis eaque, exercitationem praesentium nihil.</p> </div> <div class="flex items-center"> <img class="w-10 h-10 rounded-full mr-4" src="https://pbs.twimg.com/profile_images/885868801232961537/b1F6H4KC_400x400.jpg"> <div class="text-sm"> - <p class="text-slate-darker leading-none">Jonathan Reinink</p> - <p class="text-slate-light">Aug 18</p> + <p class="text-black leading-none">Jonathan Reinink</p> + <p class="text-grey-dark">Aug 18</p> </div> </div> </div>
14
diff --git a/articles/rules/current/context.md b/articles/rules/current/context.md @@ -13,9 +13,6 @@ The following properties are available for the `context` object: * `connection`: the name of the connection used to authenticate the user (e.g.: `twitter` or `some-google-apps-domain`) * `connectionStrategy`: the type of connection. For social connection `connectionStrategy` === `connection`. For enterprise connections, the strategy will be `waad` (Windows Azure AD), `ad` (Active Directory/LDAP), `auth0` (database connections), etc. * `samlConfiguration`: an object that controls the behavior of the SAML and WS-Fed endpoints. Useful for advanced claims mapping and token enrichment (only available for `samlp` and `wsfed` protocol). -* `jwtConfiguration`: an object to configure how Json Web Tokens (JWT) will be generated: - - `lifetimeInSeconds`: expiration of the token. - - `scopes`: predefined scopes values (e.g.: `{ 'images': ['picture', 'logo'] }` this scope value will request access to the picture and logo claims). * `protocol`: the authentication protocol. Possible values: - `oidc-basic-profile`: most used, web based login - `oidc-implicit-profile`: used on mobile devices and single page apps @@ -62,7 +59,6 @@ The following properties are available for the `context` object: connection: 'Username-Password-Authentication', connectionStrategy: 'auth0', samlConfiguration: {}, - jwtConfiguration: {}, protocol: 'oidc-basic-profile', stats: { loginsCount: 111 }, sso: { with_auth0: false, with_dbconn: false, current_clients: [] },
2
diff --git a/src/lib/API/api.js b/src/lib/API/api.js @@ -87,6 +87,14 @@ class API { return this.client.post('/verify/topwallet') } + sendVerificationEmail(user: UserRecord): Promise<$AxiosXHR<any>> { + return this.client.post('/verify/sendemail', { user }) + } + + verifyEmail(verificationData: { code: string }): Promise<$AxiosXHR<any>> { + return this.client.post('/verify/email', { verificationData }) + } + sendLinkByEmail(to: string, sendLink: string): Promise<$AxiosXHR<any>> { return this.client.post('/send/linkemail', { to, sendLink }) }
0
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -35,10 +35,6 @@ references: command: | yarn ganache > /dev/null & yarn test - - run: - name: Slither run - command: | - ./scripts/slither.sh - save_cache: paths: - node_modules
2
diff --git a/src/components/Privacy/createComponent.js b/src/components/Privacy/createComponent.js @@ -49,19 +49,6 @@ export default ({ .addTask(() => sendSetConsentRequest(value)) .catch(error => { readCookieIfQueueEmpty(); - // This check re-writes the error message from Konductor to be more clear. - // We could check for this before sending the request, but if we let the - // request go out and Konductor adds this feature, customers don't need to - // update Alloy to get the functionality. - if ( - error && - error.message && - error.message.indexOf("User is opted out") > -1 - ) { - throw new Error( - "The user previously declined consent, which cannot be changed." - ); - } throw error; }) .then(readCookieIfQueueEmpty);
2
diff --git a/app/components/cru-secret/template.hbs b/app/components/cru-secret/template.hbs }} {{/if}} -{{optionally-namespaced isClone=isClone namespaceErrors=namespaceErrors scope=scope mode=mode namespace=namespace model=model}} +{{optionally-namespaced namespaceErrors=namespaceErrors scope=scope mode=mode namespace=namespace model=model}} <div class="box mt-10"> <label class="acc-label">{{t 'newSecret.values.label'}}</label>
11
diff --git a/lib/devices.js b/lib/devices.js @@ -1722,6 +1722,16 @@ const devices = [ states.occupancy, states.no_motion, states.voltage, states.battery, ], }, + //iCasa + { + vendor: 'iCasa', + models: ['ICZB-FC'], + icon: 'img/philips_hue_lwv001.png', + states: lightStatesWithColortemp, + linkedStates: [comb.brightnessAndState], + }, + + ]; const commonStates = [
3
diff --git a/packages/insomnia-app/package.json b/packages/insomnia-app/package.json "build": "node ./scripts/build.js", "package": "node ./scripts/package.js", "release": "node ./scripts/release.js", - "bootstrap": "rimraf node_modules/fsevents && rimraf node_modules/graphql-language-service-interface/dist/*.flow && electron-rebuild -f -w insomnia-libcurl" + "bootstrap": "rimraf ./**/node_modules/fsevents && rimraf node_modules/graphql-language-service-interface/dist/*.flow && electron-rebuild -f -w insomnia-libcurl" }, "dev": { "dev-server-port": 3333
2
diff --git a/README.md b/README.md You can [catch me on twitter](http://twitter.com/MrRio): [@MrRio](http://twitter.com/MrRio) or head over to [my company's website](http://parall.ax) for consultancy. -## [Live Demo](http://rawgit.com/MrRio/jsPDF/master/) | [Documentation](http://rawgit.com/MrRio/jsPDF/master/docs/) +## [Live Demo](http://raw.githack.com/MrRio/jsPDF/master/docs/) | [Documentation](http://raw.githack.com/MrRio/jsPDF/master/docs/) ## Creating your first document
14
diff --git a/src/utils.js b/src/utils.js @@ -41,6 +41,28 @@ export function loadNamespaces(i18n, ns, cb) { } export function hasLoadedNamespace(ns, i18n, options = {}) { + /* + + IN I18NEXT > v19.4.5 WE CAN (INTRODUCED JUNE 2020) + + return i18n.hasLoadedNamespace(ns, { + precheck: (i18nInstance, loadNotPending) => { + if ( + options.bindI18n && + options.bindI18n.indexOf('languageChanging') > -1 && + i18n.services.backendConnector.backend && + i18n.isLanguageChangingTo && + !loadNotPending(i18n.isLanguageChangingTo, ns) + ) + return false; + } + }) + + // WILL BE BREAKING AS DEPENDS ON SPECIFIC I18NEXT VERSION + // WAIT A LITTLE FOR I18NEXT BEING UPDATED IN THE WILD + + */ + if (!i18n.languages || !i18n.languages.length) { warnOnce('i18n.languages were undefined or empty', i18n.languages); return true;
6
diff --git a/src/server/models/attachment.js b/src/server/models/attachment.js @@ -83,7 +83,7 @@ module.exports = function(crowi) { throw new Error('url is required.'); } this.externalUrlCached = externalUrl; - this.externalUrlExpiredAt = addSeconds(new Date(), 120); + this.externalUrlExpiredAt = addSeconds(new Date(), this.SECONDS_OF_CASH_EXPIRATION); return this.save(); };
4
diff --git a/storybook-utilities/icon-utilities/icon-loader.js b/storybook-utilities/icon-utilities/icon-loader.js const request = new XMLHttpRequest(); request.open('GET', 'https://spark-assets.netlify.app/spark-icons.svg'); request.send(); -request.onload = () => { +// eslint-disable-next-line func-names +request.onload = function () { document.querySelector('#sprk-icons').innerHTML = this.response; let event; if (typeof Event === 'function') {
3
diff --git a/src/pages/Trading/Trading.container.js b/src/pages/Trading/Trading.container.js @@ -11,6 +11,7 @@ const mapStateToProps = (state = {}) => ({ layouts: getLayouts(state), activeMarket: getActiveMarket(state), exID: getActiveExchange(state), + firstLogin: state.ui.firstLogin, }) const mapDispatchToProps = dispatch => ({
3
diff --git a/aa_composer.js b/aa_composer.js @@ -226,6 +226,8 @@ function handleTrigger(conn, batch, fPrepare, trigger, stateVars, arrDefinition, var storage_size; var objStateUpdate; var count = 0; + if (bSecondary) + updateOriginalOldValues(); // add the coins received in the trigger function updateInitialAABalances(cb) { @@ -989,6 +991,17 @@ function handleTrigger(conn, batch, fPrepare, trigger, stateVars, arrDefinition, }); } + function updateOriginalOldValues() { + if (!bSecondary || !stateVars[address]) + return; + var addressVars = stateVars[address]; + for (var var_name in addressVars) { + var state = addressVars[var_name]; + if (state.updated) + state.original_old_value = (state.value === false) ? undefined : state.value; + } + } + function handleSuccessfulEmptyResponseUnit() { if (!objStateUpdate) return bounce("no state changes");
12
diff --git a/js/colorScales.js b/js/colorScales.js @@ -79,8 +79,8 @@ function minHueRange(h0, h1) { // Since we're doing pixel math, can we just compute the colors on-the-fly, instead // of using a table? -var maxHues = 20; -var maxSaturations = 10; +var maxHues = 10; +var maxSaturations = 30; function scaleTrendAmplitude(low, zero, high, origin, thresh, max) { var [h0, h1] = minHueRange(RGBtoHSV(...rgb(low)).h, RGBtoHSV(...rgb(high)).h), colors = _.range(h0, h1, (h1 - h0) / maxHues).map(h =>
4
diff --git a/token-metadata/0x2F141Ce366a2462f02cEA3D12CF93E4DCa49e4Fd/metadata.json b/token-metadata/0x2F141Ce366a2462f02cEA3D12CF93E4DCa49e4Fd/metadata.json "symbol": "FREE", "address": "0x2F141Ce366a2462f02cEA3D12CF93E4DCa49e4Fd", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/components/App.js b/components/App.js @@ -1220,7 +1220,7 @@ class App extends Component { }, setting.get('gamechooser.show_delay')) } - this.window.setProgressBar(0) + this.window.setProgressBar(-1) callback(error) if (!error) this.events.emit('fileLoad')
2
diff --git a/src/commands/Settings/Start.js b/src/commands/Settings/Start.js @@ -12,7 +12,7 @@ class Untrack extends Command { } run(message) { - this.messageManager.reply(message, 'That\'s so 2016, Operator, in 2017, Cephalon Genesis uses `/track` and that\'s all.\nCheck out <https://wfcd.github.io/genesis> for documentation.', true, false); + this.messageManager.reply(message, 'That\'s so 2016, Operator, in 2017, Cephalon Genesis started using `/track` and that\'s all.\nCheck out <https://genesis.warframestat.us> for documentation.', true, false); return this.messageManager.statuses.SUCCESS; } }
3
diff --git a/tabulator.js b/tabulator.js } } + //build right column freeze list if entire table isnt frozen + if(self.columnFrozenLeft.length != self.columnList.length){ freezeCont = true; //build right column freeze list freezeCont = false; } } + }
9
diff --git a/src/intrinsics/Promise.mjs b/src/intrinsics/Promise.mjs @@ -139,9 +139,6 @@ function PerformPromiseAll(iteratorRecord, constructor, resultCapability) { function Promise_all([iterable = Value.undefined], { thisValue }) { const C = thisValue; - if (Type(C) !== 'Object') { - return surroundingAgent.Throw('TypeError', 'Promise.all called on non-object'); - } const promiseCapability = Q(NewPromiseCapability(C)); const iteratorRecord = GetIterator(iterable); IfAbruptRejectPromise(iteratorRecord, promiseCapability); @@ -267,9 +264,6 @@ function PerformPromiseAllSettled(iteratorRecord, constructor, resultCapability) function Promise_allSettled([iterable = Value.undefined], { thisValue }) { const C = thisValue; - if (Type(C) !== 'Object') { - return surroundingAgent.Throw('TypeError', 'Promise.allSettled called on non-object'); - } const promiseCapability = Q(NewPromiseCapability(C)); const iteratorRecord = GetIterator(iterable); IfAbruptRejectPromise(iteratorRecord, promiseCapability); @@ -312,9 +306,6 @@ function PerformPromiseRace(iteratorRecord, constructor, resultCapability) { function Promise_race([iterable = Value.undefined], { thisValue }) { const C = thisValue; - if (Type(C) !== 'Object') { - return surroundingAgent.Throw('TypeError', 'Promise.race called on non-object'); - } const promiseCapability = Q(NewPromiseCapability(C)); const iteratorRecord = GetIterator(iterable); IfAbruptRejectPromise(iteratorRecord, promiseCapability); @@ -330,9 +321,6 @@ function Promise_race([iterable = Value.undefined], { thisValue }) { function Promise_reject([r = Value.undefined], { thisValue }) { const C = thisValue; - if (Type(C) !== 'Object') { - return surroundingAgent.Throw('TypeError', 'Promise.reject called on non-object'); - } const promiseCapability = Q(NewPromiseCapability(C)); Q(Call(promiseCapability.Reject, Value.undefined, [r])); return promiseCapability.Promise;
2
diff --git a/packages/bitcore-client/bin/wallet-balance b/packages/bitcore-client/bin/wallet-balance const program = require('../lib/program'); const Wallet = require('../lib/wallet'); +try { program .version(require('../package.json').version) .option('--name <name>', 'REQUIRED - Wallet name') .option('--path [path]', 'optional - Custom wallet storage path') .parse(process.argv); +} catch (e) { + console.log(e.message); + return program.help() +} const main = async () => { const { name, path } = program;
7
diff --git a/packages/web/src/components/basic/ReactiveBase.js b/packages/web/src/components/basic/ReactiveBase.js @@ -46,7 +46,13 @@ class ReactiveBase extends Component { } componentDidCatch() { - console.error(`An error has occured. You're using Reactivesearch Version: ${process.env.VERSION || require('../../../package.json').version}. If you think this is a problem with Reactivesearch, please try updating to the latest version. If you're already at the latest version, please open an issue at https://github.com/appbaseio/reactivesearch/issues`); + console.error( + 'An error has occured. You\'re using Reactivesearch Version:', + `${process.env.VERSION || require('../../../package.json').version}.`, + 'If you think this is a problem with Reactivesearch, please try updating', + 'to the latest version. If you\'re already at the latest version, please open', + 'an issue at https://github.com/appbaseio/reactivesearch/issues', + ); } render() {
3
diff --git a/bin/configure-fastly.js b/bin/configure-fastly.js @@ -95,7 +95,7 @@ async.auto({ async.forEachOf(routes, function (route, id, cb2) { var condition = { name: fastlyConfig.getConditionNameForRoute(route, 'request'), - statement: 'req.url ~ "' + route.pattern + '"', + statement: 'req.url.path ~ "' + route.pattern + '"', type: 'REQUEST', // Priority needs to be > 1 to not interact with http->https redirect priority: 10 + id @@ -118,7 +118,7 @@ async.auto({ responseCondition: function (cb3) { var condition = { name: fastlyConfig.getConditionNameForRoute(route, 'response'), - statement: 'req.url ~ "' + route.pattern + '"', + statement: 'req.url.path ~ "' + route.pattern + '"', type: 'RESPONSE', priority: id }; @@ -223,7 +223,7 @@ async.auto({ requestCondition: function (cb2) { var condition = { name: 'routes/projects/embed (request)', - statement: 'req.url ~ "^/projects/embed/(\\d+)"', + statement: 'req.url.path ~ "^/projects/embed/(\\d+)"', type: 'REQUEST', priority: 10 }; @@ -232,7 +232,7 @@ async.auto({ responseCondition: function (cb2) { var condition = { name: 'routes/projects/embed (response)', - statement: 'req.url ~ "^/projects/embed/(\\d+)"', + statement: 'req.url.path ~ "^/projects/embed/(\\d+)"', type: 'RESPONSE', priority: 10 };
8
diff --git a/src/gml/type/GmlTypeParser.hx b/src/gml/type/GmlTypeParser.hx @@ -290,6 +290,17 @@ class GmlTypeParser { typeStr += ">"; depth -= 1; if (depth <= 0) break; + case KShr: + if (depth == 1) { + reader.pos--; + typeStr += ">"; + depth = 0; + break; + } else { + typeStr += ">>"; + depth -= 2; + if (depth <= 0) break; + } default: typeStr += self.nextVal; }
1
diff --git a/client/src/components/layouts/LayoutCorners/cardSwitcher.scss b/client/src/components/layouts/LayoutCorners/cardSwitcher.scss .card-icon-item { .card-button-background, .btn { - left: 5px; + left: 1.3vw; } .card-button-mask { width: auto;
1
diff --git a/userscript.user.js b/userscript.user.js @@ -5653,9 +5653,14 @@ var $$IMU_EXPORT$$; // http://image.news1.kr/system/thumbnails/photos/2018/2/19/2973418/thumb_336x230.jpg // http://image.news1.kr/system/photos/2018/2/19/2973418/original.jpg // http://image.news1.kr/system/photos/2014/8/22/985836/main_thumb.jpg + // http://image.news1.kr/system/photos/2014/8/22/985836/original.jpg/dims/optimize // http://image.news1.kr/system/photos/2014/8/22/985836/original.jpg // http://image.news1.kr/system/photos/2018/6/15/3162887/high.jpg -- 1400x1867 // http://image.news1.kr/system/photos/2018/6/15/3162887/original.jpg -- 1500x2000 + newsrc = src.replace(/\/+dims\/.*/, ""); + if (newsrc !== src) + return newsrc; + newsrc = src .replace(/\/thumbnails\/(.*)\/thumb_[0-9]+x(?:[0-9]+)?(\.[^/.]*)$/, "/$1/original$2") .replace(/main_thumb\.jpg/, "original.jpg") @@ -17603,7 +17608,17 @@ var $$IMU_EXPORT$$; // https://derpicdn.net/img/2018/2/24/1664344/full.png // https://derpicdn.net/img/2016/10/9/1268708/large.png -- 1280x973 // https://derpicdn.net/img/2016/10/9/1268708/full.png -- 4603x3500 - return src.replace(/\/(?:thumb|large)(\.[^/.]*)$/, "/full$1"); + // https://derpicdn.net/img/view/2016/10/9/1268708.png -- 4603x3500 + newsrc = src.replace(/\/(?:thumb|large)(\.[^/.]*)$/, "/full$1"); + if (newsrc !== src) + return newsrc; + + // thanks to /u/evan555alpha: https://www.reddit.com/r/mylittlepony/comments/f4nxru/sparkle_family_artistangusdra/fhsdtzv/ + // https://derpicdn.net/img/2019/5/4/2030328/full.jpeg + // https://derpicdn.net/img/view/2019/5/4/2030328.jpeg + newsrc = src.replace(/(\/img\/+)([0-9]{4}\/+[0-9]{1,2}\/+[0-9]{1,2}\/+[0-9]+)\/+[^/.]+(\.[^/.]+)(?:[?#].*)?$/, "$1view/$2$3"); + if (newsrc !== src) + return newsrc; } if (domain_nosub === "iimg.me") {
7
diff --git a/generators/common/templates/sonar-project.properties.ejs b/generators/common/templates/sonar-project.properties.ejs @@ -12,14 +12,14 @@ sonar.java.codeCoveragePlugin=jacoco sonar.junit.reportPaths=target/test-results/test,target/test-results/integrationTest <%_ } _%> <%_ if (!skipClient) { _%> -sonar.testExecutionReportPaths=target/test-results/jest/TESTS-results-sonar.xml -sonar.typescript.lcov.reportPaths=<%_ if (buildTool === 'maven') { _%>target/<%_ } else { _%> build/<%_ } _%>test-results/lcov.info +sonar.testExecutionReportPaths=<%_ if (buildTool === 'maven') { _%>target<%_ } else { _%> build<%_ } _%>/test-results/jest/TESTS-results-sonar.xml +sonar.typescript.lcov.reportPaths=<%_ if (buildTool === 'maven') { _%>target<%_ } else { _%> build<%_ } _%>/test-results/lcov.info <%_ } _%> sonar.sourceEncoding=UTF-8 sonar.exclusions=<%= CLIENT_MAIN_SRC_DIR %>content/**/*.*, <%= CLIENT_MAIN_SRC_DIR %>i18n/*.js, <%= CLIENT_DIST_DIR %>**/*.* -sonar.issue.ignore.multicriteria=<%_ if (!skipServer) { _%>S3437,<% if (authenticationType === 'jwt') { %>S4502,<% } %>S4684,UndocumentedApi<%_ } _%><%_ if (!skipClient) { _%>,BoldAndItalicTagsCheck<%_ } _%> +sonar.issue.ignore.multicriteria=<%_ if (!skipServer) { _%>S3437,<% if (authenticationType === 'jwt') { %>S4502,<% } %>S4684,UndocumentedApi<%_ } _%><%_ if (!skipClient) { _%><%_ if (!skipServer) { _%>,<%_ } _%>BoldAndItalicTagsCheck<%_ } _%> <%_ if (!skipServer) { _%> # Rule https://sonarcloud.io/coding_rules?open=squid%3AS3437&rule_key=squid%3AS3437 is ignored, as a JPA-managed field cannot be transient
7
diff --git a/articles/rules/current/index.md b/articles/rules/current/index.md @@ -261,14 +261,12 @@ function(user, context, callback) { This Rule will require that you have a `configuration` value set for the key `SLACK_HOOK`. At the [Rules](${manage_url}/#/rules/) page in the Dashboard, scroll down beneath your list of Rules to the configuration area. Enter `SLACK_HOOK` as the key and the Slack URL of the channel you want to post a message to as the value, then hit "Create". Now your URL will be available to all Rules via `configuration.SLACK_HOOK`. Bear in mind that `configuration` is global to all Rules on the account. -![Rules Configuration](/media/articles/rules/rules-configuration.png) +To edit or change a configuration key's value, remove the existing configuration setting and replace it with the updated value. -::: note -You need to have created at least one Rule in order to see the configuration area; otherwise, the Rules demo shows instead. -::: +![Rules Configuration](/media/articles/rules/rules-configuration.png) ::: note -To edit or change a configuration key's value, remove the existing configuration settings and replace them with updated values. +You need to have created at least one Rule in order to see the configuration area, otherwise, the Rules demo shows instead. ::: ## Create Rules with the Management API
2
diff --git a/src/components/LayoutColumn.js b/src/components/LayoutColumn.js @@ -3,7 +3,7 @@ import React from "react"; import type { Node } from "react"; import { StyleSheet, View } from "react-native"; -type Props = { spacing: number, children: Array<Node> }; +type Props = { spacing: number, children: Node }; const LayoutColumn = ({ spacing, children }: Props) => ( <View style={[{ marginVertical: -0.5 * spacing }, styles.column]}>
1