code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/pages/strategy/tabs/ships/ships.js b/src/pages/strategy/tabs/ships/ships.js self.heartLockMode = 1; self.saveSettings(); } - KC3StrategyTabs.reloadTab(undefined, true); + KC3StrategyTabs.reloadTab(undefined, false); }); $(".lock_no").on("click", function(){ if(self.heartLockMode !== 2){ self.heartLockMode = 2; self.saveSettings(); } - KC3StrategyTabs.reloadTab(undefined, true); + KC3StrategyTabs.reloadTab(undefined, false); }); $(".class_yes").on("click", function(){ if(!self.className){ self.className = true; self.saveSettings(); } - KC3StrategyTabs.reloadTab(undefined, true); + KC3StrategyTabs.reloadTab(undefined, false); }); $(".class_no").on("click", function(){ if(self.className){ self.className = false; self.saveSettings(); } - KC3StrategyTabs.reloadTab(undefined, true); + KC3StrategyTabs.reloadTab(undefined, false); }); $(".control_buttons .reset_default").on("click", function(){ delete self.currentSorters; // Fill up list Object.keys(FilteredShips).forEach(function(shipCtr){ if(shipCtr%10 === 0){ - $("<div>").addClass("ingame_page").html("Page "+Math.ceil((Number(shipCtr)+1)/10)).appendTo(self.shipList); + $("<div>").addClass("ingame_page") + .html("Page "+Math.ceil((Number(shipCtr)+1)/10)) + .appendTo(self.shipList); } cShip = FilteredShips[shipCtr]; return; } + // elements constructing for the time-consuming 'first time rendering' cElm = $(".tab_ships .factory .ship_item").clone().appendTo(self.shipList); cShip.view = cElm; if(shipCtr%2 === 0){ cElm.addClass("even"); }else{ cElm.addClass("odd"); } $(".ship_id", cElm).text( cShip.id ); $(".ship_img .ship_icon", cElm).attr("src", KC3Meta.shipIcon(cShip.bid)); $(".ship_img .ship_icon", cElm).attr("alt", cShip.bid); - const showName = self.className ? cShip.fullName : cShip.name; - $(".ship_name", cElm).text( showName ); - if(KC3StrategyTabs.isTextEllipsis($(".ship_name", cElm))) { - $(".ship_name", cElm).attr("title", showName); - } if(shipLevel >= 100) { $(".ship_name", cElm).addClass("ship_kekkon-color"); } if(cShip.lk[0] >= cShip.lk[1]){ $(".ship_lk", cElm).addClass("max"); } else if(cShip.lk[0] > cShip.lk[2]){ - $(".ship_lk", cElm).append("<sup class='sub'>{0}</sup>".format(cShip.lk[0] - cShip.lk[2])); + $(".ship_lk", cElm) + .append("<sup class='sub'>{0}</sup>".format(cShip.lk[0] - cShip.lk[2])); } if(cShip.morale >= 50){ $(".ship_morale", cElm).addClass("sparkled"); } + // Check whether remodel is max + if( !cShip.remodel ) + cElm.addClass('remodel-max'); + else + cElm.addClass('remodel-able'); + + // Check whether modernization is max + if( cShip.statmax ) + cElm.addClass('modernization-max'); + else + cElm.addClass('modernization-able'); + + [1,2,3,4].forEach(function(x){ + self.equipImg(cElm, x, cShip.slots[x-1], cShip.equip[x-1]); + }); + if(cShip.exSlot !== 0){ + self.equipImg(cElm, "ex", -2, cShip.exSlot); + } + // callback for things that has to be recomputed cElm.onRecompute = function(ship) { - var thisShip = ship || cShip; + const thisShip = ship || cShip; + // Reset shown ship name + const showName = self.className ? thisShip.fullName : thisShip.name; + $(".ship_name", this) + .text( showName ) + .attr("title", + KC3StrategyTabs.isTextEllipsis($(".ship_name", this)) ? showName : "" + ); // Recomputes stats self.modernizableStat("fp", this, thisShip.fp); self.modernizableStat("tp", this, thisShip.tp); $(".ship_as", this).text( thisShip.as[self.equipMode] ); $(".ship_ev", this).text( thisShip.ev[self.equipMode] ); $(".ship_ls", this).text( thisShip.ls[self.equipMode] ); + // Reset heart-lock icon + $(".ship_lock img", this).attr("src", + "../../assets/img/client/heartlock{0}.png" + .format(!thisShip.locked ? "-x" : "") + ).show(); + if((self.heartLockMode === 1 && thisShip.locked) + || (self.heartLockMode === 2 && !thisShip.locked)) { + $(".ship_lock", this).show(); + } else { + $(".ship_lock", this).hide(); + } // Rebind click handlers $(".ship_img .ship_icon", this).click(self.shipClickFunc); $(".ship_equip_icon img", this).click(self.gearClickFunc); }; - + // also invoke recompute for the first time cElm.onRecompute(cShip); - [1,2,3,4].forEach(function(x){ - self.equipImg(cElm, x, cShip.slots[x-1], cShip.equip[x-1]); - }); - if(cShip.exSlot !== 0){ - self.equipImg(cElm, "ex", -2, cShip.exSlot); - } - - $(".ship_lock img", cElm).attr("src", - "../../assets/img/client/heartlock{0}.png".format(!cShip.locked ? "-x" : "") - ); - if(self.heartLockMode === 1 && cShip.locked){ - $(".ship_lock img", cElm).show(); - } else if(self.heartLockMode === 2 && !cShip.locked){ - $(".ship_lock img", cElm).show(); - } else { - $(".ship_lock", cElm).hide(); - } - - // Check whether remodel is max - if( !cShip.remodel ) - cElm.addClass('remodel-max'); - else - cElm.addClass('remodel-able'); - - // Check whether modernization is max - if( cShip.statmax ) - cElm.addClass('modernization-max'); - else - cElm.addClass('modernization-able'); }); self.shipList.show().createChildrenTooltips();
7
diff --git a/.travis.yml b/.travis.yml @@ -27,7 +27,7 @@ branches: env: global: - SLS_IGNORE_WARNING=* - - FORCE_COLOR=1 # Ensure colored output for processes combined with '&&' + - FORCE_COLOR=1 # Ensure colored output (color support is not detected in some cases) stages: - name: Test
7
diff --git a/src/js/vdom_hoz.js b/src/js/vdom_hoz.js @@ -14,7 +14,7 @@ var VDomHoz = function(table){ this.vDomPadLeft = 0; this.vDomPadRight = 0; - this.window = 50; //pixel margin to make column visible before it is shown on screen + this.window = 200; //pixel margin to make column visible before it is shown on screen this.initialized = false; @@ -50,13 +50,21 @@ VDomHoz.prototype.clear = function(){ this.vDomPadRight = 0; }; -VDomHoz.prototype.reinitialize = function(){ +VDomHoz.prototype.reinitialize = function(update){ + var old = { + cols:this.columns, + leftCol:this.leftCol, + rightCol:this.rightCol, + }; + + console.log("reinit") + this.clear(); this.scrollLeft = this.holderEl.scrollLeft; this.vDomScrollPosLeft = this.scrollLeft - this.window; - this.vDomScrollPosRight = this.vDomScrollPosLeft + this.holderEl.clientWidth + this.window; + this.vDomScrollPosRight = this.scrollLeft + this.holderEl.clientWidth + this.window; var colPos = 0; @@ -98,11 +106,30 @@ VDomHoz.prototype.reinitialize = function(){ this.initialized = true; + if(!update || this.reinitChanged(old)){ this.renitializeRows(); + } this.holderEl.scrollLeft = this.scrollLeft; }; +VDomHoz.prototype.reinitChanged = function(old){ + var match = true; + + if(old.cols.length !== this.columns.length || old.leftCol !== this.leftCol || old.rightCol !== this.rightCol){ + console.log("changed") + return true; + } + + old.cols.forEach((col, i) => { + if(col !== this.columns[i]){ + match = false; + } + }); + + return !match; +} + VDomHoz.prototype.renitializeRows = function(){ var rows = this.table.rowManager.getVisibleRows(); rows.forEach((row) => {
11
diff --git a/lib/assets/core/javascripts/cartodb3/components/form-components/editors/fill/input-number/input-number-content-view.js b/lib/assets/core/javascripts/cartodb3/components/form-components/editors/fill/input-number/input-number-content-view.js @@ -20,7 +20,7 @@ module.exports = CoreView.extend({ quantification: this.model.get('quantification') })); - this._generateForms(); + this._initForm(); return this; }, @@ -37,7 +37,7 @@ module.exports = CoreView.extend({ ]; }, - _generateForms: function () { + _initForm: function () { var self = this; if (this._formView) { @@ -105,6 +105,7 @@ module.exports = CoreView.extend({ }, _removeForm: function () { + // Backbone.Form removes the view with the following method this._formView && this._formView.remove(); }, @@ -124,7 +125,6 @@ module.exports = CoreView.extend({ }, clean: function () { - // Backbone.Form removes the view with the following method this._removeForm(); CoreView.prototype.clean.call(this); }
10
diff --git a/assets/js/util/when-active.js b/assets/js/util/when-active.js @@ -59,12 +59,12 @@ export default function whenActive( { moduleName, FallbackComponent = null, Inco return null; } - // Return a fallback if the module isn't connected yet. + // Return a fallback if the module is not active. if ( module.active === false ) { return FallbackComponent !== null ? FallbackComponent : null; } - // Return a fallback if the module isn't connected yet. + // Return a fallback if the module is active but not connected yet. if ( module.active === true && module.active === false ) { return IncompleteComponent !== null ? IncompleteComponent : null; }
7
diff --git a/docs/build/tools/netrunner.md b/docs/build/tools/netrunner.md @@ -64,7 +64,7 @@ Each node has a unique name. Use the network's `GetNodeNames()` method to get th Use the network's method `GetNode(string)` to get a node by its name. For example: ```go -names, _ := network.GetNodesNames() +names, _ := network.GetNodeNames() node, _ := network.GetNode(names[0]) ```
10
diff --git a/manifest.json b/manifest.json }, "omnibox": {"keyword": "d"}, "options_page": "html/options.html", - "options_ui": {"page": "html/options.html"}, "background": { "scripts": [ "https/chromium/rules.js",
2
diff --git a/website/content/docs/examples.md b/website/content/docs/examples.md @@ -13,4 +13,3 @@ Example | Tools | Type | Source | More info | [The Ragasirtahk Blog](https://www.ragasirtahk.tk/) | Hugo | blog | [ragasirtahk/the-ragasirtahk-blog](https://github.com/ragasirtahk/the-ragasirtahk-blog) | [blog post](https://www.ragasirtahk.tk/2018/01/setting-up-netlify-cms-on-hugo/) [Bael](https://bael-theme.jake101.com/) | Vue, Nuxt | blog | [jake-101/bael-template](https://github.com/jake-101/bael-template) | [blog post](https://bael-theme.jake101.com/blog/2018-06-19-top-10-reasons-why) [Forest Garden Wales](https://www.forestgarden.wales/) | Hugo | blog | [forestgardenwales/forestgarden.wales](https://github.com/forestgardenwales/forestgarden.wales) | [blog post](https://www.forestgarden.wales/blog/now-using-netlify-cms/) -[Cup of Data](https://www.cupofdata.com/blog) | Gatsby | blog | [cupofdata/cupofdata.com](https://github.com/cupofdata/cupofdata.com) | -
2
diff --git a/app/src/components/MeetingDrawer/Chat/Menu/Input.js b/app/src/components/MeetingDrawer/Chat/Menu/Input.js @@ -44,10 +44,10 @@ const styles = (theme) => ({ display : 'none' }, padding : '8px 4px', - 'line-height' : '20px', - 'font-size' : '16px', - 'width' : '50px', - 'overflow-wrap' : 'break-word' + lineHeight : '20px', + fontSize : '16px', + width : '50px', + overflowWrap : 'break-word' }, icon : {
7
diff --git a/src/article/articleHelpers.js b/src/article/articleHelpers.js import { DefaultDOMElement, importNodeIntoDocument, selectionHelpers } from 'substance' import createJatsImporter from './converter/r2t/createJatsImporter' import { FIGURE_SNIPPET, FOOTNOTE_SNIPPET, PERSON_SNIPPET, TABLE_SNIPPET } from './ArticleSnippets' +import { generateTable } from './shared/tableHelpers' + const elementSpippetsMap = { 'figure': FIGURE_SNIPPET, 'footnote': FOOTNOTE_SNIPPET, @@ -8,12 +10,12 @@ const elementSpippetsMap = { 'table-figure': TABLE_SNIPPET } -export function createEmptyElement (tx, elName) { +export function createEmptyElement (tx, elName, ...snippetParams) { const snippet = elementSpippetsMap[elName] if (!snippet) { throw new Error('There is no snippet for element', elName) } - let snippetEl = DefaultDOMElement.parseSnippet(snippet.trim(), 'xml') + let snippetEl = DefaultDOMElement.parseSnippet(snippet(...snippetParams).trim(), 'xml') let docSnippet = tx.getDocument().createSnippet() let jatsImporter = createJatsImporter(docSnippet) let node = jatsImporter.convertElement(snippetEl) @@ -53,3 +55,7 @@ export function importFigure (tx, sel, files, paths) { } }) } + +export function insertTableFigure (tx, rows, columns) { + return createEmptyElement(tx, 'table-figure', rows, columns) +}
4
diff --git a/apigateway_test.go b/apigateway_test.go package sparta import ( + "context" + "fmt" "net/http" "testing" + "time" + + spartaAPIGateway "github.com/mweagle/Sparta/aws/apigateway" + spartaAWSEvents "github.com/mweagle/Sparta/aws/events" + "github.com/sirupsen/logrus" ) +var randVal string + +func init() { + randVal = time.Now().UTC().String() +} + +type testRequest struct { + Message string + Request spartaAWSEvents.APIGatewayRequest +} + +func testAPIGatewayLambda(ctx context.Context, + gatewayEvent spartaAWSEvents.APIGatewayRequest) (interface{}, error) { + logger, loggerOk := ctx.Value(ContextKeyLogger).(*logrus.Logger) + if loggerOk { + logger.Info("Hello world structured log message") + } + + // Return a message, together with the incoming input... + return spartaAPIGateway.NewResponse(http.StatusOK, &testRequest{ + Message: fmt.Sprintf("Test %s", randVal), + Request: gatewayEvent, + }), nil +} + +func TestAPIGatewayRequest(t *testing.T) { + requestBody := &testRequest{ + Message: randVal, + } + mockRequest, mockRequestErr := spartaAWSEvents.NewAPIGatewayMockRequest("helloWorld", + http.MethodGet, + nil, + requestBody) + if mockRequestErr != nil { + t.Fatal(mockRequestErr) + } + resp, respErr := testAPIGatewayLambda(context.Background(), *mockRequest) + if respErr != nil { + t.Fatal(respErr) + } else { + t.Log(fmt.Sprintf("%#v", resp)) + } +} + func TestAPIGateway(t *testing.T) { stage := NewStage("v1") apiGateway := NewAPIGateway("SpartaAPIGateway", stage)
0
diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml @@ -23,7 +23,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm ci + - run: npm install - run: npm run lint - run: npm run build - run: npm run build:dev @@ -41,7 +41,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm ci + - run: npm install - run: npm run lint - run: npm run build - run: npm run build:dev @@ -62,7 +62,7 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' registry-url: 'https://registry.npmjs.org' - - run: npm ci + - run: npm install - run: npm run build --if-present - run: git config --global user.email "[email protected]" - run: git config --global user.name "Nir Naor"
14
diff --git a/assets/js/components/ViewOnlyMenu/Description.js b/assets/js/components/ViewOnlyMenu/Description.js @@ -108,7 +108,7 @@ export default function Description() { return ( <li className="googlesitekit-view-only-menu__list-item googlesitekit-view-only-menu__description"> - <p className="">{ description }</p> + <p>{ description }</p> { canAuthenticate && ( <Button onClick={ onButtonClick }> { __( 'Sign in with Google', 'google-site-kit' ) }
2
diff --git a/drop-manager.js b/drop-manager.js @@ -19,6 +19,11 @@ const rarityColorsArray = Object.keys(rarityColors).map(k => rarityColors[k][0]) const tickers = []; const loadPromise = (async () => { + const [ + cardModel, + fruitModel, + ] = await Promise.all([ + (async () => { const u = `https://webaverse.github.io/assets/card-placeholder.glb`; let o = await new Promise((accept, reject) => { gltfLoader.load(u, accept, function onprogress() {}, reject); @@ -33,6 +38,26 @@ const loadPromise = (async () => { if (!cardModel) { console.warn('could not load card model'); } + return cardModel; + })(), + (async () => { + const u = `https://webaverse.github.io/assets/fruit.glb`; + let o = await new Promise((accept, reject) => { + gltfLoader.load(u, accept, function onprogress() {}, reject); + }); + o = o.scene; + let fruitModel = null; + o.traverse(o => { + if (!fruitModel && o.isMesh) { + fruitModel = o; + } + }); + if (!fruitModel) { + console.warn('could not load fruit model'); + } + return fruitModel; + })(), + ]); const glowHeight = 5; const glowGeometry = new THREE.CylinderBufferGeometry(0.01, 0.01, glowHeight) @@ -284,15 +309,99 @@ const loadPromise = (async () => { }; tickers.push(o); }; + const addFruit = (p, v, r) => { + const velocity = v.clone(); + let grounded = false; + + const o = fruitModel.clone(); + o.position.copy(p); + console.log('load', o, fruitModel); + scene.add(o); + + const startTime = Date.now(); + let lastTimestamp = startTime; + let animation = null; + const timeOffset = Math.random() * 10; + o.update = () => { + const now = Date.now(); + const timeDiff = (now - lastTimestamp) / 1000; + lastTimestamp = now; + + if (!grounded) { + o.position.add(localVector.copy(velocity).multiplyScalar(timeDiff)); + if (o.position.y < dropRadius) { + o.position.y = dropRadius; + grounded = true; + } else { + velocity.add(localVector.copy(physicsManager.getGravity()).multiplyScalar(timeDiff)); + + // o.rotation.x += r.x; + o.rotation.y += r.y; + // o.rotation.z += r.z; + } + } + + if (!animation) { + rigManager.localRig.modelBoneOutputs.Head.getWorldPosition(localVector); + localVector.y = 0; + const distance = localVector.distanceTo(o.position); + if (distance < 1) { + const timeSinceStart = now - startTime; + if (timeSinceStart > gracePickupTime) { + animation = { + startPosition: o.position.clone(), + startTime: now, + endTime: now + 1000, + }; + } + } + } + if (animation) { + const headOffset = 0.5; + const bodyOffset = -0.3; + const tailTimeFactorCutoff = 0.8; + const timeDiff = now - animation.startTime; + const timeFactor = Math.min(Math.max(timeDiff / (animation.endTime - animation.startTime), 0), 1); + if (timeFactor < 1) { + if (timeFactor < tailTimeFactorCutoff) { + const f = cubicBezier(timeFactor); + rigManager.localRig.modelBoneOutputs.Head.getWorldPosition(localVector) + .add(localVector2.set(0, headOffset, 0)); + o.position.copy(animation.startPosition).lerp(localVector, f); + } else { + { + const f = cubicBezier(tailTimeFactorCutoff); + rigManager.localRig.modelBoneOutputs.Head.getWorldPosition(localVector) + .add(localVector2.set(0, headOffset, 0)); + o.position.copy(animation.startPosition).lerp(localVector, f); + } + { + const tailTimeFactor = (timeFactor - tailTimeFactorCutoff) / (1 - tailTimeFactorCutoff); + const f = cubicBezier2(tailTimeFactor); + rigManager.localRig.modelBoneOutputs.Head.getWorldPosition(localVector) + .add(localVector2.set(0, bodyOffset, 0)); + o.position.lerp(localVector, f); + o.scale.copy(defaultScale).multiplyScalar(1 - tailTimeFactor); + } + } + } else { + scene.remove(o); + tickers.splice(tickers.indexOf(o), 1); + } + } + }; + tickers.push(o); + }; return { addSilk, addDrop, + addFruit, }; })().catch(err => console.warn(err)); const drop = async (o, {type = null, count = 1, velocity = null} = {}) => { - const {addSilk, addDrop} = await loadPromise; + const {addSilk, addDrop, addFruit} = await loadPromise; for (let i = 0; i < count; i++) { const v = velocity || new THREE.Vector3( count > 1 ? (-1 + Math.random() * 2) : 0, @@ -305,6 +414,8 @@ const drop = async (o, {type = null, count = 1, velocity = null} = {}) => { fn = addSilk; } else if (type === 'card') { fn = addDrop; + } else if (type === 'fruit') { + fn = addFruit; } else { fn = Math.random() < 0.5 ? addSilk : addDrop; }
0
diff --git a/articles/extensions/authorization-extension.md b/articles/extensions/authorization-extension.md @@ -77,7 +77,7 @@ If you have users that receive groups from the Identity Provider (such as Active ### Persistence -You can also store the authorization context information in the user profile. The data will be stored in the [user's `app_metadata`](/metadata) and you can then use the [Management API](/api/management/v2) or the [`/tokeninfo` endpoint](/api/authentication/reference#get-token-info) to retrieve this information after the user has logged in. +You can also store the authorization context information in the user profile. The data will be stored in the [user's `app_metadata`](/metadata) and you can then use the [Management API](/api/management/v2) or the [`/userinfo` endpoint](/api/authentication/reference#get-user-info) to retrieve this information after the user has logged in. ## Setup the Authorization Extension
14
diff --git a/src/cluster_logs_collection_task.erl b/src/cluster_logs_collection_task.erl @@ -74,9 +74,14 @@ build_cluster_logs_task_tail(Tasks, Nodes, BaseURL, Timestamp, PidOrCompleted) - _ -> false end], + Progress = case length(NodeStatuses) of + 0 -> 100; + Total -> length(CompletedNodes) * 100 div Total + end, + [{type, cluster_logs_collect}, {status, Status}, - {progress, length(CompletedNodes) * 100 div length(NodeStatuses)}, + {progress, Progress}, {timestamp, Timestamp}, {perNode, NodeStatuses}].
9
diff --git a/www/tablet/js/widget_slider.js b/www/tablet/js/widget_slider.js @@ -380,7 +380,7 @@ var Modul_slider = function () { val = pwrng.options.max; if (new RegExp('^' + elem.data('off') + '$').test(txtValue)) val = pwrng.options.min; - if ($.isNumeric(val) && input_elem) { + if ($.isNumeric(val) && input_elem && pwrng.options.min < pwrng.options.max) { var v = elem.hasClass('negated') ? pwrng.options.max + pwrng.options.min - parseFloat(val) : parseFloat(val); pwrng.setStart(parseFloat(v));
1
diff --git a/contribs/gmf/src/controllers/desktop.scss b/contribs/gmf/src/controllers/desktop.scss @@ -6,14 +6,15 @@ $map-tools-size: 1.9rem !default; $button-size: 2.5rem !default; $left-panel-width: 20rem !default; $right-panel-width: 17.5rem !default; +$streeview-width: 25rem !default; $topbar-height: 2.8rem !default; $search-width: 8 * $map-tools-size !default; -$padding-base-vertical: 0.31rem !default; -$padding-base-horizontal: 0.62rem !default; -$form-group-margin-bottom: 0.62rem !default; @import '~gmf/sass/vars_only.scss'; +$padding-base-vertical: $half-app-margin !default; +$padding-base-horizontal: $app-margin !default; +$form-group-margin-bottom: $app-margin !default; $search-results-max-height: calc(100vh - #{$topbar-height} + #{$map-tools-size} + (2 * #{$app-margin})) !default; $border-color: darken($brand-primary, $standard-variation) !default; @@ -208,7 +209,7 @@ gmf-search { font-size: $font-size-small; background-color: #eee; text-transform: uppercase; - color: #666; + color: $color-light; } .gmf-search-group { @@ -298,6 +299,8 @@ $theme-selector-columns: 2; & > div { height: 100%; + margin-right: -$app-margin; + margin-left: -$app-margin; & > div { height: 100%; } @@ -318,16 +321,15 @@ $theme-selector-columns: 2; } .gmf-app-tools-content-heading { - $color: lighten($text-color, $standard-variation); - color: $color; + color: $color-light; padding-bottom: $app-margin; margin-bottom: $app-margin; margin-top: $grid-gutter-width / 2; - border-bottom: 0.06rem solid $color; + border-bottom: 0.06rem solid $color-light; } &.gmf-app-googlestreetview-active { - width: 26.88rem; + width: $streeview-width + $app-margin + $app-margin; } } @@ -428,9 +430,9 @@ hr.gmf-drawfeature-separator { .tooltip { position: relative; background: rgba(0, 0, 0, 0.5); - border-radius: 0.25rem; + border-radius: $border-radius-sm; color: white; - padding: 0.25rem 0.50rem; + padding: $half-app-margin $app-margin; opacity: 0.7; white-space: nowrap; } @@ -443,13 +445,13 @@ hr.gmf-drawfeature-separator { } .ngeo-tooltip-measure:before, .ngeo-tooltip-static:before { - border-top: 0.37rem solid rgba(0, 0, 0, 0.5); - border-right: 0.37rem solid transparent; - border-left: 0.37rem solid transparent; + border-top: $half-app-margin solid rgba(0, 0, 0, 0.5); + border-right: $half-app-margin solid transparent; + border-left: $half-app-margin solid transparent; content: ""; position: absolute; - bottom: -0.37rem; - margin-left: -0.44rem; + bottom: -$half-app-margin; + margin-left: -$half-app-margin; left: 50%; } .ngeo-tooltip-static:before { @@ -488,8 +490,8 @@ gmf-featurestyle { & > div { position: relative; - height: 0.75rem; - width: 0.75rem; + height: $app-margin; + width: $app-margin; border: 0.06rem solid #fff; box-sizing: content-box; } @@ -502,11 +504,11 @@ gmf-featurestyle { position: absolute; width: 1.75rem; height: 1.75rem; - top: -0.62rem; - left: -0.62rem; + top: -$app-margin; + left: -$app-margin; border: 0.12rem solid #fff; box-shadow: $eavy-box-shadow; - z-index: 11; + z-index: $above-search-index; } } @@ -515,11 +517,11 @@ gmf-featurestyle { margin: 0; content: ''; display: block; - width: 0.87rem; - height: 0.87rem; + width: $app-margin; + height: $app-margin; position: absolute; - left: -0.19rem; - top: -0.19rem; + left: -0.12rem; // It matches the square size of the colorpicker + top: -0.12rem; // It matches the square size of the colorpicker box-sizing: content-box; z-index: 10; } @@ -531,12 +533,13 @@ gmf-featurestyle { * Notifications */ .ngeo-notification { + $notification-width: 12.5rem !default; left: 50%; - margin: 0 0 0 -6.25rem; + margin: 0 0 0 calc(-#{$notification-width} / 2); position: absolute; top: 0; - width: 12.50rem; - z-index: 999; + width: $notification-width; + z-index: $above-all; } @@ -602,9 +605,9 @@ $bgselector-image-size: 3.00rem; * GMF EditFeature directive */ gmf-editfeature > div { - border-top: 0.06rem solid #333; - margin-top: 0.62rem; - padding-top: 0.62rem; + border-top: 0.06rem solid $border-color; + margin-top: $app-margin; + padding-top: $app-margin; } @@ -612,10 +615,10 @@ gmf-editfeature > div { * GMF ObjectEditingTools directive */ gmf-objecteditingtools { - border-bottom: 0.06rem solid #595959; + border-bottom: 0.06rem solid $border-color; display: block; - margin: 0 0 0.62rem 0; - padding: 0 0 0.62rem 0; + margin: 0 0 $app-margin 0; + padding: 0 0 $app-margin 0; } @@ -767,16 +770,15 @@ ngeo-rule { } .ngeo-rule-type-select label { - width: 8.44rem; + width: 100%; } .ngeo-rule-value { - border: 0.06rem solid #aaa; - border-radius: 0 0 0.19rem 0.19rem; + border: 0.06rem solid $color-light; + border-radius: $border-radius-sm; border-top: 0; color: $color-light; - padding: 0.25rem 0.19rem 0.12rem 0.31rem; - margin: -0.12rem 0 0 0; + padding: $micro-app-margin $half-app-margin; a.btn { color: $color-light; @@ -810,5 +812,5 @@ ngeo-rule { ngeo-googlestreetview { display: block; height: calc(100% - 3.75rem); - width: 25rem; + width: $streeview-width; }
4
diff --git a/accessibility-checker-engine/help/Rpt_Aria_EmptyPropertyValue.mdx b/accessibility-checker-engine/help/Rpt_Aria_EmptyPropertyValue.mdx @@ -30,7 +30,7 @@ When specifying a required WAI-ARIA attribute, the value must be non-empty ## What to do - * Provide a valid value for the `{0}` attribute(s). Refer to the [WAI-ARIA 1.1 Taxonomy of States and Properties](https://www.w3.org/TR/wai-aria-1.1/#state_prop_taxonomy) for valid values for each attribute. + * Provide a valid value for the element attribute(s) that is empty. Refer to the [WAI-ARIA 1.1 Taxonomy of States and Properties](https://www.w3.org/TR/wai-aria-1.1/#state_prop_taxonomy) for valid values for each attribute. For example, the following element uses an `aria-live` property. The `aria-live` property requires a valid non-empty value set, one of which is `"polite"`.
3
diff --git a/src/workingtitle-vcockpits-instruments-airliners/html_ui/Pages/VCockpit/Instruments/Airliners/Shared/WT/AltimeterIndicator.js b/src/workingtitle-vcockpits-instruments-airliners/html_ui/Pages/VCockpit/Instruments/Airliners/Shared/WT/AltimeterIndicator.js @@ -192,20 +192,22 @@ class Jet_PFD_AltimeterIndicator extends HTMLElement { line.IsPrimary = false; var lineWidth = line.IsPrimary ? 15 : 4; line.SVGLine = document.createElementNS(Avionics.SVG.NS, "rect"); - line.SVGLine.setAttribute("x", "0"); + line.SVGLine.setAttribute("x", "-2"); line.SVGLine.setAttribute("width", lineWidth.toString()); line.SVGLine.setAttribute("height", "2"); line.SVGLine.setAttribute("fill", "white"); if (line.IsPrimary) { line.SVGText1 = document.createElementNS(Avionics.SVG.NS, "text"); - line.SVGText1.setAttribute("x", "-28"); + line.SVGText1.setAttribute("x", "-38"); + line.SVGText1.setAttribute("y", "6"); line.SVGText1.setAttribute("fill", "white"); - line.SVGText1.setAttribute("font-size", (this.fontSize * 1).toString()); + line.SVGText1.setAttribute("font-size", (this.fontSize).toString()); line.SVGText1.setAttribute("font-family", "Roboto-Light"); line.SVGText1.setAttribute("text-anchor", "end"); line.SVGText1.setAttribute("alignment-baseline", "central"); line.SVGText2 = document.createElementNS(Avionics.SVG.NS, "text"); - line.SVGText2.setAttribute("x", "-28"); + line.SVGText2.setAttribute("x", "-36"); + line.SVGText2.setAttribute("y", "4"); line.SVGText2.setAttribute("fill", "white"); line.SVGText2.setAttribute("font-size", (this.fontSize * 0.72).toString()); line.SVGText2.setAttribute("font-family", "Roboto-Light"); @@ -261,10 +263,10 @@ class Jet_PFD_AltimeterIndicator extends HTMLElement { var _cursorPosY = cursorHeight * 0.5; this.cursorSVGIntegralContainer = document.createElementNS(Avionics.SVG.NS, "g"); this.cursorSVGIntegralContainer.setAttribute("clip-path", "url(#AltCursorClip)"); - this.cursorIntegrals[0].construct(this.cursorSVGIntegralContainer, _cursorPosX + 25, _cursorPosY + 5, _width, "Roboto-Bold", this.fontSize * 1.55, "green"); - this.cursorIntegrals[1].construct(this.cursorSVGIntegralContainer, _cursorPosX + 44, _cursorPosY + 5, _width, "Roboto-Bold", this.fontSize * 1.55, "green"); - this.cursorIntegrals[2].construct(this.cursorSVGIntegralContainer, _cursorPosX + 63, _cursorPosY + 5, _width, "Roboto-Bold", this.fontSize * 1.55, "green"); - this.cursorDecimals.construct(this.cursorSVGIntegralContainer, _cursorPosX + 95, _cursorPosY + 5, _width, "Roboto-Bold", this.fontSize * 0.95, "green"); + this.cursorIntegrals[0].construct(this.cursorSVGIntegralContainer, _cursorPosX + 27, _cursorPosY + 5, _width, "Roboto-Bold", this.fontSize * 1.55, "green"); + this.cursorIntegrals[1].construct(this.cursorSVGIntegralContainer, _cursorPosX + 46, _cursorPosY + 5, _width, "Roboto-Bold", this.fontSize * 1.55, "green"); + this.cursorIntegrals[2].construct(this.cursorSVGIntegralContainer, _cursorPosX + 65, _cursorPosY + 5, _width, "Roboto-Bold", this.fontSize * 1.55, "green"); + this.cursorDecimals.construct(this.cursorSVGIntegralContainer, _cursorPosX + 93, _cursorPosY + 5, _width, "Roboto-Bold", this.fontSize * 0.95, "green"); this.cursorSVG.appendChild(this.cursorSVGIntegralContainer); this.centerSVG.appendChild(this.cursorSVG); }
7
diff --git a/src/instance/methods.js b/src/instance/methods.js @@ -65,8 +65,7 @@ Moon.prototype.destroy = function() { * @param {Array} children */ Moon.prototype.build = function(vdom) { - for(var i = 0; i < children.length; i++) { - var vnode = vdom[i]; + for(var vnode in vdom) { if(vnode !== undefined && !vnode.once) { if(child.nodeName === "#text") { var valueOfVNode = "";
4
diff --git a/packages/node_modules/@node-red/editor-api/lib/admin/diagnostics.js b/packages/node_modules/@node-red/editor-api/lib/admin/diagnostics.js @@ -13,7 +13,7 @@ module.exports = { scope: diagnosticsOpts.level || "basic" } if(diagnosticsOpts.enabled === false || diagnosticsOpts.enabled === "false") { - apiUtil.rejectHandler(req, res, {message: "disabled", status: 403, code: "diagnostics.enabled" }) + apiUtil.rejectHandler(req, res, {message: "diagnostics are disabled", status: 403, code: "diagnostics.disabled" }) } else { runtimeAPI.diagnostics.get(opts) .then(function(result) { res.json(result); })
7
diff --git a/src/components/App.jsx b/src/components/App.jsx @@ -434,6 +434,27 @@ export default class App extends React.Component { }) } + setDefaultValues = (styleObj) => { + const metadata = styleObj.metadata || {} + if(metadata['maputnik:renderer'] === undefined) { + const changedStyle = { + ...styleObj, + metadata: { + ...styleObj.metadata, + 'maputnik:renderer': 'mbgljs' + } + } + return changedStyle + } else { + return styleObj + } + } + + openStyle = (styleObj) => { + styleObj = this.setDefaultValues(styleObj) + this.onStyleChanged(styleObj) + } + fetchSources() { const sourceList = {...this.state.sources}; @@ -669,7 +690,7 @@ export default class App extends React.Component { /> <OpenModal isOpen={this.state.isOpen.open} - onStyleOpen={this.onStyleChanged} + onStyleOpen={this.openStyle} onOpenToggle={this.toggleModal.bind(this, 'open')} /> <SourcesModal
12
diff --git a/src/module.d.ts b/src/module.d.ts @@ -364,7 +364,17 @@ export namespace utils { const compositionUtils: PropertyBag<Function>; const dataUtils: PropertyBag<Function>; const rowUtils: PropertyBag<Function>; - const sortUtils: PropertyBag<Function>; + + interface SortProperties{ + setSortColumn(sortProperties: ((GriddleSortKey) => void)); + sortProperty: GriddleSortKey; + columnId: string; + } + + namespace sortUtils { + function defaultSort(data: any[], column: string, sortAscending?: boolean); + function setSortProperties(sortProperties: SortProperties); + } } export namespace plugins {
0
diff --git a/app/models/list.rb b/app/models/list.rb @@ -148,7 +148,7 @@ class List < ActiveRecord::Base controller = options[:controller] || FakeView.new attrs = %w(taxon_name description occurrence_status establishment_means adding_user_login first_observation last_observation url created_at updated_at taxon_common_name) - ranks = %w(kingdom phylum class sublcass superorder order suborder superfamily family subfamily tribe genus) + ranks = Taxon::RANK_LEVELS.select{|r,l| (Taxon::COMPLEX_LEVEL..Taxon::KINGDOM_LEVEL).include?(l) }.keys - [Taxon::GENUSHYBRID] headers = options[:taxonomic] ? ranks + attrs : attrs fname = options[:fname] || "#{to_param}.csv" fpath = options[:path] || File.join(options[:dir] || Dir::tmpdir, fname)
4
diff --git a/processors/processExpand.js b/processors/processExpand.js @@ -90,7 +90,7 @@ function processExpand(entries, meta) { key, value: e.value, }); - if (e.sourcename.includes('npc_dota_hero_')) { + if (e.sourcename && e.sourcename.includes('npc_dota_hero_')) { expand({ time: e.time, value: e.value,
9
diff --git a/examples/test/tracks-hg19.html b/examples/test/tracks-hg19.html name: "Bigbed with color (green)", }, { - url: 'http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneGm12878H3k4me3StdSig.bigWig', + url: 'https://www.encodeproject.org/files/ENCFF000ASF/@@download/ENCFF000ASF.bigWig', name: 'Group Autoscale 1 of 3', color: 'rgb(200,0,0)', autoscaleGroup: '1' }, { - url: 'http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneGm12878H3k27me3StdSig.bigWig', + url: 'https://www.encodeproject.org/files/ENCFF000ASJ/@@download/ENCFF000ASJ.bigWig', name: 'Group Autoscale 2 of 3', color: 'rgb(0,0,150)', autoscaleGroup: '1' }, { - url: 'http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHistone/wgEncodeBroadHistoneGm12878H3k36me3StdSig.bigWig', + url: 'https://www.encodeproject.org/files/ENCFF000ATA/@@download/ENCFF000ATA.bigWig', name: 'Group Autoscale 3 of 3', color: 'rgb(0,150,0)', autoscaleGroup: '1'
1
diff --git a/.travis.yml b/.travis.yml @@ -167,11 +167,11 @@ after_success: if [[ "$TRAVIS_NODE_VERSION" == "8" && "$TRAVIS_OS_NAME" == "linux" ]]; then npm run build:linux-armv7l; ls -al output output/*; - cp -af "output/${PRODUCT_NAME}_${PRODUCT_VERSION}_armv7l.deb" "releases/${RELEASE}-linux-armv7.deb"; + cp -af "output/${PRODUCT_NAME}_${PRODUCT_VERSION}_armv7l.deb" "releases/${RELEASE}-linux-armv7l.deb"; pushd releases; - ln -sf ../output/linux-armv7l-unpacked "${RELEASE}-linux-armv7"; - tar zcfh "${RELEASE}-linux-armv7.tar.gz" "${RELEASE}-linux-armv7"; - rm -f "${RELEASE}-linux-armv7"; + ln -sf ../output/linux-armv7l-unpacked "${RELEASE}-linux-armv7l"; + tar zcfh "${RELEASE}-linux-armv7l.tar.gz" "${RELEASE}-linux-armv7l"; + rm -f "${RELEASE}-linux-armv7l"; popd; ls -al releases/*; if [[ -z "$TRAVIS_TAG" ]]; then @@ -180,14 +180,14 @@ after_success: --repo=cncjs \ --tag="${TRAVIS_BRANCH}-latest" \ --name="${TRAVIS_BRANCH}" \ - "*-linux-armv7.deb" "*-linux-armv7.tar.gz"; + "*-linux-armv7l.deb" "*-linux-armv7l.tar.gz"; npm run github-release -- upload \ --owner=cncjs \ --repo=cncjs \ --tag="${TRAVIS_BRANCH}-latest" \ --name="${TRAVIS_BRANCH}" \ --body="${COMMIT_LOG}" \ - "releases/${RELEASE}-linux-armv7.deb" "releases/${RELEASE}-linux-armv7.tar.gz"; + "releases/${RELEASE}-linux-armv7l.deb" "releases/${RELEASE}-linux-armv7l.tar.gz"; fi fi - |
10
diff --git a/services/dataservices-metrics/spec/unit/service_usage_metrics_spec.rb b/services/dataservices-metrics/spec/unit/service_usage_metrics_spec.rb @@ -119,7 +119,6 @@ describe CartoDB::ServiceUsageMetrics do @redis_mock.zincrby('org:team:dummy_service:dummy_metric:201703', _amount = 1, _day = '20') @redis_mock.zincrby('org:team:dummy_service:dummy_metric:201703', _amount = 2, _day = '21') @redis_mock.zincrby('org:team:dummy_service:dummy_metric:201703', _amount = 3, _day = '22') - expected = { Date.new(2017, 3, 20) => 1, Date.new(2017, 3, 21) => 2, @@ -135,7 +134,6 @@ describe CartoDB::ServiceUsageMetrics do @redis_mock.zincrby('org:team:dummy_service:dummy_metric:201703', _amount = 1, _day = '20') @redis_mock.zincrby('org:team:dummy_service:dummy_metric:201703', _amount = 2, _day = '21') @redis_mock.zincrby('org:team:dummy_service:dummy_metric:201703', _amount = 3, _day = '22') - expected = { Date.new(2017, 3, 18) => 0, Date.new(2017, 3, 19) => 0, @@ -143,7 +141,6 @@ describe CartoDB::ServiceUsageMetrics do Date.new(2017, 3, 21) => 2, Date.new(2017, 3, 22) => 3 } - @usage_metrics.get_date_range(:dummy_service, :dummy_metric, Date.new(2017, 3, 18), @@ -154,7 +151,6 @@ describe CartoDB::ServiceUsageMetrics do @redis_mock.zincrby('org:team:dummy_service:dummy_metric:201703', _amount = 1, _day = '01') @redis_mock.zincrby('org:team:dummy_service:dummy_metric:201703', _amount = 2, _day = '02') @redis_mock.zincrby('org:team:dummy_service:dummy_metric:201703', _amount = 3, _day = '03') - expected = { Date.new(2017, 2, 27) => 0, Date.new(2017, 2, 28) => 0, @@ -162,7 +158,6 @@ describe CartoDB::ServiceUsageMetrics do Date.new(2017, 3, 2) => 2, Date.new(2017, 3, 3) => 3 } - @usage_metrics.get_date_range(:dummy_service, :dummy_metric, Date.new(2017, 2, 27), @@ -182,7 +177,6 @@ describe CartoDB::ServiceUsageMetrics do Date.new(2017, 2, 28) => 0, Date.new(2017, 3, 1) => 0 } - @usage_metrics.get_date_range(:dummy_service, :dummy_metric, Date.new(2017, 2, 28),
2
diff --git a/articles/auth0-hooks/extensibility-points/post-user-registration.md b/articles/auth0-hooks/extensibility-points/post-user-registration.md @@ -11,8 +11,6 @@ This allows you to implement scenarios including (but not limited to): * Sending notifications to Slack or via e-mail about the user's new account; * Creating a new user record in SalesForce. -## Starter Code - :::panel-warning Response Object The Post-User Registration extensibility point ignores any response object. :::
2
diff --git a/js/kucoin.js b/js/kucoin.js @@ -659,11 +659,11 @@ module.exports = class kucoin extends Exchange { } async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - return this.fetchOrdersByStatus ('done', symbol, since, limit, params); + return await this.fetchOrdersByStatus ('done', symbol, since, limit, params); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - return this.fetchOrdersByStatus ('active', symbol, since, limit, params); + return await this.fetchOrdersByStatus ('active', symbol, since, limit, params); } async fetchOrder (id, symbol = undefined, params = {}) {
1
diff --git a/README.md b/README.md @@ -41,10 +41,6 @@ Other customizable env vars are: * `IMAGE_MESSAGE_ENABLED`: Default disabled. To enable, please see "Process image message" section below. * `DEBUG_LIFF`: Disables external browser check in LIFF. Useful when debugging LIFF in external browser. Don't enable this on production. -### Redis server - -We use Redis to store conversation context / intents. Please run a Redis server on your machine, or use the Heroku Redis's `REDIS_URL` directly if you happen to deploy the bot to Heroku. - ### Node Dependencies You will need `Node.JS` 12+ to proceed. @@ -55,11 +51,20 @@ $ npm i ### Get the bot server running on your local machine +Spin up peripherals like Redis and MongoDB using: + +``` +$ docker-compose up -d +``` + +Then spin up the application, including chatbot server and webpack-dev-server for LIFF, using: ``` $ npm run dev ``` -and the server will be started on `localhost:5001`. (Or the `PORT` you specified in your `.env` file.) +The server will be started on `localhost:5001` (or the `PORT` you specified in your `.env` file.) + +If you wish to stop the peripherals, run `docker-compose stop`. ### Get LINE messages to your local machine @@ -212,6 +217,20 @@ $ node build/scripts/scanRepliesAndNotify.js If you would like to start your own LINE bot server in production environment, this section describes how you can deploy the line bot to your own Heroku account. +### Storage + +#### Redis + +We use Redis to store conversation context. + +Use the env var `REDIS_URL` to specify how chatbot should link to the Redis server. + +#### MongoDB + +We use MongoDB to store users' visited posts. It's the data source for related GraphQL APIs. + +Use the env var `MONGODB_URI` to specify your MongoDB's connection string. + ### Get the server running You can deploy the line bot server to your own Heroku account by [creating a Heroku app and push to it](https://devcenter.heroku.com/articles/git#creating-a-heroku-remote).
7
diff --git a/packages/cx-core/src/ui/Widget.js b/packages/cx-core/src/ui/Widget.js @@ -88,7 +88,7 @@ export class Widget extends Component { declareData() { var props = { - visible: true, + visible: undefined, mod: { structured: true } @@ -200,6 +200,7 @@ export class Widget extends Component { } } +Widget.prototype.visible = true; Widget.prototype.memoize = true; //cache rendered content and use it if possible Widget.prototype.pure = true; //widget does not rely on contextual data Widget.prototype.CSS = 'cx';
2
diff --git a/contracts/scripts/governor/propose.js b/contracts/scripts/governor/propose.js @@ -344,14 +344,17 @@ async function proposeProp14Args() { } // Args to send a proposal to: -// - upgrade the OUSD contract +// - set the Aave reward token address to zero address // - upgrade Vault Core and Admin // - set the liquidation threshold on Compound and ThreePool strategies (not needed on Aave since // there is no reward token on that one). // TODO (franck): configure the old USDT/USDC Compound contract async function proposeProp16Args() { - const cOusdProxy = await ethers.getContract("OUSDProxy"); - const cOusd = await ethers.getContract("OUSD"); + const cAaveStrategyProxy = await ethers.getContract("AaveStrategyProxy"); + const cAaveStrategy = await ethers.getContractAt( + "AaveStrategy", + cAaveStrategyProxy.address + ); const cVaultProxy = await ethers.getContract("VaultProxy"); const cVaultCoreProxy = await ethers.getContractAt( @@ -371,9 +374,9 @@ async function proposeProp16Args() { const args = await proposeArgs([ { - contract: cOusdProxy, - signature: "upgradeTo(address)", - args: [cOusd.address], + contract: cAaveStrategy, + signature: "setRewardTokenAddress(address)", + args: [addresses.zero], }, { contract: cVaultProxy,
14
diff --git a/content/blog/application-state-management-with-react/index.md b/content/blog/application-state-management-with-react/index.md @@ -181,8 +181,11 @@ React docs. But now that `context` is an officially supported part of the React API, we can use this directly without any problem: ```javascript -// src/context/count.js +// src/count/count-context.js +import React from 'react' + const CountContext = React.createContext() + function useCount() { const context = React.useContext(CountContext) if (!context) { @@ -197,7 +200,12 @@ function CountProvider(props) { return <CountContext.Provider value={value} {...props} /> } -// src/index.js +export {CountProvider, useCount} + +// src/count/page.js +import React from 'react' +import {CountProvider, useCount} from './count-context' + function Counter() { const [count, setCount] = useCount() const increment = () => setCount(c => c + 1) @@ -209,7 +217,7 @@ function CountDisplay() { return <div>The current counter count is {count}</div> } -function App() { +function CountPage() { return ( <div> <CountProvider>
7
diff --git a/game.js b/game.js @@ -1332,7 +1332,6 @@ class GameManager extends EventTarget { this.closestObject = null; this.usableObject = null; this.hoverEnabled = false; - this.mapOpen = false; } getMenu() { return this.menuOpen; @@ -1521,15 +1520,6 @@ class GameManager extends EventTarget { } } - toggleMap() { - this.mapOpen = !this.mapOpen; - this.dispatchEvent(new MessageEvent('mapopenchange', { - data: { - mapOpen: this.mapOpen, - } - })); - } - menuVDown() { if (_getGrabbedObject(0)) { this.menuGridSnap();
2
diff --git a/physics-manager.js b/physics-manager.js @@ -420,6 +420,10 @@ const _applyAvatarPhysics = (camera, avatarOffset, cameraBasedOffset, velocityAv localVector.y += deltaY; camera.position.y += deltaY; camera.updateMatrixWorld(); + + physicsManager.velocity.setScalar(0); + + physicsManager.dispatchEvent(new MessageEvent('voidout')); } const collision = _collideCapsule(localVector, localQuaternion2.set(0, 0, 0, 1)); if (velocityAvatarDirection && physicsManager.velocity.lengthSq() > 0) {
0
diff --git a/token-metadata/0xCF67CEd76E8356366291246A9222169F4dBdBe64/metadata.json b/token-metadata/0xCF67CEd76E8356366291246A9222169F4dBdBe64/metadata.json "symbol": "DICE", "address": "0xCF67CEd76E8356366291246A9222169F4dBdBe64", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/README.md b/README.md Alloy is the web SDK for the Adobe Experience Platform. It allows for streaming data into the platform, syncing identities, personalizing content, and more. This repository is currently under active development and is not yet intended for general consumption. -For documentation on how to use Alloy, please see the [documentation](https://app.gitbook.com/@launch/s/adobe-experience-platform-web-sdk). +For documentation on how to use Alloy, please see the [documentation](https://adobe.ly/36dGGp6). ## Contributing @@ -32,7 +32,7 @@ Thank you for your interest in contributing! ## Linking to Documentation -If you are writing code that logs a message referring the user to a particular piece of [documentation](https://app.gitbook.com/@launch/s/adobe-experience-platform-web-sdk), please link to the documentation using an `adobe.ly` URL. To make an `adobe.ly` URL, go to [Bitly](https://bitly.com/) and shorten the documentation URL. Bitly should provide you with a short url using the `adobe.ly` domain. +If you are writing code that logs a message referring the user to a particular piece of [documentation](https://adobe.ly/36dGGp6), please link to the documentation using an `adobe.ly` URL. To make an `adobe.ly` URL, go to [Bitly](https://bitly.com/) and shorten the documentation URL. Bitly should provide you with a short url using the `adobe.ly` domain. If you need to change the documentation URL that the `adobe.ly` URL redirects to, please open an issue in this repository requesting the change.
3
diff --git a/tests/e2e/specs/auth-flow.test.js b/tests/e2e/specs/auth-flow.test.js @@ -65,9 +65,6 @@ describe( 'Site Kit set up flow for the first time', () => { await page.click( '.googlesitekit-wizard-step--two .mdc-button' ); await page.waitForNavigation(); - await expect( page ).toClick( '.googlesitekit-wizard-step__action button', { text: /Go to Dashboard/i } ); - await page.waitForNavigation(); - await expect( page ).toMatchElement( '#js-googlesitekit-dashboard' ); await expect( page ).toMatchElement( '.googlesitekit-publisher-win__title', { text: /Congrats on completing the setup for Site Kit!/i } ); } );
2
diff --git a/util/utility.js b/util/utility.js @@ -310,6 +310,7 @@ function getData(redis, url, cb) { || !res || res.statusCode !== 200 || !body + || (hypixelApi && !body.success) ) { // invalid response if (url.noRetry) {
7
diff --git a/src/components/character-count/template.njk b/src/components/character-count/template.njk {% set describedBy = "" %} <div class="govuk-character-count" data-module="character-count" -{% if params.maxlength %} data-maxlength="{{ params.maxlength }}"{% endif %} -{% if params.threshold %} data-threshold="{{ params.threshold }}"{% endif %} -{% if params.maxwords %} data-maxwords="{{ params.maxwords }}"{% endif %}> +{%- if params.maxlength %} data-maxlength="{{ params.maxlength }}"{% endif %} +{%- if params.threshold %} data-threshold="{{ params.threshold }}"{% endif %} +{%- if params.maxwords %} data-maxwords="{{ params.maxwords }}"{% endif %}> {{ govukTextarea({ id: params.id, name: params.name,
9
diff --git a/lib/contracts/code_templates/define-web3-simple.js.ejs b/lib/contracts/code_templates/define-web3-simple.js.ejs __mainContext.web3 = undefined; -web3 = new Web3(new Web3.providers.HttpProvider("<%- url -%>'")); +web3 = new Web3(new Web3.providers.HttpProvider("<%- url -%>")); <%- done %>
2
diff --git a/core/bound_variable_abstract.js b/core/bound_variable_abstract.js @@ -52,13 +52,6 @@ Blockly.BoundVariableAbstract = function(block, fieldName, typeExpr, label) { */ this.label = label; - /** - * The list of sub field names which the variable is bound to. - * @type {!Array.<string>} - * @private - */ - this.subFieldNames_ = []; - /** * A unique id for the variable. * @type {string} @@ -97,46 +90,20 @@ Blockly.BoundVariableAbstract.prototype.getWorkspace = function() { }; /** - * Functions to return the name of the field this variable is bound to. + * Returns the name of the main field this variable is bound to. * @return {!string} The name of this variable's field. */ Blockly.BoundVariableAbstract.prototype.getMainFieldName = function() { return this.mainFieldName_; }; -Blockly.BoundVariableAbstract.prototype.getSubFieldName = function(index) { - return this.subFieldNames_[index]; -}; /** - * Functions to return the field this variable is bound to. + * Returns the field this variable is bound to. * @return {!Blockly.FieldBoundVariable} This variable's field. */ Blockly.BoundVariableAbstract.prototype.getMainField = function() { return this.sourceBlock_.getField(this.mainFieldName_); }; -Blockly.BoundVariableAbstract.prototype.getSubField = function(index) { - var name = this.getSubFieldName(index); - if (name) { - return this.sourceBlock_.getField(name); - } - throw 'The sub field index is out of bounds.'; -}; - -/** - * Functions to modify this variable's sub fields. - */ -Blockly.BoundVariableAbstract.prototype.addSubField = function(name) { - if (!name) { - throw 'The sub field name can not be empty.'; - } - if (this.subFieldNames_.indexOf(name) != -1) { - throw 'The sub field name must be unique.'; - } - this.subFieldNames_.push(name); -}; -Blockly.BoundVariableAbstract.prototype.removeSubField = function(name) { - goog.array.removeLast(this.subFieldNames_, name); -}; /** * Returns the type expression of this variable.
2
diff --git a/articles/security/bulletins/cve-2017-17068.md b/articles/security/bulletins/cve-2017-17068.md @@ -9,6 +9,8 @@ toc: true **CVE number**: CVE 2017-17068 +**Credit**: [@AppCheckNG](https://twitter.com/AppCheckNG) + ## Overview A vulnerability has been identified in the [auth0.js JavaScript library](/libraries/auth0js), affecting versions < `8.12`.
0
diff --git a/assets/scss/main.scss b/assets/scss/main.scss @@ -368,6 +368,9 @@ body { @include bootstrap.media-breakpoint-up(md) { margin: 2rem 0; } + @include bootstrap.media-breakpoint-down(xs) { + margin-top: 1.5rem; + } } &-utils { margin-top: 0.5rem; @@ -378,10 +381,13 @@ body { font-weight: 600; font-size: 1.6rem; letter-spacing: 0; - width: 3.5rem; + width: 100%; @include bootstrap.media-breakpoint-up(md) { font-size: 2rem; } + @include bootstrap.media-breakpoint-down(xs) { + display: block; + } } .Header-subtitle { color: #fff; @@ -431,6 +437,12 @@ body { } } } + .form-group { + @include bootstrap.media-breakpoint-down(sm) { + display: block; + margin: auto; + } + } } #languages { @@ -2286,3 +2298,10 @@ body { .faq { width: 45%; } + +#header-search a { + @include bootstrap.media-breakpoint-down(sm) { + display: block; + margin: auto; + } +} \ No newline at end of file
1
diff --git a/articles/appliance/dashboard/activity.md b/articles/appliance/dashboard/activity.md @@ -11,10 +11,6 @@ applianceId: appliance17 # PSaaS Appliance Dashboard: Activity -::: note - For additional information on navigating to and using the PSaaS Appliance Dashboard, please see the section on [PSaaS Appliance Controls](/appliance/dashboard#appliance-controls). -::: - After you begin an update or make a change to the configuration, Auth0 displays progress and logs for those actions on this page in case you need the information for troubleshooting purposes. ![](/media/articles/appliance/dashboard/activity.png)
2
diff --git a/packages/insomnia-smoke-test/tests/oauth.test.ts b/packages/insomnia-smoke-test/tests/oauth.test.ts @@ -28,7 +28,7 @@ test('can make oauth2 requests', async ({ app, page }) => { await page.locator('button:has-text("No PKCE")').click(); const [authorizationCodePage] = await Promise.all([ - app.context().waitForEvent('page'), + app.waitForEvent('window'), sendButton.click(), ]); @@ -56,7 +56,7 @@ test('can make oauth2 requests', async ({ app, page }) => { await page.locator('button:has-text("Click to confirm")').click(); const [refreshPage] = await Promise.all([ - app.context().waitForEvent('page'), + app.waitForEvent('window'), page.locator('button:has-text("Fetch Tokens")').click(), ]); @@ -97,7 +97,7 @@ test('can make oauth2 requests', async ({ app, page }) => { await page.locator('button:has-text("ID Token")').click(); const [implicitPage] = await Promise.all([ - app.context().waitForEvent('page'), + app.waitForEvent('window'), sendButton.click(), ]); await implicitPage.waitForLoadState();
4
diff --git a/token-metadata/0x9Bfb088C9f311415E3F9B507DA73081c52a49d8c/metadata.json b/token-metadata/0x9Bfb088C9f311415E3F9B507DA73081c52a49d8c/metadata.json "symbol": "TAPE", "address": "0x9Bfb088C9f311415E3F9B507DA73081c52a49d8c", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/environment/core/SimulationEvent.cpp b/environment/core/SimulationEvent.cpp @@ -143,14 +143,18 @@ auto collision_time( return { true, t }; } else if (disc > 0) { - const auto t1 = -b + std::sqrt(disc); - const auto t2 = -b - std::sqrt(disc); - - if (t1 >= 0.0 && t2 >= 0.0) { - return { true, std::min(t1, t2) / (2 * a) }; - } - else { - return { true, std::max(t1, t2) / (2 * a) }; + const auto t1 = (-b + std::sqrt(disc)) / (2 * a); + const auto t2 = (-b - std::sqrt(disc)) / (2 * a); + + if(t1 >= 0.0 && t1 <= 1.0) { + /// t1 is valid to pick, because it is in between 0 and 1 + return { true, t1 }; + } else if (t1 < 0.0 && t2 >= 0.0) { + /// t1 is before 0 and t2 is after, but that means at t = 0.0 we are colliding + return { true, 0.0 }; + } else { + /// The range [0, 1] does not intersect with [t1, t2] + return { false, 0.0 }; } } else {
1
diff --git a/articles/api/management/v2/tokens.md b/articles/api/management/v2/tokens.md @@ -230,9 +230,6 @@ Note that deleting the client grant will prevent *new tokens* from being issued __My Client Secret was compromised! What should I do?__</br> You need to change the secret immediately. Go to your [Client's Settings](${manage_url}/#/clients/${account.clientId}/settings) and click the __Rotate__ icon <i class="notification-icon icon-budicon-171"></i>, or use the [Rotate a client secret](/api/management/v2#!/Clients/post_rotate_secret) endpoint. Note that previously issued tokens will continue to be valid until their expiration time. -__I can see some `current_user` scopes in my `id_token`. What is that?__</br> -Within the Users API some endpoints have scopes related to the current user (like `read:current_user` or `update:current_user_identities`). These are [special scopes](/api/v2/changes#the-id_token-and-special-scopes) in the `id_token`, which are granted automatically to the logged in user. - ## Keep reading ::: next-steps
2
diff --git a/lib/utils/getServerlessConfigFile.js b/lib/utils/getServerlessConfigFile.js @@ -65,6 +65,6 @@ const getServerlessConfigFile = _.memoize((configFileName, srvcPath) => getServe } return ''; - }), (configFileName, srvcPath) => srvcPath); + }), (configFileName, srvcPath) => `${configFileName} - ${srvcPath}`); module.exports = { getServerlessConfigFile, getServerlessConfigFilePath };
7
diff --git a/tickets/tickets_web.go b/tickets/tickets_web.go @@ -113,7 +113,7 @@ func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (w return templateData, err } - enabled := settings.Enabled + enabled := settings != nil && settings.Enabled templateData["WidgetTitle"] = "Tickets" templateData["SettingsPath"] = "/tickets/settings"
9
diff --git a/app/templates/_package.json b/app/templates/_package.json "version": "0.0.1", "main": "src/<%= app %>.js", "scripts": { - <% if (usesTypescript) { %> - "preinstall": "typings install", - "postinstall": "tsc", - <% } %> <% if (clientOnly) { %> "start": "gulp", "dev": "gulp",
2
diff --git a/src/tagui_crontab b/src/tagui_crontab # SCRIPT TO MANAGE SERVICE API FOR TA.GUI FRAMEWORK ~ TEBEL.ORG # # change current directory to TA.GUI directory -cd `dirname $0` +cd "`dirname "$0"`" # if nothing running now, call runner script to generate service action script if ! [ -f tagui_service.run ]; then php -q tagui_runner.php | tee -a tagui_service.log; chmod 600 tagui_service.log; fi
9
diff --git a/src/Layers/BasemapLayer.js b/src/Layers/BasemapLayer.js import { TileLayer, Util } from 'leaflet'; import { pointerEvents } from '../Support'; -import { request } from '../Request'; import { setEsriAttribution, _getAttributionData, @@ -104,9 +103,7 @@ export var BasemapLayer = TileLayer.extend({ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', options: { minZoom: 1, - maxZoom: 22, - maxNativeZoom: 22, - downsampled: false, + maxZoom: 19, subdomains: ['server', 'services'], attribution: 'DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community', attributionUrl: 'https://static.arcgis.com/attribution/World_Imagery' @@ -250,21 +247,12 @@ export var BasemapLayer = TileLayer.extend({ map.on('moveend', _updateMapAttribution); - // Esri World Imagery is cached all the way to zoom 22 in select regions - if (this._url === BasemapLayer.TILES.Imagery.urlTemplate) { - map.on('zoomanim', _fetchTilemap, this); - } - TileLayer.prototype.onAdd.call(this, map); }, onRemove: function (map) { map.off('moveend', _updateMapAttribution); - if (this._url === BasemapLayer.TILES.Imagery.urlTemplate) { - map.off('zoomanim', _fetchTilemap, this); - } - TileLayer.prototype.onRemove.call(this, map); }, @@ -284,50 +272,6 @@ export var BasemapLayer = TileLayer.extend({ } }); -function _fetchTilemap (evt) { - var map = evt.target; - if (!map) { return; } - - var oldZoom = map.getZoom(); - var newZoom = evt.zoom; - var newCenter = map.wrapLatLng(evt.center); - - if (newZoom > oldZoom && newZoom > 13 && !this.options.downsampled) { - // convert wrapped lat/long into tile coordinates and use them to generate the tilemap url - var tilePoint = map.project(newCenter, newZoom).divideBy(256).floor(); - - // use new coords to determine the tilemap url - var tileUrl = Util.template(this._url, Util.extend({ - s: this._getSubdomain(tilePoint), - x: tilePoint.x, - y: tilePoint.y, - z: newZoom - }, this.options)); - - // 8x8 grids are cached - var tilemapUrl = tileUrl.replace(/tile/, 'tilemap') + '/8/8'; - - // an array of booleans in the response indicate missing tiles - request(tilemapUrl, {}, function (err, response) { - if (!err) { - for (var i = 0; i < response.data.length; i++) { - if (!response.data[i]) { - // if necessary, resample a lower zoom - this.options.maxNativeZoom = newZoom - 1; - this.options.downsampled = true; - break; - } - // if no tiles are missing, reset the original maxZoom - this.options.maxNativeZoom = 22; - } - } - }, this); - } else if (newZoom < 13) { - // if the user moves to a new region, time for a fresh test - this.options.downsampled = false; - } -} - export function basemapLayer (key, options) { return new BasemapLayer(key, options); }
13
diff --git a/lib/rows.js b/lib/rows.js @@ -56,6 +56,8 @@ function Rows(client) { * variables and whose values are either primitives or objects with a type or * lang key and a value key. Bindings are handled the same way as with * graphs#sparql and graphs#sparqlUpdate. + * @param {marklogic.Timestamp} [timestamp] - a Timestamp object for point-in-time + * operations. */ /** @@ -94,7 +96,8 @@ function queryRowsImpl(builtPlan, streamType, options) { format = 'json', structure = 'object', columnTypes = 'rows', - complexValues = null; + complexValues = null, + timestamp = null; options = options || {}; @@ -134,6 +137,14 @@ function queryRowsImpl(builtPlan, streamType, options) { } } + if (options.timestamp !== null && options.timestamp !== void 0) { + if (!timestamp instanceof mlutil.Timestamp) { + timestamp = options.timestamp; + } else { + throw new Error('invalid timestamp'); + } + } + let endpoint = '/v1/rows'; if (options.bindings) { @@ -187,6 +198,13 @@ function queryRowsImpl(builtPlan, streamType, options) { 'Accept': acceptHeader }; + if (timestamp !== null) { + if (timestamp.value !== null) { + endpoint += sep + 'timestamp='+timestamp.value; + if (sep === '?') { sep = '&'; } + } + } + requestOptions.path = endpoint; const operation = new Operation( @@ -200,6 +218,7 @@ function queryRowsImpl(builtPlan, streamType, options) { } else { operation.requestBody = builtPlan; } + operation.timestamp = (timestamp !== null) ? timestamp : null; const responseSelector = requester.startRequest(operation);
0
diff --git a/accessibility-checker-engine/src/v4/rules/element_tabbable_role_valid.ts b/accessibility-checker-engine/src/v4/rules/element_tabbable_role_valid.ts @@ -32,7 +32,7 @@ export let element_tabbable_role_valid: Rule = { "en-US": { "pass": "The tabbable element has a widget role", "fail_invalid_role": "The tabbable element's role '{0}' is not a widget role", - "group": "A tabbable element must have a widget role" + "group": "A tabbable element must have a valid widget role" } }, rulesets: [{
3
diff --git a/site/stomp.md b/site/stomp.md @@ -292,10 +292,11 @@ durable, non-exclusive, non-autodeleted. ### <a id="d.td"/>Topic Destinations -For simple topic destinations which deliver a copy of each message to -all active subscribers, destinations of the form `/topic/<name>` can -be used. Topic destinations support all the routing patterns of AMQP -topic exchanges. +Perhaps the most common destination type used by STOMP clients is `/topic/<name>`. +They perform topic matching on publishing messages against subscriber patterns +and can route a message to multiple subscribers (each gets its own copy). +Topic destinations support all the routing patterns of [AMQP 0-9-1 +topic exchanges](/tutorials/amqp-concepts.html). Messages sent to a topic destination that has no active subscribers are simply discarded.
7
diff --git a/src/vuex/modules/keystore.js b/src/vuex/modules/keystore.js @@ -52,6 +52,9 @@ export default () => { const wallet = state.externals.getNewWalletFromSeed(seedPhrase) state.externals.storeWallet(wallet, name, password) + // reload accounts as we just added a new one + dispatch("loadAccounts") + await dispatch("signIn", { address: wallet.cosmosAddress, sessionType: "local"
3
diff --git a/protocols/peer/contracts/Peer.sol b/protocols/peer/contracts/Peer.sol @@ -46,12 +46,12 @@ contract Peer is IPeer, Ownable { * @notice Contract Constructor * @param _swapContract address of the swap contract the peer will deploy with * @param _peerContractOwner address that should be the owner of the peer - * @param _tradeWallet the wallet the peer will trade from + * @param _peerTradeWallet the wallet the peer will trade from */ constructor( address _swapContract, address _peerContractOwner, - address _tradeWallet + address _peerTradeWallet ) public { swapContract = ISwap(_swapContract); @@ -61,8 +61,8 @@ contract Peer is IPeer, Ownable { } // if no trade wallet is provided, the owner's wallet is the trade wallet - if (_tradeWallet != address(0)) { - _tradeWallet = _tradeWallet; + if (_peerTradeWallet != address(0)) { + _tradeWallet = _peerTradeWallet; } else { _tradeWallet = owner(); }
10
diff --git a/src/components/avatar/index.js b/src/components/avatar/index.js @@ -122,7 +122,20 @@ const CoverAction = styled(ProfileHeaderAction)` z-index: ${zIndex.tooltip + 1}; `; -class HoverProfile extends Component { +type ProfileProps = { + user: ?Object, + community: ?Object, + showProfile: ?boolean, + dispatch: Function, + source: ?string, + currentUser: ?Object, + top: ?Boolean, + left: ?Boolean, + bottom: ?Boolean, + right: ?Boolean, +}; + +class HoverProfile extends Component<ProfileProps> { initMessage = (dispatch, user) => { dispatch(initNewThreadWithUser(user)); }; @@ -150,7 +163,7 @@ class HoverProfile extends Component { <CoverPhoto url={community.coverPhoto} /> <CoverLink to={`/${community.slug}`}> <StyledAvatar - data={optimize(source, { w: 64, dpr: 2, format: 'png' })} + data={optimize(source, { w: '64', dpr: '2', format: 'png' })} type="image/png" size={64} {...this.props} @@ -191,7 +204,6 @@ class HoverProfile extends Component { > <Card style={{ boxShadow: '0 4px 8px rgba(18, 22, 23, .25)' }}> <CoverPhoto url={user.coverPhoto}> - {console.log('cU', currentUser, 'u', user)} {currentUser && user && currentUser.id !== user.id && ( @@ -211,9 +223,9 @@ class HoverProfile extends Component { </CoverPhoto> <CoverLink to={`/users/${user.username}`}> <StyledAvatar - data={optimize(this.props.source, { - w: 64, - dpr: 2, + data={optimize(source, { + w: '64', + dpr: '2', format: 'png', })} type="image/png" @@ -287,7 +299,7 @@ class HoverProfile extends Component { const AvatarWithFallback = ({ style, ...props }) => ( <StyledAvatarStatus size={props.size || 32} {...props}> <StyledAvatar - data={optimize(props.source, { w: props.size, dpr: 2, format: 'png' })} + data={optimize(props.source, { w: props.size, dpr: '2', format: 'png' })} type="image/png" size={props.size || 32} style={style} @@ -309,9 +321,6 @@ const AvatarWithFallback = ({ style, ...props }) => ( const Avatar = (props: Object): React$Element<any> => { const { src, community, user, size, link, noLink } = props; const source = src || community.profilePhoto || user.profilePhoto; - { - console.log('user', user, 'community', community); - } if (link && !noLink) { return ( <StyledAvatarLink to={link}>
1
diff --git a/source/delegate/test/Delegate-V2.js b/source/delegate/test/Delegate-V2.js @@ -1138,13 +1138,9 @@ contract('DelegateV2 Integration Tests', async accounts => { }) order.signature = emptySignature + // Bob MUST authorize Alice's delegate await swap.authorizeSigner(aliceDelegate.address, { from: bobAddress }) - // bob authroises swap to transfer WETH - await tokenWETH.approve(swapAddress, STARTING_BALANCE, { - from: bobAddress, - }) - // mint bob the money he needs await tokenWETH.mint(bobAddress, signerAmount)
2
diff --git a/articles/rules/current/index.md b/articles/rules/current/index.md @@ -352,9 +352,9 @@ Notice that the code sandbox in which Rules run on, can be recycled at any time. ## Available modules -For security reasons, the Rules code runs in a JavaScript sandbox based on [webtask.io](https://webtask.io) where you can use the full power of the ECMAScript 5 language. +For security reasons, your Rules code executes isolated from the code of other Auth0 tenants in a sandbox based on [Extend](https://goextend.io?utm_source=docs&utm_medium=page&utm_campaign=auth0-com&utm_content=docs-rules). -For a list of currently supported sandbox modules, see [Modules Supported by the Sandbox](https://tehsis.github.io/webtaskio-canirequire) and [Additional Modules Available in Rules](/appliance/modules). +Within the sandbox, you can access the full power of Node.js with a large number of Node.js modules. For a list of currently supported sandbox modules, see [Modules Supported by the Sandbox](https://tehsis.github.io/webtaskio-canirequire) and [Additional Modules Available in Rules](/appliance/modules). ## Keep reading
3
diff --git a/packages/app/src/stores/user-group.tsx b/packages/app/src/stores/user-group.tsx @@ -21,7 +21,7 @@ export const useSWRxUserGroupList = (initialData?: IUserGroupHasId[]): SWRRespon }; export const useSWRxChildUserGroupList = ( - parentIds: string[] | undefined, includeGrandChildren?: boolean, initialData?: IUserGroupHasId[], + parentIds?: string[], includeGrandChildren?: boolean, initialData?: IUserGroupHasId[], ): SWRResponse<IUserGroupHasId[], Error> => { const shouldFetch = parentIds != null && parentIds.join() !== ''; return useSWRImmutable<IUserGroupHasId[], Error>(
12
diff --git a/src/components/Badge/Badge.js b/src/components/Badge/Badge.js @@ -2,7 +2,6 @@ import React, { Component } from "react"; import PropTypes from "prop-types"; import classNames from "classnames"; import { withStyles } from "@material-ui/core/styles"; -import { INVENTORY_STATUS } from "lib/utils"; const styles = (theme) => ({ badge: { @@ -21,28 +20,9 @@ const styles = (theme) => ({ fontWeight: theme.typography.fontWeightBold, position: "relative", whiteSpace: "nowrap", - padding: 0 - }, - status: { - color: theme.palette.primary.contrastText, - left: theme.spacing.unit, - top: theme.spacing.unit - }, - soldOut: { - backgroundColor: theme.palette.secondary.main - }, - backorder: { - backgroundColor: theme.palette.secondary.dark - }, - sale: { - backgroundColor: theme.palette.error.main - }, - bestseller: { - backgroundColor: theme.palette.reaction.bestseller - }, - warning: { - backgroundColor: "transparent", - color: theme.palette.secondary.main + padding: 0, + letterSpacing: "0.5px", + fontSize: "11px" }, alignRight: { right: 0 @@ -52,37 +32,28 @@ const styles = (theme) => ({ @withStyles(styles) export default class Badge extends Component { static propTypes = { - className: PropTypes.string, + badgeClasses: PropTypes.oneOfType([PropTypes.object, PropTypes.string]), classes: PropTypes.object.isRequired, - isLowInventory: PropTypes.bool, label: PropTypes.string.isRequired, - type: PropTypes.string.isRequired + labelClasses: PropTypes.object } render() { const { + badgeClasses: importedBadgeClasses, classes, - className, - type, - label + label, + labelClasses: importedLabelClasses } = this.props; const badgeClasses = classNames( classes.badge, - { - [classes.backorder]: type === INVENTORY_STATUS.BACKORDER, - [classes.bestseller]: type === INVENTORY_STATUS.BESTSELLER, - [classes.sale]: type === INVENTORY_STATUS.SALE, - [classes.status]: type !== INVENTORY_STATUS.LOW_QUANTITY, - [classes.soldOut]: type === INVENTORY_STATUS.SOLD_OUT, - [classes.alignRight]: type === INVENTORY_STATUS.LOW_QUANTITY - }, - className + importedBadgeClasses ); const labelClasses = classNames( classes.labelStyle, - { [classes.warning]: type === INVENTORY_STATUS.LOW_QUANTITY } + importedLabelClasses ); return (
3
diff --git a/io-manager.js b/io-manager.js @@ -692,7 +692,12 @@ ioManager.bindInput = () => { const mouseHoverObject = weaponsManager.getMouseHoverObject(); const mouseHoverPhysicsId = weaponsManager.getMouseHoverPhysicsId(); if (mouseHoverObject) { + const mouseSelectedObject = weaponsManager.getMouseSelectedObject(); + if (mouseHoverObject !== mouseSelectedObject) { weaponsManager.setMouseSelectedObject(mouseHoverObject, mouseHoverPhysicsId); + } else { + weaponsManager.setMouseSelectedObject(null); + } } } } else {
0
diff --git a/src/entities/EntitySelector.js b/src/entities/EntitySelector.js @@ -6,7 +6,8 @@ export default class EntitySelector extends Component { getInitialState() { return { searchString: '', - results: [] + results: [], + selectedIndex: -1 } } @@ -27,12 +28,6 @@ export default class EntitySelector extends Component { if (this.state.searchString !== '') { let createBtns = $$('div').addClass('se-create') - this.props.targetTypes.forEach(targetType => { - createBtns.append( - $$('button').append('Create '+targetType) - .on('click', this._triggerCreate.bind(this, targetType)) - ) - }) el.append( inputEl.append(createBtns), this._renderOptions($$) @@ -45,87 +40,57 @@ export default class EntitySelector extends Component { } _renderOptions($$) { - let el = $$('div').addClass('se-options') + let el = $$('div').addClass('se-options').ref('options') let db = this.context.db - - this.state.results.forEach(entity => { - // let entity = db.get(entityId) - - let option = $$('div').addClass('se-option').html( - entityRenderers[entity.type](entity.id, db) - ).on('click', this._selectOption.bind(this, entity.id)) - - if(this.state.selected === entity.id) { + this.state.results.forEach((item, index) => { + let option + if (item._create) { + option = $$('div').addClass('se-option').append( + `Create ${item._create}` + ) + } else { + option = $$('div').addClass('se-option').html( + entityRenderers[item.type](item.id, db) + ) + } + option.on('click', this._confirmSelected.bind(this, index)) + if (this.state.selectedIndex === index) { option.addClass('se-selected') } - el.append(option) + index += 1 }) - - // // Render options for creation - // this.props.targetTypes.forEach(targetType => { - // el.append( - // $$('div').addClass('se-option').append( - // $$('button').append('Create '+targetType) - // ) - // .on('click', this._triggerCreate.bind(this, targetType)) - // ) - // }) return el } - _selectOption(entityId) { - this.props.onSelected(entityId) - } - - _selectNext() { - const selection = this.state.selected - const results = this.state.results - if(results.length > 0) { - let selectedEntity - if(selection) { - const selectionIndex = results.findIndex(item => { - return item.id === selection - }) - - if(selectionIndex < results.length - 1) { - selectedEntity = results[selectionIndex + 1] + _confirmSelected(index) { + let item = this.state.results[index] + if (item._create) { + this.props.onCreate(item._create) } else { - selectedEntity = results[0] + this.props.onSelected(item.id) } - } else { - selectedEntity = results[0] } - this.extendState({selected: selectedEntity.id}) - } + _selectNext() { + let selectedIndex = this.state.selectedIndex + let results = this.state.results + if (selectedIndex < results.length - 1) { + selectedIndex += 1 } - - _selectPrevious() { - const selection = this.state.selected - const results = this.state.results - if(results.length > 0) { - let selectedEntity - if(selection) { - const selectionIndex = results.findIndex(item => { - return item.id === selection + this.extendState({ + selectedIndex: selectedIndex }) - - if(selectionIndex > 0) { - selectedEntity = results[selectionIndex - 1] - } else { - selectedEntity = results[results.length - 1] - } - } else { - selectedEntity = results[results.length - 1] } - this.extendState({selected: selectedEntity.id}) - } + _selectPrevious() { + let selectedIndex = this.state.selectedIndex + if (selectedIndex >= 0) { + selectedIndex -= 1 } - - _triggerCreate(targetType) { - this.props.onCreate(targetType) + this.extendState({ + selectedIndex: selectedIndex + }) } // TODO: For the current prorotype we use a naive regexp based filtering, @@ -156,7 +121,15 @@ export default class EntitySelector extends Component { results = this._findEntities(searchString) } + // Add creation entries to result + this.props.targetTypes.forEach(targetType => { + results.push({ + _create: targetType + }) + }) + this.setState({ + selectedIndex: -1, searchString: searchString, results }) @@ -169,8 +142,8 @@ export default class EntitySelector extends Component { } else if (e.keyCode === 40) { e.preventDefault() this._selectNext() - } else if (e.keyCode === 13 && this.state.selected) { - this._selectOption(this.state.selected) + } else if (e.keyCode === 13 && this.state.selectedIndex >= 0) { + this._confirmSelected(this.state.selectedIndex) } } }
11
diff --git a/diorama.js b/diorama.js @@ -1893,6 +1893,25 @@ const createAppDiorama = (app, { lightningBackground = true; } }, + triggerLoad() { + const oldParent = app.parent; + Promise.all([ + (async () => { + sideAvatarScene.add(app); + await renderer.compileAsync(sideAvatarScene); + })(), + (async () => { + sideScene.add(app); + await renderer.compileAsync(sideScene); + })(), + ]); + + if (oldParent) { + oldParent.add(app); + } else { + app.parent.remove(app); + } + }, update(timestamp, timeDiff) { if (!this.enabled) { lastDisabledTime = timestamp;
0
diff --git a/includes/Core/Util/Reset.php b/includes/Core/Util/Reset.php @@ -139,11 +139,23 @@ final class Reset { */ private function delete_all_user_metas() { global $wpdb; + $user_query = new \WP_User_Query( array( 'fields' => 'id', - 'meta_key' => $wpdb->prefix . OAuth_Client::OPTION_ACCESS_TOKEN, + 'meta_query' => array( + 'relation' => 'OR', + // Keys are un-prefixed in network mode + array( + 'key' => OAuth_Client::OPTION_ACCESS_TOKEN, 'compare' => 'EXISTS', + ), + // Keys are prefixed in single site and multisite when not in network mode + array( + 'key' => $wpdb->get_blog_prefix() . OAuth_Client::OPTION_ACCESS_TOKEN, + 'compare' => 'EXISTS', + ), + ) ) );
3
diff --git a/oxana/builder/applets/main/main.js b/oxana/builder/applets/main/main.js @@ -988,11 +988,11 @@ let Implementation = function (applet) { }; let isNotDraggableContainer = function (e) { - return containers.indexOf(this.ctor) > -1 && this.draggable == false; + return this.attr.isWa || (containers.indexOf(this.ctor) > -1 && this.draggable == false); }; let isDraggable = function (e) { - return this.draggable == true; + return this.draggable == true && !this.attr.isWa; } //filter to determine if mousemove is an "WA_RESIZE_NS" behavior let debouncedDragNS; @@ -1210,7 +1210,10 @@ let Implementation = function (applet) { "ALLOW_DROP": isContainer }, "dragstart": { - "DRAGSTART_COMPONENT": isDraggable + "DRAGSTART_COMPONENT": { + filter: isDraggable, + onPropagation: false + } }, "dropped": "SELECT_COMPONENT"
1
diff --git a/buildout.cfg b/buildout.cfg @@ -119,7 +119,7 @@ recipe = collective.recipe.cmd on_install = true on_update = true cmds = - curl -o ontology.json https://s3-us-west-1.amazonaws.com/encoded-build/ontology/ontology-2017-01-25.json + curl -o ontology.json https://s3-us-west-1.amazonaws.com/encoded-build/ontology/ontology-2017-02-04.json [aws-ip-ranges] recipe = collective.recipe.cmd
3
diff --git a/lib/shared/addon/components/containers-header/template.hbs b/lib/shared/addon/components/containers-header/template.hbs <ul class="tab-nav"> {{#if (rbac-allows resource="workload" scope="project" permission="list")}} <li> - {{#link-to-external "containers.index" scope.currentProject.id}}{{t "nav.containers.containers"}}{{/link-to-external}} + {{#link-to "containers.index" scope.currentProject.id}}{{t "nav.containers.containers"}}{{/link-to}} </li> {{/if}} {{#if (rbac-allows resource="ingress" scope="project" permission="list")}} <li> - {{#link-to-external "ingresses.index" scope.currentProject.id}}{{t "nav.containers.ingresses"}}{{/link-to-external}} + {{#link-to "ingresses.index" scope.currentProject.id}}{{t "nav.containers.ingresses"}}{{/link-to}} </li> {{/if}} {{#if (rbac-allows resource="service" scope="project" permission="list")}} <li> - {{#link-to-external "authenticated.project.dns.index" scope.currentProject.id}}{{t "nav.containers.dns"}}{{/link-to-external}} + {{#link-to "authenticated.project.dns.index" scope.currentProject.id}}{{t "nav.containers.dns"}}{{/link-to}} </li> {{/if}} - <li>{{#link-to-external "volumes.index" scope.currentProject.id}}{{t "nav.containers.volumes"}}{{/link-to-external}} + <li>{{#link-to "volumes.index" scope.currentProject.id}}{{t "nav.containers.volumes"}}{{/link-to}} </li> </ul>
1
diff --git a/game.js b/game.js @@ -486,7 +486,7 @@ const _use = () => { } } }; -let useAnimation = null; +/* let useAnimation = null; const _useHold = () => { const now = performance.now(); useAnimation = { @@ -512,7 +512,7 @@ const _useHold = () => { }; const _useRelease = () => { useAnimation = null; -}; +}; */ const _delete = () => { const grabbedObject = _getGrabbedObject(0); if (grabbedObject) { @@ -2517,12 +2517,12 @@ const weaponsManager = { menuUse() { _use(); }, - menuUseHold() { + /* menuUseHold() { _useHold(); }, menuUseRelease() { _useRelease(); - }, + }, */ menuDelete() { _delete(); },
2
diff --git a/lib/waterline/utils/query/forge-stage-three-query.js b/lib/waterline/utils/query/forge-stage-three-query.js @@ -604,12 +604,20 @@ module.exports = function forgeStageThreeQuery(options) { join.criteria = join.criteria || {}; join.criteria = joinCollection._transformer.serializeCriteria(join.criteria); - // If the join's `select` is false, leave it that way and eliminate the join criteria. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // TODO -- is this necessary? Leaving in so that many-to-many tests pass. + // Also note that this might be necessary as part of: + // https://github.com/balderdashy/waterline/blob/7f58b07be54542f4e127c2dc29cf80ce2110f32a/lib/waterline/utils/query/forge-stage-two-query.js#L763-L766 + // ^^(that needs to be double-checked though-- it could be implemented elsewhere) + // Either way, it'd be good to add some clarification here. + // ``` + // If the join's `select` is false, leave it that way and eliminate the join criteria. if (join.select === false) { delete join.criteria.select; return; } + // ``` + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Ensure the join select doesn't contain duplicates join.criteria.select = _.uniq(join.criteria.select);
0
diff --git a/src/templates/singleBusinessPage.js b/src/templates/singleBusinessPage.js @@ -48,6 +48,26 @@ const SingleBusinessPage = ({ data }) => { }); const { data: apiResponse } = useBusinessDetails(id); + const { + city, + isPhysicalLocation, + phone, + serviceArea, + state, + story, + streetAddress, + takesBitcoin, + takesCash, + takesCheck, + takesCredit, + zip, + } = apiResponse || {}; + + const paymentTypes = []; + if (takesCash) paymentTypes.push('cash'); + if (takesCheck) paymentTypes.push('check'); + if (takesCredit) paymentTypes.push('credit'); + if (takesBitcoin) paymentTypes.push('bitcoin'); // this page returns nothing if this is not an approved business if (!approved) return null; @@ -111,6 +131,7 @@ const SingleBusinessPage = ({ data }) => { padding={theme.spacing.xs} backgroundColor={theme.colors.yellow[100]} justifyContent="space-between" + alignItems="center" > <Text> This business needs our help. If you have the means, please @@ -132,9 +153,9 @@ const SingleBusinessPage = ({ data }) => { <Grid isInline gridTemplateColumns="3fr 1fr"> <div> - {website && ( <LabeledSection label={'Where to Find us'}> <Stack> + {isPhysicalLocation && ( <Stack isInline spacing={theme.spacing.md} @@ -143,33 +164,43 @@ const SingleBusinessPage = ({ data }) => { > <Icon name="at-sign" color="gray.600" /> <Stack spacing={0}> - <Text>12345 S Main St</Text> - <Text>Portland, OR 97219</Text> + <Text>{streetAddress}</Text> + <Text as="address"> + {city} {city && state ? ', ' : ''} {state} {zip} + </Text> </Stack> </Stack> + )} + {website && ( <Stack isInline spacing={theme.spacing.md} alignItems="center" > <Icon name="link" color="gray.600" /> - <Link to={website} fontSize={theme.fontSizes.helper}> + <Link + to={website} + fontSize={theme.fontSizes.helper} + textDecoration="underline" + > {website} </Link> </Stack> + )} + {phone && ( <Stack isInline spacing={theme.spacing.md} alignItems="center" > <Icon name="phone" color="gray.600" /> - <Text>(280) 555-1212</Text> + <Link href={`tel:${phone}`}>{phone}</Link> </Stack> + )} </Stack> </LabeledSection> - )} {businessDescription && ( <LabeledSection label={'What we do'}> @@ -177,18 +208,18 @@ const SingleBusinessPage = ({ data }) => { </LabeledSection> )} + {story && ( <LabeledSection label={'Who we are'}> - <Text> - Uncertain what's supposed to go here but here's some sample text - for y'all - </Text> + <Text>{story}</Text> </LabeledSection> + )} </div> <Box padding={theme.spacing.base} border={`2px solid ${theme.colors['rbb-black-000']}`} borderRadius={'8px'} height="fit-content" + hidden={!serviceArea && paymentTypes.length === 0} > <Heading as="h3" @@ -202,6 +233,8 @@ const SingleBusinessPage = ({ data }) => { Details </Heading> + {serviceArea && ( + <> <Heading as="h4" textTransform="uppercase" @@ -211,8 +244,12 @@ const SingleBusinessPage = ({ data }) => { > Area of Service </Heading> - <Text paddingLeft={theme.spacing.xs}>Lorem ipsum</Text> + <Text paddingLeft={theme.spacing.xs}>{serviceArea}</Text> + </> + )} + {paymentTypes.length && ( + <> <Heading as="h4" textTransform="uppercase" @@ -223,7 +260,14 @@ const SingleBusinessPage = ({ data }) => { > Payment Types </Heading> - <Text paddingLeft={theme.spacing.xs}>Lorem, Ipsum, Dolor sit</Text> + <Text paddingLeft={theme.spacing.xs} textTransform="capitalize"> + {paymentTypes.map( + (type, idx) => + `${type} ${paymentTypes.length > idx + 1 ? ' ,' : ''}` + )} + </Text> + </> + )} </Box> </Grid>
4
diff --git a/website/test-links.sh b/website/test-links.sh @@ -11,6 +11,9 @@ npx serve build/near-docs & # wait til the server is responding npx wait-on http://localhost:5000/ +# ignore errors since broken-link-checker exits with nonzero error if any links break +set +e + # crawl site and check all links npx broken-link-checker -gro --exclude "localhost:3030" --exclude "https://github.com/nearprotocol/docs/tree/master/docs" --exclude "https://youtu.be" --exclude "http://near.ai/wbs" --exclude "https://www.youtube.com" --host-requests 2 "http://localhost:5000"
8
diff --git a/styles/tokens/typography.json b/styles/tokens/typography.json }, "one-wide": { "comment": "The size of TypeDisplayOne when the viewport is wider than $sprk-font-size-display-one-breakpoint.", - "value": "3.375rem", + "value": "2.75rem", "file": "typography", "attributes": { "category": "size",
3
diff --git a/src/core/lib/FileSignatures.mjs b/src/core/lib/FileSignatures.mjs @@ -57,7 +57,7 @@ export const FILE_SIGNATURES = { 6: 0x1a, 7: 0x0a }, - extractor: null + extractor: extractPNG }, { name: "WEBP Image", @@ -150,7 +150,7 @@ export const FILE_SIGNATURES = { 16: 0x0, 17: 0x0 }, - extractor: null + extractor: extractBMP }, { name: "JPEG Extended Range image", @@ -1233,3 +1233,55 @@ export function extractZIP(bytes, offset) { return stream.carve(); } + + +/** + * PNG extractor. + * + * @param {Uint8Array} bytes + * @param {number} offset + * @returns {Uint8Array} + */ +export function extractPNG(bytes, offset) { + const stream = new Stream(bytes.slice(offset)); + + // Move past signature to first chunk + stream.moveForwardsBy(8); + + let chunkSize = 0, + chunkType = ""; + + while (chunkType !== "IEND") { + chunkSize = stream.readInt(4, "be"); + chunkType = stream.readString(4); + + // Chunk data size + CRC checksum + stream.moveForwardsBy(chunkSize + 4); + } + + + return stream.carve(); +} + + +/** + * BMP extractor. + * + * @param {Uint8Array} bytes + * @param {number} offset + * @returns {Uint8Array} + */ +export function extractBMP(bytes, offset) { + const stream = new Stream(bytes.slice(offset)); + + // Move past header + stream.moveForwardsBy(2); + + // Read full file size + const bmpSize = stream.readInt(4, "le"); + + // Move to end of file (file size minus header and size field) + stream.moveForwardsBy(bmpSize - 6); + + return stream.carve(); +}
0
diff --git a/CHANGELOG.md b/CHANGELOG.md +### 12.1.5 + +- fix react merged types [1606](https://github.com/i18next/react-i18next/pull/1606) originally introduced with #1531 to address #1506 + ### 12.1.4 - fix crash in gatsby [1594](https://github.com/i18next/react-i18next/issues/1594)
6
diff --git a/ui/app/reducers.js b/ui/app/reducers.js @@ -44,6 +44,7 @@ function rootReducer (state, action) { window.logState = function () { var stateString = JSON.stringify(window.METAMASK_CACHED_LOG_STATE, removeSeedWords, 2) console.log(stateString) + return stateString } function removeSeedWords (key, value) {
11
diff --git a/source/ibl_sampler.js b/source/ibl_sampler.js @@ -25,7 +25,7 @@ class iblSampler this.lambertianSampleCount = 2048; this.sheenSamplCount = 64; this.lodBias = 0.0; - this.lowestMipLevel = 1; + this.lowestMipLevel = 4; this.lutResolution = 1024; this.mipmapCount = undefined;
12
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -2170,7 +2170,7 @@ class Avatar { ); return localEuler.y; } - update(now, timeDiff) { + update(now, timeDiff, simulationFactor = 1) { /* const wasDecapitated = this.decapitated; if (this.springBoneManager && wasDecapitated) { this.undecapitate(); @@ -2741,7 +2741,7 @@ class Avatar { this.modelBones.Hips.updateMatrixWorld(); if (this.springBoneManager) { - this.springBoneManager.lateUpdate(timeDiff); + this.springBoneManager.lateUpdate(timeDiff * simulationFactor); } /* if (this.springBoneManager && wasDecapitated) { this.decapitate();
0
diff --git a/articles/connections/database/password-options.md b/articles/connections/database/password-options.md @@ -49,9 +49,9 @@ For example, if the user's name is "John", including "John" in the user's passwo ## API Access -Password options are associated with a Database connection so these values can be accessed with the [Connections endpoints of the Management API](/api/management/v2#!/Connections). The password related fields are stored in `options` of the connection. These fields are not required because these fields are not used for non-database connections and if they are not enabled for a connection they may not appear. +Password options are associated with a Database connection so these values can be accessed with the [Connections endpoints of the Management API](/api/management/v2#!/Connections). The password related fields are stored in the `options` object. These fields are not required because these fields are not used for non-database connections and if they are not enabled for a connection they may not appear. -For example here is what a MySQL database connection may look like after setting a password policy: +For example here is what a MySQL database connection may look like after setting a password policy. In this example, as we can see from the contents of the `options` object, all three password options are enabled, password history will store the 5 latest passwords and each password will be crossed checked against two dictionaries: `entry1` and `entry2`. ```json {
0
diff --git a/articles/exception-handling-in-javascript/index.md b/articles/exception-handling-in-javascript/index.md @@ -64,7 +64,7 @@ We now understand what exceptions are. It's time to learn how to handle them to #### Throw Statements The `throw statement` is to raise your built-in exceptions. -Below is an example of a ```throw``` statement. The complete source code can be found on [repil.it link](https://repl.it/@JudyNduati/throw-statement-example). +Below is an example of a ```throw``` statement. The complete source code can be found on [repl.it link](https://repl.it/@JudyNduati/throw-statement-example). ```js function myFunction() { const x = 50; @@ -84,7 +84,7 @@ Below is an example of a ```throw``` statement. The complete source code can be #### Try Catch Statements The `try` clause has the main code that may generate exceptions. If an exception is raised, the `catch` clause gets executed. -Here is an example of a `try-catch` statement. The complete source code can be found on [repil.it link](https://repl.it/@JudyNduati/try-catch-statement-example). +Here is an example of a `try-catch` statement. The complete source code can be found on [repl.it link](https://repl.it/@JudyNduati/try-catch-statement-example). ```js function myFunction() { const j = 70; @@ -101,7 +101,7 @@ In the example above, we have made a typo error while calling the in-built `aler #### Try Catch Finally Statements The `finally` statement is the last block to be executed. It executes after `try` and `catch` clauses. -Here is an example of `try-catch-finally` statements. The complete source code can be found on [repil.it link](https://repl.it/@JudyNduati/try-catch-finally-example). +Here is an example of `try-catch-finally` statements. The complete source code can be found on [repl.it link](https://repl.it/@JudyNduati/try-catch-finally-example). ```js function myFunction() {
10
diff --git a/server/game/cards/characters/02/ladyinwaiting.js b/server/game/cards/characters/02/ladyinwaiting.js @@ -8,7 +8,8 @@ class LadyInWaiting extends DrawCard { handler: () => { this.game.promptForSelect(this.controller, { activePromptTitle: 'Select a Lady character', - cardCondition: card => card.location === 'play area' && card.getType() === 'character' && card.hasTrait('Lady'), + cardCondition: card => card.location === 'play area' && card.getType() === 'character' && card.hasTrait('Lady') && + card.controller === this.controller && card.owner === this.controller, onSelect: (player, card) => this.marshalAsDupe(card) }); }
11
diff --git a/articles/custom-domains/index.md b/articles/custom-domains/index.md @@ -114,7 +114,7 @@ Yes, you will be able to use either the default `${account.namespace}` or your c 2. **What about support for other features?** -We are planning to support several additional features in the future, including SAML and WS-Fed clients and enterprise and Passwordless connections. +We are planning to support several additional features in the future, including WS-Fed clients and enterprise and Passwordless connections. ## Troubleshooting
2
diff --git a/install.php b/install.php @@ -463,11 +463,7 @@ function install($adminPassword, $timezone) file_put_contents(PATH_DATABASES.'categories.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX); // File tags.php - $data = array( - 'bludit'=>array('name'=>'Bludit', 'description'=>'', 'template'=>'', 'list'=>array('follow-bludit')), - 'cms'=>array('name'=>'CMS', 'description'=>'', 'template'=>'', 'list'=>array('follow-bludit')), - 'flat-files'=>array('name'=>'Flat files', 'description'=>'', 'template'=>'', 'list'=>array('follow-bludit')) - ); + $data = array(); file_put_contents(PATH_DATABASES.'tags.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX); // File plugins/about/db.php
2
diff --git a/CHANGELOG.md b/CHANGELOG.md ## Current Master -- Replace account scren with an account drop-down menu. -- Replace confusing buttons with an new account-specific drop-down menu. +- Replace account screen with an account drop-down menu. +- Replace confusing buttons with a new account-specific drop-down menu. ## 3.9.5 2017-8-04 ## 3.7.8 2017-6-12 -- Add a `ethereum:` prefix to the QR code address +- Add an `ethereum:` prefix to the QR code address - The default network on installation is now MainNet - Fix currency API URL from cryptonator. - Update gasLimit params with every new block seen. - Add ability to import accounts in JSON file format (used by Mist, Geth, MyEtherWallet, and more!) - Fix unapproved messages not being included in extension badge. -- Fix rendering bug where the Confirm transaction view would lets you approve transactions when the account has insufficient balance. +- Fix rendering bug where the Confirm transaction view would let you approve transactions when the account has insufficient balance. ## 3.1.2 2017-1-24 ## 3.0.0 2017-1-16 - Fix seed word account generation (https://medium.com/metamask/metamask-3-migration-guide-914b79533cdd#.t4i1qmmsz). -- Fix Bug where you see a empty transaction flash by on the confirm transaction view. -- Create visible difference in transaction history between a approved but not yet included in a block transaction and a transaction who has been confirmed. +- Fix Bug where you see an empty transaction flash by on the confirm transaction view. +- Create visible difference in transaction history between an approved but not yet included in a block transaction and a transaction who has been confirmed. - Fix memory leak in RPC Cache - Override RPC commands eth_syncing and web3_clientVersion - Remove certain non-essential permissions from certain builds. - Fix bug where gas estimate would sometimes be very high. - Increased our gas estimate from 100k gas to 20% of estimate. -- Fix github link on info page to point at current repository. +- Fix GitHub link on info page to point at current repository. ## 2.13.6 2016-10-26 @@ -400,7 +400,7 @@ popup notification opens up. - Block negative values from transactions. - Fixed a memory leak. - MetaMask logo now renders as super lightweight SVG, improving compatibility and performance. -- Now showing loading indication during vault unlocking, to clarify behavior for users who are experience slow unlocks. +- Now showing loading indication during vault unlocking, to clarify behavior for users who are experiencing slow unlocks. - Now only initially creates one wallet when restoring a vault, to reduce some users' confusion. ## 2.10.2 2016-09-02
7
diff --git a/docs_helpers/styleguide_extra.css b/docs_helpers/styleguide_extra.css @@ -23,9 +23,14 @@ body { display: inline-block; display: inline-grid; margin-bottom: 1rem; + max-width: 100%; } -.screenshot_wrapper .notice::after { +.screenshot_wrapper > img { + max-width: 100%; +} + +.screenshot_wrapper > .notice::after { content: '(screenshot.. not interactive!)'; color: white; background: rgba(0, 0, 0, 0.4); @@ -43,6 +48,6 @@ body { transition: opacity 0.08s; } -.screenshot_wrapper:hover .notice::after { +.screenshot_wrapper:hover > .notice::after { opacity: 1; }
7
diff --git a/lod.js b/lod.js @@ -289,8 +289,16 @@ const containsPoint = (a, p) => { p.y >= a.min.y && p.y < a.min.y + a.lod && p.z >= a.min.z && p.z < a.min.z + a.lod; }; -const containsNode = (a, node) => { +/* const containsNode = (a, node) => { return containsPoint(a, node.min); +}; */ +const findLeafNodeForPosition = (nodes, p) => { + for (const node of nodes) { + if (containsPoint(node, p)) { + return node; + } + } + return null; }; const isNop = taskSpec => { // console.log('is nop', taskSpec);
0
diff --git a/ModFlaggerStats.user.js b/ModFlaggerStats.user.js @@ -143,7 +143,7 @@ unsafeWindow.purgeUserFlagStats = function() { getUserFlagStats(uid).then(function(v) { const tier = calculateFlagTier(v[1], v[3]); - const badge = `<a href="/users/flag-summary/${uid}" class="flag-badge ${tier.name}" title="${v[1]} flags, ${v[2]} declined (accuracy ${(100 - v[3]).toFixed(2)}%)" target="_blank"></a>`; + const badge = `<a href="/users/flag-summary/${uid}" class="flag-badge ${tier.name}" title="${tier.name} flagger: ${v[1]} flags, ${v[2]} declined (accuracy ${(100 - v[3]).toFixed(2)}%)" target="_blank"><svg aria-hidden="true" class="svg-icon iconFlag" width="17" height="17" viewBox="0 0 17 17"><path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3z"></path></svg></a>`; // Apply to all instances of same user on page sameUserLinks.not('js-userflagstats-loaded').addClass('js-userflagstats-loaded').after(badge); @@ -176,7 +176,7 @@ unsafeWindow.purgeUserFlagStats = function() { getUserFlagStats(currUid).then(function(v) { const tier = calculateFlagTier(v[1], v[3]); - const badge = `<a href="/users/flag-summary/${currUid}" class="flag-badge large ${tier.name}" title="${tier.name} flagger: ${v[1]} flags, ${v[2]} declined (accuracy ${(100 - v[3]).toFixed(2)}%)" target="_blank"></a>`; + const badge = `<a href="/users/flag-summary/${currUid}" class="flag-badge large ${tier.name}" title="${tier.name} flagger\n${v[1]} flags, ${v[2]} declined (accuracy ${(100 - v[3]).toFixed(2)}%)" target="_blank"><svg aria-hidden="true" class="svg-icon iconFlag" width="17" height="17" viewBox="0 0 17 17"><path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3z"></path></svg></a>`; $('.profile-user--name, .user-card-name').append(badge); }); } @@ -243,63 +243,46 @@ unsafeWindow.purgeUserFlagStats = function() { margin-left: 10px; } .flag-badge { - font-size: 0; - display: inline-block; - width: 10px; - height: 10px; - margin-left: 3px; - background: var(--white); - border-radius: 100%; + margin-left: 4px; + color: var(--black) !important; } .flag-badge + .flag-badge { display: none; } .flag-badge.elite { - width: 12px; - height: 12px; - background: var(--green-500) !important; + color: var(--green-500) !important; } .flag-badge.gold { - background: var(--gold) !important; + color: var(--gold) !important; } .flag-badge.silver { - background: var(--silver) !important; + color: var(--silver) !important; } .flag-badge.bronze { - background: var(--bronze) !important; + color: var(--bronze) !important; } .flag-badge.wtf { - background: var(--red-500) !important; + color: var(--red-500) !important; } .flag-badge.horrible { - background: var(--red-400) !important; + color: var(--red-400) !important; } .flag-badge.hmmm { - background: var(--red-300) !important; + color: var(--red-300) !important; } -.flag-badge.default { - background: none; - border: 1px solid var(--black-300) !important; +.flag-badge.default path { + fill: none; + stroke: var(--black); + stroke-width: 0.8px; + stroke-dasharray: 1,1; + stroke-linejoin: round; } .flag-badge.large { - width: 20px; - height: 20px; -} -.flag-badge.default:after { - content: ''; - position: relative; - top: 4px; - left: 0px; - display: block; - width: 8px; - height: 0px; - border-top: 1px solid var(--black-300) !important; - transform: rotateZ(-45deg); -} -.flag-badge.large:after { - top: 8px; - left: -1px; - width: 20px; + display: inherit; + scale: 150%; +} +.flag-badge.default.large path { + stroke-dasharray: 2,1; } </style> `;
14
diff --git a/src/imba/dom/manager.imba b/src/imba/dom/manager.imba @@ -64,9 +64,9 @@ class Imba.TagManagerClass var count = 0 var root = document:body for item, i in @mounted - unless document:documentElement.contains(item.dom) + unless document:documentElement.contains(item.@dom) item.FLAGS = item.FLAGS & ~Imba.TAG_MOUNTED - if item:unmount + if item:unmount and item.@dom item.unmount elif item.@scheduler item.unschedule
11
diff --git a/modules/default/calendar/calendar.js b/modules/default/calendar/calendar.js @@ -43,7 +43,7 @@ Module.register("calendar", { tableClass: "small", calendars: [ { - symbol: "calendar", + symbol: "calendar-alt", url: "https://www.calendarlabs.com/templates/ical/US-Holidays.ics" } ],
4
diff --git a/bin/exception.js b/bin/exception.js @@ -29,19 +29,7 @@ module.exports = EnforcerException; */ function EnforcerException (header) { if (!(this instanceof EnforcerException)) return new EnforcerException(header); - const callbacks = {}; - - this.emit = function (type, payload) { - if (callbacks[type]) callbacks[type].forEach(callback => callback(payload)); - }; - - this.on = function (type, handler) { - if (!callbacks[type]) callbacks[type] = []; - callbacks[type].push(handler); - }; - this.header = header; - this.cache = undefined; this.children = { at: {}, nest: [], @@ -53,22 +41,11 @@ EnforcerException.prototype.at = function (key) { const at = this.children.at; if (!at[key]) { at[key] = new EnforcerException(''); - at[key].on('cache-clear', () => this.clearCache()); - this.clearCache(); } return at[key]; }; EnforcerException.prototype.clearCache = function () { - const children = this.children; - const at = children.at; - const emit = arguments.length ? arguments[0] : true; - - Object.keys(at).forEach(key => at[key].clearCache(false)); - children.nest.forEach(child => child.clearCache(false)); - this.cache = undefined; - - if (emit) this.emit('cache-clear'); return this; }; @@ -82,7 +59,6 @@ EnforcerException.prototype[inspect] = function () { EnforcerException.prototype.nest = function (header) { const exception = new EnforcerException(header); - exception.on('cache-clear', () => this.clearCache()); this.children.nest.push(exception); return exception; }; @@ -96,7 +72,6 @@ EnforcerException.prototype.merge = function (exception) { Object.keys(thatChildren.at).forEach(key => { if (!at[key]) { at[key] = thatChildren.at[key]; - at[key].on('cache-clear', () => this.clearCache()); } else { at[key].merge(thatChildren.at[key]); } @@ -110,14 +85,11 @@ EnforcerException.prototype.merge = function (exception) { addedMessage = true; }); - if (addedMessage) this.clearCache(); - return this; }; EnforcerException.prototype.message = function (message) { this.children.message.push(message); - this.clearCache(); return this; }; @@ -125,10 +97,8 @@ EnforcerException.prototype.push = function (value) { const type = typeof value; if (type === 'string' && value.length) { this.children.message.push(value); - this.clearCache(); } else if (type === 'object' && value instanceof EnforcerException) { this.children.nest.push(value); - this.clearCache(); } else { throw Error('Can only push string or EnforcerException instance'); } @@ -142,29 +112,21 @@ EnforcerException.prototype.toString = function () { Object.defineProperties(EnforcerException.prototype, { count: { get: function () { - if (!this.cache) this.cache = {}; - if (!this.cache.count) { const children = this.children; - this.cache.count = children.message.length + + return children.message.length + children.nest.reduce((count, exception) => count + exception.count, 0) + Object.keys(children.at).reduce((count, key) => count + children.at[key].count, 0); } - return this.cache.count; - } }, hasException: { get: function () { if (!this.cache) this.cache = {}; - const cache = this.cache; - if (!cache.hasOwnProperty('hasException')) { const children = this.children; - // if this has messages then an exception exists - cache.hasException = false; if (children.message.length) { - cache.hasException = true; + return true } else { // if nested objects have exception then exception exists @@ -172,26 +134,21 @@ Object.defineProperties(EnforcerException.prototype, { const length = nest.length; for (let i = 0; i < length; i++) { if (nest[i].hasException) { - cache.hasException = true; - break; + return true } } - // if nested ats have exception then exception exists - if (!cache.hasException) { const keys = Object.keys(children.at); - const length = keys.length; - for (let i = 0; i < length; i++) { + const length2 = keys.length; + for (let i = 0; i < length2; i++) { if (children.at[keys[i]].hasException) { - cache.hasException = true; - break; - } + // cache.hasException = true; + // break; + return true } } } - } - - return cache.hasException; + return false } } });
2
diff --git a/sirepo/auth/__init__.py b/sirepo/auth/__init__.py @@ -405,21 +405,28 @@ def reset_state(): def set_user_outside_of_http_request(uid): """A user set explicitly outside of flask request cycle - This will guess the auth method the user used to authenticate. - If the method cannot be guessed it will default to guest if configured - otherwise raise. + This will try to guess the auth method the user used to authenticate. """ def _auth_module(): for m in cfg.methods: a = _METHOD_MODULES[m] if _method_user_model(a, uid): return a - assert METHOD_GUEST in cfg.methods, \ - f'no module found for uid={uid} and "{METHOD_GUEST}" not in cfg.methods={cfg.methods}' - return _METHOD_MODULES[METHOD_GUEST] + # Only try methods without UserModel after methods with have been + # exhausted. This ensures that if there is a method with a UserModel + # we use it so calls like `user_name` work. + for m in cfg.methods: + a = _METHOD_MODULES[m] + if not hasattr(a, 'UserModel'): + return a + raise AssertionError( + f'no module found for uid={uid} in cfg.methods={cfg.methods}', + ) assert not util.in_flask_request(), \ 'Only call from outside a flask request context' + assert auth_db.UserRegistration.search_by(uid=uid), \ + f'no registered user with uid={uid}' with cookie.set_cookie_outside_of_flask_request(): _login_user( _auth_module(),
9
diff --git a/src/logger.js b/src/logger.js @@ -23,23 +23,34 @@ export const setLogLevel = function(level) { logger.error = () => {}; logger.fatal = () => {}; if (level <= LEVELS.fatal) { - logger.fatal = console.log.bind(console, '\x1b[35m', format('FATAL')); + logger.fatal = console.error + ? console.error.bind(console, format('FATAL'), 'color: orange') + : console.log.bind(console, '\x1b[35m', format('FATAL')); } if (level <= LEVELS.error) { - logger.error = console.log.bind(console, '\x1b[31m', format('ERROR')); + logger.error = console.error + ? console.error.bind(console, format('ERROR'), 'color: orange') + : console.log.bind(console, '\x1b[31m', format('ERROR')); } if (level <= LEVELS.warn) { - logger.warn = console.log.bind(console, `\x1b[33m`, format('WARN')); + logger.warn = console.warn + ? console.warn.bind(console, format('WARN'), 'color: orange') + : console.log.bind(console, `\x1b[33m`, format('WARN')); } if (level <= LEVELS.info) { - logger.info = console.log.bind(console, '\x1b[34m', format('INFO')); + logger.info = console.info + ? // ? console.info.bind(console, '\x1b[34m', format('INFO'), 'color: blue') + console.info.bind(console, format('INFO'), 'color: lightblue') + : console.log.bind(console, '\x1b[34m', format('INFO')); } if (level <= LEVELS.debug) { - logger.debug = console.log.bind(console, '\x1b[32m', format('DEBUG')); + logger.debug = console.debug + ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen') + : console.log.bind(console, '\x1b[32m', format('DEBUG')); } }; const format = level => { - const time = moment().format('HH:mm:ss.SSS'); - return `${time} : ${level} : `; + const time = moment().format('ss.SSS'); + return `%c${time} : ${level} : `; };
1
diff --git a/src/v2-routes/v2-parts.js b/src/v2-routes/v2-parts.js const express = require("express") const v2 = express.Router() +const asyncHandle = require("express-async-handler") const cores = require("../builders/core-query") const caps = require("../builders/capsule-query") // Returns all capsule information -v2.get("/caps", (req, res, next) => { +v2.get("/caps", asyncHandle(async (req, res) => { const query = caps.capsuleQuery(req) - global.db.collection("capsule").find(query,{"_id": 0}).sort({"capsule_serial": 1}) - .toArray((err, doc) => { - if (err) { - return next(err) - } - res.json(doc) - }) -}) + const data = await global.db + .collection("capsule") + .find(query,{"_id": 0}) + .sort({"capsule_serial": 1}) + .toArray() + res.json(data) +})) // Returns all core information -v2.get("/cores", (req, res, next) => { +v2.get("/cores", asyncHandle(async (req, res) => { const query = cores.coreQuery(req) - global.db.collection("core").find(query,{"_id": 0}).sort({"core_serial": 1}) - .toArray((err, doc) => { - if (err) { - return next(err) - } - res.json(doc) - }) -}) + const data = await global.db + .collection("core") + .find(query,{"_id": 0}) + .sort({"core_serial": 1}) + .toArray() + res.json(data) +})) module.exports = v2
3
diff --git a/config/navigations/services_navigation.rb b/config/navigations/services_navigation.rb @@ -136,16 +136,15 @@ SimpleNavigation::Configuration.run do |navigation| # storage_nav.dom_attributes = {class: 'content-list'} end - primary.item :resource_management, 'Capacity & Masterdata', nil, + primary.item :resource_management, 'Capacity, Masterdata & Monitoring', nil, html: {class: "fancy-nav-header", 'data-icon': "monitoring-icon" }, if: -> {services_ng.available?(:resource_management,:resources) or services.available?(:cost_control)} do |monitoring_nav| # Disable cost_control and can be deleted after switch to new masterdata api #monitoring_nav.item :cost_control, 'Cost Control', -> {plugin('cost_control').cost_object_path}, if: -> { services.available?(:cost_control) }, highlights_on: Proc.new { params[:controller][/cost_control\/.*/] } - monitoring_nav.item :masterdata_cockpit, 'Masterdata', -> {plugin('masterdata_cockpit').project_masterdata_path}, if: -> { services_ng.available?(:masterdata_cockpit) }, highlights_on: Proc.new { params[:controller][/masterdata_cockpit\/.*/] } - monitoring_nav.item :resource_management, 'Resource Management ', -> {plugin('resource_management').resources_path}, if: -> { services_ng.available?(:resource_management,:resources) }, highlights_on: Proc.new { params[:controller][/resource_management\/.*/] } monitoring_nav.item :audit, 'Audit', -> { plugin('audit').root_path }, if: -> { plugin_available?(:audit) && current_user && current_user.is_allowed?('audit:application_get') }, highlights_on: -> { params[:controller][%r{flavors/?.*}] } monitoring_nav.item :audit, 'Maia', -> { plugin('maia').index_path }, if: -> { plugin_available?(:maia) && current_user && current_user.is_allowed?('maia:show') }, highlights_on: Proc.new { params[:controller][/maia\/.*/] } - + monitoring_nav.item :masterdata_cockpit, 'Masterdata', -> {plugin('masterdata_cockpit').project_masterdata_path}, if: -> { services_ng.available?(:masterdata_cockpit) }, highlights_on: Proc.new { params[:controller][/masterdata_cockpit\/.*/] } + monitoring_nav.item :resource_management, 'Resource Management ', -> {plugin('resource_management').resources_path}, if: -> { services_ng.available?(:resource_management,:resources) }, highlights_on: Proc.new { params[:controller][/resource_management\/.*/] } end # primary.item :account, 'Account', nil, html: {class: "fancy-nav-header", 'data-icon': "fa fa-user fa-fw" } do |account_nav|
10
diff --git a/src/components/MapTable/constants.js b/src/components/MapTable/constants.js @@ -19,7 +19,7 @@ export const Content: MainContentType = [ label: <Fragment>Total&nbsp;cases</Fragment>, format: 'numeric', getter: item => numeral(item.rawData.value).format("0,0"), - keyGetter: ({ key }) => key + keyGetter: ({ key }) => key.replace('#', '') }, { label: 'Rate', @@ -50,7 +50,7 @@ export const Content: MainContentType = [ label: <Fragment>Total&nbsp;cases</Fragment>, format: 'numeric', getter: item => numeral(item.rawData.value).format("0,0"), - keyGetter: ({ key }) => key + keyGetter: ({ key }) => key.replace('#', '') }, { label: 'Rate', @@ -81,7 +81,7 @@ export const Content: MainContentType = [ label: <Fragment>Total&nbsp;cases</Fragment>, format: 'numeric', getter: item => numeral(item.rawData.value).format("0,0"), - keyGetter: ({ key }) => key + keyGetter: ({ key }) => key.replace('#', '') }, { label: 'Rate', @@ -113,11 +113,12 @@ export const Content: MainContentType = [ label: <Fragment>Total&nbsp;cases</Fragment>, format: 'numeric', getter: item => numeral(item.rawData.value).format("0,0"), - keyGetter: ({ key }) => key + keyGetter: ({ key }) => key.replace('#', '') }, { label: 'Rate', - format: 'numeric', getter: (item) => numeral(item.rateData.value).format("0,0.0") + format: 'numeric', + getter: (item) => numeral(item.rateData.value).format("0,0.0") } ], sortFunc: '',
14