code
stringlengths
122
4.99k
label
int64
0
14
diff --git a/src/apexcharts.js b/src/apexcharts.js @@ -250,7 +250,7 @@ export default class ApexCharts { me.annotations.drawAxesAnnotations() } - if (graphData.elGraph instanceof Array) { + if (Array.isArray(graphData.elGraph)) { for (let g = 0; g < graphData.elGraph.length; g++) { w.globals.dom.elGraphical.add(graphData.elGraph[g]) }
14
diff --git a/src/test/service/acl.test.js b/src/test/service/acl.test.js @@ -25,7 +25,8 @@ describe('AclService test', () => { const result = crowi.aclService.isAclEnabled(); - expect(process.env.FORCE_WIKI_MODE).not.toBeDefined(); + const wikiMode = crowi.configManager.getConfig('crowi', 'security:wikiMode'); + expect(wikiMode).toBe(undefined); expect(result).toBe(true); }); @@ -81,7 +82,8 @@ describe('AclService test', () => { const result = crowi.aclService.isWikiModeForced(); - expect(process.env.FORCE_WIKI_MODE).not.toBeDefined(); + const wikiMode = crowi.configManager.getConfig('crowi', 'security:wikiMode'); + expect(wikiMode).toBe(undefined); expect(result).toBe(false); }); @@ -128,12 +130,10 @@ describe('AclService test', () => { describe('isGuestAllowedToRead()', () => { - let orgGetConfig; let getConfigSpy; beforeEach(async(done) => { // prepare spy for ConfigManager.getConfig - orgGetConfig = crowi.configManager.getConfig; getConfigSpy = jest.spyOn(crowi.configManager, 'getConfig'); getConfigSpy.mockClear(); done(); @@ -179,8 +179,6 @@ describe('AclService test', () => { .test('to be $expected when FORCE_WIKI_MODE is undefined' + ' and `security:restrictGuestMode` is \'$restrictGuestMode\'', async({ restrictGuestMode, expected }) => { - delete process.env.FORCE_WIKI_MODE; - // reload await crowi.configManager.loadConfigs(); @@ -190,14 +188,13 @@ describe('AclService test', () => { return restrictGuestMode; } if (ns === 'crowi' && key === 'security:wikiMode') { - return null; + return undefined; } throw new Error('Unexpected behavior.'); }); const result = crowi.aclService.isGuestAllowedToRead(); - expect(process.env.FORCE_WIKI_MODE).not.toBeDefined(); expect(getConfigSpy).toHaveBeenCalledTimes(2); expect(getConfigSpy).toHaveBeenCalledWith('crowi', 'security:wikiMode'); expect(getConfigSpy).toHaveBeenCalledWith('crowi', 'security:restrictGuestMode');
7
diff --git a/app/services/carto/organization_metadata_export_service.rb b/app/services/carto/organization_metadata_export_service.rb @@ -10,9 +10,10 @@ require_dependency 'carto/export/connector_configuration_exporter' # 1.0.0: export organization metadata # 1.0.1: export password expiration # 1.0.2: export connector configurations +# 1.0.3: export oauth_app_organizations module Carto module OrganizationMetadataExportServiceConfiguration - CURRENT_VERSION = '1.0.2'.freeze + CURRENT_VERSION = '1.0.3'.freeze EXPORTED_ORGANIZATION_ATTRIBUTES = [ :id, :seats, :quota_in_bytes, :created_at, :updated_at, :name, :avatar_url, :owner_id, :website, :description, :display_name, :discus_shortname, :twitter_username, :geocoding_quota, :map_view_quota, :auth_token,
3
diff --git a/token-metadata/0x3dC9a42fa7Afe57BE03c58fD7F4411b1E466C508/metadata.json b/token-metadata/0x3dC9a42fa7Afe57BE03c58fD7F4411b1E466C508/metadata.json "symbol": "CLL", "address": "0x3dC9a42fa7Afe57BE03c58fD7F4411b1E466C508", "decimals": 18, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/_pages/en/gsoc-ideas.md b/_pages/en/gsoc-ideas.md @@ -147,7 +147,7 @@ And, if possible, an *easy, medium or hard* rating of each project. A new stable version of the <a href="https://github.com/italia/design-react-kit/">Design React Kit</a>, implementing most of the components from Bootstrap Italia, and a Gatsby template that is easy to use and fully compliant with accessibility rules. This project can be used as a solid starting point: <ul> - <li> <a href="https://github.com/dej611/gatsby-bootstrap-italia-starter">Gatsby Bootstrap Italia Starter</a> (additional details can be found on its thread on Forum Italia).</li> + <li> <a href="https://github.com/italia/design-italia-gatsby-starterkit">Design Italia Gatsby Starter Kit</a> (additional details can be found on its thread on Forum Italia).</li> </ul> <b>Required skills:</b> <ul>
1
diff --git a/package.json b/package.json "description": "Buttercup browser extension for Chrome and Firefox.", "main": "source/background/index.js", "scripts": { - "build": "webpack" + "build": "webpack", + "test": "echo \"None yet...\" && exit 0" }, "repository": { "type": "git",
1
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb @@ -341,7 +341,7 @@ class ApplicationController < ActionController::Base return end format.json do - head :unauthorized + head :unauthorized and return end end end
1
diff --git a/src/core/operations/Image.js b/src/core/operations/Image.js @@ -12,6 +12,15 @@ import Utils from "../Utils.js"; * @namespace */ const Image = { + /** + * Extract EXIF operation. + * + * Extracts EXIF data from a byteArray, representing a JPG or a TIFF image. + * + * @param {byteArray} input + * @param {Object[]} args + * @returns {string} + */ runEXIF(input, args) { try { const bytes = Uint8Array.from(input);
0
diff --git a/accessibility-checker-engine/src/v2/checker/accessibility/util/legacy.ts b/accessibility-checker-engine/src/v2/checker/accessibility/util/legacy.ts @@ -2162,7 +2162,12 @@ export class RPTUtil { break; } case "form": - RPTUtil.hasAriaLabel(ruleContext) ? tagProperty = specialTagProperties["with-name"] : tagProperty = specialTagProperties["without-name"]; + let name = ARIAMapper.computeName(ruleContext); + if (name && name.trim().length > 0) { + tagProperty = specialTagProperties["with-name"]; + } else { + tagProperty = specialTagProperties["without-name"]; + } break; case "header": let ancestor = RPTUtil.getAncestorWithRole(ruleContext, "article", true);
3
diff --git a/assets/js/components/page-header-date-range.js b/assets/js/components/page-header-date-range.js * limitations under the License. */ -/** - * WordPress dependencies - */ -import { applyFilters } from '@wordpress/hooks'; - /** * Internal dependencies */ import DateRangeSelector from './date-range-selector'; export default function PageHeaderDateRange() { - const showDateRangeSelector = applyFilters( `googlesitekit.showDateRangeSelector`, false ); - - return showDateRangeSelector && ( + return ( <span className="googlesitekit-page-header__range"> <DateRangeSelector /> </span>
2
diff --git a/src/components/Start.js b/src/components/Start.js @@ -8,17 +8,17 @@ const tilt = n => wk(`clip-path: polygon(0% ${100 - n}%, 100% 0, 100% ${n}%, 0 100%)`) const Background = Flex.extend.attrs({ - direction: ['column', 'row'], + direction: ['column', null, 'row'], justify: 'space-around', align: 'center', w: 1, bg: 'primary' })` ${geo(brand.primary)}; - padding-top: 3rem; - padding-bottom: 3rem; + padding-top: 4rem; + padding-bottom: 4rem; ${tilt(90)} - ${mx[1]} { + ${mx[2]} { padding-top: 6rem; padding-bottom: 6rem; ${tilt(80)} @@ -41,18 +41,16 @@ const Description = Subhead.extend.attrs({ })` font-weight: normal; line-height: 1.5; - opacity: .85; + opacity: .9; ` -const Left = Column.extend.attrs({ mt: 3 })` - ${mx[0]} { +const Left = Column.extend` + ${mx[2]} { text-align: right; } ` -const Right = Column.extend.attrs({ mt: 3 })` - ${mx[0]} { +const Right = Column.extend` text-align: left; - } ` const Start = props => (
7
diff --git a/src/sensors/MultiDropdownList.js b/src/sensors/MultiDropdownList.js import React, { Component } from "react"; import { connect } from "react-redux"; -import { View, Modal, ScrollView } from "react-native"; +import { View, Modal, ListView, TouchableWithoutFeedback } from "react-native"; import { ListItem, CheckBox, @@ -29,6 +29,9 @@ class MultiDropdownList extends Component { showModal: false }; + this.ds = new ListView.DataSource({ + rowHasChanged: (r1, r2) => r1.key !== r2.key || r1.count !== r2.count + }); this.type = this.props.queryFormat === "or" ? "Terms" : "Term"; this.internalComponent = this.props.componentId + "__internal"; } @@ -113,22 +116,20 @@ class MultiDropdownList extends Component { } selectItem = (item) => { - console.log("called"); let { currentValue } = this.state; + if (currentValue.includes(item)) { currentValue = currentValue.filter(value => value !== item); } else { currentValue.push(item); } - this.setValue(currentValue); - } - setValue = (value) => { this.setState({ - currentValue: value + currentValue }); - this.props.updateQuery(this.props.componentId, this.defaultQuery(value)) - }; + + this.props.updateQuery(this.props.componentId, this.defaultQuery(currentValue)) + } toggleModal = () => { this.setState({ @@ -160,24 +161,26 @@ class MultiDropdownList extends Component { </Body> <Right /> </Header> - <ScrollView> - { - this.state.options.map(item => ( - <ListItem - key={item.key} - onPress={() => this.selectItem(item.key)} - > + <ListView + dataSource={this.ds.cloneWithRows(this.state.options)} + enableEmptySections={true} + renderRow={(item) => ( + <TouchableWithoutFeedback onPress={() => this.selectItem(item.key)}> + <View style={{ + flex: 1, + flexDirection: "row", + padding: 15, + borderBottomColor: "#c9c9c9", + borderBottomWidth: 0.5 + }}> <CheckBox - onPress={() => this.selectItem(item.key)} checked={this.state.currentValue.includes(item.key)} /> - <Body> - <Text>{item.key}</Text> - </Body> - </ListItem> - )) - } - </ScrollView> + <Text style={{marginLeft: 20}}>{item.key}</Text> + </View> + </TouchableWithoutFeedback> + )} + /> </Modal>) : (<Item regular style={{marginLeft: 0}}> <Input
3
diff --git a/FloatingSpace/FloatingLayer.js b/FloatingSpace/FloatingLayer.js @@ -631,8 +631,8 @@ function newFloatingLayer () { maxTargetRepulsionForce = maxTargetRepulsionForce + pDelta / 1000 - if (maxTargetRepulsionForce < 0.0001) { - maxTargetRepulsionForce = 0.0001 + if (maxTargetRepulsionForce < 0.0000000001) { + maxTargetRepulsionForce = 0.0000000001 } } catch (err) { if (ERROR_LOG === true) { logger.write('[ERROR] changeTargetRepulsion -> err= ' + err.stack) }
11
diff --git a/src/pages/Component/component/LogShow/index.js b/src/pages/Component/component/LogShow/index.js @@ -197,9 +197,6 @@ class Index extends React.Component { } const isDownloadb = bodyText.length >= 1024*1024 && !dynamic; - if (bodyText.length === 0) { - return <div />; - } return ( <Modal className={!isDownloadb && styles.logModal}
1
diff --git a/src/components/formik-forms/formik-radio-button.jsx b/src/components/formik-forms/formik-radio-button.jsx @@ -67,6 +67,7 @@ const FormikRadioButton = ({ className, isCustomInput, label, + name, onSetCustom, ...props }) => ( @@ -74,16 +75,15 @@ const FormikRadioButton = ({ buttonValue={buttonValue} className={className} component={FormikRadioButtonSubComponent} - id="radioOption1" label={label} labelClassName={isCustomInput ? 'formik-radio-label-other' : ''} + name={name} {...props} > {isCustomInput && ( <FormikInput className="formik-radio-input" - id="other" - name="other" + name="custom" wrapperClassName="formik-radio-input-wrapper" /* eslint-disable react/jsx-no-bind */ onChange={event => onSetCustom(event.target.value)} @@ -99,6 +99,7 @@ FormikRadioButton.propTypes = { className: PropTypes.string, isCustomInput: PropTypes.bool, label: PropTypes.string, + name: PropTypes.string, onSetCustom: PropTypes.func, value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]) };
14
diff --git a/Source/dom/layers/Text.js b/Source/dom/layers/Text.js @@ -44,7 +44,7 @@ const VerticalTextAlignment = { } export const VerticalTextAlignmentMap = { - left: 0, // Visually left aligned + top: 0, // Visually left aligned center: 1, // Visually centered bottom: 2, // Visually bottom aligned }
1
diff --git a/src/utils/vote.ts b/src/utils/vote.ts import parseToken from './parseToken'; -import { vestsToRshares } from './conversions'; import { GlobalProps } from '../redux/reducers/accountReducer'; export const getEstimatedAmount = (account, globalProps:GlobalProps, sliderValue:number = 1) => { const { fundRecentClaims, fundRewardBalance, base, quote } = globalProps; const votingPower:number = account.voting_power; - const totalVests = - parseToken(account.vesting_shares) + - parseToken(account.received_vesting_shares) - - parseToken(account.delegated_vesting_shares); + const vestingShares = parseToken(account.vesting_shares); + const receievedVestingShares = parseToken(account.received_vesting_shares); + const delegatedVestingShared = parseToken(account.delegated_vesting_shares); const weight = sliderValue * 10000; const hbdMedian = base / quote; - const rShares = vestsToRshares(totalVests, votingPower, weight); - const estimatedAmount = rShares / fundRecentClaims * fundRewardBalance * hbdMedian; + const totalVests = vestingShares + receievedVestingShares - delegatedVestingShared; + + const voteEffectiveShares = calculateVoteRshares(totalVests, votingPower, weight) + const voteValue = (voteEffectiveShares / fundRecentClaims) * fundRewardBalance * hbdMedian; + const estimatedAmount = weight < 0 ? Math.min(voteValue * -1, 0) : Math.max(voteValue, 0) + return Number.isNaN(estimatedAmount) ? '0.00000' : estimatedAmount.toFixed(5); }; + + +/* + * Changes in HF25 + * Full 'rshares' always added to the post. + * Curation rewards use 'weight' for posts/comments: + * 0-24 hours -> weight = rshares_voted + * 24 hours; 24+48=72 hours -> weight = rshares_voted /2 + * 72 hours; 3 days -> rshares_voted / 8 + */ +export const calculateVoteRshares = (userEffectiveVests:number, vp = 10000, weight = 10000) => { + const userVestingShares = userEffectiveVests * 1e6; + const userVotingPower = vp * (Math.abs(weight) / 10000) + const voteRshares = userVestingShares * (userVotingPower / 10000) * 0.02 + return voteRshares +} +
4
diff --git a/src/core/config/Categories.json b/src/core/config/Categories.json "Citrix CTX1 Encode", "Citrix CTX1 Decode", "Pseudo-Random Number Generator", - "Enigma" + "Enigma", + "Typex" ] }, {
0
diff --git a/index.html b/index.html const updateMath = function (latex, cb) { MathJax.Hub.queue.Push(['Text', math, '\\displaystyle{' + latex + '}']) MathJax.Hub.Queue(() => { + if ($('.result svg').length) { const $svg = $('.result svg').attr('xmlns', "http://www.w3.org/2000/svg") $svg.find('use').each(function () { const $use = $(this) // Safari xlink ns issue fix svgHtml = svgHtml.replace(/ ns\d+:href/gi, ' xlink:href') cb('data:image/svg+xml;base64,' + window.btoa(svgHtml)) + } else { + cb('data:image/svg+xml;base64,' + window.btoa(`<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg width="17px" height="15px" viewBox="0 0 17 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>Group 2</title> + <defs></defs> + <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <g transform="translate(-241.000000, -219.000000)"> + <g transform="translate(209.000000, 207.000000)"> + <rect x="-1.58632797e-14" y="0" width="80" height="40"></rect> + <g transform="translate(32.000000, 12.000000)"> + <polygon id="Combined-Shape" fill="#9B0000" fill-rule="nonzero" points="0 15 8.04006 0 16.08012 15"></polygon> + <polygon id="Combined-Shape-path" fill="#FFFFFF" points="7 11 9 11 9 13 7 13"></polygon> + <polygon id="Combined-Shape-path" fill="#FFFFFF" points="7 5 9 5 9 10 7 10"></polygon> + </g> + </g> + </g> + </g> +</svg>`)) + + } }) }
9
diff --git a/omnidb_plugin/README.md b/omnidb_plugin/README.md # 1. If you installed omnidb-plugin DEB/RPM packages ## 1.1. Set shared_preload_libraries +```bash nano /etc/postgresql/X.Y/main/postgresql.conf shared_preload_libraries = '/opt/omnidb-plugin/omnidb_plugin_XY' -# 2. If you are compiling from source +sudo systemctl restart postgresql +``` -## 2.1. Install headers for PostgreSQL -sudo apt install postgresql-server-dev-X.Y libpq-dev - -## 2.2. Compile omnidb_plugin -./compile.sh - -## 2.3. Copy to PostgreSQL $libdir -sudo cp omnidb_plugin.so /usr/lib/postgresql/X.Y/lib/ - -## 2.4. Set shared_preload_libraries -nano /etc/postgresql/X.Y/main/postgresql.conf - shared_preload_libraries = 'omnidb_plugin' +## 1.2. Post-installation steps -## 2.5. Post-installation steps - -## 2.5.1. Create omnidb schema in your database (should be done by a superuser) +## 1.2.1. Create omnidb schema in your database (should be done by a superuser) +```bash psql -d <database> -f debugger_schema.sql +``` -## 2.5.2. Create sample functions (optional) +## 1.2.2. Create sample functions (optional) +```bash psql -d <database> -f debugger_schema.sql +``` -# 3. If you want the extension +# 2. If you are compiling the extension from source -## 3.1. Install headers for PostgreSQL +## 2.1. Install headers for PostgreSQL and libpq +```bash sudo apt install postgresql-server-dev-X.Y libpq-dev +``` -## 3.2. Compile omnidb_plugin +## 2.2. Compile omnidb_plugin +```bash make +``` -## 3.3. Install omnidb_plugin +## 2.3. Install omnidb_plugin +```bash sudo make install +``` -## 3.4. Set shared_preload_libraries +## 2.4. Set shared_preload_libraries +```bash nano /etc/postgresql/X.Y/main/postgresql.conf shared_preload_libraries = 'omnidb_plugin' -## 3.5. Post-installation steps +sudo systemctl restart postgresql +``` -## 3.5.1. Create omnidb_plugin extension (should be done by a superuser) +## 2.5. Post-installation steps + +## 2.5.1. Create omnidb_plugin extension (should be done by a superuser) +```bash psql -d <database> -c 'CREATE EXTENSION omnidb_plugin' +``` + +## 2.2.2. Create sample functions (optional) +```bash +psql -d <database> -f debugger_schema.sql +```
7
diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js @@ -209,26 +209,28 @@ class ReportActionsView extends React.Component { const previousLastSequenceNumber = lodashGet(CollectionUtils.lastItem(prevProps.reportActions), 'sequenceNumber'); const currentLastSequenceNumber = lodashGet(CollectionUtils.lastItem(this.props.reportActions), 'sequenceNumber'); - // Record the max action when window is visible except when Drawer is open on small screen - const shouldRecordMaxAction = Visibility.isVisible() - && (!this.props.isSmallScreenWidth || !this.props.isDrawerOpen); + // Record the max action when window is visible and the sidebar is not covering the report view on a small screen + const isSidebarCoveringReportView = this.props.isSmallScreenWidth && this.props.isDrawerOpen; + const shouldRecordMaxAction = Visibility.isVisible() && !isSidebarCoveringReportView; + + const sidebarClosed = prevProps.isDrawerOpen && !this.props.isDrawerOpen; + const screenSizeIncreased = prevProps.isSmallScreenWidth && !this.props.isSmallScreenWidth; + const reportBecomeVisible = sidebarClosed || screenSizeIncreased; if (previousLastSequenceNumber !== currentLastSequenceNumber) { - // If a new comment is added and it's from the current user scroll to the bottom otherwise - // leave the user positioned where they are now in the list. const lastAction = CollectionUtils.lastItem(this.props.reportActions); - if (lastAction && (lastAction.actorEmail === this.props.session.email)) { + const isLastActionFromCurrentUser = lodashGet(lastAction, 'actorEmail', '') === lodashGet(this.props.session, 'email', ''); + if (isLastActionFromCurrentUser) { + // If a new comment is added and it's from the current user scroll to the bottom otherwise leave the user positioned where they are now in the list. ReportScrollManager.scrollToBottom(); - } - - if (lodashGet(lastAction, 'actorEmail', '') !== lodashGet(this.props.session, 'email', '')) { + } else { // Only update the unread count when the floating message counter is visible // Otherwise counter will be shown on scrolling up from the bottom even if user have read those messages if (this.state.isFloatingMessageCounterVisible) { this.updateMessageCounterCount(!shouldRecordMaxAction); } - // show new floating message counter when there is a new message + // Show new floating message counter when there is a new message this.toggleFloatingMessageCounter(); } @@ -237,10 +239,10 @@ class ReportActionsView extends React.Component { if (shouldRecordMaxAction) { Report.updateLastReadActionID(this.props.reportID); } - } else if (shouldRecordMaxAction && ( - prevProps.isDrawerOpen !== this.props.isDrawerOpen - || prevProps.isSmallScreenWidth !== this.props.isSmallScreenWidth - )) { + } + + // Update the new marker position and last read action when we are closing the sidebar or moving from a small to large screen size + if (shouldRecordMaxAction && reportBecomeVisible) { this.updateNewMarkerPosition(this.props.report.unreadActionCount); Report.updateLastReadActionID(this.props.reportID); }
7
diff --git a/activities/XmasLights.activity/js/activity.js b/activities/XmasLights.activity/js/activity.js @@ -10,11 +10,11 @@ requirejs.config({ // -- [] to iterate on existing icons // -- ["id1", "id2"] const initIconsSequences = [[], ["org.sugarlabs.Falabracman"], ["com.homegrownapps.reflection", "org.sugarlabs.FractionBounce"]] -const initIcons = initIconsSequences[0]; +const initIcons = initIconsSequences[1]; // -- [] to iterate on all colors // -- [color1, color2] use -1 for random color -const initColorsSequences = [[], [-1], [22, 47, 65], [256, 100]]; -const initColors = initColorsSequences[1]; +const initColorsSequences = [[], [-1], [22, 47, 65], [256, 100], [256, 256, 256, 47, 256, 256, 256, 47, 256, 256, 256, 47, 256, 256, 256, 47], [22]]; +const initColors = initColorsSequences[4]; const blinkTime = 1000; // Vue main app @@ -68,7 +68,8 @@ var app = new Vue({ name: id, svg: svg, color: color, - size: size + size: size, + step: (initColors.length==0?0:index%initColors.length) }); }); } @@ -79,8 +80,13 @@ var app = new Vue({ let vm = this; setInterval(function() { for (let i = 0 ; i < vm.gridContent.length ; i++) { - let color = vm.gridContent[i].color; - let newColor = (initColors.length == 0 ? (color+1)%180 : initColors[(initColors.indexOf(color)+1)%initColors.length]); + let newColor; + if (initColors.length == 0) { + newColor = (vm.gridContent[i].color+1)%180; + } else { + vm.gridContent[i].step = (vm.gridContent[i].step + 1)%initColors.length; + newColor = initColors[vm.gridContent[i].step]; + } if (newColor == -1) { newColor = Math.floor(Math.random()*180) } vm.gridContent[i].color = newColor; }
9
diff --git a/src/traces/surface/convert.js b/src/traces/surface/convert.js @@ -127,10 +127,21 @@ var shortPrimes = [ 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, - 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999 + 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, + 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, + 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, + 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, + 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, + 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, + 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, + 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, + 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, + 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, + 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999 ]; function getPow(a, b) { + if(a < b) return 0; var n = 0; while(Math.floor(a % b) === 0) { a /= b;
0
diff --git a/index.js b/index.js @@ -223,11 +223,12 @@ nativeVr.requestPresent = function(layers) { renderHeight, }); - nativeWindow.setCurrentWindowContext(context.getWindowHandle()); + const windowHandle = context.getWindowHandle(); + nativeWindow.setCurrentWindowContext(windowHandle); const width = halfWidth * 2; const [msFbo, msTex] = nativeWindow.createRenderTarget(width, height, 4); - const [fbo, tex] = nativeWindow.createRenderTarget(width, height, 1); + const [fbo, tex] = nativeWindow.createRenderTarget(windowHandle, width, height, 1); context.setDefaultFramebuffer(msFbo); nativeWindow.bindFrameBuffer(msFbo); @@ -295,7 +296,7 @@ if (nativeMl) { if (initResult) { isMlPresenting = true; - const [fbo, tex] = nativeWindow.createRenderTarget(window.innerWidth, window.innerHeight, 1); + const [fbo, tex] = nativeWindow.createRenderTarget(windowHandle, window.innerWidth, window.innerHeight, 1); mlFbo = fbo; mlTex = tex;
4
diff --git a/app/src/scripts/admin/charts/admin.bar.jsx b/app/src/scripts/admin/charts/admin.bar.jsx import React from 'react' import PropTypes from 'prop-types' -import { - VictoryChart, - VictoryScatter, - VictoryAxis, - VictoryStack, - VictoryBar, -} from 'victory' +import { VictoryChart, VictoryAxis, VictoryStack, VictoryBar } from 'victory' // Life Cycle ---------------------------------------------------------------------- const Bar = ({ year, logs, months }) => { let ms = months - let dataLength = 0 let key // ARRAY AND OBJECT VARS FOR DATA - let data = [] - let total = [] let failed = [] let succeeded = [] - let entries = {} + let entries = { + failed: [], + succeeded: [], + } Object.keys(logs).map(type => { if (logs[type][year]) { Object.values(logs[type][year]).map(job => { let dateArr = job.dateTime.split(' ') - let status = job.log.data.job.status + let status = job.log.data.job.status.toLowerCase() key = dateArr[1] - if (!entries[key]) { - entries[key] = [] - entries[key].push({ date: job.dateTime, status: status }) + if (!entries[status][key]) { + entries[status][key] = [] + entries[status][key].push({ date: job.dateTime, status: status }) } else { - entries[key].push({ date: job.dateTime, status: status }) + entries[status][key].push({ date: job.dateTime, status: status }) } }) } }) - - // if array is not empty - if (entries[key]) { - dataLength = entries[key].length - total.push({ x: key, y: dataLength }) - // need to get length of job statuses for the month - Object.values(entries).map(jobs => { - let count = [] - jobs.map(job => { - // Add data to chart - if (job.status === 'FAILED') { - count.push(job.date) - failed.push({ x: key, y: count.length }) - } else if (job.status === 'SUCCEEDED') { - count.push(job.date) - succeeded.push({ x: key, y: count.length }) + Object.keys(entries).map(log => { + if (entries[log][key]) { + if (log === 'failed') { + failed.push({ x: key, y: entries[log][key].length }) + } else if (log === 'succeeded') { + succeeded.push({ x: key, y: entries[log][key].length }) } - }) - }) } + }) - console.log(total) if (logs.FAILED[year].length || logs.SUCCEEDED[year].length) { return ( <div className="chart-container"> @@ -69,17 +51,11 @@ const Bar = ({ year, logs, months }) => { tickValues={ms} tickFormat={ms} /> - <VictoryStack colorScale={['#38A171', '#c82424', '#df7600']}> - <VictoryBar data={failed} /> + <VictoryStack colorScale={['#38A171', '#c82424']}> <VictoryBar data={succeeded} /> - <VictoryBar data={total} /> + <VictoryBar data={failed} /> </VictoryStack> </VictoryChart> - <span> - <span className="failed">Failed</span> - <span className="succeed">Succeeded</span> - <span className="total">Total</span> - </span> </div> ) } else { @@ -94,6 +70,7 @@ const Bar = ({ year, logs, months }) => { Bar.propTypes = { logs: PropTypes.object, year: PropTypes.node, + months: PropTypes.array, } export default Bar
1
diff --git a/src/Appwrite/Resize/Resize.php b/src/Appwrite/Resize/Resize.php @@ -131,35 +131,35 @@ class Resize break; case 'webp': - //$this->image->setImageFormat('webp'); + $this->image->setImageFormat('webp'); - $signature = $this->image->getImageSignature(); - $temp = '/tmp/temp-'.$signature.'.'.\strtolower($this->image->getImageFormat()); - $output = '/tmp/output-'.$signature.'.webp'; + // $signature = $this->image->getImageSignature(); + // $temp = '/tmp/temp-'.$signature.'.'.\strtolower($this->image->getImageFormat()); + // $output = '/tmp/output-'.$signature.'.webp'; - // save temp - $this->image->writeImages($temp, true); + // // save temp + // $this->image->writeImages($temp, true); - // convert temp - \exec("cwebp -quiet -metadata none -q $quality $temp -o $output"); + // // convert temp + // \exec("cwebp -quiet -metadata none -q $quality $temp -o $output"); - $data = \file_get_contents($output); + // $data = \file_get_contents($output); - //load webp - if (empty($path)) { - return $data; - } else { - \file_put_contents($path, $data, LOCK_EX); - } + // //load webp + // if (empty($path)) { + // return $data; + // } else { + // \file_put_contents($path, $data, LOCK_EX); + // } - $this->image->clear(); - $this->image->destroy(); + // $this->image->clear(); + // $this->image->destroy(); - //delete webp - \unlink($output); - \unlink($temp); + // //delete webp + // \unlink($output); + // \unlink($temp); - return; + // return; break;
4
diff --git a/diorama.js b/diorama.js @@ -345,7 +345,6 @@ const poisonMesh = new PoisonBgFxMesh(); const noiseMesh = new NoiseBgFxMesh(); const smokeMesh = new SmokeBgFxMesh(); const glyphMesh = new GlyphBgFxMesh(); -const dotsMesh = new DotsBgFxMesh(); const textObject = (() => { const o = new THREE.Object3D(); @@ -438,7 +437,6 @@ sideScene.add(poisonMesh); sideScene.add(noiseMesh); sideScene.add(smokeMesh); sideScene.add(glyphMesh); -sideScene.add(dotsMesh); sideScene.add(outlineMesh); sideScene.add(labelMesh); sideScene.add(textObject); @@ -763,15 +761,6 @@ const createPlayerDiorama = ({ } }; _renderGlyph(); - const _renderDots = () => { - if (dotsBackground) { - dotsMesh.update(timeOffset, timeDiff, this.width, this.height); - dotsMesh.visible = true; - } else { - dotsMesh.visible = false; - } - }; - _renderDots(); const _renderOutline = () => { if (outline) { outlineMesh.update(timeOffset, timeDiff, this.width, this.height, outlineRenderTarget.texture);
2
diff --git a/apps/banglexercise/README.md b/apps/banglexercise/README.md @@ -6,7 +6,7 @@ Currently only push ups and curls are supported. ## Disclaimer -This app is very experimental. +This app is experimental but it seems to work quiet reliable for me. It could be and is likely that the threshold values for detecting exercises do not work for everyone. Therefore it would be great if we could improve this app together :-) @@ -25,8 +25,8 @@ Press stop to end your exercise. * Rope jumps * Sit ups * ... -* Save exercises to file system -* Add settings (vibration, beep, ...) +* Save exercise summaries to file system +* Configure daily goal for exercises * Find a nicer icon
7
diff --git a/includes/Modules/Idea_Hub.php b/includes/Modules/Idea_Hub.php @@ -235,31 +235,6 @@ final class Idea_Hub extends Module */ add_filter( 'post_class', $this->get_method_proxy( 'update_post_classes' ), 10, 3 ); - add_filter( - 'googlesitekit_inline_base_data', - function( $data ) { - if ( - // Do nothing if tracking is disabled or if it is enabled and already allowed. - empty( $data['trackingEnabled'] ) || - ! empty( $data['isSiteKitScreen'] ) || - // Also do nothing if the get_current_screen function is not available. - ! function_exists( 'get_current_screen' ) - ) { - return $data; - } - - $screen = get_current_screen(); - if ( ! is_null( $screen ) ) { - $data['isSiteKitScreen'] = - ( 'post' === $screen->post_type && 'edit-post' === $screen->id ) || - 'dashboard' === $screen->id; - } - - return $data; - }, - 100 - ); - add_action( 'admin_footer-edit.php', function() {
2
diff --git a/README.md b/README.md @@ -87,11 +87,19 @@ While non-minified source files may contain characters outside UTF-8, it is reco > Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version. -To support MathJax, you need to load version two of MathJax e.g. `v2.7.5` files from CDN or npm. +To support MathJax, you could load version two or three of MathJax e.g. `v2.7.5` files from CDN or npm. ```html <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG.js"></script> ``` +```html +<script src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-svg.js"></script> +``` + +> When using MathJax version 3, it is also possibly to use `chtml` output on the other parts of the page in addition to `svg` output for the plotly graph. +Please refer to `devtools/test_dashboard/index-mathjax3chtml.html` to see an example. + + ## Bundles There are two kinds of plotly.js bundles: 1. Complete and partial official bundles that are distributed to `npm` and the `CDN`, described in [the dist README](https://github.com/plotly/plotly.js/blob/master/dist/README.md).
3
diff --git a/package.json b/package.json "ansi_up": "^2.0.2", "broccoli-asset-rev": "^2.6.0", "dotenv": "^4.0.0", - "ember-api-store": "2.6.4", + "ember-api-store": "^2.6.5", "ember-browserify": "^1.2.0", "ember-cli": "~2.16.2", "ember-cli-app-version": "^3.0.0",
3
diff --git a/src/components/cursor.js b/src/components/cursor.js @@ -13,9 +13,9 @@ var EVENTS = { }; var STATES = { - FUSING: 'fusing', - HOVERING: 'hovering', - HOVERED: 'hovered' + FUSING: 'cursor-fusing', + HOVERING: 'cursor-hovering', + HOVERED: 'cursor-hovered' }; /**
13
diff --git a/src/scss/_spark-theme.scss b/src/scss/_spark-theme.scss @@ -16,4 +16,18 @@ $sprk-webfonts: text-align: left; } +#gatsby-focus-wrapper code { + line-height: 1; + white-space: nowrap; + font-size: 13px; + color: rgba(51, 51, 51, 0.9); + background-color: rgb(248, 248, 248); + margin: 0px 2px; + padding: 3px 5px; + border-radius: 3px; + border-width: 1px; + border-style: solid; + border-color: rgb(238, 238, 238); +} + /* stylelint-enable */
3
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml @@ -230,12 +230,14 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm install working-directory: report-react - - run: sed -i'.old' -e "s/[\"|']use strict[\"|']/;/g" ./exceljs.js - working-directory: accessibility-checker-extension/node_modules/exceljs/dist - run: npm install working-directory: accessibility-checker-extension + - run: grep "use-strict" ./excel.js | wc -l + working-directory: accessibility-checker-extension/node_modules/exceljs/dist - run: sed -i'.old' -e "s/[\"|']use strict[\"|']/;/g" ./exceljs.js working-directory: accessibility-checker-extension/node_modules/exceljs/dist + - run: grep "use-strict" ./excel.js | wc -l + working-directory: accessibility-checker-extension/node_modules/exceljs/dist - run: cp -f ./manifest_Chrome.json ./src/manifest.json working-directory: accessibility-checker-extension - run: npm run package:browser
2
diff --git a/package.json b/package.json "db.js": "^0.15.0", "debug": "^4.3.4", "enketo-core": "^6.1.6", - "enketo-transformer": "^2.1.7", + "enketo-transformer": "2.1.7", "evp_bytestokey": "^1.0.3", "express": "^4.18.2", "express-cls-hooked": "^0.3.8",
12
diff --git a/src/trigger.js b/src/trigger.js @@ -16,11 +16,6 @@ app.view = function(vnode) { }); }; - const projectEvents = (project) => { - const project_id = parseInt(project.id); - const config_project = state.config_projects[project_id] || {}; - return config_project.events || {}; - }; const branchList = () => { if (!state.gitlab.branchs) { return m("li", m("div","------")); @@ -89,8 +84,6 @@ app.view = function(vnode) { return state.gitlab.projects.filter((project) =>{ return matchSearchKey(project); }).map((project) => { - project.events = project.events || projectEvents(project); - const names = []; var avatar = "../img/gitlab_logo_48.png"; if(project.avatar_url) {
2
diff --git a/package.json b/package.json { "name": "@khronosgroup/gltf-viewer", - "version": "1.0.1", + "version": "1.0.2", "description": "The official glTF sample viewer.", "main": "dist/gltf-viewer.js", "module": "dist/gltf-viewer.module.js",
3
diff --git a/package.json b/package.json "release-firefox": "make browser=firefox type=release", "dev-chrome": "make dev browser=chrome type=dev", "dev-safari": "make dev browser=duckduckgo.safariextension type=dev", - "release-safari": "make browser=duckduckgo.safariextension type=release", "beta-firefox": "make beta-firefox browser=firefox type=release", "release-chrome": "make browser=chrome type=release && make chrome-release-zip" },
2
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -1206,8 +1206,8 @@ class Avatar { this.shoulderWidth = modelBones.Left_arm.getWorldPosition(new THREE.Vector3()).distanceTo(modelBones.Right_arm.getWorldPosition(new THREE.Vector3())); this.leftArmLength = this.shoulderTransforms.leftArm.armLength; this.rightArmLength = this.shoulderTransforms.rightArm.armLength; - let indexDistance = modelBones.Left_indexFinger1 && modelBones.Left_wrist? modelBones.Left_indexFinger1.getWorldPosition(new THREE.Vector3()).distanceTo(modelBones.Left_wrist.getWorldPosition(new THREE.Vector3())) : 0; - let handWidth = modelBones.Left_indexFinger1 && modelBones.Left_littleFinger1? modelBones.Left_indexFinger1.getWorldPosition(new THREE.Vector3()).distanceTo(modelBones.Left_littleFinger1.getWorldPosition(new THREE.Vector3())) : 0; + let indexDistance = modelBones.Left_indexFinger1? modelBones.Left_indexFinger1.getWorldPosition(new THREE.Vector3()).distanceTo(modelBones.Left_wrist.getWorldPosition(new THREE.Vector3())) : 0; + let handWidth = (modelBones.Left_indexFinger1 && modelBones.Left_littleFinger1)? modelBones.Left_indexFinger1.getWorldPosition(new THREE.Vector3()).distanceTo(modelBones.Left_littleFinger1.getWorldPosition(new THREE.Vector3())) : 0; this.handOffsetLeft = new THREE.Vector3(handWidth*0.7, -handWidth*0.75, indexDistance*0.5); this.handOffsetRight = new THREE.Vector3(-handWidth*0.7, -handWidth*0.75, indexDistance*0.5); this.eyeToHipsOffset = modelBones.Hips.getWorldPosition(new THREE.Vector3()).sub(eyePosition);
0
diff --git a/articles/multifactor-authentication/administrator/guardian-for-select-clients.md b/articles/multifactor-authentication/administrator/guardian-for-select-clients.md --- -description: Guardian for Select Client +description: Guardian for Select Applications --- -# Customize MFA for Select Clients +# Customize MFA for Select Applications -Once you have enabled either MFA option, you will be presented with the **Customize MFA** code snippet that allows advanced configuration of Guardian's behavior via [Rules](/rules). One option is to apply Guardian authentication only to a subset of your clients. +Once you have enabled either MFA option, you will be presented with the **Customize MFA** code snippet that allows advanced configuration of Guardian's behavior via [Rules](/rules). One option is to apply Guardian authentication only to a subset of your applications. -By default, Auth0 enables Guardian for all clients. +By default, Auth0 enables Guardian for all applications. ```js function (user, context, callback) { var CLIENTS_WITH_MFA = ['REPLACE_WITH_YOUR_CLIENT_ID']; - // Apply Guardian only for the specified clients + // Apply Guardian only for the specified applications if (CLIENTS_WITH_MFA.indexOf(context.clientID) !== -1) { context.multifactor = { provider: 'guardian', //required
10
diff --git a/token-metadata/0xC12D1c73eE7DC3615BA4e37E4ABFdbDDFA38907E/metadata.json b/token-metadata/0xC12D1c73eE7DC3615BA4e37E4ABFdbDDFA38907E/metadata.json "symbol": "KICK", "address": "0xC12D1c73eE7DC3615BA4e37E4ABFdbDDFA38907E", "decimals": 8, - "dharmaVerificationStatus": { "dharmaVerificationStatus": "VERIFIED" } \ No newline at end of file -} \ No newline at end of file
3
diff --git a/sirepo/sim_api/jupyterhublogin.py b/sirepo/sim_api/jupyterhublogin.py @@ -71,11 +71,14 @@ def init_apis(*args, **kwargs): ) pkio.mkdir_parent(cfg.user_db_root_d) sirepo.auth_db.init_model(_init_model) - sirepo.events.register({ - 'auth_logout': _event_auth_logout, - 'end_api_call': _event_end_api_call, - 'github_authorized': _event_github_authorized, - }) + sirepo.events.register(PKDict( + auth_logout=_event_auth_logout, + end_api_call=_event_end_api_call, + )) + if cfg.rs_jupyter_migrate: + sirepo.events.register(PKDict( + github_authorized=_event_github_authorized, + )) def _create_user_if_not_found(): @@ -130,23 +133,15 @@ def _event_end_api_call(kwargs): def _event_github_authorized(kwargs): - def _migrate(): - try: - s.rename(d) - except (py.error.ENOTDIR, py.error.ENOENT): - pkdlog( - 'Tried to migrate existing rs jupyter directory={} but not found. Ignoring.', - s, - ) - pkio.mkdir_parent(d) - - if not cfg.rs_jupyter_migrate: - return - with sirepo.auth_db.thread_lock: - s = _user_dir(user_name=kwargs.user_name) d = _user_dir() - if not s == d: - _migrate() + JupyterhubUser.update_user_name( + sirepo.auth.logged_in_user(), + kwargs.user_name, + ) + pkio.unchecked_remove(d) + # User may not have been a user originally so need to create their dir. + # If it exists (they were a user) it is a no-op. + pkio.mkdir_parent(_user_dir()) raise sirepo.util.Redirect('jupyter') @@ -162,6 +157,11 @@ def _init_model(base): unique=True, ) + @classmethod + def update_user_name(cls, uid, user_name): + with sirepo.auth_db.thread_lock: + cls._session.query(cls).get(uid).user_name = user_name + cls._session.commit() def _unchecked_hub_user(uid): with sirepo.auth_db.thread_lock:
10
diff --git a/Source/Scene/PolylineCollection.js b/Source/Scene/PolylineCollection.js @@ -1050,17 +1050,18 @@ import SceneMode from './SceneMode.js'; if (collection._polylinesRemoved) { collection._polylinesRemoved = false; - const definedPolylines = []; - let i=0; - for (let polyline of collection._polylines) { + var definedPolylines = []; + var i=0; + var polyline; + for (polyline of collection._polylines) { if (defined(polyline)) { polyline._index = i++; definedPolylines.push(polyline); } } - const definedPolylinesToUpdate = []; - for (let polyline of collection._polylinesToUpdate) { + var definedPolylinesToUpdate = []; + for (polyline of collection._polylinesToUpdate) { if (defined(polyline._polylineCollection)) { definedPolylinesToUpdate.push(polyline); }
14
diff --git a/devices/xiaomi.js b/devices/xiaomi.js @@ -923,6 +923,10 @@ module.exports = [ fromZigbee: [fz.xiaomi_battery, fz.xiaomi_contact, fz.xiaomi_contact_interval], toZigbee: [], exposes: [e.battery(), e.contact(), e.temperature(), e.battery_voltage()], + configure: async (device) => { + device.powerSource = 'Battery'; + device.save(); + }, }, { zigbeeModel: ['lumi.sensor_wleak.aq1'],
12
diff --git a/src/article/converter/bib/BibConversion.js b/src/article/converter/bib/BibConversion.js +import { + ARTICLE_REF, MAGAZINE_ARTICLE_REF, NEWSPAPER_ARTICLE_REF, JOURNAL_ARTICLE_REF, BOOK_REF, + CONFERENCE_PAPER_REF, PATENT_REF, REPORT_REF, THESIS_REF, WEBPAGE_REF, CHAPTER_REF, DATA_PUBLICATION_REF +} from '../../ArticleConstants' + /* Converts a CSLJSON record to our internal format. See EntityDatabase for schemas. @@ -9,18 +14,18 @@ export function convertCSLJSON (source) { // CSL types: http://docs.citationstyles.org/en/stable/specification.html#appendix-iii-types let typeMapping = { - 'article': 'article-ref', - 'article-magazine': 'magazine-article-ref', - 'article-newspaper': 'newspaper-article-ref', - 'article-journal': 'journal-article-ref', + 'article': ARTICLE_REF, + 'article-magazine': MAGAZINE_ARTICLE_REF, + 'article-newspaper': NEWSPAPER_ARTICLE_REF, + 'article-journal': JOURNAL_ARTICLE_REF, // "bill" - 'book': 'book-ref', + 'book': BOOK_REF, // "broadcast" - 'chapter': 'book-ref', - 'dataset': 'data-publication-ref', + 'chapter': CHAPTER_REF, + 'dataset': DATA_PUBLICATION_REF, // "entry" - 'entry-dictionary': 'book-ref', - 'entry-encyclopedia': 'book-ref', + 'entry-dictionary': BOOK_REF, + 'entry-encyclopedia': BOOK_REF, // "figure" // "graphic" // "interview" @@ -31,19 +36,19 @@ export function convertCSLJSON (source) { // "motion_picture" // "musical_score" // "pamphlet" - 'paper-conference': 'conference-paper-ref', - 'patent': 'patent-ref', + 'paper-conference': CONFERENCE_PAPER_REF, + 'patent': PATENT_REF, // "post" // "post-weblog" // "personal_communication" - 'report': 'report-ref', + 'report': REPORT_REF, // "review" // "review-book" // "song" // "speech" - 'thesis': 'thesis-ref', + 'thesis': THESIS_REF, // "treaty" - 'webpage': 'webpage-ref' + 'webpage': WEBPAGE_REF // NA : "software" }
7
diff --git a/lib/console_web/controllers/router/device_controller.ex b/lib/console_web/controllers/router/device_controller.ex @@ -127,57 +127,57 @@ defmodule ConsoleWeb.Router.DeviceController do end) end - # organization = Organizations.get_organization(device.organization_id) - # if organization.dc_balance_nonce == event["dc"]["nonce"] do - # {:ok, organization} = Organizations.update_organization(organization, %{ "dc_balance" => event["dc"]["balance"] }) - # - # if organization.automatic_charge_amount != nil - # and organization.automatic_payment_method != nil - # and organization.dc_balance < 500000 - # and not organization.pending_automatic_purchase do - # - # organization = Organizations.get_organization_and_lock_for_dc(organization.id) - # {:ok, organization} = Organizations.update_organization(organization, %{ "pending_automatic_purchase" => true }) - # - # request_body = URI.encode_query(%{ - # "customer" => organization.stripe_customer_id, - # "amount" => organization.automatic_charge_amount, - # "currency" => "usd", - # "payment_method" => organization.automatic_payment_method, - # "off_session" => "true", - # "confirm" => "true", - # }) - # - # with {:ok, stripe_response} <- HTTPoison.post("#{@stripe_api_url}/v1/payment_intents", request_body, @headers) do - # with 200 <- stripe_response.status_code do - # payment_intent = Poison.decode!(stripe_response.body) - # - # with "succeeded" <- payment_intent["status"], - # {:ok, stripe_response} <- HTTPoison.get("#{@stripe_api_url}/v1/payment_methods/#{payment_intent["payment_method"]}", @headers), - # 200 <- stripe_response.status_code do - # card = Poison.decode!(stripe_response.body) - # - # attrs = %{ - # "dc_purchased" => payment_intent["amount"] * 1000, - # "cost" => payment_intent["amount"], - # "card_type" => card["card"]["brand"], - # "last_4" => card["card"]["last4"], - # "user_id" => "Recurring Charge", - # "organization_id" => organization.id, - # "stripe_payment_id" => payment_intent["id"], - # } - # - # with {:ok, {:ok, %DcPurchase{} = dc_purchase }} <- DcPurchases.create_dc_purchase(attrs, organization) do - # organization = Organizations.get_organization!(organization.id) - # ConsoleWeb.DataCreditController.broadcast(organization, dc_purchase) - # ConsoleWeb.DataCreditController.broadcast(organization) - # ConsoleWeb.DataCreditController.broadcast_router_refill_dc_balance(organization) - # end - # end - # end - # end - # end - # end + organization = Organizations.get_organization(device.organization_id) + if organization.dc_balance_nonce == event["dc"]["nonce"] do + {:ok, organization} = Organizations.update_organization(organization, %{ "dc_balance" => event["dc"]["balance"] }) + + if organization.automatic_charge_amount != nil + and organization.automatic_payment_method != nil + and organization.dc_balance < 500000 + and not organization.pending_automatic_purchase do + + organization = Organizations.get_organization_and_lock_for_dc(organization.id) + {:ok, organization} = Organizations.update_organization(organization, %{ "pending_automatic_purchase" => true }) + + request_body = URI.encode_query(%{ + "customer" => organization.stripe_customer_id, + "amount" => organization.automatic_charge_amount, + "currency" => "usd", + "payment_method" => organization.automatic_payment_method, + "off_session" => "true", + "confirm" => "true", + }) + + with {:ok, stripe_response} <- HTTPoison.post("#{@stripe_api_url}/v1/payment_intents", request_body, @headers) do + with 200 <- stripe_response.status_code do + payment_intent = Poison.decode!(stripe_response.body) + + with "succeeded" <- payment_intent["status"], + {:ok, stripe_response} <- HTTPoison.get("#{@stripe_api_url}/v1/payment_methods/#{payment_intent["payment_method"]}", @headers), + 200 <- stripe_response.status_code do + card = Poison.decode!(stripe_response.body) + + attrs = %{ + "dc_purchased" => payment_intent["amount"] * 1000, + "cost" => payment_intent["amount"], + "card_type" => card["card"]["brand"], + "last_4" => card["card"]["last4"], + "user_id" => "Recurring Charge", + "organization_id" => organization.id, + "stripe_payment_id" => payment_intent["id"], + } + + with {:ok, {:ok, %DcPurchase{} = dc_purchase }} <- DcPurchases.create_dc_purchase(attrs, organization) do + organization = Organizations.get_organization!(organization.id) + ConsoleWeb.DataCreditController.broadcast(organization, dc_purchase) + ConsoleWeb.DataCreditController.broadcast(organization) + ConsoleWeb.DataCreditController.broadcast_router_refill_dc_balance(organization) + end + end + end + end + end + end conn |> send_resp(200, "")
11
diff --git a/modules/Cockpit/views/settings/info.php b/modules/Cockpit/views/settings/info.php </table> </div> - @trigger("cockpit.settings.infopage.main") + @trigger("cockpit.settings.infopage.main.menu") </div> + + @trigger("cockpit.settings.infopage.main") + </div> <div class="uk-width-medium-1-4"> <ul class="uk-nav uk-nav-side" data-uk-switcher="connect:'#settings-info'"> <li><a href="#SYSTEM">System</a></li> <li><a href="#PHP">PHP</a></li> - @trigger("cockpit.settings.infopage.aside") + @trigger("cockpit.settings.infopage.aside.menu") </ul> + @trigger("cockpit.settings.infopage.aside") </div> <script type="view/script">
13
diff --git a/lib/tests/test.js b/lib/tests/test.js @@ -243,14 +243,13 @@ class Test { } else { data = self.contracts[contractName].options.data; } - //Object.assign(self.contracts[contractName], new self.web3.eth.Contract(contract.abiDefinition, contract.deployedAddress, - // {from: self.web3.eth.defaultAccount, gas: 6000000})); Object.assign(self.contracts[contractName], new EmbarkJS.Contract({abi: contract.abiDefinition, address: contract.deployedAddress, from: self.web3.eth.defaultAccount, gas: 6000000, web3: self.web3})); self.contracts[contractName].address = contract.deployedAddress; if (self.contracts[contractName].options) { self.contracts[contractName].options.from = self.contracts[contractName].options.from || self.web3.eth.defaultAccount; self.contracts[contractName].options.data = data; + self.contracts[contractName].options.gas = 6000000; } eachCb(); }, (err) => { @@ -297,6 +296,7 @@ class Test { this.contracts[contractName] = new EmbarkJS.Contract({abi: contract.abiDefinition, address: contract.address, from: this.web3.eth.defaultAccount, gas: 6000000, web3: this.web3}); this.contracts[contractName].address = contract.address; this.contracts[contractName].options.data = contract.code; + this.contracts[contractName].options.gas = 6000000; this.web3.eth.getAccounts().then((accounts) => { this.contracts[contractName].options.from = contract.from || accounts[0]; });
12
diff --git a/articles/speech-command-recognition-with-tensorflow-and-react/index.md b/articles/speech-command-recognition-with-tensorflow-and-react/index.md @@ -74,22 +74,25 @@ const [labels, setLabels] = useState(null) They are all initialized to null value at the start. +The `useState` hook enables us to define the state variable which is way to preserve the values between the function calls. The hook method takes in a initialization parameter of any data type and returns two pair of values. One is the current state which in the code snippet above are `model`, `action`, and `labels`. And, another is the function that is use to update the state which in above code are `setModel`, `setAction`, `setLabels`. Now as an example, you can simply use the update function to update state as shown in the code snippet below: ### Load the Speech Recognizer Model Here, we are going to create a function called `loadModel` that loads the Speech Recognizer model into our app. First, a `recognizer` is initialized using the `create` method provided by the `speech` module. This loads the speech model in the app. Then, we ensure that the model is loaded using the `ensureModelLoaded` method from the `recognizer`. Then, we set the `recognizer` to `models` state and `wordLabels` in the recognizer to `labels` state. Then, we call the `loadModel` function inside the `useEffect` hook so that it is triggered when the app starts. The implementation is shown in the code snippet below: -```jsx +```javascript const loadModel = async () =>{ + // start load model const recognizer = await speech.create("BROWSER_FFT") - console.log('Model Loaded') + // check for ensure model still loaded await recognizer.ensureModelLoaded(); - console.log(recognizer.wordLabels()) + // store model instance to state setModel(recognizer) + // store command word list to state setLabels(recognizer.wordLabels()) } - useEffect(()=>{loadModel()}, []); ``` +The useEffect hook enables us to perform operations in a React component. This hook runs when the component mounts to the DOM. So, any functional calls that need to be triggered automatically when the template mounts are to be kept inside the useEffect hook. The first parameter takes in a functional callback to which we can apply any code expressions. The second parameter allows us to track the changes in the state which in turn triggers the callback. In the above code snippet, we have called the loadModel method inside the useEffect hook with no tracking state in its second parameter. Hence, the loadModel method will be trigger once the component mounts. Now, when we reload our app, we will see the model is loaded and the labels logged in the console as shown in the screenshot below: @@ -99,15 +102,18 @@ Now, when we reload our app, we will see the model is loaded and the labels logg In this step, we are going to activate our speech recognizer i.e. start listening to audio speech. For that, we are going to implement a function called `recognizeCommands`. Inside the function, we are going to listen to audio using `listen` method from the `model` state then log the `spectrogram` result of the speech. The additional option of `probabilityThreshold` is applied to improve the recognition. Lastly, we apply the `setTimeout` callback to trigger the `stopListening` method in order to stop the speech recognizer. The overall implementation is provided in the code snippet below: -```jsx +```javascript const recognizeCommands = async () => { console.log("Listening for commands"); + // start model to listening command model.listen( (result) => { + // print result console.log(result.spectrogram); }, { includeSpectrogram: true, probabilityThreshold: 0.9 } ); + // set timeout for stop working setTimeout(() => model.stopListening(), 10e3); }; ``` @@ -138,14 +144,21 @@ function argMax(arr){ The function uses `map` logic along with `reduce` method to improve the overall probability of detection. Hence, it is a Map-Reduce algorithm. +The `map` function takes in the input, converts the input into key-value pair, and sorts the data. The output of the map function is input to reduce function. + +The `reduce` function takes in the sorted key-value data from the `map` function. Then, it searches and compares the matching pair of data and reduces them. It prevents redundancy and eliminates duplicate pairs. + Now, we are going to apply the `argMax` function to our model and set the `labels` to `action` state as shown in the code snippet below: ```jsx const recognizeCommands = async () =>{ console.log('Listening for commands') + // start model to listening command model.listen(result=>{ + // add argMax function setAction(labels[argMax(Object.values(result.scores))]) }, {includeSpectrogram:true, probabilityThreshold:0.7}) + // set timeout for stop working setTimeout(()=>model.stopListening(), 10e3) } ```
1
diff --git a/site/java-tools.xml b/site/java-tools.xml @@ -149,7 +149,7 @@ bin/runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "throughput-test-5" --id "te Consumers can ack multiple messages at once, for example, 100 in this configuration: <pre class="sourcecode bash"> -bin/runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "throughput-test-6" --id "test-6" -f persistent --multiAckEvery 100 +bin/runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "throughput-test-6" --id "test-6" -f persistent --multi-ack-every 100 </pre> </p> @@ -157,7 +157,7 @@ bin/runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "throughput-test-6" --id "te <a href="/confirms.html">Consumer prefetch (QoS)</a> can be configured as well (in this example to 500): <pre class="sourcecode bash"> -bin/runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "throughput-test-7" --id "test-7" -f persistent --multiAckEvery 200 -q 500 +bin/runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "throughput-test-7" --id "test-7" -f persistent --multi-ack-every 200 -q 500 </pre> </p> @@ -189,7 +189,7 @@ bin/runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "throughput-test-11" --id "t Consumer rate can be limited as well to simulate slower consumers or create a backlog: <pre class="sourcecode bash"> -bin/runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "throughput-test-12" --id "test-12" -f persistent --rate 5000 --consumerRate 2000 +bin/runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "throughput-test-12" --id "test-12" -f persistent --rate 5000 --consumer-rate 2000 </pre> </p>
4
diff --git a/common/lib/transport/transport.ts b/common/lib/transport/transport.ts @@ -4,10 +4,10 @@ import EventEmitter from '../util/eventemitter'; import Logger from '../util/logger'; import ConnectionError from './connectionerror'; import ErrorInfo from '../types/errorinfo'; +import Auth from '../client/auth'; // TODO: replace these with the real types once these classes are in TypeScript type ConnectionManager = any; -type Auth = any; type TransportParams = any; export type TryConnectCallback = (wrappedErr: { error: ErrorInfo, event: string } | null, transport?: Transport) => void;
14
diff --git a/src/components/TopicSelector.js b/src/components/TopicSelector.js @@ -64,11 +64,7 @@ class TopicSelector extends React.Component { <PopoverMenuItem key="trending">Trending</PopoverMenuItem> <PopoverMenuItem key="created">Created</PopoverMenuItem> <PopoverMenuItem key="active">Active</PopoverMenuItem> - <PopoverMenuItem key="cashout">Cashout</PopoverMenuItem> - {/*<PopoverMenuItem key="votes">Votes</PopoverMenuItem>*/} - <PopoverMenuItem key="children">Children</PopoverMenuItem> <PopoverMenuItem key="hot">Hot</PopoverMenuItem> - <PopoverMenuItem key="comments">Comments</PopoverMenuItem> <PopoverMenuItem key="promoted">Promoted</PopoverMenuItem> </PopoverMenu> }
2
diff --git a/lib/carto/assets/visualization_assets_service.rb b/lib/carto/assets/visualization_assets_service.rb @@ -9,6 +9,7 @@ module Carto include Singleton EXTENSION = ".html".freeze + DEFAULT_MAX_SIZE_IN_BYTES = 1048576 def upload(visualization, resource) super(visualization.id, resource) @@ -43,7 +44,7 @@ module Carto configured = Cartodb.get_config(:assets, 'visualization', 'max_size_in_bytes') - @max_size_in_bytes = configured || super + @max_size_in_bytes = configured || DEFAULT_MAX_SIZE_IN_BYTES end end end
1
diff --git a/src/lib/utils/asyncStorage.js b/src/lib/utils/asyncStorage.js -import { AsyncStorage } from 'react-native' +import AsyncStorage from '@react-native-community/async-storage' +import { isFunction } from 'lodash' export default new class { constructor(storageApi) { this.storageApi = storageApi + + return new Proxy(this, { + get: (target, property) => { + const { storageApi } = target + let propertyValue + let propertyTarget = storageApi + + if (['get', 'set'].some(prefix => property.startsWith(prefix))) { + propertyTarget = this + } + + propertyValue = propertyTarget[property] + + if (isFunction(propertyValue)) { + propertyValue = propertyValue.bind(propertyTarget) + } + + return propertyValue + }, + }) } async setItem(key, value) { - try { const stringified = JSON.stringify(value) + await this.storageApi.setItem(key, stringified) - } catch (err) { - return err - } } async getItem(key) { - try { const jsonValue = await this.storageApi.getItem(key) - if (jsonValue !== null) { - return JSON.parse(jsonValue) - } + if (jsonValue === null) { return null - } catch (err) { - return err - } } - async removeItem(key) { try { - await this.storageApi.removeItem(key) - } catch (err) { - return err - } - } - - async clear() { - try { - await this.storageApi.clear() - } catch (err) { - return err + return JSON.parse(jsonValue) + } catch { + return } } }(AsyncStorage)
7
diff --git a/packages/app/src/components/Admin/ExportArchiveData/ArchiveFilesTableMenu.jsx b/packages/app/src/components/Admin/ExportArchiveData/ArchiveFilesTableMenu.jsx import React from 'react'; + import PropTypes from 'prop-types'; -import { withTranslation } from 'react-i18next'; +import { useTranslation } from 'react-i18next'; -import { withUnstatedContainers } from '../../UnstatedUtils'; import AppContainer from '~/client/services/AppContainer'; + +import { withUnstatedContainers } from '../../UnstatedUtils'; // import { toastSuccess, toastError } from '~/client/util/apiNotification'; class ArchiveFilesTableMenu extends React.Component { @@ -38,9 +40,15 @@ ArchiveFilesTableMenu.propTypes = { onZipFileStatRemove: PropTypes.func.isRequired, }; +const ArchiveFilesTableMenuWrapperFc = (props) => { + const { t } = useTranslation(); + + return <ArchiveFilesTableMenu t={t} {...props} />; +}; + /** * Wrapper component for using unstated */ -const ArchiveFilesTableMenuWrapper = withUnstatedContainers(ArchiveFilesTableMenu, [AppContainer]); +const ArchiveFilesTableMenuWrapper = withUnstatedContainers(ArchiveFilesTableMenuWrapperFc, [AppContainer]); -export default withTranslation()(ArchiveFilesTableMenuWrapper); +export default ArchiveFilesTableMenuWrapper;
14
diff --git a/docs/en/platform/turtlebot3/opencr_setup.md b/docs/en/platform/turtlebot3/opencr_setup.md @@ -29,8 +29,8 @@ sidebar: {% capture notice_01 %} **NOTE**: You can choose one of methods for uploading firmware. But we highly recommend to use **shell script**. If you need to modify TurtleBot3's firmware, you can use the second method. -- Method #1: [**Shell Script**][shell_script], upload the pre-built binary file using the shell script. -- Method #2: [**Arduino IDE**][arduino_ide], build the provided source code and upload the generated binary file using the Arduino IDE. +- Method #1: [**Shell Script**](#shell-script), upload the pre-built binary file using the shell script. +- Method #2: [**Arduino IDE**](#arduino_ide), build the provided source code and upload the generated binary file using the Arduino IDE. {% endcapture %} <div class="notice--info">{{ notice_01 | markdownify }}</div> @@ -109,6 +109,4 @@ You can use `PUSH SW 1` and `PUSH SW 2` buttons to see whether your robot has be 4. Press and hold `PUSH SW 2` for a few seconds to command the robot to rotate 180 degrees in place. [opencr]: /docs/en/parts/controller/opencr10/ -[shell_script]: #shell-script -[arduino_ide]: #arduino-ide [install_arduino_ide_for_opencr]: /docs/en/parts/controller/opencr10/#arduino-ide
1
diff --git a/app/services/carto/user_metadata_export_service.rb b/app/services/carto/user_metadata_export_service.rb @@ -324,8 +324,7 @@ module Carto def should_skip_canonical_viz_export(viz) return true if viz.table.nil? - viz.user.visualizations.where(user_id: viz.user.id, - type: viz.type, + viz.user.visualizations.where(type: viz.type, name: viz.name).all.sort_by(&:updated_at).last.id != viz.id end
2
diff --git a/src/client/js/components/PageDuplicateModal.jsx b/src/client/js/components/PageDuplicateModal.jsx @@ -31,6 +31,8 @@ const PageDuplicateModal = (props) => { * @param {string} value */ function ppacInputChangeHandler(value) { + setErrorCode(null); + setErrorMessage(null); setPageNameInput(value); } @@ -39,6 +41,8 @@ const PageDuplicateModal = (props) => { * @param {string} value */ function inputChangeHandler(value) { + setErrorCode(null); + setErrorMessage(null); setPageNameInput(value); }
7
diff --git a/src/context/useGenerateTest.jsx b/src/context/useGenerateTest.jsx @@ -931,6 +931,11 @@ function useGenerateTest(test, projectFilePath) { testFileCode += ` it('${itStatements.byId[itId].text}', (done) => {` + if(itStatements.byId[itId].catTag !== '') { + testFileCode += ` + options.runOnly.value.push('cat.${itStatements.byId[itId].catTag}')` + } + if (accTestCase.testType === 'react') { testFileCode += ` axe.run(linkNode, options, async (err, results) => {`
3
diff --git a/packages/vue/src/components/molecules/SfModal/SfModal.js b/packages/vue/src/components/molecules/SfModal/SfModal.js @@ -4,7 +4,7 @@ export default { name: "SfModal", model: { prop: "visible", - event: "toggle" + event: "close" }, props: { /** @@ -52,7 +52,7 @@ export default { }, methods: { close() { - this.$emit("toggle", false); + this.$emit("close", false); }, checkPersistence() { if (!this.persistent) {
10
diff --git a/lib/Runtime/Library/JavascriptFunction.cpp b/lib/Runtime/Library/JavascriptFunction.cpp @@ -2289,7 +2289,7 @@ void __cdecl _alloca_probe_16() } else if (isWasmOnly) { - JavascriptError::ThrowWebAssemblyRuntimeError(func->GetScriptContext(), JSERR_InvalidTypedArrayIndex); + JavascriptError::ThrowWebAssemblyRuntimeError(func->GetScriptContext(), WASMERR_ArrayIndexOutOfRange); } // SIMD loads/stores do bounds checks.
4
diff --git a/brownie-config.yaml b/brownie-config.yaml @@ -29,7 +29,7 @@ networks: cmd_settings: port: 443 gas_limit: 6800000 - gas_price: 69000010 # 25000000000 25 GWEI + gas_price: 66000010 # 25000000000 25 GWEI reverting_tx_gas_limit: false default_contract_owner: false
13
diff --git a/lib/proxy.es b/lib/proxy.es @@ -173,11 +173,21 @@ class Proxy extends EventEmitter { req.headers['connection'] = 'close' const parsed = url.parse(req.url) const isGameApi = parsed.pathname.startsWith('/kcsapi') - if (isGameApi && serverList[parsed.hostname] && currentServer !== serverList[parsed.hostname].num) { + if (isGameApi) { + if (serverList[parsed.hostname] && currentServer !== serverList[parsed.hostname].num) { currentServer = serverList[parsed.hostname].num - this.emit('network.get.server', Object.assign(serverList[parsed.hostname], { + this.emit('network.get.server', Object.assign({}, serverList[parsed.hostname], { ip: parsed.hostname, })) + } else { + currentServer = -1 + this.emit('network.get.server', Object.assign({ + num: -1, + name: '__UNKNOWN', + }, { + ip: parsed.hostname, + })) + } } let cacheFile = null if (isStaticResource(parsed.pathname, parsed.hostname)) {
9
diff --git a/userscript.user.js b/userscript.user.js @@ -11193,6 +11193,8 @@ var $$IMU_EXPORT$$; // https://i.imgur.com/ajsLfCal.jpg // https://i.imgur.com/ajsLfCa_d.jpg?maxwidth=520&shape=thumb&fidelity=high // https://i.imgur.com/ajsLfCa.jpg + // https://i.imgur.com/ajsLfCa.mp4 + // ?fb, ?fbplay both scale down the image too // h, r, l, g, m, t, b, s if (src.match(/\/removed\.[a-zA-Z]+(?:[?#].*)?$/)) @@ -11202,7 +11204,7 @@ var $$IMU_EXPORT$$; }; obj = { - url: src, + url: src.replace(/\?.*/, ""), headers: { Referer: null }, @@ -11231,6 +11233,9 @@ var $$IMU_EXPORT$$; } if (options && options.cb && options.do_request && obj.extra) { + var cache_key = "imgur:" + obj.extra.page; + + api_cache.fetch(cache_key, options.cb, function(done) { options.do_request({ url: obj.extra.page, method: "GET", @@ -11239,12 +11244,24 @@ var $$IMU_EXPORT$$; return; if (resp.status !== 200) - return options.cb(obj); + return done(obj, false); + + // Try video first, then image + var ogmatch = resp.responseText.match(/<meta\s+property=["']og:video["']\s+content=["'](.*?)["']/); + if (ogmatch) { + obj.url = decode_entities(ogmatch[1]).replace(/\?.*/, ""); + } else { + ogmatch = resp.responseText.match(/<meta\s+property=["']og:image["']\s+content=["'](.*?)["']/); + if (ogmatch) { + obj.url = decode_entities(ogmatch[1]).replace(/\?.*/, ""); + } + } var match = resp.responseText.match(/\.\s*mergeConfig\s*\(\s*["']gallery["']\s*,\s*{[\s\S]+?image\s*:\s*({.*?})\s*,\s*\n/); if (!match) { - console.warn("Unable to find match for Imgur page"); - return options.cb(obj); + console.warn("Unable to find match for Imgur page (maybe it's NSFW and you aren't logged in?)"); + //console.log(resp.responseText); + return done(obj, false); } try { @@ -11254,7 +11271,7 @@ var $$IMU_EXPORT$$; if (json.hash && json.ext) { realfilename = json.hash + json.ext; - var origfilename = src.replace(/.*\/(.*?)(?:[?#].*)?$/, "$1"); + var origfilename = obj.url.replace(/.*\/(.*?)(?:[?#].*)?$/, "$1"); if (realfilename !== origfilename) { obj.url = "https://i.imgur.com/" + realfilename; } @@ -11270,9 +11287,10 @@ var $$IMU_EXPORT$$; console.log(match); } - return options.cb(obj); + return done(obj, 6*60*60); } }); + }); return { waiting: true
7
diff --git a/app/components/user/graphql/GraphQLExplorerConsoleResultsViewer.js b/app/components/user/graphql/GraphQLExplorerConsoleResultsViewer.js @@ -5,10 +5,8 @@ import Loadable from "react-loadable"; class GraphQLExplorerConsoleResultsViewer extends React.PureComponent { componentDidMount() { - const { CodeMirror } = this.props; - - this.resultsCodeMirror = CodeMirror(this.resultsElement, { - value: "", + this.resultsCodeMirror = this.props.CodeMirror(this.resultsElement, { + value: this.props.results || "", theme: "graphql", mode: "graphql-results", readOnly: true @@ -21,9 +19,15 @@ class GraphQLExplorerConsoleResultsViewer extends React.PureComponent { } } + componentDidUpdate(prevProps) { + if (this.props.results != prevProps.results) { + this.resultsCodeMirror.setValue(this.props.results); + } + } + render() { return ( - <div ref={(el) => this.resultsElement = el} /> + <div ref={(el) => this.resultsElement = el} className={this.props.className} style={this.props.style} /> ); } } @@ -49,10 +53,6 @@ export default Loadable.Map({ return ( <div>{props.error}</div> ); - } else if (props.pastDelay) { - return ( - <div>Loading...</div> - ); } else { return null; } @@ -60,7 +60,12 @@ export default Loadable.Map({ render(loaded, props) { return ( - <GraphQLExplorerConsoleResultsViewer CodeMirror={loaded.CodeMirror} /> + <GraphQLExplorerConsoleResultsViewer + CodeMirror={loaded.CodeMirror} + results={props.results} + className={props.className} + style={props.style} + /> ); } });
11
diff --git a/edit.js b/edit.js @@ -5145,16 +5145,6 @@ const _collideChunk = matrix => { currentChunkMesh && currentChunkMesh.update(localVector3); }; -const cubeMesh = (() => { - const geometry = new THREE.BoxBufferGeometry(0.02, 0.02, 0.02); - const material = new THREE.MeshBasicMaterial({ - color: 0x00FF00, - }); - return new THREE.Mesh(geometry, material); -})(); -cubeMesh.frustumCulled = false; -scene.add(cubeMesh); - const PEEK_FACES = { FRONT: 1, BACK: 2, @@ -5251,7 +5241,6 @@ function animate(timestamp, frame) { raycastChunkSpec.normal = new THREE.Vector3().fromArray(raycastChunkSpec.normal); raycastChunkSpec.objectPosition = new THREE.Vector3().fromArray(raycastChunkSpec.objectPosition); raycastChunkSpec.objectQuaternion = new THREE.Quaternion().fromArray(raycastChunkSpec.objectQuaternion); - cubeMesh.position.copy(raycastChunkSpec.point); } }
2
diff --git a/site/content/docs/5.2/getting-started/browsers-devices.md b/site/content/docs/5.2/getting-started/browsers-devices.md @@ -30,7 +30,7 @@ Generally speaking, Bootstrap supports the latest versions of each major platfor | | Chrome | Firefox | Safari | Android Browser &amp; WebView | | --- | --- | --- | --- | --- | | **Android** | Supported | Supported | <span class="text-muted">&mdash;</span> | v6.0+ | -| **Windows** | Supported | Supported | Supported | <span class="text-muted">&mdash;</span> | +| **iOS** | Supported | Supported | Supported | <span class="text-muted">&mdash;</span> | {{< /bs-table >}} ### Desktop browsers
14
diff --git a/userscript.user.js b/userscript.user.js @@ -30425,7 +30425,23 @@ var $$IMU_EXPORT$$; waitingel.style.cursor = "wait"; waitingel.style.width = waitingsize + "px"; waitingel.style.height = waitingsize + "px"; + //waitingel.style.pointerEvents = "none"; // works, but defeats the purpose, because the cursor isn't changed waitingel.style.position = "fixed";//"absolute"; + + var simevent = function(e, eventtype) { + waitingel.style.display = "none"; + document.elementFromPoint(e.clientX, e.clientY).dispatchEvent(new MouseEvent(eventtype, e)); + waitingel.style.display = "block"; + }; + + waitingel.addEventListener("click", function(e) { + return simevent(e, "click"); + }); + + waitingel.addEventListener("contextmenu", function(e) { + return simevent(e, "contextmenu"); + }); + document.documentElement.appendChild(waitingel); }
11
diff --git a/public/javascripts/SVLabel/lib/animate.css b/public/javascripts/SVLabel/lib/animate.css @@ -1186,6 +1186,10 @@ Copyright (c) 2015 Daniel Eden .fadeIn { -webkit-animation-name: fadeIn; animation-name: fadeIn; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + animation-duration: 0.7s; } @-webkit-keyframes fadeInDown { @@ -1219,6 +1223,10 @@ Copyright (c) 2015 Daniel Eden .fadeInDown { -webkit-animation-name: fadeInDown; animation-name: fadeInDown; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + animation-duration: 0.7s; } @-webkit-keyframes fadeInDownBig { @@ -1285,6 +1293,10 @@ Copyright (c) 2015 Daniel Eden .fadeInLeft { -webkit-animation-name: fadeInLeft; animation-name: fadeInLeft; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + animation-duration: 0.7s; } @-webkit-keyframes fadeInLeftBig { @@ -1351,6 +1363,10 @@ Copyright (c) 2015 Daniel Eden .fadeInRight { -webkit-animation-name: fadeInRight; animation-name: fadeInRight; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + animation-duration: 0.7s; } @-webkit-keyframes fadeInRightBig { @@ -1417,6 +1433,10 @@ Copyright (c) 2015 Daniel Eden .fadeInUp { -webkit-animation-name: fadeInUp; animation-name: fadeInUp; + -webkit-animation-duration: 0.7s; + -moz-animation-duration: 0.7s; + -o-animation-duration: 0.7s; + animation-duration: 0.7s; } @-webkit-keyframes fadeInUpBig {
3
diff --git a/src/plug-ins/DebounceSearchRender.js b/src/plug-ins/DebounceSearchRender.js @@ -63,6 +63,7 @@ class _DebounceTableSearch extends React.Component { } }; + render() { const { classes, options, onHide, searchText, debounceWait } = this.props; @@ -70,6 +71,9 @@ class _DebounceTableSearch extends React.Component { this.props.onSearch(value); }, debounceWait); + const clearIconVisibility = options.searchAlwaysOpen ? 'hidden' : 'visible'; + + return ( <Grow appear in={true} timeout={300}> <div className={classes.main}> @@ -89,7 +93,7 @@ class _DebounceTableSearch extends React.Component { placeholder={options.searchPlaceholder} {...(options.searchProps ? options.searchProps : {})} /> - <IconButton className={classes.clearIcon} onClick={onHide}> + <IconButton className={classes.clearIcon} style={{ visibility: clearIconVisibility }} onClick={onHide}> <ClearIcon /> </IconButton> </div>
1
diff --git a/includes/Modules/Search_Console.php b/includes/Modules/Search_Console.php @@ -381,21 +381,26 @@ final class Search_Console extends Module implements Module_With_Screen, Module_ if ( false === $has_data ) { // Check search console for data. - $responses = $this->get_batch_data( - array( - new Data_Request( - 'GET', - 'modules', - $this->slug, - 'searchanalytics', + $datasets = array( array( + 'identifier' => $this->slug, + 'key' => 'sc-site-analytics', + 'datapoint' => 'searchanalytics', + 'data' => array( 'url' => $current_url, 'dateRange' => 'last-90-days', 'dimensions' => 'date', 'compareDateRanges' => true, ), - 'sc-site-analytics' ), + ); + + $responses = $this->get_batch_data( + array_map( + function( $dataset ) { + return (object) $dataset; + }, + $datasets ) );
13
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml @@ -118,6 +118,8 @@ buildtest:search-with-index-cache: services: - docker:dind variables: + # allow openssl 1.02 until we upgrade builder to use node12/alpine3.9 + CRYPTOGRAPHY_ALLOW_OPENSSL_102: 1 PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache" # 2.5gb heap # unload classes we don't need @@ -184,6 +186,8 @@ buildtest:search-no-index-cache: - postgres:9.6.16 - docker:dind variables: + # allow openssl 1.02 until we upgrade builder to use node12/alpine3.9 + CRYPTOGRAPHY_ALLOW_OPENSSL_102: 1 POSTGRES_URL: "jdbc:postgresql://postgres/postgres" POSTGRES_DB: postgres POSTGRES_USER: postgres @@ -331,6 +335,8 @@ buildtest:typescript-apis-with-pg: - postgres:9.6.16 - docker:dind variables: + # allow openssl 1.02 until we upgrade builder to use node12/alpine3.9 + CRYPTOGRAPHY_ALLOW_OPENSSL_102: 1 PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache" POSTGRES_HOST: postgres POSTGRES_DB: postgres @@ -379,6 +385,8 @@ buildtest:typescript-apis-with-es: services: - docker:dind variables: + # allow openssl 1.02 until we upgrade builder to use node12/alpine3.9 + CRYPTOGRAPHY_ALLOW_OPENSSL_102: 1 PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache" TEST_ES_URL: "http://docker:9200" script: @@ -427,6 +435,8 @@ buildtest:storage-api: services: - docker:dind variables: + # allow openssl 1.02 until we upgrade builder to use node12/alpine3.9 + CRYPTOGRAPHY_ALLOW_OPENSSL_102: 1 PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache" MINIO_HOST: "docker" MINIO_PORT: "9000"
11
diff --git a/src/components/canvas-grid/index.js b/src/components/canvas-grid/index.js @@ -6,8 +6,8 @@ function CanvasGrid(props) { boxes = boxes.concat(props.grid?.map((pocket) => { const returnData = { - startX: pocket.col * 20, - startY: pocket.row * 20, + startX: pocket.col * 20 + (pocket.col * 2), + startY: pocket.row * 20 + (pocket.row * 2), horizontal: pocket.width, vertical: pocket.height, }; @@ -74,8 +74,8 @@ function CanvasGrid(props) { }; return <canvas - height = {props.height * 20 + 2} - width = {props.width * 20 + 2} + height = {props.height * 22} + width = {props.width * 22} ref={canvas} ></canvas>; }
7
diff --git a/data.js b/data.js @@ -5292,5 +5292,13 @@ module.exports = [ description: "1kb JavaScript Virtual DOM builder and patch algorithm.", url: "https://github.com/picodom/picodom", source: "https://unpkg.com/picodom" + }, + { + name: "xPrototype", + github: "reduardo7/xPrototype", + tags: ["javascript", "prototype", "extend", "object", "quick", "simple", "nojquery", "loop", "browser", "chrome", "firefox"], + description: "xPrototype is a fast, small and feature-rich JavaScript library. It makes things like for loop, for each, time out / interval, data types, sort / order, conversion, clone object, extend object, string manipulation much simpler with an easy-to-use API that works across a multitude of browsers and platforms.", + url: "https://github.com/reduardo7/xPrototype", + source: "https://raw.githubusercontent.com/reduardo7/xPrototype/master/xprototype.js" } ];
0
diff --git a/node-binance-api.js b/node-binance-api.js @@ -2973,13 +2973,17 @@ let api = function Binance( options = {} ) { /** * Gets the status of an order * @param {string} symbol - the symbol to check - * @param {string} orderid - the orderid to check + * @param {string} orderid - the orderid to check if !orderid then use flags to search * @param {function} callback - the callback function * @param {object} flags - any additional flags * @return {promise or undefined} - omitting the callback returns a promise */ orderStatus: function ( symbol, orderid, callback, flags = {} ) { - let parameters = Object.assign( { symbol: symbol, orderId: orderid }, flags ); + let parameters = Object.assign( { symbol: symbol }, flags ); + if (orderid){ + Object.assign( { orderId: orderid }, parameters ) + } + if ( !callback ) { return new Promise( ( resolve, reject ) => { callback = ( error, response ) => {
12
diff --git a/site/src/constants/config/home/web.js b/site/src/constants/config/home/web.js @@ -64,7 +64,7 @@ export default { { image: { src: 'images/rocket.png', - alt: 'Data-driven UIs', + alt: 'Launch and iterate faster', }, title: 'Launch and iterate faster', description: @@ -74,7 +74,7 @@ export default { { image: { src: 'icons/1.png', - alt: 'Data-driven UIs', + alt: 'Works with existing UIs', }, title: 'Works with existing UIs', description: 'Already have your own components? Bring them to ReactiveSearch.', @@ -83,7 +83,7 @@ export default { { image: { src: 'icons/2.png', - alt: 'Data-driven UIs', + alt: 'Configurable styles', }, title: 'Configurable styles', description: 'Styled components with rich theming and CSS class-injection support.', @@ -92,7 +92,7 @@ export default { { image: { src: 'icons/3.png', - alt: 'Data-driven UIs', + alt: 'Create cross-platform apps', }, title: 'Create cross-platform apps', description: 'Reactivesearch components can be ported to create native mobile UIs.', @@ -101,7 +101,7 @@ export default { { image: { src: 'icons/4.png', - alt: 'Data-driven UIs', + alt: 'Elasticsearch compatible', }, title: 'Elasticsearch compatible', description: 'Connect to an ES index hosted anywhere. Supports v2, v5 and v6.', @@ -110,7 +110,7 @@ export default { { image: { src: 'icons/5.png', - alt: 'Data-driven UIs', + alt: 'Customizable queries', }, title: 'Customizable queries', description:
3
diff --git a/src/kiri-mode/cam/client.js b/src/kiri-mode/cam/client.js @@ -15,6 +15,7 @@ const { CAM } = driver; let isAnimate, isArrange, isCamMode, + isIndexed, isParsed, camStock, camZBottom, @@ -64,7 +65,9 @@ CAM.init = function(kiri, api) { } function setAnimationStyle(settings) { - animVer = settings.process.camStockIndexed ? 1 : 0; + isIndexed = settings.process.camStockIndexed; + animVer = isIndexed ? 1 : 0; + updateStock(); } // wire up animate button in ui @@ -1629,6 +1632,9 @@ function updateStock(args, event) { camStock.position.x = csox; camStock.position.y = csoy; camStock.position.z = csz / 2; + if (isIndexed) { + camStock.position.z = 0; + } delta = csz - topZ; } else if (camStock) { SPACE.world.remove(camStock); @@ -1666,17 +1672,19 @@ function updateStock(args, event) { if (x && y && z && !STACKS.getStack('bounds')) { const render = new kiri.Layers().setLayer('bounds', { face: 0xaaaaaa, line: 0xaaaaaa }); const stack = STACKS.setFreeMem(false).create('bounds', SPACE.world); - stack.add(render.addPolys([ - newPolygon().centerRectangle({x:csox, y:csoy, z:0}, x, y), - newPolygon().centerRectangle({x:csox, y:csoy, z}, x, y) - ], { thin: true } )); const hx = x/2, hy = y/2; const sz = stock.z || 0; + const zm = isIndexed ? -sz / 2 : 0; + const zM = isIndexed ? sz / 2 : sz; + stack.add(render.addPolys([ + newPolygon().centerRectangle({x:csox, y:csoy, z:zm}, x, y), + newPolygon().centerRectangle({x:csox, y:csoy, z:zM}, x, y) + ], { thin: true } )); stack.add(render.addLines([ - newPoint(csox + hx, csoy - hy, 0), newPoint(csox + hx, csoy - hy, sz), - newPoint(csox + hx, csoy + hy, 0), newPoint(csox + hx, csoy + hy, sz), - newPoint(csox - hx, csoy - hy, 0), newPoint(csox - hx, csoy - hy, sz), - newPoint(csox - hx, csoy + hy, 0), newPoint(csox - hx, csoy + hy, sz), + newPoint(csox + hx, csoy - hy, zm), newPoint(csox + hx, csoy - hy, zM), + newPoint(csox + hx, csoy + hy, zm), newPoint(csox + hx, csoy + hy, zM), + newPoint(csox - hx, csoy - hy, zm), newPoint(csox - hx, csoy - hy, zM), + newPoint(csox - hx, csoy + hy, zm), newPoint(csox - hx, csoy + hy, zM), ], { thin: true })); STACKS.setFreeMem(true); }
3
diff --git a/templates/master/elasticsearch/kibana/Dashboards.js b/templates/master/elasticsearch/kibana/Dashboards.js @@ -48,7 +48,7 @@ module.exports=[ }, { "col": 1, - "id": "Logged-Utterances", + "id": "Utterances", "panelIndex": 7, "row": 5, "size_x": 6,
3
diff --git a/source/dom/Element.js b/source/dom/Element.js import { Binding } from '../_codependent/_Binding.js'; import { View } from '../_codependent/_View.js'; -import { didError } from '../foundation/RunLoop.js'; import { browser } from '../ua/UA.js'; import { ViewEventsController } from '../views/ViewEventsController.js'; @@ -418,25 +417,7 @@ const setStyle = function (el, style, value) { if (typeof value === 'number' && !cssNoPx[style]) { value += 'px'; } - // IE will throw an error if you try to set an invalid value for a - // style. - try { el.style[style] = value; - } catch (error) { - didError({ - name: 'Element#setStyle', - message: 'Invalid value set', - details: - 'Style: ' + - style + - '\nValue: ' + - value + - '\nEl id: ' + - el.id + - '\nEl class: ' + - el.className, - }); - } } return this; };
2
diff --git a/lib/core/provider.js b/lib/core/provider.js @@ -12,7 +12,6 @@ class Provider { this.logger = options.logger; this.engine = new ProviderEngine(); this.asyncMethods = {}; - this.syncMethods = {}; this.engine.addProvider(new RpcSubprovider({ rpcUrl: options.web3Endpoint @@ -44,9 +43,6 @@ class Provider { this.asyncMethods = { eth_accounts: self.eth_accounts.bind(this) }; - this.syncMethods = { - eth_accounts: self.eth_accounts_sync.bind(this) - }; } } @@ -90,10 +86,6 @@ class Provider { return cb(null, this.addresses); } - eth_accounts_sync() { - return this.addresses; - } - sendAsync(payload, callback) { let method = this.asyncMethods[payload.method]; if (method) { @@ -108,11 +100,7 @@ class Provider { this.engine.sendAsync.apply(this.engine, arguments); } - send(payload) { - let method = this.syncMethods[payload.method]; - if (method) { - return method.call(method, payload); // TODO check if that makes sense - } + send() { return this.engine.send.apply(this.engine, arguments); } }
2
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file. -## Head +## 14.3.0 - Added: support for `meta.url` to rules and plugins ([#5845](https://github.com/stylelint/stylelint/pull/5845)). - Added: hyperlinks for rules to terminal output ([#5835](https://github.com/stylelint/stylelint/pull/5835)).
6
diff --git a/jspdf.js b/jspdf.js @@ -2064,7 +2064,7 @@ var jsPDF = (function(global) { * @param {"simple"|"transforms"} mode * @returns {jsPDF} */ - API.setAPIMode = function(mode) { + API.setApiMode = function(mode) { if (apiMode === ApiMode.SIMPLE && mode === ApiMode.TRANSFORMS) { // prepend global change of basis matrix // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix
10
diff --git a/src/rules/state.c b/src/rules/state.c @@ -1118,7 +1118,7 @@ unsigned int getNextResult(void *tree, static void insertSortProperties(jsonObject *jo, jsonProperty **properties) { for (unsigned short i = 1; i < jo->propertiesLength; ++i) { unsigned short ii = i; - while (properties[ii]->hash < properties[ii - 1]->hash) { + while (ii >= 1 && (properties[ii]->hash < properties[ii - 1]->hash)) { jsonProperty *temp = properties[ii]; properties[ii] = properties[ii - 1]; properties[ii - 1] = temp;
0
diff --git a/stylesheets/styles.css b/stylesheets/styles.css @@ -652,6 +652,7 @@ button { position: fixed; width: 100%; z-index: 1; + pointer-events: none; } @@ -663,6 +664,10 @@ button { font-family: Typewriter; } +#footer tr td div { + pointer-events: all !important; +} + #progress { width: 98%; background-color: #A3A3A3;
11
diff --git a/examples/src/comp/online-edit/code-sand-box/index.jsx b/examples/src/comp/online-edit/code-sand-box/index.jsx @@ -38,9 +38,13 @@ Vue.config.productionTip = false; // import default theme import "vue-easytable/libs/theme-default/index.css"; + // import vue-easytable library import VueEasytable from "vue-easytable"; +// for online edit +import "vue-easytable/libs/font/iconfont.css"; + Vue.use(VueEasytable); new Vue({
1
diff --git a/generators/entity/index.js b/generators/entity/index.js @@ -688,9 +688,13 @@ class EntityGenerator extends BaseBlueprintGenerator { const entityNamePluralizedAndSpinalCased = _.kebabCase(pluralize(entityName)); context.entityClass = context.entityNameCapitalized; - context.entityClassHumanized = _.startCase(context.entityNameCapitalized); context.entityClassPlural = pluralize(context.entityClass); - context.entityClassPluralHumanized = _.startCase(context.entityClassPlural); + + const fileData = this.data || this.context.fileData; + // Used for i18n + context.entityClassHumanized = fileData.entityClassHumanized || _.startCase(context.entityNameCapitalized); + context.entityClassPluralHumanized = fileData.entityClassPluralHumanized || _.startCase(context.entityClassPlural); + context.entityInstance = _.lowerFirst(entityName); context.entityInstancePlural = pluralize(context.entityInstance); context.entityApiUrl = entityNamePluralizedAndSpinalCased;
11
diff --git a/package.json b/package.json "scripts": { "test": "jest", "dev": "webpack --progress --colors --watch --mode=development", - "devdeploy": "webpack --progress --colors --mode=development", "prod": "webpack --progress --colors --mode=production", "start": "webpack-dev-server -d --progress --mode=development", "lint": "eslint ./vis/js/components/*.js"
2
diff --git a/src/platform/web/ThemeLoader.ts b/src/platform/web/ThemeLoader.ts @@ -73,14 +73,14 @@ export class ThemeLoader { } } - setTheme(themeName: string, log?: ILogItem) { - this._platform.logger.wrapOrRun(log, {l: "change theme", id: themeName}, () => { - const themeLocation = this._findThemeLocationFromId(themeName); + setTheme(themeId: string, log?: ILogItem) { + this._platform.logger.wrapOrRun(log, {l: "change theme", id: themeId}, () => { + const themeLocation = this._findThemeLocationFromId(themeId); if (!themeLocation) { - throw new Error( `Cannot find theme location for theme "${themeName}"!`); + throw new Error( `Cannot find theme location for theme "${themeId}"!`); } this._platform.replaceStylesheet(themeLocation); - this._platform.settingsStorage.setString("theme", themeName); + this._platform.settingsStorage.setString("theme", themeId); }); }
10
diff --git a/source/indexer/test/Indexer.js b/source/indexer/test/Indexer.js @@ -406,7 +406,9 @@ contract('Indexer', async ([ownerAddress, aliceAddress, bobAddress]) => { }) it('Deploy a whitelisted delegate for alice', async () => { - let tx = await delegateFactory.createDelegate(aliceAddress, aliceAddress) + let tx = await delegateFactory.createDelegate(aliceAddress, { + from: aliceAddress, + }) passes(tx) let whitelistedDelegate
3
diff --git a/assets/js/googlesitekit/modules/datastore/settings.test.js b/assets/js/googlesitekit/modules/datastore/settings.test.js @@ -65,18 +65,16 @@ describe( 'core/modules store changes', () => { } ); describe( 'selectors', () => { - describe( 'isDoingSubmitChanges', () => { + describe( 'submitting changes', () => { it( 'is submitting changes', async () => { expect( registry.select( STORE_NAME ).isDoingSubmitChanges( nonExistentModuleSlug ) ).toBe( false ); // @TODO select( `modules/${ slug }` ) returns false when called via the test - expect( registry.select( STORE_NAME ).isDoingSubmitChanges( moduleStoreName ) ).toBe( false ); + expect( registry.select( STORE_NAME ).isDoingSubmitChanges( slug ) ).toBe( false ); submittingChanges = true; - expect( registry.select( STORE_NAME ).isDoingSubmitChanges( moduleStoreName ) ).toBe( true ); - } ); + expect( registry.select( STORE_NAME ).isDoingSubmitChanges( slug ) ).toBe( true ); } ); - describe( 'submits changes', () => { it( 'can submit changes', () => { expect( registry.select( STORE_NAME ).canSubmitChanges( slug ) ).toBe( false ); moduleCanSubmitChanges = true;
14
diff --git a/system/exec.go b/system/exec.go package system import ( + "io" "os/exec" "github.com/sirupsen/logrus" @@ -16,8 +17,28 @@ func RunOSCommand(cmd *exec.Cmd, logger *logrus.Logger) error { "Env": cmd.Env, }).Debug("Running Command") outputWriter := logger.Writer() - defer outputWriter.Close() - cmd.Stdout = outputWriter - cmd.Stderr = outputWriter + cmdErr := RunAndCaptureOSCommand(cmd, + outputWriter, + outputWriter, + logger) + outputWriter.Close() + return cmdErr +} + +// RunAndCaptureOSCommand runs the given command and +// captures the stdout and stderr +func RunAndCaptureOSCommand(cmd *exec.Cmd, + stdoutWriter io.Writer, + stderrWriter io.Writer, + logger *logrus.Logger) error { + logger.WithFields(logrus.Fields{ + "Arguments": cmd.Args, + "Dir": cmd.Dir, + "Path": cmd.Path, + "Env": cmd.Env, + }).Debug("Running Command") + cmd.Stdout = stdoutWriter + cmd.Stderr = stderrWriter return cmd.Run() + }
0
diff --git a/lib/assets/core/javascripts/cartodb3/editor/layers/layer-content-views/analyses/data-observatory-metadata.js b/lib/assets/core/javascripts/cartodb3/editor/layers/layer-content-views/analyses/data-observatory-metadata.js @@ -10,7 +10,7 @@ function getQueryForGeometryType (geometryType) { aggregate_type = 'sum'; } - return QUERY.replace("'{{aggregate_type}}'", aggregate_type); + return QUERY.replace("{{aggregate_type}}", aggregate_type); } /**
2
diff --git a/styles/modules/modals/_moderatorDetails.scss b/styles/modules/modals/_moderatorDetails.scss .moderatorDetails { - .contentBox.mDetailBox { + .contentBox.mDetailWrapper { min-height: 90px; + & > .mDetail, + & > .verifiedWrapper { + min-width: 20%; + flex-grow: 1; + } + + & > .mDetail > * { + max-width: 100%; + overflow: hidden; + } + .verifiedWrapper { display: flex; align-self: stretch; - flex-grow: 1; flex-shrink: 0; flex-direction: column; justify-content: center; text-align: center; border-width: 1px; border-style: solid; + padding: $pad; .verifiedMod { display: block;
12
diff --git a/tests/phpunit/integration/Core/Modules/REST_Dashboard_Sharing_ControllerTest.php b/tests/phpunit/integration/Core/Modules/REST_Dashboard_Sharing_ControllerTest.php @@ -102,6 +102,8 @@ class REST_Dashboard_Sharing_ControllerTest extends TestCase { ) ); $response = rest_get_server()->dispatch( $request ); + // This admin hasn't authenticated with the Site Kit proxy service yet, + // so they aren't allowed to modify Dashboard Sharing settings. $this->assertEquals( 'rest_forbidden', $response->get_data()['code'] ); } @@ -146,7 +148,7 @@ class REST_Dashboard_Sharing_ControllerTest extends TestCase { 'management' => 'all_admins', ), ), - 'newOwnerIDs' => (object) array( + 'newOwnerIDs' => array( // ownerID should be updated as settings have "changed" (added). 'pagespeed-insights' => $admin_1->ID, ), @@ -312,7 +314,7 @@ class REST_Dashboard_Sharing_ControllerTest extends TestCase { ); // Re-register Permissions after enabling the dashboardSharing feature to include dashboard sharing capabilities. - // TODO Remove this when dashboardSharing feature flag is removed. + // TODO: Remove this when `dashboardSharing` feature flag is removed. $permissions = new Permissions( $this->context, $authentication, $this->modules, $this->user_options, new Dismissed_Items( $this->user_options ) ); $permissions->register(); }
7
diff --git a/js/annotationtoolslymph/geoJSONHandler_Lymph.js b/js/annotationtoolslymph/geoJSONHandler_Lymph.js @@ -363,6 +363,7 @@ annotools.prototype.generateSVG = function (annotations) { svgHtml += '" style="fill:' + heatcolor.toString() + ';fill-opacity: ' + this.heatmap_opacity + ';stroke-width:0"/>'; break; case 'heatmap_multiple': + //console.log(annotation.properties.metric_value); if (smth_or_not) { var lym_score = smoothed; } else { @@ -384,8 +385,9 @@ annotools.prototype.generateSVG = function (annotations) { selected_heatmap = this.heatmapColor[0]; selected_opacity = this.heatmap_opacity; - - if (intersect_label[i].label != 0) { + //console.log(intersect_label); + if (intersect_label[i] != 0) { + //console.log("In inteersection"); switch (intersect_label[i].label) { case -1: svgHtml += '" style="fill:' + this.heatmapColor[4] + ';fill-opacity: ' + this.heatmap_opacity + ';stroke-width:0"/>'; @@ -396,6 +398,7 @@ annotools.prototype.generateSVG = function (annotations) { } } else { + //console.log("In heatmap loop"); if (lym_checked == true && nec_checked == false) { selected_heatmap = this.heatmapColor[lym_color_index]; //svgHtml += '" style="fill:' + this.heatmapColor[lym_color_index] + ';fill-opacity: ' + this.heatmap_opacity + ';stroke-width:0"/>'; @@ -422,6 +425,8 @@ annotools.prototype.generateSVG = function (annotations) { } svgHtml += '" style="fill:' + selected_heatmap + ';fill-opacity: ' + selected_opacity + ';stroke-width:0"/>'; + //console.log(selected_heatmap); + //console.log(lym_checked == true && nec_checked == true); /* var combo = lym_score; if (nec_score >= (1-this.heat_weight1))
1
diff --git a/src/extension/features/accounts/auto-distribute-splits/index.js b/src/extension/features/accounts/auto-distribute-splits/index.js import { Feature } from 'toolkit/extension/features/feature'; -import { getEmberView } from 'toolkit/extension/utils/ember'; +import { getCurrentRouteName } from 'toolkit/extension/utils/ynab'; const DISTRIBUTE_BUTTON_ID = 'toolkit-auto-distribute-splits-button'; @@ -21,14 +21,25 @@ export class AutoDistributeSplits extends Feature { }; } - observe(changedNodes) { - if (this.buttonShouldBePresent(changedNodes)) { + shouldInvoke() { + return getCurrentRouteName().includes('account'); + } + + invoke() { + if (this.buttonShouldBePresent()) { this.ensureButtonPresent(); } else { this.ensureButtonNotPresent(); } } + // don't really care which nodes have been changed since the feature doesn't trigger off of changed nodes but the presence of nodes. + observe() { + if (!this.shouldInvoke) return; + + this.invoke(); + } + buttonShouldBePresent() { return $('.ynab-grid-split-add-sub-transaction').length > 0; } @@ -105,7 +116,5 @@ export class AutoDistributeSplits extends Feature { : ''); $(cell).trigger('change'); }); - - getEmberView($('.ynab-grid-body-row.is-editing')[0].id).calculateSplitRemaining(); } }
1
diff --git a/publish/deployed/mainnet/owner-actions.json b/publish/deployed/mainnet/owner-actions.json -{ - "ProxySynthetix.setTarget(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)": { - "target": "0xC011A72400E58ecD99Ee497CF89E3775d4bd732F", - "action": "setTarget(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)", - "complete": false, - "link": "https://etherscan.io/address/0xC011A72400E58ecD99Ee497CF89E3775d4bd732F#writeContract" - }, - "FeePool.setSynthetix(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)": { - "target": "0xA8CB0B163cEfB21f22c72f6a7d243184bD688A5A", - "action": "setSynthetix(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)", - "complete": false, - "link": "https://etherscan.io/address/0xA8CB0B163cEfB21f22c72f6a7d243184bD688A5A#writeContract" - }, - "TokenStateSynthetix.setAssociatedContract(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)": { - "target": "0x5b1b5fEa1b99D83aD479dF0C222F0492385381dD", - "action": "setAssociatedContract(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)", - "complete": false, - "link": "https://etherscan.io/address/0x5b1b5fEa1b99D83aD479dF0C222F0492385381dD#writeContract" - }, - "SynthetixState.setAssociatedContract(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)": { - "target": "0x4b9Ca5607f1fF8019c1C6A3c2f0CC8de622D5B82", - "action": "setAssociatedContract(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)", - "complete": false, - "link": "https://etherscan.io/address/0x4b9Ca5607f1fF8019c1C6A3c2f0CC8de622D5B82#writeContract" - }, - "RewardEscrow.setSynthetix(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)": { - "target": "0xb671F2210B1F6621A2607EA63E6B2DC3e2464d1F", - "action": "setSynthetix(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)", - "complete": false, - "link": "https://etherscan.io/address/0xb671F2210B1F6621A2607EA63E6B2DC3e2464d1F#writeContract" - }, - "SynthetixEscrow.setHavven(Synthetix)": { - "target": "0x971e78e0C92392A4E39099835cF7E6aB535b2227", - "action": "setHavven(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)", - "complete": false, - "link": "https://etherscan.io/address/0x971e78e0C92392A4E39099835cF7E6aB535b2227#writeContract" - }, - "ProxyERC20.setTarget(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)": { - "target": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F", - "action": "setTarget(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)", - "complete": false, - "link": "https://etherscan.io/address/0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F#writeContract" - }, - "RewardsDistribution.setAuthority(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)": { - "target": "0xFfA72Fd80d8A84032d855bfb67036BAF45949009", - "action": "setAuthority(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)", - "complete": false, - "link": "https://etherscan.io/address/0xFfA72Fd80d8A84032d855bfb67036BAF45949009#writeContract" - }, - "Depot.setSynthetix(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)": { - "target": "0x172E09691DfBbC035E37c73B62095caa16Ee2388", - "action": "setSynthetix(0x8f0E3E1F0E1F404f780d6dD11d0A3D9c16B5bE01)", - "complete": false, - "link": "https://etherscan.io/address/0x172E09691DfBbC035E37c73B62095caa16Ee2388#writeContract" - } -} +{}
2
diff --git a/src/behaviors/Behavior.js b/src/behaviors/Behavior.js @@ -1376,7 +1376,7 @@ var Behavior = Base.extend('Behavior', { }; }, - getHandleColumn: function() { + getRowHeaderColumn: function() { return this.allColumns[this.rowColumnIndex]; }, @@ -1388,7 +1388,7 @@ var Behavior = Base.extend('Behavior', { checkColumnAutosizing: function(force) { force = force === true; var autoSized = this.autoSizeRowNumberColumn() || - this.hasTreeColumn() && this.getHandleColumn().checkColumnAutosizing(force); + this.hasTreeColumn() && this.getRowHeaderColumn().checkColumnAutosizing(force); this.allColumns.forEach(function(column) { autoSized = column.checkColumnAutosizing(force) || autoSized; }); @@ -1397,7 +1397,7 @@ var Behavior = Base.extend('Behavior', { autoSizeRowNumberColumn: function() { if (this.grid.properties.showRowNumbers && this.grid.properties.rowNumberAutosizing) { - return this.getHandleColumn().checkColumnAutosizing(true); + return this.getRowHeaderColumn().checkColumnAutosizing(true); } },
10
diff --git a/javascript/lifecycle.js b/javascript/lifecycle.js @@ -97,13 +97,14 @@ document.addEventListener( // - element - the element that triggered the reflex (not necessarily the Stimulus controller's element) // export const dispatchLifecycleEvent = (stage, element) => { - if (!element || !element.reflexData) return + if (!element) return + const { target } = element.reflexData || {} element.dispatchEvent( new CustomEvent(`stimulus-reflex:${stage}`, { bubbles: true, cancelable: false, detail: { - reflex: element.reflexData.target, + reflex: target, controller: element.reflexController } })
11
diff --git a/assets/js/components/notifications/ZeroDataStateNotifications.js b/assets/js/components/notifications/ZeroDataStateNotifications.js @@ -31,8 +31,8 @@ import { MODULES_ANALYTICS } from '../../modules/analytics/datastore/constants'; import { MODULES_SEARCH_CONSOLE } from '../../modules/search-console/datastore/constants'; import BannerNotification from './BannerNotification'; import { getTimeInSeconds } from '../../util'; -import ZeroState from '../../../svg/graphics/zero-state-blue.svg'; -import GatheringData from '../../../svg/graphics/zero-state-red.svg'; +import ZeroStateIcon from '../../../svg/graphics/zero-state-blue.svg'; +import GatheringDataIcon from '../../../svg/graphics/zero-state-red.svg'; const { useSelect, useInViewSelect } = Data; export default function ZeroDataStateNotifications() { @@ -99,7 +99,7 @@ export default function ZeroDataStateNotifications() { dismiss={ __( 'OK, Got it!', 'google-site-kit' ) } isDismissible={ true } dismissExpires={ getTimeInSeconds( 'day' ) } - SmallImageSVG={ GatheringData } + SmallImageSVG={ GatheringDataIcon } /> ) } @@ -120,7 +120,7 @@ export default function ZeroDataStateNotifications() { dismiss={ __( 'Remind me later', 'google-site-kit' ) } isDismissible={ true } dismissExpires={ getTimeInSeconds( 'day' ) } - SmallImageSVG={ ZeroState } + SmallImageSVG={ ZeroStateIcon } /> ) } </Fragment>
10