code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/coverageignore.js b/coverageignore.js @@ -14,4 +14,4 @@ governing permissions and limitations under the License. * Patterns of source files (files within the src directory) that should be * ignored for test coverage checks and reporting. */ -module.exports = ["**/.*", "baseCode/**", "**/constants/**", "**/index.js"]; +module.exports = ["**/.*", "**/constants/**", "**/index.js"];
2
diff --git a/Source/Scene/Implicit3DTileContent.js b/Source/Scene/Implicit3DTileContent.js @@ -621,7 +621,7 @@ function deriveBoundingVolumeS2( // Decode Morton index. var childCoords = MortonOrder.decode2D(childIndex % 4); // Encode Hilbert index. - var hilbertIndex = HilbertOrder.encode2D(2, childCoords[0], childCoords[1]); + var hilbertIndex = HilbertOrder.encode2D(1, childCoords[0], childCoords[1]); var childCell = parentTile.s2Cell.getChild(hilbertIndex); var minHeight, maxHeight;
1
diff --git a/index.d.ts b/index.d.ts @@ -51,16 +51,13 @@ type ExpressionName = // Zoom, Heatmap | 'zoom' | 'heatmap-density'; -type ExpressionField = any; - -// After TS 3.7 this can be typed as: -// string -// | number -// | boolean -// | Expression -// | ExpressionField[] -// | {[key: string]: ExpressionField}; -// See https://github.com/microsoft/TypeScript/pull/33050 +type ExpressionField = + | string + | number + | boolean + | Expression + | ExpressionField[] + | {[key: string]: ExpressionField}; export type Expression = [ExpressionName, ...ExpressionField[]];
1
diff --git a/apiserver/apiserver/web/user.py b/apiserver/apiserver/web/user.py @@ -68,7 +68,7 @@ def verify_affiliation(org_id, email_to_verify, provided_code): )).first() if org is None: - raise util.APIError(404, message="Organization does not exist.") + raise util.APIError(404, message="This organization does not exist.") if org["kind"] == "High School": # Don't require validation for high schools - we manually check @@ -226,7 +226,7 @@ def create_user(*, user_id): raise util.APIError(400, message="User needs to verify email.") if user_data["is_email_good"] == 1: - raise util.APIError(400, message="User already validated.") + raise util.APIError(400, message="You have already successfully confirmed your membership with this organization.") org_id = body.get("organization_id") email = body.get("email") @@ -269,7 +269,7 @@ def create_user(*, user_id): if org_id: message.append("You've been added to the {} organization.".format(org_name)) else: - message.append("Could not determine an organization. Reach out to us at [email protected] to add your organization.") + message.append("We could not recognize this organization. Reach out to us at [email protected] for help.") # Figure out the situation with their email/organization if org_id is None and email is None: @@ -564,11 +564,10 @@ def update_user(intended_user_id, *, user_id): update["organization_id"] = org_id else: update["organization_id"] = None - message.append("This email belongs to an organization not known to Halite." - " Halite Team will review your affiliation after you verify your email," - " and contact you if we need more information.") + message.append("We are setting up the association with the organization." + " Please verify your email, and we will contact you for more information if needed.") - message.append("Please check your inbox for a verification email.") + message.append("Please check your inbox for your verification email.") with model.engine.connect() as conn: conn.execute(model.users.update().where(
1
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.209.3", + "version": "0.209.4", "license": "MIT", "activationCommands": { "atom-workspace": [
6
diff --git a/sirepo/package_data/static/js/zgoubi.js b/sirepo/package_data/static/js/zgoubi.js @@ -733,6 +733,9 @@ SIREPO.app.directive('srToscaEditor', function(appState, magnetService, panelSta } tosca.l = data.toscaInfo.toscaLength; tosca.allFileNames = data.toscaInfo.fileList; + if (tosca.allFileNames.length == 1) { + tosca.fileNames = [tosca.allFileNames[0]]; + } } }); updateMagnetFiles(tosca);
1
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -4,8 +4,8 @@ version: 2.1 aliases: # Define paths and never think about them again - &GAIA /tmp/gaia - - &WORKSPACE /tmp/lunie - - &DIST /tmp/lunie/dist + - &WORKSPACE /tmp/voyager + - &DIST /tmp/voyager/dist # Pick docker versions here only, then use the aliases in the executors definition - &docker-node tendermintdev/voyager_node - &docker-browsers tendermintdev/voyager_node_browser
4
diff --git a/assets/less/templates.less b/assets/less/templates.less left: @sidebarWidth; right: 0; .box-sizing(border-box); - .closeMenu & { - left: @sidebarWidth+@collapsedNavWidth; - } } .with-tabs-sidebar & { overflow: hidden;
2
diff --git a/src/data/event.js b/src/data/event.js @@ -166,7 +166,8 @@ export type Event = { individualEventPicture: FieldRef, eventsListPicture: FieldRef, performances: Array<FieldRef>, - recurrenceDates: Array<string> + recurrenceDates: Array<string>, + stage: boolean } }; @@ -277,7 +278,8 @@ export const decodeEvent = (locale: string): Decoder<Event> => "recurrenceDates", decode.array(decode.string), [] - ) + ), + stage: maybeFieldWithDefault(locale, "stage", decode.boolean, false) }) ) });
0
diff --git a/src/technologies.json b/src/technologies.json ], "cpe": "cpe:/a:paypal:paypal", "description": "PayPal is an online payments system that supports online money transfers and serves as an electronic alternative to traditional paper methods like checks and money orders.", - "html": [ - "<input[^>]+_s-xclick", - "<img [^>]*src=\"[^/]*//[^/]*paypal\\.com", - "<img [^>]*src=\"[^/]*//[^/]*paypalobjects\\.com" - ], + "html": "<input[^>]+_s-xclick", + "dom": { + "img[src*='paypal.com'], img[src*='paypalobjects.com']": { + "text": "" + }, + "button": { + "text": "PayPal" + } + }, "icon": "PayPal.svg", "js": { "PAYPAL": "" }, "scripts": "paypalobjects\\.com", - "url": "paypal\\.com", "website": "https://paypal.com" }, "Peek": {
7
diff --git a/packages/node_modules/node-red/settings.js b/packages/node_modules/node-red/settings.js @@ -359,9 +359,9 @@ module.exports = { codeEditor: { /** Select the text editor component used by the editor. - * Defaults to "ace", but can be set to "ace" or "monaco" + * As of Node-RED V3, this defaults to "monaco", but can be set to "ace" if desired */ - lib: "ace", + lib: "monaco", options: { /** The follow options only apply if the editor is set to "monaco" * @@ -371,7 +371,7 @@ module.exports = { */ theme: "vs", /** other overrides can be set e.g. fontSize, fontFamily, fontLigatures etc. - * for the full list, see https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.istandaloneeditorconstructionoptions.html + * for the full list, see https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IStandaloneEditorConstructionOptions.html */ //fontSize: 14, //fontFamily: "Cascadia Code, Fira Code, Consolas, 'Courier New', monospace",
12
diff --git a/lib/classes/Variables.js b/lib/classes/Variables.js @@ -35,20 +35,20 @@ class Variables { this.service.provider.variableSyntax = true; this.serverless.service.serverless = null; - const promises = []; + const populateAll = []; _.deepMapValues(this.service, (property, propertyPath) => { if (typeof property === 'string') { - const newPromise = new Promise((resolve) => this + const populateSingleProperty = new Promise((resolve) => this .populateProperty(property, true).then(newProperty => { _.set(this.service, propertyPath, newProperty); return resolve(); })); - promises.push(newPromise); + populateAll.push(populateSingleProperty); } }); - return Promise.all(promises).then(() => { + return Promise.all(populateAll).then(() => { this.service.provider.variableSyntax = variableSyntaxProperty; this.serverless.service.serverless = this.serverless; console.log(this.service) @@ -63,7 +63,7 @@ class Variables { } else { property = _.cloneDeep(propertyParam); } - const promises = []; + const allValuesToPopulate = []; if (typeof property === 'string' && property.match(this.variableSyntax)) { property.match(this.variableSyntax).forEach((matchedString) => { @@ -71,7 +71,7 @@ class Variables { .replace(this.variableSyntax, (match, varName) => varName.trim()) .replace(/\s/g, ''); - const newPromise = new Promise((resolve) => { + const singleValueToPopulate = new Promise((resolve) => { if (variableString.match(this.overwriteSyntax)) { return this.overwrite(variableString) .then(valueToPopulate => resolve(valueToPopulate)); @@ -80,7 +80,7 @@ class Variables { .then(valueToPopulate => resolve(valueToPopulate)); }); - newPromise.then(valueToPopulate => { + singleValueToPopulate.then(valueToPopulate => { this.warnIfNotFound(variableString, valueToPopulate); return this.populateVariable(property, matchedString, valueToPopulate) .then(newProperty => { @@ -89,9 +89,9 @@ class Variables { }); }); - promises.push(newPromise); + allValuesToPopulate.push(singleValueToPopulate); }); - return Promise.all(promises).then(() => { + return Promise.all(allValuesToPopulate).then(() => { if (property !== this.service) { return this.populateProperty(property); } @@ -129,9 +129,9 @@ class Variables { overwrite(variableStringsString) { let finalValue; const variableStringsArray = variableStringsString.split(','); - const promises = variableStringsArray + const allValuesFromSource = variableStringsArray .map(variableString => this.getValueFromSource(variableString)); - return Promise.all(promises).then(valuesFromSources => { + return Promise.all(allValuesFromSource).then(valuesFromSources => { valuesFromSources.find(valueFromSource => { finalValue = valueFromSource; return (finalValue !== null && typeof finalValue !== 'undefined') &&
10
diff --git a/layout/get-involved/get-involved-component.js b/layout/get-involved/get-involved-component.js @@ -97,9 +97,9 @@ class GetInvolvedComponent extends React.PureComponent { bgImage="/static/images/backgrounds/computer.jpg" overlay > - <p className="-claim"> + <h2> Save visualizations, subscribe to alerts and enjoy the full experience - </p> + </h2> <Link to="log-in"> <a className="c-button -alt -primary"> Sign up
14
diff --git a/src/index.js b/src/index.js @@ -153,14 +153,11 @@ const idyll = (inputPath, opts, cb) => { const getComponents = (ast) => { const ignoreNames = ['var', 'data', 'meta', 'derived']; - // component node names begin with capital letters const componentNodes = getNodesByName(s => !ignoreNames.includes(s), ast); return componentNodes.reduce( (acc, node) => { const name = changeCase.paramCase(node[0]); - const props = node[1]; - const children = node[2] || []; if (!acc[name]) { if (inputConfig.components[name]) {
2
diff --git a/player/js/elements/svgElements/SVGBaseElement.js b/player/js/elements/svgElements/SVGBaseElement.js @@ -94,6 +94,12 @@ SVGBaseElement.prototype = { this.renderableEffectsManager = new SVGEffects(this); }, getMatte: function (matteType) { + // This should not be a common case. But for backward compatibility, we'll create the matte object. + // It solves animations that have two consecutive layers marked as matte masks. + // Which is an undefined behavior in AE. + if (!this.matteMasks) { + this.matteMasks = {}; + } if (!this.matteMasks[matteType]) { var id = this.layerId + '_' + matteType; var filId;
1
diff --git a/web/index.js b/web/index.js @@ -38,17 +38,13 @@ let createIndex=function(obj) { let indicators=$(".carousel-indicators"); let topmenu=$("#topappmenu"); - let bb=$(`<div align="center" style="padding:15px; right:5.5vw; top:570px; border-radius:30px;background-color:#221100; z-index:5000; position: absolute; color:#ffffff"> - Version: ${bisdate}</div>`); - - $('body').append(bb); - indicators.empty(); let keys=Object.keys(obj); let max=keys.length; let imagestring=""; let menustring=""; + let indstring=""; for (let i=0;i<max;i++) { let elem=obj[keys[i]]; @@ -65,7 +61,7 @@ let createIndex=function(obj) { if (i===0) cname=" active"; - let a=`<div class="item${cname}"><a href="${url}" target="_blank"><img src="${picture}" alt="${title}"><div class="carousel-caption">${description}</div></div>`; + let a=`<div class="item${cname}"><a href="${url}" target="_blank"><img src="${picture}" alt="${title}"><div class="carousel-caption">${i+1}. ${description}</div></div>`; imagestring+=a; menustring+=`<li><a href="${url}" target="_blank" role="button">${title}</a></li>`; @@ -74,7 +70,7 @@ let createIndex=function(obj) { if (i===0) b+='class="active"'; b+="></li>"; - indicators.append($(b)); + indstring+=b; } } @@ -83,20 +79,28 @@ let createIndex=function(obj) { topmenu.empty(); topmenu.append($(menustring)); + indicators.empty(); + indicators.append($(indstring)); + if (typeof window.BIS !=='undefined') $("#devmenu").append(`<li><a href="./biswebtest.html" target="_blank">Run Regression Tests</a></li>`); else $("#devmenu").append(`<li><a href="./test/biswebtest.html" target="_blank">Run Regression Tests</a></li>`); + let bb=$(`<div align="center" style="padding:15px; right:5.5vw; top:570px; border-radius:30px;background-color:#221100; z-index:5000; position: absolute; color:#ffffff"> + Version: ${bisdate}</div>`); + $('body').append(bb); + }; let initialize=function() { - setTimeout( - createIndex(tools.tools), - 10); + setTimeout( () => { + createIndex(tools.tools); + $('.carousel').carousel({ interval : 1000, wrap : true }); + }, 10); // Remove all previous alerts -- only one is needed @@ -113,23 +117,15 @@ let initialize=function() { }, 20000); - $('.carousel').carousel({ - interval : 4000, - wrap : true - }); - $('body').css({"background-color":"rgb(28,45,64)"}); -}; - - -class ApplicationSelectorElement extends HTMLElement { +}; - connectedCallback() { +window.onload = (() => { + $('body').css({"background-color":"rgb(28,45,64)"}); initialize(); - } -} +}); + -window.customElements.define('bisweb-applicationselector', ApplicationSelectorElement);
2
diff --git a/packages/idyll-components/src/scroller.js b/packages/idyll-components/src/scroller.js @@ -12,7 +12,7 @@ const styles = { height: '100vh', width: '100%', transform: `translate3d(0, 0, 0)`, - zIndex: -1 + zIndex: -1, }, SCROLL_GRAPHIC_INNER: { @@ -22,8 +22,7 @@ const styles = { right: 0, top: '50%', transform: 'translateY(-50%)', - objectFit: 'cover', - backgroundColor: 'blue', // for debugging, + objectFit: 'cover', // TODO might remove } }
13
diff --git a/src/widgets/histogram/chart.js b/src/widgets/histogram/chart.js @@ -1066,8 +1066,9 @@ module.exports = cdb.core.View.extend({ _moveHandle: function (position, selector) { var handle = this.chart.select('.CDB-Chart-handle-' + selector); - var x = this.xScale(position) - this.options.handleWidth / 2; - var display = (position >= 0 && position <= 100) ? 'inline' : 'none'; + var fixedPosition = position.toFixed(5); + var x = this.xScale(fixedPosition) - this.options.handleWidth / 2; + var display = (fixedPosition >= 0 && fixedPosition <= 100) ? 'inline' : 'none'; handle .style('display', display)
1
diff --git a/src/index.test.js b/src/index.test.js import ReduxSagaFirebase from './index' describe('ReduxSagaFirebase', () => { - it('takes a firebase app as argument', () => { + describe('constructor(firebaseApp)', () => { const app = 'kqdlqkd' - const rsf = new ReduxSagaFirebase(app) + let rsf + + beforeEach(() => { + rsf = new ReduxSagaFirebase(app) + }) + it('takes a firebase app as argument', () => { expect(rsf.app).toBe(app) }) it('defines authentication methods', () => { - const app = 'kqdlqkd' - const rsf = new ReduxSagaFirebase(app) - expect(rsf.login).toBeInstanceOf(Function) expect(rsf.logout).toBeInstanceOf(Function) expect(rsf.authChannel).toBeInstanceOf(Function) }) + + it('defines database methods', () => { + expect(rsf.get).toBeInstanceOf(Function) + expect(rsf.create).toBeInstanceOf(Function) + expect(rsf.update).toBeInstanceOf(Function) + expect(rsf.patch).toBeInstanceOf(Function) + expect(rsf.delete).toBeInstanceOf(Function) + expect(rsf.channel).toBeInstanceOf(Function) + }) + }) })
7
diff --git a/package.json b/package.json "devDependencies": { "@11ty/eleventy-plugin-syntaxhighlight": "^2.0.3", "ava": "^2.2.0", - "lint-staged": "^8.2.1", + "lint-staged": "^9.2.5", "markdown-it-emoji": "^1.4.0", "nyc": "^14.1.1", "pre-commit": "^1.2.2", "pre-push": "^0.1.1", "prettier": "^1.18.2", - "rimraf": "^2.6.3", + "rimraf": "^3.0.0", "toml": "^3.0.0", "viperhtml": "^2.17.0", "vue": "^2.6.10", "dependencies": { "browser-sync": "^2.26.7", "chalk": "^2.4.2", - "chokidar": "^2.1.5", + "chokidar": "^3.0.2", "debug": "^4.1.1", "dependency-graph": "^0.8.0", - "dependency-tree": "^6.3.0", + "dependency-tree": "^7.0.2", "ejs": "^2.6.2", "fast-glob": "^3.0.4", - "fs-extra": "^7.0.1", + "fs-extra": "^8.1.0", "gray-matter": "^4.0.2", "hamljs": "^0.6.2", "handlebars": "^4.1.2", "markdown-it": "^8.4.2", "minimist": "^1.2.0", "moo": "^0.5.0", - "multimatch": "^3.0.0", + "multimatch": "^4.0.0", "mustache": "^2.3.0", "normalize-path": "^3.0.0", "nunjucks": "^3.2.0",
3
diff --git a/articles/custom-domains/self-managed-certificates.md b/articles/custom-domains/self-managed-certificates.md @@ -19,7 +19,7 @@ useCase: Custom Domains with the **Self-Managed Certificates** option is available for Auth0 Enterprise customers only. ::: -You can choose to manage the certificates for your custom domains yourself, which means that you are responsible for managing your SSL/TLS certificates and configuring a reverse proxy to handle SSL termination and forwarding requests to Auth0. +If you choose to manage the certificates for your custom domains yourself, it requires multiple DNS records on the domain. You have to purchase or provide the certificates from any known Certificate Authority and manage the renewals yourself. You will also need a reverse proxy, where the certificate will be installed. Once the domain is verified, we will accept traffic from the proxy. Choose this option if:
3
diff --git a/spec/requests/superadmin/users_spec.rb b/spec/requests/superadmin/users_spec.rb @@ -587,9 +587,7 @@ feature "Superadmin's users API" do user = FactoryGirl.create(:user) user.save - payload = { - user: { - gcloud_settings: { + expected_gcloud_settings = { service_account: { type: 'service_account', project_id: 'my_project_id', @@ -601,14 +599,23 @@ feature "Superadmin's users API" do gcs_bucket: 'my_gcs_bucket', bq_dataset: 'my_bq_dataset' } + + payload = { + user: { + gcloud_settings: expected_gcloud_settings } } put superadmin_user_url(user.id), payload.to_json, superadmin_headers - user_gcloud_settings = $users_metadata.hgetall("do_settings:#{user.username}:#{user.api_key}") - user_gcloud_settings.should == payload[:user][:gcloud_settings] - end + redis_gcloud_settings = $users_metadata.hgetall("do_settings:#{user.username}:#{user.api_key}").symbolize_keys + redis_gcloud_settings[:service_account].should == expected_gcloud_settings[:service_account].to_json + redis_gcloud_settings[:bq_public_project].should == expected_gcloud_settings[:bq_public_project] + redis_gcloud_settings[:gcp_execution_project].should == expected_gcloud_settings[:gcp_execution_project] + redis_gcloud_settings[:bq_project].should == expected_gcloud_settings[:bq_project] + redis_gcloud_settings[:gcs_bucket].should == expected_gcloud_settings[:gcs_bucket] + redis_gcloud_settings[:bq_dataset].should == expected_gcloud_settings[:bq_dataset] + end end describe '#destroy' do
1
diff --git a/README.md b/README.md @@ -50,7 +50,7 @@ dashes, for example `node6-macos-x64` or `node4-linux-armv6`: You may omit any element (and specify just `node6` for example). The omitted elements will be taken from current platform or -system-wide Node.js installation (it's version and arch). +system-wide Node.js installation (its version and arch). There is also an alias `host`, that means that all 3 elements are taken from current platform/Node.js. By default targets are `linux,macos,win` for current Node.js version and arch.
1
diff --git a/src/web/widgets/Marlin/index.jsx b/src/web/widgets/Marlin/index.jsx @@ -135,12 +135,21 @@ class MarlinWidget extends PureComponent { }, changeHeatedBedTemperature: (event) => { const value = event.target.value; + if (typeof value === 'string' && value.trim() === '') { this.setState(state => ({ heater: { ...state.heater, heatedBed: value } })); + } else { + this.setState(state => ({ + heater: { + ...state.heater, + heatedBed: ensurePositiveNumber(value) + } + })); + } } }; controllerEvents = {
1
diff --git a/addons/dexie-export-import/README.md b/addons/dexie-export-import/README.md @@ -10,6 +10,33 @@ npm install dexie npm install dexie-export-import ``` +# Usage + +Here's the basic usage. There's a lot you can do by supplying optional `[options]` arguments. The available options are described later on in this README (See Typescript interfaces below). + +*NOTE:* Typescript users using [email protected] will get compilation errors if using the static import method `Dexie.import()`. + +```js +import Dexie from "dexie"; +import "dexie-export-import"; + +// +// Import from Blob or File to Dexie instance: +// +const db = await Dexie.import(blob, [options]); + +// +// Export to Blob +// +const blob = await db.export([options]); + +// +// Import from Blob or File to existing Dexie instance +// +await db.import(blob, [options]); + +``` + # Features * Export of IndexedDB Database to JSON Blob. @@ -26,6 +53,16 @@ npm install dexie-export-import * Can well be run from a Web Worker (better speed + doesn't lock GUI). * Can also export IndexedDB databases that was not created with Dexie. +# Compatibility + +| Product | Required version | +| ------- | ------------------------- | +| dexie | ^2.0.4 and ^3.0.0-alpha.5 | +| Safari | ^10.1 | +| IE | ^11 | +| Chrome | any version | +| FF | any version | + # Similar Libraries ## [indexeddb-export-import](https://github.com/Polarisation/indexeddb-export-import) @@ -38,34 +75,7 @@ Much smaller in size, but also much lighter than dexie-export-import. Dexie-export-import was build to scale when exporting large databases without consuming much RAM. It does also support importing/exporting exotic types. -# Usage - -Here's the basic usage. There's a lot you can do by supplying optional `[options]` arguments. The available options are described later on in this README (See Typescript interfaces below). - -*NOTE:* Typescript users using [email protected] will get compilation errors if using the static import method `Dexie.import()`. - -```js -import Dexie from "dexie"; -import "dexie-export-import"; - -// -// Import from Blob or File to Dexie instance: -// -const db = await Dexie.import(blob, [options]); - -// -// Export to Blob -// -const blob = await db.export([options]); - -// -// Import from Blob or File to existing Dexie instance -// -await db.import(blob, [options]); - -``` - -# Extended Dexie Interface +# Interface Importing this module will extend Dexie and Dexie.prototype as follows. Even though this is conceptually a Dexie.js addon, there is no addon instance. @@ -88,18 +98,9 @@ declare module 'dexie' { } ``` -# Compatibility - -| Product | Required version | -| ------- | ------------------------- | -| dexie | ^2.0.4 and ^3.0.0-alpha.5 | -| Safari | ^10.1 | -| IE | ^11 | -| Chrome | any version | -| FF | any version | +## StaticImportOptions and ImportOptions - -## Import Options +These are the interfaces of the `options` optional arguments to Dexie.import() and Dexie.prototype.import(). All options are optional and defaults to undefined (falsy). ```ts export interface StaticImportOptions { @@ -126,6 +127,8 @@ export interface ImportOptions extends StaticImportOptions { ## ImportProgress +This is the interface sent to the progressCallback. + ```ts export interface ImportProgress { totalTables: number; @@ -138,6 +141,8 @@ export interface ImportProgress { ## ExportOptions +This is the interface of the `options` optional arguments to Dexie.prototype.export(). All options are optional and defaults to undefined (falsy). + ```ts export interface ExportOptions { noTransaction?: boolean; @@ -150,6 +155,8 @@ export interface ExportOptions { ## ExportProgress +This is the interface sent to the ExportOptions.progressCallback. + ```ts export interface ExportProgress { totalTables: number; @@ -161,6 +168,9 @@ export interface ExportProgress { ``` ## Defaults + +These are the default chunk sizes used when not specified in the options object. We allow quite large chunks, but still not that large (1MB RAM is not much even for a small device). + ```ts const DEFAULT_KILOBYTES_PER_CHUNK = 1024; // When importing blob const DEFAULT_ROWS_PER_CHUNK = 2000; // When exporting db
7
diff --git a/node-red-contrib-bot-message/bot-send-card.js b/node-red-contrib-bot-message/bot-send-card.js @@ -305,9 +305,12 @@ const buildReplyAdaptiveCard = (locale, data, config, reply) => { //reply.body.push({"type": "TextBlock", "text": textToShow, "size": "default", "wrap": true}); buildAdaptiveCardJson(textToShow, reply.body, separator); +<<<<<<< HEAD // AAAAAAAAAAAAAAAAA Maybe this //buildAdaptiveCardJson(tmp, reply.actions[0].card.body, '**'); +======= +>>>>>>> Replacing magic string ** everywhere with separator } }; @@ -627,9 +630,9 @@ const buildAdaptiveCardJson = function(whole, body, separator) { console.log("Enter buildAdaptiveCardJson"); console.log("Whole " + whole); console.log("Body " + body); - whole.split(' **').forEach((part, index) => { + whole.split(' '+ separator).forEach((part, index) => { if (index === 0) { - if (part.startsWith(' **', 0)) { // begins with title directly + if (part.startsWith(' '+ separator, 0)) { // begins with title directly body.push({ "type": "Container", "items": [ @@ -672,7 +675,7 @@ const buildAdaptiveCardJson = function(whole, body, separator) { "type": "TextBlock", "wrap": true, "size": "default", - "text": '**' + line // memory + "text": separator + line // memory } ]}); } else {
14
diff --git a/src/components/draftjs-editor/index.js b/src/components/draftjs-editor/index.js @@ -199,6 +199,7 @@ class Editor extends React.Component<Props, State> { autoCapitalize="sentences" autoComplete="on" autoCorrect="on" + stripPastedStyles={true} decorators={[mentionsDecorator]} {...rest} /> @@ -279,6 +280,7 @@ class Editor extends React.Component<Props, State> { autoCapitalize="sentences" autoComplete="on" autoCorrect="on" + stripPastedStyles={true} decorators={[mentionsDecorator]} {...rest} />
12
diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js */ render: function (updateLi) { var that = this, - notDisabled; + notDisabled, + $selectOptions = this.$element.find('option'); //Update the LI to match the SELECT if (updateLi !== false) { - this.$element.find('option').each(function (index) { + $selectOptions.each(function (index) { var $lis = that.findLis().eq(that.liObj[index]); that.setDisabled(index, this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled, $lis); this.tabIndex(); - var selectedItems = this.$element.find('option').map(function () { + var selectedItems = $selectOptions.map(function () { if (this.selected) { if (that.options.hideDisabled && (this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled)) return; var max = this.options.selectedTextFormat.split('>'); if ((max.length > 1 && selectedItems.length > max[1]) || (max.length == 1 && selectedItems.length >= 2)) { notDisabled = this.options.hideDisabled ? ', [disabled]' : ''; - var totalCount = this.$element.find('option').not('[data-divider="true"], [data-hidden="true"]' + notDisabled).length, + var totalCount = $selectOptions.not('[data-divider="true"], [data-hidden="true"]' + notDisabled).length, tr8nText = (typeof this.options.countSelectedText === 'function') ? this.options.countSelectedText(selectedItems.length, totalCount) : this.options.countSelectedText; title = tr8nText.replace('{0}', selectedItems.length.toString()).replace('{1}', totalCount.toString()); }
4
diff --git a/server.ts b/server.ts @@ -141,8 +141,8 @@ function request(req, res) { } function wavesClientConfig(req, res, next) { - const cookies = parseCookie(req.headers.cookie); - const connection: string | null = cookies ? cookies.connection : null; + const parsedCookie = parseCookie(req.headers.cookie); + const connection: string | null = parsedCookie ? parsedCookie.connection : null; if (!req.url.includes('waves-client-config') || !connection) { next();
10
diff --git a/index.css b/index.css @@ -594,12 +594,12 @@ header.builtin.import .wallet.import, header.builtin.locked .wallet.locked, head right: 0; bottom: 0; width: 100vw; - height: 200px; + min-height: 200px; /* padding: 20px; */ background-color: #111; color: #FFF; - /* box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08); - overflow: auto; */ + /* box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08); */ + overflow: auto; } .subpage:not(.open) {
0
diff --git a/src/schema/validate.js b/src/schema/validate.js @@ -75,11 +75,9 @@ function runValidate(exception, map, schema, originalValue, options) { } else if (schema.oneOf) { if (schema.discriminator) { - const data = schema.discriminate(value, true); - const subSchema = data.schema; - const key = data.key; + const { name, key, schema: subSchema } = schema.discriminate(value, true); if (!subSchema) { - exception.message('Discriminator property "' + key + '" as "' + value[key] + '" did not map to a schema'); + exception.message('Discriminator property "' + key + '" as "' + name + '" did not map to a schema'); } else { runValidate(exception.at(value[key]), map, subSchema, value, options); } @@ -201,7 +199,7 @@ function runValidate(exception, map, schema, originalValue, options) { if (details.schema) { runValidate(exception, map, details.schema, value, options); } else if (name) { - exception.message('The value "' + name + '" is not valid for "' + key + '" because it has no associated schema'); + exception.message('Discriminator property "' + key + '" as "' + name + '" did not map to a schema'); } // else - already taken care of because it's a missing required error } }
7
diff --git a/src/codemirror-maputnik.css b/src/codemirror-maputnik.css } .cm-s-maputnik .CodeMirror-cursor { - border-left: solid thin #8e8e8e !important; + border-left: solid thin #f0f0f0 !important; } .cm-s-maputnik.CodeMirror-focused div.CodeMirror-selected { } .cm-s-maputnik .CodeMirror-matchingbracket { + background-color: #f0f0f0; + color: #565659 !important; +} + +.cm-s-maputnik .CodeMirror-nonmatchingbracket { + background-color: #bb0000; color: white !important; }
7
diff --git a/src/helpers/file_helper.js b/src/helpers/file_helper.js @@ -89,7 +89,7 @@ export function orientImage(img, maxW, maxH, orientation) { canvas.width = width canvas.height = height const ctx = canvas.getContext('2d') - ctx.fillStyle = 'white' + ctx.fillStyle = 'transparent' ctx.fillRect(0, 0, canvas.width, canvas.height) switch (transform) {
11
diff --git a/src/moto/space.js b/src/moto/space.js }); camera = ortho ? new THREE.OrthographicCamera(-100 * aspect(), 100 * aspect(), 100, -100, 0.1, 100000) : - new THREE.PerspectiveCamera(perspective, aspect(), 5, 100000); + new THREE.PerspectiveCamera(perspective, aspect(), 0.1, 100000); camera.position.set(0, 200, 340); renderer.setSize(width(), height());
11
diff --git a/components/bases-locales/charte/searched-partners-results.js b/components/bases-locales/charte/searched-partners-results.js @@ -7,18 +7,14 @@ import Notification from '@/components/notification' import theme from '@/styles/theme' function SearchPartnersResults({companies, organizations}) { - const [isCompaniesVisible, setIsCompaniesVisible] = useState(false) + const [isCompaniesVisible, setIsCompaniesVisible] = useState(organizations.length === 0) const onCompaniesVisible = () => { setIsCompaniesVisible(!isCompaniesVisible) } useEffect(() => { - if (organizations.length === 0) { - setIsCompaniesVisible(true) - } else { - setIsCompaniesVisible(false) - } + setIsCompaniesVisible(organizations.length === 0) }, [organizations]) return (
7
diff --git a/packages/neutrine/src/layout/appside/index.js b/packages/neutrine/src/layout/appside/index.js @@ -2,53 +2,53 @@ import React from "react"; import {Icon} from "../../icon/index.js"; import * as helpers from "../../helpers.js"; -//Import toolbar styles +//Import appside styles import "./style.scss"; //Base class -let baseClass = "neutrine-toolbar"; +let baseClass = "neutrine-appside"; -//Export toolbar wrapper component -export const ToolbarWrapper = function (props) { - //Toolbar class styles +//Export appside wrapper component +export const AppsideWrapper = function (props) { + //Appside class styles let classList = [baseClass + "-wrapper"]; - //Check if toolbar is collapsed + //Check if appside is collapsed if (props.collapsed === true) { classList.push(baseClass + "-wrapper--collapsed"); } - //Return the toolbar element + //Return the appside element return React.createElement("div", {"className": classList.join(" ")}, props.children); }; -//Toolbar wrapper default props -ToolbarWrapper.defaultProps = { +//Appside wrapper default props +AppsideWrapper.defaultProps = { "collapsed": true }; -//Export toolbar component -export const Toolbar = function (props) { +//Export appside component +export const Appside = function (props) { //Sidebar base class styles let classList = [baseClass]; - //Check the toolbar color + //Check the appside color if (props.color === "light" || props.color === "dark") { classList.push(baseClass + "--" + props.color); } - //Build toolbar props - let toolbarProps = { + //Build appside props + let appsideProps = { "className": helpers.classNames(classList, props.className), "style": props.style }; - //Return the toolbar component - return React.createElement("div", toolbarProps, props.children); + //Return the appside component + return React.createElement("div", appsideProps, props.children); }; -//Toolbar default props -Toolbar.defaultProps = { +//Appside default props +Appside.defaultProps = { "color": "light" }; -//Toolbar toggle -export const ToolbarToggle = function (props) { +//Appside toggle +export const AppsideToggle = function (props) { //Build the sidebar toggle props let toggleProps = { "align": "center", @@ -64,8 +64,8 @@ export const ToolbarToggle = function (props) { return React.createElement("div", toggleProps, toggleIcon); }; -//Toolbar item -export const ToolbarItem = function (props) { +//Appside item +export const AppsideItem = function (props) { //Initialize the button props let itemProps = { "className": [baseClass + "-item"], @@ -86,37 +86,37 @@ export const ToolbarItem = function (props) { } //Merge the classnames itemProps.className = itemProps.className.join(" "); - //Return the toolbar item element + //Return the appside item element return React.createElement("div", itemProps, icon, props.text); }; -//Toolbar item default props -ToolbarItem.defaultProps = { +//Appside item default props +AppsideItem.defaultProps = { "text": "", "icon": null, "active": false, "onClick": null, }; -//Toolbar separator -export const ToolbarSeparator = function (props) { +//Appside separator +export const AppsideSeparator = function (props) { return React.createElement("div", { "className": baseClass + "-separator" }); }; -//Toolbar group -export const ToolbarGroup = function (props) { - //Toolbar group default props +//Appside group +export const AppsideGroup = function (props) { + //Appside group default props let groupProps = { "className": baseClass + "-group" }; - //Return the toolbar group element + //Return the appside group element return React.createElement("div", groupProps, props.text); }; -//Toolbar group default props -ToolbarGroup.defaultProps = { +//Appside group default props +AppsideGroup.defaultProps = { "text": null };
10
diff --git a/README.md b/README.md @@ -73,18 +73,7 @@ npm run dev npm run prod ``` -Once the server has started up, you can visit https://localhost:3000 - -##### Local Development With HTTPS - -<img align=right style='margin: 1em' src="/docs/https.png" width=20% /> -Your browser might throw an error if you don't have your certificates set up properly. - -You can ignore it and continue by clicking "Advanced" in Chromium, or by typing 'thisisunsafe' directly into the window if you are on Chrome. - -##### Better HTTPS Development Using Hosts File - -A better option is to modify your hosts file. Instructions on how to do that are located [here](https://docs.webaverse.com/docs/engineering/setup-custom-host) +Once the server has started up, you can visit: https://local.webaverse.com:3000 ## Let's build it together!
2
diff --git a/token-metadata/0x037A54AaB062628C9Bbae1FDB1583c195585fe41/metadata.json b/token-metadata/0x037A54AaB062628C9Bbae1FDB1583c195585fe41/metadata.json "symbol": "LCX", "address": "0x037A54AaB062628C9Bbae1FDB1583c195585fe41", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/login.js b/login.js @@ -170,6 +170,8 @@ async function tryLogin() { }; async function bindLogin() { const loginForm = document.getElementById('login-form'); + const loginEmail = document.getElementById('login-email'); + loginForm.classList.add('login-form'); loginForm.innerHTML = ` <div class=phase-content>
0
diff --git a/data.js b/data.js @@ -3866,6 +3866,13 @@ module.exports = [ description: "A micro dependency injection framework inspired by Spring. Simple and to the point.", source: "https://raw.githubusercontent.com/shiftyp/hypo/master/dist/hypo.src.js" }, + { + name: "Spotlight", + tags: ["image", "images", "responsive", "photo", "slideshow", "carousel", "gallery", "slider", "lightbox"], + description: "A cross-browser responsive image gallery without dependencies.", + url: "https://github.com/nextapps-de/spotlight", + source: "https://raw.githubusercontent.com/nextapps-de/spotlight/0.6.3/dist/spotlight.micro.js" + }, { name: "pubsub.js", tags: ["events", "pubsub", "publish", "subscribe", "node", "rhino", "amd", "commonjs", "titanium"],
0
diff --git a/packages/gatsby/src/internal-plugins/query-runner/query-watcher.js b/packages/gatsby/src/internal-plugins/query-runner/query-watcher.js @@ -33,7 +33,7 @@ exports.extractQueries = () => { }) } else { report.warn( - `GraphQL query in component "${component}" will not be run!` + `The GraphQL query in the non-page component "${component}" will not be run.` ) queryWillNotRun = true }
7
diff --git a/src/traces/scatter3d/convert.js b/src/traces/scatter3d/convert.js @@ -147,11 +147,11 @@ function parseAlignmentY(a) { (a.indexOf('bottom') > -1) ? 1 : 0; } -function calculateTextOffset(tp, dflt) { +function calculateTextOffset(tp) { // Read out text properties - var defaultAlignmentX = parseAlignmentX(dflt); - var defaultAlignmentY = parseAlignmentY(dflt); + var defaultAlignmentX = 0; + var defaultAlignmentY = 0; var textOffset = [ defaultAlignmentX, @@ -266,7 +266,7 @@ function convertPlotlyOptions(scene, data) { } if('textposition' in data) { - params.textOffset = calculateTextOffset(data.textposition, data.dflt); + params.textOffset = calculateTextOffset(data.textposition); params.textColor = formatColor(data.textfont, 1, len); params.textSize = formatParam(data.textfont.size, len, Lib.identity, 12); params.textFont = data.textfont.family; // arrayOk === false
2
diff --git a/src/og/shaders/ray.js b/src/og/shaders/ray.js @@ -45,8 +45,9 @@ export function rayScreen() { uniform vec3 eyePositionLow; uniform float resolution; + const float C = 0.1; const float far = 149.6e+9; - const float Fcoef = 2.0 / log2(far + 1.0); + float logc = 2.0 / log( C * far + 1.0 ); void main() { @@ -75,6 +76,7 @@ export function rayScreen() { vec4 pos = viewMatrixRTE * vec4(highDiff + lowDiff, 1.0); gl_Position = projectionMatrix * pos; + gl_Position.z = ( log( C * gl_Position.w + 1.0 ) * logc - 1.0 ) * gl_Position.w; }`, fragmentShader: `precision highp float;
0
diff --git a/test/jasmine/tests/bar_test.js b/test/jasmine/tests/bar_test.js @@ -2870,6 +2870,67 @@ describe('bar tweening', function() { .catch(failTest) .then(done); }); + + it('blank vertical bars', function(done) { + var mockCopy = { + data: [{ + type: 'bar', + x: ['A', 'B', 'C'], + y: [null, 5, 3], + marker: { + line: { + width: 10 + } + } + }], + layout: { + width: 400, + height: 300 + } + }; + + var tests = [ + [0, '.point path', 'attr', 'd', ['M8,120V120H72V120Z', 'M88,120V6H152V120Z', 'M168,120V52H232V120Z']], + [300, '.point path', 'attr', 'd', ['M8,120V52H72V120Z', 'M88,120V74H152V120Z', 'M168,120V65H232V120Z']], + [600, '.point path', 'attr', 'd', ['M8,120V6H72V120Z', 'M88,120V120H152V120Z', 'M168,120V74H232V120Z']] + ]; + var animateOpts = {data: [{y: [5, null, 2]}]}; + + checkTransition(gd, mockCopy, animateOpts, transitionOpts, tests) + .catch(failTest) + .then(done); + }); + + it('blank horizontal bars', function(done) { + var mockCopy = { + data: [{ + type: 'bar', + orientation: 'h', + y: ['A', 'B', 'C'], + x: [null, 5, 3], + marker: { + line: { + width: 10 + } + } + }], + layout: { + width: 400, + height: 300 + } + }; + + var tests = [ + [0, '.point path', 'attr', 'd', ['M0,116V84H0V116Z', 'M0,76V44H228V76Z', 'M0,36V4H137V36Z']], + [300, '.point path', 'attr', 'd', ['M0,116V84H137V116Z', 'M0,76V44H91V76Z', 'M0,36V4H109V36Z']], + [600, '.point path', 'attr', 'd', ['M0,116V84H228V116Z', 'M0,76V44H0V76Z', 'M0,36V4H91V36Z']] + ]; + var animateOpts = {data: [{x: [5, null, 2]}]}; + + checkTransition(gd, mockCopy, animateOpts, transitionOpts, tests) + .catch(failTest) + .then(done); + }); }); describe('bar uniformtext', function() {
0
diff --git a/src/apps.json b/src/apps.json "CRLT.CONFIG.ASMJS_NAME": "" }, "script": [ - "^(?:https):?//crypto-loot\\.com/lib/", - "^(?:https):?//webmine\\.pro/", - "^(?:https):?//cryptoloot\\.pro/", + "^/crypto-loot\\.com/lib/", + "^/webmine\\.pro/", + "^/cryptoloot\\.pro/", "/crlt\\.js\\;confidence:75%" ], "icon": "Crypto-Loot.png",
1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml @@ -136,6 +136,7 @@ jobs: shell: bash run: | export DISPLAY=':99.0' + echo ::set-env DISPLAY=FC::':99.0' Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & timeout-minutes: 2
12
diff --git a/src/platforms/web/runtime/directives/model.js b/src/platforms/web/runtime/directives/model.js @@ -28,7 +28,7 @@ export default { if (isIE || isEdge) { setTimeout(cb, 0) } - } else if (vnode.tag === 'textarea' || el.type === 'text') { + } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') { el._vModifiers = binding.modifiers if (!binding.modifiers.lazy) { if (!isAndroid) {
9
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md @@ -122,7 +122,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu * [Daniel Cooper](https://github.com/moodragon46) * [GeoFS](https://www.geo-fs.com) * [Xavier Tassin](https://github.com/xtassin/) - +* [Northrop Grumman](http://www.northropgrumman.com) + * [Joseph Stein](https://github.com/nahgrin) ## [Individual CLA](Documentation/Contributors/CLAs/individual-cla-agi-v1.0.txt) * [Victor Berchet](https://github.com/vicb) * [Caleb Morse](https://github.com/cmorse)
3
diff --git a/package.json b/package.json "name": "@json-editor/json-editor", "title": "JSONEditor", "description": "JSON Schema based editor", - "version": "2.8.0", + "version": "2.7.0", "main": "dist/jsoneditor.js", "author": { "name": "Jeremy Dorn",
13
diff --git a/native/chat/message-list.react.js b/native/chat/message-list.react.js @@ -369,13 +369,14 @@ class InnerMessageList extends React.PureComponent<Props, State> { } componentDidUpdate(prevProps: Props, prevState: State) { - if (!this.state.listDataWithHeights) { + if (!this.loadingFromScroll || !this.state.listDataWithHeights) { return; } if ( !prevState.listDataWithHeights || this.state.listDataWithHeights.length > - prevState.listDataWithHeights.length + prevState.listDataWithHeights.length || + this.props.startReached ) { this.loadingFromScroll = false; }
12
diff --git a/components/textdiff/textdiff.js b/components/textdiff/textdiff.js @@ -141,7 +141,7 @@ TextDiffViewModel.prototype.render = function(isInvalidate) { return self.getDiffJson(); } }).then(function() { - if (self.diffJson.length == 0) return; // check if diffs are available (binary files do not support them) + if (!self.diffJson || self.diffJson.length == 0) return; // check if diffs are available (binary files do not support them) var lineCount = 0; if (!self.diffJson[0].isTrimmed) {
9
diff --git a/README.md b/README.md <p align="center"> - <a href="https://impulso.network/" target="_blank"> - <img alt="Parcel" src="https://impulso.network/assets/images/impulsonetwork-logo.svg" width="350"> + <a href="https://impulso.network/" target="_blank" alt="Impulso Network"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 705.31 111.96" width="350"><defs><style>.cls-2{fill:#26265e}</style></defs> <g id="Camada_2" data-name="Camada 2"> <g id="_1._IMPULSONETWORK" data-name="1. Impsulo Network"> <path d="M385.13 81.07l-2.24 2.24a2.26 2.26 0 1 1-3.2-3.19l2.24-2.24a2.26 2.26 0 0 1 3.2 3.19m-14.39-1.59a2.24 2.24 0 0 0-3.19 0l-2.24 2.23a2.26 2.26 0 1 0 3.2 3.2l2.23-2.24a2.24 2.24 0 0 0 0-3.19m27.88-11.91l.25-.24a11.3 11.3 0 0 0-16-16c-.15.15-.3.31-.43.46l-.21.18-12.12 12.17a2.26 2.26 0 0 0 3.19 3.19l5.11-5.11a2.26 2.26 0 0 1 3.2 3.19l-.16.16-9.11 9.11a2.26 2.26 0 0 0 3.2 3.2l9.27-9.27a2.26 2.26 0 0 1 3.19 3.2l-1.28 1.28a2.26 2.26 0 0 0 3.2 3.19l8.63-8.63.07-.08" fill="#ee3e25"/> <path class="cls-2" d="M0 12.51A12.51 12.51 0 1 1 12.51 25 12.47 12.47 0 0 1 0 12.51M413.23 37a31.39 31.39 0 0 0-52.51 30.32l19.17-19.18a15.69 15.69 0 0 1 22.19 22.19L382.91 89.5A31.39 31.39 0 0 0 413.23 37M4 29.35zM333.39 49c-5.94-.86-7.68-1.11-7.68-2.72 0-1.36 2.36-2.48 5.58-2.48A30 30 0 0 1 346 48a3.84 3.84 0 0 0 4.7-1.15l4.65-8.24a3.78 3.78 0 0 0-1.07-4.8 47.23 47.23 0 0 0-23.08-6c-17.34 0-26.75 9.66-26.75 20.43 0 16.72 15.48 18.82 25.51 20.19 4.83.62 8.42 1.11 8.42 3 0 1.49-1.36 2.6-5.94 2.6-5.55 0-13.48-2.64-18.71-5.67a3.85 3.85 0 0 0-4.68 1.2L303.44 79a3.77 3.77 0 0 0 1.2 4.49c6.74 4.29 17 7.21 26.65 7.21a48.13 48.13 0 0 0 6.51-.42l21.79-21.79c-1-15.71-16.5-18-26.2-19.4m-34.06 36.32v-75a3.82 3.82 0 0 0-3.76-3.82h-14.76a3.77 3.77 0 0 0-3.81 3.74v75a3.84 3.84 0 0 0 3.77 3.83h14.76a3.76 3.76 0 0 0 3.76-3.76m-30-51.63v-.6a3.84 3.84 0 0 0-3.76-3.83h-14.69a3.77 3.77 0 0 0-3.77 3.76v33.16c-1.86 2.1-4.46 4.7-9.41 4.7-5.45 0-8.67-2.35-8.67-8.42V33.18a3.84 3.84 0 0 0-3.77-3.83h-14.76a3.76 3.76 0 0 0-3.76 3.76v39c0 10.28 5.94 18.57 19.81 18.57 10.53 0 17.09-4.33 20.56-8.17v2.88a3.83 3.83 0 0 0 3.67 3.81h15.05a3.76 3.76 0 0 0 3.57-3.76V33.78zM130 85.41V45.82c0-12.38-7.43-17.95-18.46-17.95-9.65 0-17.46 5.32-20.92 10.52-2.69-7.39-8.76-10.52-17.18-10.52-9.66 0-17.21 4.95-19.81 8.29v-2.98a3.84 3.84 0 0 0-3.76-3.83H35.1a3.77 3.77 0 0 0-3.77 3.76v52.23a3.84 3.84 0 0 0 3.77 3.83h14.76a3.76 3.76 0 0 0 3.76-3.77V52.26c1.48-1.73 4.21-4.7 9-4.7 5.07 0 6.81 3.09 6.81 6.68v31.1a3.84 3.84 0 0 0 3.76 3.83H88a3.77 3.77 0 0 0 3.77-3.77V52.26c1.49-1.73 4.21-4.7 9.16-4.7s6.82 3.09 6.82 6.68v31.1a3.84 3.84 0 0 0 3.76 3.83h14.76a3.77 3.77 0 0 0 3.73-3.76m73.11-26.21c0 20.56-11.4 31.45-26.26 31.45a21.19 21.19 0 0 1-16.85-7.8v25.34a3.77 3.77 0 0 1-3.77 3.77h-14.75a3.82 3.82 0 0 1-3.76-3.82v-75a3.76 3.76 0 0 1 3.76-3.77h14.76a3.84 3.84 0 0 1 3.76 3.81v2.49a21 21 0 0 1 16.84-7.8c14.86 0 26.26 10.89 26.26 31.33m-22.79 0c0-7.43-5.2-11.64-11.15-11.64-2.85 0-7.06 1.48-9.16 4.08v15.24c2 2.47 6.31 4.08 9.16 4.08 6 0 11.15-4.21 11.15-11.76M23.65 85.4V33.18a3.84 3.84 0 0 0-3.76-3.83H5.13a3.77 3.77 0 0 0-3.77 3.76v52.23a3.84 3.84 0 0 0 3.77 3.83h14.76a3.76 3.76 0 0 0 3.76-3.77M696.19 91.83H447.86a9.14 9.14 0 0 1-9.12-9.13v-47a9.13 9.13 0 0 1 9.12-9.12h248.33a9.13 9.13 0 0 1 9.12 9.12v47a9.14 9.14 0 0 1-9.12 9.13zM447.86 29.57a6.09 6.09 0 0 0-6.09 6.09v47a6.1 6.1 0 0 0 6.09 6.1h248.33a6.11 6.11 0 0 0 6.09-6.1v-47a6.1 6.1 0 0 0-6.09-6.09z"/> <path class="cls-2" d="M481.76 68.07l-9.29-12.7v12.7h-3.12v-17.8h3.2l9.11 12.36V50.27h3.12v17.8zM501.91 68.07v-17.8h12.21V53H505v4.61h8.89v2.75H505v4.94h9.08v2.75zM534.91 68.07V53h-5.4v-2.73h13.91V53H538v15zM573 68.07l-3.47-13.13-3.45 13.13h-3.34l-5.09-17.8h3.49l3.5 13.73 3.69-13.72h2.48L574.5 64l3.44-13.72h3.5l-5.08 17.8zM595.53 59.18a9.1 9.1 0 1 1 18.2 0 9.1 9.1 0 1 1-18.2 0zm15 0c0-3.68-2.32-6.43-5.9-6.43s-5.9 2.75-5.9 6.43 2.3 6.44 5.9 6.44 5.9-2.78 5.9-6.44zM640.27 68.07l-4-6.64h-3.09v6.64h-3.13v-17.8h7.83c3.52 0 5.82 2.29 5.82 5.58a5 5 0 0 1-4.22 5.23l4.35 7zm.26-12.22a2.8 2.8 0 0 0-3-2.83h-4.27v5.66h4.27a2.81 2.81 0 0 0 3-2.83zM670.86 68.07l-6-7.5-1.55 1.82v5.68h-3.11v-17.8h3.13v8.49l7-8.49h3.87l-7.24 8.41 7.77 9.39z"/> </g> </g> </svg> </a> </p>
3
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md @@ -768,7 +768,14 @@ For details, see https://docs.google.com/spreadsheets/d/1whV739iW6O9SxRZLCIe2lpv - +## Errors + +| Error `name` | Meaning | +|:------------------------|:---------------------------------------------------------------| +| UsageError | Bad usage, caught by Waterline core | +| AdapterError | Something went wrong in the adapter (e.g. uniqueness constraint violation) | +| PropagationError | A conflict was detected while making additional, internal calls to other model methods within Waterline core (e.g. `replaceCollection()` could not update a required null foreign key, or a conflict was encountered while performing "cascade" polyfill for a `.destroy()`) | +| _anything else_ | Something unexpected happened |
0
diff --git a/src/client/components/display/History.jsx b/src/client/components/display/History.jsx @@ -214,7 +214,7 @@ const History = ({ historyController.deleteHistoryFromIndexedDb(e.target.id); }; - const urlDisplay = url.length > 32 ? url.slice(0, 32) + '...' : url; + const urlDisplay = url && url.length > 32 ? url.slice(0, 32) + '...' : url; return ( <div className="history-container is-flex is-justify-content-space-between m-3"> @@ -223,7 +223,7 @@ const History = ({ onClick={() => addHistoryToNewRequest()} > <div className={`history-method mr-2 ${colorClass}`}> {method} </div> - <div className="history-url"> {urlDisplay || ''} </div> + <div className="history-url"> {urlDisplay || '-'} </div> </div> <div className="history-delete-container"> <div
11
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -7,6 +7,7 @@ import ShoulderTransforms from './vrarmik/ShoulderTransforms.js'; import LegsManager from './vrarmik/LegsManager.js'; import MicrophoneWorker from './microphone-worker.js'; import skeletonString from './skeleton.js'; +import easing from '../easing.js'; import animationsJson from '../animations/animations.js'; /* import {FBXLoader} from '../FBXLoader.js'; @@ -21,6 +22,7 @@ const localMatrix = new THREE.Matrix4(); const upRotation = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(1, 0, 0), Math.PI*0.5); const leftRotation = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 1, 0), Math.PI*0.4); const rightRotation = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 1, 0), -Math.PI*0.4); +const cubicBezier = easing(0, 1, 0, 1); const animationsSelectMap = { 'idle.fbx': new THREE.Vector3(0, 0, 0), @@ -1450,6 +1452,8 @@ class Avatar { this.velocity = new THREE.Vector3(); this.jumpState = false; this.jumpStartTime = 0; + this.flyState = false; + this.flyStartTime = 0; } initializeBonePositions(setups) { this.shoulderTransforms.spine.position.copy(setups.spine); @@ -1591,6 +1595,15 @@ class Avatar { dst.fromArray(v2); } + const flyTimeDiff = now - this.flyStartTime; + if (this.flyState || flyTimeDiff < 1000) { + const t2 = (now - this.flyStartTime)/1000; + const f = this.flyState ? Math.min(cubicBezier(flyTimeDiff/1000), 1) : (1 - Math.min(cubicBezier(flyTimeDiff/1000), 1)); + const src2 = floatAnimation.interpolants[k]; + const v2 = src2.evaluate(t2 % floatAnimation.duration); + + dst.slerp(localQuaternion.fromArray(v2), f); + } } } };
0
diff --git a/src/traces/scattergl/index.js b/src/traces/scattergl/index.js @@ -15,7 +15,7 @@ ScatterGl.supplyDefaults = require('./defaults'); ScatterGl.colorbar = require('../scatter/colorbar'); // reuse the Scatter3D 'dummy' calc step so that legends know what to do -ScatterGl.calc = require('../scatter3d/calc'); +ScatterGl.calc = require('../scatter/calc'); ScatterGl.plot = require('./convert'); ScatterGl.selectPoints = require('./select');
0
diff --git a/packages/app/src/components/Admin/Common/AdminNavigation.jsx b/packages/app/src/components/Admin/Common/AdminNavigation.jsx -/* eslint-disable no-multi-spaces */ -/* eslint-disable react/jsx-props-no-multi-spaces */ - - import React from 'react'; import { pathUtils } from '@growi/core'; @@ -25,6 +21,7 @@ const AdminNavigation = (props) => { // eslint-disable-next-line react/prop-types const MenuLabel = ({ menu }) => { switch (menu) { + /* eslint-disable no-multi-spaces */ case 'app': return <><i className="icon-fw icon-settings"></i> { t('app_settings') }</>; case 'security': return <><i className="icon-fw icon-shield"></i> { t('security_settings.security_settings') }</>; case 'markdown': return <><i className="icon-fw icon-note"></i> { t('markdown_settings.markdown_settings') }</>; @@ -42,6 +39,7 @@ const AdminNavigation = (props) => { case 'audit-log': return <><i className="icon-fw icon-feed"></i> { t('audit_log_management.audit_log')}</>; case 'cloud': return <><i className="icon-fw icon-share-alt"></i> { t('to_cloud_settings')} </>; default: return <><i className="icon-fw icon-home"></i> { t('wiki_management_home_page') }</>; + /* eslint-enable no-multi-spaces */ } }; @@ -76,6 +74,7 @@ const AdminNavigation = (props) => { const getListGroupItemOrDropdownItemList = (isListGroupItems) => { return ( <> + {/* eslint-disable no-multi-spaces */} <MenuLink menu="home" isListGroupItems isActive={pathname === '/admin'} isRoot /> <MenuLink menu="app" isListGroupItems isActive={isActiveMenu('/app')} /> <MenuLink menu="security" isListGroupItems isActive={isActiveMenu('/security')} /> @@ -100,6 +99,7 @@ const AdminNavigation = (props) => { </a> ) } */} + {/* eslint-enable no-multi-spaces */} </> ); }; @@ -123,6 +123,7 @@ const AdminNavigation = (props) => { aria-expanded="false" > <span className="float-left"> + {/* eslint-disable no-multi-spaces */} {pathname === '/admin' && <MenuLabel menu="home" />} {isActiveMenu('/app') && <MenuLabel menu="app" />} {isActiveMenu('/security') && <MenuLabel menu="security" />} @@ -136,6 +137,7 @@ const AdminNavigation = (props) => { {isActiveMenu('/user-groups') && <MenuLabel menu="user-groups" />} {isActiveMenu('/search') && <MenuLabel menu="search" />} {isActiveMenu('/audit-log') && <MenuLabel menu="audit-log" />} + {/* eslint-enable no-multi-spaces */} </span> </button> <div className="dropdown-menu" aria-labelledby="dropdown-admin-navigation">
7
diff --git a/src/material.js b/src/material.js @@ -308,7 +308,7 @@ class gltfMaterial extends GltfObject // https://github.com/sebavan/glTF/tree/KHR_materials_sheen/extensions/2.0/Khronos/KHR_materials_sheen let sheenFactor = 0.0; let sheenColor = vec3.fromValues(1.0, 1.0, 1.0); - let sheenRoughness = 0.3; + let sheenRoughness = this.properties.get("u_RoughnessFactor"); if(this.extensions.KHR_materials_sheen !== undefined) { this.defines.push("MATERIAL_SHEEN 1");
2
diff --git a/token-metadata/0x0AfFa06e7Fbe5bC9a764C979aA66E8256A631f02/metadata.json b/token-metadata/0x0AfFa06e7Fbe5bC9a764C979aA66E8256A631f02/metadata.json "symbol": "PLBT", "address": "0x0AfFa06e7Fbe5bC9a764C979aA66E8256A631f02", "decimals": 6, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/src/__tests__/globalReducer.test.js b/src/__tests__/globalReducer.test.js @@ -179,14 +179,14 @@ describe('Global Reducer works properly', () => { }); }); - it('should handle UPDATE_FILE_SHOW', () => { - let action = { type: 'UPDATE_FILE_SHOW', testString: '' }; + it('should handle UPDATE_FILE', () => { + let action = { type: 'UPDATE_FILE', testString: '' }; expect(globalReducer(initialState, action)).toEqual({ ...initialState, file: '', }); action = { - type: 'UPDATE_FILE_SHOW', + type: 'UPDATE_FILE', testString: `import React from "react"; import { render, fireEvent } from '@testing-library/react'; import '@testing-library/jest-dom/extend-expect`,
3
diff --git a/lib/bal/api.js b/lib/bal/api.js @@ -54,6 +54,11 @@ export async function uploadCSV(file) { } const response = await fetch(href, options) + if (!response.ok) { + const {message} = await response.json() + throw new Error(message) + } + if (response.ok) { return response.json() }
7
diff --git a/generators/server/templates/src/test/java/package/service/MailServiceIntTest.java.ejs b/generators/server/templates/src/test/java/package/service/MailServiceIntTest.java.ejs @@ -148,7 +148,7 @@ public class MailServiceIntTest <% if (databaseType === 'cassandra') { %>extends assertThat(message.getSubject()).isEqualTo("test title"); assertThat(message.getAllRecipients()[0].toString()).isEqualTo(user.getEmail()); assertThat(message.getFrom()[0].toString()).isEqualTo("test@localhost"); - assertThat(message.getContent().toString()).isEqualTo("<html>test title, http://127.0.0.1:8080, john</html>\n"); + assertThat(message.getContent().toString()).isEqualToNormalizingNewlines("<html>test title, http://127.0.0.1:8080, john</html>\n"); assertThat(message.getDataHandler().getContentType()).isEqualTo("text/html;charset=UTF-8"); } <%_ if (authenticationType !== 'oauth2') { _%>
1
diff --git a/src/material.js b/src/material.js @@ -4,18 +4,23 @@ import { fromKeys, jsToGl, initGlForMembers } from './utils.js'; class gltfMaterial { - constructor(emissiveFactor = jsToGl([0, 0, 0]), alphaMode = "OPAQUE", alphaCutoff = 0.5, doubleSided = false, - name = undefined) - { - this.textures = []; // array of gltfTextureInfos - this.emissiveFactor = emissiveFactor; - this.alphaMode = alphaMode; - this.alphaCutoff = alphaCutoff; - this.doubleSided = doubleSided; - this.name = name; - this.type = "unlit"; + constructor() + { + this.name = undefined; + this.extensions = undefined; + this.extras = undefined; this.pbrMetallicRoughness = undefined; - + this.normalTexture = undefined; + this.occlusionTexture = undefined; + this.emissiveTexture = undefined; + this.emissiveFactor = vec3.fromValues(0, 0, 0); + this.alphaMode = "OPAQUE"; + this.alphaCutoff = 0.5; + this.doubleSided = false; + + // non gltf properties + this.type = "unlit"; + this.textures = []; this.properties = new Map(); this.defines = []; } @@ -26,9 +31,12 @@ class gltfMaterial defaultMaterial.type = "MR"; defaultMaterial.name = "Default Material"; defaultMaterial.defines.push("MATERIAL_METALLICROUGHNESS 1"); - defaultMaterial.properties.set("u_BaseColorFactor", defaultMaterial.baseColorFactor); - defaultMaterial.properties.set("u_MetallicFactor", defaultMaterial.metallicFactor); - defaultMaterial.properties.set("u_RoughnessFactor", defaultMaterial.roughnessFactor); + let baseColorFactor = vec4.fromValues(1, 1, 1, 1); + let metallicFactor = 1; + let roughnessFactor = 1; + defaultMaterial.properties.set("u_BaseColorFactor", baseColorFactor); + defaultMaterial.properties.set("u_MetallicFactor", metallicFactor); + defaultMaterial.properties.set("u_RoughnessFactor", roughnessFactor); return defaultMaterial; } @@ -170,6 +178,7 @@ class gltfMaterial if (this.specularGlossinessTexture !== undefined) { + this.specularGlossinessTexture.samplerName = "u_SpecularGlossinessSampler"; this.parseTextureInfoExtensions(this.specularGlossinessTexture, "SpecularGlossiness"); this.textures.push(this.specularGlossinessTexture); this.defines.push("HAS_SPECULAR_GLOSSINESS_MAP 1");
12
diff --git a/chatbot-conversational_AI/update-bot/app/update-bot.js b/chatbot-conversational_AI/update-bot/app/update-bot.js @@ -224,7 +224,8 @@ async function add_caiAnswer(answerText, questionLink, access_token) { // add the Link to Stack Overflow to the Answer if (slackFormat.length > 1800) { // answer is too long - finalFormat = "\n" + slackFormat.substring(0, slackFormat.split('. ', 4).join('. ').length + 1) + " ... " + " <" + questionLink + "/|[See more]>"; + // cut the answer to max four sentences and max 1800 characters + finalFormat = "\n" + slackFormat.substring(0, Math.min(slackFormat.split('. ', 4).join('. ').length + 1, 1800)) + " ... " + " <" + questionLink + "/|[See more]>"; } else { var finalFormat = "\n" + slackFormat + "\n\n" + "For more help, please click <" + questionLink + "/|here> to go directly to this question on Stack Overflow."; }
12
diff --git a/Gemfile.lock b/Gemfile.lock @@ -320,7 +320,6 @@ GEM tilt (~> 1.1, != 1.3.0) state_machine (1.1.2) statsd-client (0.0.7) - string-encrypt (0.0.5) test-unit (3.1.7) power_assert thin (1.7.0) @@ -433,7 +432,6 @@ DEPENDENCIES simplecov-rcov state_machine (= 1.1.2) statsd-client (= 0.0.7) - string-encrypt test-unit thin typhoeus (= 0.7.2)
2
diff --git a/src/middleware/packages/webacl/services/group/index.js b/src/middleware/packages/webacl/services/group/index.js @@ -43,7 +43,7 @@ module.exports = { if (!groupExists) { this.logger.info("Super admin group doesn't exist, creating it..."); - const { groupUri } = await this.actions.create({ slug: 'superadmins', webId: 'system' }); + const { groupUri } = await this.actions.create({ groupSlug: 'superadmins', webId: 'system' }); // Give full rights to root container await this.broker.call('webacl.resource.addRights', {
1
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue wrapEditableAroundSelected() { if (!this.component) return + this.$nextTick(() => { const {top, left, width, height} = this.getBoundingClientRect(this.component) const offset = this.getBoundingClientRect(this.$refs.editview) this.editable.styles.left = `${left + offset.left}px` this.editable.styles.width = `${width}px` this.editable.styles.height = `${height}px` + }) }, reWrapEditable() {
7
diff --git a/doc/includes/API.md b/doc/includes/API.md @@ -6168,9 +6168,19 @@ const queryBuilder = person.$query(transactionOrKnex); > Re-fetch the instance from the database: ```js -person.$query().then(person => { - console.log(person); +person.$query().then(reFetchedPerson => { + // Note that `person` did not get modified by the fetch. + console.log(reFetchedPerson); }); + +// If you need to refresh the same instance you can do this: +person.$query().then(reFetchedPerson => { + // Note that `person` did not get modified by the fetch. + person.$set(reFetchedPerson); +}); + +// Or this: +person = await person.$query(); ``` > Insert a new model to database:
7
diff --git a/src/struct/commands/arguments/Control.js b/src/struct/commands/arguments/Control.js @@ -195,8 +195,8 @@ class DoControl extends Control { * @param {Object} data - Data for control. * @returns {Object} */ - control({ process, currentArgs, args, command, message, processedArgs }) { - this.fn.call(command, message, processedArgs); + async control({ process, currentArgs, args, command, message, processedArgs }) { + await this.fn.call(command, message, processedArgs); return process(args.buildArgs(currentArgs.slice(1))); } }
11
diff --git a/content/questions/string-interpolation/index.md b/content/questions/string-interpolation/index.md @@ -7,21 +7,20 @@ tags: order: 51 date: Fri Oct 18 2019 22:06:13 GMT+0530 (India Standard Time) answers: - - "possible! You should see a therapist after so much JavaScript lol" - - "Impossible! You should see a therapist after so much JavaScript lol // correct" - - "possible! You shouldn't see a therapist after so much JavaScript lol" - - "Impossible! You shouldn't see a therapist after so much JavaScript lol" + - "Soon we must all choose between what is right and what is easy" + - "Soon we must all choose between what is right and what is difficult // correct" + - "Soon we must all choose between what is wrong and what is easy" + - "Soon we must all choose between what is wrong and what is difficult" --- What's the value of output? ```javascript -const output = `${[] && 'Im'}possible! -You should${'' && `n't`} see a therapist after so much JavaScript lol` +const output = `Soon we must all choose between what is ${[] ? 'right' : 'wrong'} and what is ${(() => false) ? 'difficult' : 'easy'}` ``` <!-- explanation --> -[] is a truthy value. With the && operator, the right-hand value will be returned if the left-hand value is a truthy value. In this case, the left-hand value [] is a truthy value, so "Im' gets returned. +As [] is a truthy value, the above ternary condition returns 'right'. -"" is a falsy value. If the left-hand value is falsy, nothing gets returned. n't doesn't get returned. +We just defined the method but not calling it. Function is a truthy value is Javascript, hence 'difficult' appends to the string.
3
diff --git a/lib/application.js b/lib/application.js @@ -52,14 +52,17 @@ class Application extends events.EventEmitter { } async createScript(fileName) { + try { const code = await fsp.readFile(fileName, 'utf8'); + if (!code) return null; const src = '\'use strict\';\ncontext => ' + code; const options = { filename: fileName, lineOffset: -1 }; - try { const script = new vm.Script(src, options); return script.runInContext(this.sandbox, SCRIPT_OPTIONS); } catch (err) { + if (err.code !== 'ENOENT') { this.logger.error(err.stack); + } return null; } } @@ -82,8 +85,9 @@ class Application extends events.EventEmitter { const data = await fsp.readFile(filePath); this.static.set(key, data); } catch (err) { + if (err.code !== 'ENOENT') { this.logger.error(err.stack); - if (err.code !== 'ENOENT') throw err; + } } } @@ -132,7 +136,7 @@ class Application extends events.EventEmitter { fs.watch(placePath, (event, fileName) => { const filePath = path.join(placePath, fileName); if (place === 'static') this.loadFile(filePath); - else this.loadScript(place, filePath); + else this.loadMethod(filePath); }); }
1
diff --git a/server/events/phasers.js b/server/events/phasers.js @@ -48,7 +48,7 @@ App.on("firePhaserBeam", ({ id, beamId }) => { }); App.on("stopPhaserBeams", ({ id }) => { const sys = App.systems.find(s => s.id === id); - sys.stopBeams(); + sys && sys.stopBeams(); pubsub.publish( "phasersUpdate", App.systems.filter(s => s.type === "Phasers") @@ -76,7 +76,8 @@ App.on("setPhaserBeamHeat", ({ id, beamId, heat }) => { ); }); App.on("coolPhaserBeam", ({ id, beamId }) => { - App.systems.find(s => s.id === id).coolBeam(beamId); + const sys = App.systems.find(s => s.id === id); + sys && sys.coolBeam(beamId); pubsub.publish( "phasersUpdate", App.systems.filter(s => s.type === "Phasers")
7
diff --git a/articles/rules/redirect.md b/articles/rules/redirect.md @@ -12,9 +12,8 @@ Rules can also be used to programatically redirect users before an authenticatio * Implementing custom verification mechanisms (e.g. proprietary multifactor authentication providers). * Forcing users to change passwords. -::: panel-danger Caution: -Redirect rules won't work for the [Resource Owner endpoint](/api/authentication/reference#resource-owner) authentication endpoint. -You can detect resource owner logins from a rule by checking `context.protocol === 'oauth2-resource-owner'`. +::: panel-danger Caution +Redirect rules won't work for the [Resource Owner endpoint](/api/authentication/reference#resource-owner) authentication endpoint. You can detect resource owner logins from a rule by checking `context.protocol === 'oauth2-resource-owner'`. ::: ## How to implement a redirect @@ -32,7 +31,7 @@ function (user, context, callback) { Once all rules have finished executing, the user will be redirected to the specified URL. -## What to do after redirecting +## 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: @@ -40,10 +39,14 @@ An authentication transaction that has been interrupted by setting `context.redi 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. +::: + 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 lose the context of the login transaction. +::: 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. ::: @@ -59,7 +62,7 @@ function (user, context, callback) { } ``` -## Securely processing results after redirecting +## How to securely process results Suppose you would like to force users to change their passwords under specific conditions. You can write a rule that would have the following behavior: @@ -138,6 +141,6 @@ function(user, context, callback) { ## Caveats -Redirect rules won't work for the [Resource Owner endpoint](/api/authentication/reference#resource-owner) authentication endpoint. This is because the endpoint returns a JSON result. __Redirect__ rules work with browser based protocols. +Redirect rules won't work for the [Resource Owner endpoint](/api/authentication/reference#resource-owner) authentication endpoint. This is because the endpoint returns a JSON result. Redirect rules work _only_ with browser based protocols. Also, if you are using any social network as a connection, make sure you register your own account (vs. using Auth0's Dev Keys). This is because redirect rules are resumed on the endpoint: `https://${account.namespace}/continue`. When using Auth0's Dev Keys, the session is established on a special endpoint that is generic and tenant agnostic, and calling `/continue` will not find your previous session, resulting in an error.
0
diff --git a/test/contracts/FuturesMarket.js b/test/contracts/FuturesMarket.js @@ -652,15 +652,27 @@ contract('FuturesMarket', accounts => { }); await futuresMarket.confirmOrder(trader); - assert.bnEqual((await futuresMarket.liquidationPrice(trader, true)).price, toUnit(201)); + assert.bnClose( + (await futuresMarket.liquidationPrice(trader, true)).price, + toUnit(201), + toUnit('0.001') + ); await systemSettings.setFuturesLiquidationFee(toUnit('100'), { from: owner }); - assert.bnEqual((await futuresMarket.liquidationPrice(trader, true)).price, toUnit(205)); + assert.bnClose( + (await futuresMarket.liquidationPrice(trader, true)).price, + toUnit(205), + toUnit('0.001') + ); await systemSettings.setFuturesLiquidationFee(toUnit('0'), { from: owner }); - assert.bnEqual((await futuresMarket.liquidationPrice(trader, true)).price, toUnit(200)); + assert.bnClose( + (await futuresMarket.liquidationPrice(trader, true)).price, + toUnit(200), + toUnit('0.001') + ); }); it('Liquidation price is accurate with funding', async () => { @@ -802,6 +814,7 @@ contract('FuturesMarket', accounts => { emittedFrom: proxyFuturesMarket.address, args: [trader, noBalance, positionSize, price], log: decodedLogs[1], + bnCloseVariance: toUnit('0.001'), }); assert.isTrue(false); });
1
diff --git a/src/agent/index.js b/src/agent/index.js @@ -1400,11 +1400,15 @@ function traceFormat (args) { } function traceRegs (args) { + if (args.length < 1) { + return 'Usage: dtr [address] [reg ...]'; + } const address = getPtr(args[0]); const rest = args.slice(1); const listener = Interceptor.attach(address, traceFunction); function traceFunction(_) { - console.log('Trace probe hit at ' + address + ((args[0] !== address)? ' (' + args[0] + ')': '')); + const extra = (args[0] !== address)? ` (${args[0]})` : ''; + console.log(`Trace probe hit at ${address} ${extra}`); console.log('\t' + rest.map(r => { let tail = ''; if (r.indexOf('=') !== -1) {
7
diff --git a/lib/metrics/names.js b/lib/metrics/names.js @@ -10,6 +10,10 @@ const NODEJS = { } const ALL = 'all' +const POSTGRES_LITERAL = 'Postgres' +const CASSANDRA_LITERAL = 'Cassandra' +const EXPRESS_LITERAL = 'Expressjs' +const OTHER_TRANSACTION_MESSAGE = 'OtherTransaction/Message' const SUPPORTABILITY = { PREFIX: 'Supportability/', @@ -133,24 +137,24 @@ const REDIS = { } const POSTGRES = { - PREFIX: 'Postgres', - STATEMENT: `${DB.STATEMENT}/${this.POSTGRES.PREFIX}/`, - OPERATION: `${DB.OPERATION}/${this.POSTGRES.PREFIX}/`, - INSTANCE: `${DB.INSTANCE}/${this.POSTGRES.PREFIX}/` + PREFIX: POSTGRES_LITERAL, + STATEMENT: DB.STATEMENT + `/${POSTGRES_LITERAL}/`, + OPERATION: DB.OPERATION + `/${POSTGRES_LITERAL}/`, + INSTANCE: DB.INSTANCE + `/${POSTGRES_LITERAL}/` } const CASSANDRA = { - PREFIX: 'Cassandra', - OPERATION: `${DB.OPERATION}/${this.CASSANDRA.PREFIX}/`, - STATEMENT: `${DB.STATEMENT}/${this.CASSANDRA.PREFIX}/`, - INSTANCE: `${DB.INSTANCE}/${this.CASSANDRA.PREFIX}/`, - ALL: DB.PREFIX + 'Cassandra/' + ALL + PREFIX: CASSANDRA_LITERAL, + OPERATION: DB.OPERATION + `/${CASSANDRA_LITERAL}/`, + STATEMENT: DB.STATEMENT + `/${CASSANDRA_LITERAL}/`, + INSTANCE: DB.INSTANCE + `/${CASSANDRA_LITERAL}/`, + ALL: DB.PREFIX + `${CASSANDRA_LITERAL}/` + ALL } const EXPRESS = { - PREFIX: 'Expressjs/', - MIDDLEWARE: MIDDLEWARE.PREFIX + this.EXPRESS.PREFIX, - ERROR_HANDLER: MIDDLEWARE.PREFIX + this.EXPRESS.PREFIX + PREFIX: `${EXPRESS_LITERAL}/`, + MIDDLEWARE: MIDDLEWARE.PREFIX + `${EXPRESS_LITERAL}/`, + ERROR_HANDLER: MIDDLEWARE.PREFIX + `${EXPRESS_LITERAL}/` } const RESTIFY = { @@ -216,12 +220,12 @@ const OTHER_TRANSACTION = { PREFIX: 'OtherTransaction', RESPONSE_TIME: 'OtherTransaction', TOTAL_TIME: 'OtherTransactionTotalTime', - MESSAGE: `${this.OTHER_TRANSACTION.PREFIX}/Message` + MESSAGE: OTHER_TRANSACTION_MESSAGE } const MESSAGE_TRANSACTION = { - PREFIX: `${this.OTHER_TRANSACTION.PREFIX}/Message`, - RESPONSE_TIME: `${this.OTHER_TRANSACTION.PREFIX}/Message`, + PREFIX: OTHER_TRANSACTION_MESSAGE, + RESPONSE_TIME: OTHER_TRANSACTION_MESSAGE, TOTAL_TIME: 'OtherTransactionTotalTime/Message' }
1
diff --git a/README.md b/README.md We're working on updating our websites, domains, and npm package names so that it will be easier in future to find all things Primer. We welcome feedback and contributions at any time. Please check existing issues and pull requests before contributing, and please communicate via an issue first if you intend to make large-scale changes. See [contributing](.github/CONTRIBUTING.md) for more info. #### Team +- [@vdepizzol](https://github.com/vdepizzol) - [@colebemis](https://github.com/colebemis) - [@zainkho](https://github.com/zainkho) - [@simurai](https://github.com/simurai) @@ -33,7 +34,6 @@ We're working on updating our websites, domains, and npm package names so that i - [@shawnbot](https://github.com/shawnbot) - [@jonrohan](https://github.com/jonrohan) - [@broccolini](https://github.com/broccolini) -- [@vdepizzol](https://github.com/vdepizzol) #### Alumni - [@jhuashao](https://github.com/jhuashao)
5
diff --git a/spec/models/table_spec.rb b/spec/models/table_spec.rb @@ -1400,6 +1400,13 @@ describe Table do }.should raise_error(CartoDB::InvalidColumnName) end + it "should raise an error when renaming a column with reserved name" do + table = create_table(:user_id => @user.id) + lambda { + table.rename_column('name', 'xmin') + }.should raise_error(CartoDB::InvalidColumnName) + end + it "should not raise an error when renaming a column with reserved name" do table = create_table(:user_id => @user.id) resp = table.modify_column!(:name => "name", :new_name => "xmin")
10
diff --git a/src/sections/target/ChemicalProbes/Body.js b/src/sections/target/ChemicalProbes/Body.js @@ -19,7 +19,10 @@ const columns = [ renderCell: rowData => rowData.sourcelinks.map((d, i, a) => ( <React.Fragment key={i}> - <Link external to={d.link}> + <Link + external + to={`${!d.link.startsWith('http') ? 'http://' : ''}${d.link}`} + > {d.source} </Link> {i < a.length - 1 ? ' / ' : ''}
1
diff --git a/src/features/script-load.js b/src/features/script-load.js @@ -53,7 +53,8 @@ if (hasDocument) { } function loadScriptModules() { - document.querySelectorAll('script[type=systemjs-module]').forEach(function (script) { + Array.prototype.forEach.call( + document.querySelectorAll('script[type=systemjs-module]'), function (script) { if (script.src) { System.import(script.src.slice(0, 7) === 'import:' ? script.src.slice(7) : resolveUrl(script.src, baseUrl)); }
14
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml @@ -8,13 +8,9 @@ cache: - node_modules/ test: - image: timbru31/java-node#bgshcxv8fkzpt4tf9acqjvd + image: solidstategroup/node-java-chrome stage: test script: - - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - - - sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' - - apt-get -qq update - - apt-get install -y --allow-unauthenticated build-essential libpng-dev google-chrome-stable - npm i - if [ $CI_COMMIT_REF_NAME == "staging" ]; then export ENV=staging; echo 'Setting env to' $ENV; npm run env; fi; - if [ $CI_COMMIT_REF_NAME == "develop" ]; then export ENV=dev; echo 'Setting env to' $ENV; npm run env; fi;
4
diff --git a/3-terrarium/1-intro-to-html/README.md b/3-terrarium/1-intro-to-html/README.md # Terrarium Project Part 1: Introduction to HTML -![Introduction to HTML](/sketchnotes/webdev101-html.png) +![Introduction to HTML](../../sketchnotes/webdev101-html.png) > Sketchnote by [Tomomi Imura](https://twitter.com/girlie_mac) ## Pre-Lecture Quiz
1
diff --git a/src/geo/csg.js b/src/geo/csg.js @@ -142,6 +142,8 @@ Module.onRuntimeInitialized = () => { const ball_torture = false; if (tests) { + console.log('running Manifold tests'); + let c = Module.cube([1,1,1], true); console.log({ c, @@ -151,6 +153,8 @@ Module.onRuntimeInitialized = () => { }); if (mesh_perf) { + console.log('running Manifold getMesh() benchmark'); + let l = 1000; let s = Module.sphere(10, 100); let sm = s.getMesh(); @@ -175,14 +179,19 @@ Module.onRuntimeInitialized = () => { } if (ball_torture) { + console.log('running Manifold ball torture test'); + console.time('ball test'); - let ball = Module.sphere(25, 128); + let iter = 1; // increases final complexity (cpu + mem) + let maxBatch = 10; // increases memory pressure + let sphereDetail = 64; // higher # speeds up progression of complexity + let ball = Module.sphere(24, sphereDetail); let box = Module.cube([500, 500, 100], true); let deg2rad = Math.PI / 180; let z = 50; let rad = 250; - let iter = 4; let last = Date.now(); + let batch = 0; for (let i=0; i<360*iter; i++) { let x = Math.cos(deg2rad * i) * rad; let y = Math.sin(deg2rad * i) * rad; @@ -191,13 +200,20 @@ Module.onRuntimeInitialized = () => { ball2.delete(); box.delete(); box = box2; - // box.getMesh(); - // let { vertex } = box.getMesh({ normal: () => undefined }); - let vertex = []; + if (batch++ > maxBatch) { + batch = 0; + let nv = box.numVert(); let now = Date.now(); - console.log((i/(iter*360)).toFixed(2), vertex.length, now - last); last = now; - rad -= 0.05; - z -= 0.1; + console.log( + (i / (iter * 360)).toFixed(2), // % complete + nv, // num vertices in target block + now - last, // elapsed time for maxBatch boolean ops + ((now - last) / maxBatch).toFixed(4) // time per boolean op + ); + last = now; + } + rad -= 0.04; + z -= 0.08; } console.log(box.getMesh()); ball.delete();
3
diff --git a/source/includes/_contributing.mdown b/source/includes/_contributing.mdown @@ -21,7 +21,7 @@ Read our [development process](#development-process) and [community guidelines]( We follow the [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/) branching model for development. The latest merged code generally lives in the `develop` branch of each repository. Your development flow should look like: -1. Find an interesting issue and communicate! Please let the #engineering Slack channel know what you want to work on +1. Find an interesting issue and communicate! Please let the #engineering Discord channel know what you want to work on 2. Add a comment to the issue or self-assign so we don't have multiple contributors unintentionally working on the same task 3. Start with the `develop` branch and check out a new feature branch unless you're contributing to an existing feature 4. Follow the appropriate [coding style](#code-style) and write some awesome code
14
diff --git a/src/screens/SplashScreen/BadConnection.test.js b/src/screens/SplashScreen/BadConnection.test.js // @flow import React from "react"; +import { ActivityIndicator } from "react-native"; import { shallow } from "enzyme"; import BadConnection from "./BadConnection"; +import Button from "../../components/ButtonPrimary"; it("renders correctly when showing", () => { const output = shallow( @@ -26,3 +28,30 @@ it("renders correctly when with no data and loading", () => { expect(output).toMatchSnapshot(); }); + +describe("Retrying", () => { + it("Calls getData when retry button is pressed", () => { + const mock = jest.fn(); + const output = shallow( + <BadConnection getData={mock} noDataReceived loading={false} /> + ); + + const button = output.find(Button); + button.props().onPress(); + expect(mock).toHaveBeenCalled(); + }); + + it("Sets retrying state and renders spinner when retry button is pressed", () => { + const mock = jest.fn(); + const output = shallow( + <BadConnection getData={mock} noDataReceived loading={false} /> + ); + + const button = output.find(Button); + button.props().onPress(); + output.update(); + expect(output.state().retrying).toEqual(true); + expect(output.find(ActivityIndicator).exists()).toEqual(true); + expect(output.find(Button).exists()).toEqual(false); + }); +});
0
diff --git a/aura-impl/src/main/resources/aura/provider/GlobalValueProviders.js b/aura-impl/src/main/resources/aura/provider/GlobalValueProviders.js * <li>getStorableValues[optional] get a storable version of the GVP values * <li>getValues: get a set of values that can be exposed. * <li>set[optional]: set a value on the provider + * <li>isStorable[optional]: should values be saved to storage * </ul> * * @param {Object} gvp an optional serialized GVP to load. @@ -157,10 +158,14 @@ GlobalValueProviders.prototype.merge = function(gvps, doNotPersist) { for (type in that.valueProviders) { if (that.valueProviders.hasOwnProperty(type)) { valueProvider = that.valueProviders[type]; + // GVP values saved to storage be default. isStorable allows it to not be stored + var storable = typeof valueProvider["isStorable"] === "function" ? valueProvider["isStorable"]() : true; + if (storable) { values = valueProvider.getStorableValues ? valueProvider.getStorableValues() : (valueProvider.getValues ? valueProvider.getValues() : valueProvider); toStore.push({"type": type, "values": values}); } } + } if (value) { // NOTE: we merge into the value from storage to avoid modifying toStore, which may hold
11
diff --git a/host_pool.js b/host_pool.js @@ -57,13 +57,12 @@ class HostPool { */ failed (host, port) { const self = this; - const key = host + ':' + port; + const key = `${host}:${port}`; const retry_msecs = self.retry_secs * 1000; self.dead_hosts[key] = true; function cb_if_still_dead () { - logger.logwarn("host " + key + " is still dead, will retry in " + - self.retry_secs + " secs"); + logger.logwarn(`${host} ${key} is still dead, will retry in ${self.retry_secs} secs`); self.dead_hosts[key] = true; // console.log(1); setTimeout(function () { @@ -73,7 +72,7 @@ class HostPool { function cb_if_alive () { // console.log(2); - logger.loginfo("host " + key + " is back! adding back into pool"); + logger.loginfo(`${host} ${key} is back! adding back into pool`); delete self.dead_hosts[key]; } @@ -94,7 +93,7 @@ class HostPool { ){ const self = this; - logger.loginfo("probing dead host " + host + ":" + port); + logger.loginfo(`probing dead host ${host}:${port}`); const connect_timeout_ms = 200; // keep it snappy let s; @@ -118,7 +117,7 @@ class HostPool { } catch (e) { // only way to catch run-time javascript errors in here; - console.log("ERROR in probe_dead_host, got error " + e); + console.log(`ERROR in probe_dead_host, got error ${e}`); throw e; } } @@ -168,10 +167,7 @@ class HostPool { } else { logger.logwarn( - "no working hosts found, retrying a dead one, config " + - "(probably from smtp_forward.forwarding_host_pool) is " + - "'" + this.hostports_str + "'" - ); + `no working hosts found, retrying a dead one, config (probably from smtp_forward.forwarding_host_pool) is '${this.hostports_str}'`); this.last_i = first_i; return this.hosts[first_i]; }
14
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -3,7 +3,7 @@ import {GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader.js'; import React from 'react'; import * as ReactThreeFiber from '@react-three/fiber'; import metaversefile from 'metaversefile'; -import {App, getRenderer, scene, camera, appManager} from './app-object.js'; +import {App, getRenderer, scene, sceneHighPriority, camera, appManager} from './app-object.js'; import physicsManager from './physics-manager.js'; import {rigManager} from './rig.js'; import * as ui from './vr-ui.js'; @@ -134,10 +134,12 @@ const loaders = { }; let currentAppRender = null; +let iframeContainer = null; +let iframeContainer2 = null; let recursion = 0; metaversefile.setApi({ async import(s) { - if (/^https?:\/\//.test(s)) { + if (/^(?:ipfs:\/\/|https?:\/\/)/.test(s)) { s = `/@proxy/${s}`; } // console.log('do import', s); @@ -314,6 +316,46 @@ metaversefile.setApi({ createApp() { return appManager.createApp(appManager.getNextAppId()); }, + useHtmlRenderer() { + if (!(iframeContainer && iframeContainer2)) { + iframeContainer = document.createElement('div'); + iframeContainer.setAttribute('id', 'iframe-container'); + iframeContainer2 = document.createElement('div'); + iframeContainer2.setAttribute('id', 'iframe-container2'); + iframeContainer.appendChild(iframeContainer2); + + iframeContainer.getFov = () => camera.projectionMatrix.elements[ 5 ] * (window.innerHeight / 2); + iframeContainer.updateSize = function updateSize() { + const fov = iframeContainer.getFov(); + iframeContainer.style.cssText = ` + position: fixed; + left: 0; + top: 0; + width: ${window.innerWidth}px; + height: ${window.innerHeight}px; + perspective: ${fov}px; + `; + iframeContainer2.style.cssText = ` + /* display: flex; + justify-content: center; + align-items: center; */ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + /* transform-style: preserve-3d; */ + `; + }; + iframeContainer.updateSize(); + } + return { + iframeContainer, + iframeContainer2, + camera, + sceneHighPriority, + }; + }, async addModule(app, m) { currentAppRender = app;
0
diff --git a/web/index.js b/web/index.js @@ -63,7 +63,6 @@ const internal = { deferredInstallPrompt : null, installButton : null, enableOfflineButton : false, - toggleOnlineFunction : null, debug : false, }; @@ -226,7 +225,7 @@ var receivedMessageFromServiceWorker = function(msg) { if (msg.indexOf('Online')>0) { online=true; } - internal.toggleOnlineFunction(!online); + setOfflineMode(!online,false); if (msg.indexOf('empty cache')>0) { console.log('Msg=',msg); cacheLatestVersion(false); @@ -341,12 +340,30 @@ var getCachedVersion=async function() { // jshint ignore:line };// jshint ignore:line -var setOfflineMode=function(mode) { +var setOfflineMode=function(mode,updateserviceworker=true) { + + let but1=$("#onlinebut"); + let but2=$("#offlinebut"); + + let good=but1,bad=but2; + if (mode) { + good=but2; + bad=but1; + } + good.addClass("active"); + good.addClass("btn-danger"); + good.removeClass("btn-default"); + bad.removeClass("btn-danger"); + bad.removeClass("active"); + bad.addClass("btn-default"); + + + if (updateserviceworker) { if (mode) sendCommandToServiceWorker('goOffline'); else sendCommandToServiceWorker('goOnline'); - + } }; // ------------------------------------------------------------------------ @@ -747,22 +764,6 @@ var mapOnlineOfflineButtons=async function() { let but1=$("#onlinebut"); let but2=$("#offlinebut"); - let fn1=function(offline) { - - let good=but1,bad=but2; - if (offline) { - good=but2; - bad=but1; - } - good.addClass("active"); - good.addClass("btn-danger"); - good.removeClass("btn-default"); - bad.removeClass("btn-danger"); - bad.removeClass("active"); - bad.addClass("btn-default"); - - }; - but1.click( (e) => { e.preventDefault(); setOfflineMode(false); @@ -770,14 +771,11 @@ var mapOnlineOfflineButtons=async function() { but2.click( (e) => { e.preventDefault(); - fn1(but2,but1); setOfflineMode(true); }); - internal.toggleOnlineFunction=fn1; - let offline=await getOfflineMode(); - internal.toggleOnlineFunction(offline); + setOfflineMode(offline,false); };
3
diff --git a/app/components/Account/AccountOverview.jsx b/app/components/Account/AccountOverview.jsx @@ -573,7 +573,7 @@ class AccountOverview extends React.Component { <div className="grid-content app-tables no-padding" ref="appTables"> <div className="content-block small-12"> <div className="tabs-container generic-bordered-box"> - <Tabs defaultActiveTab={1} segmented={false} setting="overviewTab" className="account-tabs" tabsClass="account-overview no-padding bordered-header content-block"> + <Tabs defaultActiveTab={0} segmented={false} setting="overviewTab" className="account-tabs" tabsClass="account-overview no-padding bordered-header content-block"> <Tab title="account.portfolio" subText={portFolioValue}> <div className="hide-selector">
12
diff --git a/packages/inferno/src/DOM/events/events.ts b/packages/inferno/src/DOM/events/events.ts @@ -50,7 +50,7 @@ export type TransitionEvent<T> = SemiSyntheticEvent<T> & NativeTransitionEvent; // Event Handler Types // ---------------------------------------------------------------------- -export type EventHandler<E extends SemiSyntheticEvent<any>> = { bivarianceHack(event: E): void }['bivarianceHack'] | LinkedEvent<any, E>; +export type EventHandler<E extends SemiSyntheticEvent<any>> = { bivarianceHack(event: E): void }['bivarianceHack'] | LinkedEvent<any, E> | null; export type InfernoEventHandler<T> = EventHandler<SemiSyntheticEvent<T>>;
11
diff --git a/src/modules/dex/directives/orderBook/OrderBook.js b/src/modules/dex/directives/orderBook/OrderBook.js * @private */ _toTemplate(list, crop, priceHash, maxAmount) { - maxAmount = maxAmount.times(2); return list.map((order) => { const hasOrder = !!priceHash[order.price.toFixed(this.priceAsset.precision)]; const inRange = order.price.gte(crop.min) && order.price.lte(crop.max); * @private */ static _getMaxAmount(bids, asks, crop) { - const croppedBids = OrderBook._cropFilterOrders(bids, crop).slice(0, 15); - const croppedAsks = OrderBook._cropFilterOrders(asks, crop).slice(0, 15); + const croppedBids = OrderBook._cropFilterOrders(bids, crop); + const croppedAsks = OrderBook._cropFilterOrders(asks, crop); - if (!croppedBids.length || !croppedBids.length) { - return new BigNumber(0); - } + const orders = [...croppedBids, ...croppedAsks].sort((a, b) => a.amount.gt(b.amount) ? 1 : -1); - const medianBid = OrderBook._getMedianAmount(croppedBids); - const medianAsk = OrderBook._getMedianAmount(croppedAsks); - const median = medianBid.plus(medianAsk).div(2); - - const valuableOrders = [...croppedBids, ...croppedAsks].filter((o) => { - return o.amount.gt(median - 2 * median) && o.amount.lt(3 * median); - }); - - if (!valuableOrders.length) { + if (!orders.length) { return new BigNumber(0); + } else { + const percentile = 0.9; + return orders[Math.floor(orders.length * percentile)].amount; } - - const sum = valuableOrders.reduce((acc, order) => acc.plus(order.amount), new BigNumber(0)); - return sum.div(valuableOrders.length / 8); // 8 is a heuristic value } /**
4
diff --git a/README.md b/README.md Activity [![Build Status](https://travis-ci.org/hikaya/Activity-CE.svg?branch=master)](https://travis-ci.org/hikaya/Activity-CE) ==== -Activity includes a set of forms and reports for managing project activities for a Program. It includes workflow for approving and completing projects as well as sharing the output data. +We are developing a tool for humanitarians to manage project activities and indicator results across their programs, including approval workflows and reporting and visualizations. Our goal is to help organizations answer common questions such as: +* who are funding your projects? +* who you work with? +* where you work? +* how do my outputs align with my overall project goal? - -Activity functionality http://www.github.com/hikaya/Activity-CE is intended to allow importing +Activity functionality http://www.github.com/hikaya-io/Activity-CE is intended to allow importing and exporting of project specific data from 3rd party data sources or excel files. ## Configuration
3
diff --git a/src/utilities.js b/src/utilities.js @@ -27,6 +27,8 @@ export function deepCopy (target) { export function extend (destination, ...args) { args.forEach(source => { + if (source) + { Object.keys(source).forEach(property => { if (source[property] && isPlainObject(source[property])) { if (!hasOwnProperty(destination, property)) destination[property] = {} @@ -37,6 +39,7 @@ export function extend (destination, ...args) { destination[property] = source[property] } }) + } }) return destination
1
diff --git a/packages/react-router/docs/api/matchPath.md b/packages/react-router/docs/api/matchPath.md @@ -33,14 +33,14 @@ an array of strings as shortcut for `{ path }`: ## returns -It returns an object when provided pathname does match `path` prop or `null` otherwise. +It returns an object when provided pathname does match `path` prop. -``` +```js matchPath("/users/2", { path: "/users/:id", exact: true, strict: true - }) +}); // { // isExact: true @@ -52,12 +52,14 @@ matchPath("/users/2", { // } ``` -``` +It returns `null` when provided pathname does not match `path` prop. + +```js matchPath("/users", { path: "/users/:id", exact: true, strict: true - }) +}); // null ```
7
diff --git a/token-metadata/0xeE3b9B531F4C564c70e14B7b3BB7D516f33513ff/metadata.json b/token-metadata/0xeE3b9B531F4C564c70e14B7b3BB7D516f33513ff/metadata.json "symbol": "DFIO", "address": "0xeE3b9B531F4C564c70e14B7b3BB7D516f33513ff", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/localization/src/TranslationHelpers.js b/packages/localization/src/TranslationHelpers.js @@ -5,6 +5,8 @@ import DefaultVocabulary, { type TranslationKeysObject, } from './DefaultVocabulary'; +const NATIVE_TRANSLATION_PARAM_REGEX = /%([0-9]+)\$@/g; + export const getTranslation = ( translatedString: ?string, translationId: TranslationKeys, @@ -28,7 +30,6 @@ export const getTranslation = ( // %1$@, so we lose information about the variables. // We add this information back in: try { - const NATIVE_TRANSLATION_PARAM_REGEX = /%([0-9]+)\$@/g; const compatibleTranslatedString = translatedString.replace( NATIVE_TRANSLATION_PARAM_REGEX, (match, variableIndex) => { @@ -41,9 +42,11 @@ export const getTranslation = ( ); if (originalParamMatches == null || originalParamMatches.length !== 1) { - throw new Error( - `There was a problem with translationId ${translationId}`, + console.warn( + `Missing translation parameter for ${translationId} variableIndex = ${variableIndex}`, ); + // Translation has probably changed, but not been upated on phraseApp + return ''; } return originalParamMatches[0];
9
diff --git a/setup.py b/setup.py @@ -16,6 +16,7 @@ setup( author_email="[email protected]", description="Web application for exploration of large scale scRNA-seq datasets", long_description=long_description, + long_description_content_type='text/markdown', install_requires=requirements, include_package_data=True, zip_safe=False,
12
diff --git a/userscript.user.js b/userscript.user.js @@ -63785,7 +63785,7 @@ var $$IMU_EXPORT$$; return; } - function calc_imghw_for_fit(width, height) { + var get_imghw_for_fit = function(width, height) { if (width === undefined) width = vw; @@ -63795,6 +63795,9 @@ var $$IMU_EXPORT$$; //height -= border_thresh * 2; //width -= border_thresh * 2; + var our_imgh = imgh; + var our_imgw = imgw; + if (imgh > height || imgw > width) { var ratio; if (imgh / height > @@ -63804,9 +63807,18 @@ var $$IMU_EXPORT$$; ratio = imgw / width; } - imgh /= ratio; - imgw /= ratio; + our_imgh /= ratio; + our_imgw /= ratio; } + + return [our_imgw, our_imgh]; + }; + + function calc_imghw_for_fit(width, height) { + var new_imghw = get_imghw_for_fit(width, height); + + imgw = new_imghw[0]; + imgh = new_imghw[1]; } if (initial_zoom_behavior === "fit") { @@ -63833,6 +63845,116 @@ var $$IMU_EXPORT$$; popup_top = sct + Math.min(Math.max((vh / 2) - (imgh / 2), 0), Math.max(vh - imgh, 0)); popup_left = scl + Math.min(Math.max((vw / 2) - (imgw / 2), 0), Math.max(vw - imgw, 0)); } else if (mouseover_position === "beside_cursor") { + var update_imghw; + if (resize) { + update_imghw = function(w, h) { + calc_imghw_for_fit(w, h); + }; + } else { + update_imghw = nullfunc; + } + + var calc_imgrect = function(w, h) { + var new_imghw = [imgw, imgh]; + + if (resize) { + new_imghw = get_imghw_for_fit(w, h); + } + + if (new_imghw[0] > w || new_imghw[1] > h) + return null; + + return new_imghw; + }; + + var cursor_thresh = border_thresh; + var ovw = vw - cursor_thresh; + var ovh = vh - cursor_thresh; + + var calc_imgposd = function(lefttop, info, popupd) { + var moused = lefttop ? v_mx : v_my; + var vd = lefttop ? ovw : ovh; + + switch (info) { + case -1: + return Math.min(vd - popupd, Math.max(0, moused - (popupd / 2))); + case 0: + return Math.max(0, moused - popupd - cursor_thresh); + case 1: + return Math.min(vd - popupd, moused + cursor_thresh); + } + }; + + var all_rects = [ + // top + [-1, 0, ovw, v_my - cursor_thresh], + // right + [1, -1, ovw - v_mx - cursor_thresh, ovh], + // bottom + [-1, 1, ovw, ovh - v_my - cursor_thresh], + // left + [0, -1, v_mx - cursor_thresh, ovh] + ]; + + var rects = []; + + // TODO: move the current popup position to the top + + if (x > viewport[0] / 2) { + rects.push(all_rects[3]); + } else { + rects.push(all_rects[1]); + } + + if (y > viewport[1] / 2) { + rects.push(all_rects[0]); + } else { + rects.push(all_rects[2]); + } + + for (var i = 0; i < all_rects.length; i++) { + if (rects.indexOf(all_rects[i]) < 0) { + rects.push(all_rects[i]); + } + } + + var largest_rectsize = -1; + var largest_rect = null; + var largest_origrect = null; + + for (var i = 0; i < rects.length; i++) { + var our_rect = calc_imgrect(rects[i][2], rects[i][3]); + if (!our_rect) + continue; + + var our_rectsize = our_rect[0] * our_rect[1]; + if (our_rectsize > largest_rectsize) { + largest_rectsize = our_rectsize; + largest_rect = our_rect; + largest_origrect = rects[i]; + } + } + + if (!largest_origrect) { + largest_rectsize = -1; + for (var i = 0; i < rects.length; i++) { + var rectsize = rects[i][2] * rects[i][3]; + if (rectsize > largest_rectsize) { + largest_origrect = rects[i]; + largest_rectsize = rectsize; + } + } + } + + if (largest_origrect) { + update_imghw(largest_origrect[2], largest_origrect[3]); + + popup_top = calc_imgposd(false, largest_origrect[1], imgh); + popup_left = calc_imgposd(true, largest_origrect[0], imgw); + } else { + // ??? + } + } else if (mouseover_position === "beside_cursor_old") { // TODO: maybe improve this to be more interpolated? var popupx;
7
diff --git a/src/crawlers/puppeteer_crawler.js b/src/crawlers/puppeteer_crawler.js @@ -82,7 +82,8 @@ import { openSessionPool } from '../session_pool/session_pool'; * response: Response, * page: Page, * puppeteerPool: PuppeteerPool, - * autoscaledPool: AutoscaledPool + * autoscaledPool: AutoscaledPool, + * session: Session, * } * ``` * @@ -173,6 +174,13 @@ import { openSessionPool } from '../session_pool/session_pool'; * If you're not sure, just keep the default value and the concurrency will scale up automatically. * @param {Object} [options.maxConcurrency=1000] * Sets the maximum concurrency (parallelism) for the crawl. Shortcut to the corresponding {@link AutoscaledPool} option. + * @param {Boolean} [options.useSessionPool=false] + * If set to true Crawler will automatically use Session Pool. It will automatically retire sessions on 403, 401 and 429 status codes. + * It also marks Session as bad after a request timeout. + * @param {Object} [options.sessionPoolOptions] + * Custom options passed to the underlying {@link SessionPool} constructor. + * @param {Boolean} [options.persistCookiesPerSession] + * Automatically saves cookies to Session. Works only if Session Pool is used. */ class PuppeteerCrawler { constructor(options) {
7