code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/ccxt.js b/ccxt.js @@ -7927,6 +7927,13 @@ var huobi = {
};
} else {
url += '/' + type + '/' + this.implodeParams (path, params) + '_json.js';
+ // append unused params as query string
+ // for case http://api.huobi.com/staticmarket/btc_kline_005_json.js?length=500
+ Object.keys(params)
+ .filter(key => path.includes(key))
+ .forEach(key => delete params[key]);
+ if (Object.keys (params).length)
+ url += '?' + this.urlencode (params);
}
return this.fetch (url, method, headers, body);
},
| 9 |
diff --git a/src/commands/dev/index.js b/src/commands/dev/index.js @@ -107,10 +107,6 @@ function initializeProxy(port) {
}
if (match.force || notStatic(reqUrl.pathname, req.proxyOptions.publicFolder)) {
- if (!isEmpty(match.proxyHeaders)) {
- Object.entries(match.proxyHeaders).forEach(([k,v]) => req.headers[k] = v)
- }
-
const dest = new url.URL(
match.to,
`${reqUrl.protocol}//${reqUrl.host}`
| 2 |
diff --git a/data.js b/data.js // also be just the raw JS if it's small enough, an array of source files or a ZIP file.
// See examples below.
module.exports = [
+ {
+ name: "HashParser",
+ github: "rvanbaalen/hashparser",
+ tags: ["library","fast", "frontend", "javascript"],
+ description: "Super tiny library to set and get (encoded/decoded) parameters in the hash of your URL.",
+ url: "https://github.com/rvanbaalen/hashparser",
+ source: "https://raw.githubusercontent.com/rvanbaalen/hashparser/master/src/hashparser.js"
+ },
{
name: "Wirup",
github: "razaibi/Wirup",
| 0 |
diff --git a/lib/assets/javascripts/new-dashboard/components/MapCard/CondensedMapHeader.vue b/lib/assets/javascripts/new-dashboard/components/MapCard/CondensedMapHeader.vue {{ $t(`MapListHeader.lastModified`) }}
</span>
</div>
- <div class="map-list-cell cell--large" @click="changeOrder('views')">
+ <div class="map-list-cell cell--large" @click="changeOrder('mapviews')">
<span class="text element-sort is-small is-txtSoftGrey"
- :class="{ 'is-active': isOrderApplied('views'), 'is-reversed': isReverseOrderApplied('size') }">
+ :class="{ 'is-active': isOrderApplied('mapviews'), 'is-reversed': isReverseOrderApplied('mapviews') }">
{{ $t(`MapListHeader.views`) }}
</span>
</div>
| 3 |
diff --git a/src/charts/HeatMap.js b/src/charts/HeatMap.js @@ -108,11 +108,18 @@ export default class HeatMap {
if (w.config.plotOptions.heatmap.enableShades) {
if (colorShadePercent < 0) colorShadePercent = 0
+ if (this.w.config.theme.mode === 'dark') {
+ color = Utils.hexToRgba(
+ utils.shadeColor(colorShadePercent * -1, heatColorProps.color),
+ w.config.fill.opacity
+ )
+ } else {
color = Utils.hexToRgba(
utils.shadeColor(colorShadePercent, heatColorProps.color),
w.config.fill.opacity
)
}
+ }
if (w.config.fill.type === 'image') {
const fill = new Fill(this.ctx)
| 12 |
diff --git a/src/client/js/components/Admin/Security/SecurityManagementContents.jsx b/src/client/js/components/Admin/Security/SecurityManagementContents.jsx -import React, { Fragment, useMemo } from 'react';
+import React, { Fragment, useMemo, useState } from 'react';
import PropTypes from 'prop-types';
import { withTranslation } from 'react-i18next';
+import { TabContent, TabPane } from 'reactstrap';
+
import LdapSecuritySetting from './LdapSecuritySetting';
import LocalSecuritySetting from './LocalSecuritySetting';
import SamlSecuritySetting from './SamlSecuritySetting';
@@ -14,64 +16,63 @@ import TwitterSecuritySetting from './TwitterSecuritySetting';
import FacebookSecuritySetting from './FacebookSecuritySetting';
import ShareLinkSetting from './ShareLinkSetting';
-import CustomNavigation from '../../CustomNavigation';
+import { CustomNav } from '../../CustomNavigation';
function SecurityManagementContents(props) {
const { t } = props;
+ const [activeTab, setActiveTab] = useState('passport_local');
+ const [activeComponents, setActiveComponents] = useState(new Set(['passport_local']));
+
+ const switchActiveTab = (selectedTab) => {
+ setActiveTab(selectedTab);
+ setActiveComponents(activeComponents.add(selectedTab));
+ };
+
const navTabMapping = useMemo(() => {
return {
passport_local: {
Icon: () => <i className="fa fa-users" />,
- Content: LocalSecuritySetting,
i18n: 'ID/Pass',
index: 0,
},
passport_ldap: {
Icon: () => <i className="fa fa-sitemap" />,
- Content: LdapSecuritySetting,
i18n: 'LDAP',
index: 1,
},
passport_saml: {
Icon: () => <i className="fa fa-key" />,
- Content: SamlSecuritySetting,
i18n: 'SAML',
index: 2,
},
passport_oidc: {
Icon: () => <i className="fa fa-key" />,
- Content: OidcSecuritySetting,
i18n: 'OIDC',
index: 3,
},
passport_basic: {
Icon: () => <i className="fa fa-lock" />,
- Content: BasicSecuritySetting,
i18n: 'BASIC',
index: 4,
},
passport_google: {
Icon: () => <i className="fa fa-google" />,
- Content: GoogleSecuritySetting,
i18n: 'Google',
index: 5,
},
passport_github: {
Icon: () => <i className="fa fa-github" />,
- Content: GitHubSecuritySetting,
i18n: 'GitHub',
index: 6,
},
passport_twitter: {
Icon: () => <i className="fa fa-twitter" />,
- Content: TwitterSecuritySetting,
i18n: 'Twitter',
index: 7,
},
passport_facebook: {
Icon: () => <i className="fa fa-facebook" />,
- Content: FacebookSecuritySetting,
i18n: '(TBD) Facebook',
index: 8,
},
@@ -103,7 +104,37 @@ function SecurityManagementContents(props) {
<div className="auth-mechanism-configurations">
<h2 className="border-bottom">{t('security_setting.Authentication mechanism settings')}</h2>
- <CustomNavigation navTabMapping={navTabMapping} />
+ <CustomNav activeTab={activeTab} navTabMapping={navTabMapping} onNavSelected={switchActiveTab} hideBorderBottom />
+ <TabContent activeTab={activeTab} className="p-5">
+ <TabPane tabId="passport_local">
+ {activeComponents.has('passport_local') && <LocalSecuritySetting />}
+ </TabPane>
+ <TabPane tabId="passport_ldap">
+ {activeComponents.has('passport_ldap') && <LdapSecuritySetting />}
+ </TabPane>
+ <TabPane tabId="passport_saml">
+ {activeComponents.has('passport_saml') && <SamlSecuritySetting />}
+ </TabPane>
+ <TabPane tabId="passport_oidc">
+ {activeComponents.has('passport_oidc') && <OidcSecuritySetting />}
+ </TabPane>
+ <TabPane tabId="passport_basic">
+ {activeComponents.has('passport_basic') && <BasicSecuritySetting />}
+ </TabPane>
+ <TabPane tabId="passport_google">
+ {activeComponents.has('passport_google') && <GoogleSecuritySetting />}
+ </TabPane>
+ <TabPane tabId="passport_github">
+ {activeComponents.has('passport_github') && <GitHubSecuritySetting />}
+ </TabPane>
+ <TabPane tabId="passport_twitter">
+ {activeComponents.has('passport_twitter') && <TwitterSecuritySetting />}
+ </TabPane>
+ <TabPane tabId="passport_facebook">
+ {activeComponents.has('passport_facebook') && <FacebookSecuritySetting />}
+ </TabPane>
+ </TabContent>
+
</div>
</Fragment>
);
| 4 |
diff --git a/articles/quickstart/spa/vuejs/01-login.md b/articles/quickstart/spa/vuejs/01-login.md @@ -45,17 +45,7 @@ ${snippet(meta.snippets.loginlogout)}
__Note:__ There are multiple ways of implementing login. The example above displays the Lock Widget. However you may implement your own login UI by changing the line `<script src="${lock_url}"></script>` to `<script src="${auth0js_url}"></script>`.
-## 3. Make Secure Calls to an API
-
-To make secure calls to an API, attach the user's JWT as an `Authorization` header to the HTTP request. Be sure that you have **[vue-resource](https://github.com/vuejs/vue-resource)** in your project to make HTTP requests.
-
-${snippet(meta.snippets.http)}
-
-This method can then be used in your template to make the API call.
-
-${snippet(meta.snippets.httpcall)}
-
-## 4. Implement Routing
+## 3. Implement Routing
For routing in a single page Vue.js app, use **[vue-router](https://github.com/vuejs/vue-router)**. To make use of the router, create Vue components for your application's states.
@@ -63,10 +53,4 @@ ${snippet(meta.snippets.routing)}
The `canActivate` lifecycle hook is used to determine whether the route can be navigated to. If the user has a JWT in local storage, they are able to reach the route. The `checkAuth` method is used to check for the presence of a JWT in local storage.
-## 5. Intercept Unauthorized Requests
-
-An HTTP interceptor can be used to define custom actions for any unauthorized requests. In many cases, an `HTTP 401` will be returned when the user's JWT is expired or otherwise invalid. When this happens, you will likely want to invalidate the user's `authenticated` state on the front end and redirect them to the home or login route.
-
-${snippet(meta.snippets.interceptors)}
-
<%= include('../_includes/_persisting_state') %>
| 2 |
diff --git a/src/components/TableBody.js b/src/components/TableBody.js @@ -2,7 +2,7 @@ import React from 'react';
const TableBody = ({ rowIds, Row, style, className }) => (
<tbody style={style} className={className}>
- { rowIds && rowIds.map(r => <Row key={r} griddleKey={r} />) }
+ { rowIds && rowIds.map((k, i) => <Row key={k} griddleKey={k} index={i} />) }
</tbody>
);
| 0 |
diff --git a/Source/Scene/processPbrMetallicRoughness.js b/Source/Scene/processPbrMetallicRoughness.js @@ -143,6 +143,7 @@ define([
var hasNormals = false;
var hasTangents = false;
var hasTexCoords = false;
+ var isUnlit = false;
if (defined(primitiveInfo)) {
skinningInfo = primitiveInfo.skinning;
@@ -182,6 +183,7 @@ define([
};
if (defined(material.extensions) && defined(material.extensions.KHR_materials_unlit)) {
+ isUnlit = true;
hasNormals = false;
hasTangents = false;
}
@@ -633,6 +635,8 @@ define([
fragmentShader += ' vec3 color = baseColor;\n';
}
+ // Ignore occlusion and emissive when unlit
+ if (!isUnlit) {
if (defined(generatedMaterialValues.u_occlusionTexture)) {
fragmentShader += ' color *= texture2D(u_occlusionTexture, ' + v_texcoord + ').r;\n';
}
@@ -646,6 +650,7 @@ define([
else if (defined(generatedMaterialValues.u_emissiveFactor)) {
fragmentShader += ' color += u_emissiveFactor;\n';
}
+ }
// Final color
fragmentShader += ' color = LINEARtoSRGB(color);\n';
@@ -665,6 +670,8 @@ define([
}
fragmentShader += '}\n';
+ console.log(fragmentShader);
+
// Add shaders
var vertexShaderId = addToArray(shaders, {
type : WebGLConstants.VERTEX_SHADER,
| 8 |
diff --git a/docs/tutorial/part-two/index.md b/docs/tutorial/part-two/index.md @@ -252,7 +252,7 @@ export default typography

-Typography.js has more than 30 themes! Check them out at http://kyleamathews.github.io/typography.js/
+Typography.js has more than 30 themes! [Try them live](http://kyleamathews.github.io/typography.js) or check out [the complete list](https://github.com/KyleAMathews/typography.js#published-typographyjs-themes)
## Component CSS
| 14 |
diff --git a/src/config.js b/src/config.js @@ -39,7 +39,7 @@ exports.set = (override) => {
bot.streamActivityURL = process.env.DRSS_BOT_STREAMACTIVITYURL || botOverride.streamActivityURL || bot.streamActivityURL
bot.ownerIDs = envArray('DRSS_BOT_OWNERIDS') || botOverride.ownerIDs || bot.ownerIDs
bot.menuColor = Number(process.env.DRSS_BOT_MENUCOLOR) || botOverride.menuColor || bot.menuColor
- bot.deleteMenus = Boolean(process.env.DRSS_BOT_DELETEMENUS) || botOverride.deleteMenus || bot.deleteMenus
+ bot.deleteMenus = Boolean(process.env.DRSS_BOT_DELETEMENUS) || botOverride.deleteMenus === undefined ? bot.deleteMenus : botOverride.deleteMenus
bot.runSchedulesOnStart = Boolean(process.env.RUNSCHEDULESONSTART) || botOverride.runSchedulesOnStart === undefined ? bot.runSchedulesOnStart : botOverride.runSchedulesOnStart
bot.exitOnSocketIssues = Boolean(process.env.DRSS_EXITONSOCKETISSUES) || botOverride.exitOnSocketIssues || bot.exitOnSocketIssues
| 1 |
diff --git a/edit.js b/edit.js @@ -7182,12 +7182,6 @@ window.addEventListener('keyup', e => {
}
break;
}
- case 17: { // ctrl
- if (document.pointerLockElement) {
- keys.ctrl = false;
- }
- break;
- }
}
});
window.addEventListener('mousedown', e => {
| 2 |
diff --git a/src/reducers/__tests__/dataReducerTest.js b/src/reducers/__tests__/dataReducerTest.js @@ -183,3 +183,76 @@ test('toggle column works when there is no visible property', (t) => {
});
+
+test('update state merges non-data', (t) => {
+ const initialState = Immutable.fromJS({
+ changed: 1,
+ unchanged: 2,
+ nested: {
+ changed: 3,
+ unchanged: 4,
+ },
+ data: [],
+ lookup: {},
+ renderProperties: {},
+ });
+ const newState = {
+ changed: -1,
+ nested: {
+ changed: -3,
+ },
+ };
+
+ const state = reducers.GRIDDLE_UPDATE_STATE(initialState, { newState });
+
+ t.deepEqual(state.toJSON(), {
+ changed: -1,
+ unchanged: 2,
+ nested: {
+ changed: -3,
+ unchanged: 4,
+ },
+ // This seems wrong
+ data: undefined,
+ lookup: undefined,
+ renderProperties: {},
+ });
+});
+
+test('update state transforms data', (t) => {
+ const initialState = Immutable.fromJS({
+ unchanged: 2,
+ nested: {
+ unchanged: 4,
+ },
+ data: [
+ {name: "one", griddleKey: 0},
+ {name: "two", griddleKey: 1},
+ ],
+ lookup: { 0: 0, 1: 1 },
+ renderProperties: {},
+ });
+ const newState = {
+ data: [
+ { name: 'uno' },
+ { name: 'dos' },
+ { name: 'tre' },
+ ]
+ };
+
+ const state = reducers.GRIDDLE_UPDATE_STATE(initialState, { newState });
+
+ t.deepEqual(state.toJSON(), {
+ unchanged: 2,
+ nested: {
+ unchanged: 4,
+ },
+ data: [
+ {name: "uno", griddleKey: 0},
+ {name: "dos", griddleKey: 1},
+ {name: "tre", griddleKey: 2},
+ ],
+ lookup: { 0: 0, 1: 1, 2: 2 },
+ renderProperties: {},
+ });
+});
| 0 |
diff --git a/docs/customization/plugin-api.md b/docs/customization/plugin-api.md @@ -4,12 +4,12 @@ A plugin is a function that returns an object - more specifically, the object ma
### Format
-A plugin return value may contain any of these keys, where `myStateKey` is a name for a piece of state:
+A plugin return value may contain any of these keys, where `stateKey` is a name for a piece of state:
```javascript
{
statePlugins: {
- myStateKey: {
+ [stateKey]: {
actions,
reducers,
selectors,
| 7 |
diff --git a/lxc/executors/java b/lxc/executors/java cd /tmp/$2
cp code.code interim.java
-name=$(cat interim.java | grep -Eo 'public\s+class\s+([A-Za-z0-9]+)' | sed -n 's/ */ /gp' | cut -d' ' -f3)
+name=$(cat interim.java | grep -Eo '(public\s+class|interface)\s+([A-Za-z0-9]+)' | sed -n 's/ */ /gp' | cut -d' ' -f3)
mv interim.java $name.java
timeout -s KILL 10 javac $name.java
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 java $name"
| 11 |
diff --git a/test/test_async.py b/test/test_async.py @@ -145,7 +145,14 @@ async def test_tickers(exchange, symbol):
dump(green(exchange.id), 'fetched', green(len(list(tickers.keys()))), 'tickers')
else:
dump(green(exchange.id), 'fetching all tickers by simultaneous multiple concurrent requests')
+ # Some exchanges not all the symbols can fetch tickers for
symbols_to_load = [symbol for symbol in exchange.symbols if not '.d' in symbol]
+ if exchange.id == 'bitmex':
+ symbols_to_load = ['BTC/USD', 'B_BLOCKSZ17', 'DASHZ17', 'ETC7D', 'ETHZ17', 'LTCZ17', 'XBJZ17', 'XBTZ17', 'XMRZ17', 'XRPZ17', 'XTZZ17', 'ZECZ17']
+ elif exchange.id == 'bl3p':
+ symbols_to_load = ['BTC/EUR']
+ elif exchange.id == 'virwox':
+ symbols_to_load = [symbol for symbol in symbols_to_load if symbol != 'CHF/SLL']
input_coroutines = [exchange.fetchTicker(symbol) for symbol in symbols_to_load]
tickers = await asyncio.gather(*input_coroutines)
dump(green(exchange.id), 'fetched', green(len(list(symbols_to_load))), 'tickers')
| 1 |
diff --git a/src/core/config/Categories.json b/src/core/config/Categories.json "Play Media",
"Remove EXIF",
"Extract EXIF",
- "Split Colour Channels"
+ "Split Colour Channels",
+ "Rotate Image",
+ "Resize Image",
+ "Blur Image",
+ "Dither Image",
+ "Invert Image"
]
},
{
| 0 |
diff --git a/scripts/deployment.js b/scripts/deployment.js @@ -281,6 +281,7 @@ var addDepositAddressToExchange = function( exchange, owner ) {
}).then(function(depositAddress) {
depositAddresses["ETH"] = depositAddress;
exchangeDepositAddresses.push(depositAddresses);
+ reserve.approveWithdrawAddress(ethAddress, depositAddress, true);
fulfill(true);
}).catch(function(err){
reject(err);
| 11 |
diff --git a/lib/shared/addon/oauth/service.js b/lib/shared/addon/oauth/service.js @@ -3,7 +3,7 @@ import { addQueryParam, addQueryParams, popupWindowOptions } from 'shared/utils/
import { get, set } from '@ember/object';
import C from 'shared/utils/constants';
-const googleOauthScope = 'openid profile email https://www.googleapis.com/auth/admin.directory.user.readonly https://www.googleapis.com/auth/admin.directory.group.readonly';
+const googleOauthScope = 'openid profile email';
const githubOauthScope = 'read:org';
export default Service.extend({
| 2 |
diff --git a/io-manager.js b/io-manager.js @@ -507,6 +507,10 @@ ioManager.bindInput = () => {
weaponsManager.inventoryHack = !weaponsManager.inventoryHack;
break;
}
+ case 27: { // esc
+ weaponsManager.setContextMenu(false);
+ break;
+ }
}
});
window.addEventListener('keyup', e => {
| 0 |
diff --git a/token-metadata/0x44086035439E676c02D411880FcCb9837CE37c57/metadata.json b/token-metadata/0x44086035439E676c02D411880FcCb9837CE37c57/metadata.json "symbol": "USD",
"address": "0x44086035439E676c02D411880FcCb9837CE37c57",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/core/Utils.test.js b/src/core/Utils.test.js @@ -100,17 +100,17 @@ describe('core/utils', () => {
describe('getFileNameAndExtension', () => {
it('should return the filename and extension as an array', () => {
- expect(utils.getFileNameAndExtension('fsdfjodsuf23rfw.jpg')).toEqual([
- 'fsdfjodsuf23rfw',
- 'jpg'
- ])
+ expect(utils.getFileNameAndExtension('fsdfjodsuf23rfw.jpg')).toEqual({
+ name: 'fsdfjodsuf23rfw',
+ extension: 'jpg'
+ })
})
it('should handle invalid filenames', () => {
- expect(utils.getFileNameAndExtension('fsdfjodsuf23rfw')).toEqual([
- 'fsdfjodsuf23rfw',
- undefined
- ])
+ expect(utils.getFileNameAndExtension('fsdfjodsuf23rfw')).toEqual({
+ name: 'fsdfjodsuf23rfw',
+ extension: undefined
+ })
})
})
| 3 |
diff --git a/src/js/bs3/module/TablePopover.js b/src/js/bs3/module/TablePopover.js @@ -41,7 +41,13 @@ define([
};
this.update = function (target) {
- if (dom.isCell(target)) {
+ if (context.isDisabled()) {
+ return false;
+ }
+
+ var isCell = dom.isCell(target);
+
+ if (isCell) {
var pos = dom.posFromPlaceholder(target);
this.$popover.css({
display: 'block',
@@ -51,6 +57,8 @@ define([
} else {
this.hide();
}
+
+ return isCell;
};
this.hide = function () {
| 1 |
diff --git a/index.js b/index.js @@ -202,8 +202,8 @@ const defaults = {
},
ETHER_WRAPPER_MAX_ETH: w3utils.toWei('5000'),
- ETHER_WRAPPER_MINT_FEE_RATE: w3utils.toWei('0.005'), // 50 bps
- ETHER_WRAPPER_BURN_FEE_RATE: w3utils.toWei('0.005'), // 50 bps
+ ETHER_WRAPPER_MINT_FEE_RATE: w3utils.toWei('0.02'), // 200 bps
+ ETHER_WRAPPER_BURN_FEE_RATE: w3utils.toWei('0.0005'), // 5 bps
};
/**
| 12 |
diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/lib/index.js b/lib/node_modules/@stdlib/_tools/eslint/rules/lib/index.js @@ -414,6 +414,15 @@ setReadOnly( rules, 'jsdoc-private-annotation', require( '@stdlib/_tools/eslint/
*/
setReadOnly( rules, 'jsdoc-return-annotations-marker', require( '@stdlib/_tools/eslint/rules/jsdoc-return-annotations-marker' ) );
+/**
+* @name jsdoc-return-annotations-quote-props
+* @memberof rules
+* @readonly
+* @type {Function}
+* @see {@link module:@stdlib/_tools/eslint/rules/jsdoc-return-annotations-quote-props}
+*/
+setReadOnly( rules, 'jsdoc-return-annotations-quote-props', require( '@stdlib/_tools/eslint/rules/jsdoc-return-annotations-quote-props' ) );
+
/**
* @name jsdoc-strong-marker
* @memberof rules
@@ -631,13 +640,13 @@ setReadOnly( rules, 'require-order', require( '@stdlib/_tools/eslint/rules/requi
setReadOnly( rules, 'return-annotations-marker', require( '@stdlib/_tools/eslint/rules/return-annotations-marker' ) );
/**
-* @name return-annotations-quotes
+* @name return-annotations-quote-props
* @memberof rules
* @readonly
* @type {Function}
-* @see {@link module:@stdlib/_tools/eslint/rules/return-annotations-quotes}
+* @see {@link module:@stdlib/_tools/eslint/rules/return-annotations-quote-props}
*/
-setReadOnly( rules, 'return-annotations-quotes', require( '@stdlib/_tools/eslint/rules/return-annotations-quotes' ) );
+setReadOnly( rules, 'return-annotations-quote-props', require( '@stdlib/_tools/eslint/rules/return-annotations-quote-props' ) );
/**
* @name section-headers
| 10 |
diff --git a/app/assets/javascripts/jquery.ajax_paginate.coffee b/app/assets/javascripts/jquery.ajax_paginate.coffee @@ -43,13 +43,15 @@ jQuery.fn.ajaxPaginate= ( options ) ->
$container.data('completed',false)
# show loading indicator (hide buttons)
- showLoading=() -> $buttons.fadeOut 'slow', () -> $spinner.show()
+ showLoading=() -> $buttons.stop().fadeOut 'fast', () -> $spinner.stop().show()
# hide loading indicator and show buttons
- hideLoading=() -> $spinner.hide(); unless $container.data('completed') then $buttons.fadeIn('slow')
+ hideLoading=() -> $spinner.stop().hide(); unless $container.data('completed') then $buttons.stop().fadeIn('fast')
loadNext=(callback) ->
# return if there is an ajax load running
- return if loading
+ if loading
+ callback() if callback
+ return
# if completed call callback and return
if $container.data('completed')
callback() if callback
| 7 |
diff --git a/packages/nexrender-core/src/index.js b/packages/nexrender-core/src/index.js @@ -39,7 +39,7 @@ const init = (settings) => {
// check for WSL
settings.wsl =
- os.platform() === 'linux' && os.release().match('microsoft')
+ os.platform() === 'linux' && os.release().match(/microsoft/i)
? true
: false
| 7 |
diff --git a/browser/lib/util/http.ts b/browser/lib/util/http.ts @@ -49,7 +49,7 @@ const Http: typeof IHttp = class {
callback?.(new ErrorInfo('Request invoked before assigned to', null, 500));
return;
}
- Http.Request(method, rest, uriFromHost(currentFallback.host), headers, params, body, function(err?: ErrnoException | ErrorInfo | null) {
+ Http.Request(method, rest, uriFromHost(currentFallback.host), headers, params, body, function(err?: ErrnoException | ErrorInfo | null, ...args: unknown[]) {
// This typecast is safe because ErrnoExceptions are only thrown in NodeJS
if(err && shouldFallback(err as ErrorInfo)) {
/* unstore the fallback and start from the top with the default sequence */
@@ -57,7 +57,7 @@ const Http: typeof IHttp = class {
Http.do(method, rest, path, headers, body, params, callback);
return;
}
- callback?.(err);
+ callback?.(err, ...args);
});
return;
} else {
@@ -77,7 +77,7 @@ const Http: typeof IHttp = class {
/* hosts is an array with preferred host plus at least one fallback */
const tryAHost = function(candidateHosts: Array<string>, persistOnSuccess?: boolean) {
const host = candidateHosts.shift();
- Http.doUri(method, rest, uriFromHost(host as string), headers, body, params, function(err?: ErrnoException | ErrorInfo | null) {
+ Http.doUri(method, rest, uriFromHost(host as string), headers, body, params, function(err?: ErrnoException | ErrorInfo | null, ...args: unknown[]) {
// This typecast is safe because ErrnoExceptions are only thrown in NodeJS
if(err && shouldFallback(err as ErrorInfo) && candidateHosts.length) {
tryAHost(candidateHosts, true);
@@ -90,7 +90,7 @@ const Http: typeof IHttp = class {
validUntil: Utils.now() + rest.options.timeouts.fallbackRetryTimeout
};
}
- callback?.(err);
+ callback?.(err, ...args);
});
};
tryAHost(hosts);
| 1 |
diff --git a/token-metadata/0xF433089366899D83a9f26A773D59ec7eCF30355e/metadata.json b/token-metadata/0xF433089366899D83a9f26A773D59ec7eCF30355e/metadata.json "symbol": "MTL",
"address": "0xF433089366899D83a9f26A773D59ec7eCF30355e",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/lib/waterline/utils/query/forge-stage-three-query.js b/lib/waterline/utils/query/forge-stage-three-query.js @@ -294,30 +294,14 @@ module.exports = function forgeStageThreeQuery(options) {
var attrDefToPopulate = model.attributes[populateAttribute];
var schemaAttribute = model.schema[populateAttribute];
- var attributeName = populateAttribute;
if (!attrDefToPopulate) {
throw new Error('In ' + util.format('`.populate("%s")`', populateAttribute) + ', attempting to populate an attribute that doesn\'t exist');
}
- if (_.has(attrDefToPopulate, 'columnName')) {
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- // TODO: Figure out why we're accessing `columnName` this way instead of on wlsSchema
- // (see https://github.com/balderdashy/waterline/commit/19889b7ee265e9850657ec2b4c7f3012f213a0ae#commitcomment-20668361)
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- attributeName = attrDefToPopulate.columnName;
- }
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- // TODO: Instead of setting `attributeName` as the column name, use a different
- // variable. (Otherwise this gets super confusing to try and understand.)
- //
- // (Side note: Isn't the `schema` from WLS keyed on attribute name? If not, then
- // there is other code in Waterline using it incorrectly)
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
// Grab the key being populated from the original model definition to check
// if it is a has many or belongs to. If it's a belongs_to the adapter needs
// to know that it should replace the foreign key with the associated value.
- var parentAttr = originalModels[identity].schema[attributeName];
+ var parentAttr = originalModels[identity].schema[populateAttribute];
// Build the initial join object that will link this collection to either another collection
// or to a junction table.
| 2 |
diff --git a/src/components/TestToolMenu.js b/src/components/TestToolMenu.js import React from 'react';
import PropTypes from 'prop-types';
+import _ from 'underscore';
import {withOnyx} from 'react-native-onyx';
import lodashGet from 'lodash/get';
import styles from '../styles/styles';
@@ -14,6 +15,8 @@ import TestToolRow from './TestToolRow';
import networkPropTypes from './networkPropTypes';
import compose from '../libs/compose';
import {withNetwork} from './OnyxProvider';
+import getPlatform from '../libs/getPlatform';
+import CONST from '../CONST';
const propTypes = {
/** User object in Onyx */
@@ -42,7 +45,7 @@ const TestToolMenu = props => (
This enables QA and internal testers to take advantage of sandbox environments for 3rd party services like Plaid and Onfido. */}
<TestToolRow title="Use Staging Server">
<Switch
- isOn={lodashGet(props, 'user.shouldUseStagingServer', false)}
+ isOn={lodashGet(props, 'user.shouldUseStagingServer', _.contains([CONST.PLATFORM.WEB, CONST.PLATFORM.DESKTOP], getPlatform()))}
onToggle={() => User.setShouldUseStagingServer(!lodashGet(props, 'user.shouldUseStagingServer', true))}
/>
</TestToolRow>
| 4 |
diff --git a/src/core/operations/JWTDecode.mjs b/src/core/operations/JWTDecode.mjs @@ -26,6 +26,13 @@ class JWTDecode extends Operation {
this.inputType = "string";
this.outputType = "JSON";
this.args = [];
+ this.checks = [
+ {
+ pattern: "^ey([A-Za-z0-9_-]+)\\.ey([A-Za-z0-9_-]+)\\.([A-Za-z0-9_-]+)$",
+ flags: "",
+ args: []
+ },
+ ];
}
/**
| 0 |
diff --git a/node-binance-api.js b/node-binance-api.js @@ -2871,8 +2871,9 @@ let api = function Binance( options = {} ) {
* @param {string} name - the name to save the address as. Set falsy to prevent Binance saving to address book
* @return {promise or undefined} - omitting the callback returns a promise
*/
- withdraw: function ( asset, address, amount, addressTag = false, callback = false, name = 'API Withdraw' ) {
+ withdraw: function ( asset, address, amount, addressTag = false, callback = false, name = false ) {
let params = { asset, address, amount };
+ if ( name ) params.name = name;
if ( addressTag ) params.addressTag = addressTag;
if ( !callback ) {
return new Promise( ( resolve, reject ) => {
| 11 |
diff --git a/app/App.jsx b/app/App.jsx @@ -18,7 +18,8 @@ import Incognito from "./components/Layout/Incognito";
import {isIncognito} from "feature_detect";
import {updateGatewayBackers} from "common/gatewayUtils";
import titleUtils from "common/titleUtils";
-import {BodyClassName} from "bitshares-ui-style-guide";
+import {BodyClassName, Notification} from "bitshares-ui-style-guide";
+import {DEFAULT_NOTIFICATION_DURATION} from "services/Notification";
import Loadable from "react-loadable";
import {Route, Switch} from "react-router-dom";
@@ -147,6 +148,10 @@ class App extends React.Component {
this.showBrowserSupportModal = this.showBrowserSupportModal.bind(this);
this.hideBrowserSupportModal = this.hideBrowserSupportModal.bind(this);
+
+ Notification.config({
+ duration: DEFAULT_NOTIFICATION_DURATION
+ });
}
componentWillUnmount() {
| 12 |
diff --git a/articles/quickstart/webapp/aspnet-core/00-intro.md b/articles/quickstart/webapp/aspnet-core/00-intro.md @@ -22,12 +22,8 @@ If you would like to follow along with this Quickstart you can download the [see
The final project after each of the steps is also available in the Quickstart folder of the [ASP.NET Core MVC Samples repository](https://github.com/auth0-samples/auth0-aspnetcore-mvc-samples/tree/master/Quickstart). You can find the final result for each step in the relevant folder inside the repository.
-## Create an Application
-
<%= include('../../../_includes/_new_app') %>
-
-
<%= include('_includes/_setup') %>
Please continue with the [Login](/quickstart/webapp/aspnet-core/01-login) tutorial for instruction on how to implement basic login.
| 2 |
diff --git a/accessibility-checker-engine/README-RULES.md b/accessibility-checker-engine/README-RULES.md @@ -13,7 +13,7 @@ Multiple objects are needed for a rule to fire and show up in the tool results:
### Rule object
-The basic rule format is defined by the Rule type in [src/v2/api/IEngine.ts](src/v2/api/IEngine.ts). Rule implementation is located in [src/v2/checker/accessibility/rules](src/v2/checker/accessibility/rules). The rule context, DOM objects and/or attributes, including explicit and implicit CSS and ARIA attributes, that may cause a rule to trigger, are defined in [src/v2/common/Context.ts](src/v2/common/Context.ts). The rule results can be one of:
+The basic rule format is defined by the Rule type in [src/v2/api/IEngine.ts](src/v2/api/IEngine.ts). Rule implementation is located in [src/v2/checker/accessibility/rules](src/v2/checker/accessibility/rules). The rule context, including DOM object hierarchies, attributes, explicit/implicit CSS and ARIA attributes, that may trigger a rule, are defined in [src/v2/common/Context.ts](src/v2/common/Context.ts). The rule results can be one of:
* RulePass("MSG_ID")
* RuleFail("MSG_ID")
* RulePotential("MSG_ID")
@@ -133,7 +133,8 @@ Note: Rule changes are not automatically rebuilt. You will have to kill the rule
## Summary of steps to implement/update and test a new rule
* Create a rule id for a new rule.
-* Add the rule and ruleset mapping to [src/v2/checker/accessibility/rulesets/index.ts](src/v2/checker/accessibility/rulesets/index.ts).
-* Create the <rule id>.mdx help file, and add the rule and the help file mapping to [src/v2/checker/accessibility/help/index.ts](src/v2/checker/accessibility/help/index.ts):.
+* Create the rule and ruleset mapping to [src/v2/checker/accessibility/rulesets/index.ts](src/v2/checker/accessibility/rulesets/index.ts).
+* Create the <rule id>.mdx help file in [help](help), and add the rule and the help file mapping to [src/v2/checker/accessibility/help/index.ts](src/v2/checker/accessibility/help/index.ts).
+* Create the rule implementation in [src/v2/checker/accessibility/rules](src/v2/checker/accessibility/rules). The rule implementation includes the rule context, logic and outcome (Pass or Fail).
* Create test cases for the rule in [test/v2/checker/accessibility/rules](test/v2/checker/accessibility/rules).
* Test the rules with the test cases. You may run the test cases locally, or run with the local rule server.
\ No newline at end of file
| 3 |
diff --git a/snowpack/src/index.ts b/snowpack/src/index.ts @@ -17,7 +17,7 @@ export * from './types';
export {startServer} from './commands/dev';
export {build} from './commands/build';
export {loadConfiguration, createConfiguration} from './config.js';
-export {readLockfile as loadLockfile} from './util.js';
+export {clearCache, readLockfile as loadLockfile} from './util.js';
export {getUrlForFile} from './build/file-urls';
export {logger} from './logger';
| 0 |
diff --git a/Source/DataSources/GpxDataSource.js b/Source/DataSources/GpxDataSource.js @@ -465,11 +465,13 @@ define([
return parseColorString(value, queryStringValue(node, 'colorMode', namespace) === 'random');
}
- function createDefaultBillboard() {
+ function createDefaultBillboard(proxy, sourceUri, uriResolver) {
var billboard = new BillboardGraphics();
billboard.width = BILLBOARD_SIZE;
billboard.height = BILLBOARD_SIZE;
billboard.scaleByDistance = new NearFarScalar(2414016, 1.0, 1.6093e+7, 0.1);
+ var DEFAULT_ICON = '../../../Build/Cesium/Assets/Textures/maki/marker.png';
+ billboard.image = resolveHref(DEFAULT_ICON, proxy, sourceUri, uriResolver);
return billboard;
}
@@ -492,6 +494,9 @@ define([
function processWpt(dataSource, geometryNode, entityCollection, sourceUri, uriResolver) {
+ //Required Information:
+ // <lon> Longitude of the waypoint.
+ // <lat> Latitude of the waypoint.
var longitude = queryNumericAttribute(geometryNode, 'lon');
var latitude = queryNumericAttribute(geometryNode, 'lat');
var coordinatesString = longitude + ", " + latitude;
@@ -502,15 +507,44 @@ define([
var entity = getOrCreateEntity(geometryNode, entityCollection);
entity.position = position;
- entity.billboard = createDefaultBillboard();
- entity.billboard.image = '../images/Cesium_Logo_overlay.png';
-
- //TODO add support for these and others
- var elevation = queryNumericValue(geometryNode, 'ele', namespaces.gpx);
+ entity.billboard = createDefaultBillboard(dataSource._proxy, sourceUri, uriResolver);
+
+ //Optional Position Information:
+ // <ele> Elevation of the waypoint.
+ // <time> Creation date/time of the waypoint
+ // <magvar> Magnetic variation of the waypoint in degrees
+ // <geoidheight> Geoid height of the waypoint
+ // var elevation = queryNumericValue(geometryNode, 'ele', namespaces.gpx);
+ // var time = queryNumericValue(geometryNode, 'time', namespaces.gpx);
+ // var magvar = queryNumericValue(geometryNode, 'magvar', namespaces.gpx);
+ // var geoidheight = queryNumericValue(geometryNode, 'geoidheight', namespaces.gpx);
+
+ //Optional Description Information:
+ // <name> GPS waypoint name of the waypoint
+ // <cmt> GPS comment of the waypoint
+ // <desc> Descriptive description of the waypoint
+ // <src> Source of the waypoint data
+ // <link> Link (URI/URL) associated with the waypoint
+ // <sym> Waypoint symbol
+ // <type> Type (category) of waypoint
var name = queryStringValue(geometryNode, 'name', namespaces.gpx);
- var comment = queryStringValue(geometryNode, 'cmt', namespaces.gpx);
- var description = queryStringValue(geometryNode, 'desc', namespaces.gpx);
- var symbol = queryStringValue(geometryNode, 'sym', namespaces.gpx);
+ entity.label = createDefaultLabel();
+ entity.label.text = name;
+ // var comment = queryStringValue(geometryNode, 'cmt', namespaces.gpx);
+ // var description = queryStringValue(geometryNode, 'desc', namespaces.gpx);
+ // var source = queryStringValue(geometryNode, 'src', namespaces.gpx);
+ // var link = queryLinkgValue(geometryNode, 'link', namespaces.gpx);
+ // var symbol = queryStringValue(geometryNode, 'sym', namespaces.gpx);
+ // var type = queryStringValue(geometryNode, 'type', namespaces.gpx);
+
+ //Optional Accuracy Information:
+ // <fix> Type of GPS fix
+ // <sat> Number of satellites
+ // <hdop> HDOP
+ // <vdop> VDOP
+ // <pdop> PDOP
+ // <ageofdgpsdata> Time since last DGPS fix
+ // <dgpsid> DGPS station ID
}
var complexTypes = {
| 7 |
diff --git a/packages/app/src/components/Layout/NoLoginLayout.tsx b/packages/app/src/components/Layout/NoLoginLayout.tsx import React, { ReactNode } from 'react';
+import { useAppTitle } from '~/stores/context';
+
import GrowiLogo from '../Icons/GrowiLogo';
import { RawLayout } from './RawLayout';
@@ -14,7 +16,8 @@ type Props = {
export const NoLoginLayout = ({
children, className,
}: Props): JSX.Element => {
- const classNames: string[] = ['wrapper'];
+
+ const { data: appTitle } = useAppTitle();
if (className != null) {
classNames.push(className);
}
@@ -28,7 +31,7 @@ export const NoLoginLayout = ({
<div className="col-md-12">
<div className="nologin-header mx-auto">
<GrowiLogo />
- <h1 className="my-3">GROWI</h1>
+ <h1 className="my-3">{ appTitle ?? 'GROWI' }</h1>
<div className="noLogin-form-errors px-3"></div>
</div>
{children}
| 12 |
diff --git a/test/client/GameBoard.spec.jsx b/test/client/GameBoard.spec.jsx import GameBoard, { InnerGameBoard } from '../../client/GameBoard.jsx';
import PlayerStats, { InnerPlayerStats } from '../../client/GameComponents/PlayerStats.jsx';
-import PlayerRow from '../../client/GameComponents/PlayerRow.jsx';
import Card from '../../client/GameComponents/Card.jsx';
import CardCollection from '../../client/GameComponents/CardPile.jsx';
import GameConfiguration from '../../client/GameComponents/GameConfiguration.jsx';
| 2 |
diff --git a/articles/quickstart/webapp/nodejs/_includes/_login.md b/articles/quickstart/webapp/nodejs/_includes/_login.md @@ -70,7 +70,7 @@ You need to make sure you get an OIDC-conformant response. You can achieve it tw
::: note
The example below shows how to set the audience to get an OIDC-conformant response.
-To turn on the **OIDC conformant** switch, in your [Auth0 dashboard](${manage_url}/#/client), click **Client** > **Settings**. Click on **Show Advanced Settings**. Click **OAuth** and turn on the **OIDC conformant** switch. To learn more, read the [net flows documentation](/api-auth/intro#how-to-use-the-new-flows).
+To turn on the **OIDC conformant** switch, in your [Client Settings](${manage_url}/#/applications/${account.clientId}/settings). Click on **Show Advanced Settings** > **OAuth**. To learn more, read the [net flows documentation](/api-auth/intro#how-to-use-the-new-flows).
:::
```js
| 0 |
diff --git a/configs/demisto.json b/configs/demisto.json "global": true,
"default_value": "Documentation"
},
- "lvl1": "article h2",
- "lvl2": "article h3",
- "lvl3": "article h4",
- "lvl4": "article h5",
- "lvl5": "article h6",
- "text": "article p, article li"
+ "lvl1": "[class^='docItemContainer_'] h1",
+ "lvl2": "[class^='docItemContainer_'] h2",
+ "lvl3": "[class^='docItemContainer_'] h3",
+ "lvl4": "[class^='docItemContainer_'] h4",
+ "lvl5": "[class^='docItemContainer_'] h5",
+ "text": "[class^='docItemContainer_'] p, [class^='docItemContainer_'] li"
},
- "strip_chars": " .,;:#",
"selectors_exclude": [
".hash-link"
],
"conversation_id": [
"1106052758"
],
- "nb_hits": 52961
+ "nb_hits": 49654
}
\ No newline at end of file
| 13 |
diff --git a/assets/js/googlesitekit/api/middleware/preloading.js b/assets/js/googlesitekit/api/middleware/preloading.js * WordPress dependencies.
*/
import { getStablePath } from '@wordpress/api-fetch/build/middlewares/preloading';
-import { addQueryArgs } from '@wordpress/url';
-
-/**
- * Helper to remove the timestamp query param
- *
- * @since n.e.x.t
- *
- * @param {string} uri The URI to remove the timestamp query param from.
- * @return {string} Passed URI without the timestamp query param
- */
-function removeTimestampQueryParam( uri ) {
- const [ baseUrl, queryParams ] = uri.split( '?' );
-
- const paramsObject = queryParams.split( '&' )?.reduce( ( acc, paramSet ) => {
- const split = paramSet.split( '=' );
- if ( split[ 0 ] !== 'timestamp' ) {
- return { ...acc, [ split[ 0 ] ]: split[ 1 ] };
- }
- }, {} );
-
- return addQueryArgs( baseUrl, paramsObject );
-}
+import { removeQueryArgs, getQueryArg } from '@wordpress/url';
/**
* createPreloadingMiddleware
@@ -66,8 +45,8 @@ function createPreloadingMiddleware( preloadedData ) {
let deleteCache = false;
if ( typeof options.path === 'string' ) {
const method = options.method?.toUpperCase() || 'GET';
- if ( options.path.match( /timestamp=[0-9]+/ ) ) {
- uri = removeTimestampQueryParam( options.path );
+ if ( getQueryArg( options.patch, 'timestamp' ) ) {
+ uri = removeQueryArgs( options.path, 'timestamp' );
deleteCache = true;
}
const path = getStablePath( uri );
| 2 |
diff --git a/native/chat/add-thread.react.js b/native/chat/add-thread.react.js @@ -240,7 +240,6 @@ class InnerAddThread extends React.PureComponent<Props, State> {
autoFocus={true}
autoCorrect={false}
autoCapitalize="none"
- keyboardType="ascii-capable"
returnKeyType="next"
editable={this.props.loadingStatus !== "loading"}
underlineColorAndroid="transparent"
| 11 |
diff --git a/token-metadata/0xB52FC0F17Df38ad76F290467Aab57caBaEEada14/metadata.json b/token-metadata/0xB52FC0F17Df38ad76F290467Aab57caBaEEada14/metadata.json "symbol": "VGTN",
"address": "0xB52FC0F17Df38ad76F290467Aab57caBaEEada14",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/javascript/components/Camera.js b/javascript/components/Camera.js @@ -6,8 +6,6 @@ import locationManager from '../modules/location/locationManager';
import {isNumber, toJSONString, viewPropTypes, existenceChange} from '../utils';
import * as geoUtils from '../utils/geoUtils';
-import NativeBridgeComponent from './NativeBridgeComponent';
-
const MapboxGL = NativeModules.MGLModule;
export const NATIVE_MODULE_NAME = 'RCTMGLCamera';
@@ -67,7 +65,7 @@ const SettingsPropTypes = {
zoomLevel: PropTypes.number,
};
-class Camera extends NativeBridgeComponent {
+class Camera extends React.Component {
static propTypes = {
...viewPropTypes,
| 2 |
diff --git a/apps/tictactoe/app.js b/apps/tictactoe/app.js @@ -102,6 +102,8 @@ function draw(){
}
//Banner Displays player turn
E.showMessage("","Player "+ playerIcon);
+ //set draw color to white
+ g.setColor(-1);
//drawboard
g.drawLine(62,24,62,176);
g.drawLine(112,24,112,176);
| 3 |
diff --git a/src/components/fx/layout_attributes.js b/src/components/fx/layout_attributes.js @@ -72,17 +72,6 @@ module.exports = {
'`namelength - 3` characters and add an ellipsis.'
].join(' ')
},
- zformat: {
- valType: 'string',
- dflt: '',
- role: 'style',
- editType: 'none',
- description: [
- 'Sets the hover text formatting rule using d3 formatting mini-languages',
- 'which are very similar to those in Python. See:',
- 'https://github.com/d3/d3-format/blob/master/README.md#locale_format'
- ].join(' ')
- },
editType: 'none'
}
};
| 2 |
diff --git a/src/components/editor-mode/scene-menu/SceneMenu.jsx b/src/components/editor-mode/scene-menu/SceneMenu.jsx @@ -32,6 +32,7 @@ export const SceneMenu = ({ multiplayerConnected, selectedScene, setSelectedScen
const [ speechEnabled, setSpeechEnabled ] = useState( false );
const [ sceneInputName, setSceneInputName ] = useState( selectedScene );
const [ scenesList, setScenesList ] = useState( origSceneList );
+
//
const refreshRooms = async () => {
| 0 |
diff --git a/src/components/RegisterForm.js b/src/components/RegisterForm.js @@ -144,20 +144,25 @@ class RegisterForm extends React.Component {
password: '',
passwordConfirmation: '',
error: false,
+ validationErrors: {}
}
}
onSubmit() {
this.setState({ message: '' })
- const { error, ...data } = this.state
+ const { error, validationErrors, ...data } = this.state
const { client, onRequestStart, onRequestEnd, onRegisterSuccess, onRegisterFail } = this.props
- const validationErrors = validate(data, constraints, { fullMessages: false })
+ const newValidationErrors = validate(data, constraints, { fullMessages: false })
- if (validationErrors) {
- this.setState({ error: true })
- return onRegisterFail(Object.values(validationErrors)[0])
+ if (newValidationErrors) {
+ this.setState({
+ error: true,
+ validationErrors: newValidationErrors
+ })
+
+ return onRegisterFail(Object.values(newValidationErrors)[0])
}
onRequestStart()
@@ -181,11 +186,17 @@ class RegisterForm extends React.Component {
render() {
+ const { validationErrors } = this.state
+
return (
<View>
<Form>
- { inputs.map(input => (
- <Item key={ input.name } stackedLabel>
+ { inputs.map(input => {
+
+ const itemProps = validationErrors.hasOwnProperty(input.name) ? { error: true } : {}
+
+ return (
+ <Item key={ input.name } stackedLabel { ...itemProps }>
<Label>{ input.label }</Label>
<Input
autoCorrect={ false }
@@ -195,7 +206,8 @@ class RegisterForm extends React.Component {
{ ...input.props }
/>
</Item>
- )) }
+ )
+ }) }
</Form>
<View style={{ marginTop: 20 }}>
<Button block onPress={() => this.onSubmit()}>
| 12 |
diff --git a/src/components/profile/ProfileDataTable.js b/src/components/profile/ProfileDataTable.js @@ -96,8 +96,7 @@ const styles = StyleSheet.create({
borderWidth: 0,
fontSize: normalize(16),
textAlign: 'left',
- color: '#555555',
- outline: 'none'
+ color: '#555555'
},
error: {
paddingRight: 0,
| 2 |
diff --git a/package.json b/package.json "oc-client": "3.0.1",
"oc-client-browser": "1.1.1",
"oc-get-unix-utc-timestamp": "1.0.1",
- "oc-s3-storage-adapter": "1.0.2",
+ "oc-s3-storage-adapter": "1.0.3",
"oc-storage-adapters-utils": "1.0.2",
"oc-template-handlebars": "6.0.10",
"oc-template-handlebars-compiler": "6.1.8",
| 3 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tour/tourGuide.js @@ -18,6 +18,9 @@ RED.tourGuide = (function() {
if (tourCache[tourPath]) {
runTour(tourCache[tourPath],done);
} else {
+ /* jshint ignore:start */
+ // jshint<2.13 doesn't support dynamic imports. Once grunt-contrib-jshint
+ // has been updated with the new jshint, we can stop ignoring this block
import(tourPath).then(function(module) {
tourCache[tourPath] = module.default;
runTour(tourCache[tourPath],done);
@@ -25,6 +28,7 @@ RED.tourGuide = (function() {
console.warn("Error loading tour:",err);
done(err);
})
+ /* jshint ignore:end */
}
}
| 8 |
diff --git a/packages/bitcore-node/docs/wallet-guide.md b/packages/bitcore-node/docs/wallet-guide.md @@ -58,7 +58,7 @@ bitcoinregtest
Go to Help -> Debug Window -> console tab
-Input generate command in the line to create 5000 BTC
+Input generate command in the line to create 5000 Blocks
```
generate 5000
| 14 |
diff --git a/common/lib/transport/connectionmanager.js b/common/lib/transport/connectionmanager.js @@ -1117,8 +1117,9 @@ var ConnectionManager = (function() {
return;
}
- var upgradeTransportParams = new TransportParams(this.options, transportParams.host, 'upgrade', this.connectionKey);
Utils.arrForEach(upgradePossibilities, function(upgradeTransport) {
+ /* Note: the transport may mutate the params, so give each transport a fresh one */
+ var upgradeTransportParams = new TransportParams(self.options, transportParams.host, 'upgrade', self.connectionKey);
self.tryATransport(upgradeTransportParams, upgradeTransport, noop);
});
};
| 1 |
diff --git a/src/platforms/browser/WebPlatform.mjs b/src/platforms/browser/WebPlatform.mjs @@ -106,6 +106,7 @@ export default class WebPlatform {
}
uploadCompressedGlTexture(gl, textureSource, source, options) {
+ const view = !source.pvr ? new DataView(source.mipmaps[0]) : source.mipmaps[0];
gl.compressedTexImage2D(
gl.TEXTURE_2D,
0,
@@ -113,7 +114,7 @@ export default class WebPlatform {
source.pixelWidth,
source.pixelHeight,
0,
- new DataView(source.mipmaps[0]),
+ view,
)
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
@@ -212,13 +213,62 @@ export default class WebPlatform {
}
}
+ handlePvrLoad(cb, src) {
+ return function () {
+ // pvr header length in 32 bits
+ const pvrHeaderLength = 13;
+ // for now only we only support: COMPRESSED_RGB_ETC1_WEBGL
+ const pvrFormatEtc1 = 0x8D64;
+ const pvrWidth = 7;
+ const pvrHeight = 6;
+ const pvrMipmapCount = 11;
+ const pvrMetadata = 12;
+ const arrayBuffer = this.response;
+ const header = new Int32Array(arrayBuffer, 0, pvrHeaderLength);
+ const dataOffset = header[pvrMetadata] + 52;
+ const pvrtcData = new Uint8Array(arrayBuffer, dataOffset);
+
+ var data = {
+ glInternalFormat: pvrFormatEtc1,
+ pixelWidth: header[pvrWidth],
+ pixelHeight: header[pvrHeight],
+ numberOfMipmapLevels: header[pvrMipmapCount],
+ mipmaps: [],
+ pvr: true,
+ get width() { return this.pixelWidth },
+ get height() { return this.pixelHeight },
+ };
+
+ let offset = 0
+ let width = data.pixelWidth;
+ let height = data.pixelHeight;
+
+ for (var i = 0; i < data.numberOfMipmapLevels; i++) {
+ const level = ((width + 3) >> 2) * ((height + 3) >> 2) * 8;
+ const view = new Uint8Array(arrayBuffer, pvrtcData.byteOffset + offset, level);
+ data.mipmaps.push(view);
+ offset += level;
+ width = width >> 1;
+ height = height >> 1;
+ }
+
+ cb(null, {
+ source: data,
+ renderInfo: { src: src, compressed: true },
+ })
+ }
+ }
+
loadSrcTexture({ src, hasAlpha }, cb) {
let cancelCb = undefined;
let isPng = (src.indexOf(".png") >= 0) || src.substr(0, 21) == 'data:image/png;base64';
let isKtx = src.indexOf('.ktx') >= 0;
- if (isKtx) {
+ let isPvr = src.indexOf('.pvr') >= 0;
+ if (isKtx || isPvr) {
let request = new XMLHttpRequest();
- request.addEventListener("load", this.handleKtxLoad(cb, src));
+ request.addEventListener(
+ "load", isKtx ? this.handleKtxLoad(cb, src) : this.handlePvrLoad(cb, src)
+ );
request.open("GET", src);
request.responseType = "arraybuffer";
request.send();
| 0 |
diff --git a/tutorial.js b/tutorial.js import {loginManager} from './login.js';
-import {parseQuery} from './util.js';
+import {parseQuery, bindUploadFileButton, getExt} from './util.js';
const ftu = document.getElementById('ftu');
const ftuUsername = document.getElementById('ftu-username');
@@ -26,10 +26,14 @@ Array.from(document.querySelectorAll('.avatar-grid > .avatar.model')).forEach(av
loginManager.setAvatar(avatar);
};
});
-Array.from(document.querySelectorAll('.avatar-grid > .avatar.upload')).forEach(avatarButton => {
- avatarButton.onclick = () => {
- console.log('click upload');
- };
+
+bindUploadFileButton(document.getElementById('ftu-upload-avatar-input'), async file => {
+ if (getExt(file.name) === 'vrm') {
+ const {hash, id} = await loginManager.uploadFile(file);
+ console.log('got file upload', {hash, id});
+ } else {
+ console.warn('uploaded avatar is not .vrm');
+ }
});
const _nextPhase = async () => {
| 0 |
diff --git a/src/og/Events.js b/src/og/Events.js @@ -138,12 +138,12 @@ class Events {
* @param {Object} event - Event instance property that created by event name.
* @param {Object} [obj] - Event object.
*/
- dispatch(event, obj) {
+ dispatch(event, ...args) {
if (event && event.active) {
var h = event.handlers;
var i = h.length;
while (i-- && !this._stopPropagation) {
- h[i](obj);
+ h[i](...args);
}
}
this._stopPropagation = false;
| 0 |
diff --git a/app/shared/actions/validate.js b/app/shared/actions/validate.js @@ -126,7 +126,7 @@ export function validateNode(
node: httpEndpoint,
saveAsDefault,
settings,
- supportedContracts: blockchain.supportedContracts,
+ supportedContracts: (blockchain) ? blockchain.supportedContracts : [],
useImmediately,
},
type: types.VALIDATE_NODE_SUCCESS
| 11 |
diff --git a/tests/typed_blocks/type_unification_test.js b/tests/typed_blocks/type_unification_test.js 'use strict';
-function test_type_unification_structure() {
+function test_type_unification_ifThenElseStructure() {
var workspace = new Blockly.Workspace();
try {
var block = workspace.newBlock('logic_ternary_typed');
| 10 |
diff --git a/src/service-broker.js b/src/service-broker.js @@ -145,8 +145,8 @@ class ServiceBroker {
this.logger = this.getLogger("broker");
this.logger.info(`Moleculer v${this.MOLECULER_VERSION} is starting...`);
- this.logger.info("Node ID:", this.nodeID);
- this.logger.info("Namespace:", this.namespace || "<not defined>");
+ this.logger.info(`Node ID: ${this.nodeID}`);
+ this.logger.info(`Namespace: ${this.namespace || "<not defined>"}`);
// Internal event bus
this.localBus = new EventEmitter2({
@@ -169,7 +169,7 @@ class ServiceBroker {
this.cacher.init(this);
const name = this.cacher.constructor.name;
- this.logger.info("Cacher:", name);
+ this.logger.info(`Cacher: ${name}`);
}
// Serializer
@@ -177,7 +177,7 @@ class ServiceBroker {
this.serializer.init(this);
const serializerName = this.serializer.constructor.name;
- this.logger.info("Serializer:", serializerName);
+ this.logger.info(`Serializer: ${serializerName}`);
// Validation
if (this.options.validation !== false) {
@@ -193,7 +193,7 @@ class ServiceBroker {
this.transit = new Transit(this, tx, this.options.transit);
const txName = tx.constructor.name;
- this.logger.info("Transporter:", txName);
+ this.logger.info(`Transporter: ${txName}`);
if (this.options.disableBalancer) {
if (tx.hasBuiltInBalancer) {
| 1 |
diff --git a/lib/assets/core/javascripts/cartodb/organization/entry.js b/lib/assets/core/javascripts/cartodb/organization/entry.js @@ -268,7 +268,7 @@ $(function () {
var $groups = $('.js-groups-content');
if ($groups) {
- if (!currentUser.isOrgOwner()) {
+ if (!currentUser.isOrgAdmin()) {
window.location = currentUser.viewUrl().accountSettings();
return false;
}
| 11 |
diff --git a/lib/processes/blockchainProcessLauncher.js b/lib/processes/blockchainProcessLauncher.js @@ -40,10 +40,6 @@ class BlockchainProcessLauncher {
});
this.blockchainProcess.once('result', constants.blockchain.blockchainReady, () => {
- setTimeout(() => {
- console.log('LOL');
- oopsise = doopsie;
- }, 3000);
this.logger.info(__('Blockchain node is ready').cyan);
this.events.emit(constants.blockchain.blockchainReady);
});
| 2 |
diff --git a/tests/typed_blocks/type_transfer_block_workspace_test.js b/tests/typed_blocks/type_transfer_block_workspace_test.js @@ -1092,35 +1092,44 @@ function test_type_transfer_block_workspace_letRecSimple() {
var workspace = create_typed_workspace();
var workbench;
try {
- // let rec f x = ..
+ // let rec f x y = ..
var letRecBlock = workspace.newBlock('letrec_typed');
var mutator = create_mock_mutator(letRecBlock, 'args_create_with_item');
assertEquals(letRecBlock.argumentCount_, 0);
mutator._append();
+ mutator._append();
mutator._update();
- assertEquals(letRecBlock.argumentCount_, 1);
+ assertEquals(letRecBlock.argumentCount_, 2);
var letValue = letRecBlock.typedValue['VAR'];
- var argValue = letRecBlock.typedValue['ARG0'];
+ var argValue1 = letRecBlock.typedValue['ARG0'];
+ var argValue2 = letRecBlock.typedValue['ARG1'];
letValue.setVariableName('f');
- argValue.setVariableName('x');
+ argValue1.setVariableName('x');
+ argValue2.setVariableName('y');
workbench = create_mock_workbench(letRecBlock, 'EXP1');
var blocks = getFlyoutBlocksFromWorkbench(workbench);
- assertEquals(blocks.length, 2);
+ assertEquals(blocks.length, 3);
var functionApp = workbench.getWorkspace().newBlock('function_app_typed');
functionApp.typedReference['VAR'].setVariableName('f');
functionApp.typedReference['VAR'].setBoundValue(letValue);
functionApp.updateInput();
assertTrue(functionApp.resolveReference(null));
- assertEquals(functionApp.paramCount_, 1);
-
- var argBlock = workbench.getWorkspace().newBlock('variables_get_typed');
- var ref = getVariable(argBlock);
- ref.setVariableName('x');
- ref.setBoundValue(argValue);
- var param = functionApp.getInput('PARAM0').connection;
- param.connect(argBlock.outputConnection);
+ assertEquals(functionApp.paramCount_, 2);
+
+ var argBlock1 = workbench.getWorkspace().newBlock('variables_get_typed');
+ var argBlock2 = workbench.getWorkspace().newBlock('variables_get_typed');
+ var ref1 = getVariable(argBlock1);
+ var ref2 = getVariable(argBlock2);
+ ref1.setVariableName('x');
+ ref2.setVariableName('y');
+ ref1.setBoundValue(argValue1);
+ ref2.setBoundValue(argValue2);
+ var param0 = functionApp.getInput('PARAM0').connection;
+ var param1 = functionApp.getInput('PARAM1').connection;
+ param0.connect(argBlock1.outputConnection);
+ param1.connect(argBlock2.outputConnection);
var exp1 = letRecBlock.getInput('EXP1').connection;
var transferredBlock = virtually_transfer_workspace(functionApp,
| 1 |
diff --git a/userscript.user.js b/userscript.user.js @@ -362,9 +362,11 @@ var $$IMU_EXPORT$$;
var finalcb = function(resp, iserror) {
if (check_tracking_blocked(resp)) {
- // Workaround for a bug in FireMonkey
- var newdata = shallowcopy(data);
+ // Workaround for a bug in FireMonkey where it calls both onload and onerror: https://github.com/erosman/support/issues/134
+ data.onload = null;
+ data.onerror = null;
+ var newdata = shallowcopy(data);
newdata.onload = real_onload;
newdata.onerror = real_onerror;
| 7 |
diff --git a/RPGMlibrary AD+D2e/1.4.01/libRPGMaster2e.js b/RPGMlibrary AD+D2e/1.4.01/libRPGMaster2e.js @@ -67,7 +67,7 @@ const libRPGMaster = (() => { // eslint-disable-line no-unused-vars
'use strict';
const version = '1.4.01';
API_Meta.libRPGMaster.version = version;
- const lastUpdate = 1669708967;
+ const lastUpdate = 1670233770;
const schemaVersion = 0.1;
log('now in seconds is '+Date.now()/1000);
| 3 |
diff --git a/src/components/AppSwitch.js b/src/components/AppSwitch.js @@ -25,9 +25,6 @@ const TIMEOUT = 1000
* The main app route. Here we decide where to go depending on the user's credentials status
*/
class AppSwitch extends React.Component<LoadingProps, {}> {
- state = {
- activeKey: 'Splash'
- }
/**
* Triggers the required actions before navigating to any app's page
* @param {LoadingProps} props
@@ -46,6 +43,7 @@ class AppSwitch extends React.Component<LoadingProps, {}> {
* @returns {Promise<void>}
*/
checkAuthStatus = async () => {
+ this.props.navigation.navigate('Splash')
await goodWallet.ready
// when wallet is ready perform login to server (sign message with wallet and send to server)
@@ -57,10 +55,7 @@ class AppSwitch extends React.Component<LoadingProps, {}> {
const isLoggedIn = credsOrError.jwt !== undefined
if (isLoggedIn && isCitizen) {
- log.info('to AppNavigation', this.savedActiveKey)
- // this.props.navigation.navigate('AppNavigation')
- // this.props.navigation.navigate(this.activeKey)
- this.setState({ activeKey: this.savedActiveKey })
+ this.props.navigation.navigate(this.savedActiveKey)
} else {
const { jwt } = credsOrError
@@ -76,8 +71,9 @@ class AppSwitch extends React.Component<LoadingProps, {}> {
}
render() {
- const { descriptors } = this.props
- const descriptor = descriptors[this.state.activeKey]
+ const { descriptors, navigation } = this.props
+ const key = navigation.state.routes[navigation.state.index].key
+ const descriptor = descriptors[key]
return <SceneView navigation={descriptor.navigation} component={descriptor.getComponent()} />
}
}
| 0 |
diff --git a/smtp_client.js b/smtp_client.js @@ -72,11 +72,11 @@ function SMTPClient (port, host, connect_timeout, idle_timeout) {
client.emit('auth_username');
return;
}
- else if (code.match(/^3/) && msg === 'UGFzc3dvcmQ6') {
+ if (code.match(/^3/) && msg === 'UGFzc3dvcmQ6') {
client.emit('auth_password');
return;
- } else if (code.match(/^2/) && client.authenticating) {
- //TODO: logging
+ }
+ if (code.match(/^2/) && client.authenticating) {
logger.loginfo('AUTHENTICATED');
client.authenticating = false;
client.authenticated = true;
@@ -143,13 +143,12 @@ function SMTPClient (port, host, connect_timeout, idle_timeout) {
client.socket.on('connect', function () {
// Remove connection timeout and set idle timeout
client.socket.setTimeout(((idle_timeout) ? idle_timeout : 300) * 1000);
- if (client.socket.remoteAddress) {
+ if (!client.socket.remoteAddress) {
// "Value may be undefined if the socket is destroyed"
- client.remote_ip = ipaddr.process(client.socket.remoteAddress).toString();
- }
- else {
- logger.logerror('client.socket.remoteAddress undefined!');
+ logger.logdebug('socket.remoteAddress undefined');
+ return;
}
+ client.remote_ip = ipaddr.process(client.socket.remoteAddress).toString();
});
var closed = function (msg) {
| 8 |
diff --git a/src/main/java/com/conveyal/datatools/editor/models/transit/ServiceCalendar.java b/src/main/java/com/conveyal/datatools/editor/models/transit/ServiceCalendar.java @@ -214,10 +214,20 @@ public class ServiceCalendar extends Model implements Cloneable, Serializable {
Map<String, Long> tripsForRoutes = new HashMap<>();
for (Trip trip : tx.getTripsByCalendar(this.id)) {
Long count = 0L;
+
+ /**
+ * if for some reason, routeId ever was set to null (or never properly initialized),
+ * take care of that here so we don't run into null map errors.
+ */
+ if (trip.routeId == null) {
+ trip.routeId = tx.tripPatterns.get(trip.patternId).routeId;
+ }
if (tripsForRoutes.containsKey(trip.routeId)) {
count = tripsForRoutes.get(trip.routeId);
}
+ if (trip.routeId != null) {
tripsForRoutes.put(trip.routeId, count + 1);
+ }
// routeIds.add(trip.routeId);
}
this.routes = tripsForRoutes;
| 9 |
diff --git a/packages/node_modules/@node-red/runtime/lib/library/examples.js b/packages/node_modules/@node-red/runtime/lib/library/examples.js @@ -23,7 +23,7 @@ function init(_runtime) {
}
function getEntry(type,path) {
- var examples = runtime.nodes.getNodeExampleFlows();
+ var examples = runtime.nodes.getNodeExampleFlows()||{};
var result = [];
if (path === "") {
return Promise.resolve(Object.keys(examples));
| 9 |
diff --git a/modules/keyboard.js b/modules/keyboard.js @@ -376,8 +376,7 @@ function makeEmbedArrowHandler(key, shiftKey) {
} else {
this.quill.setSelection(range.index - 1, Quill.sources.USER);
}
- }
- if (shiftKey) {
+ } else if (shiftKey) {
this.quill.setSelection(
range.index,
range.length + 1,
| 1 |
diff --git a/react/src/components/accordions/components/SprkAccordionItem/SprkAccordionItem.js b/react/src/components/accordions/components/SprkAccordionItem/SprkAccordionItem.js @@ -11,7 +11,7 @@ class SprkAccordionItem extends Component {
// TODO: Remove isDefaultOpen in future issue #1299
const { isDefaultOpen, isOpen = isDefaultOpen } = this.props;
this.state = {
- isOpen: isOpen || false,
+ isItemOpen: isOpen || false,
height: isOpen ? 'auto' : 0,
};
this.toggle = this.toggle.bind(this);
@@ -21,8 +21,8 @@ class SprkAccordionItem extends Component {
const { onToggle } = this.props;
e.preventDefault();
this.setState((prevState) => ({
- isOpen: !prevState.isOpen,
- height: !prevState.isOpen ? 'auto' : 0,
+ isItemOpen: !prevState.isItemOpen,
+ height: !prevState.isItemOpen ? 'auto' : 0,
}));
if (onToggle) onToggle(e);
}
@@ -47,19 +47,21 @@ class SprkAccordionItem extends Component {
iconNameClosed,
leadingIcon,
leadingIconAdditionalClasses,
+ isOpen,
+ isDefaultOpen,
...other
} = this.props;
- const { isOpen, height } = this.state;
+ const { isItemOpen, height } = this.state;
const iconClasses = classnames(
'sprk-c-Icon--toggle sprk-c-Accordion__icon sprk-c-Icon--xl',
- { 'sprk-c-Icon--open': isOpen },
+ { 'sprk-c-Icon--open': isItemOpen },
iconAdditionalClasses,
);
const itemClassNames = classnames(
'sprk-c-Accordion__item',
- { 'sprk-c-Accordion__item--open': isOpen },
+ { 'sprk-c-Accordion__item--open': isItemOpen },
additionalClasses,
);
@@ -86,7 +88,7 @@ class SprkAccordionItem extends Component {
additionalClasses="sprk-c-Accordion__summary"
data-analytics={analyticsString}
onClick={this.toggle}
- aria-expanded={isOpen ? 'true' : 'false'}
+ aria-expanded={isItemOpen ? 'true' : 'false'}
>
{leadingIcon && (
<SprkIcon
@@ -96,7 +98,7 @@ class SprkAccordionItem extends Component {
)}
<h3 className={headingClassNames}>{heading}</h3>
<SprkIcon
- iconName={isOpen ? iconNameOpen : iconNameClosed}
+ iconName={isItemOpen ? iconNameOpen : iconNameClosed}
additionalClasses={iconClasses}
/>
</SprkLink>
| 3 |
diff --git a/core/server/api/v3/preview.js b/core/server/api/v3/preview.js -const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const models = require('../../models');
const ALLOWED_INCLUDES = ['authors', 'tags'];
-
+const messages = {
+ postNotFound: 'Post not found.'
+};
module.exports = {
docName: 'preview',
@@ -31,7 +33,7 @@ module.exports = {
.then((model) => {
if (!model) {
throw new errors.NotFoundError({
- message: i18n.t('errors.api.posts.postNotFound')
+ message: tpl(messages.postNotFound)
});
}
| 14 |
diff --git a/js/views/modals/orderDetail/Contract.js b/js/views/modals/orderDetail/Contract.js +import renderjson from '../../../lib/renderjson';
import { capitalize } from '../../../utils/string';
import BaseVw from '../../baseVw';
import loadTemplate from '../../../utils/loadTemplate';
@@ -75,16 +76,16 @@ export default class extends BaseVw {
if (contract) {
this.$('.js-jsonContractContainer')
- .append(window.renderjson.set_show_to_level(1)(contract));
+ .append(renderjson.set_show_to_level(1)(contract));
} else {
if (buyerContract) {
this.$('.js-jsonBuyerContractContainer')
- .append(window.renderjson.set_show_to_level(1)(buyerContract));
+ .append(renderjson.set_show_to_level(1)(buyerContract));
}
if (vendorContract) {
this.$('.js-jsonVendorContractContainer')
- .append(window.renderjson.set_show_to_level(1)(vendorContract));
+ .append(renderjson.set_show_to_level(1)(vendorContract));
}
}
});
| 11 |
diff --git a/src/mixins/linkConfig.js b/src/mixins/linkConfig.js @@ -22,6 +22,7 @@ export default {
target: null,
listeningToMouseup: false,
vertices: null,
+ anchorPointFunction: getDefaultAnchorPoint,
};
},
watch: {
@@ -96,9 +97,8 @@ export default {
};
this.shape[endpoint](shape, {
- anchor: {
- name: 'closestPort',
- args: { getConnectionPoint, shape, paper: this.paper },
+ anchor: () => {
+ return this.anchorPointFunction(getConnectionPoint(), shape.findView(this.paper));
},
connectionPoint: { name: 'boundary' },
});
@@ -202,8 +202,8 @@ export default {
},
setupLinkTools() {
const verticesTool = new linkTools.Vertices();
- const sourceAnchorTool = new linkTools.SourceAnchor({ snap: getDefaultAnchorPoint });
- const targetAnchorTool = new linkTools.TargetAnchor({ snap: getDefaultAnchorPoint });
+ const sourceAnchorTool = new linkTools.SourceAnchor({ snap: this.anchorPointFunction });
+ const targetAnchorTool = new linkTools.TargetAnchor({ snap: this.anchorPointFunction });
const segmentsTool = new linkTools.Segments();
const toolsView = new dia.ToolsView({
tools: [verticesTool, segmentsTool, sourceAnchorTool, targetAnchorTool],
| 11 |
diff --git a/src/components/MyTest/Bubbles.js b/src/components/MyTest/Bubbles.js @@ -99,8 +99,7 @@ export default Bubbles;
*/
export function showDetail(d) {
// change outline to indicate hover state.
- d3.select(this).attr('stroke', 'black')
- .attr('data', 'data-tip');
+ d3.select(this).attr('stroke', 'black');
const content = `<span class="title">${d.name}</span>
<br/><hr>`
| 2 |
diff --git a/src/components/core/events/onResize.js b/src/components/core/events/onResize.js @@ -20,23 +20,13 @@ export default function () {
swiper.updateSize();
swiper.updateSlides();
- if (params.freeMode) {
- const newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate());
- swiper.setTranslate(newTranslate);
- swiper.updateActiveIndex();
- swiper.updateSlidesClasses();
-
- if (params.autoHeight) {
- swiper.updateAutoHeight();
- }
- } else {
swiper.updateSlidesClasses();
if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
swiper.slideTo(swiper.slides.length - 1, 0, false, true);
} else {
swiper.slideTo(swiper.activeIndex, 0, false, true);
}
- }
+
if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {
swiper.autoplay.run();
}
| 2 |
diff --git a/Source/ui/UI.js b/Source/ui/UI.js @@ -33,8 +33,13 @@ export function message(text, document) {
* by pressing the OK button.
*/
export function alert(title, text) {
- const app = NSApplication.sharedApplication()
- app.displayDialog_withTitle(text, title)
+ const dialog = NSAlert.alloc().init()
+ dialog.setMessageText(title)
+ dialog.setInformativeText(text)
+ if (__command.pluginBundle() && __command.pluginBundle().icon()) {
+ dialog.icon = __command.pluginBundle().icon()
+ }
+ return dialog.runModal()
}
/**
@@ -75,6 +80,9 @@ export function getSelectionFromUser(msg, items, selectedItemIndex = 0) {
dialog.addButtonWithTitle('OK')
dialog.addButtonWithTitle('Cancel')
dialog.setAccessoryView(accessory)
+ if (__command.pluginBundle() && __command.pluginBundle().icon()) {
+ dialog.icon = __command.pluginBundle().icon()
+ }
const responseCode = dialog.runModal()
const sel = accessory.indexOfSelectedItem()
| 4 |
diff --git a/deepfence_ui/Dockerfile b/deepfence_ui/Dockerfile # docker build -t deepfenceio/alpine-node:10 -f Dockerfile.node .
-FROM deepfenceio/alpine-node:10 AS build
+FROM node:14.18.1-alpine3.14 AS build
ADD . /home/deepfence/
ENV NPM_CONFIG_LOGLEVEL=warn NPM_CONFIG_PROGRESS=false NODE_OPTIONS="--max_old_space_size=4096"
RUN apk update \
&& apk add --no-cache git bash python2 make g++ \
- && cd /home/deepfence && yarn add webpack-cli --dev && yarn --pure-lockfile \
+ && cd /home/deepfence && yarn --pure-lockfile \
&& cd /home/deepfence && yarn run build \
&& cd /home/deepfence \
&& rm -rf app docs test webpack.* \
@@ -22,7 +22,7 @@ LABEL deepfence.role=system
WORKDIR /home/deepfence
ENV BACKEND_PORT=8004 YARN_VERSION=latest NPM_CONFIG_LOGLEVEL=warn NPM_CONFIG_PROGRESS=false
RUN apk update && apk add --no-cache yarn && rm -rf /var/cache/apk/*
-COPY --from=build /usr/bin/node /usr/bin/
+COPY --from=build /usr/local/bin/node /usr/bin/
COPY --from=build /home/deepfence/build /home/deepfence/build
COPY --from=build /home/deepfence/console_version.txt /home/deepfence/console_version.txt
COPY --from=build /home/deepfence/entrypoint.sh /home/deepfence/entrypoint.sh
| 3 |
diff --git a/lib/sketchPage.js b/lib/sketchPage.js // HOT KEYS ARE RECOGNIZED BY THE SKETCH PAGE.
var hotKeyMenu = [
- ['spc', "show tool tips"],
+ ['spc', "toggle tool tips"],
['C' , "casual font"],
['b' , "nudge line"],
['F' , "toggle fog"],
| 3 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -24,7 +24,7 @@ import {
colors,
} from './constants.js';
// import { setState } from './state.js';
-import FontFaceObserver from './fontfaceobserver.js';
+// import FontFaceObserver from './fontfaceobserver.js';
const localVector = new THREE.Vector3();
const localVector2 = new THREE.Vector3();
@@ -744,13 +744,14 @@ const wheelDotCanvas = (() => {
})();
document.body.appendChild(wheelDotCanvas);
-let wheelReady = false;
-const loadPromise = Promise.all([
+/* let wheelReady = false;
+Promise.all([
new FontFaceObserver('Muli').load(null, 10000),
new FontFaceObserver('Font Awesome 5 Pro').load(weaponIcons.join(''), 10000),
]).then(() => {
wheelReady = true;
-});
+}); */
+let wheelReady = true;
const _renderWheel = (() => {
let lastSelectedSlice = 0;
return selectedSlice => {
| 2 |
diff --git a/planet.js b/planet.js @@ -602,3 +602,8 @@ planet.connect = async (rn, {online = true} = {}) => {
await _loadLiveState(roomName);
}
};
+planet.reload = () => {
+ const b = _serializeState(state);
+ const s = _deserializeState(b.buffer);
+ return s;
+};
\ No newline at end of file
| 0 |
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml @@ -19,10 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use PHP 7.4
- uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
+ uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- tools: composer, phpcbf, phpcs
- name: Get Composer Cache Directory
id: composer-cache
run: |
| 2 |
diff --git a/packages/browserify/src/generatePrelude.js b/packages/browserify/src/generatePrelude.js // such as the upgradeable SES and app specific config.
const fs = require('fs')
-const path = require('path')
const jsonStringify = require('json-stable-stringify')
-const preludeTemplate = fs.readFileSync(path.join(__dirname, '/preludeTemplate.js'))
-const sesSrc = fs.readFileSync(path.join(__dirname, '/../lib/ses.umd.js'))
-const makeGetEndowmentsForConfigSrc = fs.readFileSync(path.join(__dirname, '/makeGetEndowmentsForConfig.js'))
-const makePrepareRealmGlobalFromConfigSrc = fs.readFileSync(path.join(__dirname, '/makePrepareRealmGlobalFromConfig.js'))
+/* eslint-disable */
+const preludeTemplate = fs.readFileSync(__dirname + '/preludeTemplate.js', 'utf8')
+const sesSrc = fs.readFileSync(__dirname + '/../lib/ses.umd.js', 'utf8')
+const makeGetEndowmentsForConfigSrc = fs.readFileSync(__dirname + '/makeGetEndowmentsForConfig.js', 'utf8')
+const makePrepareRealmGlobalFromConfigSrc = fs.readFileSync(__dirname + '/makePrepareRealmGlobalFromConfig.js', 'utf8')
+/* eslint-enable */
module.exports = generatePrelude
| 13 |
diff --git a/polyfills/requestIdleCallback/polyfill.js b/polyfills/requestIdleCallback/polyfill.js function scheduleIdleWork() {
if (!isIdleScheduled) {
isIdleScheduled = true;
+ try {
+ // Safari 9 throws "TypeError: Value is not a sequence"
port.postMessage(messageKey, '*');
+ } catch (error) {
+ port.postMessage(messageKey);
+ }
}
}
return ++idleCallbackIdentifier;
};
+ // Polyfill IdleDeadline.
+ // @example
+ // requestIdleCallback(function (deadline) {
+ // console.log(deadline instanceof IdleDeadline); // true
+ // });
global.IdleDeadline = function IdleDeadline() {
throw new TypeError('Illegal constructor');
};
| 9 |
diff --git a/commands/reason.js b/commands/reason.js @@ -9,7 +9,7 @@ command.usage = 'moderationId <reason>';
command.names = ['reason','edit'];
command.execute = async (message, args, database, bot) => {
- if(!await util.isMod(message.member)) {
+ if(!await util.isMod(message.member) && !message.member.hasPermission('VIEW_AUDIT_LOG')) {
await message.react(util.icons.error);
return;
}
| 11 |
diff --git a/modules/xerte/parent_templates/Nottingham/models_html5/gapFill.html b/modules/xerte/parent_templates/Nottingham/models_html5/gapFill.html var dropDownSort = x_currentPageXML.getAttribute("dropDownSort");
if (dropDownSort != undefined && dropDownSort != "" && dropDownSort != "alphabetic") // must be random
allAnswers.sort(
- function() { return 0.5 - Math.random(); }
+ function() { return Math.random() - 0.5; }
);
else
allAnswers.sort();
}
}
- var labels = $("#labelHolder .label").sort(function() { return (Math.round(Math.random())-0.5); });
+ var labels = $("#labelHolder .label").sort(function() { return Math.random() - 0.5; });
for (var i=0; i<labels.length; i++) {
$(labels[i])
.appendTo($("#labelHolder"))
| 1 |
diff --git a/docs/common/changelog.md b/docs/common/changelog.md @@ -33,6 +33,12 @@ this will be evened out from v24
## Target version 7.0.0
+### 30
+
+- Set statusbar background color on hotel detail screen, MOBILE-2920
+- Enable date change in the header, MOBILE-2972
+- Add sentry logging
+
### v25
- Move map/list button to the right of the header on iPad, MOBILE-2427
| 0 |
diff --git a/components/api-docs/v2/upload.js b/components/api-docs/v2/upload.js @@ -3,7 +3,7 @@ import * as System from "~/components/system";
import CodeBlock from "~/components/system/CodeBlock";
-const EXAMPLE_CODE_JS = (key) => `const url = 'https://uploads.slate.host/api/public';
+const EXAMPLE_CODE_JS = (key) => `const url = 'https://uploads.slate.host/api/v2/public';
let file = e.target.files[0];
let data = new FormData();
@@ -19,7 +19,7 @@ const response = await fetch(url, {
const EXAMPLE_CODE_PY = (key) => `import requests
-url = "https://uploads.slate.host/api/public"
+url = "https://uploads.slate.host/api/v2/public"
files = {
"file": open("example-file.txt", "rb")
}
@@ -32,7 +32,7 @@ r = requests.post(url, headers=headers, files=files)`;
const SLATE_EXAMPLE_CODE_JS = (
key,
slateId
-) => `const url = 'https://uploads.slate.host/api/public/${slateId}'; // collection ID
+) => `const url = 'https://uploads.slate.host/api/v2/public/${slateId}'; // collection ID
let file = e.target.files[0];
let data = new FormData();
@@ -49,7 +49,7 @@ const json = await response.json();`;
const SLATE_EXAMPLE_CODE_PY = (key, slateId) => `import requests
-url = "https://uploads.slate.host/api/public/${slateId}" # collection ID
+url = "https://uploads.slate.host/api/v2/public/${slateId}" # collection ID
files = {
"file": open("example-file.txt", "rb")
}
| 3 |
diff --git a/src/scribe-interface.js b/src/scribe-interface.js @@ -5,7 +5,7 @@ var Scribe = require('scribe-editor');
var config = require('./config');
var scribePluginFormatterPlainTextConvertNewLinesToHTML = require('scribe-plugin-formatter-plain-text-convert-new-lines-to-html');
-var scribePluginLinkPromptCommand = require('scribe-plugin-link-prompt-command');
+var scribePluginLinkPromptCommand = require('./blocks/scribe-plugins/scribe-link-prompt-plugin');
var scribePluginSanitizer = require('scribe-plugin-sanitizer');
var sanitizeDefaults = {
| 11 |
diff --git a/package.json b/package.json "start": "grunt server",
"lint": "eslint --fix src/js plugin lang test Gruntfile.js",
"download:selenium": "if [ ! -e test/libs/selenium-server-standalone.jar ]; then wget http://selenium-release.storage.googleapis.com/3.6/selenium-server-standalone-3.6.0.jar -O test/libs/selenium-server-standalone.jar; fi",
- "test": "grunt test",
+ "test": "karma start karma.conf.js --single-run",
"test:e2e": "npm run download:selenium && concurrently --kill-others 'node test/e2e/static-server.js' 'nightwatch --config test/nightwatch.conf.js'",
"test:e2e-saucelabs": "npm run dist && npm run download:selenium && nightwatch --config test/nightwatch.conf.js --env ie9,ie10,ie11,chrome,firefox",
"test:travis": "grunt test-travis --verbose",
| 14 |
diff --git a/lib/plugins/manifest.js b/lib/plugins/manifest.js @@ -22,6 +22,7 @@ const manifestKeyPrefixHelper = require('../utils/manifest-key-prefix-helper');
*/
module.exports = function(plugins, webpackConfig) {
const manifestPluginOptions = {
+ seed: {},
basePath: manifestKeyPrefixHelper(webpackConfig),
// always write a manifest.json file, even with webpack-dev-server
writeToFileEmit: true,
| 12 |
diff --git a/Gruntfile.js b/Gruntfile.js @@ -14,11 +14,11 @@ var chrome_browsers = [
platform: 'OS X 10.10',
version: '44.0'
},
- {
- browserName: 'chrome',
- platform: 'Windows 10',
- version: '43.0'
- },
+ // {
+ // browserName: 'chrome',
+ // platform: 'Windows 10',
+ // version: '43.0'
+ // },
{
browserName: 'chrome',
platform: 'Linux',
@@ -32,11 +32,11 @@ var firefox_browsers = [
platform: 'Windows 10',
version: '40.0'
},
- {
- browserName: 'firefox',
- platform: 'OS X 10.10',
- version: '39.0'
- },
+ // {
+ // browserName: 'firefox',
+ // platform: 'OS X 10.10',
+ // version: '39.0'
+ // },
{
browserName: 'firefox',
platform: 'Linux',
@@ -52,13 +52,13 @@ var ios_browsers = [
platform: 'OS X 10.10',
version: '9.0'
},
- {
- browserName: 'iphone',
- deviceName: 'iPhone 6',
- deviceOrientation: 'portrait',
- platform: 'OS X 10.10',
- version: '9.1'
- },
+ // {
+ // browserName: 'iphone',
+ // deviceName: 'iPhone 6',
+ // deviceOrientation: 'portrait',
+ // platform: 'OS X 10.10',
+ // version: '9.1'
+ // },
{
browserName: 'iphone',
deviceName: 'iPhone 6',
@@ -76,34 +76,34 @@ var android_browsers = [
platform: 'Linux',
version: '5.1'
},
- {
- browserName: 'android',
- deviceName: 'Google Nexus 7 HD Emulator',
- deviceOrientation: 'portrait',
- platform: 'Linux',
- version: '4.4'
- },
- {
- browserName: 'android',
- deviceName: 'Google Nexus 7C Emulator',
- deviceOrientation: 'portrait',
- platform: 'Linux',
- version: '4.3'
- },
- {
- browserName: 'android',
- deviceName: 'LG Nexus 4 Emulator',
- deviceOrientation: 'portrait',
- platform: 'Linux',
- version: '4.2'
- },
- {
- browserName: 'android',
- deviceName: 'HTC One X Emulator',
- deviceOrientation: 'portrait',
- platform: 'Linux',
- version: '4.1'
- },
+ // {
+ // browserName: 'android',
+ // deviceName: 'Google Nexus 7 HD Emulator',
+ // deviceOrientation: 'portrait',
+ // platform: 'Linux',
+ // version: '4.4'
+ // },
+ // {
+ // browserName: 'android',
+ // deviceName: 'Google Nexus 7C Emulator',
+ // deviceOrientation: 'portrait',
+ // platform: 'Linux',
+ // version: '4.3'
+ // },
+ // {
+ // browserName: 'android',
+ // deviceName: 'LG Nexus 4 Emulator',
+ // deviceOrientation: 'portrait',
+ // platform: 'Linux',
+ // version: '4.2'
+ // },
+ // {
+ // browserName: 'android',
+ // deviceName: 'HTC One X Emulator',
+ // deviceOrientation: 'portrait',
+ // platform: 'Linux',
+ // version: '4.1'
+ // },
{
browserName: 'android',
deviceName: 'HTC Evo 3D Emulator',
@@ -119,11 +119,11 @@ var ie_browsers = [
platform: 'Windows 10',
version: '11.0'
},
- {
- browserName: 'internet explorer',
- platform: 'Windows 8.1',
- version: '11.0'
- },
+ // {
+ // browserName: 'internet explorer',
+ // platform: 'Windows 8.1',
+ // version: '11.0'
+ // },
{
browserName: 'internet explorer',
platform: 'Windows 7',
| 2 |
diff --git a/lib/jsdom/living/helpers/create-event-accessor.js b/lib/jsdom/living/helpers/create-event-accessor.js @@ -21,6 +21,8 @@ exports.appendHandler = function appendHandler(el, eventName) {
let returnValue = null;
const thisValue = idlUtils.tryWrapperForImpl(event.currentTarget);
+ // https://heycam.github.io/webidl/#es-invoking-callback-functions
+ if (typeof callback === "function") {
if (specialError) {
returnValue = callback.call(
thisValue, event.message,
@@ -30,6 +32,7 @@ exports.appendHandler = function appendHandler(el, eventName) {
const eventWrapper = idlUtils.wrapperForImpl(event);
returnValue = callback.call(thisValue, eventWrapper);
}
+ }
if (event.type === "beforeunload") { // TODO: we don't implement BeforeUnloadEvent so we can't brand-check here
// Perform conversion which in the spec is done by the event handler return type being DOMString?
@@ -183,13 +186,5 @@ function eventHandlerArgCoercion(val) {
return null;
}
- if (val === null || val === undefined) {
- return null;
- }
-
- if (typeof val !== "function") {
- return () => {};
- }
-
return val;
}
| 11 |
diff --git a/assets/src/libraries/BookList.test.js b/assets/src/libraries/BookList.test.js @@ -13,7 +13,7 @@ const books = [
describe('Book list', () => {
it('renders without crashing', () => {
- const bookList = shallowBookList();
+ const bookList = shallowBookList({ books: [] });
expect(bookList.exists()).toBeTruthy();
});
| 0 |
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb @@ -610,15 +610,16 @@ describe User do
Cartodb::config[:avatars] = @avatars_config
end
- it 'should be enabled by default' do
+ it 'should be enabled by default (every setting but false will enable it)' do
user = ::User.new
- user.gravatar_enabled?.should be_true
Cartodb::config[:avatars] = {}
user.gravatar_enabled?.should be_true
Cartodb::config[:avatars] = { 'gravatar_enabled' => true }
user.gravatar_enabled?.should be_true
Cartodb::config[:avatars] = { 'gravatar_enabled' => 'true' }
user.gravatar_enabled?.should be_true
+ Cartodb::config[:avatars] = { 'gravatar_enabled' => 'wadus' }
+ user.gravatar_enabled?.should be_true
end
it 'can be disabled' do
| 2 |
diff --git a/test/expected/email-comb.html b/test/expected/email-comb.html <!DOCTYPE html>
<html>
<head>
- <style>
- .w-full {
+ <style>.w-full {
width: 100%
}
.text-center {
*/
table {
/*@editable*/background-color: #eeeeee !important;
- }
- </style>
+ }</style>
</head>
<body>
<!-- An HTML comment to preserve -->
| 13 |
diff --git a/models/tag.js b/models/tag.js @@ -6,7 +6,7 @@ var logger = require('../lib/logger');
var _ = require('underscore');
var lengthValidator = function(str) {
- return validator.isLength(str, {min: 0, max: 15})
+ return validator.isLength(str, {min: 0, max: 40})
}
var tagSchema = new mongoose.Schema({
name: {type: String, required: true, unique: true},
| 1 |
diff --git a/config/routes.rb b/config/routes.rb @@ -479,9 +479,6 @@ CartoDB::Application.routes.draw do
# Permissions
put '(/user/:user_domain)(/u/:user_domain)/api/v1/perm/:id' => 'permissions#update', as: :api_v1_permissions_update
-
- # Api Keys
- post '(/user/:user_domain)(/u/:user_domain)/api/v1/api_keys' => 'api_keys#create', as: :api_v1_api_keys_create
end
scope module: 'api/json', defaults: { format: :json } do
@@ -582,6 +579,8 @@ CartoDB::Application.routes.draw do
resource :metrics, only: [:create]
+ resource :api_keys, only: [:create]
+
scope '/viz/:visualization_id', constraints: { id: /[^\/]+/ } do
resources :analyses, only: [:show, :create, :update, :destroy], constraints: { id: /[^\/]+/ }
resources :mapcaps, only: [:index, :show, :create, :destroy], constraints: { id: /[^\/]+/ }
| 5 |
diff --git a/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.java b/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.java @@ -174,6 +174,12 @@ public class RCTMGLMapView extends MapView implements
if (feature instanceof RCTSource) {
mSources.remove(childPosition);
} else if (feature instanceof RCTMGLPointAnnotation) {
+ RCTMGLPointAnnotation annotation = (RCTMGLPointAnnotation) feature;
+
+ if (annotation.getMapboxID() == mActiveMarkerID) {
+ mActiveMarkerID = -1;
+ }
+
mPointAnnotations.remove(childPosition);
}
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.