code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js @@ -69,6 +69,7 @@ angular.module('bitcoincom.directives')
if (currencySplit.length === 2) {
$scope.currency = currencySplit[1];
}
+ $scope.currency = $scope.currency || '';
var parsed = parseFloat($scope.value);
| 9 |
diff --git a/app/screens/homepage/search/SearchHeader.js b/app/screens/homepage/search/SearchHeader.js @@ -94,6 +94,7 @@ export default class SearchHeader extends React.Component<Props, State> {
backgroundColor: 'white',
shadowColor: 'black',
shadowOffset: { width: 0, height: 4 },
+ elevation: 5, // Android only
shadowOpacity: 0.3,
padding: 20,
zIndex: 1, // must be above the location suggestions (because of shadow)
| 0 |
diff --git a/menu/src/components/IFramePage/IFramePage.tsx b/menu/src/components/IFramePage/IFramePage.tsx -import React, { useEffect } from 'react';
+import React, { useEffect } from "react";
import { Box, makeStyles, Theme } from "@material-ui/core";
-import { IFramePostData, useIFrameCtx } from '../../provider/IFrameProvider';
-import { debugLog } from '../../utils/debugLog';
+import { IFramePostData, useIFrameCtx } from "../../provider/IFrameProvider";
+import { debugLog } from "../../utils/debugLog";
const useStyles = makeStyles((theme: Theme) => ({
root: {
@@ -10,11 +10,11 @@ const useStyles = makeStyles((theme: Theme) => ({
borderRadius: 15,
},
iframe: {
- border: '0px',
+ border: "0px",
borderRadius: 15,
- height: '100%',
- width: '100%',
- }
+ height: "100%",
+ width: "100%",
+ },
}));
export const IFramePage: React.FC<{ visible: boolean }> = ({ visible }) => {
@@ -25,18 +25,20 @@ export const IFramePage: React.FC<{ visible: boolean }> = ({ visible }) => {
// Handles listening for postMessage requests from iFrame
useEffect(() => {
const handler = (event: MessageEvent) => {
- const data: IFramePostData = JSON.parse(event.data)
- if (!data?.__isFromChild) return
+ const data: IFramePostData =
+ typeof event.data === "string" ? JSON.parse(event.data) : event.data;
- debugLog('Post from iFrame', data)
+ if (!data?.__isFromChild) return;
- handleChildPost(data)
- }
+ debugLog("Post from iFrame", data);
+
+ handleChildPost(data);
+ };
- window.addEventListener('message', handler)
+ window.addEventListener("message", handler);
- return () => window.removeEventListener('message', handler)
- }, [handleChildPost])
+ return () => window.removeEventListener("message", handler);
+ }, [handleChildPost]);
return (
<Box
| 1 |
diff --git a/bl-kernel/helpers/text.class.php b/bl-kernel/helpers/text.class.php @@ -176,7 +176,7 @@ class Text {
}
}
- $string = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $string);
+ $string = preg_replace("/[^a-zA-Z0-9\/_|+. -]/", '', $string);
$string = self::lowercase($string);
$string = preg_replace("/[\/_|+ -]+/", $separator, $string);
$string = trim($string, '-');
| 11 |
diff --git a/Projects/Bitcoin-Factory/TS/Bot-Modules/Test-Client/TestClient.js b/Projects/Bitcoin-Factory/TS/Bot-Modules/Test-Client/TestClient.js }
async function buildModel(nextTestCase) {
- if (nextTestCase.pythonScriptName === undefined) { nextTestCase.pythonScriptName = "Bitcoin_Factory_RL.py" }
+ if (nextTestCase.pythonScriptName === undefined) { nextTestCase.pythonScriptName = "Bitcoin_Factory_LSTM.py" }
console.log('')
console.log('-------------------------------------------------------- Test Case # ' + nextTestCase.id + ' / ' + nextTestCase.totalCases + ' --------------------------------------------------------')
console.log('')
| 13 |
diff --git a/packages/nexrender-core/src/assets/commandLineRenderer.jsx b/packages/nexrender-core/src/assets/commandLineRenderer.jsx -module.exports = /*syntax:js*/`// Command line renderer for After Effects. (nexrender-patch-v1.0.0)
+module.exports = /*syntax:js*/ `// Command line renderer for After Effects. (nexrender-patch-v1.0.1)
// This function constructs an AECommandLineRenderer object.
// One and only one of these will be created to perform rendering tasks
@@ -616,15 +616,14 @@ function AECommandLineRenderer() {
}
try {
- // To force eval to use the global scope
- // we cant use eval.call or eval.apply directly
- // we have to use a closure to force it to do this
+ // Use evalFile instead of eval to make the script path context
+ // the same as the scriptFile
//
- // This is temporary till libraries are auto-included in Startup folder
- // (function(scriptString) {
- // eval(scriptString);
- // }).apply($.global, [scriptFile.read()]);
- eval(scriptFile.read());
+ // For example using eval(), the $.fileName would be the commandLineRenderer's
+ // path and we want the executing scriptFile's path for our fallback
+ // Using evalFile evaluates the file in another context
+
+ $.evalFile(scriptFile)
} catch (e) {
if (this.log_file) {
this.log_file.writeln(this.MSG_SCRIPT_CAN_NOT_EXEC + this.in_script_path);
@@ -999,4 +998,4 @@ function AECommandLineRenderer() {
}
var gAECommandLineRenderer = new AECommandLineRenderer();
-`
+`;
| 4 |
diff --git a/lib/apollo/apolloClient.ts b/lib/apollo/apolloClient.ts @@ -25,9 +25,9 @@ type Options = {
onResponse?: any
}
-function mergeExistingData(existing, incoming) {
- // Null values should be overwritten by the incoming value
- if (!existing) return incoming
+function mergeNullableData(existing, incoming) {
+ // only merge truthy objects
+ if (!existing || !incoming) return incoming
return { ...existing, ...incoming }
}
@@ -54,7 +54,7 @@ function createApolloClient(
Discussion: {
fields: {
userPreference: {
- merge: mergeExistingData
+ merge: mergeNullableData
}
}
}
| 9 |
diff --git a/package.json b/package.json "devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
- "@hackoregon/civic-babel-presets": "^1.0.0-alpha.1c62c05f",
"@storybook/addon-a11y": "^5.0.6",
"@storybook/addon-actions": "^5.0.6",
"@storybook/addon-info": "^5.0.6",
| 2 |
diff --git a/lib/assets/test/spec/builder/editor/widgets/widgets-view.spec.js b/lib/assets/test/spec/builder/editor/widgets/widgets-view.spec.js @@ -17,8 +17,6 @@ describe('editor/widgets/widgets-view', function () {
var goToWidgetSpy;
function createLayerDefinitionsCollection (layerDefinitionModel) {
- var resolveFn = null;
- var calls = [];
var layerDefinitionsCollection = new Backbone.Collection([layerDefinitionModel]);
layerDefinitionsCollection.loadAllQueryGeometryModels = function (callback) {
| 1 |
diff --git a/reference/api/keys.md b/reference/api/keys.md @@ -85,21 +85,21 @@ A list of indexes permitted for the key. `["*"]` for all indexes.
**Modifiable:** yes
**Mandatory:** yes
-Expiration date and time of the key represented in **ISO-8601** format. `null` if the key never expires.
+Date and time when the key will expire, represented in **ISO-8601** format. `null` if the key never expires.
#### `createdAt`
**Type:** string
**Modifiable:** no
-Date and time the key was created, represented in **ISO-8601** format.
+Date and time when the key was created, represented in **ISO-8601** format.
#### `updatedAt`
**Type:** string
**Modifiable:** no
-Date and time the key was last updated, represented in **ISO-8601** format.
+Date and time when the key was last updated, represented in **ISO-8601** format.
## Get one key
| 7 |
diff --git a/test.js b/test.js @@ -43,7 +43,7 @@ let proxies = [
/* ------------------------------------------------------------------------ */
-const exchange = new (ccxt)[exchangeId] ({ verbose: verbose, enableRateLimit: true })
+const exchange = new (ccxt)[exchangeId] ({ verbose: verbose })
//-----------------------------------------------------------------------------
@@ -78,6 +78,7 @@ let human_value = function (price) {
//-----------------------------------------------------------------------------
let testExchangeSymbolTicker = async (exchange, symbol) => {
+ await sleep (exchange.rateLimit)
log (exchange.id.green, symbol.green, 'fetching ticker...')
let ticker = await exchange.fetchTicker (symbol)
log (exchange.id.green, symbol.green, 'ticker',
@@ -95,6 +96,7 @@ let testExchangeSymbolTicker = async (exchange, symbol) => {
}
let testExchangeSymbolOrderbook = async (exchange, symbol) => {
+ await sleep (exchange.rateLimit)
log (exchange.id.green, symbol.green, 'fetching order book...')
let orderbook = await exchange.fetchOrderBook (symbol)
log (exchange.id.green, symbol.green,
@@ -143,6 +145,7 @@ let testExchangeSymbolTrades = async (exchange, symbol) => {
let testExchangeSymbol = async (exchange, symbol) => {
+ await sleep (exchange.rateLimit)
await testExchangeSymbolTicker (exchange, symbol)
if (exchange.hasFetchTickers) {
@@ -210,6 +213,8 @@ let testExchangeSymbol = async (exchange, symbol) => {
let testExchangeFetchOrders = async (exchange) => {
+ await sleep (exchange.rateLimit)
+
try {
log (exchange.id.green, 'fetching orders...')
@@ -232,6 +237,7 @@ let testExchangeFetchOrders = async (exchange) => {
let testExchangeBalance = async (exchange, symbol) => {
+ await sleep (exchange.rateLimit)
log (exchange.id.green, 'fetching balance...')
let balance = await exchange.fetchBalance ()
@@ -317,6 +323,7 @@ let testExchange = async exchange => {
await loadExchange (exchange)
+ let delay = exchange.rateLimit
let symbol = exchange.symbols[0]
let symbols = [
'BTC/USD',
@@ -353,6 +360,7 @@ let testExchange = async exchange => {
log (exchange.id.green, 'fetching orders not supported')
}
+ // sleep (delay)
// try {
// let marketSellOrder =
// await exchange.createMarketSellOrder (exchange.symbols[0], 1)
@@ -361,6 +369,7 @@ let testExchange = async exchange => {
// console.log (exchange.id, 'error', 'market sell', e)
// }
+ // sleep (delay)
// try {
// let marketBuyOrder = await exchange.createMarketBuyOrder (exchange.symbols[0], 1)
// console.log (exchange.id, 'ok', marketBuyOrder)
@@ -368,6 +377,7 @@ let testExchange = async exchange => {
// console.log (exchange.id, 'error', 'market buy', e)
// }
+ // sleep (delay)
// try {
// let limitSellOrder = await exchange.createLimitSellOrder (exchange.symbols[0], 1, 3000)
// console.log (exchange.id, 'ok', limitSellOrder)
@@ -375,6 +385,7 @@ let testExchange = async exchange => {
// console.log (exchange.id, 'error', 'limit sell', e)
// }
+ // sleep (delay)
// try {
// let limitBuyOrder = await exchange.createLimitBuyOrder (exchange.symbols[0], 1, 3000)
// console.log (exchange.id, 'ok', limitBuyOrder)
@@ -469,4 +480,3 @@ let tryAllProxies = async function (exchange, proxies) {
}) ()
-
| 13 |
diff --git a/userscript.user.js b/userscript.user.js // ==UserScript==
// @name Image Max URL
+// @name:ko Image Max URL
+// @name:fr Image Max URL
+// @name:es Image Max URL
+// @name:ru Image Max URL
+// @name:zh Image Max URL
+// @name:zh-CN Image Max URL
+// @name:zh-TW Image Max URL
+// @name:zh-HK Image Max URL
// @namespace http://tampermonkey.net/
// @version 0.13.10
// @description Finds larger or original versions of images for 6800+ websites, including a powerful image popup feature
@@ -16145,6 +16153,8 @@ var $$IMU_EXPORT$$;
// https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/2c/2c43030ea4900ebfcd3c42a4e665e9d926b488ef_full.jpg
// https://steamcdn-a.akamaihd.net/steam/apps/256659790/movie480.webm?t=1452876592
// https://steamcdn-a.akamaihd.net/steam/apps/256659790/movie_max.webm?t=1452876592
+ // https://steamcdn-a.akamaihd.net/steam/apps/256787896/movie480_vp9.webm?t=1592147233
+ // https://steamcdn-a.akamaihd.net/steam/apps/256787896/movie_max.webm?t=1592147233
(domain_nosub === "akamaihd.net" && domain.match(/steamcdn(?:-[a-z]*)?\.akamaihd\.net/))) {
// http://cdn.edgecast.steamstatic.com/steam/apps/405710/ss_8555059322d118b6665f1ddde6eaa987c54b2f31.600x338.jpg?t=1516755673
// http://cdn.edgecast.steamstatic.com/steam/apps/405710/ss_8555059322d118b6665f1ddde6eaa987c54b2f31.jpg?t=1516755673
@@ -16152,7 +16162,7 @@ var $$IMU_EXPORT$$;
// http://cdn.akamai.steamstatic.com/steam/apps/678950/ss_cd54f0430e919020ce554f6cfa8d2f3b0d062716.jpg
// http://cdn.akamai.steamstatic.com/steamcommunity/public/images/avatars/c4/c44ec2d22a0c379d697c66b05e5ca8204827ce75.jpg
// http://cdn.akamai.steamstatic.com/steamcommunity/public/images/avatars/c4/c44ec2d22a0c379d697c66b05e5ca8204827ce75_full.jpg
- newsrc = src.replace(/(\/steam\/+apps\/+[0-9]+\/+movie)[0-9]+(\.[^/.]+)(?:[?#].*)?$/, "$1_max$2");
+ newsrc = src.replace(/(\/steam\/+apps\/+[0-9]+\/+movie)[0-9]+(?:_vp9)?(\.[^/.]+)(?:[?#].*)?$/, "$1_max$2");
if (newsrc !== src)
return newsrc;
@@ -61469,9 +61479,19 @@ var $$IMU_EXPORT$$;
// https://m.gjcdn.net/game-header/999999999/479495-euam8zeu-v4.jpg
// https://m.gjcdn.net/game-thumbnail/200/451063-crop464_491_1512_1080-cxiru8mh-v4.png
// https://m.gjcdn.net/game-thumbnail/999999999/451063-cxiru8mh-v4.png
- return src
+ // https://m.gjcdn.net/game-screenshot/300/2262138-wj9ajney-v4.jpg
+ // https://m.gjcdn.net/game-screenshot/999999999/2262138-wj9ajney-v4.jpg
+ // https://m.gjcdn.net/fireside-post-image/700/2979640-6cv5kbpp-v4.jpg
+ // https://m.gjcdn.net/fireside-post-image/999999999/2979640-6cv5kbpp-v4.jpg
+ // https://m.gjcdn.net/content/1100/2979625-nqf5g48e-v4.jpg
+ // https://m.gjcdn.net/content/999999999/2979625-nqf5g48e-v4.jpg
+ newsrc = src
.replace(/\/screenshot-thumbnail\/+[0-9]+x[0-9]+\/+/, "/screenshot-thumbnail/999999999x999999999/")
- .replace(/\/(game-(?:header|thumbnail))\/+[0-9]+\/+([0-9]+-)(?:crop[0-9]+(?:_[0-9]+){3}-)?/, "/$1/999999999/$2");
+ .replace(/\/(game-(?:header|thumbnail|screenshot)|fireside-post-image|content)\/+[0-9]+\/+([0-9]+-)(?:crop[0-9]+(?:_[0-9]+){3}-)?/, "/$1/999999999/$2");
+ return {
+ url: newsrc,
+ head_wrong_contenttype: true
+ };
}
if (domain_nowww === "crosti.ru") {
| 7 |
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml @@ -90,6 +90,8 @@ jobs:
- run: make check-examples-checker
if: github.event_name != 'pull_request_target'
# Cypress tests
+ - run: make serve-gmf-apps &
+ if: github.event_name != 'pull_request_target'
- run: npm run test-cli
if: github.event_name != 'pull_request_target'
# Webpack build of ngeo/gmf examples and gmf apps
| 11 |
diff --git a/src/components/TaskListItem.js b/src/components/TaskListItem.js import React, { Component } from 'react'
import { StyleSheet, TouchableOpacity, TouchableHighlight, View, Dimensions, Appearance } from 'react-native'
-import { Icon, Text } from 'native-base'
+import { Icon, Text, HStack, VStack, Box } from 'native-base'
import { SwipeRow } from 'react-native-swipe-list-view'
import PropTypes from 'prop-types'
import moment from 'moment'
@@ -17,22 +17,11 @@ import {
import TaskTitle from './TaskTitle'
const styles = StyleSheet.create({
- item: {
- flex: 1,
- flexDirection: 'row',
- alignItems: 'center',
- paddingRight: 10,
- },
itemIcon: {
alignItems: 'center',
justifyContent: 'space-around',
height: '100%',
},
- itemBody: {
- paddingVertical: 15,
- paddingHorizontal: 5,
- flexGrow: 1,
- },
disabled: {
opacity: 0.4,
},
@@ -124,7 +113,7 @@ class TaskListItem extends Component {
const colorScheme = Appearance.getColorScheme()
const { color, task, index } = this.props
- const itemStyle = [ styles.item ]
+ const itemStyle = []
const textStyle = [ styles.text ]
if (task.status === 'DONE' || task.status === 'FAILED') {
@@ -173,21 +162,21 @@ class TaskListItem extends Component {
style={{ backgroundColor: colorScheme === 'dark' ? 'black' : 'white' }}
underlayColor={ '#efefef' }
testID={ `task:${index}` }>
- <View style={ itemStyle }>
+ <HStack flex={ 1 } alignItems="center" styles={ itemStyle } pr="3">
<View style={{backgroundColor: color, width: 8, height: '100%', marginRight: 12}}/>
<View style={ styles.itemIcon }>
<TaskTypeIcon task={ task } />
<TaskStatusIcon task={ task } />
</View>
- <View style={ styles.itemBody }>
+ <VStack flex={ 1 } py="3" px="1">
<Text style={ textStyle }><TaskTitle task={ task } /></Text>
{ task.address.contactName ? (<Text style={ textStyle }>{ task.address.contactName }</Text>) : null }
{ task.address.name ? (<Text style={ textStyle }>{ task.address.name }</Text>) : null }
<Text numberOfLines={ 1 } style={ textStyle }>{ task.address.streetAddress }</Text>
<Text style={ textStyle }>{ moment(task.doneAfter).format('LT') } - { moment(task.doneBefore).format('LT') }</Text>
- </View>
- <Icon as={ FontAwesome } name="arrow-right" />
- </View>
+ </VStack>
+ <Icon as={ FontAwesome } name="arrow-right" size="sm" />
+ </HStack>
</TouchableHighlight>
</SwipeRow>
)
| 7 |
diff --git a/package.json b/package.json {
"name": "mysql2",
- "version": "1.3.6",
+ "version": "1.4.0",
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",
"main": "index.js",
"directories": {
| 12 |
diff --git a/new-client/config-overrides.js b/new-client/config-overrides.js @@ -36,6 +36,7 @@ module.exports = function override(config) {
// they shouldn't be included in the bundle! Let's add a Webpack-Ignore-Plugin making sure to
// remove (ignore) those plugins. This will reduce the bundle-since significantly if unused plugins
// are removed from the "activeTools"-prop.
+ config.ignoreWarnings = [/Failed to parse source map/];
config.plugins.push(
new webpack.IgnorePlugin({
checkResource(resource) {
| 8 |
diff --git a/src/6_branch.js b/src/6_branch.js @@ -805,6 +805,8 @@ Branch.prototype['track'] = wrap(callback_params.CALLBACK_ERR, function(done, ev
*
* Register commerce events, content events, user lifecycle events and custom events via logEvent()
*
+ * ##### NOTE: If this is the first time you are integrating our new event tracking feature via logEvent(), please use the latest Branch WebSDK snippet from the [Installation section](https://github.com/BranchMetrics/web-branch-deep-linking#quick-install). This has been updated in v2.30.0 of our SDK.
+ *
* The guides below provide information about what keys can be sent when triggering these event types:
*
* - [Logging Commerce Events](https://github.com/BranchMetrics/branch-deep-linking-public-api/blob/dfe601286f7b01a6951d6952fc833220e97d80c0/README.md#logging-commerce-events)
| 3 |
diff --git a/articles/tokens/jwt.md b/articles/tokens/jwt.md @@ -191,7 +191,7 @@ _Comparison of the length of an encoded JWT and an encoded SAML_
## Read More
::: next-steps
-* [JWT Handbook](https://auth0.com/e-books/jwt-handbook)
+* [JWT Handbook](https://auth0.com/resources/ebooks/jwt-handbook)
* [10 Things You Should Know About Tokens](https://auth0.com/blog/ten-things-you-should-know-about-tokens-and-cookies/)
* [Cookies vs Tokens. Getting auth right with Angular.JS](https://auth0.com/blog/angularjs-authentication-with-cookies-vs-token/)
:::
| 3 |
diff --git a/docs/articles/documentation/using-testcafe/common-concepts/reporters.md b/docs/articles/documentation/using-testcafe/common-concepts/reporters.md @@ -23,6 +23,7 @@ Here are some custom reporters developed by the community.
* [NUnit](https://github.com/AndreyBelym/testcafe-reporter-nunit)
* [Slack](https://github.com/Shafied/testcafe-reporter-slack)
* [TeamCity](https://github.com/Soluto/testcafe-reporter-teamcity)
+* [Tesults](https://www.npmjs.com/package/testcafe-reporter-tesults)
For more information about the reporters, see the following sections.
| 0 |
diff --git a/packages/idyll-document/src/utils/index.js b/packages/idyll-document/src/utils/index.js @@ -4,7 +4,10 @@ const falafel = require('falafel');
export const buildExpression = (acc, expr, isEventHandler) => {
let identifiers = [];
- const modifiedExpression = falafel(
+ let modifiedExpression = '';
+
+ try {
+ modifiedExpression = falafel(
isEventHandler ? expr : `var __idyllReturnValue = ${expr || 'undefined'}`,
node => {
switch (node.type) {
@@ -17,6 +20,9 @@ export const buildExpression = (acc, expr, isEventHandler) => {
}
}
);
+ } catch (e) {
+ console.error(e);
+ }
if (!isEventHandler) {
return `
| 9 |
diff --git a/module/damage/damagecalculator.js b/module/damage/damagecalculator.js @@ -513,9 +513,9 @@ export class CompositeDamageCalculator {
}
get locationMaxHP() {
- if (this.hitLocationRole === HitLocation.LIMB) return this.HP.max / 2
- if (this.hitLocationRole === HitLocation.EXTREMITY) return this.HP.max / 3
- if (this.hitLocation === 'Eye') return this.HP.max / 10
+ if (this.hitLocationRole === HitLocation.LIMB) return (this.HP.max / 2) + 1
+ if (this.hitLocationRole === HitLocation.EXTREMITY) return (this.HP.max / 3) + 1
+ if (this.hitLocation === 'Eye') return (this.HP.max / 10) + 1
return this.HP.max
}
| 1 |
diff --git a/config/initializers/warden.rb b/config/initializers/warden.rb @@ -156,37 +156,6 @@ Warden::Strategies.add(:api_authentication) do
end
end
-Warden::Strategies.add(:api_key) do
- def valid?
- params[:api_key].present?
- end
-
- # We don't want to store a session and send a response cookie
- def store?
- false
- end
-
- def authenticate!
- begin
- if (api_key = params[:api_key]) && api_key.present?
- user_name = CartoDB.extract_subdomain(request)
- if $users_metadata.HMGET("rails:users:#{user_name}", "map_key").first == api_key
- user_id = $users_metadata.HGET "rails:users:#{user_name}", 'id'
- return fail! if user_id.blank?
- user = ::User[user_id]
- success!(user)
- else
- return fail!
- end
- else
- return fail!
- end
- rescue
- return fail!
- end
- end
-end
-
Warden::Strategies.add(:http_header_authentication) do
include LoginEventTrigger
| 2 |
diff --git a/app/less/archetype.less b/app/less/archetype.less .fieldsetIcon {
float: left;
- padding: 0 4px 0 0;
+ padding: 0 10px 0 0;
color: #333;
vertical-align: text-bottom;
}
fieldset {
border-bottom: 1px dashed #dddddd;
padding: 0;
- margin-bottom: 5px;
clear: both;
display: inline-block;
width: 100%;
.archetypeFieldsetLabel {
position: relative;
width: 100%;
- min-height: 42px;
.label-sub {
- padding: 8px 0 8px 0;
+ padding: 18px 0;
display: inline-block;
min-height: 20px; /* this makes the header clickable when there's no icon and no text */
&.module-label {
cursor: pointer;
label {
- span {
- text-decoration: underline;
- }
+ // span {
+ // text-decoration: underline;
+ // }
&:hover {
cursor: pointer;
}
}
span {
- font-weight: bold;
+ // font-weight: bold;
&.menu-label { font-weight: normal; }
}
float: none;
position: absolute;
right: 15px;
- top: 0;
+ top: 50%;
+ margin-top: -15px;
+ padding: 0;
.icon {
- color: #ddd;
- padding: 2px;
+ display: inline-block;
+ height: 28px;
+ width: 28px;
+ line-height: 28px;
+ border-radius: 14px;
+ border: 1px solid #b6b6b6;
+ color: #5f5f5f;
+ background: white;
font-size: 16px;
+ text-align: center;
+ margin-left: 4px;
&:hover {
color: #333;
}
padding: 12px 0 0 20px;
background-color: #fff;
border-radius: 0 0 0 5px;
+ line-height: 20px;
form {
margin-left:20px;
list-style: none;
margin-left: 0;
}
+ li {
+ line-height: 0;
+ }
.show-validation.ng-invalid .control-group.error .control-label {
span {
| 7 |
diff --git a/test/model.findOneAndUpdate.test.js b/test/model.findOneAndUpdate.test.js @@ -887,7 +887,7 @@ describe('model: findOneAndUpdate:', function() {
});
});
- it('can do deep equals on object id after findOneAndUpdate (gh-2070)', function(done) {
+ it('can do various deep equal checks (lodash.isEqual, lodash.isEqualWith, assert.deepEqual, utils.deepEqual) on object id after findOneAndUpdate (gh-2070)', function(done) {
const userSchema = new Schema({
name: String,
contacts: [{
@@ -911,22 +911,20 @@ describe('model: findOneAndUpdate:', function() {
{ new: true },
function(error, doc) {
assert.ifError(error);
+ assert.deepEqual(doc.contacts[0].account, a2._id);
assert.ok(Utils.deepEqual(doc.contacts[0].account, a2._id));
assert.ok(isEqualWith(doc.contacts[0].account, a2._id, compareBuffers));
// Re: commends on https://github.com/mongodb/js-bson/commit/aa0b54597a0af28cce3530d2144af708e4b66bf0
// Deep equality checks no longer work as expected with node 0.10.
// Please file an issue if this is a problem for you
- if (!/^v0.10.\d+$/.test(process.version)) {
assert.ok(isEqual(doc.contacts[0].account, a2._id));
- }
User.findOne({ name: 'parent' }, function(error, doc) {
assert.ifError(error);
+ assert.deepEqual(doc.contacts[0].account, a2._id);
assert.ok(Utils.deepEqual(doc.contacts[0].account, a2._id));
assert.ok(isEqualWith(doc.contacts[0].account, a2._id, compareBuffers));
- if (!/^v0.10.\d+$/.test(process.version)) {
assert.ok(isEqual(doc.contacts[0].account, a2._id));
- }
done();
});
});
| 10 |
diff --git a/packages/medusa/src/loaders/express.js b/packages/medusa/src/loaders/express.js @@ -27,6 +27,7 @@ export default async ({ app }) => {
proxy: true,
secret: config.cookieSecret,
cookie: {
+ sameSite: false,
secure: process.env.NODE_ENV === "production",
maxAge: 10 * 60 * 60 * 1000,
},
| 11 |
diff --git a/config/environments/development.js.example b/config/environments/development.js.example @@ -197,7 +197,7 @@ var config = {
user: "publicuser",
password: "public",
host: '127.0.0.1',
- port: 6432,
+ port: 5432,
extent: "-20037508.3,-20037508.3,20037508.3,20037508.3",
// max number of rows to return when querying data, 0 means no limit
row_limit: 65535,
| 4 |
diff --git a/tests/e2e/specs/modules/analytics/setup-no-account-no-tag.test.js b/tests/e2e/specs/modules/analytics/setup-no-account-no-tag.test.js @@ -57,9 +57,10 @@ describe( 'setting up the Analytics module with no existing account and no exist
await expect( page ).toClick( '.mdc-tab', { text: /connect more services/i } );
await page.waitForSelector( '.googlesitekit-settings-connect-module--analytics' );
- // await proceedToSetUpAnalytics();
- await expect( page ).toClick( '.googlesitekit-cta-link', { text: /set up analytics/i } );
- await page.waitForSelector( '.googlesitekit-setup-module__action .mdc-button' );
+ await Promise.all( [
+ page.waitForSelector( '.googlesitekit-setup-module__action .mdc-button' ),
+ expect( page ).toClick( '.googlesitekit-cta-link', { text: /set up analytics/i } ),
+ ] );
// Intercept the call to window.open and call our API to simulate a created account.
await page.evaluate( () => {
| 3 |
diff --git a/xrrtc.js b/xrrtc.js @@ -194,7 +194,7 @@ class XRChannelConnection extends EventTarget {
};
this.state.on('update', _update);
});
- ['status', 'pose'].forEach(eventType => {
+ ['status', 'pose', 'chat'].forEach(eventType => {
dialogClient.addEventListener(eventType, e => {
const peerConnection = _getPeerConnection(e.data.peerId) || _addPeerConnection(e.data.peerId);
peerConnection.dispatchEvent(new MessageEvent(e.type, {
| 0 |
diff --git a/.eslintrc.js b/.eslintrc.js @@ -15,6 +15,7 @@ module.exports = {
"jscolor": "readonly",
"BeautifyAll": "readonly",
"CM": "writable",
+ "unsafeWindow": "readonly",
},
"extends": "eslint:recommended",
"parserOptions": {
| 0 |
diff --git a/docs/index.html b/docs/index.html <div id="tracking" class="tabcontent">
<table id="tracking" class="commands">
<th colspan="2">
- <h4>Tracking Commands<br />{User required to have "Manage Permissions"}</h4>
+ <h4>Tracking Commands<br /><span class="permissions">{User required to have "Manage Permissions"}</span></h4>
</th>
<tr>
<td>add role <role_name></td>
- <td>Add a joinable role - <class="example">Example <code>add role Nitain</code></td>
+ <td>Add a joinable role <br /> - <span class="example">Example <code>add role Nitain</code></span></td>
</tr>
<tr>
<td>remove role <role_name></td>
- <td>Remove a specific role - <class="example">Example <code>remove role Nitain</code></td>
+ <td>Remove a specific role <br /> - <span class="example">Example <code>remove role Nitain</code></span></td>
</tr>
<tr>
<td>roles</td>
</tr>
<tr>
<td>join <role_name></td>
- <td>Join a specific role {Bot Requires "Manage Roles"} - <class="example">Example <code>join Nitain</code></td>
+ <td>Join a specific role <span class="permissions" >{Bot Requires "Manage Roles"}</span><br /> - <span class="example">Example <code>join Nitain</code></span></td>
</tr>
<tr>
<td>leave <role_name></td>
- <td>Leave a specific role {Bot Requires "Manage Roles"} - <class="example">Example <code>leave Nitain</code></td>
+ <td>Leave a specific role <span class="permissions" >{Bot Requires "Manage Roles"}</span><br /> - <span class="example">Example <code>leave Nitain</code></span></td>
</tr>
<tr>
<td>set ping</td>
</tr>
<tr>
<td>set ping <event_or_item> @mention</td>
- <td>Set ping for specific event or item and to mention a role - <class="example">Example <code>set ping alerts @alertrole</code></td>
+ <td>Set ping for specific event or item and to mention a role <br /> - <span class="example">Example <code>set ping alerts @alertrole</code></span></td>
</tr>
<tr>
<td>set ping <event_or_item></td>
- <td>Remove specified set ping - <class="example">Example <code>set ping alerts</code></td>
+ <td>Remove specified set ping <br /> - <span class="example">Example <code>set ping alerts</code></span></td>
</tr>
<tr>
<td>track</td>
</tr>
<tr>
<td>track <event(s)_or_item(s)></td>
- <td>Track one or multiple events and items - <class="example">Example <code>track alerts invasions news</code> /OR/ <code>track catalyst forma exilus</code></td>
+ <td>Track one or multiple events and items <br /> - <span class="example">Example <code>track alerts invasions news</code> /OR/ <code>track catalyst forma exilus</code></span></td>
</tr>
<tr>
<td>untrack <event(s)_or_item(s)></td>
- <td>Untrack one or multiple events and items - <class="example">Example <code>untrack alerts invasions news</code> /OR/ <code>untrack catalyst forma exilus</code></td>
+ <td>Untrack one or multiple events and items <br /> - <span class="example">Example <code>untrack alerts invasions news</code> /OR/ <code>untrack catalyst forma exilus</code></span></td>
</tr>
</table>
</div>
<div id="settings" class="tabcontent">
<table id="settings" class="commands">
<th colspan="2">
- <h4>Settings Commands<br/>{User required to have "Manage Permissions"}</h4>
+ <h4>Settings Commands<br /><span class="permissions">{User required to have "Manage Permissions"}</span></h4>
</th>
<tr>
<td>settings</td>
</tr>
<tr>
<td>platform <platform></td>
- <td>Change this channel's platform - <class="example">Example <code>platform PC</code></td>
+ <td>Change this channel's platform <br /> - <span class="example">Example <code>platform PC</code><span></td>
</tr>
<tr>
<td>delete after respond <Yes/No></td>
- <td>Change if the bot to delete commands andor responses after responding in this channel - <class="example">Example <code>delete after respond yes</code></td>
+ <td>Change if the bot to delete commands andor responses after responding in this channel <br /> - <span class="example">Example <code>delete after respond yes</code></span></td>
</tr>
<tr>
<td>enable <command id> in <channel> for <role|user></td>
| 3 |
diff --git a/packages/app/src/components/PageEditor.tsx b/packages/app/src/components/PageEditor.tsx @@ -343,13 +343,12 @@ const PageEditor = (props: Props): JSX.Element => {
}, []);
- const saveAndReloadHandler = useCallback(async(opts?) => {
+ const saveAndReloadHandler = useCallback(async(opts?: {overwriteScopesOfDescendants: boolean}) => {
if (editorMode !== EditorMode.Editor) {
return;
}
- console.log({ opts });
- const grant = grantData?.grant;
+ const grant = grantData?.grant || 1;
const grantedGroup = grantData?.grantedGroup;
if (isSlackEnabled == null || currentPathname == null) {
| 12 |
diff --git a/pages/deploiement-bal.js b/pages/deploiement-bal.js @@ -5,7 +5,6 @@ import Head from '@/components/head'
import theme from '@/styles/theme'
import {Database} from 'react-feather'
-import {getDatasets} from '@/lib/bal/api'
import {getStats} from '@/lib/api-ban'
import {numFormater} from '@/lib/format-numbers'
@@ -48,7 +47,7 @@ const options = {
}
}
-function EtatDeploiement({datasets, stats}) {
+function EtatDeploiement({stats}) {
// Calcul population couverte
const populationCouvertePercent = Math.round((stats.bal.populationCouverte * 100) / stats.france.population)
const allPopulationCouverte = 100 - Math.round((stats.bal.populationCouverte * 100) / stats.france.population)
@@ -69,20 +68,6 @@ function EtatDeploiement({datasets, stats}) {
const allAdressesCertifieesPercent = 100 - Math.round((stats.bal.nbAdressesCertifiees * 100) / stats.ban.nbAdresses)
const dataAdressesCertifiees = toCounterData(adressesCertifieesPercent, allAdressesCertifieesPercent)
- const mapData = {
- type: 'FeatureCollection',
- features: datasets.map(dataset => ({
- type: 'Feature',
- properties: {
- id: dataset.id,
- nom: dataset.title,
- license: dataset.license,
- organization: dataset.organization ? dataset.organization.name : null
- },
- geometry: dataset.contour
- }))
- }
-
return (
<Page>
<div className='container-map'>
@@ -124,7 +109,6 @@ function EtatDeploiement({datasets, stats}) {
<BalCoverMap
map={map}
popup={popup}
- data={mapData}
setSources={setSources}
setLayers={setLayers}
/>
@@ -180,13 +164,11 @@ function EtatDeploiement({datasets, stats}) {
EtatDeploiement.getInitialProps = async () => {
return {
- datasets: await getDatasets(),
stats: await getStats(),
}
}
EtatDeploiement.propTypes = {
- datasets: PropTypes.array.isRequired,
stats: PropTypes.shape({
france: PropTypes.object.isRequired,
bal: PropTypes.object.isRequired,
| 14 |
diff --git a/portal/src/components/IndiaMap/LeafletMap.js b/portal/src/components/IndiaMap/LeafletMap.js @@ -154,7 +154,7 @@ export default function LeafletMap({
};
return (
<div id="mapid">
- <MapContainer className="map-container" center={[22, 82]} zoom={5}>
+ <MapContainer className="map-container" center={[22, 82]} zoom={4} minZoom={4} maxZoom={6}>
<GeoJSON
style={mapStyle}
data={states}
| 12 |
diff --git a/README.md b/README.md @@ -15,6 +15,90 @@ Tools for using the Open API Specification (OAS)
- Generate random valid values for a schema.
- Plugin environment for custom document validation and extended functionality including custom data type formats.
-## Documentation
+## Website - [openapi-enforcer.com](https://openapi-enforcer.com/)
-https://byu-oit.github.io/openapi-enforcer/
+## Installation
+
+```shell
+npm install openapi-enforcer
+```
+
+## Examples
+
+### Loading and Validating a Document
+
+Use the Enforcer to load and resolve all $ref values and then to validate the complete document.
+
+```js
+const Enforcer = require('openapi-enforcer')
+
+async function run () {
+ const [openapi, error, warning] = await Enforcer('./path/to/openapi.yml', {
+ fullResult: true
+ })
+ if (error !== undefined) console.error(error)
+ if (warning !== undefined) console.warn(warning)
+ if (openapi !== undefined) console.log('Document is valid')
+}
+
+run.catch(console.error)
+```
+
+### Processing an Incoming Request
+
+```js
+const Enforcer = require('openapi-enforcer')
+
+async function run () {
+ // Because we don't specify `fullResult: true`, any errors will throw an exception and
+ // warnings will be logged to the console.
+ const openapi = await Enforcer('./path/to/openapi.yml')
+
+ // If the request is valid then the req object will contain the parsed and validated request.
+ // If it is invalid then the error will contain details about what was wrong with the
+ // request and these details are safe to return to the client that made the request.
+ const [ req, error ] = openapi.request({
+ method: 'POST',
+ path: '/tasks',
+ // the body should be parsed by a JSON.parse() prior to passing in (if applicable).
+ body: { task: 'Buy Milk', quantity: 2 }
+ })
+
+ // You can use the req.operation property to look at the properties from your OpenAPI document.
+ // A good use of this is to look at the operationId you defined there to determine which path
+ // is being used to handle the request.
+ if (req.operaton.operationId === 'my-operation-id') {
+ // ... additional request processing
+ }
+}
+
+run.catch(console.error)
+```
+
+### Producing a Valid Result
+
+```js
+const Enforcer = require('openapi-enforcer')
+
+async function run () {
+ const openapi = await Enforcer('./path/to/openapi.yml')
+
+ const [ req ] = openapi.request({
+ method: 'POST',
+ path: '/tasks',
+ // the body should be parsed by a JSON.parse() prior to passing in (if applicable).
+ body: { task: 'Buy Milk', quantity: 2 }
+ })
+
+ const body = { id: 1, task: 'Buy Milk', quantity: 2, dateCompleted: null }
+ const headers = {}
+
+ // This will validate the response code, body, and headers. It will also correctly serialize
+ // the body and headers for sending to the client that made the request. Using this method
+ // you'll never send back a response that does not match what your OpenAPI document defines.
+ const [ res, error ] = req.response(200, body, headers)
+ console.log(res.body, res.headers)
+}
+
+run.catch(console.error)
+```
| 3 |
diff --git a/src/Form.js b/src/Form.js @@ -177,12 +177,26 @@ export default class Form extends Element {
* @returns {*}
*/
sanitize(dirty) {
- return sanitize(dirty, {
+ // Dompurify configuration
+ const sanitizeOptions = {
ADD_ATTR: ['ref'],
USE_PROFILES: {
html: true
}
- });
+ };
+ // Allow tags
+ if (this.options.sanitizeConfig && Array.isArray(this.options.sanitizeConfig.allowedTags) && this.options.sanitizeConfig.allowedTags.length > 0) {
+ sanitizeOptions.ALLOWED_TAGS = this.options.sanitizeConfig.allowedTags;
+ }
+ // Allow attributes
+ if (this.options.sanitizeConfig && Array.isArray(this.options.sanitizeConfig.allowedAttr) && this.options.sanitizeConfig.allowedAttr.length > 0) {
+ sanitizeOptions.ALLOWED_ATTR = this.options.sanitizeConfig.allowedTags;
+ }
+ // Allowd URI Regex
+ if (this.options.sanitizeConfig && this.options.sanitizeConfig.allowedUriRegex) {
+ sanitizeOptions.ALLOWED_URI_REGEXP = this.options.sanitizeConfig.allowedUriRegex;
+ }
+ return sanitize(dirty, sanitizeOptions);
}
setContent(element, content) {
| 11 |
diff --git a/lib/assets/core/test/spec/cartodb3/components/onboardings/layers/style-onboarding/style-onboarding-view.spec.js b/lib/assets/core/test/spec/cartodb3/components/onboardings/layers/style-onboarding/style-onboarding-view.spec.js @@ -27,24 +27,14 @@ describe('components/onboardings/layers/style-onboarding/style-onboarding-view',
}));
expect(constructor).toThrowError('type is required');
- constructor = testConstructor(options = _.extend(options, {
- type: 'simple'
- }));
- expect(constructor).toThrowError('name is required');
-
testConstructor(options = _.extend(options, {
- name: 'name'
+ type: 'simple'
}))();
// Number of steps
// Points
expect(this.view._numberOfSteps).toBe(3);
- // Empty
- testConstructor(options = _.extend(options, { geom: '' }))();
- expect(this.view._numberOfSteps).toBe(1);
- expect(this.view._modifier).toEqual('--styleGeoreference');
-
// Polygon
testConstructor(options = _.extend(options, { geom: 'polygon' }))();
expect(this.view._numberOfSteps).toBe(2);
@@ -92,8 +82,7 @@ describe('components/onboardings/layers/style-onboarding/style-onboarding-view',
editorModel: new Backbone.Model({}),
notificationKey: 'style-key',
geom: 'point',
- type: 'simple',
- name: 'name'
+ type: 'simple'
});
var assertText = assertTextFn.bind(this, this.view);
var assertClasses = assertClassesFn.bind(this, this.view);
@@ -132,8 +121,7 @@ describe('components/onboardings/layers/style-onboarding/style-onboarding-view',
editorModel: new Backbone.Model({}),
notificationKey: 'style-key',
geom: 'polygon',
- type: 'simple',
- name: 'name'
+ type: 'simple'
});
var assertText = assertTextFn.bind(this, this.view);
var assertClasses = assertClassesFn.bind(this, this.view);
@@ -163,33 +151,5 @@ describe('components/onboardings/layers/style-onboarding/style-onboarding-view',
assertText(content + ' .LayerOnboarding-footer .u-iBlock.is-step1 label', 'style-onboarding.never-show-message');
expect(true).toBe(true); // In case no error was thrown in assert functions, we need to pass at least one expectation to get the test in green.
});
-
- it('empty template', function () {
- this.view = new View({
- onboardingNotification: {},
- editorModel: new Backbone.Model({}),
- notificationKey: 'style-key',
- geom: '',
- type: 'simple',
- name: 'name'
- });
- var assertText = assertTextFn.bind(this, this.view);
- var assertClasses = assertClassesFn.bind(this, this.view);
- this.view.render();
-
- // Content wrapper
- var content = '.LayerOnboarding-contentWrapper';
- assertClasses(content, ['is-step0']);
- assertClasses(content + ' .LayerOnboarding-contentBody', ['is-step0']);
- assertClasses(content + ' .Onboarding-body', ['is-step0']);
- assertText(content + ' .LayerOnboarding-headerTitle', 'style-onboarding.georeference.title');
- assertText(content + ' .LayerOnboarding-description', 'style-onboarding.georeference.description');
- assertClasses(content + ' .LayerOnboarding-footer', ['is-step0']);
- assertText(content + ' .LayerOnboarding-footer .js-close span', 'style-onboarding.georeference.skip');
- assertText(content + ' .LayerOnboarding-footer .js-georeference span', 'style-onboarding.georeference.georeference');
- expect(this.view.$('.LayerOnboarding-contentWrapper .LayerOnboarding-footer input').length).toBe(1);
- assertText(content + ' .LayerOnboarding-footer .u-iBlock label', 'style-onboarding.never-show-message');
- expect(true).toBe(true); // In case no error was thrown in assert functions, we need to pass at least one expectation to get the test in green.
- });
});
});
| 13 |
diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js @@ -90,21 +90,6 @@ module.exports = {
'9/12': '75%',
'10/12': '83.333333%',
'11/12': '91.666667%',
- '1/16': '6.25%',
- '2/16': '12.5%',
- '3/16': '18.75%',
- '4/16': '25%',
- '5/16': '31.25%',
- '6/16': '37.5%',
- '7/16': '43.75%',
- '8/16': '50%',
- '9/16': '56.25%',
- '10/16': '62.5%',
- '11/16': '68.75%',
- '12/16': '75%',
- '13/16': '81.25%',
- '14/16': '87.5%',
- '15/16': '93.75%',
full: '100%',
},
backgroundColor: (theme) => theme('colors'),
@@ -424,10 +409,6 @@ module.exports = {
10: 'repeat(10, minmax(0, 1fr))',
11: 'repeat(11, minmax(0, 1fr))',
12: 'repeat(12, minmax(0, 1fr))',
- 13: 'repeat(13, minmax(0, 1fr))',
- 14: 'repeat(14, minmax(0, 1fr))',
- 15: 'repeat(15, minmax(0, 1fr))',
- 16: 'repeat(16, minmax(0, 1fr))',
},
gridAutoColumns: {
auto: 'auto',
@@ -449,10 +430,6 @@ module.exports = {
'span-10': 'span 10 / span 10',
'span-11': 'span 11 / span 11',
'span-12': 'span 12 / span 12',
- 'span-13': 'span 13 / span 13',
- 'span-14': 'span 14 / span 14',
- 'span-15': 'span 15 / span 15',
- 'span-16': 'span 16 / span 16',
'span-full': '1 / -1',
},
gridColumnStart: {
@@ -470,10 +447,6 @@ module.exports = {
11: '11',
12: '12',
13: '13',
- 14: '14',
- 15: '15',
- 16: '16',
- 17: '17',
},
gridColumnEnd: {
auto: 'auto',
@@ -490,10 +463,6 @@ module.exports = {
11: '11',
12: '12',
13: '13',
- 14: '14',
- 15: '15',
- 16: '16',
- 17: '17',
},
gridTemplateRows: {
none: 'none',
| 2 |
diff --git a/edit.js b/edit.js @@ -1346,7 +1346,30 @@ const [
geometry.setAttribute('uv3', new THREE.BufferAttribute(outUvs, 3));
geometry.setIndex(new THREE.BufferAttribute(outIndices, 1));
geometry = geometry.toNonIndexed();
+ const canvas = document.createElement('canvas');
+ canvas.width = 4096;
+ canvas.height = 4096;
+ const ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#FFF';
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ ctx.fillStyle = '#CCC';
+ for (let x = 0; x < canvas.width; x += 64) {
+ for (let y = 0; y < canvas.height; y += 64) {
+ if ((x/64)%2 === ((y/64)%2)) {
+ ctx.fillRect(x, y, 64, 64);
+ }
+ }
+ }
+ const texture = new THREE.Texture(canvas);
+ texture.needsUpdate = true;
const material = new THREE.ShaderMaterial({
+ uniforms: {
+ tex: {
+ type: 't',
+ value: texture,
+ needsUpdate: true,
+ },
+ },
vertexShader: `\
precision highp float;
precision highp int;
@@ -1377,6 +1400,8 @@ const [
#define PI 3.1415926535897932384626433832795
+ uniform sampler2D tex;
+
varying vec3 vUv;
varying vec3 vBarycentric;
@@ -1387,7 +1412,8 @@ const [
}
void main() {
- vec3 c = vec3(vUv.x, 0., vUv.y);
+ vec3 c = texture2D(tex, vUv.xy).rgb;
+ c *= vec3(vUv.x, 0., vUv.y);
if (edgeFactor() <= 0.99) {
c += 0.5;
}
| 0 |
diff --git a/templates/master/elasticsearch/schema/qna.js b/templates/master/elasticsearch/schema/qna.js @@ -69,7 +69,7 @@ module.exports={
},
args:{
title:"Lambda Hook Arguments",
- description:"If you named a lambda hook above and it requires additional information beyond what you've entered for this document, enter that information here. These fields will not do anything unless the lambda hook you named has been coded to handle them specifically.",
+ description:"If you named a lambda hook above and it requires additional information beyond what you've entered for this document, enter that information here. You should not add anything here unless the lambda hook you named has been specifically coded to handle it.",
type:"array",
items:{
title:"Argument",
| 1 |
diff --git a/src/shaders/metallic-roughness.frag b/src/shaders/metallic-roughness.frag @@ -448,8 +448,7 @@ void main()
baseColor *= getVertexColor();
- diffuseColor = baseColor.rgb * (vec3(1.0) - f0);
- diffuseColor *= 1.0 - metallic;
+ diffuseColor = baseColor.rgb * (vec3(1.0) - f0) * (1.0 - metallic);
specularColor = mix(f0, baseColor.rgb, metallic);
@@ -496,7 +495,7 @@ void main()
// LIGHTING
- vec3 color = vec3(0.0, 0.0, 0.0); // TODO: vertex colors as multiplier
+ vec3 color = vec3(0.0, 0.0, 0.0);
vec3 normal = getNormal();
vec3 view = normalize(u_Camera - v_Position);
| 2 |
diff --git a/src/plugins/Instagram/index.js b/src/plugins/Instagram/index.js @@ -100,8 +100,16 @@ module.exports = class Instagram extends Plugin {
getItemName (item) {
if (item && item['created_time']) {
- let date = new Date(item['created_time'] * 1000).toUTCString()
- return `Instagram ${date}`
+ let date = new Date(item['created_time'] * 1000)
+ date = date.toLocaleDateString([], {
+ year: 'numeric',
+ month: 'short',
+ day: 'numeric',
+ hour: 'numeric',
+ minute: 'numeric'
+ })
+ // adding both date and carousel_id, so the name is unique
+ return `Instagram ${date} ${item.carousel_id || ''}`
}
return ''
}
| 0 |
diff --git a/src/javaHelpers.js b/src/javaHelpers.js @@ -34,10 +34,10 @@ function javaReplaceFirst(oldValue, newValue) {
return this.replace(new RegExp(oldValue, 'm'), newValue);
}
+// method has 2 function signatures:
+// regionMatches(toffset: number, other: string, ooffset: number, len: number): boolean
+// regionMatches(ignoreCase: boolean, toffset: number, other: string, ooffset: number, len: number): boolean
function javaRegionMatches(ignoreCase, toffset, other, ooffset, len) {
- /*
- * Support different method signatures
- */
if (
typeof ignoreCase === 'number' ||
(ignoreCase !== true && ignoreCase !== false)
| 0 |
diff --git a/src/components/controls.vue b/src/components/controls.vue <b-form-input ref="filter"
:placeholder="`${$t('Filter Controls')}`"
- class="sticky-top border-top-0 border-right-0 rounded-0"
+ class="border-top-0 border-right-0 rounded-0"
type="text"
v-model="filterQuery"
/>
| 2 |
diff --git a/assets/sass/components/idea-hub/_googlesitekit-idea-hub-dashboard-ideas-widget.scss b/assets/sass/components/idea-hub/_googlesitekit-idea-hub-dashboard-ideas-widget.scss .mdc-tab__content {
color: $c-surfaces-on-surface-variant;
- text-transform: capitalize;
> span {
margin-left: 2px;
line-height: $lh-body-sm;
margin: 0 8px 4px 0;
padding: 2px 7px;
- text-transform: capitalize;
vertical-align: top;
}
| 2 |
diff --git a/README.md b/README.md <h1 align="center">SpaceX REST API</h1>
+<h3 align="center">
+Open Source REST API for rocket, core, capsule, pad, and launch data
+</h3>
+
<p align="center">
<a href="https://circleci.com/gh/r-spacex/SpaceX-API"><img src="https://img.shields.io/circleci/project/github/r-spacex/SpaceX-API/master.svg?style=flat-square"></a>
<a href="https://hub.docker.com/r/jakewmeyer/spacex-api/"><img src="https://img.shields.io/docker/build/jakewmeyer/spacex-api.svg?longCache=true&style=flat-square"></a>
<a href="https://en.wikipedia.org/wiki/Representational_state_transfer"><img src="https://img.shields.io/badge/interface-REST-brightgreen.svg?longCache=true&style=flat-square"></a>
</p>
-<h3 align="center">Open Source REST API for rocket, core, capsule, pad, and launch data</h3>
+<h4 align="center">
+ <i>
+ We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with Space Exploration Technologies Inc (SpaceX), or any of its subsidiaries or its affiliates. The names SpaceX as well as related names, marks, emblems and images are registered trademarks of their respective owners.
+ </i>
+</h4>
<h3 align="center">
<a href="docs/v4/README.md">V4 Docs (WIP)</a> - <a href="https://docs.spacexdata.com">V3 Docs</a> - <a href="docs/clients.md">Clients</a> - <a href="docs/apps.md">Apps</a> - <a href="https://status.spacexdata.com">Status</a>
@@ -153,6 +161,4 @@ GET https://api.spacexdata.com/v3/launches/latest
## FAQ's
* If you have any questions or corrections, please open an issue and we'll get it merged ASAP
-* All data and photos are property of Space Exploration Technologies Corporation (SpaceX)
-* I am not affiliated with SpaceX in any way, shape, form, or fashion. Just a fun side project for me
* For any other questions or concerns, just shoot me an email
| 3 |
diff --git a/js/views/components/moderators/Card.js b/js/views/components/moderators/Card.js @@ -44,6 +44,9 @@ export default class extends BaseVw {
const modInfo = this.model.get('moderatorInfo');
this.modCurs = modInfo && modInfo.get('acceptedCurrencies') || [];
+ const fixedFee = modInfo && modInfo.get('fee').get('fixedFee');
+ this.feeCur = fixedFee && fixedFee.get('currencyCode');
+
this.modLanguages = [];
if (this.model.isModerator) {
this.modLanguages = this.model.get('moderatorInfo')
@@ -86,7 +89,7 @@ export default class extends BaseVw {
}
get hasValidCurrency() {
- return anySupportedByWallet(this.modCurs);
+ return this.feeCur && anySupportedByWallet([...this.modCurs, this.feeCur]);
}
get hasPreferredCur() {
| 9 |
diff --git a/src/technologies.json b/src/technologies.json "recurring",
"onetime"
],
+ "meta": {
+ "generator": "Divi"
+ },
"saas": true,
"scripts": "Divi/js/custom\\.(?:min|unified)\\.js\\?ver=([\\d.]+)\\;version:\\1",
"website": "https://www.elegantthemes.com/gallery/divi"
| 7 |
diff --git a/scripts/editor/register-blocks.js b/scripts/editor/register-blocks.js @@ -533,9 +533,10 @@ export const registerBlocks = (
// Set componentsManifest to global window for usage in storybook.
if (typeof window?.['eightshift'] === 'undefined') {
window['eightshift'] = {}
- window['eightshift'][process.env.VERSION] = componentsManifest;
}
+ window['eightshift'][process.env.VERSION] = componentsManifest;
+
// Iterate blocks to register.
blocksManifests.map((blockManifest) => {
| 12 |
diff --git a/README.md b/README.md @@ -22,7 +22,7 @@ The GitHub integration for Slack gives you and your teams full visibility into y
This app officially supports GitHub.com and Slack.com but the team plans to support GitHub Enterprise and Slack Enterprise Grid in the future.
### Migrating from the legacy GitHub integration for Slack
-When you install the new GitHub integration for Slack in your Slack workspace, you'll be prompted to reconfigure your old settings - so getting set up again is easy. Once you subscribe with the new app, the legacy app will be disabled but the legacy notification configurations will be migrated automatically.
+When you install the new GitHub integration for Slack in your Slack workspace, you'll be prompted to move over all of your existing subscriptions - so getting set up again is easy. As you enable individual subscriptions in the new app, your settings will be automatically migrated and subscriptions in the legacy app will be disabled.
<p align="center"><img width="666" alt="migration" src="https://user-images.githubusercontent.com/3877742/36557399-ff8663c6-17bc-11e8-8962-d92088cf98a9.png"></p>
| 7 |
diff --git a/grocy.openapi.json b/grocy.openapi.json "properties": {
"product_id": {
"type": "integer",
- "description": "A valid product id of the item on the shopping list"
+ "description": "A valid product id of the product to be added"
+ },
+ "qu_id": {
+ "type": "integer",
+ "description": "A valid quantity unit id (used only for display; the amount needs to be related to the products stock QU), when omitted, the products stock QU is used"
},
"list_id": {
"type": "integer",
},
"product_amount": {
"type": "integer",
- "description": "The amount of product units to add, when omitted, the default amount of 1 is used"
+ "description": "The amount (related to the products stock QU) to add, when omitted, the default amount of 1 is used"
},
"note": {
"type": "string",
| 0 |
diff --git a/includes/Core/Authentication/Authentication.php b/includes/Core/Authentication/Authentication.php @@ -75,15 +75,6 @@ final class Authentication {
*/
private $user_options = null;
- /**
- * User_Input_State object.
- *
- * @since 1.20.0
- *
- * @var User_Input_State
- */
- private $user_input_state = null;
-
/**
* User_Input_Settings
*
@@ -252,7 +243,6 @@ final class Authentication {
$this->user_options = $user_options ?: new User_Options( $this->context );
$this->transients = $transients ?: new Transients( $this->context );
$this->modules = new Modules( $this->context, $this->options, $this->user_options, $this );
- $this->user_input_state = new User_Input_State( $this->user_options );
$this->user_input_settings = new User_Input_Settings( $context, $this, $transients );
$this->google_proxy = new Google_Proxy( $this->context );
$this->credentials = new Credentials( new Encrypted_Options( $this->options ) );
@@ -283,7 +273,6 @@ final class Authentication {
$this->owner_id->register();
$this->connected_proxy_url->register();
$this->disconnected_reason->register();
- $this->user_input_state->register();
$this->initial_version->register();
add_filter( 'allowed_redirect_hosts', $this->get_method_proxy( 'allowed_redirect_hosts' ) );
@@ -300,19 +289,7 @@ final class Authentication {
add_action( 'admin_init', $this->get_method_proxy( 'handle_oauth' ) );
add_action( 'admin_init', $this->get_method_proxy( 'check_connected_proxy_url' ) );
- add_action( 'admin_init', $this->get_method_proxy( 'verify_user_input_settings' ) );
- add_action(
- 'admin_init',
- function() {
- if (
- 'googlesitekit-dashboard' === $this->context->input()->filter( INPUT_GET, 'page', FILTER_SANITIZE_STRING )
- && User_Input_State::VALUE_REQUIRED === $this->user_input_state->get()
- ) {
- wp_safe_redirect( $this->context->admin_url( 'user-input' ) );
- exit;
- }
- }
- );
+
add_action( 'admin_action_' . self::ACTION_CONNECT, $this->get_method_proxy( 'handle_connect' ) );
add_action( 'admin_action_' . self::ACTION_DISCONNECT, $this->get_method_proxy( 'handle_disconnect' ) );
@@ -331,10 +308,6 @@ final class Authentication {
}
$this->set_connected_proxy_url();
-
- if ( empty( $previous_scopes ) ) {
- $this->require_user_input();
- }
},
10,
3
@@ -374,7 +347,7 @@ final class Authentication {
$user['connectURL'] = esc_url_raw( $this->get_connect_url() );
$user['hasMultipleAdmins'] = $this->has_multiple_admins->get();
$user['initialVersion'] = $this->initial_version->get();
- $user['userInputState'] = $this->user_input_state->get();
+ $user['isUserInputComplete'] = $this->user_input_settings->is_complete();
$user['verified'] = $this->verification->has();
return $user;
@@ -545,17 +518,6 @@ final class Authentication {
return $this->google_proxy;
}
- /**
- * Gets the User Input State instance.
- *
- * @since 1.21.0
- *
- * @return User_Input_State An instance of the User_Input_State class.
- */
- public function get_user_input_state() {
- return $this->user_input_state;
- }
-
/**
* Revokes authentication along with user options settings.
*
@@ -1241,25 +1203,6 @@ final class Authentication {
);
}
- /**
- * Requires user input if it is not already completed.
- *
- * @since 1.22.0
- */
- private function require_user_input() {
- if ( ! Feature_Flags::enabled( 'userInput' ) ) {
- return;
- }
-
- // Refresh user input settings from the proxy.
- // This will ensure the user input state is updated as well.
- $this->user_input_settings->set_settings( null );
-
- if ( User_Input_State::VALUE_COMPLETED !== $this->user_input_state->get() ) {
- $this->user_input_state->set( User_Input_State::VALUE_REQUIRED );
- }
- }
-
/**
* Sets the current connected proxy URL.
*
@@ -1374,25 +1317,6 @@ final class Authentication {
return $this->google_proxy->url( Google_Proxy::SUPPORT_LINK_URI );
}
- /**
- * Verifies the user input settings
- *
- * @since 1.20.0
- */
- private function verify_user_input_settings() {
- if (
- empty( $this->user_input_state->get() )
- && $this->is_authenticated()
- && $this->credentials()->has()
- && $this->credentials->using_proxy()
- ) {
- $is_empty = $this->user_input_settings->are_settings_empty();
- if ( ! is_null( $is_empty ) ) {
- $this->user_input_state->set( $is_empty ? User_Input_State::VALUE_MISSING : User_Input_State::VALUE_COMPLETED );
- }
- }
- }
-
/**
* Filters feature flags using features received from the proxy server.
*
| 2 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/properties.js b/packages/node_modules/@node-red/editor-client/src/js/ui/editors/panes/properties.js newValue = "";
}
}
- if (!JSON.stringify(node[d]) === JSON.stringify(newValue)) {
+ if (!isEqual(node[d], newValue)) {
if (node._def.defaults[d].type) {
// Change to a related config node
var configNode = RED.nodes.node(node[d]);
}
}
});
+ /**
+ * Compares `v1` with `v2` for equality
+ * @param {*} v1 variable 1
+ * @param {*} v2 variable 2
+ * @returns {boolean} true if variable 1 equals variable 2, otherwise false
+ */
+ function isEqual(v1, v2) {
+ try {
+ if(v1 === v2) {
+ return true;
+ }
+ return JSON.stringify(v1) === JSON.stringify(v2);
+ } catch (err) {
+ return false;
+ }
+ }
/**
* Update the node credentials from the edit form
| 9 |
diff --git a/pages/Mixins.md b/pages/Mixins.md @@ -106,7 +106,7 @@ class SmartObject {
interface SmartObject extends Disposable, Activatable {}
```
-The first thing you may notice in the above is that instead of trying to extend `Disposable` and `Activatable` in `SmartObject` class, we extend them in `SmartObject` interface. `SmartObject` interface will be mixed into the `SmartObject` class due to [declaration merging](Declaration Merging.md).
+The first thing you may notice in the above is that instead of trying to extend `Disposable` and `Activatable` in `SmartObject` class, we extend them in `SmartObject` interface. `SmartObject` interface will be mixed into the `SmartObject` class due to [declaration merging](./Declaration Merging.md).
This treats the classes as interfaces, and only mixes the types behind Disposable and Activatable into the SmartObject type rather than the implementation. This means that we'll have to provide the implementation in class.
Except, that's exactly what we want to avoid by using mixins.
| 1 |
diff --git a/src/utils/logger/__spec__.js b/src/utils/logger/__spec__.js @@ -66,11 +66,11 @@ describe('Logger', () => {
describe('groups', () => {
beforeEach(() => {
spyOn(console, 'warn');
- jasmine.clock().install();
+ jest.useFakeTimers();
});
afterEach(() => {
- jasmine.clock().uninstall();
+ jest.clearAllTimers();
});
it('creates a group and console logs after a delay', () => {
@@ -79,7 +79,7 @@ describe('Logger', () => {
Logger.deprecate('Three', { group: 'test' });
Logger.deprecate('Four', { group: 'different group' });
expect(console.warn).not.toHaveBeenCalled();
- jasmine.clock().tick(500);
+ jest.runTimersToTime(500);
expect(console.warn).toHaveBeenCalledWith('[Deprecation] One', {
all: ['[Deprecation] One', '[Deprecation] Two', '[Deprecation] Three']
});
| 14 |
diff --git a/articles/tokens/access-token.md b/articles/tokens/access-token.md @@ -125,14 +125,18 @@ The token in this example decodes to the following claims:
}
```
-Before permitting access to the API using this token, the API must do the following:
+Before permitting access to the API using this token, the API must verify the `access_token` using the following steps:
-1. Ensure that the token is intended to be used at the API by checking that the value of `aud` is identical to the API's identifier.
-1. Ensure that the token has not expired by comparing the value of `exp` to the current time.
-1. Ensure that the token was issued by a trusted authorization server. In this case, Auth0 is the trusted authorization server and a secret, `keyboardcat`, is known only to Auth0 and the API. The signature of the token is validated using this secret.
-1. Ensure that the token has the correct scopes to perform the requested operation.
+1. Check that the JWT is well formed.
+1. Check the signature.
+1. Validate the standard claims (specifically the `exp`, `iss` and `aud` claims)
+1. Check the Client permissions (scopes)
-If any of these check fail, the token is invalid and the request should be rejected.
+::: note
+For a more detailed discussion verifying access tokens, please refer to [Verify Access Tokens](/api-auth/tutorials/verify-access-token).
+:::
+
+If any of these checks fail, the token is invalid and the request should be rejected.
Once these checks have been performed successfully, the API can be assured that:
| 1 |
diff --git a/test/unit/connection-parameters/creation-tests.js b/test/unit/connection-parameters/creation-tests.js @@ -22,7 +22,7 @@ var compare = function (actual, expected, type) {
assert.equal(actual.host, expected.host, type + ' host')
assert.equal(actual.password, expected.password, type + ' password')
assert.equal(actual.binary, expected.binary, type + ' binary')
- assert.equal(actual.statement_timout, expected.statement_timout, type + ' binary')
+ assert.equal(actual.statement_timout, expected.statement_timout, type + ' statement_timeout')
}
test('ConnectionParameters initializing from defaults', function () {
| 1 |
diff --git a/articles/compliance/gdpr/features-aiding-compliance/user-consent/index.md b/articles/compliance/gdpr/features-aiding-compliance/user-consent/index.md @@ -15,16 +15,16 @@ This article explains how you can use Auth0 features to implement these requirem
Upon signup you have to ask your users for consent. With Auth0, you can save this information at the [user metadata](/metadata). There are several available options here, depending on how you use Auth0 to authenticate your users.
+::: note
+Before you design your solution using metadata make sure you are aware of the restrictions. Auth0 limits the total size of the `user_metadata` to **16 MB**. For more details review the [metadata size limits](/metadata#metadata-size-limits).
+:::
+
### Use Lock
You can customize the Lock UI to display links to your terms and conditions and/or privacy statement pages, and a consent checkbox that the user has to check in order to sign up. This can be done with the [mustAcceptTerms Lock option](/libraries/lock/configuration#mustacceptterms-boolean-). This property, when set to `true`, displays a checkbox alongside the terms and conditions that must be checked before signing up. The terms and conditions can be specified using the [languageDictionary option](/libraries/lock/configuration#languagedictionary-object-). Once the user accepts and signs up, save the consent information at the `user_metadata` using a [rule](/rules) that will run upon first login.
If you want to get more information from the users during signup, and you authenticate users with a database connection, you can add custom fields to the Lock UI. This can be done with the [additionalSignUpFields Lock option](/libraries/lock/configuration#additionalsignupfields-array-). Any custom fields are automatically added to the `user_metadata`.
-::: note
-Before you design your solution using `user_metadata` make sure you have reviewed the [metadata size limits](/metadata#metadata-size-limits).
-:::
-
If you are using social logins, adding custom fields is not an option, but you can redirect the user to another page where you ask for consent and any additional info, and then redirect back to finish the authentication transaction. This can be done with [redirect rules](/rules/redirect). Once the signup process is complete, save the consent information at the `user_metadata` by calling the [Management API's Update User endpoint](/api/management/v2#!/Users/patch_users_by_id).
:::note
| 3 |
diff --git a/lib/sharp.js b/lib/sharp.js @@ -21,7 +21,7 @@ try {
'- Consult the installation documentation: https://sharp.pixelplumbing.com/install'
);
// Check loaded
- if (process.platform === 'win32') {
+ if (process.platform === 'win32' || /symbol/.test(err.message)) {
const loadedModule = Object.keys(require.cache).find((i) => /[\\/]build[\\/]Release[\\/]sharp(.*)\.node$/.test(i));
if (loadedModule) {
const [, loadedPackage] = loadedModule.match(/node_modules[\\/]([^\\/]+)[\\/]/);
| 0 |
diff --git a/schemas/ajv.absolutePath.js b/schemas/ajv.absolutePath.js @@ -21,7 +21,6 @@ module.exports = (ajv) => ajv.addKeyword("absolutePath", {
function callback(data) {
const passes = expected === /^(?:[a-zA-Z]:)?(?:\/|\\)/.test(data);
if(!passes) {
- getErrorFor(expected, data, schema);
callback.errors = [getErrorFor(expected, data, schema)];
}
return passes;
| 2 |
diff --git a/components/Discussion/DiscussionCommentTreeRenderer.tsx b/components/Discussion/DiscussionCommentTreeRenderer.tsx @@ -3,7 +3,7 @@ import EmptyDiscussion from './shared/EmptyDiscussion'
import StatementContainer from './CommentContainers/StatementContainer'
import CommentContainer from './CommentContainers/CommentContainer'
import { CommentTreeNode } from './helpers/makeCommentTree'
-import { BoardComment } from '../../../styleguide'
+import { BoardComment } from '@project-r/styleguide'
type Props = {
comments: CommentTreeNode[]
| 1 |
diff --git a/Template/RootProjectWizard/RootWizard.cs b/Template/RootProjectWizard/RootWizard.cs @@ -39,14 +39,14 @@ namespace RootProjectWizard
CheckNodeNpmVersion();
}
- private void CheckNodeNpmVersion()
+ private string GetNodeNpmVersion(bool npm)
{
var npmProcess = new System.Diagnostics.Process()
{
StartInfo = new ProcessStartInfo
{
FileName = "cmd",
- Arguments = "/c npm.cmd version",
+ Arguments = "/c " + (npm ? "npm.cmd" : "node") + " --version",
RedirectStandardOutput = true,
UseShellExecute = false
}
@@ -65,23 +65,24 @@ namespace RootProjectWizard
npmOutput = null;
}
- bool noNPM = npmOutput == null || !npmOutput.Trim().StartsWith("{") || !npmOutput.Trim().EndsWith("}");
- if (!noNPM)
- {
- int i;
- var parts = npmOutput.Split(new char[] { '{', ' ', ':', ',', '"', '\'', '}' }, StringSplitOptions.RemoveEmptyEntries);
- var idx = Array.IndexOf(parts, "node");
- if (idx < 0 || idx + 1 >= parts.Length || !int.TryParse(parts[idx + 1].Split('.')[0], out i) || i < 6)
- noNPM = true;
- else
- {
- idx = Array.IndexOf(parts, "npm");
- if (idx < 0 || idx + 1 >= parts.Length || !int.TryParse(parts[idx + 1].Split('.')[0], out i) || i < 3)
- noNPM = true;
- }
+ npmOutput = (npmOutput ?? "").Trim();
+
+ if (npmOutput.StartsWith("v", StringComparison.OrdinalIgnoreCase))
+ npmOutput = npmOutput.Substring(1);
+
+ return npmOutput;
}
- if (noNPM)
+ private void CheckNodeNpmVersion()
+ {
+ var nodeVersion = GetNodeNpmVersion(false);
+ var nodeParts = nodeVersion.Split('.');
+ var npmVersion = GetNodeNpmVersion(true);
+ var npmParts = npmVersion.Split('.');
+
+ int i;
+ if (nodeParts.Length < 2 || !int.TryParse(nodeParts[0], out i) || i < 6 ||
+ npmParts.Length < 2 || !int.TryParse(npmParts[0], out i) || i < 3)
{
if (MessageBox.Show("You don't seem to have a recent version of NodeJS/NPM installed!\r\n\r\n" +
"It is required for TypeScript compilation and some script packages.\r\n\r\n" +
| 4 |
diff --git a/includes/Core/Assets/Assets.php b/includes/Core/Assets/Assets.php @@ -1050,7 +1050,7 @@ final class Assets {
$current_user = wp_get_current_user();
$auth_cookie = wp_parse_auth_cookie();
$blog_id = get_current_blog_id();
- $session_token = $auth_cookie['token'] ? $auth_cookie['token'] : '';
+ $session_token = isset( $auth_cookie['token'] ) ? $auth_cookie['token'] : '';
return wp_hash( $current_user->user_login . '|' . $session_token . '|' . $blog_id );
}
| 7 |
diff --git a/src/components/Audiences/index.js b/src/components/Audiences/index.js @@ -18,7 +18,7 @@ const createAudiences = ({ logger }) => {
fireReferrerHideableImage,
logger
});
- const handleResponse = ({ response }) => {
+ const processDestinationsFromResponse = ({ response }) => {
if (!response) {
return undefined;
}
@@ -27,8 +27,8 @@ const createAudiences = ({ logger }) => {
};
return {
lifecycle: {
- onResponse: handleResponse,
- onRequestFailure: handleResponse
+ onResponse: processDestinationsFromResponse,
+ onRequestFailure: processDestinationsFromResponse
},
commands: {}
};
| 10 |
diff --git a/js/mercado.js b/js/mercado.js @@ -70,12 +70,17 @@ module.exports = class mercado extends Exchange {
'withdraw': true,
},
'timeframes': {
+ '1m': '1m',
+ '5m': '5m',
'15m': '15m',
+ '30m': '30m',
'1h': '1h',
- '3h': '3h',
+ '6h': '6h',
+ '12h': '12h',
'1d': '1d',
+ '3d': '3d',
'1w': '1w',
- '1M': '1M',
+ '2w': '2w',
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/27837060-e7c58714-60ea-11e7-9192-f05e86adb83f.jpg',
@@ -83,13 +88,11 @@ module.exports = class mercado extends Exchange {
'public': 'https://www.mercadobitcoin.net/api',
'private': 'https://www.mercadobitcoin.net/tapi',
'v4Public': 'https://www.mercadobitcoin.com.br/v4',
- 'v4PublicNet': 'https://api.mercadobitcoin.net/api/v4',
},
'www': 'https://www.mercadobitcoin.com.br',
'doc': [
'https://www.mercadobitcoin.com.br/api-doc',
'https://www.mercadobitcoin.com.br/trade-api',
- 'https://api.mercadobitcoin.net/api/v4/docs/',
],
},
'api': {
@@ -125,11 +128,6 @@ module.exports = class mercado extends Exchange {
'{coin}/candle/',
],
},
- 'v4PublicNet': {
- 'get': [
- 'candles',
- ],
- },
},
'fees': {
'trading': {
@@ -729,16 +727,16 @@ module.exports = class mercado extends Exchange {
parseOHLCV (ohlcv, market = undefined) {
return [
- this.safeTimestamp (ohlcv, 0),
- this.safeNumber (ohlcv, 1),
- this.safeNumber (ohlcv, 2),
- this.safeNumber (ohlcv, 3),
- this.safeNumber (ohlcv, 4),
- this.safeNumber (ohlcv, 5),
+ this.safeTimestamp (ohlcv, 'timestamp'),
+ this.safeNumber (ohlcv, 'open'),
+ this.safeNumber (ohlcv, 'high'),
+ this.safeNumber (ohlcv, 'low'),
+ this.safeNumber (ohlcv, 'close'),
+ this.safeNumber (ohlcv, 'volume'),
];
}
- async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
+ async fetchOHLCV (symbol, timeframe = '5m', since = undefined, limit = undefined, params = {}) {
/**
* @method
* @name mercado#fetchOHLCV
@@ -753,8 +751,8 @@ module.exports = class mercado extends Exchange {
await this.loadMarkets ();
const market = this.market (symbol);
const request = {
- 'resolution': this.timeframes[timeframe],
- 'symbol': market['base'] + '-' + market['quote'],
+ 'precision': this.timeframes[timeframe],
+ 'coin': market['id'].toLowerCase (),
};
if (limit !== undefined && since !== undefined) {
request['from'] = parseInt (since / 1000);
@@ -766,8 +764,8 @@ module.exports = class mercado extends Exchange {
request['to'] = this.seconds ();
request['from'] = request['to'] - (limit * this.parseTimeframe (timeframe));
}
- const response = await this.v4PublicNetGetCandles (this.extend (request, params));
- const candles = this.convertTradingViewToOHLCV (response, 't', 'o', 'h', 'l', 'c', 'v');
+ const response = await this.v4PublicGetCoinCandle (this.extend (request, params));
+ const candles = this.safeValue (response, 'candles', []);
return this.parseOHLCVs (candles, market, timeframe, since, limit);
}
@@ -864,7 +862,7 @@ module.exports = class mercado extends Exchange {
sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
let url = this.urls['api'][api] + '/';
const query = this.omit (params, this.extractParams (path));
- if ((api === 'public') || (api === 'v4Public') || (api === 'v4PublicNet')) {
+ if (api === 'public' || (api === 'v4Public')) {
url += this.implodeParams (path, params);
if (Object.keys (query).length) {
url += '?' + this.urlencode (query);
| 13 |
diff --git a/app/templates/_package.json b/app/templates/_package.json <% if (client === "vue2") { %>
"vue": "^2.5.10",
- "axios": "^0.18.0",
+ "vuex": "^3.0.1",
"vue-router": "^3.0.1",
+ "axios": "^0.18.0",
<% } %>
<% if (nodeWebFrameworkServer === "koa") { %>
| 0 |
diff --git a/scripts/slither.sh b/scripts/slither.sh # ------------------------------------------------------------------
- array=( indexer index delegate swap types wrapper )
+ array=( indexer delegate swap types wrapper )
for package in "${array[@]}"
do
| 2 |
diff --git a/ui/scss/themes/dark.scss b/ui/scss/themes/dark.scss --color-snack-bg: var(--color-secondary);
// Ads
- --color-ads-background: #dce6e8;
+ --color-ads-background: #475057;
--color-ads-text: #111;
--color-ads-link: var(--color-primary-alt);
}
| 7 |
diff --git a/src/diagrams/user-journey/journeyRenderer.js b/src/diagrams/user-journey/journeyRenderer.js @@ -71,7 +71,7 @@ export const draw = function(text, id) {
drawActorLegend(diagram);
bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);
-
+ console.log(bounds);
drawTasks(diagram, tasks, 0);
const box = bounds.getBounds();
@@ -103,6 +103,7 @@ export const draw = function(text, id) {
const extraVertForTitle = title ? 70 : 0;
diagram.attr('viewBox', `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
diagram.attr('preserveAspectRatio', 'xMinYMin meet');
+ diagram.attr('height', height + extraVertForTitle + 25);
};
export const bounds = {
| 12 |
diff --git a/builds/jazz-build-module/sls-app/sbr.groovy b/builds/jazz-build-module/sls-app/sbr.groovy @@ -1102,10 +1102,10 @@ def retrofitMandatoryFields(Map<String, SBR_Rule> aPath2RuleMap,
* Prepare serverless.yml from
* config
**/
-def prepareServerlessYml(aConfig, env, configLoader, envdeployment_descriptor) {
+def prepareServerlessYml(aConfig, env, configLoader, envDeploymenDescriptor) {
def deploymentDescriptor = null
- if( envdeployment_descriptor != null){
- deploymentDescriptor = envdeployment_descriptor
+ if( envDeploymenDescriptor != null){
+ deploymentDescriptor = envDeploymenDescriptor
} else {
deploymentDescriptor = aConfig['deployment_descriptor']
}
| 10 |
diff --git a/README.md b/README.md @@ -147,7 +147,7 @@ Say thanks!
<td><img src="images/svg/viber.svg" width="125" title="viber" /><br>746 Bytes</td>
</tr>
<tr>
-<td><img src="images/svg/buffer.svg" width="125" title="buffer" /><br>557 Bytes</td>
+<td><img src="images/svg/buffer.svg" width="125" title="buffer" /><br>490 Bytes</td>
</tr>
</table>
| 3 |
diff --git a/src/pages/using-spark/components/input.mdx b/src/pages/using-spark/components/input.mdx @@ -368,8 +368,9 @@ Consider using a [Huge Select Box](#huge-select-box) instead.
- Width of each Huge Radio should be the same size.
<ComponentPreview
- componentName="input-huge-radio--default-story"
+ componentName="components-input-radio--huge"
hasHTML
+ hasReact
/>
<a id="search-input" class="docs-b-Link--anchor"/>
| 3 |
diff --git a/userscript.user.js b/userscript.user.js @@ -411,6 +411,9 @@ var $$IMU_EXPORT$$;
"subcategory_open_behavior": {
"en": "Open Behavior"
},
+ "subcategory_close_behavior": {
+ "en": "Close Behavior"
+ },
"subcategory_behavior": {
"en": "Popup Behavior"
},
@@ -1120,7 +1123,7 @@ var $$IMU_EXPORT$$;
mouseover_trigger_behavior: "keyboard"
},
category: "popup",
- subcategory: "trigger"
+ subcategory: "close_behavior"
},
mouseover_close_need_mouseout: {
name: "Don't close until mouse leaves",
@@ -1131,7 +1134,7 @@ var $$IMU_EXPORT$$;
}
},
category: "popup",
- subcategory: "trigger"
+ subcategory: "close_behavior"
},
mouseover_jitter_threshold: {
name: "Threshold to leave image",
@@ -1144,7 +1147,7 @@ var $$IMU_EXPORT$$;
type: "number",
number_unit: "pixels",
category: "popup",
- subcategory: "trigger"
+ subcategory: "close_behavior"
},
mouseover_use_hold_key: {
name: "Use hold key",
@@ -1153,7 +1156,7 @@ var $$IMU_EXPORT$$;
mouseover_trigger_behavior: "mouse"
},
category: "popup",
- subcategory: "trigger"
+ subcategory: "close_behavior"
},
mouseover_hold_key: {
name: "Hold key",
@@ -1163,7 +1166,7 @@ var $$IMU_EXPORT$$;
},
type: "keysequence",
category: "popup",
- subcategory: "trigger"
+ subcategory: "close_behavior"
},
mouseover_close_on_leave_el: {
name: "Close when leaving thumbnail",
@@ -1173,7 +1176,7 @@ var $$IMU_EXPORT$$;
mouseover_position: "beside_cursor"
},
category: "popup",
- subcategory: "trigger"
+ subcategory: "close_behavior"
},
mouseover_zoom_behavior: {
name: "Popup default zoom",
@@ -1281,7 +1284,7 @@ var $$IMU_EXPORT$$;
mouseover_scroll_behavior: "zoom"
},
category: "popup",
- subcategory: "behavior"
+ subcategory: "close_behavior"
},
mouseover_position: {
name: "Popup position",
@@ -1557,6 +1560,7 @@ var $$IMU_EXPORT$$;
"popup": {
"trigger": "subcategory_trigger",
"open_behavior": "subcategory_open_behavior",
+ "close_behavior": "subcategory_close_behavior",
"behavior": "subcategory_behavior",
"ui": "subcategory_ui",
"popup_other": "subcategory_popup_other"
| 5 |
diff --git a/src/components/screens/ChapterScreen/LanguageMenu/FrameworkMenu.js b/src/components/screens/ChapterScreen/LanguageMenu/FrameworkMenu.js @@ -138,11 +138,13 @@ const FrameworkMenu = ({
() => getTranslationPagesByFramework(translationPages),
[translationPages]
);
- const frameworks = sortBy(
- Object.keys(translationPagesByFramework),
- frameworkName => frameworkName
- );
+ // in the future ue another metric for popularity
+ const frameworksByPopularity = ['react', 'react-native', 'vue', 'angular', 'svelte'];
+ const frameworks = sortBy(Object.keys(translationPagesByFramework), frameworkName =>
+ frameworksByPopularity.indexOf(frameworkName)
+ );
+ /* console.log(`frameworks:${JSON.stringify(frameworks,null,2)}`) */
// this might be only applied to for now to design systems for developers( and even then....)
if (
// There is only one framework
| 3 |
diff --git a/test/integration/fixtures/diffs/diffs.fixture.js b/test/integration/fixtures/diffs/diffs.fixture.js @@ -106,8 +106,8 @@ describe('diffs', function () {
});
it('should display diff by data and not like an objects', function () {
- actual = new Buffer([0x01]);
- expected = new Buffer([0x02]);
+ actual = Buffer.from([0x01]);
+ expected = Buffer.from([0x02]);
expect(actual).to.eql(expected);
});
});
| 14 |
diff --git a/src/encoded/tests/test_batch_download.py b/src/encoded/tests/test_batch_download.py # Use workbook fixture from BDD tests (including elasticsearch)
-from .features.conftest import app_settings, app, workbook
+import json
+import pytest
+from encoded.tests.features.conftest import app
+from encoded.tests.features.conftest import app_settings
+from encoded.tests.features.conftest import workbook
+from encoded.batch_download import lookup_column_value
+from encoded.batch_download import restricted_files_present
+from encoded.batch_download import file_type_param_list
-def test_report_download(testapp, workbook):
+
+param_list_1 = {'files.file_type': 'fastq'}
+param_list_2 = {'files.title': 'ENCFF222JUK'}
+exp_file_1 = {'file_type': 'fastq',
+ 'restricted': True}
+exp_file_2 = {'file_type': 'bam',
+ 'restricted': False}
+exp_file_3 = {'file_type': 'gz'}
+
+
[email protected]
+def lookup_column_value_item():
+ item = {
+ 'assay_term_name': 'ISO-seq',
+ 'lab': {'title': 'John Stamatoyannopoulos, UW'},
+ 'accession': 'ENCSR751ISO',
+ 'assay_title': 'ISO-seq',
+ 'award': {'project': 'Roadmap'},
+ 'status': 'released',
+ '@id': '/experiments/ENCSR751ISO/',
+ '@type': ['Experiment', 'Dataset', 'Item'],
+ 'biosample_term_name': 'midbrain'
+ }
+ return item
+
+
[email protected]
+def lookup_column_value_validate():
+ valid = {
+ 'assay_term_name': 'ISO-seq',
+ 'lab.title': 'John Stamatoyannopoulos, UW',
+ 'audit': '',
+ 'award.project': 'Roadmap',
+ '@id': '/experiments/ENCSR751ISO/',
+ 'level.name': '',
+ '@type': ['Experiment', 'Dataset', 'Item']
+ }
+ return valid
+
+
+def test_batch_download_report_download(testapp, workbook):
res = testapp.get('/report.tsv?type=Experiment&sort=accession')
assert res.headers['content-type'] == 'text/tsv; charset=UTF-8'
disposition = res.headers['content-disposition']
@@ -27,3 +74,62 @@ def test_report_download(testapp, workbook):
# b'', b'', b'', b'', b'', b'', b''
# ]
assert len(lines) == 47
+
+
+def test_batch_download_files_txt(testapp, workbook):
+ results = testapp.get('/batch_download/type%3DExperiment')
+ assert results.headers['Content-Type'] == 'text/plain; charset=UTF-8'
+ assert results.headers['Content-Disposition'] == 'attachment; filename="files.txt"'
+
+ lines = results.body.splitlines()
+ assert len(lines) > 0
+
+ metadata = (lines[0].decode('UTF-8')).split('/')
+ assert metadata[-1] == 'metadata.tsv'
+ assert metadata[-2] == 'type=Experiment'
+ assert metadata[-3] == 'metadata'
+
+ assert len(lines[1:]) > 0
+ for url in lines[1:]:
+ url_frag = (url.decode('UTF-8')).split('/')
+ assert url_frag[2] == metadata[2]
+ assert url_frag[3] == 'files'
+ assert url_frag[5] == '@@download'
+ assert url_frag[4] == (url_frag[6].split('.'))[0]
+
+
+def test_batch_download_restricted_files_present(testapp, workbook):
+ results = testapp.get('/search/?limit=all&field=files.href&field=files.file_type&field=files&type=Experiment')
+ results = results.body.decode("utf-8")
+ results = json.loads(results)
+
+ files_gen = (
+ exp_file
+ for exp in results['@graph']
+ for exp_file in exp.get('files', [])
+ )
+ for exp_file in files_gen:
+ assert exp_file.get('restricted', False) == restricted_files_present(exp_file)
+
+
+def test_batch_download_lookup_column_value(lookup_column_value_item, lookup_column_value_validate):
+ for path in lookup_column_value_validate.keys():
+ assert lookup_column_value_validate[path] == lookup_column_value(lookup_column_value_item, path)
+
+
[email protected]("test_input,expected", [
+ (file_type_param_list(exp_file_1, param_list_2), True),
+ (file_type_param_list(exp_file_1, param_list_1), True),
+ (file_type_param_list(exp_file_2, param_list_1), False),
+])
+def test_file_type_param_list(test_input, expected):
+ assert test_input == expected
+
+
[email protected]("test_input,expected", [
+ (restricted_files_present(exp_file_1), True),
+ (restricted_files_present(exp_file_2), False),
+ (restricted_files_present(exp_file_3), False),
+])
+def test_restricted_files_present(test_input, expected):
+ assert test_input == expected
| 0 |
diff --git a/package.json b/package.json "name": "chart.js",
"homepage": "https://www.chartjs.org",
"description": "Simple HTML5 charts using the canvas element.",
- "version": "2.9.1",
+ "version": "3.0.0-dev",
"license": "MIT",
"jsdelivr": "dist/Chart.min.js",
"unpkg": "dist/Chart.min.js",
| 12 |
diff --git a/generators/entity-client/templates/angular/src/main/webapp/app/entities/entity-management-update.component.ts.ejs b/generators/entity-client/templates/angular/src/main/webapp/app/entities/entity-management-update.component.ts.ejs @@ -135,7 +135,11 @@ export class <%= entityAngularName %>UpdateComponent implements OnInit {
}
setFileData(event, entity, field, isImage) {
- this.dataUtils.setFileData(event, entity, field, isImage);
+ this.dataUtils.setFileData(event, entity, field, isImage)
+ .then(
+ modifiedEntity => entity = { ...modifiedEntity },
+ error => this.jhiAlertService.error(error, null, null)
+ );
}
<%_ if (fieldsContainImageBlob) { _%>
| 9 |
diff --git a/lib/assets/core/javascripts/cartodb3/editor/layers/layer-content-views/analyses/analysis-form-models/data-observatory-multiple-nested-measure-model.js b/lib/assets/core/javascripts/cartodb3/editor/layers/layer-content-views/analyses/analysis-form-models/data-observatory-multiple-nested-measure-model.js @@ -160,9 +160,12 @@ module.exports = Backbone.Model.extend({
_syncNormalize: function () {
var deferred = $.Deferred();
+ var measurement = this.measurements.getSelectedItem();
var normalize = this.get('normalize');
var selected = this.normalize.setSelected(normalize);
- if (!selected && normalize !== 'area') {
+ var areaAllowed = (measurement && measurement.get('type') === 'Numeric' && measurement.get('aggregate') === 'sum');
+
+ if (!selected && normalize !== 'area' || !selected && normalize === 'area' && !areaAllowed) {
this.set({ normalize: '' }, { silent: true });
this._setSchema();
}
| 1 |
diff --git a/server/game/cards/15-DotE/WyllaManderly.js b/server/game/cards/15-DotE/WyllaManderly.js @@ -5,7 +5,7 @@ class WyllaManderly extends DrawCard {
this.reaction({
when: {
onCharacterKilled: event => event.card.controller === this.controller,
- onSacrificed: event => event.card.controller === this.controller
+ onSacrificed: event => event.card.controller === this.controller && event.card.getType() === 'character'
},
target: {
cardCondition: (card, context) => card.location === 'discard pile' && card.controller === this.controller && card !== context.event.card
| 1 |
diff --git a/token-metadata/0x98E0438d3eE1404FEA48E38e92853BB08Cfa68bD/metadata.json b/token-metadata/0x98E0438d3eE1404FEA48E38e92853BB08Cfa68bD/metadata.json "symbol": "TVT",
"address": "0x98E0438d3eE1404FEA48E38e92853BB08Cfa68bD",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/package.json b/package.json "bluebird": "^3.4.6",
"cloc": "^2.3.3",
"compression": "^1.6.2",
- "eslint": "^7.17.0",
+ "eslint": "^7.5.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-es": "^4.1.0",
"eslint-plugin-html": "^6.0.0",
| 13 |
diff --git a/index.d.ts b/index.d.ts @@ -764,6 +764,10 @@ declare namespace Moleculer {
actions: ServiceActions;
Promise: PromiseConstructorLike;
+ _init(): void;
+ _start(): Promise<void>;
+ _stop(): Promise<void>;
+
/**
* Call a local event handler. Useful for unit tests.
*
| 13 |
diff --git a/src/components/__snapshots__/DateRangePicker.test.js.snap b/src/components/__snapshots__/DateRangePicker.test.js.snap @@ -7,7 +7,7 @@ exports[`renders correctly no dates 1`] = `
hideExtraDays={true}
markedDates={
Object {
- "2018-04-16": Object {
+ "2018-04-14": Object {
"marked": true,
},
}
@@ -68,7 +68,7 @@ exports[`renders correctly only startDate 1`] = `
"selected": true,
"startingDay": true,
},
- "2018-04-16": Object {
+ "2018-04-14": Object {
"marked": true,
},
}
@@ -132,7 +132,7 @@ exports[`renders correctly startDate after endDate 1`] = `
"endingDay": true,
"selected": true,
},
- "2018-04-16": Object {
+ "2018-04-14": Object {
"marked": true,
},
}
@@ -196,7 +196,7 @@ exports[`renders correctly startDate before endDate 1`] = `
"endingDay": true,
"selected": true,
},
- "2018-04-16": Object {
+ "2018-04-14": Object {
"marked": true,
},
}
@@ -257,7 +257,7 @@ exports[`renders correctly startDate equals endDate 1`] = `
"selected": true,
"startingDay": true,
},
- "2018-04-16": Object {
+ "2018-04-14": Object {
"marked": true,
},
}
| 13 |
diff --git a/sources/us/co/denver.json b/sources/us/co/denver.json "unit": [
"BUILDING_T",
"BUILDING_I",
- "COMPOSITE_",
- "COMPOSIT_U"
+ "UNIT_TYPE",
+ "UNIT_IDENT"
]
},
"website": "https://www.denvergov.org/opendata/dataset/city-and-county-of-denver-addresses",
| 4 |
diff --git a/Source/Core/EllipsoidGeodesic.js b/Source/Core/EllipsoidGeodesic.js @@ -6,7 +6,6 @@ define([
'./defaultValue',
'./defined',
'./defineProperties',
- './DeveloperError',
'./Ellipsoid',
'./Math'
], function(
@@ -16,7 +15,6 @@ define([
defaultValue,
defined,
defineProperties,
- DeveloperError,
Ellipsoid,
CesiumMath) {
'use strict';
@@ -181,7 +179,7 @@ define([
var lastCartesian = Cartesian3.normalize(ellipsoid.cartographicToCartesian(end, scratchCart2), scratchCart2);
//>>includeStart('debug', pragmas.debug);
- Check.typeOf.number.greaterThanOrEquals('value', Math.abs(Math.abs(Cartesian3.angleBetween(firstCartesian, lastCartesian)) - Math.PI), 0.0125)
+ Check.typeOf.number.greaterThanOrEquals('value', Math.abs(Math.abs(Cartesian3.angleBetween(firstCartesian, lastCartesian)) - Math.PI), 0.0125);
//>>includeEnd('debug');
vincentyInverseFormula(ellipsoidGeodesic, ellipsoid.maximumRadius, ellipsoid.minimumRadius,
| 3 |
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -37,6 +37,7 @@ import * as voices from './voices.js';
import * as procgen from './procgen/procgen.js';
import {getHeight} from './avatars/util.mjs';
import performanceTracker from './performance-tracker.js';
+import renderSettingsManager from './rendersettings-manager.js';
import debug from './debug.js';
import * as sceneCruncher from './scene-cruncher.js';
import * as scenePreviewer from './scene-previewer.js';
@@ -349,6 +350,9 @@ metaversefile.setApi({
useRenderer() {
return getRenderer();
},
+ useRenderSettings() {
+ return renderSettingsManager;
+ },
useScene() {
return scene;
},
| 0 |
diff --git a/packages/vulcan-forms/lib/components/Form.jsx b/packages/vulcan-forms/lib/components/Form.jsx @@ -66,9 +66,9 @@ class Form extends Component {
};
// convert SimpleSchema schema into JSON object
- this.schema = convertSchema(props.collection.simpleSchema());
+ this.schema = convertSchema(this.getCollection().simpleSchema());
// Also store all field schemas (including nested schemas) in a flat structure
- this.flatSchema = convertSchema(props.collection.simpleSchema(), true);
+ this.flatSchema = convertSchema(this.getCollection().simpleSchema(), true);
// the initial document passed as props
this.initialDocument = merge({}, this.props.prefilledProps, this.props.document);
| 4 |
diff --git a/app/controllers/oauth_controller.rb b/app/controllers/oauth_controller.rb @@ -20,7 +20,7 @@ class OauthController < ApplicationController
def access_token_with_xauth
if params[:x_auth_mode] == 'client_auth'
if user = authenticate(params[:x_auth_username], params[:x_auth_password])
- @token = Carto::AccessToken.filter(:user => user, :client_application => current_client_application, :invalidated_at => nil).limit(1).first
+ @token = user.tokens.find_by(client_application: current_client_application, invalidated_at: nil)
@token = Carto::AccessToken.create(:user => user, :client_application => current_client_application) if @token.blank?
if @token
| 2 |
diff --git a/userscript.user.js b/userscript.user.js @@ -33146,12 +33146,17 @@ if (domain_nosub === "lystit.com" && domain.match(/cdn[a-z]?\.lystit\.com/)) {
// https://hayabusa.io/abema/programs/12-20_s0_p25/thumb002.png
// https://hayabusa.io/abema/series/26-24agzukmebpc/thumb.v1557970510.png
// https://hayabusa.io/abema/series/26-24agzukmebpc/thumb.png
+ // thanks again to fireattack:
+ // https://hayabusa.io/abema/programs/386-48_s0_p25/thumb001.webp
+ // https://hayabusa.io/abema/programs/386-48_s0_p25/thumb001.q100.webp -- is the same as:
+ // https://hayabusa.io/abema/programs/386-48_s0_p25/thumb001.webp?q=100
return src
.replace(/(\/(?:thumb)?[0-9]*)(?:\.[a-z]+[0-9]+)*(\.[^/.]*)(?:[?#].*)?$/, "$1$2")
//.replace(/(\/adcross\/.*\/[-0-9a-f]{25,})(\.[^/.]*?)(?:[?#].*)?$/, "$1$2")
- .replace(/\?[wh]=[0-9]+(?:&(.*))?$/, "?$1")
- .replace(/&[wh]=[0-9]+(&.*)?$/, "$1")
- .replace(/\?$/, "");
+ .replace(/\?[whq]=[0-9]+(?:&(.*))?$/, "?$1")
+ .replace(/&[whq]=[0-9]+(&.*)?$/, "$1")
+ .replace(/\?$/, "")
+ .replace(/(\.(?:jpg|png|webp|gif))(?:\?.*)?/, "$1?q=100");
}
if (domain === "s.dou.ua") {
| 7 |
diff --git a/src/sdk/p2p/peerconnection-channel.js b/src/sdk/p2p/peerconnection-channel.js @@ -867,7 +867,7 @@ class P2PPeerConnectionChannel extends EventDispatcher {
if (notifyRemote) {
let sendError;
if (error) {
- sendError = JSON.parse(JSON.stringify(error));
+ sendError.code = error.code;
// Avoid to leak detailed error to remote side.
sendError.message = 'Error happened at remote side.';
}
| 1 |
diff --git a/app/lnd/config/index.js b/app/lnd/config/index.js -// Cert will be located depending on your machine
-// Mac OS X: /Users/user/Library/Application Support/Lnd/tls.cert
+// Cert will be tlsCertPathated depending on your machine:
+//
+// Mac OS X: /Users/.../Library/Application Support/Lnd/tls.cert
// Linux: ~/.lnd/tls.cert
-// Windows: TODO find out where cert is located for windows machine
-import { userInfo, platform } from 'os'
+// Windows: C:\Users\...\AppData\Local\Lnd
+import { homedir, platform } from 'os'
import { dirname, join, normalize } from 'path'
import Store from 'electron-store'
import { app } from 'electron'
@@ -24,37 +25,33 @@ const appRootPath = appPath.indexOf('default_app.asar') < 0 ? normalize(`${appPa
// Get an electromn store named 'connection' in which the saved connection detailes are stored.
const store = new Store({ name: 'connection' })
-// Get the name of the current platform which we can use to determine the location of various lnd resources.
+// Get the name of the current platform which we can use to determine the tlsCertPathation of various lnd resources.
const plat = platform()
-let loc
-let macaroonPath
+// Get the OS specific default lnd data dir and binary name.
+let lndDataDir
let lndBin
-let lndPath
-
switch (plat) {
case 'darwin':
- loc = 'Library/Application Support/Lnd/tls.cert'
- macaroonPath = 'Library/Application Support/Lnd/admin.macaroon'
+ lndDataDir = join(homedir(), 'Library', 'Application Support', 'Lnd')
lndBin = 'lnd'
break
case 'linux':
- loc = '.lnd/tls.cert'
- macaroonPath = '.lnd/admin.macaroon'
+ lndDataDir = join(homedir(), '.lnd')
lndBin = 'lnd'
break
case 'win32':
- loc = join('Appdata', 'Local', 'Lnd', 'tls.cert')
- macaroonPath = join('Appdata', 'Local', 'Lnd', 'admin.macaroon')
+ lndDataDir = join(process.env.APPDATA, 'Local', 'Lnd')
lndBin = 'lnd.exe'
break
default:
break
}
+// Get the path to the lnd binary.
+let lndPath
if (isDev) {
- const lndBinaryDir = dirname(require.resolve('lnd-binary/package.json'))
- lndPath = join(lndBinaryDir, 'vendor', lndBin)
+ lndPath = join(dirname(require.resolve('lnd-binary/package.json')), 'vendor', lndBin)
} else {
lndPath = join(appRootPath, 'bin', lndBin)
}
@@ -70,8 +67,8 @@ export default {
configPath: join(appRootPath, 'resources', 'lnd.conf'),
rpcProtoPath: join(appRootPath, 'resources', 'rpc.proto'),
host: typeof host === 'undefined' ? 'localhost:10009' : host,
- cert: typeof cert === 'undefined' ? join(userInfo().homedir, loc) : cert,
- macaroon: typeof macaroon === 'undefined' ? join(userInfo().homedir, macaroonPath) : macaroon
+ cert: typeof cert === 'undefined' ? join(lndDataDir, 'tls.cert') : cert,
+ macaroon: typeof macaroon === 'undefined' ? join(lndDataDir, 'admin.macaroon') : macaroon
}
}
}
| 1 |
diff --git a/templates/components/objectives.html b/templates/components/objectives.html <h4 class="panel-title">Objectives</h4>
</div>
+
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Parent</th>
+ <th>Create Date</th>
+ <th class="text-right">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for objective in get_all_objectives %}
+ <tr>
+ <td>{{ objective.name }}</td>
+ <td>{{ objective.parent }}</td>
+ <td>{{ objective.create_date | date }}</td>
+ <td class="text-right">
+ <!-- Action buttons -->
+ <div class="btn-group">
+ <button type="button" class="btn btn-sm btn-default"><i class="fa fa-pencil"></i> Update</button>
+ <button
+ type="button"
+ class="btn btn-default btn-sm dropdown-toggle"
+ data-toggle="dropdown"
+ aria-haspopup="true"
+ aria-expanded="false"
+ >
+ <span class="caret"></span>
+ <span class="sr-only">Toggle Dropdown</span>
+ </button>
+ <ul class="dropdown-menu">
+ <li class="text-danger"><a href="#">Delete</a></li>
+ </ul>
+ </div>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
</div>
</div>
| 0 |
diff --git a/app/components/Utility/LoadingButton.jsx b/app/components/Utility/LoadingButton.jsx @@ -3,6 +3,7 @@ import LoadingIndicator from "../LoadingIndicator";
import counterpart from "counterpart";
import {findDOMNode} from "react-dom";
import PropTypes from "prop-types";
+import {Button} from "bitshares-ui-style-guide";
/** This component gives a convenient way to indicate loading.
*
@@ -331,7 +332,7 @@ class LoadingButton extends React.Component {
<div style={this.props.style}>
{leftElement != null && leftElement}
<span style={{float: "left"}}>
- <button
+ <Button
ref={instance => {
this.loadingButton = instance;
}}
@@ -343,7 +344,7 @@ class LoadingButton extends React.Component {
style={buttonStyle}
>
{buttonInner}
- </button>
+ </Button>
</span>
{rightElement != null && rightElement}
<div style={{clear: "both"}} />
| 14 |
diff --git a/package.json b/package.json {
"name": "sfcc-ci",
- "version": "2.1.0",
+ "version": "2.2.0",
"description": "Command line tool to allow Continuous Integration practices with Salesforce Commerce Cloud instances",
"main": "index.js",
"bin": {
| 12 |
diff --git a/src/DevChatter.Bot.Core/Commands/ScheduleCommand.cs b/src/DevChatter.Bot.Core/Commands/ScheduleCommand.cs @@ -12,7 +12,7 @@ public class ScheduleCommand : BaseCommand
{
public string CommandText => "schedule";
- public ScheduleCommand(IRepository repository) : base(repository, UserRole.Mod)
+ public ScheduleCommand(IRepository repository) : base(repository, UserRole.Everyone)
{
HelpText = "To see our schedule just type !schedule and to see it in another timezone, pass your UTC offset. Example: !schedule -4";
}
| 11 |
diff --git a/spec/requests/superadmin/users_spec.rb b/spec/requests/superadmin/users_spec.rb @@ -583,10 +583,21 @@ feature "Superadmin's users API" do
user.rate_limit.api_attributes.should eq rate_limit_custom.api_attributes
end
- it 'gcloud settings are updated in redis' do
- user = FactoryGirl.create(:user)
- user.save
+ describe 'gcloud settings' do
+
+ before(:all) do
+ @user = FactoryGirl.create(:user)
+ end
+
+ after(:all) do
+ @user.destroy
+ end
+ after(:each) do
+ $users_metadata.del("do_settings:#{@user.username}:#{@user.api_key}")
+ end
+
+ it 'gcloud settings are updated in redis' do
expected_gcloud_settings = {
service_account: {
type: 'service_account',
@@ -605,9 +616,11 @@ feature "Superadmin's users API" do
gcloud_settings: expected_gcloud_settings
}
}
- put superadmin_user_url(user.id), payload.to_json, superadmin_headers
+ put superadmin_user_url(@user.id), payload.to_json, superadmin_headers do |response|
+ response.status.should == 204
+ end
- redis_gcloud_settings = $users_metadata.hgetall("do_settings:#{user.username}:#{user.api_key}").symbolize_keys
+ redis_gcloud_settings = $users_metadata.hgetall("do_settings:#{@user.username}:#{@user.api_key}").symbolize_keys
redis_gcloud_settings[:service_account].should == expected_gcloud_settings[:service_account].to_json
redis_gcloud_settings[:bq_public_project].should == expected_gcloud_settings[:bq_public_project]
@@ -615,46 +628,55 @@ feature "Superadmin's users API" do
redis_gcloud_settings[:bq_project].should == expected_gcloud_settings[:bq_project]
redis_gcloud_settings[:gcs_bucket].should == expected_gcloud_settings[:gcs_bucket]
redis_gcloud_settings[:bq_dataset].should == expected_gcloud_settings[:bq_dataset]
+ end
+
+ it 'gclouds settings are set to blank when receiving empty hash' do
+ dummy_settings = { bq_project: 'dummy_project' }
+ $users_metadata.hmset("do_settings:#{@user.username}:#{@user.api_key}", *dummy_settings.to_a)
- # An update with empty gcloud settings
payload = {
user: {
gcloud_settings: {}
}
}
- put superadmin_user_url(user.id), payload.to_json, superadmin_headers
- redis_gcloud_settings = $users_metadata.hgetall("do_settings:#{user.username}:#{user.api_key}")
+ put superadmin_user_url(@user.id), payload.to_json, superadmin_headers do |response|
+ response.status.should == 204
+ end
+
+ redis_gcloud_settings = $users_metadata.hgetall("do_settings:#{@user.username}:#{@user.api_key}")
redis_gcloud_settings.should == {}
+ end
+
+ it 'An update without gcloud settings do not affect them' do
+ expected_settings = { bq_project: 'dummy_project' }
+ $users_metadata.hmset("do_settings:#{@user.username}:#{@user.api_key}", *expected_settings.to_a)
- # An update without gcloud settings (so that it can safely be deployed without central changes)
payload = {
user: {
+ builder_enabled: true
}
}
- put superadmin_user_url(user.id), payload.to_json, superadmin_headers
- redis_gcloud_settings = $users_metadata.hgetall("do_settings:#{user.username}:#{user.api_key}")
- redis_gcloud_settings.should == {}
+ put superadmin_user_url(@user.id), payload.to_json, superadmin_headers do |response|
+ response.status.should == 204
end
- it 'gcloud settings are not deleted when not sent in update' do
- user = FactoryGirl.create(:user)
- user.save
-
- # Populate dummy settings
- expected_gcloud_settings = { bq_project: 'dummy_project' }
- $users_metadata.hmset("do_settings:#{user.username}:#{user.api_key}", *expected_gcloud_settings.to_a)
+ redis_gcloud_settings = $users_metadata.hgetall("do_settings:#{@user.username}:#{@user.api_key}").symbolize_keys
+ redis_gcloud_settings.should == expected_settings
+ end
- # An update with nothing to do with gcloud_settings
+ it 'An update without gcloud settings does not add an empty key to redis' do
payload = {
user: {
- builder_enabled: true
+ #builder_enabled: true
}
}
- put superadmin_user_url(user.id), payload.to_json, superadmin_headers
+ put superadmin_user_url(@user.id), payload.to_json, superadmin_headers do |response|
+ response.status.should == 204
+ end
- # Make sure they are still there
- redis_gcloud_settings = $users_metadata.hgetall("do_settings:#{user.username}:#{user.api_key}").symbolize_keys
- redis_gcloud_settings[:bq_project].should == expected_gcloud_settings[:bq_project]
+ keys = $users_metadata.keys("do_settings:#{@user.username}:*")
+ keys.should be_empty
+ end
end
end
| 7 |
diff --git a/assets/js/modules/analytics/datastore/adsense.test.js b/assets/js/modules/analytics/datastore/adsense.test.js @@ -40,8 +40,6 @@ describe( 'modules/analytics adsense', () => {
beforeEach( () => {
registry = createTestRegistry();
store = registry.stores[ STORE_NAME ].store;
- // Receive empty settings to prevent unexpected fetch by resolver.
- // registry.dispatch( STORE_NAME ).receiveGetSettings( {} );
} );
afterEach( () => {
| 2 |
diff --git a/patch/patches/devtools.patch b/patch/patches/devtools.patch -diff --git a/front_end/extensions/ExtensionServer.ts b/front_end/extensions/ExtensionServer.ts
+diff --git a/front_end/models/extensions/ExtensionServer.ts b/front_end/models/extensions/ExtensionServer.ts
index d75db4c1a..346337d26 100644
---- front_end/extensions/ExtensionServer.ts
-+++ front_end/extensions/ExtensionServer.ts
+--- front_end/models/extensions/ExtensionServer.ts
++++ front_end/models/extensions/ExtensionServer.ts
@@ -942,6 +942,7 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper {
}
| 3 |
diff --git a/components/Notifications/SubscribedAuthors.js b/components/Notifications/SubscribedAuthors.js @@ -2,6 +2,7 @@ import React, { useMemo, useState } from 'react'
import { compose, graphql } from 'react-apollo'
import { myUserSubscriptions } from './enhancers'
import {
+ Editorial,
plainButtonRule,
A,
Interaction,
@@ -141,7 +142,7 @@ const SubscribedAuthors = ({
>
<div {...styles.author}>
<Link href={`/~${author.userDetails.slug}`} passHref>
- <A>{author.object.name}</A>
+ <Editorial.A>{author.object.name}</Editorial.A>
</Link>
</div>
<div {...styles.checkbox}>
| 14 |
diff --git a/packages/iov-ethereum/src/ethereumcodec.ts b/packages/iov-ethereum/src/ethereumcodec.ts @@ -11,10 +11,10 @@ import {
TxCodec,
UnsignedTransaction,
} from "@iov/bcp-types";
-import { Keccak256 } from "@iov/crypto";
+import { ExtendedSecp256k1Signature, Keccak256 } from "@iov/crypto";
import { Encoding } from "@iov/encoding";
-import { encodeQuantity, encodeQuantityString, hexPadToEven, trimLeadingZero } from "./utils";
+import { encodeQuantity, encodeQuantityString, hexPadToEven} from "./utils";
import { isValidAddress } from "./derivation";
import { toRlp } from "./encoding";
@@ -78,10 +78,10 @@ export const ethereumCodec: TxCodec = {
if (!isValidAddress(signed.transaction.recipient)) {
throw new Error("Invalid recipient address");
}
- const sig = signed.primarySignature.signature;
- const r = sig.slice(0, 32);
- const s = sig.slice(32, 64);
- let v = Number(sig.slice(-1)) + 27;
+ const sig = ExtendedSecp256k1Signature.fromFixedLength(signed.primarySignature.signature);
+ const r = sig.r();
+ const s = sig.s();
+ let v = sig.recovery + 27;
const chainId = Number(signed.transaction.chainId);
if (chainId > 0) {
v += chainId * 2 + 8;
@@ -96,8 +96,8 @@ export const ethereumCodec: TxCodec = {
Buffer.from(fromHex(hexPadToEven(valueHex))),
Buffer.from(fromHex(hexPadToEven(dataHex))),
Buffer.from(fromHex(hexPadToEven(chainIdHex))),
- Buffer.from(fromHex(trimLeadingZero(toHex(r)))),
- Buffer.from(fromHex(trimLeadingZero(toHex(s)))),
+ Buffer.from(r),
+ Buffer.from(s),
]),
);
return postableTx as PostableBytes;
| 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.