code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/app/models/carto/visualization.rb b/app/models/carto/visualization.rb @@ -102,8 +102,6 @@ class Carto::Visualization < ActiveRecord::Base after_save :propagate_attribution_change after_save :propagate_privacy_and_name_to, if: :table - before_destroy :backup_visualization - after_commit :perform_invalidations attr_accessor :register_table_only @@ -775,21 +773,6 @@ class Carto::Visualization < ActiveRecord::Base end end - def backup_visualization - return true if remote? - - if user.has_feature_flag?(Carto::VisualizationsExportService::FEATURE_FLAG_NAME) && map - Carto::VisualizationsExportService.new.export(id) - end - rescue => exception - # Don't break deletion flow - CartoDB::Logger.error( - message: 'Error backing up visualization', - exception: exception, - visualization_id: id - ) - end - def invalidation_service @invalidation_service ||= Carto::VisualizationInvalidationService.new(self) end
2
diff --git a/PostBanDeletedPosts.user.js b/PostBanDeletedPosts.user.js // @description When user posts on SO Meta regarding a post ban, fetch and display deleted posts (must be mod) and provide easy way to copy the results into a comment // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 1.5.1 +// @version 1.5.2 // // @include https://meta.stackoverflow.com/questions/* // function toShortLink(str, newdomain = null) { // Match ids in string, prefixed with either a / or # - const ids = str.match(/(?<=[/#])(\d+)/g); + const ids = str.match(/[\/#](\d+)/g); // Get last occurance of numeric id in string - const pid = ids.pop(); + const pid = ids.pop().replace(/\D+/g, ''); // Q (single id) or A (multiple ids) const qa = ids.length > 1 ? 'a' : 'q';
2
diff --git a/js/core/bis_bidsutils.js b/js/core/bis_bidsutils.js @@ -228,7 +228,7 @@ let dicom2BIDS = async function (opts) { } } - dicomobj.job.push({ + dicomobj.files.push({ name: name, filename: fname.substr(outputdirectory.length + 1, fname.length), tag: tagname, @@ -293,7 +293,6 @@ let dicom2BIDS = async function (opts) { } function makeBIDSFilename(filename, directory) { - console.log('make bids filename', filename, directory); let splitsubdirectory = subjectdirectory.split('/'); let fileExtension = filename.split('.'); if (fileExtension.length > 2 && fileExtension[fileExtension.length - 2] === 'nii' && fileExtension[fileExtension.length - 1] === 'gz') { @@ -380,10 +379,11 @@ let syncSupportingFiles = (changedFiles, baseDirectory) => { for (let i = 0; i < settings.files.length; i++) { let settingsFilename = settings.files[i].name; - console.log('settings filename', settingsFilename, oldFilename); if (settingsFilename.includes(oldFilename)) { let supportingFiles = settings.files[i].supportingfiles; + //new supporting file list for writeback + let newSupportingFileList = []; for (let supportingFile of supportingFiles) { //file extension could be in two parts, e.g. like '.nii.gz' @@ -406,18 +406,31 @@ let syncSupportingFiles = (changedFiles, baseDirectory) => { console.log('old location', oldFilepath, 'new location', newFilepath); bis_genericio.moveDirectory(oldFilepath + '&&' + newFilepath); - - //TODO: update settings + newSupportingFileList.push(newFilepath); } + //'name' should be the base filename without an extension, 'filename' and 'supportingfiles' should be the last three files in the path (the location within the bids directory) + let splitNewPath = file.new.split('/'); + for (let i = 0; i < newSupportingFileList.length; i++) { + let splitSuppPath = newSupportingFileList[i].split('/'); + newSupportingFileList[i] = splitSuppPath.slice(splitSuppPath.length - 3).join('/'); + } + let filename = splitNewPath.slice(splitNewPath.length - 3).join('/'); + let name = splitNewPath.slice(splitNewPath.length - 1); + name = name[0].split('.')[0]; + let settingsEntry = settings.files[i]; + settingsEntry.name = name; + settingsEntry.filename = filename; + settingsEntry.supportingfiles = newSupportingFileList; } } } - scheduleWriteback(settingsFilename); + console.log('new settings', settings); + scheduleWriteback(settings); }); @@ -452,8 +465,9 @@ let getSettingsFile = (filename = '') => { //TODO: implement function let scheduleWriteback = () => { + console.log('TODO: implement scheduleWriteback!'); +}; -} /** * Calculates checksums for each of the NIFTI files in the BIDS directory. *
1
diff --git a/README.md b/README.md - [Props](#props) - [Columns](#columns) - [Column Header Groups](#column-header-groups) -- [Custom Cell and Header Rendering](#custom-cell-and-header-rendering) +- [Custom Cell and Header and Footer Rendering](#custom-cell-header-and-footer-rendering) - [Styles](#styles) - [Custom Props](#custom-props) - [Pivoting and Aggregation](#pivoting-and-aggregation)
1
diff --git a/src/core-layers/path-layer/path-layer-vertex-64.glsl.js b/src/core-layers/path-layer/path-layer-vertex-64.glsl.js @@ -50,6 +50,7 @@ varying float vPathPosition; varying float vPathLength; const float EPSILON = 0.001; +const float PIXEL_EPSILON = 0.1; float flipIfTrue(bool flag) { return -(float(flag) * 2. - 1.); @@ -79,8 +80,12 @@ vec3 lineJoin(vec2 prevPoint64[2], vec2 currPoint64[2], vec2 nextPoint64[2]) { float offsetScale; float offsetDirection; - vec2 dirA = lenA > 0. ? deltaA / lenA : vec2(1.0, 0.0); - vec2 dirB = lenB > 0. ? deltaB / lenB : vec2(1.0, 0.0); + // when two points are closer than PIXEL_EPSILON in pixels, + // assume they are the same point to avoid precision issue + lenA = lenA > PIXEL_EPSILON ? lenA : 0.0; + lenB = lenB > PIXEL_EPSILON ? lenB : 0.0; + vec2 dirA = lenA > 0. ? deltaA / lenA : vec2(0.0, 0.0); + vec2 dirB = lenB > 0. ? deltaB / lenB : vec2(0.0, 0.0); vec2 perpA = vec2(-dirA.y, dirA.x); vec2 perpB = vec2(-dirB.y, dirB.x);
3
diff --git a/src/sdk/base/stream.js b/src/sdk/base/stream.js * @function close * @desc This function closes the stream. <br><b>Remarks:</b><br> - If the stream has audio and/or video, it also stops capturing camera/microphone. Once a LocalStream is closed, it is no longer usable. This function does not unpublish certain stream and it does not deal with UI logical either. After a stream is closed, "Ended" event will be fired. + If the stream has audio and/or video, it also stops capturing from camera/microphone. Once a LocalStream is closed, it is no longer usable. This function does not unpublish certain stream and it does not deal with UI logical either. After a stream is closed, "Ended" event will be fired. * @memberOf Woogeen.Stream * @instance * @example
1
diff --git a/example/src/components/CustomIcon.js b/example/src/components/CustomIcon.js @@ -34,10 +34,13 @@ class CustomIcon extends React.Component { } async onPress(e) { + let feature = MapboxGL.geoUtils.makeFeature(e.geometry); + feature.id = '' + Date.now(); + this.setState({ featureCollection: MapboxGL.geoUtils.addToFeatureCollection( this.state.featureCollection, - MapboxGL.geoUtils.makeFeature(e.geometry), + feature, ), }); }
3
diff --git a/src/views/communitySettings/index.js b/src/views/communitySettings/index.js @@ -47,7 +47,11 @@ class CommunitySettings extends React.Component<Props> { const communitySlug = community && community.slug; if (community && community.id) { - if (!community.communityPermissions.isOwner) { + const canViewCommunitySettings = + community.communityPermissions.isOwner || + community.communityPermissions.isModerator; + + if (!canViewCommunitySettings) { return ( <AppViewWrapper> <Titlebar
11
diff --git a/src/webgl.js b/src/webgl.js +import { isPowerOf2 } from './math_utils.js' + class gltfWebGl { constructor() @@ -80,7 +82,6 @@ class gltfWebGl } let generateMips = true; - let rectangleImage = false; for (const src of images) { @@ -102,14 +103,13 @@ class gltfWebGl WebGl.context.texImage2D(image.type, image.miplevel, textureInfo.colorSpace, textureInfo.colorSpace, WebGl.context.UNSIGNED_BYTE, image.image); } - if (image.image.width != image.image.height) + if (!isPowerOf2(image.image.width) || !isPowerOf2(image.image.height)) { - rectangleImage = true; generateMips = false; } } - this.setSampler(gltfSampler, gltfTex.type, rectangleImage); + this.setSampler(gltfSampler, gltfTex.type, !generateMips); if (textureInfo.generateMips && generateMips) {
14
diff --git a/packages/cli/src/models/files/ZosNetworkFile.js b/packages/cli/src/models/files/ZosNetworkFile.js @@ -232,13 +232,29 @@ export default class ZosNetworkFile { this.data.proxies[fullname].push(info) } - updateProxy({ package: proxyPackage, contract: proxyContract, address: proxyAddress }, fn) { - const fullname = toContractFullName(proxyPackage, proxyContract) - const index = _.findIndex(this.data.proxies[fullname], { address: proxyAddress }) + removeProxy(thepackage, alias, address) { + const fullname = toContractFullName(thepackage, alias) + const index = this.indexOfProxy(fullname, address) + if(index < 0) return + this.data.proxies[fullname].splice(index, 1) + if(this.proxiesOf(fullname).length === 0) delete this.data.proxies[fullname] + } + + updateProxy({ package: proxyPackageName, contract: proxyContractName, address: proxyAddress }, fn) { + const fullname = toContractFullName(proxyPackageName, proxyContractName) + const index = this.indexOfProxy(fullname, proxyAddress) if (index === -1) throw Error(`Proxy ${fullname} at ${proxyAddress} not found in network file`) this.data.proxies[fullname][index] = fn(this.data.proxies[fullname][index]); } + indexOfProxy(fullname, address) { + return _.findIndex(this.data.proxies[fullname], { address }) + } + + proxiesOf(fullname) { + return this.data.proxies[fullname] || [] + } + write() { fs.writeJson(this.fileName, this.data) log.info(`Successfully written ${this.fileName}`)
0
diff --git a/src/components/ProductGridHero/ProductGridHero.js b/src/components/ProductGridHero/ProductGridHero.js @@ -2,13 +2,11 @@ import React, { Component } from "react"; import PropTypes from "prop-types"; import { withStyles } from "@material-ui/core/styles"; import Grid from "@material-ui/core/Grid"; -import Img from "components/Img"; +import ProgressiveImage from "@reactioncommerce/components/ProgressiveImage/v1"; const styles = (theme) => ({ - heroImg: { - width: "100%", - height: "325px", - objectFit: "cover" + heroContainer: { + paddingTop: "30%" }, heroGridContainer: { maxWidth: theme.layout.mainContentMaxWidth, @@ -37,7 +35,7 @@ export default class ProductGridHero extends Component { <section className={classes.heroGridContainer}> <Grid container spacing={24}> <Grid item xs={12}> - <Img isHero src={heroMediaUrl} /> + <ProgressiveImage src={heroMediaUrl} className={classes.heroContainer} /> </Grid> </Grid> </section>
14
diff --git a/templates/examples/extensions/js_lambda_hooks/KendraFallback/KendraFallback.js b/templates/examples/extensions/js_lambda_hooks/KendraFallback/KendraFallback.js @@ -134,7 +134,7 @@ async function routeKendraRequest(event, context) { var j; for (j=0; j<len; j++) { elem = element.AdditionalAttributes[0].Value.TextWithHighlightsValue.Highlights[j]; - let offset = 2*j; + let offset = 4*j; let beginning = answerTextMd.substring(0, elem.BeginOffset+offset); let highlight = answerTextMd.substring(elem.BeginOffset+offset, elem.EndOffset+offset); let rest = answerTextMd.substr(elem.EndOffset+offset); @@ -142,10 +142,10 @@ async function routeKendraRequest(event, context) { if (elem.TopAnswer == true) { seenTop = true; answerMessage = 'Answer from Amazon Kendra: ' + highlight; - answerTextMd = '*' + highlight + '* '; + answerTextMd = '**' + highlight + '** '; break; } else { - answerTextMd = beginning + '*' + highlight + '*' + rest; + answerTextMd = beginning + '**' + highlight + '**' + rest; } }; answerMessageMd = faqanswerMessageMd + '\n\n' + answerTextMd; @@ -167,11 +167,11 @@ async function routeKendraRequest(event, context) { var j; for (j=0; j<len; j++) { elem = element.AdditionalAttributes[1].Value.TextWithHighlightsValue.Highlights[j]; - let offset = 2*j; + let offset = 4*j; let beginning = answerTextMd.substring(0, elem.BeginOffset+offset); let highlight = answerTextMd.substring(elem.BeginOffset+offset, elem.EndOffset+offset); let rest = answerTextMd.substr(elem.EndOffset+offset); - answerTextMd = beginning + '*' + highlight + '*' + rest; + answerTextMd = beginning + '**' + highlight + '**' + rest; }; answerMessageMd = faqanswerMessageMd + '\n\n' + answerTextMd; kendraQueryId = res.QueryId; // store off the QueryId to use as a session attribute for feedback @@ -187,11 +187,11 @@ async function routeKendraRequest(event, context) { var j; for (j=0; j<len; j++) { elem = element.DocumentExcerpt.Highlights[j]; - let offset = 2*j; + let offset = 4*j; let beginning = docInfo.text.substring(0, elem.BeginOffset+offset); let highlight = docInfo.text.substring(elem.BeginOffset+offset, elem.EndOffset+offset); let rest = docInfo.text.substr(elem.EndOffset+offset); - docInfo.text = beginning + '*' + highlight + '*' + rest; + docInfo.text = beginning + '**' + highlight + '**' + rest; }; docInfo.uri = element.DocumentURI;
3
diff --git a/src/govuk/components/components.template.test.js b/src/govuk/components/components.template.test.js @@ -52,7 +52,7 @@ describe('Components', () => { // Allow for multiple buttons in the same form to have the same name // (as in the cookie banner examples) - 'form-dup-name': 'off', + 'form-dup-name': ['error', { shared: ['radio', 'checkbox', 'submit'] }], // Allow pattern attribute on input type="number" 'input-attributes': 'off',
11
diff --git a/token-metadata/0x1dFEc1Cf1336c572c2D2E34fe8F6Aa2F409C8251/metadata.json b/token-metadata/0x1dFEc1Cf1336c572c2D2E34fe8F6Aa2F409C8251/metadata.json "symbol": "MTBK", "address": "0x1dFEc1Cf1336c572c2D2E34fe8F6Aa2F409C8251", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/packages/app/test/integration/models/v5.page.test.js b/packages/app/test/integration/models/v5.page.test.js @@ -429,7 +429,8 @@ describe('Page', () => { const page = await Page.findOne({ path: '/mup16_top/mup9_pub/mup10_pub/mup11_awl', grant: Page.GRANT_RESTRICTED }); const page1 = await Page.findOne({ path: '/mup16_top/mup9_pub' }); const page2 = await Page.findOne({ path: '/mup16_top/mup9_pub/mup10_pub' }); - expectAllToBeTruthy([top, page]); + expect(top).toBeTruthy(); + expect(page).toBeTruthy(); expect(page1).toBeNull(); expect(page2).toBeNull(); @@ -439,7 +440,9 @@ describe('Page', () => { const pageAF = await Page.findOne({ _id: page._id }); const page1AF = await Page.findOne({ path: '/mup16_top/mup9_pub' }); const page2AF = await Page.findOne({ path: '/mup16_top/mup9_pub/mup10_pub' }); - expectAllToBeTruthy([pageAF, page1AF, page2AF]); + expect(pageAF).toBeTruthy(); + expect(page1AF).toBeTruthy(); + expect(page2AF).toBeTruthy(); expect(pageAF.grant).toBe(Page.GRANT_PUBLIC); expect(pageAF.parent).toStrictEqual(page2AF._id);
14
diff --git a/CodingChallenges/CC_112_3D_Rendering/CC_112_3D_Rendering.pde b/CodingChallenges/CC_112_3D_Rendering/CC_112_3D_Rendering.pde @@ -41,13 +41,13 @@ void draw() { float[][] rotationX = { { 1, 0, 0}, { 0, cos(angle), -sin(angle)}, - { 0, sin(angle), cos(angle), 0} + { 0, sin(angle), cos(angle)} }; float[][] rotationY = { - { cos(angle), 0, -sin(angle)}, + { cos(angle), 0, sin(angle)}, { 0, 1, 0}, - { sin(angle), 0, cos(angle)} + { -sin(angle), 0, cos(angle)} }; PVector[] projected = new PVector[8];
1
diff --git a/runtime.js b/runtime.js @@ -97,11 +97,8 @@ const _dotifyUrl = u => /^(?:[a-z]+:|\.)/.test(u) ? u : ('./' + u); const componentHandlers = { 'swing': { - load(o, component, rigAux) { + trigger(o, component, rigAux) { physicsManager.startSwing(); - return () => { - physicsManager.stopSwing(); - }; }, }, 'wear': { @@ -163,8 +160,15 @@ const componentHandlers = { }, }, }; +const triggerComponentTypes = [ + 'swing', +]; +const loadComponentTypes = [ + 'wear', + 'sit', + 'pet', +]; -// const thingFiles = {}; const _loadGltf = async (file, {optimize = false, physics = false, physics_url = false, components = [], dynamic = false, autoScale = true, files = null, parentUrl = null, instanceId = null, monetizationPointer = null, ownerAddress = null} = {}) => { let srcUrl = file.url || URL.createObjectURL(file); if (files && _isResolvableUrl(srcUrl)) { @@ -395,15 +399,25 @@ const _loadGltf = async (file, {optimize = false, physics = false, physics_url = staticPhysicsIds.push(physicsId); } }; + mesh.triggerAux = rigAux => { + let used = false; + for (const componentType of triggerComponentTypes) { + const component = components.find(component => component.type === componentType); + if (component) { + const componentHandler = componentHandlers[component.type]; + componentHandler.trigger(mesh, component, rigAux); + } + } + return used; + }; const componentUnloadFns = []; mesh.useAux = rigAux => { let used = false; - for (const component of components) { + for (const componentType of useComponentTypes) { + const component = components.find(component => component.type === componentType); + if (component) { const componentHandler = componentHandlers[component.type]; - if (componentHandler) { - const unloadFn = componentHandler.load(mesh, component, rigAux); - componentUnloadFns.push(unloadFn); - used = true; + componentHandler.trigger(mesh, component, rigAux); } } return used; @@ -858,6 +872,17 @@ const _loadScript = async (file, {files = null, parentUrl = null, instanceId = n } }); }; + mesh.triggerAux = rigAux => { + let used = false; + for (const componentType of triggerComponentTypes) { + const component = components.find(component => component.type === componentType); + if (component) { + const componentHandler = componentHandlers[component.type]; + componentHandler.trigger(mesh, component, rigAux); + } + } + return used; + }; mesh.destroy = () => { appManager.destroyApp(appId);
0
diff --git a/Sources/Rendering/OpenGL/VolumeMapper/index.js b/Sources/Rendering/OpenGL/VolumeMapper/index.js @@ -232,21 +232,14 @@ function vtkOpenGLVolumeMapper(publicAPI, model) { ).result; const averageIPScalarRange = model.renderable.getAverageIPScalarRange(); - let min; - let max; + let min = averageIPScalarRange[0]; + let max = averageIPScalarRange[1]; // If min or max is not already a float. // make them into floats for glsl - if (Number.isInteger(averageIPScalarRange[0])) { - min = `${averageIPScalarRange[0]}.0`; - } else { - min = `${averageIPScalarRange[0]}`; - } - if (Number.isInteger(averageIPScalarRange[1])) { - max = `${averageIPScalarRange[1]}.0`; - } else { - max = `${averageIPScalarRange[1]}`; - } + min = Number.isInteger(min) ? min.toFixed(1).toString() : min.toString(); + max = Number.isInteger(max) ? max.toFixed(1).toString() : max.toString(); + FSSource = vtkShaderProgram.substitute( FSSource, '//VTK::AverageIPScalarRangeMin',
4
diff --git a/edit.js b/edit.js @@ -2911,6 +2911,7 @@ const MeshDrawer = (() => { canvas.height = checkerboardCanvas.height; const ctx = canvas.getContext('2d'); ctx.drawImage(checkerboardCanvas, 0, 0); + canvas.ctx = ctx; return canvas; }; @@ -3085,6 +3086,7 @@ const MeshDrawer = (() => { this.numPositions = 0; this.thingSources = []; + this.thingMeshes = []; } start(p) { this.lastPosition.copy(p); @@ -3102,6 +3104,7 @@ const MeshDrawer = (() => { thingMesh.setGeometryData(thingSource); thingMesh.setTexture(thingSource); chunkMeshContainer.add(thingMesh); + this.thingMeshes.push(thingMesh); // chunkMeshContainer.updateMatrixWorld(); // thingSource.matrixWorld = thingMesh.matrixWorld.clone(); @@ -5603,8 +5606,11 @@ function animate(timestamp, frame) { console.log('click paintbrush 1'); if (raycastChunkSpec && raycastChunkSpec.objectId !== 0) { - const thingSource = meshDrawer.thingSources.find(thingSource => thingSource.objectId === raycastChunkSpec.objectId); - if (thingSource) { + const index = meshDrawer.thingSources.findIndex(thingSource => thingSource.objectId === raycastChunkSpec.objectId); + if (index !== -1) { + const thingSource = meshDrawer.thingSources[index]; + const thingMesh = meshDrawer.thingMeshes[index]; + const {point, faceIndex} = raycastChunkSpec; const {geometryData: {positions, uvs, indices}} = thingSource; const ai = indices[faceIndex*3]; @@ -5618,12 +5624,13 @@ function animate(timestamp, frame) { const uva = new THREE.Vector2().fromArray(uvs, ai*3); const uvb = new THREE.Vector2().fromArray(uvs, bi*3); const uvc = new THREE.Vector2().fromArray(uvs, ci*3); - // const localPoint = point.clone().applyMatrix4(localMatrix2.getInverse(currentChunkMesh.matrixWorld)); const uv = THREE.Triangle.getUV(point, tri.a, tri.b, tri.c, uva, uvb, uvc, new THREE.Vector2()); - // const midpoint = tri.getMidpoint(new THREE.Vector3()).applyMatrix4(localMatrix2.getInverse(currentChunkMesh.matrixWorld)); - // const normal = tri.getNormal(new THREE.Vector3()); - // const baryCoord = tri.getBarycoord(localPoint, new THREE.Vector3()); - console.log('painting', currentChunkMesh, raycastChunkSpec, thingSource, tri, point.toArray(), uv.toArray()); + // console.log('painting', currentChunkMesh, raycastChunkSpec, thingSource, tri, point.toArray(), uv.toArray()); + const f = 10; + const canvas = thingMesh.material.uniforms.tex.value.image; + canvas.ctx.fillStyle = '#000'; + canvas.ctx.fillRect(uv.x * canvas.width - f/2, (1-uv.y) * canvas.height - f/2, f, f); + thingMesh.material.uniforms.tex.value.needsUpdate = true; } } break;
0
diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss .primary-amount { color: #333; - font-family: 'ProximaNova-Semibold'; + font-weight: bold; input, .unit, .primary-amount-display { font-size: 1.8em; .button-primary { background-color: $v-primary-color; border-radius: 0; - font-family: 'ProximaNova-Semibold'; + font-weight: bold; } .button-primary[disabled] { background-color: $v-button-primary-disabled-bg; + opacity: 1; } }
1
diff --git a/src/angular/projects/spark-core-angular/package.json b/src/angular/projects/spark-core-angular/package.json "@angular/platform-browser": "^6.1.4", "@angular/platform-browser-dynamic": "^6.1.4", "@angular/router": "^6.1.4", - "@sparkdesignsystem/spark-core": "2.0.0", + "@sparkdesignsystem/spark-core": "2.0.1", "lodash": "^4.17.10", "tiny-date-picker": "^3.2.6" },
3
diff --git a/Source/Core/BoxOutlineGeometry.js b/Source/Core/BoxOutlineGeometry.js define([ './BoundingSphere', './Cartesian3', + './Check', './ComponentDatatype', './defaultValue', './defined', - './DeveloperError', './Geometry', './GeometryAttribute', './GeometryAttributes', @@ -13,10 +13,10 @@ define([ ], function( BoundingSphere, Cartesian3, + Check, ComponentDatatype, defaultValue, defined, - DeveloperError, Geometry, GeometryAttribute, GeometryAttributes, @@ -53,12 +53,8 @@ define([ var max = options.maximum; //>>includeStart('debug', pragmas.debug); - if (!defined(min)) { - throw new DeveloperError('options.minimum is required.'); - } - if (!defined(max)) { - throw new DeveloperError('options.maximum is required'); - } + Check.typeOf.object('min', min); + Check.typeOf.object('max', max); //>>includeEnd('debug'); this._min = Cartesian3.clone(min); @@ -89,12 +85,10 @@ define([ var dimensions = options.dimensions; //>>includeStart('debug', pragmas.debug); - if (!defined(dimensions)) { - throw new DeveloperError('options.dimensions is required.'); - } - if (dimensions.x < 0 || dimensions.y < 0 || dimensions.z < 0) { - throw new DeveloperError('All dimensions components must be greater than or equal to zero.'); - } + Check.typeOf.object('dimensions', dimensions); + Check.typeOf.number.greaterThanOrEquals('dimensions.x', dimensions.x, 0); + Check.typeOf.number.greaterThanOrEquals('dimensions.y', dimensions.y, 0); + Check.typeOf.number.greaterThanOrEquals('dimensions.z', dimensions.z, 0); //>>includeEnd('debug'); var corner = Cartesian3.multiplyByScalar(dimensions, 0.5, new Cartesian3()); @@ -127,9 +121,7 @@ define([ */ BoxOutlineGeometry.fromAxisAlignedBoundingBox = function(boundingBox) { //>>includeStart('debug', pragmas.debug); - if (!defined(boundingBox)) { - throw new DeveloperError('boundingBox is required.'); - } + Check.typeOf.object('boundindBox', boundingBox); //>>includeEnd('debug'); return new BoxOutlineGeometry({ @@ -155,12 +147,8 @@ define([ */ BoxOutlineGeometry.pack = function(value, array, startingIndex) { //>>includeStart('debug', pragmas.debug); - if (!defined(value)) { - throw new DeveloperError('value is required'); - } - if (!defined(array)) { - throw new DeveloperError('array is required'); - } + Check.typeOf.object('value', value); + Check.defined('array', array); //>>includeEnd('debug'); startingIndex = defaultValue(startingIndex, 0); @@ -187,9 +175,7 @@ define([ */ BoxOutlineGeometry.unpack = function(array, startingIndex, result) { //>>includeStart('debug', pragmas.debug); - if (!defined(array)) { - throw new DeveloperError('array is required'); - } + Check.defined('array', array); //>>includeEnd('debug'); startingIndex = defaultValue(startingIndex, 0);
14
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml @@ -37,7 +37,7 @@ jobs: echo "APPCENTER_NAME=GoodDollar/GoodDollar-Android-development" >> $GITHUB_ENV echo "APPCENTER_TOKEN=${{ secrets.APPCENTER_ANDROID_DEV }}" >> $GITHUB_ENV echo "APPCENTER_CODEPUSH_TOKEN=${{ secrets.APPCENTER_CODEPUSH_DEV }}" >> $GITHUB_ENV - echo "APPCENTER_CODEPUSH_FLAGS=debug" >> $GITHUB_ENV + echo "APPCENTER_CODEPUSH_FLAGS='--debug'" >> $GITHUB_ENV - name: Pre-checks - Env is QA if: ${{ endsWith(github.ref, '/staging') }} run: |
0
diff --git a/src/services/application.js b/src/services/application.js @@ -525,11 +525,12 @@ export async function giveupShare( body = { team_name, share_id - } + }, + handleError ) { return request( `${apiconfig.baseUrl}/console/teams/${body.team_name}/share/${body.share_id}/giveup`, - { method: 'delete' } + { method: 'delete', handleError } ); } @@ -671,11 +672,12 @@ export async function completeShare( team_name, share_id, event_id - } + }, + handleError ) { return request( `${apiconfig.baseUrl}/console/teams/${body.team_name}/share/${body.share_id}/complete`, - { method: 'post' } + { method: 'post', handleError } ); }
1
diff --git a/src/server/views/widget/page_alerts.html b/src/server/views/widget/page_alerts.html {% endif %} {% if req.query.unlinked %} + <div class="alert alert-info py-3 px-4"> <strong>{{ t('Unlinked') }}: </strong> {{ t('page_page.notice.unlinked') }} </div> {% endif %}
14
diff --git a/packages/app/src/components/Admin/Common/AdminNavigation.jsx b/packages/app/src/components/Admin/Common/AdminNavigation.jsx @@ -2,6 +2,7 @@ import React from 'react'; import { pathUtils } from '@growi/core'; import { useTranslation } from 'next-i18next'; +import Link from 'next/link'; import PropTypes from 'prop-types'; import urljoin from 'url-join'; @@ -51,13 +52,17 @@ const AdminNavigation = (props) => { ? 'list-group-item list-group-item-action border-0 round-corner' : 'dropdown-item px-3 py-2'; + const href = isRoot ? '/admin' : urljoin('/admin', menu); + return ( + <Link href={href}> <a - href={isRoot ? '/admin' : urljoin('/admin', menu)} + href={href} className={`${pageTransitionClassName} ${isActive ? 'active' : ''}`} > <MenuLabel menu={menu} /> </a> + </Link> ); };
4
diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-leading-description-sentence/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/jsdoc-leading-description-sentence/lib/main.js // MODULES // -var doctrine = require( 'doctrine' ); +var parseJSDoc = require( 'doctrine' ).parse; var isCapitalized = require( '@stdlib/assert/is-capitalized' ); var isObject = require( '@stdlib/assert/is-object' ); var endsWith = require( '@stdlib/string/ends-with' ); -var getJSDocComment = require( '@stdlib/_tools/eslint/utils/find-jsdoc' ); +var findJSDoc = require( '@stdlib/_tools/eslint/utils/find-jsdoc' ); // VARIABLES // @@ -54,9 +54,9 @@ function main( context ) { var idx; var ast; - jsdoc = getJSDocComment( source, node ); + jsdoc = findJSDoc( source, node ); if ( isObject( jsdoc ) ) { - ast = doctrine.parse( jsdoc.value, DOPTS ); + ast = parseJSDoc( jsdoc.value, DOPTS ); desc = ast.description; idx = desc.indexOf( '\n' ); if ( idx !== -1 ) {
10
diff --git a/utilities/auth-helper.js b/utilities/auth-helper.js @@ -15,8 +15,8 @@ module.exports = { //NOTE: As of v0.29.0 routeOptions.scope is replaced with routeOptions.routeScope and //routeOptions.scope.scope is replaced with routeOptions.routeScope.rootScope - let routeScope = model.routeOptions.routeScope || model.routeOptions.scope || {}; - let rootScope = routeScope.rootScope || routeScope.scope; + let routeScope = model.routeOptions.routeScope || {}; + let rootScope = routeScope.rootScope; let scope = []; let additionalScope = null; @@ -71,10 +71,14 @@ module.exports = { //NOTE: As of v0.29.0 routeOptions.scope is replaced with routeOptions.routeScope and //routeOptions.scope.scope is replaced with routeOptions.routeScope.rootScope let routeScope = model.routeOptions.routeScope || model.routeOptions.scope || {}; + routeScope.rootScope = routeScope.rootScope || routeScope.scope; + delete routeScope.scope; + if (!routeScope.rootScope) { + delete routeScope.rootScope; + } const scope = {}; - scope.scope = ["root", model.collectionName]; scope.rootScope = ["root", model.collectionName]; scope.createScope = ["create", "create" + modelName]; scope.readScope = ["read", "read" + modelName];
1
diff --git a/components/base-adresse-nationale/postal-codes.js b/components/base-adresse-nationale/postal-codes.js @@ -7,7 +7,7 @@ function PostalCodes({codes}) { <div>{codes[0]}</div> ) : ( <div className='dropdown'> - <div className='dropdown-action'>Codes</div> + <div className='dropdown-action'>{codes.length} codes</div> <ul className='dropdown-content'> {codes.map(code => <li key={code}>{code}</li>)} </ul>
0
diff --git a/components/hero.js b/components/hero.js import React from 'react' import Link from 'next/link' import PropTypes from 'prop-types' +import {Download, Edit3, Database, Map} from 'react-feather' -import {Download, Edit3, Database} from 'react-feather' import theme from '@/styles/theme' + import ToolsIcon from './icons/tools' import BanSearch from './ban-search' - import Container from './container' +import ButtonLink from './button-link' function Hero({title, tagline}) { return ( @@ -56,7 +57,15 @@ function Hero({title, tagline}) { <p className='example'>Rechercher une adresse, une voie, un lieu-dit ou une commune dans la Base Adresse Nationale</p> + <div className='search-bar'> <BanSearch /> + <div className='map-button'> + <ButtonLink href='/base-adresse-nationale'> + <Map size={32} /> + </ButtonLink> + </div> + </div> + </Container> </div> @@ -102,6 +111,20 @@ function Hero({title, tagline}) { color: ${theme.darkText}; } + .search-bar { + display: grid; + grid-template-columns: 6fr 1fr; + grid-gap: 0.5em; + } + + .map-button { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + overflow: visible; + } + .example { font-size: 1.5em; text-align: center;
0
diff --git a/metaverse_modules/barrier/index.js b/metaverse_modules/barrier/index.js @@ -112,21 +112,30 @@ export default () => { let children = []; const physicsIds = []; const _render = () => { - const bounds = app.getComponent('bounds'); + const bounds = app.getComponent('bounds') ?? [[0, 0, 0], [4, 4, 4]]; const [min, max] = bounds; + // console.log('bounds 1', bounds, min, max); const [minX, minY, minZ] = min; const [maxX, maxY, maxZ] = max; const width = maxX - minX; const height = maxY - minY; const depth = maxZ - minZ; - const delta = app.getComponent('delta'); + console.log('bounds 2', + minX, minY, minZ, + maxX, maxY, maxZ, + width, height, depth, + ); + + const delta = app.getComponent('delta') ?? [0, 0]; const [dx, dy] = delta; const chunkOffset = new THREE.Vector3(dx * chunkWorldSize, 0, dy * chunkWorldSize); - const exits = app.getComponent('exits'); + const exits = app.getComponent('exits') ?? []; - const barrierSpecs = exits.map(exit => { + let barrierSpecs = null; + if (exits.length > 0) { + barrierSpecs = exits.map(exit => { localVector.fromArray(exit); let normal; @@ -182,6 +191,16 @@ export default () => { size: size.clone(), }; }); + } else { + barrierSpecs = [ + { + position: new THREE.Vector3(maxX + minX, maxY + minY, maxZ + minZ).multiplyScalar(0.5), + normal: new THREE.Vector3(0, 0, 1), + size: new THREE.Vector3(width, height, depth), + }, + ]; + console.log('got barrier specs', {barrierSpecs, minZ, maxZ}); + } for (const barrierSpec of barrierSpecs) { const {
0
diff --git a/web/dualviewer.html b/web/dualviewer.html bis-viewerapplicationid="#viewer_application"> </bisweb-filetreepanel> - <bisweb-dicomimportelement - id="dicom_import" - bis-viewerid="#viewer" - bis-layoutwidgetid="#viewer_layout" - bis-filetreepanelid="#bis_filetreepanel"> - </bisweb-dicomimportelement> - <bisweb-viewerapplication id="viewer_application" bis-menubarid="#viewer_menubar"
2
diff --git a/js/preload/readerDetector.js b/js/preload/readerDetector.js /* detects if a page is readerable, and tells the main process if it is */ function pageIsReaderable () { + if (document.querySelector('meta[property="og:type"][content="article"]')) { + return true + } + var paragraphMap = new Map() var paragraphs = document.querySelectorAll('p') @@ -26,7 +30,7 @@ function pageIsReaderable () { } }) - if ((largestValue > 600 && largestValue / totalLength > 0.33) || (largestValue > 400 && document.querySelector('article, meta[property="og:type"][content="article"]'))) { + if ((largestValue > 600 && largestValue / totalLength > 0.33) || (largestValue > 400 && document.querySelector('article'))) { return true } else { return false @@ -40,6 +44,11 @@ function checkReaderStatus () { } if (process.isMainFrame) { - document.addEventListener('DOMContentLoaded', checkReaderStatus) + // unlike DOMContentLoaded, readystatechange doesn't wait for <script defer>, so it happens a bit sooner + document.addEventListener('readystatechange', function () { + if (document.readyState === 'interactive') { + checkReaderStatus() + } + }) window.addEventListener('load', checkReaderStatus) }
7
diff --git a/packages/openneuro-app/src/scripts/refactor_2021/dataset/files/viewers/file-viewer-text.jsx b/packages/openneuro-app/src/scripts/refactor_2021/dataset/files/viewers/file-viewer-text.jsx import React from 'react' import PropTypes from 'prop-types' +import styled from '@emotion/styled' + +const Pre = styled.pre` + margin: 0 15px; + white-space: pre-wrap; +` const FileViewerText = ({ data }) => { const decoder = new TextDecoder() - return <pre>{decoder.decode(data)}</pre> + return <Pre>{decoder.decode(data)}</Pre> } FileViewerText.propTypes = {
7
diff --git a/src/components/index.js b/src/components/index.js @@ -6,3 +6,4 @@ export {default as FormGrid} from './FormGrid'; export {default as Grid} from './Grid'; export {default as ReactComponent} from './ReactComponent'; export {default as SubmissionGrid} from './SubmissionGrid'; +export {default as Pagination} from './Pagination';
0
diff --git a/azure-pipelines.yml b/azure-pipelines.yml @@ -14,7 +14,7 @@ jobs: - template: eslint.yml@apt -- template: node-matrix-test.yml@apt +- template: node-test.yml@apt parameters: after: - script: yarn coverage @@ -24,4 +24,5 @@ jobs: COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN) GIT_BRANCH: $(Build.SourceBranch) GIT_COMMIT_SHA: $(Build.SourceVersion) - azure_coverage: True + publish_test_results_to_pipelines: True + publish_code_coverage_to_pipelines: True
10
diff --git a/frontend/static/javascript/app/survey-builder/controllers/survey-builder-controller.js b/frontend/static/javascript/app/survey-builder/controllers/survey-builder-controller.js /** * Returns an object with the correct fields for sending to the backend from data in vm.currentQuestionFields */ - return _.pick(vm.currentQuestionFields, QUESTION_FIELDS_LIST[vm.currentQuestionFields.question_type]); + var currentQuestionObject = _.pick(vm.currentQuestionFields, QUESTION_FIELDS_LIST[vm.currentQuestionFields.question_type]); + /* Replace ASCII double-quote characters with Unicode double-quote characters, because even + when escaped, ASCII double-quote characters cause problems being passed from AngularJS to + Python to MongoDB and back. */ + currentQuestionObject.question_text = currentQuestionObject.question_text.replace(/"/g, "\u201C"); + _.forEach(currentQuestionObject.answers, function(answer, index) { + currentQuestionObject.answers[index].text = answer.text.replace(/"/g, "\u201C"); + }); + return currentQuestionObject; }; vm.checkSliderValue = function(min_or_max) {
9
diff --git a/lib/jekyll-admin/path_helper.rb b/lib/jekyll-admin/path_helper.rb @@ -56,7 +56,7 @@ module JekyllAdmin sanitized_path( case namespace when "collections" - File.join(collection.relative_directory, params["splat"].first) + File.join(collection.directory, params["splat"].first) when "data" File.join(DataFile.data_dir, params["splat"].first) when "drafts"
11
diff --git a/components/system/CodeBlock.js b/components/system/CodeBlock.js @@ -9,14 +9,14 @@ import { css } from "@emotion/react"; const customTheme = { plain: { - backgroundColor: "#2a2734", + backgroundColor: "#1f212a", color: "#6f7278", }, styles: [ { types: ["comment", "prolog", "doctype", "cdata"], style: { - color: "#6c6783", + color: "#6c6783eeebff", }, }, { @@ -46,11 +46,11 @@ const customTheme = { { types: ["property", "function"], style: { - color: "#9a86fd", + color: "#eeebff", }, }, { - types: ["tag-id", "selector", "atrule-id"], + types: ["tag-id", "selector", "atrul-id"], style: { color: "#eeebff", }, @@ -63,17 +63,13 @@ const customTheme = { }, { types: [ - "boolean", - "string", "entity", - "url", "attr-value", "keyword", "control", "directive", "unit", "statement", - "regex", "at-rule", "placeholder", "variable", @@ -82,6 +78,17 @@ const customTheme = { color: "#99ceff", }, }, + { + types: [ + "boolean", + "string", + "url", + "regex", + ], + style: { + color: "#b5ffff", + }, + }, { types: ["deleted"], style: { @@ -155,7 +162,7 @@ const STYLES_PRE = css` const STYLES_CODE = css` box-sizing: border-box; - background-color: #1f212a; + user-select: text; font-family: ${Constants.font.code}; color: ${Constants.system.gray}; width: 100%; @@ -163,6 +170,7 @@ const STYLES_CODE = css` `; class CodeBlock extends React.Component { + //defaults to js language = this.props.language ? this.props.language : "javascript"; render() { return (
3
diff --git a/src/pages/Trading/Trading.js b/src/pages/Trading/Trading.js @@ -35,10 +35,18 @@ export default class Trading extends React.PureComponent { target: '.icon-notifications', content: 'Here you can find all your notifications.', }, + { + target: '.hfui-orderformmenu__wrapper', + content: 'Here you can find all orders you need.', + }, { target: '.hfui-statusbar__wrapper', content: 'This bar shows all statuses you need to know.', }, + { + target: '.hfui-statusbar__left', + content: 'Version of your app, there will be "Update" button, if you are running old version.', + }, ], } constructor(props) {
3
diff --git a/README.md b/README.md <p align="center"> <a href=https://github.com/1Computer1/discord-akairo> - <img src=https://u.nya.is/fweoqf.png/> + <img src="https://a.safe.moe/PwUgW.png"/> </a> </p> <p align="center"> <a href=https://www.npmjs.com/package/discord-akairo> - <img src=https://img.shields.io/npm/v/discord-akairo.svg?maxAge=3600/> + <img src="https://img.shields.io/npm/v/discord-akairo.svg?maxAge=3600"/> </a> <a href=https://david-dm.org/1computer1/discord-akairo> - <img src=https://david-dm.org/1computer1/discord-akairo.svg/> + <img src="https://david-dm.org/1computer1/discord-akairo.svg"/> </a> <a href=https://travis-ci.org/1Computer1/discord-akairo> - <img src=https://travis-ci.org/1Computer1/discord-akairo.png?branch=indev/> + <img src="https://travis-ci.org/1Computer1/discord-akairo.svg?branch=indev"/> </a> </p> <p align="center"> <a href=https://nodei.co/npm/discord-akairo> - <img src=https://nodei.co/npm/discord-akairo.png?downloads=true/> + <img src="https://nodei.co/npm/discord-akairo.png?downloads=true"/> </a> </p>
1
diff --git a/test/conference.jenkinsfile b/test/conference.jenkinsfile void setBuildStatus(String message, String state) { step([ $class: "GitHubCommitStatusSetter", - reposSource: [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/open-media-streamer/oms-client-javascript"], + reposSource: [$class: "ManuallyEnteredRepositorySource", url: "${REPO_URL}/owt-client-javascript"], contextSource: [$class: "ManuallyEnteredCommitContextSource", context: "ci/jenkins/conference"], errorHandlers: [[$class: "ChangingBuildStatusErrorHandler", result: "UNSTABLE"]], statusResultSource: [ $class: "ConditionalStatusResultSource", results: [[$class: "AnyBuildResult", message: message, state: state]] ] @@ -32,7 +32,7 @@ pipeline { ]){ node ('pack-mcu') { container ('pack-on-centos') { - sh "/root/packSDKInDocker.sh software $env.CHANGE_BRANCH $env.GIT_BRANCH $env.CHANGE_ID" + sh "/root/packSDKInDocker.sh software $env.GIT_COMMIT $env.GIT_BRANCH $env.CHANGE_ID" } } } @@ -49,7 +49,7 @@ pipeline { node('api-test') { container('api-test') { - sh "/root/start.sh ${env.GIT_BRANCH}1 ConferenceClient_api" + sh "/root/start.sh ${env.GIT_COMMIT}1 ConferenceClient_api" } } } @@ -64,7 +64,7 @@ pipeline { node('subscribe-test') { container('subscribe-test') { - sh "/root/start.sh ${env.GIT_BRANCH}2 ConferenceClient_subscribe" + sh "/root/start.sh ${env.GIT_COMMIT}2 ConferenceClient_subscribe" } } }
14
diff --git a/bin/exception.js b/bin/exception.js @@ -45,10 +45,6 @@ EnforcerException.prototype.at = function (key) { return at[key]; }; -EnforcerException.prototype.clearCache = function () { - return this; -}; - EnforcerException.prototype[inspect] = function () { if (this.hasException) { return '[ EnforcerException: ' + toString(this, null, ' ') + ' ]'; @@ -121,8 +117,6 @@ Object.defineProperties(EnforcerException.prototype, { hasException: { get: function () { - if (!this.cache) this.cache = {}; - const children = this.children; if (children.message.length) { @@ -142,8 +136,6 @@ Object.defineProperties(EnforcerException.prototype, { const length2 = keys.length; for (let i = 0; i < length2; i++) { if (children.at[keys[i]].hasException) { - // cache.hasException = true; - // break; return true } }
2
diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js const classes = { actionbar: `${pfx}actionbar`, button: `${pfx}action`, - active: `${pfx}active`, - inactive: `${pfx}inactive`, - disabled: `${pfx}disabled` + active: `${pfx}active` }; const rte = new RichTextEditor({ el, * } * } * }) - * // An example with state - * const isValidAnchor = (rte) => { - * // a utility function to help determine if the selected is a valid anchor node - * const anchor = rte.selection().anchorNode; - * const parentNode = anchor && anchor.parentNode; - * const nextSibling = anchor && anchor.nextSibling; - * return (parentNode && parentNode.nodeName == 'A') || (nextSibling && nextSibling.nodeName == 'A') - * } - * rte.add('toggleAnchor', { - * icon: `<span style="transform:rotate(45deg)">&supdsub;</span>`, - * state: (rte, doc) => { - * if (rte && rte.selection()) { - * // `btnState` is a integer, -1 for disabled, 0 for inactive, 1 for active - * return isValidAnchor(rte) ? btnState.ACTIVE : btnState.INACTIVE; - * } else { - * return btnState.INACTIVE; - * } - * }, - * result: (rte, action) => { - * if (isValidAnchor(rte)) { - * rte.exec('unlink'); - * } else { - * rte.insertHTML(`<a class="link" href="">${rte.selection()}</a>`); - * } - * } - * }) */ add(name, action = {}) { action.name = name; } }; }; - \ No newline at end of file
13
diff --git a/src/plots/polar/layout_defaults.js b/src/plots/polar/layout_defaults.js @@ -203,6 +203,7 @@ function handleAxisTypeDefaults(axIn, axOut, coerce, subplotData, dataAttr, opti if(trace && trace[dataAttr]) { axOut.type = autoType(trace[dataAttr], 'gregorian', { + noMultiCategory: true, autotypenumbers: autotypenumbers }); }
0
diff --git a/src/lib/API/api.js b/src/lib/API/api.js // @flow import axios from 'axios' -import type { Axios, AxiosPromise } from 'axios' +import type { Axios, AxiosPromise, $AxiosXHR } from 'axios' import Config from '../../config/config' import { AsyncStorage } from 'react-native' import logger from '../logger/pino-logger' @@ -52,6 +52,16 @@ class API { } } + async sendOTP(user: UserRecord) { + try { + const res = await this.client.post('/user/mobile', { user }) + log.info(res) + } catch (e) { + log.error(e) + throw e + } + } + async verifyUser(verificationData: any) { try { let res = await this.client.post('/verify/user', { verificationData }) @@ -61,6 +71,10 @@ class API { throw e } } + + async verifyMobile(verificationData: any): Promise<$AxiosXHR<any>> { + return this.client.post('/verify/mobile', { verificationData }) + } } export default new API()
0
diff --git a/src/group.js b/src/group.js @@ -172,6 +172,12 @@ var _ = Mavo.Group = class Group extends Mavo.Node { .reverse()[0]; } + if (!property) { + // No appropriate property found, use this.property + property = this.property; + var noWriteableProperty = true; + } + data = {[property]: data}; this.data = Mavo.subset(this.data, this.inPath, data); @@ -216,7 +222,7 @@ var _ = Mavo.Group = class Group extends Mavo.Node { }); } - if (!wasPrimitive) { + if (!wasPrimitive || noWriteableProperty) { // Fire mv-change events for properties not in the template, // since nothing else will and they can still be referenced in expressions var oldData = Mavo.subset(this.oldData, this.inPath);
1
diff --git a/core/extension/openseadragon-overlays-manage.js b/core/extension/openseadragon-overlays-manage.js for(let j = 0;j < layer.data.length;j++){ const path = layer.data[j].geometry.path; const style = layer.data[j].properties.style; - if(path.contains(img_point.x,img_point.y)){ + if(layer.hoverable&&path.contains(img_point.x,img_point.y)){ this.resize(); this.highlightPath = path; this.highlightStyle = style; this.highlightLayer = layer; this.highlightLayer.data.selected = j; - if(layer.hoverable) this.drawOnCanvas(this.drawOnHover,[this._hover_ctx_,this._div,path,style]); + this.drawOnCanvas(this.drawOnHover,[this._hover_ctx_,this._div,path,style]); return; }else{ this.highlightPath = null; const path = features[j].geometry.path; const style = features[j].properties.style; this.subIndex = null; - if(path.contains(img_point.x,img_point.y)){ + if(layer.hoverable&&path.contains(img_point.x,img_point.y)){ this.resize(); this.highlightPath = path; this.highlightStyle = style; this.highlightLayer = layer; this.highlightLayer.data.selected = j; - if(layer.hoverable) this.drawOnCanvas(this.drawOnHover,[this._hover_ctx_,this._div,path,style]); + this.drawOnCanvas(this.drawOnHover,[this._hover_ctx_,this._div,path,style]); return; }else{ this.highlightPath = null;
1
diff --git a/scss/variables.scss b/scss/variables.scss @@ -46,7 +46,7 @@ $route-item-triangle-height:50px; $balanced: #07a289; $energized: #ffe76e; $assertive: #ff6c6a; -$royal: #4b3863; /* #4b3863 */ /* #009639 */ +$royal: #4b3863; $dark: #444; $positive: $royal; /* override default buttons for dialog boxes */
13
diff --git a/src/js/admin.js b/src/js/admin.js @@ -1739,12 +1739,12 @@ $(document).ready(function () { var tabsInfo = { 'tab-intro': {order: 1, icon: 'apps'}, - 'tab-adapters': {order: 5, icon: 'store', host: true}, - 'tab-instances': {order: 10, icon: 'subtitles', host: true}, - 'tab-objects': {order: 15, icon: 'view_list'}, - 'tab-enums': {order: 20, icon: 'art_track'}, - 'tab-logs': {order: 25, icon: 'view_headline', host: true}, - 'tab-info': {order: 30, icon: 'info', host: true}, + 'tab-info': {order: 5, icon: 'info', host: true}, + 'tab-adapters': {order: 10, icon: 'store', host: true}, + 'tab-instances': {order: 15, icon: 'subtitles', host: true}, + 'tab-objects': {order: 20, icon: 'view_list'}, + 'tab-enums': {order: 25, icon: 'art_track'}, + 'tab-logs': {order: 30, icon: 'view_headline', host: true}, 'tab-scenes': {order: 35, icon: 'subscriptions'}, 'tab-events': {order: 40, icon: 'flash_on'}, 'tab-users': {order: 45, icon: 'person_outline'},
14
diff --git a/diorama.js b/diorama.js @@ -10,6 +10,7 @@ import {planeGeometry} from './background-fx/common.js'; import {OutlineBgFxMesh} from './background-fx/OutlineBgFx.js'; import {NoiseBgFxMesh} from './background-fx/NoiseBgFx.js'; import {PoisonBgFxMesh} from './background-fx/PoisonBgFx.js'; +import {SmokeBgFxMesh} from './background-fx/SmokeBgFx.js'; import { fullscreenVertexShader, animeLightningFragmentShader, @@ -478,6 +479,7 @@ const grassMesh = (() => { })(); const noiseMesh = new NoiseBgFxMesh(); const poisonMesh = new PoisonBgFxMesh(); +const smokeMesh = new SmokeBgFxMesh(); const glyphMesh = (() => { const textureLoader = new THREE.TextureLoader(); const quad = new THREE.Mesh( @@ -627,6 +629,7 @@ sideScene.add(radialMesh); sideScene.add(grassMesh); sideScene.add(noiseMesh); sideScene.add(poisonMesh); +sideScene.add(smokeMesh); sideScene.add(glyphMesh); sideScene.add(outlineMesh); sideScene.add(labelMesh); @@ -695,6 +698,7 @@ const createPlayerDiorama = ({ grassBackground = false, noiseBackground = false, poisonBackground = false, + smokeBackground = false, lightningBackground = false, radialBackground = false, glyphBackground = false, @@ -746,6 +750,7 @@ const createPlayerDiorama = ({ grassBackground, noiseBackground, poisonBackground, + smokeBackground, lightningBackground, radialBackground, glyphBackground, @@ -753,6 +758,7 @@ const createPlayerDiorama = ({ grassBackground = false; noiseBackground = false; poisonBackground = false; + smokeBackground = false; lightningBackground = false; radialBackground = false; glyphBackground = false; @@ -761,6 +767,8 @@ const createPlayerDiorama = ({ } else if (oldValues.noiseBackground) { poisonBackground = true; } else if (oldValues.poisonBackground) { + smokeBackground = true; + } else if (oldValues.smokeBackground) { lightningBackground = true; } else if (oldValues.lightningBackground) { radialBackground = true; @@ -910,6 +918,12 @@ const createPlayerDiorama = ({ } else { poisonMesh.visible = false; } + if (smokeBackground) { + smokeMesh.update(timeOffset, timeDiff, this.width, this.height); + smokeMesh.visible = true; + } else { + smokeMesh.visible = false; + } if (lightningBackground) { lightningMesh.material.uniforms.iTime.value = timeOffset / 1000; lightningMesh.material.uniforms.iTime.needsUpdate = true;
0
diff --git a/src/components/toastNotification/view/toastNotificaitonView.js b/src/components/toastNotification/view/toastNotificaitonView.js import React, { Component } from 'react'; import { TouchableOpacity, Text } from 'react-native'; -import Animated, { Easing } from 'react-native-reanimated'; +import * as Animatable from 'react-native-animatable'; // Styles import styles from './toastNotificationStyles'; @@ -13,69 +13,60 @@ class ToastNotification extends Component { constructor(props) { super(props); - this.animatedValue = new Animated.Value(0); } + handleViewRef = (ref) => (this.view = ref); + // Component Functions - _showToast() { - const { duration } = this.props; - Animated.timing(this.animatedValue, { - toValue: 1, - duration: 350, - easing: Easing.inOut(Easing.ease), - }).start(); + _showToast = () => { + const { duration, isTop } = this.props; + const initialPosition = isTop ? { top: 0 } : { bottom: 0 }; + const finalPosition = isTop ? { top: 100 } : { bottom: 100 }; + this.view + .animate({ 0: { opacity: 0, ...initialPosition }, 1: { opacity: 1, ...finalPosition } }) + .then((endState) => { if (duration) { this.closeTimer = setTimeout(() => { this._hideToast(); }, duration); } - } - - _hideToast() { + }); + }; + _hideToast = () => { + const { isTop } = this.props; + const finalPosition = isTop ? { top: 0 } : { bottom: 0 }; + const initialPosition = isTop ? { top: 100 } : { bottom: 100 }; + this.view + .animate({ 0: { opacity: 1, ...initialPosition }, 1: { opacity: 0, ...finalPosition } }) + .then((endState) => { const { onHide } = this.props; - - Animated.timing(this.animatedValue, { - toValue: 0.0, - duration: 350, - easing: Easing.inOut(Easing.ease), - }).start(() => { if (onHide) { onHide(); } }); - - if (this.closeTimer) { - clearTimeout(this.closeTimer); - } - } + }; // Component Life Cycles - UNSAFE_componentWillMount() { + componentDidMount() { this._showToast(); } render() { - const { text, textStyle, style, onPress, isTop } = this.props; - const outputRange = isTop ? [-50, 0] : [50, 0]; - const y = this.animatedValue.interpolate({ - inputRange: [0, 1], - outputRange, - }); - const position = isTop ? { top: 150 } : { bottom: 150 }; + const { text, textStyle, style, onPress } = this.props; return ( <TouchableOpacity disabled={!onPress} onPress={() => onPress && onPress()}> - <Animated.View + <Animatable.View style={{ ...styles.container, ...style, - ...position, - opacity: 0.75, - transform: [{ translateY: y }], }} + easing="ease-in-out" + duration={500} + ref={this.handleViewRef} > <Text style={[styles.text, textStyle]}>{text}</Text> - </Animated.View> + </Animatable.View> </TouchableOpacity> ); }
14
diff --git a/metaverse_modules/barrier/index.js b/metaverse_modules/barrier/index.js @@ -441,7 +441,7 @@ export default () => { fragColor = vec4(vec3(c), b); if (darkening <= 0.0) { - fragColor.a *= 0.5; + fragColor.a *= 0.2; } fragColor.a *= dimming;
0
diff --git a/app/services/carto/visualizations_export_persistence_service.rb b/app/services/carto/visualizations_export_persistence_service.rb @@ -66,7 +66,6 @@ module Carto unless visualization.save raise "Errors saving imported visualization: #{visualization.errors.full_messages}" end - visualization.reload # Save permissions after visualization, in order to be able to regenerate shared_entities if saved_acl
2
diff --git a/.github/actions/reopenIssueWithComment/reopenIssueWithComment.js b/.github/actions/reopenIssueWithComment/reopenIssueWithComment.js @@ -6,26 +6,30 @@ const octokit = github.getOctokit(core.getInput('GITHUB_TOKEN', {required: true} const issueNumber = core.getInput('ISSUE_NUMBER', {required: true}); function reopenIssueWithComment() { - return octokit.issues.update({ + console.log(`Reopening issue # ${issueNumber}`); + octokit.issues.update({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, issue_number: issueNumber, state: 'open', }) - .then(() => octokit.issues.createComment({ + .then(() => { + console.log(`Commenting on issue # ${issueNumber}`); + octokit.issues.createComment({ owner: GITHUB_OWNER, repo: EXPENSIFY_CASH_REPO, issue_number: issueNumber, body: core.getInput('COMMENT', {required: true}), - })); + }); + }); } reopenIssueWithComment() .then(() => { - console.log('Issue successfully reopened and commented.'); + console.log(`Issue # ${issueNumber} successfully reopened and commented.`); process.exit(0); }) .catch((err) => { - console.error('Something went wrong. The issue was not successfully reopened', err); + console.error(`Something went wrong. The issue # ${issueNumber} was not successfully reopened`, err); core.setFailed(err); });
7
diff --git a/packages/@uppy/xhr-upload/src/index.js b/packages/@uppy/xhr-upload/src/index.js @@ -337,11 +337,15 @@ module.exports = class XHRUpload extends Plugin { xhr.responseType = opts.responseType } - Object.keys(opts.headers).forEach((header) => { - xhr.setRequestHeader(header, opts.headers[header]) - }) - const queuedRequest = this.requests.run(() => { + // When using an authentication system like JWT, the bearer token goes as a header. This + // header needs to be fresh each time the token is refreshed so computing and setting the + // headers just before the upload starts enables this kind of authentication to work properly. + // Otherwise, half-way through the list of uploads the token could be stale and the upload would fail. + const currentOpts = this.getOptions(file) + Object.keys(currentOpts.headers).forEach((header) => { + xhr.setRequestHeader(header, currentOpts.headers[header]) + }) xhr.send(data) return () => { timer.done()
12
diff --git a/public/javascripts/SVLabel/src/SVLabel/onboarding/Onboarding.js b/public/javascripts/SVLabel/src/SVLabel/onboarding/Onboarding.js @@ -161,18 +161,18 @@ function Onboarding (svl, actionStack, audioEffect, compass, form, handAnimation } return this; } + function drawBlinkingArrow(x1, y1, x2, y2, parameters) { var max_frequency = 60; var blink_period = 0.5; + function helperBlinkingArrow() { var par; blink_timer = (blink_timer + 1) % max_frequency; - if(blink_timer<blink_period*max_frequency) - { + if (blink_timer < blink_period * max_frequency) { par = parameters } - else - { + else { par = {"fill": null}; } drawArrow(x1, y1, x2, y2, par); @@ -181,6 +181,7 @@ function Onboarding (svl, actionStack, audioEffect, compass, form, handAnimation var function_identifier = window.requestAnimationFrame(helperBlinkingArrow); blink_function_identifier.push(function_identifier); } + helperBlinkingArrow(); }
7
diff --git a/src/lib/duration/iso-string.js b/src/lib/duration/iso-string.js @@ -49,9 +49,9 @@ export function toISOString() { } var totalSign = total < 0 ? '-' : ''; - var ymSign = sign(this._months) != sign(total) ? '-' : ''; - var daysSign = sign(this._days) != sign(total) ? '-' : ''; - var hmsSign = sign(this._milliseconds) != sign(total) ? '-' : ''; + var ymSign = sign(this._months) !== sign(total) ? '-' : ''; + var daysSign = sign(this._days) !== sign(total) ? '-' : ''; + var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') +
4
diff --git a/core/utils/useragent.js b/core/utils/useragent.js @@ -93,9 +93,11 @@ Blockly.utils.userAgent.MOBILE; !Blockly.utils.userAgent.EDGE; // Platforms. Logic from: - // https://github.com/google/closure-library/blob/master/closure/goog/labs/useragent/platform.js + // https://github.com/google/closure-library/blob/master/closure/goog/labs/useragent/platform.js and + // https://github.com/google/closure-library/blob/master/closure/goog/labs/useragent/extra.js Blockly.utils.userAgent.ANDROID = has('Android'); - Blockly.utils.userAgent.IPAD = has('iPad'); + Blockly.utils.userAgent.IPAD = has('iPad') || + has('Macintosh') && navigator.maxTouchPoints > 0; Blockly.utils.userAgent.IPOD = has('iPod'); Blockly.utils.userAgent.IPHONE = has('iPhone') && !Blockly.utils.userAgent.IPAD && !Blockly.utils.userAgent.IPOD;
3
diff --git a/scripts/expo/commands/publishCodeReview.js b/scripts/expo/commands/publishCodeReview.js @@ -30,6 +30,7 @@ async function commentOnGitHub(buildName, githubPullRequestId) { Please test these changes in [Expo](https://docs.expo.io/versions/latest/introduction/installation.html#mobile-client-expo-for-ios-and-android) after build has finished: ![QR Code](${qrUrl}) + \`${expUrl}\` `; const comments = await (await fetch(issueUrl)).json();
0
diff --git a/Source/Scene/ModelExperimental/CustomShaderStage.js b/Source/Scene/ModelExperimental/CustomShaderStage.js @@ -475,6 +475,7 @@ function generateShaderLines(customShader, primitive) { if (vertexLinesEnabled || shouldComputePositionWC) { vertexLines.push(CustomShaderStageVS); + vertexLinesEnabled = true; } if (fragmentLinesEnabled) {
1
diff --git a/assets/js/modules/adsense/dashboard/adsense-module-status.js b/assets/js/modules/adsense/dashboard/adsense-module-status.js @@ -54,8 +54,7 @@ class AdSenseModuleStatus extends Component { } async componentDidMount() { - let existingTag = await getExistingTag( 'adsense' ); - existingTag = existingTag.length ? existingTag : false; + const existingTag = await getExistingTag( 'adsense' ); this.setState( { existingTag } );
2
diff --git a/PostHeadersQuestionToc.user.js b/PostHeadersQuestionToc.user.js // @description Sticky post headers while you view each post (helps for long posts). Question ToC of Answers in sidebar. // @homepage https://github.com/samliew/SO-mod-userscripts // @author @samliew -// @version 2.1 +// @version 2.2 // // @include https://*stackoverflow.com/questions/* // @include https://*serverfault.com/questions/* @@ -416,6 +416,11 @@ ${isElectionPage ? 'Nomination' : isQuestion ? 'Question' : 'Answer'} by ${postu display: none; } +/* Remove timeline button in post sidebar as we have a link in the header now */ +.js-post-issue[title="Timeline"] { + display: none; +} + /* If topbar is fixed */ .top-bar._fixed ~ .container .post-stickyheader, .election-page .top-bar._fixed ~ .container .votecell .vote,
2
diff --git a/config/sidebar.yml b/config/sidebar.yml @@ -623,7 +623,7 @@ libraries: - title: "Migration Guide" url: "/libraries/lock/v11/migration-guide" - - title: "lock-passwordless Migration Guide" + - title: "Passwordless Migration" url: "/libraries/lock/v10/lock-passwordless-migration-guide" - title: "Internationalization"
10
diff --git a/src/components/ReactComponent.jsx b/src/components/ReactComponent.jsx @@ -58,6 +58,10 @@ export default class ReactComponent extends Field { if (this.refs[`react-${this.id}`]) { this.reactInstance = this.attachReact(this.refs[`react-${this.id}`]); + if (this.shouldSetValue) { + this.setValue(this.dataForSetting); + this.updateValue(this.dataForSetting); + } } return Promise.resolve(); } @@ -99,6 +103,10 @@ export default class ReactComponent extends Field { this.reactInstance.setState({ value: value }); + this.shouldSetValue = false; + } else { + this.shouldSetValue = true; + this.dataForSetting = value; } }
0
diff --git a/README.md b/README.md @@ -51,11 +51,10 @@ You can find the current noblox.js wiki with all API documentation [here](https: ## Making use of new login workaround ### Initial setup -1. Remove any usages of `.login`. +1. Remove any usages of the `login` method. 2. Run `cookieLogin` when your app starts. You only need to run it on app start. Supply it with a cookie, guide on obtaining that below. 3. This cookie will be automatically refreshed. You never need to supply it again, but you can if want. - ### Getting your cookie (Chrome): 1. Open any Roblox page and login 2. Press `Control + Shift + i` on your keyboard @@ -64,7 +63,7 @@ You can find the current noblox.js wiki with all API documentation [here](https: 5. Put this full token, *including* the warning into cookieLogin: `rbx.cookieLogin( tokenHere )` ### Example -This example makes use of the new async-await syntax +This example makes use of the new async-await syntax. ```js const rbx = require("noblox.js") async function startApp () { @@ -78,8 +77,8 @@ This example makes use of the new async-await syntax - Only one application can be logged in at once. - If the application is offline for like a week to a month you may need to get the cookie again - Your cookie is stored within a file in the lib -- Roblox-js-server is **not** currently compatible. You will need to remove its login and replace it. - +- Roblox-js-server is **not** currently compatible. Use [noblox.js-server](https://github.com/suufi/noblox.js-server) instead. +- The application will **not** work on Heroku. This is because we store the cookie internally in a file, and files do not persist in Heroku. ## Credits
7
diff --git a/experimental/adaptive-dialog/docs/language-generation.md b/experimental/adaptive-dialog/docs/language-generation.md @@ -4,18 +4,22 @@ Adaptive dialogs natively support and work with the new Language Generation syst See [here][1] to learn more about Language Generation preview. -Once you have authored your .lg files for your Adaptive dialogs (or your bot project), you can simply register as middleware and use `ILanguageGenerator` and `IMessageActivityGenerator` for full-blown generation support (including template resolution) anywhere in your bot project. +Once you have authored your .lg files for your Adaptive dialogs (or your bot project), you can simply register as middleware and use `ILanguageGenerator` and `IMessageActivityGenerator` for full-blown generation support (including template resolution) anywhere in your bot. -Here is a code snippet that that does that, at the Adapter level. All [sample projects][2] follow the exact same pattern. +All [sample projects][2] follow the exact same pattern. +In startup.cs ``` C# -// Manage all bot resources -var resourceExplorer = ResourceExplorer - .LoadProject(Directory.GetCurrentDirectory(), ignoreFolders: new string[] { "models" }); -var lg = new LGLanguageGenerator(resourceExplorer); -// Add as middleware. -Use(new RegisterClassMiddleware<ILanguageGenerator>(lg)); -Use(new RegisterClassMiddleware<IMessageActivityGenerator>(new TextMessageActivityGenerator(lg))); +// Resource explorer helps load all .lg files for this project. +var resourceExplorer = ResourceExplorer.LoadProject(Directory.GetCurrentDirectory(), ignoreFolders: new string[] { "models" }); +services.AddSingleton(resourceExplorer); +``` + +In adapter +```C# +this.UseStorage(storage); +this.UseState(userState, conversationState); +this.UseLanguageGenerator(new LGLanguageGenerator(resourceExplorer)); ``` With this, you can simply refer to a LG template anywhere in your bot's response.
3
diff --git a/accessibility-checker-extension/src/ts/usingAC/UsingACApp.tsx b/accessibility-checker-extension/src/ts/usingAC/UsingACApp.tsx @@ -576,7 +576,7 @@ class UsingACApp extends React.Component<{}, UsingACAppState> { <li> <p style={{ marginTop: "0rem" }}> Open and highlight all issues in the element's - child, if any (light purple highlight). + children, if any (light purple highlight). </p> </li> </ul>
3
diff --git a/app.js b/app.js @@ -208,9 +208,9 @@ export default class App extends EventTarget { return false; } } - toggleMic() { + /* toggleMic() { return world.toggleMic(); - } + } */ async enterXr() { function onSessionStarted(session) { function onSessionEnded(e) {
2
diff --git a/ably.d.ts b/ably.d.ts @@ -234,7 +234,10 @@ declare namespace Types { **/ authCallback?: ( data: TokenParams, - callback: (error: ErrorInfo | string, tokenRequestOrDetails: TokenDetails | TokenRequest | string) => void + callback: ( + error: ErrorInfo | string | null, + tokenRequestOrDetails: TokenDetails | TokenRequest | string | null + ) => void ) => void; authHeaders?: { [index: string]: string }; authMethod?: HTTPMethods;
11
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence, these will be requested for # review when someone opens a pull request. -* @Superalgos/core-devs +* @Superalgos/foundations-project # Project Teams /Projects/Algorithmic-Trading @Superalgos/algorithmic-trading-project
14
diff --git a/server/game/cards/08-MotC/PoliticalSanctions.js b/server/game/cards/08-MotC/PoliticalSanctions.js @@ -12,7 +12,7 @@ class PoliticalSanctions extends DrawCard { let diff = this.game.currentConflict.attackerSkill - this.game.currentConflict.defenderSkill; return context.game.isDuringConflict('political') && context.player.isAttackingPlayer() ? diff < 0 : diff > 0 && - context.source.parent.isParticipating() && + card.isParticipating() && super.canAttach(card, context); } }
1
diff --git a/server/classes/headstart/persistence/ViperUpdater.php b/server/classes/headstart/persistence/ViperUpdater.php @@ -38,58 +38,6 @@ class ViperUpdater extends SQLitePersistence { return $result; } - public function getUpdateMapsByID($vis_changed, $object_ids) { - # currently defunct, only works with JSON1 extension - $return_fields = "visualizations.vis_title, - visualizations.vis_query, - visualizations.vis_params"; - if ($vis_changed == false) { - $stmt = "SELECT $return_fields - FROM visualizations - WHERE visualizations.vis_title == 'openaire' - AND JSON_VALUE(visualizations.vis_params, '$.obj_id') IN $object_ids - "; - } else { - $stmt = "SELECT $return_fields - FROM visualizations - WHERE visualizations.vis_title == 'openaire' - AND JSON_VALUE(visualizations.vis_params, '$.obj_id') IN $object_ids - AND visualizations.vis_changed = 1 - "; - } - $query = $this->db->query($stmt); - $result = $query->fetchAll(); - - return $result; - } - - public function getUpdateMapsByFunderProject($vis_changed, $funder, $project_id) { - # currently defunct, only works with JSON1 extension - $return_fields = "visualizations.vis_title, - visualizations.vis_query, - visualizations.vis_params"; - if ($vis_changed == false) { - $stmt = "SELECT $return_fields - FROM visualizations - WHERE visualizations.vis_title == 'openaire' - AND JSON_VALUE(visualizations.vis_params, '$.funder') = " . $funder . - " AND JSON_VALUE(visualizations.vis_params, '$.project_id') = " . $project_id . " - "; - } else { - $stmt = "SELECT $return_fields, - JSON_VALUE(visualizations.vis_params, '$.project_id') AS pid - FROM visualizations - WHERE visualizations.vis_title == 'openaire' - AND visualizations.vis_changed = 1 - "; - } - echo ($stmt); - $query = $this->db->query($stmt); - $result = $query->fetchAll(); - - return $result; - } - public function resetFlag($vis_id) { $stmt = "UPDATE visualizations SET vis_changed=0
2
diff --git a/src/js/operations/Base64.js b/src/js/operations/Base64.js @@ -103,7 +103,7 @@ var Base64 = { enc3 = (chr2 >> 1) & 31; enc4 = ((chr2 & 1) << 4) | (chr3 >> 4); enc5 = ((chr3 & 15) << 1) | (chr4 >> 7); - enc6 = (chr4 >> 2) & 63; + enc6 = (chr4 >> 2) & 31; enc7 = ((chr4 & 3) << 3) | (chr5 >> 5); enc8 = chr5 & 31;
1
diff --git a/runtime.js b/runtime.js @@ -550,6 +550,12 @@ const _loadScript = async (file, {files = null, parentUrl = null, instanceId = n return import(u) .then(() => { startMonetization(instanceId, monetizationPointer, ownerAddress); + + const e = new MessageEvent('activate'); + e.waitUntil = p => { + console.log('wait until', p); + }; + app.dispatchEvent(e); }, err => { console.error('import failed', u, err); })
0
diff --git a/tools/make/lib/ls/pkgs/addons.mk b/tools/make/lib/ls/pkgs/addons.mk LIST_PACKAGE_ADDONS ?= $(TOOLS_PKGS_DIR)/pkgs/addons/bin/cli # Define the command flags: -LIST_PACKAGE_ADDONS_FLAGS ?= +LIST_PACKAGE_ADDONS_FLAGS ?= --ignore=**/_tools/scaffold/** # TARGETS #
8
diff --git a/packages/react-jsx-highcharts/src/components/BaseChart/BaseChart.js b/packages/react-jsx-highcharts/src/components/BaseChart/BaseChart.js @@ -85,7 +85,7 @@ class BaseChart extends Component { render () { return ( <div - className="chart" + className={`chart ${this.props.className}`} ref={(node) => { this.domNode = node }}> {this.state.rendered && this.props.children} </div>
11
diff --git a/src/ui.bar.js b/src/ui.bar.js @@ -74,6 +74,10 @@ var _ = Mavo.UI.Bar = $.Class({ for (var events in o.events) { $.events(this[id], events, o.events[events].bind(this.mavo)); } + } + + for (let id in _.controls) { + let o = _.controls[id]; if (o.action) { $.delegate(this.mavo.element, "click", ".mv-" + id, evt => {
11
diff --git a/services/importer/lib/importer/downloader.rb b/services/importer/lib/importer/downloader.rb @@ -124,7 +124,7 @@ module CartoDB end def run(available_quota_in_bytes = nil) - if valid_url? + if @parsed_url =~ URL_RE if available_quota_in_bytes raise_if_over_storage_quota(requested_quota: content_length_from_headers, available_quota: available_quota_in_bytes.to_i, @@ -344,10 +344,6 @@ module CartoDB end end - def valid_url? - @parsed_url =~ URL_RE - end - URL_TRANSLATORS = [ UrlTranslator::OSM2, UrlTranslator::OSM,
2
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js @@ -508,18 +508,15 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ minPredBG = round(minIOBPredBG); var fractionCarbsLeft = meal_data.mealCOB/meal_data.carbs; - // if we have COB and UAM is enabled, average all three - if ( minUAMPredBG < 400 && minCOBPredBG < 400 ) { + // if we have COB and UAM is enabled, average both + if ( minUAMPredBG < 999 && minCOBPredBG < 999 ) { // weight COBpredBG vs. UAMpredBG based on how many carbs remain as COB - avgPredBG = round( (IOBpredBG/3 + (1-fractionCarbsLeft)*UAMpredBG*2/3 + fractionCarbsLeft*COBpredBG*2/3) ); + avgPredBG = round( (1-fractionCarbsLeft)*UAMpredBG + fractionCarbsLeft*COBpredBG ); // if UAM is disabled, average IOB and COB - } else if ( minCOBPredBG < 400 ) { + } else if ( minCOBPredBG < 999 ) { avgPredBG = round( (IOBpredBG + COBpredBG)/2 ); - // if carbs are expired, use IOB instead of COB - } else if ( meal_data.carbs && minUAMPredBG < 400 ) { - avgPredBG = round( (2*IOBpredBG + UAMpredBG)/3 ); - // in pure UAM mode, just average IOB and UAM - } else if ( minUAMPredBG < 400 ) { + // if we have UAM but no COB, average IOB and UAM + } else if ( minUAMPredBG < 999 ) { avgPredBG = round( (IOBpredBG + UAMpredBG)/2 ); } else { avgPredBG = round( IOBpredBG ); @@ -528,17 +525,17 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ // if any carbs have been entered recently if (meal_data.carbs) { // average the minIOBPredBG and minUAMPredBG if available - if ( minUAMPredBG < 400 ) { + if ( minUAMPredBG < 999 ) { avgMinPredBG = round( (minIOBPredBG+minUAMPredBG)/2 ); } else { avgMinPredBG = minIOBPredBG; } // if UAM is disabled, use max of minIOBPredBG, minCOBPredBG - if ( ! enableUAM && minCOBPredBG < 400 ) { + if ( ! enableUAM && minCOBPredBG < 999 ) { minPredBG = round(Math.max(minIOBPredBG, minCOBPredBG)); // if we have COB, use minCOBPredBG, or blendedMinPredBG if it's higher - } else if ( minCOBPredBG < 400 ) { + } else if ( minCOBPredBG < 999 ) { // calculate blendedMinPredBG based on how many carbs remain as COB blendedMinPredBG = fractionCarbsLeft*minCOBPredBG + (1-fractionCarbsLeft)*avgMinPredBG; // if blendedMinPredBG > minCOBPredBG, use that instead @@ -556,10 +553,10 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ minPredBG = Math.min( minPredBG, avgPredBG ); process.stderr.write("minPredBG: "+minPredBG+" minIOBPredBG: "+minIOBPredBG); - if (minCOBPredBG < 400) { + if (minCOBPredBG < 999) { process.stderr.write(" minCOBPredBG: "+minCOBPredBG); } - if (minUAMPredBG < 400) { + if (minUAMPredBG < 999) { process.stderr.write(" minUAMPredBG: "+minUAMPredBG); } console.error(" avgPredBG:",avgPredBG,"COB:",meal_data.mealCOB,"carbs:",meal_data.carbs); @@ -569,7 +566,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ minPredBG = Math.min(minPredBG, maxCOBPredBG); } // set snoozeBG to minPredBG if it's higher - if (minPredBG < 400) { + if (minPredBG < 999) { snoozeBG = round(Math.max(snoozeBG,minPredBG)); } rT.snoozeBG = snoozeBG;
11
diff --git a/articles/users/search/v3/index.md b/articles/users/search/v3/index.md @@ -180,6 +180,6 @@ Phrase contains a word | `name:"richard"`, `name:richard` | `name:*richard*` ## Next Steps ::: next-steps -* [User Search Query Syntax](/users/search/v3/query-syntax) -* [User Search Best Practices](/users/search/v3/best-practices) +* [Learn how you can use the query string syntax to build custom queries](/users/search/v3/query-syntax) +* [Learn about the Auth0 best practices for user search](/users/search/v3/best-practices) :::
14
diff --git a/src/global_logic.js b/src/global_logic.js @@ -493,7 +493,12 @@ module.exports.calcBasedOneSummon = function (summonind, prof, buff, totals) { totalDA += totals[key]["DABuff"]; totalDA += totalSummon["da"]; totalDA += 0.01 * (armDAupNormal + armDAupMagna + exNite + armDAupBaha + armDAupCosmos + armDAupOther); - totalDA = totalDA >= 0.0 ? totalDA : 0.0; + if (key == "Djeeta") { + totalDA += buff["masterDA"]; + totalDA += buff["zenithDA"]; + } + + totalDA = totalDA >= 0.0 ? totalDA : 0.0; // Fit 100% >= DA >= 0% totalDA = totalDA <= 1.0 ? totalDA : 1.0; @@ -511,17 +516,15 @@ module.exports.calcBasedOneSummon = function (summonind, prof, buff, totals) { totalTA += totals[key]["TABuff"]; totalTA += totalSummon["ta"]; totalTA += 0.01 * (armTAupNormal + armTAupMagna + armTAupBaha + armTAupOther); - totalTA = totalTA >= 0.0 ? totalTA : 0.0; - totalTA = totalTA <= 1.0 ? totalTA : 1.0; - - // Djeeta(DA,TA) if (key == "Djeeta") { - totalDA += buff["masterDA"]; - totalDA += buff["zenithDA"]; totalTA += buff["masterTA"]; totalTA += buff["zenithTA"]; } + totalTA = totalTA >= 0.0 ? totalTA : 0.0; // Fit 100% >= TA >= 0% + totalTA = totalTA <= 1.0 ? totalTA : 1.0; + + var taRate = parseFloat(totalTA) < 1.0 ? parseFloat(totalTA) : 1.0; var daRate = parseFloat(totalDA) < 1.0 ? parseFloat(totalDA) : 1.0; var expectedAttack = 3.0 * taRate + (1.0 - taRate) * (2.0 * daRate + (1.0 - daRate));
1
diff --git a/app/core/src/navigation/index.js b/app/core/src/navigation/index.js import * as React from 'react'; import { withMappedNavigationAndConfigProps as withMappedProps } from 'react-navigation-props-mapper'; -import { StackNavigator } from '@kiwicom/mobile-navigation'; +import { + StackNavigator, + StackNavigatorOptions, +} from '@kiwicom/mobile-navigation'; +import { Color } from '@kiwicom/mobile-shared'; +import { Translation } from '@kiwicom/mobile-localization'; +import { TabNavigator } from 'react-navigation'; import HomepageStack from './HomepageStack'; import HotelsPackageWrapper from '../screens/HotelsPackageWrapper'; import SingleHotelsPackageWrapper from '../screens/SingleHotelPackageWrapper'; +const VoidStack = StackNavigator( + { + Void: { + screen: function VoidScreen() { + return ( + <Translation passThrough="This scene is prepared for the future. Please check navigation in the core package." /> + ); + }, + }, + }, + { + ...StackNavigatorOptions, + initialRouteName: 'Void', + }, +); + const Navigation = StackNavigator( { Homepage: { @@ -28,6 +50,17 @@ const Navigation = StackNavigator( }, ); -export default function Application() { - return <Navigation />; -} +export default TabNavigator( + { + Search: { screen: Navigation }, + Bookings: { screen: VoidStack }, + Message: { screen: VoidStack }, + Profile: { screen: VoidStack }, + }, + { + tabBarOptions: { + activeTintColor: Color.brand, + inactiveTintColor: 'gray', + }, + }, +);
0
diff --git a/src/components/Chip/readme.md b/src/components/Chip/readme.md @@ -63,7 +63,6 @@ import styled from 'styled-components'; const AvatarStyles = { width: '30px', height: '30px', - marginTop: '-2px', }; const ChipContainer = { @@ -83,7 +82,6 @@ const Icon = styled.span.attrs(props => { ` color: ${props.brand.main}; `}; - `; <div className="rainbow-p-vertical_large rainbow-align-content_center rainbow-flex_wrap"> @@ -91,7 +89,7 @@ const Icon = styled.span.attrs(props => { style={ChipContainer} className="rainbow-m-around_medium" label={ - <span> + <span className="rainbow-align-content_center"> <Avatar style={AvatarStyles} className="rainbow-m-right_x-small" @@ -111,7 +109,7 @@ const Icon = styled.span.attrs(props => { variant="neutral" onDelete={() => alert('Delete Chip!')} label={ - <span> + <span className="rainbow-align-content_center"> <Avatar style={AvatarStyles} className="rainbow-m-right_x-small"
1
diff --git a/stories/modules-tagmanager-setup.stories.js b/stories/modules-tagmanager-setup.stories.js */ import { storiesOf } from '@storybook/react'; -/** - * WordPress dependencies - */ -import { removeAllFilters, addFilter } from '@wordpress/hooks'; - /** * Internal dependencies */
2
diff --git a/bin/oref0-pump-loop.sh b/bin/oref0-pump-loop.sh @@ -324,7 +324,7 @@ function mmtune { echo -n "Listening for 30s silence before mmtuning: " for i in $(seq 1 800); do echo -n . - mmeowlink-any-pump-comms.py --port $port --wait-for 30 2>/dev/null | egrep -v subg | egrep No \ + any_pump_comms 30 2>/dev/null | egrep -v subg | egrep No \ && break done echo {} > monitor/mmtune.json
4
diff --git a/lib/shared/addon/components/cluster-driver/driver-rke/template.hbs b/lib/shared/addon/components/cluster-driver/driver-rke/template.hbs </h2> </div> <div class="right-buttons"> - {{#if (or (not applyClusterTemplate) (and (eq step 1) (not applyClusterTemplate)))}} + {{#if (or (and isEdit (not applyClusterTemplate)) (and (lte step 1) (not applyClusterTemplate)))}} {{#if pasteOrUpload}} <button {{action "cancel"}} type="button" class="btn btn-sm bg-primary" disabled={{not canEditForm}}> {{#if notView}}
2
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml @@ -20,12 +20,12 @@ jobs: steps: - name: Setup Environment run: | - mkdir ~/.ssh - chmod 700 ~/.ssh - echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh/config - echo -e "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBkHMoNRRkHYNE7EnQLdFxMgVcqGgNPYDhrWiLMlYuzpmEcUnhwW3zNaIa4J2JlGkRNgYZVia1Ic1V3koJPE3YO2+exAfJBIPeb6O1qDADc2hFFHzd28wmHKUkO61yzo2ZjDQfaEVtjN39Yiy19AbddN3bzNrgvuQT574fa6Rghl2RfecKYO77iHA1RGXIFc8heXVIUuUV/jHjb56WqoHH8vyt1DqUz89oyiHq8Cku0qzKN80COheZPseA1EvT0zlIgbXBxwijN4xRmvInK0fB5Kc9r3kddH2tT7V09bOFJsvGQaQmQ1WFTCqjpBFw1CHKcbfPLOxbLpVIR9gyx03R" > ~/.ssh/id_rsa.pub - echo -e "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAwZBzKDUUZB2DROxJ0C3RcTIFXKhoDT2A4a1oizJWLs6ZhHFJ\n4cFt8zWiGuCdiZRpETYGGVYmtSHNVd5KCTxN2DtvnsQHyQSD3m+jtagwA3NoRRR8\n3dvMJhylJDutcs6NmYw0H2hFbYzd/WIstfQG3XTd28za4L7kE+e+H2ukYIZdkX3n\nCmDu+4hwNURlyBXPIXl1SFLlFf4x42+elqqBx/L8rdQ6lM/PaMoh6vApLtKsyjfN\nAjoXmT7HgNRL09M5SIG1wccIozeMUZryJytHweSnPa95HXR9rU+1dPWzhSbLxkGk\nJkNVhUwqo6QRcNQhynG3zyzsWy6VSEfYMsdN0QIDAQABAoIBABsZNPYBEFy/wPvq\nNJ8/et3lCdkh/oc0ABIYK9Wo82XUKKvhDF3drZ3p+UrX/VYgf+EX9hyf8gVTuSJ3\nX1gRqDhIgeTxPsHGrwt6B6pL5ITnKEbbimuo9Ni1E+2RqUO0ZSCE/1sSRv4CRaXO\nk8HZawif7ttxv4bNUrLys6xEbpvQlOMzgs4s/OBB/XMEqnFRGPJeeTy8bkOWyTwl\nLj06nq2brs4qK4eijI/MoGy1CD8JCpL4gG39GPTXd8GpudXmdelDn1E0t9nhL6Se\naOMaiPhy7kBJD4wZ//WZTSR1XyjNBH3DGkNZxPIWcX+wJFyNoLbSbVSda/7Dtvp3\nCPfiNhECgYEA/+3JswSzcVEANNF5OLZ76x+TODkZ9T6YF4SR8/uJjNViWgUpX7vw\nmyXF+2AwzNaotbBKmNG619BcUeMmQB76c+UiMLeJuJcT/Jj0xmEUopHonGqEIcvg\nHg6cafE1is7d+l669bfjitlx+3muF2CYnylSN1LWHxIITVUj3BmcWqUCgYEAwZ45\nWdaHfK7G6GjI7liDQT4ZlslA8dmLv2Jl2ExBBMoY3m3Sre428z2ZFa4O/nsBYP0a\nDxgYmX20fQGcbPugKdCYHc7HkKbMU1GwiVCGpDYZCm2gJKTvam3dYNaiAfq5DyhP\nzDCZNJ5rrSMprXsuRv2O4c5u8qtJ5ByaOJBjOr0CgYBMlkAxzkpUssS5CaaZDiLv\nLbfEr3HRLjYdc5KpzLBQ8NpJzhmfiIJsK1Wf8B0qb2J1XJg2Oy0KwFOgPbWIoryY\nSg19Pq98Cdn1UWCOrSabr8ZIaKe55WTgGcc8/O3k6BsNfaO9PJZfSssNUlCCtml1\n18u+uo9RJPhPDBd7Gj7r8QKBgFraxWy7t24xkZMDgK4fiM/3tQhFvhz/CY2wPbxG\n5Ae8UfkmLcOCUfTIReqfd9fAnsAFZNIKa5izHRu/wsh9NwYIJSlvm8PsEVtTrPRy\nfgvWet+i24/2eYZGsag8b19gaLCNKQzXDT1czYg8RNVsRSX427BoLzXeXNkW9uNu\nFbI9AoGAV2kxcdcKS4BtNHKPeGgV87dM0DWhQaAtEXEIcQquFtba0lAXioGHg8U4\nzeiugl4Qzchwk5qd3wnZ4SOhx0s16/5gQDlnkbjFR6EREUnvLRwV92zBXUTOGIkh\nZ7Z4rcgUKlVAaHT3OHN/lTyqJG/ib+K4wZhbztl/ox+JUFsvD98=\n-----END RSA PRIVATE KEY-----" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa* + mkdir ~/.ssh_tests + chmod 700 ~/.ssh_tests + echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh_tests/config + echo -e "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBkHMoNRRkHYNE7EnQLdFxMgVcqGgNPYDhrWiLMlYuzpmEcUnhwW3zNaIa4J2JlGkRNgYZVia1Ic1V3koJPE3YO2+exAfJBIPeb6O1qDADc2hFFHzd28wmHKUkO61yzo2ZjDQfaEVtjN39Yiy19AbddN3bzNrgvuQT574fa6Rghl2RfecKYO77iHA1RGXIFc8heXVIUuUV/jHjb56WqoHH8vyt1DqUz89oyiHq8Cku0qzKN80COheZPseA1EvT0zlIgbXBxwijN4xRmvInK0fB5Kc9r3kddH2tT7V09bOFJsvGQaQmQ1WFTCqjpBFw1CHKcbfPLOxbLpVIR9gyx03R" > ~/.ssh_tests/id_rsa.pub + echo -e "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAwZBzKDUUZB2DROxJ0C3RcTIFXKhoDT2A4a1oizJWLs6ZhHFJ\n4cFt8zWiGuCdiZRpETYGGVYmtSHNVd5KCTxN2DtvnsQHyQSD3m+jtagwA3NoRRR8\n3dvMJhylJDutcs6NmYw0H2hFbYzd/WIstfQG3XTd28za4L7kE+e+H2ukYIZdkX3n\nCmDu+4hwNURlyBXPIXl1SFLlFf4x42+elqqBx/L8rdQ6lM/PaMoh6vApLtKsyjfN\nAjoXmT7HgNRL09M5SIG1wccIozeMUZryJytHweSnPa95HXR9rU+1dPWzhSbLxkGk\nJkNVhUwqo6QRcNQhynG3zyzsWy6VSEfYMsdN0QIDAQABAoIBABsZNPYBEFy/wPvq\nNJ8/et3lCdkh/oc0ABIYK9Wo82XUKKvhDF3drZ3p+UrX/VYgf+EX9hyf8gVTuSJ3\nX1gRqDhIgeTxPsHGrwt6B6pL5ITnKEbbimuo9Ni1E+2RqUO0ZSCE/1sSRv4CRaXO\nk8HZawif7ttxv4bNUrLys6xEbpvQlOMzgs4s/OBB/XMEqnFRGPJeeTy8bkOWyTwl\nLj06nq2brs4qK4eijI/MoGy1CD8JCpL4gG39GPTXd8GpudXmdelDn1E0t9nhL6Se\naOMaiPhy7kBJD4wZ//WZTSR1XyjNBH3DGkNZxPIWcX+wJFyNoLbSbVSda/7Dtvp3\nCPfiNhECgYEA/+3JswSzcVEANNF5OLZ76x+TODkZ9T6YF4SR8/uJjNViWgUpX7vw\nmyXF+2AwzNaotbBKmNG619BcUeMmQB76c+UiMLeJuJcT/Jj0xmEUopHonGqEIcvg\nHg6cafE1is7d+l669bfjitlx+3muF2CYnylSN1LWHxIITVUj3BmcWqUCgYEAwZ45\nWdaHfK7G6GjI7liDQT4ZlslA8dmLv2Jl2ExBBMoY3m3Sre428z2ZFa4O/nsBYP0a\nDxgYmX20fQGcbPugKdCYHc7HkKbMU1GwiVCGpDYZCm2gJKTvam3dYNaiAfq5DyhP\nzDCZNJ5rrSMprXsuRv2O4c5u8qtJ5ByaOJBjOr0CgYBMlkAxzkpUssS5CaaZDiLv\nLbfEr3HRLjYdc5KpzLBQ8NpJzhmfiIJsK1Wf8B0qb2J1XJg2Oy0KwFOgPbWIoryY\nSg19Pq98Cdn1UWCOrSabr8ZIaKe55WTgGcc8/O3k6BsNfaO9PJZfSssNUlCCtml1\n18u+uo9RJPhPDBd7Gj7r8QKBgFraxWy7t24xkZMDgK4fiM/3tQhFvhz/CY2wPbxG\n5Ae8UfkmLcOCUfTIReqfd9fAnsAFZNIKa5izHRu/wsh9NwYIJSlvm8PsEVtTrPRy\nfgvWet+i24/2eYZGsag8b19gaLCNKQzXDT1czYg8RNVsRSX427BoLzXeXNkW9uNu\nFbI9AoGAV2kxcdcKS4BtNHKPeGgV87dM0DWhQaAtEXEIcQquFtba0lAXioGHg8U4\nzeiugl4Qzchwk5qd3wnZ4SOhx0s16/5gQDlnkbjFR6EREUnvLRwV92zBXUTOGIkh\nZ7Z4rcgUKlVAaHT3OHN/lTyqJG/ib+K4wZhbztl/ox+JUFsvD98=\n-----END RSA PRIVATE KEY-----" > ~/.ssh_tests/id_rsa + chmod 600 ~/.ssh_tests/id_rsa* git config --global user.name "John Doe" git config --global user.email [email protected] @@ -53,7 +53,7 @@ jobs: run: | set -e eval `ssh-agent -s` - ssh-add ~/.ssh/id_rsa + ssh-add ~/.ssh_tests/id_rsa node utils/retry npm test - name: Deploy
4
diff --git a/workflow/templatetags/group_tag.py b/workflow/templatetags/group_tag.py @@ -18,11 +18,11 @@ def has_group(user, group_name): @register.filter(name='has_org_access') -def has_org_access(activity_user, group): +def has_access(activity_user, group): user_org_access = ActivityUserOrganizationGroup.objects.filter( activity_user_id=activity_user.id, organization_id=activity_user.organization.id - ) + ).first() user_group = Group.objects.get(name=user_org_access.group.name) if group == user_group.name:
1
diff --git a/config.xml b/config.xml <preference name="Orientation" value="landscape" /> - <preference name="windows-target-version" value="10.0" /> - <content src="index.html" /> <plugin name="cordova-plugin-whitelist" version="1" /> <access origin="*" /> <allow-navigation href="*" /> <preference name="android-minSdkVersion" value="14" /> + <preference name="android-targetSdkVersion" value="28" /> <engine name="android" spec="6.3.0" /> <plugin name="cordova-plugin-inappbrowser" spec="1.0.1" />
12
diff --git a/public/javascripts/SVLabel/src/SVLabel/navigation/Compass.js b/public/javascripts/SVLabel/src/SVLabel/navigation/Compass.js @@ -224,7 +224,7 @@ function Compass (svl, mapService, taskContainer, uiCompass) { } function setLabelBeforeJumpMessage () { - var message = "<div style='width: 20%'>You have reached the end of this route. Finish labeling this area and <br/> " + + var message = "<div style='width: 20%'>You have reached the end of this route. Finish labeling this intersection then <br/> " + "<span class='bold'>click here to move to a new location.</span></div>"; uiCompass.message.html(message); }
3
diff --git a/userscript.user.js b/userscript.user.js @@ -42231,10 +42231,15 @@ var $$IMU_EXPORT$$; var obj_url = obj[i].url; var orig_url = null; + obj.splice(i, 1); + images.splice(i, 1); + i--; + for (var j = 0; j < tried_urls.length; j++) { if (tried_urls[j][2] === obj_url) { var orig_url = tried_urls[j][3].url; var index = images.indexOf(orig_url); + tried_urls[j][4] = true; if (index >= 0) { obj.splice(index, 1); @@ -42256,22 +42261,21 @@ var $$IMU_EXPORT$$; var index = images.indexOf(fine_urls[i][0]); if (index >= 0) { obj = [obj[index]]; - if (obj[0].bad) - continue; - return options.cb(obj, fine_urls[i][1]); } } + var try_any = false; for (var i = 0; i < tried_urls.length; i++) { - if (tried_urls[i][0] === url) { - var index = images.indexOf(tried_urls[i][2]); - if (index >= 0) { - obj = [obj[index]]; - if (obj[0].bad) { + if (tried_urls[i][0] === url || try_any) { + if (tried_urls[i][4] === true) { + try_any = true; continue; } + var index = images.indexOf(tried_urls[i][2]); + if (index >= 0) { + obj = [obj[index]]; return options.cb(obj, tried_urls[i][1]); } else { return options.cb(null, tried_urls[i][1]); @@ -42285,7 +42289,7 @@ var $$IMU_EXPORT$$; } fine_urls.push([newurl, data]); - tried_urls.push([url, data, newurl, deepcopy(newobj)]); + tried_urls.push([url, data, newurl, deepcopy(newobj), false]); //if (images.indexOf(newurl) < 0 && newurl !== url || true) { if (images.indexOf(newurl) < 0 || !obj[images.indexOf(newurl)].norecurse) {
7
diff --git a/generators/client/templates/angular/src/main/webapp/app/core/auth/account.service.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/core/auth/account.service.ts.ejs @@ -22,8 +22,8 @@ import { JhiLanguageService } from 'ng-jhipster'; import { SessionStorageService } from 'ngx-webstorage'; <%_ } _%> import { HttpClient } from '@angular/common/http'; -import { Observable, Subject } from 'rxjs'; -import { shareReplay, tap } from 'rxjs/operators'; +import { Observable, Subject, of } from 'rxjs'; +import { shareReplay, tap, catchError } from 'rxjs/operators'; import { SERVER_API_URL } from 'app/app.constants'; import { Account } from 'app/core/user/account.model'; @@ -79,6 +79,16 @@ export class AccountService { if (!this.accountCache$) { this.accountCache$ = this.fetch().pipe( + catchError( + () => { + <%_ if (websocket === 'spring-websocket') { _%> + if (this.trackerService.stompClient && this.trackerService.stompClient.connected) { + this.trackerService.disconnect(); + } + <%_ } _%> + return of(null); + } + ), tap( account => { if (account) { @@ -100,16 +110,6 @@ export class AccountService { this.authenticated = false; } this.authenticationState.next(this.userIdentity); - }, - () => { - <%_ if (websocket === 'spring-websocket') { _%> - if (this.trackerService.stompClient && this.trackerService.stompClient.connected) { - this.trackerService.disconnect(); - } - <%_ } _%> - this.userIdentity = null; - this.authenticated = false; - this.authenticationState.next(this.userIdentity); } ), shareReplay()
1
diff --git a/token-metadata/0x30f271C9E86D2B7d00a6376Cd96A1cFBD5F0b9b3/metadata.json b/token-metadata/0x30f271C9E86D2B7d00a6376Cd96A1cFBD5F0b9b3/metadata.json "symbol": "DEC", "address": "0x30f271C9E86D2B7d00a6376Cd96A1cFBD5F0b9b3", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/world.js b/world.js @@ -37,8 +37,6 @@ setInterval(() => { Object.keys(pendingAnalyticsData).map(item => { fetch(item, { method: 'POST', body: JSON.stringify(pendingAnalyticsData[item]) }).then(res => { return res.json(); - }).then(data => { - console.log(data); }).catch(err => { console.error(err); });
2
diff --git a/src/server/routes/apiv3/slack-bot.js b/src/server/routes/apiv3/slack-bot.js @@ -3,16 +3,16 @@ const { EventEmitter } = require('events'); const { createServer } = require('http'); const express = require('express'); -const { App, ExpressReceiver } = require('@slack/bolt'); +const { App } = require('@slack/bolt'); const router = express.Router(); -const receiver = new ExpressReceiver({ signingSecret: process.env.SLACK_SIGNING_SECRET }); + module.exports = (crowi) => { router.get('/', async(req, res) => { - class simpleReceiver extends EventEmitter { + class OriginalReceiverClass extends EventEmitter { constructor(signingSecret, endpoints) { super(); @@ -28,18 +28,18 @@ module.exports = (crowi) => { this.bolt = app; } - // start(port) { - // return new Promise((resolve, reject) => { - // try { - // this.server.listen(port, () => { - // resolve(this.server); - // }); - // } - // catch (error) { - // reject(error); - // } - // }); - // } + start(port) { + return new Promise((resolve, reject) => { + try { + this.server.listen(port, () => { + resolve(this.server); + }); + } + catch (error) { + reject(error); + } + }); + } stop() { return new Promise((resolve, reject) => { @@ -55,24 +55,18 @@ module.exports = (crowi) => { } - res.send('iii'); + const receiver = new OriginalReceiverClass(process.env.SLACK_SIGNING_SECRET, '/'); const app = new App({ token: process.env.SLACK_BOT_TOKEN, receiver, }); - // app.post('/postMessage', async(req, res) => { - // res.send('iii'); - // }); - - // app.event('message', async({ event, client }) => { - // // Do some slack-specific stuff here - // await client.chat.postMessage({ - // channel: 'growi_bot', - // text: 'hiiii', - // }); - // }); + // TODO: customising event method + app.event('message', async({ event, client }) => { + // Do some slack-specific stuff here + await client.chat.postMessage('hogehoge'); + }); });
4
diff --git a/package.json b/package.json "releaseNotes": "npx auto-changelog --stdout --commit-limit false -u --template ./changelog.hbs", "____comment": "\"assets\": [\"dist/logagent-*\"]" }, - "scripts": { - "beforeStage": "npx auto-changelog -p", - "changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template ./changelog.hbs" + "hooks": { + "after:bump": "npx auto-changelog -p" } }, "standard": {
14
diff --git a/docs/source/_layouts/documentation.blade.php b/docs/source/_layouts/documentation.blade.php <p class="mb-4 text-slate-light uppercase tracking-wide font-bold text-xs">Examples</p> <ul> <li class="mb-3"><a href="{{ $page->baseUrl }}/docs/examples/buttons" class="{{ $page->active('/docs/examples/buttons') ? 'text-slate-darker font-bold' : 'text-slate-dark' }}">Buttons</a></li> - <li class="mb-3"><a class="{{ $page->active('/examples/alerts') ? 'text-slate-darker font-bold' : 'text-slate-dark' }}" href="{{ $page->baseUrl }}/examples/alerts">Alerts</a></li> - <li class="mb-3"><a class="{{ $page->active('/examples/cards') ? 'text-slate-darker font-bold' : 'text-slate-dark' }}" href="{{ $page->baseUrl }}/examples/cards">Cards</a></li> + <li class="mb-3"><a class="{{ $page->active('/docs/examples/alerts') ? 'text-slate-darker font-bold' : 'text-slate-dark' }}" href="{{ $page->baseUrl }}/docs/examples/alerts">Alerts</a></li> + <li class="mb-3"><a class="{{ $page->active('/docs/examples/cards') ? 'text-slate-darker font-bold' : 'text-slate-dark' }}" href="{{ $page->baseUrl }}/docs/examples/cards">Cards</a></li> </ul> </div> </nav>
1
diff --git a/runtime.js b/runtime.js @@ -1000,6 +1000,27 @@ const _loadImg = async (file, {files = null, contentId = null, instanceId = null const mesh = new THREE.Mesh(geometry, material); mesh.frustumCulled = false; mesh.contentId = contentId; + let physicsIds = []; + let staticPhysicsIds = []; + mesh.run = async () => { + const physicsId = physicsManager.addBoxGeometry( + mesh.position, + mesh.quaternion, + new THREE.Vector3(width/2, height/2, 0.01), + false + ); + physicsIds.push(physicsId); + staticPhysicsIds.push(physicsId); + }; + mesh.destroy = () => { + for (const physicsId of physicsIds) { + physicsManager.removeGeometry(physicsId); + } + physicsIds.length = 0; + staticPhysicsIds.length = 0; + }; + mesh.getPhysicsIds = () => physicsIds; + mesh.getStaticPhysicsIds = () => staticPhysicsIds; mesh.hit = () => { console.log('hit', mesh); // XXX return {
0
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -3163,144 +3163,49 @@ function roundoff(input, output) { // a floating number el.innerHTML = "Input number:&nbsp;&nbsp;" + val + "<br>"; el.innerHTML += - "Place of round off:&nbsp;&nbsp;" + placeofroundoff + "<br>" + spaces; - + "Place of round off:&nbsp;&nbsp;" + placeofroundoff + "<br>" ; var placeofroundoffarray = { - Ones: i + 1, - Tens: i + 2, - Hundred: i + 3, - Thousand: i + 4, - "Ten Thousand": i + 5, - Lakh: i + 6, - "Ten Lakh": i + 7, - Crore: i + 8, - "Ten Crore": i + 9, + Ones: 0, + Tens: 1, + Hundred: 2, + Thousand: 3, + "Ten Thousand":4, + Lakh:5, + "Ten Lakh": 6, + Crore: 7, + "Ten Crore": 8, }; var place = placeofroundoffarray[placeofroundoff]; - - if (place >= len) { - for (itr = 0; itr < place - i; itr++) { - itrPlace = placeUpto[itr]; - el.innerHTML += spaces1 + itrPlace; - } - el.innerHTML += "<br>"; - flag = -1; - for (itr = 0; itr < ar.length; itr++) { - if (flag == -1) el.innerHTML += ar[itr]; - else el.innerHTML += spaces + ar[itr]; - if (ar[itr] == ".") flag = 1; - } - el.innerHTML += "<br>"; - for (var j = len; j < place + 1; j++) { - ar.push("0"); - } - flag = -1; - for (itr = 0; itr < ar.length; itr++) { - if (flag == -1) el.innerHTML += ar[itr]; - else el.innerHTML += spaces + ar[itr]; - if (ar[itr] == ".") flag = 1; + var a=Math.round(parseFloat(val)); + if(a<Math.pow(10,place)/2) + { + el.innerHTML +="Enter Bigger number to roundoff to nearest " + placeofroundoff; } - el.innerHTML += "<br>" + ar.join(""); - el.innerHTML += - "<br>" + + else + { el.innerHTML += "<br>" + val + " after rounding off to the nearest " + - placeofroundoff + - " is " + - ar.join("") + - "."; - } else { - for (itr = 0; itr < ar.length - i - 1; itr++) { - itrPlace = placeUpto[itr]; - el.innerHTML += spaces1 + itrPlace; - } - el.innerHTML += "<br>"; - flag = -1; - for (itr = 0; itr < ar.length; itr++) { - if (flag == -1) el.innerHTML += ar[itr]; - else el.innerHTML += spaces + ar[itr]; - if (ar[itr] == ".") flag = 1; - } - el.innerHTML += "<br>"; - for (itr = 0; itr < ar.length; itr++) { - el.innerHTML += ar[itr]; - if (ar[itr] == ".") break; - } - flag = 1; - for (itr = i + 1; itr <= place + 1; itr++) { - if (itr >= ar.length) { - flag = -1; - break; - } - el.innerHTML += spaces + ar[itr]; - } - if (parseInt(ar[place + 1]) >= 5) { - el.innerHTML += ">=5"; - } else if (parseInt(ar[place + 1]) < 5) { - el.innerHTML += "<5"; - } - el.innerHTML += "<br>"; - if (parseInt(ar[place + 1]) >= 5) { - if (parseInt(ar[place]) == 9) { - //handling boundary cases - var k = 0, - j = place, - carry = 0; - while (k == 0 && j > i) { - if (parseInt(ar[j]) == 9) { - ar[j] = "0"; - carry = 1; - } else { - ar[j] = parseInt(ar[j]) + carry; - carry = 0; - k = 1; - } - j--; - } - if (j == i && carry == 1) { - ar[j - 1] = parseInt(ar[j - 1]) + carry; - carry = 0; - j--; - k = 0; + "Ones" + + " is " + a; + if(place>0) + { + var b=parseInt((a/Math.pow(10,place)))*Math.pow(10,place); + var c=b+Math.pow(10,place); + if(a>=Math.pow(10,place)/2) + { + el.innerHTML += "<br> As "+ a%Math.pow(10,place) + ">=" + Math.pow(10,place)/2; } - if (parseInt(ar[j]) == 10) { - ar[j] = "0"; - carry = 1; - k = 0; - j--; - while (k == 0 && j >= 0) { - if (parseInt(ar[j]) == 9) { - if (j == 0) ar[0] = parseInt(ar[0]) + 1; else{ - ar[j] = "0"; - carry = 1; + el.innerHTML += "<br> As "+ a%Math.pow(10,place) + "<" + Math.pow(10,place)/2; } - } else { - ar[j] = parseInt(ar[j]) + carry; - carry = 0; - k = 1; - } - j--; - } - } - } else { - ar[place] = parseInt(ar[place]) + 1; - } - } - var flag = 0; - if (ar[0] == "10") flag = 1; - ar = ar.join(""); - var b; - if (flag == 1) b = ar.slice(0, place + 2); - else b = ar.slice(0, place + 1); - el.innerHTML += b + "<br>"; - el.innerHTML += + a=(a-b < c-a)?b:c; + el.innerHTML += "<br>" + val + " after rounding off to the nearest " + placeofroundoff + - " is " + - b + - "."; + " is " + a; + + } } } }
1