code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js @@ -573,6 +573,119 @@ describe('Test axes', function() {
.toEqual(tinycolor.mix('#444', bgColor, frac).toRgbString());
});
+ it('should default to a dark color for tickfont when plotting background is light', function() {
+ layoutIn = {
+ plot_bgcolor: 'lightblue',
+ xaxis: {
+ showgrid: true,
+ ticklabelposition: 'inside'
+ }
+ };
+
+ supplyLayoutDefaults(layoutIn, layoutOut, fullData);
+ expect(layoutOut.xaxis.tickfont.color).toEqual('#444');
+ });
+
+ it('should default to a light color for tickfont when plotting background is dark', function() {
+ layoutIn = {
+ plot_bgcolor: 'darkblue',
+ xaxis: {
+ showgrid: true,
+ ticklabelposition: 'inside'
+ }
+ };
+
+ supplyLayoutDefaults(layoutIn, layoutOut, fullData);
+ expect(layoutOut.xaxis.tickfont.color).toEqual('#fff');
+ });
+
+ it('should not coerce ticklabelposition on *multicategory* axes for now', function() {
+ layoutIn = {
+ xaxis: {type: 'multicategory'},
+ yaxis: {type: 'multicategory'}
+ };
+ supplyLayoutDefaults(layoutIn, layoutOut, fullData);
+ expect(layoutOut.xaxis.ticklabelposition).toBeUndefined();
+ expect(layoutOut.yaxis.ticklabelposition).toBeUndefined();
+ });
+
+ ['category', 'linear', 'date'].forEach(function(type) {
+ it('should coerce ticklabelposition on *' + type + '* axes', function() {
+ layoutIn = {
+ xaxis: {type: type},
+ yaxis: {type: type}
+ };
+ supplyLayoutDefaults(layoutIn, layoutOut, fullData);
+ expect(layoutOut.xaxis.ticklabelposition).toBe('outside');
+ expect(layoutOut.yaxis.ticklabelposition).toBe('outside');
+ });
+ });
+
+ ['category', 'linear', 'date'].forEach(function(type) {
+ it('should be able to set ticklabelposition to *inside* on *' + type + '* axes', function() {
+ layoutIn = {
+ xaxis: {type: type, ticklabelposition: 'inside'},
+ yaxis: {type: type, ticklabelposition: 'inside'}
+ };
+ supplyLayoutDefaults(layoutIn, layoutOut, fullData);
+ expect(layoutOut.xaxis.ticklabelposition).toBe('inside');
+ expect(layoutOut.yaxis.ticklabelposition).toBe('inside');
+ });
+ });
+
+ ['inside left', 'inside right', 'outside left', 'outside right'].forEach(function(ticklabelposition) {
+ ['category', 'linear', 'date'].forEach(function(type) {
+ it('should be able to set ticklabelposition to *' + ticklabelposition + '* on xaxis for *' + type + '* axes', function() {
+ layoutIn = {
+ xaxis: {type: type, ticklabelposition: ticklabelposition},
+ yaxis: {type: type, ticklabelposition: ticklabelposition}
+ };
+ supplyLayoutDefaults(layoutIn, layoutOut, fullData);
+ expect(layoutOut.xaxis.ticklabelposition).toBe(ticklabelposition);
+ expect(layoutOut.yaxis.ticklabelposition).toBe('outside', ticklabelposition + ' is not a valid input on yaxis');
+ });
+ });
+ });
+
+ ['inside top', 'inside bottom', 'outside top', 'outside bottom'].forEach(function(ticklabelposition) {
+ ['category', 'linear', 'date'].forEach(function(type) {
+ it('should be able to set ticklabelposition to *' + ticklabelposition + '* on yaxis for *' + type + '* axes', function() {
+ layoutIn = {
+ xaxis: {type: type, ticklabelposition: ticklabelposition},
+ yaxis: {type: type, ticklabelposition: ticklabelposition}
+ };
+ supplyLayoutDefaults(layoutIn, layoutOut, fullData);
+ expect(layoutOut.xaxis.ticklabelposition).toBe('outside', ticklabelposition + ' is not a valid input on yaxis');
+ expect(layoutOut.yaxis.ticklabelposition).toBe(ticklabelposition);
+ });
+ });
+ });
+
+ [
+ 'inside left', 'inside right', 'outside left', 'outside right',
+ 'inside top', 'inside bottom', 'outside top', 'outside bottom'
+ ].forEach(function(ticklabelposition) {
+ it('should not be able to set ticklabelposition to *' + ticklabelposition + '* when ticklabelmode is *period*', function() {
+ layoutIn = {
+ xaxis: {type: 'date', ticklabelmode: 'period', ticklabelposition: ticklabelposition},
+ yaxis: {type: 'date', ticklabelmode: 'period', ticklabelposition: ticklabelposition}
+ };
+ supplyLayoutDefaults(layoutIn, layoutOut, fullData);
+ expect(layoutOut.xaxis.ticklabelposition).toBe('outside', ticklabelposition + ' is not a valid input with period mode');
+ expect(layoutOut.yaxis.ticklabelposition).toBe('outside', ticklabelposition + ' is not a valid input with period mode');
+ });
+ });
+
+ it('should be able to set ticklabelposition to *inside* on yaxis when ticklabelmode is *period*', function() {
+ layoutIn = {
+ xaxis: {type: 'date', ticklabelmode: 'period', ticklabelposition: 'inside'},
+ yaxis: {type: 'date', ticklabelmode: 'period', ticklabelposition: 'inside'}
+ };
+ supplyLayoutDefaults(layoutIn, layoutOut, fullData);
+ expect(layoutOut.xaxis.ticklabelposition).toBe('inside');
+ expect(layoutOut.yaxis.ticklabelposition).toBe('inside');
+ });
+
it('should inherit calendar from the layout', function() {
layoutOut.calendar = 'nepali';
layoutIn = {
| 0 |
diff --git a/tests/e2e/specs/modules/analytics/setup-with-account-with-tag.test.js b/tests/e2e/specs/modules/analytics/setup-with-account-with-tag.test.js @@ -26,6 +26,7 @@ async function proceedToSetUpAnalytics() {
}
const EXISTING_PROPERTY_ID = 'UA-00000001-1';
+const EXISTING_ACCOUNT_ID = '100';
let getAccountsRequestHandler;
let tagPermissionRequestHandler;
@@ -75,7 +76,10 @@ describe( 'setting up the Analytics module with an existing account and existing
tagPermissionRequestHandler = ( request ) => {
request.respond( {
status: 200,
- body: 'true',
+ body: JSON.stringify( {
+ account: EXISTING_ACCOUNT_ID,
+ property: EXISTING_PROPERTY_ID,
+ } ),
} );
};
await setAnalyticsExistingPropertyId( EXISTING_PROPERTY_ID );
| 3 |
diff --git a/iris/index.js b/iris/index.js @@ -61,30 +61,13 @@ import {
import { StaticRouter } from 'react-router';
import { createStore } from 'redux';
import { createLocalInterface } from 'apollo-local-query';
+import Helmet from 'react-helmet';
import { initStore } from '../src/store';
+const html = fs
+ .readFileSync(path.resolve(__dirname, '..', 'build', 'index.html'))
+ .toString();
-function Html({ content, state, styleElement }) {
- return (
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="/reset.css" />
- {styleElement}
- </head>
- <body>
- <div id="content" dangerouslySetInnerHTML={{ __html: content }} />
- <script
- dangerouslySetInnerHTML={{
- __html: `window.__APOLLO_STATE__=${JSON.stringify(state).replace(
- /</g,
- '\\u003c'
- )};`,
- }}
- />
- </body>
- </html>
- );
-}
app.use(
express.static(path.resolve(__dirname, '..', 'build'), { index: false })
);
@@ -124,15 +107,20 @@ app.get('*', function(req, res) {
.then(content => {
// We are ready to render for real
const initialState = store.getState();
- const html = (
- <Html
- content={content}
- state={initialState}
- styleElement={sheet.getStyleElement()}
- />
+ const helmet = Helmet.renderStatic();
+ const final = html
+ .replace(
+ '<div id="root"></div>',
+ `${sheet.getStyleTags()}<script>window.__SERVER_STATE__=${JSON.stringify(
+ initialState
+ ).replace(/</g, '\\u003c')}</script><div id="root">${content}</div>`
+ )
+ .replace(
+ '</head>',
+ `${helmet.title.toString()}${helmet.meta.toString()}${helmet.link.toString()}</head>`
);
res.status(200);
- res.send(`<!doctype html>\n${ReactDOM.renderToStaticMarkup(html)}`);
+ res.send(final);
res.end();
})
.catch(err => {
| 4 |
diff --git a/src/libs/actions/Link.js b/src/libs/actions/Link.js import Onyx from 'react-native-onyx';
import lodashGet from 'lodash/get';
+import {Linking} from 'react-native';
import ONYXKEYS from '../../ONYXKEYS';
import Growl from '../Growl';
import * as Localize from '../Localize';
import CONST from '../../CONST';
-import * as DeprecatedAPI from '../deprecatedAPI';
import CONFIG from '../../CONFIG';
import asyncOpenURL from '../asyncOpenURL';
+import * as API from '../API';
let isNetworkOffline = false;
Onyx.connect({
@@ -38,7 +39,7 @@ function openOldDotLink(url) {
return;
}
- function buildOldDotURL({shortLivedAuthToken}) {
+ function buildOldDotURL(shortLivedAuthToken) {
const hasHashParams = url.indexOf('#') !== -1;
const hasURLParams = url.indexOf('?') !== -1;
@@ -46,7 +47,18 @@ function openOldDotLink(url) {
return `${CONFIG.EXPENSIFY.EXPENSIFY_URL}${url}${hasHashParams || hasURLParams ? '&' : '?'}authToken=${shortLivedAuthToken}&email=${encodeURIComponent(currentUserEmail)}`;
}
- asyncOpenURL(DeprecatedAPI.GetShortLivedAuthToken(), buildOldDotURL);
+ // We use makeRequestWithSideEffects here because we need to block until after we get the shortLivedAuthToken back from the server (link won't work without it!).
+ // eslint-disable-next-line rulesdir/no-api-side-effects-method
+ API.makeRequestWithSideEffects(
+ 'OpenOldDotLink', {}, {},
+ ).then((response) => {
+ debugger;
+ if (response.jsonCode === 200) {
+ Linking.openURL(buildOldDotURL(response.shortLivedAuthToken));
+ } else {
+ Growl.show(response.message, CONST.GROWL.WARNING);
+ }
+ });
}
/**
| 4 |
diff --git a/app/lib/zooniverse-logging.js b/app/lib/zooniverse-logging.js -const enabledTokens = ['zooHome', 'zooTalk', 'zooniverse/gravity-spy', 'mschwamb/comet-hunters', 'zooniverse/snapshot-wisconsin'];
+const excludedProjects = []
class ZooniverseLogging {
constructor() {
@@ -27,7 +27,7 @@ class ZooniverseLogging {
}
logEvent(logEntry) {
- if (enabledTokens.includes(this.keys.projectToken)) {
+ if (!excludedProjects.includes(this.keys.projectToken)) {
const newEntry = Object.assign({}, this.keys, logEntry);
this.adapters.forEach(adapter => adapter.logEvent(newEntry));
}
| 11 |
diff --git a/site/maxlength.xml b/site/maxlength.xml @@ -61,7 +61,7 @@ limitations under the License.
By default messages will be dropped or dead-lettered from the front
of the queue to make room for new messages, once the limit is reached.
This behaviour can be changed by setting the <code>overflow</code>
- setting to <code>reject_publish</code>, then published messages will
+ setting to <code>reject-publish</code>, then published messages will
be discarded and publisher will be informed with
<code>basic.nack</code> if publisher confirms are enabled.
If a message is routed to multiple queues and rejected by at least
@@ -109,13 +109,13 @@ limitations under the License.
<tr>
<th>rabbitmqctl</th>
<td>
- <pre>rabbitmqctl set_policy Ten "^two-messages$" '{"max-length":2, "overflow":"reject_publish"}' --apply-to queues</pre>
+ <pre>rabbitmqctl set_policy Ten "^two-messages$" '{"max-length":2, "overflow":"reject-publish"}' --apply-to queues</pre>
</td>
</tr>
<tr>
<th>rabbitmqctl (Windows)</th>
<td>
- <pre>rabbitmqctl.bat set_policy Ten "^one-meg$" "{""max-length-bytes"":2, ""overflow"":""reject_publish""}" --apply-to queues</pre>
+ <pre>rabbitmqctl.bat set_policy Ten "^one-meg$" "{""max-length-bytes"":2, ""overflow"":""reject-publish""}" --apply-to queues</pre>
</td>
</tr>
</table>
@@ -153,8 +153,8 @@ limitations under the License.
<p>
Overflow behaviour can be set by supplying the
<code>x-overflow</code> queue declaration argument with a
- string value. Possible values are <code>drop_head</code> (default) or
- <code>reject_publish</code>
+ string value. Possible values are <code>drop-head</code> (default) or
+ <code>reject-publish</code>
</p>
<p>
This example in Java declares a queue with a maximum length
| 10 |
diff --git a/app/src/main/mockServer.js b/app/src/main/mockServer.js @@ -78,11 +78,12 @@ let randomCandidate = () => ({
module.exports = function (port = 8999) {
let app = express()
+ // TODO this lets the server timeout until there is an external request
// log all requests
- app.use((req, res, next) => {
- console.log('REST request:', req.method, req.originalUrl, req.body)
- next()
- })
+ // app.use((req, res, next) => {
+ // console.log('REST request:', req.method, req.originalUrl, req.body)
+ // next()
+ // })
// delegation mock API
let candidates = new Array(50).fill(0).map(randomPubkey)
| 1 |
diff --git a/remcomments.js b/remcomments.js @@ -2,11 +2,12 @@ const fs = require("fs");
function update() {
console.log("Updating...");
- var userscript = fs.readFileSync("userscript.user.js").toString();
+ var userscript = fs.readFileSync(process.argv[2] || "userscript.user.js").toString();
var lines = userscript.split("\n");
var newlines = [];
var in_bigimage = false;
+ var in_falserule = false;
var firstcomment = true;
var within_header = true;
@@ -40,7 +41,16 @@ function update() {
continue;
}
+ if (in_falserule) {
+ if (line.match(/^ {8}[}]$/))
+ in_falserule = false;
+ continue;
+ }
+
if (!line.match(/^\s*\/\//)) {
+ if (line.match(/^ {8}(?:[/][*])?if [(]false *&&/))
+ in_falserule = true;
+ else
newlines.push(line);
} else {
if (!line.match(/\/\/\s+https?:\/\//) && false)
| 7 |
diff --git a/lib/contracts/provider.js b/lib/contracts/provider.js @@ -78,7 +78,7 @@ class Provider {
if (!self.isDev) {
return callback();
}
- async.each(self.accounts, (account, eachCb) => {
+ async.eachLimit(self.accounts, 1, (account, eachCb) => {
fundAccount(self.web3, account.address, account.hexBalance, eachCb);
}, callback);
}
| 12 |
diff --git a/react/src/components/awards/SprkAward.js b/react/src/components/awards/SprkAward.js @@ -131,7 +131,7 @@ SprkAward.propTypes = {
element: PropTypes.oneOfType([
PropTypes.string,
PropTypes.func,
- PropTypes.element,
+ PropTypes.elementType,
]),
/** The image src. */
src: PropTypes.string.isRequired,
| 3 |
diff --git a/core/api/src/config/servers/web.ts b/core/api/src/config/servers/web.ts @@ -11,7 +11,9 @@ export const DEFAULT = {
serverOptions: {},
// Should we redirect all traffic to the first host in this array if hte request header doesn't match?
// i.e.: [ 'https://www.site.com' ]
- allowedRequestHosts: process.env.WEB_URL ? [process.env.WEB_URL] : [],
+ allowedRequestHosts: process.env.ALLOWED_HOSTS
+ ? process.env.ALLOWED_HOSTS.split(",")
+ : [],
// Port or Socket Path
port: process.env.PORT || 8080,
// Which IP to listen on (use '0.0.0.0' for all; '::' for all on ipv4 and ipv6)
| 13 |
diff --git a/assets/js/modules/adsense/components/setup/SetupMain.js b/assets/js/modules/adsense/components/setup/SetupMain.js @@ -305,7 +305,7 @@ export default function SetupMain( { finishSetup } ) {
viewComponent = <SetupAccountApproved />;
break;
default:
- if ( alertsError ) {
+ if ( error ) {
viewComponent = <ErrorNotice />;
} else {
viewComponent = <ErrorText message={ sprintf(
| 14 |
diff --git a/react-redux-form.d.ts b/react-redux-form.d.ts @@ -226,7 +226,7 @@ export interface ControlProps<T> extends React.HTMLProps<T> {
/**
* Determines the value given the event (from onChange) and optionally the control component's props.
*/
- getValue?: (e: Event, props: any) => any;
+ getValue?: (e: ChangeEvent<T> | string, props: any) => any;
/**
* Signifies that the control is a toggle (e.g., a checkbox or a radio). If true, then some optimizations are made.
*/
| 7 |
diff --git a/character-controller.js b/character-controller.js @@ -57,6 +57,7 @@ function loadPhysxCharacterController() {
const contactOffset = 0.1/heightFactor * avatarHeight;
const stepOffset = 0.5/heightFactor * avatarHeight;
const radius = 0.3/heightFactor * avatarHeight;
+ const height = avatarHeight - radius*2;
const position = this.position.clone()
.add(new THREE.Vector3(0, -avatarHeight/2, 0));
const physicsMaterial = new THREE.Vector3(0, 0, 0);
@@ -67,13 +68,21 @@ function loadPhysxCharacterController() {
}
this.characterController = physicsManager.createCharacterController(
radius - contactOffset,
- avatarHeight - radius*2,
+ height,
contactOffset,
stepOffset,
position,
physicsMaterial
);
this.characterControllerObject = new THREE.Object3D();
+
+ const dynamic = !!(this.isRemotePlayer || this.isNpcPlayer);
+ if (dynamic) {
+ const halfHeight = height/2;
+ const physicsObject = physicsManager.addCapsuleGeometry(this.position, this.quaternion, radius, halfHeight, physicsMaterial);
+ this.physicsObject = physicsObject;
+ // console.log('character controller physics id', physicsObject.physicsId);
+ }
}
class PlayerHand extends THREE.Object3D {
@@ -1050,6 +1059,9 @@ class NpcPlayer extends StaticUninterpolatedPlayer {
this.characterPhysics = new CharacterPhysics(this);
loadPhysxCharacterController.call(this);
+
+ const npcs = metaversefile.useNpcs();
+ npcs.push(this);
}
updatePhysics(now, timeDiff) {
const timeDiffS = timeDiff / 1000;
@@ -1099,6 +1111,13 @@ class NpcPlayer extends StaticUninterpolatedPlayer {
this.syncAvatar();
} */
+ destroy() {
+ const npcs = metaversefile.getNpcs();
+ const index = npcs.indexOf(this);
+ if (index !== -1) {
+ npcs.splice(index, 1);
+ }
+ }
}
function getPlayerCrouchFactor(player) {
| 0 |
diff --git a/src/global/css.js b/src/global/css.js @@ -46,6 +46,7 @@ function style () {
if ( doc && !styleElement ) {
styleElement = doc.createElement( 'style' );
styleElement.type = 'text/css';
+ styleElement.setAttribute( 'data-ractive-css', '' );
doc.getElementsByTagName( 'head' )[0].appendChild( styleElement );
| 12 |
diff --git a/userscript.user.js b/userscript.user.js @@ -36624,11 +36624,14 @@ var $$IMU_EXPORT$$;
// https://www.dbstatic.no/68267011.jpg?width=-1&height=-1 -- 1664x2500
domain_nowww === "dbstatic.no") {
// http://www.cdn.tv2.no/images?imageId=8999096&width=3000
+ // thanks to fedesk on discord
+ // https://www.cdn.tv2.no/?imageId=9698940&width=200&height=128
+ // https://www.cdn.tv2.no/images?imageId=9698940&height=-1
//return src.replace(/\/images.*?[?&]imageId=([0-9]+).*/, "/images?imageId=$1&height=-1");
//return src.replace(/(:\/\/[^/]*\/[0-9]+\.[^/.]*?)(?:\?.*)?$/, "$1?width=-1&height=-1");
newsrc = src
.replace(/(:\/\/[^/]*\/[0-9]+\.[^/.?#]*)(?:[?#].*)?$/, "$1?width=-1&height=-1")
- .replace(/\/images.*?[?&]imageId=([0-9]+).*/, "/images?imageId=$1&height=-1");
+ .replace(/\/(?:images)?\?(?:.*&)?imageId=([0-9]+).*/, "/?imageId=$1&height=-1");
if (newsrc !== src)
return newsrc;
}
| 7 |
diff --git a/spec/support/redis.rb b/spec/support/redis.rb @@ -18,70 +18,10 @@ module CartoDB
end
class RedisTest
- REDIS_PID = "/tmp/redis-test.pid"
- REDIS_CACHE_PATH = "/tmp"
- REDIS_DB_NAME = "redis_test.rdb"
-
def self.down
- if ENV['REDIS_PORT']
- if File.file?("/tmp/redis-test-#{ENV['REDIS_PORT']}.tmp")
- puts "\n[redis] Shutting down test server..."
- pid = File.read("/tmp/redis-test-#{ENV['REDIS_PORT']}.tmp").to_i
- system("kill -9 #{pid}")
- File.delete("/tmp/redis-test-#{ENV['REDIS_PORT']}.tmp")
- end
- else
- if File.file?(REDIS_PID)
- puts "\n[redis] Shutting down test server..."
- pid = File.read(REDIS_PID).to_i
- system("kill -9 #{pid}")
- File.delete(REDIS_PID)
- end
- File.delete(File.join(REDIS_CACHE_PATH, REDIS_DB_NAME)) if File.file?(File.join(REDIS_CACHE_PATH, REDIS_DB_NAME))
- end
end
def self.up
- down
- if ENV['REDIS_PORT']
- print "Setting up redis config..."
- port = ENV['REDIS_PORT']
- new_redis_pid = "/tmp/redis-test-#{ENV['REDIS_PORT']}.tmp"
- new_cache_path = "/tmp/redis-#{ENV['REDIS_PORT']}"
- new_logfile = "/tmp/redis-#{ENV['REDIS_PORT']}/stdout"
- Dir.mkdir "/tmp/redis-#{ENV['REDIS_PORT']}" unless File.exists?("/tmp/redis-#{ENV['REDIS_PORT']}")
- else
- port = Cartodb.config[:redis]["port"]
- end
- print "[redis] Starting test server on port #{port}... "
-
- raise "Your OS is not supported" unless OS.unix?
-
- redis_cell_base_path = '/etc/redis/redis-cell'
- redis_cell_path = "#{redis_cell_base_path}/libredis_cell.so"
- redis_cell_path = "#{redis_cell_base_path}/libredis_cell.dylib" if OS.mac?
-
- raise "Please drop redis-cell binaries in #{redis_cell_base_path}" unless FileTest.exist?(redis_cell_path)
-
- redis_options = {
- "port" => port,
- "daemonize" => 'yes',
- "pidfile" => new_redis_pid || REDIS_PID,
- "timeout" => 300,
- "dbfilename" => REDIS_DB_NAME,
- "dir" => new_cache_path || REDIS_CACHE_PATH,
- "loglevel" => "notice",
- "logfile" => new_logfile || "stdout",
- "loadmodule" => redis_cell_path
- }.map { |k, v| "#{k} #{v}" }.join("\n")
-
- output = `printf '#{redis_options}' | redis-server - 2>&1`
- if $?.success?
- puts('done')
- sleep 2
- else
- raise "Error starting test Redis server: #{output}"
- end
end
end
| 2 |
diff --git a/lib/assets/javascripts/new-dashboard/components/Settings/Ordering.vue b/lib/assets/javascripts/new-dashboard/components/Settings/Ordering.vue <h6 class="text is-xsmall is-txtSoftGrey u-tupper letter-spacing">{{ $t('SettingsDropdown.orderMaps') }}</h6>
<ul class="list">
<li class="type text is-caption is-txtGrey" :class="{ 'type--selected': isOrderApplied('favorited,updated_at', 'desc,desc') }">
- <a href="javascript:void(0)"
- class="element" :class="{ 'element--selected': isOrderApplied('favorited,updated_at', 'desc,desc') }"
+ <a class="element" :class="{ 'element--selected': isOrderApplied('favorited,updated_at', 'desc,desc') }"
@click="setOrder('favorited,updated_at', 'desc,desc')">
{{ $t('SettingsDropdown.order.favourites') }}
</a>
</li>
<li class="type text is-caption is-txtGrey" :class="{ 'type--selected': isOrderApplied('updated_at') }">
{{ $t('SettingsDropdown.order.date.title') }} (
- <a href="javascript:void(0)" class="element" :class="{ 'element--selected': isOrderApplied('updated_at', 'desc') }" @click="setOrder('updated_at', 'desc')">
+ <a class="element" :class="{ 'element--selected': isOrderApplied('updated_at', 'desc') }" @click="setOrder('updated_at', 'desc')">
{{ $t('SettingsDropdown.order.date.newest') }}
</a> |
- <a href="javascript:void(0)" class="element" :class="{ 'element--selected': isOrderApplied('updated_at', 'asc') }" @click="setOrder('updated_at', 'asc')">
+ <a class="element" :class="{ 'element--selected': isOrderApplied('updated_at', 'asc') }" @click="setOrder('updated_at', 'asc')">
{{ $t('SettingsDropdown.order.date.oldest') }}
</a>
)
</li>
<li class="type text is-caption is-txtGrey" :class="{ 'type--selected': isOrderApplied('name') }">
{{ $t('SettingsDropdown.order.alphabetical.title') }} (
- <a href="javascript:void(0)" class="element" :class="{ 'element--selected': isOrderApplied('name', 'asc') }" @click="setOrder('name', 'asc')">
+ <a class="element" :class="{ 'element--selected': isOrderApplied('name', 'asc') }" @click="setOrder('name', 'asc')">
{{ $t('SettingsDropdown.order.alphabetical.A-Z') }}
</a> |
- <a href="javascript:void(0)" class="element" :class="{ 'element--selected': isOrderApplied('name', 'desc') }" @click="setOrder('name', 'desc')">
+ <a class="element" :class="{ 'element--selected': isOrderApplied('name', 'desc') }" @click="setOrder('name', 'desc')">
{{ $t('SettingsDropdown.order.alphabetical.Z-A') }}
</a>
)
</li>
<li class="type text is-caption is-txtGrey" :class="{ 'type--selected': isOrderApplied('mapviews', 'desc') }">
- <a href="javascript:void(0)" class="element" :class="{ 'element--selected': isOrderApplied('mapviews', 'desc') }" @click="setOrder('mapviews', 'desc')">
+ <a class="element" :class="{ 'element--selected': isOrderApplied('mapviews', 'desc') }" @click="setOrder('mapviews', 'desc')">
{{ $t('SettingsDropdown.order.views') }}
</a>
</li>
@@ -100,6 +99,7 @@ export default {
.element {
text-decoration: none;
+ cursor: pointer;
&.element--selected {
color: $text-color;
| 2 |
diff --git a/test/jasmine/tests/gl3d_hover_click_test.js b/test/jasmine/tests/gl3d_hover_click_test.js @@ -550,7 +550,7 @@ describe('Test gl3d trace click/hover:', function() {
.then(done);
});
- it('@gl should display correct face colors', function(done) {
+ it('@noCI @gl should display correct face colors', function(done) {
var fig = mesh3dcoloringMock;
Plotly.newPlot(gd, fig)
@@ -603,7 +603,7 @@ describe('Test gl3d trace click/hover:', function() {
.then(done);
});
- it('@gl should display correct face intensities (uniform grid)', function(done) {
+ it('@noCI @gl should display correct face intensities (uniform grid)', function(done) {
var fig = mesh3dcellIntensityMock;
Plotly.newPlot(gd, fig)
@@ -634,7 +634,7 @@ describe('Test gl3d trace click/hover:', function() {
.then(done);
});
- it('@gl should display correct face intensities (non-uniform grid)', function(done) {
+ it('@noCI @gl should display correct face intensities (non-uniform grid)', function(done) {
var fig = mesh3dbunnyMock;
Plotly.newPlot(gd, fig)
@@ -665,7 +665,7 @@ describe('Test gl3d trace click/hover:', function() {
.then(done);
});
- it('@gl should display correct face intensities *alpha-hull* case', function(done) {
+ it('@noCI @gl should display correct face intensities *alpha-hull* case', function(done) {
var fig = {
data: [{
type: 'mesh3d',
@@ -709,7 +709,7 @@ describe('Test gl3d trace click/hover:', function() {
.then(done);
});
- it('@gl should display correct face intensities *delaunay* case', function(done) {
+ it('@noCI @gl should display correct face intensities *delaunay* case', function(done) {
var fig = {
data: [{
type: 'mesh3d',
| 0 |
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.stories.ts b/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.stories.ts @@ -128,7 +128,7 @@ export const defaultStory = () => ({
href: '/global-1',
icon: 'auto-loans',
iconCSS: 'sprk-c-Icon--xl sprk-c-Icon--stroke-current-color',
- analytics: 'link-1',
+ analyticsString: 'link-1',
iconScreenReaderText: 'auto loans'
},
{
@@ -138,7 +138,7 @@ export const defaultStory = () => ({
'https://spark-assets.netlify.com/spark-placeholder.jpg',
imgCSS: 'sprk-u-Width-20',
imgAlt: 'Spark Placeholder Image',
- analytics: 'link-2'
+ analyticsString: 'link-2'
},
{
text: 'Lorem ipsum dolor sit amet, consectetur.',
@@ -147,14 +147,14 @@ export const defaultStory = () => ({
'https://spark-assets.netlify.com/spark-placeholder.jpg',
imgCSS: 'sprk-u-Width-20',
imgAlt: 'Spark Placeholder Image',
- analytics: 'link-3'
+ analyticsString: 'link-3'
},
{
text: 'Lorem ipsum dolor sit amet, consectetur.',
href: '/global-4',
icon: 'auto-loans',
iconCSS: 'sprk-c-Icon--xl sprk-c-Icon--stroke-current-color',
- analytics: 'link-4',
+ analyticsString: 'link-4',
iconScreenReaderText: 'auto loans'
},
{
@@ -162,7 +162,7 @@ export const defaultStory = () => ({
href: '/global-5',
icon: 'payment-center',
iconCSS: 'sprk-c-Icon--xl sprk-c-Icon--stroke-current-color',
- analytics: 'link-5',
+ analyticsString: 'link-5',
iconScreenReaderText: 'payment center'
}
]"
@@ -172,28 +172,28 @@ export const defaultStory = () => ({
href: '/icons-1',
icon: 'facebook-two-color',
iconCSS: 'sprk-c-Icon--l sprk-c-Icon--stroke-current-color',
- analytics: 'social-link-1',
+ analyticsString: 'social-link-1',
iconScreenReaderText: 'facebook'
},
{
href: '/icons-2',
icon: 'instagram-two-color',
iconCSS: 'sprk-c-Icon--l sprk-c-Icon--stroke-current-color',
- analytics: 'social-link-2',
+ analyticsString: 'social-link-2',
iconScreenReaderText: 'instagram'
},
{
href: '/icons-3',
icon: 'twitter-two-color',
iconCSS: 'sprk-c-Icon--l sprk-c-Icon--stroke-current-color',
- analytics: 'social-link-3',
+ analyticsString: 'social-link-3',
iconScreenReaderText: 'twitter'
},
{
href: '/icons-4',
icon: 'youtube-two-color',
iconCSS: 'sprk-c-Icon--l sprk-c-Icon--stroke-current-color',
- analytics: 'social-link-4',
+ analyticsString: 'social-link-4',
iconScreenReaderText: 'youtube'
}
]"
@@ -203,21 +203,21 @@ export const defaultStory = () => ({
href: '/badge-1',
icon: 'townhouse',
iconCSS: 'sprk-c-Icon--l sprk-c-Icon--stroke-current-color',
- analytics: 'link-1',
+ analyticsString: 'link-1',
iconScreenReaderText: 'townhouse'
},
{
href: '/badge-2',
icon: 'townhouse',
iconCSS: 'sprk-c-Icon--l sprk-c-Icon--stroke-current-color',
- analytics: 'link-2',
+ analyticsString: 'link-2',
iconScreenReaderText: 'townhouse'
},
{
href: '/badge-3',
icon: 'townhouse',
iconCSS: 'sprk-c-Icon--l sprk-c-Icon--stroke-current-color',
- analytics: 'link-3',
+ analyticsString: 'link-3',
iconScreenReaderText: 'townhouse'
}
]"
@@ -230,7 +230,7 @@ export const defaultStory = () => ({
'https://spark-assets.netlify.com/spark-placeholder.jpg',
imgCSS: 'sprk-u-Width-50',
imgAlt: 'placeholder',
- analytics: 'awards-link-1'
+ analyticsString: 'awards-link-1'
},
{
href: '/awards-2',
@@ -238,7 +238,7 @@ export const defaultStory = () => ({
'https://spark-assets.netlify.com/spark-placeholder.jpg',
imgCSS: 'sprk-u-Width-50',
imgAlt: 'placeholder',
- analytics: 'awards-link-2'
+ analyticsString: 'awards-link-2'
}
]"
@@ -265,7 +265,7 @@ export const defaultStory = () => ({
body:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Aliquam in laoreet ante.',
- analytics: 'disclaimer'
+ analyticsString: 'disclaimer'
}
]"
>
| 3 |
diff --git a/src/components/ChangeLogComponent/ChangeLogItem.js b/src/components/ChangeLogComponent/ChangeLogItem.js @@ -97,12 +97,11 @@ const Details: ComponentType = ({ data }) => {
export const ChangeLogType: ComponentType<*> = ({ type, standAlone=false, ...props }) => {
return <CategoryContainer standAlone={ standAlone } { ...props } >
+ <span className={ "govuk-visually-hidden" }>Log category:</span>
<Category color={ colours[type]?.text ?? "#000000" }
bgColor={ colours[type]?.background ?? "inherit" }
- standAlone={ standAlone }>
- <span className={ "govuk-visually-hidden" }>Log category:</span>
- { type }
- </Category>
+ standAlone={ standAlone }
+ dangerouslySetInnerHTML={{ __html: type.replace(/\s/g, " ") }}/>
</CategoryContainer>
}; // ChangeLogType
| 14 |
diff --git a/js/kraken.js b/js/kraken.js @@ -1408,9 +1408,10 @@ module.exports = class kraken extends Exchange {
async cancelOrder (id, symbol = undefined, params = {}) {
await this.loadMarkets ();
let response = undefined;
+ const clientOrderId = this.safeValue2 (params, 'userref', 'clientOrderId');
try {
response = await this.privatePostCancelOrder (this.extend ({
- 'txid': id,
+ 'txid': clientOrderId || id,
}, params));
} catch (e) {
if (this.last_http_response) {
@@ -1434,7 +1435,13 @@ module.exports = class kraken extends Exchange {
if (since !== undefined) {
request['start'] = parseInt (since / 1000);
}
- const response = await this.privatePostOpenOrders (this.extend (request, params));
+ let query = params;
+ const clientOrderId = this.safeValue2 (params, 'userref', 'clientOrderId');
+ if (clientOrderId !== undefined) {
+ request['userref'] = clientOrderId;
+ query = this.omit (params, [ 'userref', 'clientOrderId' ]);
+ }
+ const response = await this.privatePostOpenOrders (this.extend (request, query));
let market = undefined;
if (symbol !== undefined) {
market = this.market (symbol);
@@ -1450,7 +1457,13 @@ module.exports = class kraken extends Exchange {
if (since !== undefined) {
request['start'] = parseInt (since / 1000);
}
- const response = await this.privatePostClosedOrders (this.extend (request, params));
+ let query = params;
+ const clientOrderId = this.safeValue2 (params, 'userref', 'clientOrderId');
+ if (clientOrderId !== undefined) {
+ request['userref'] = clientOrderId;
+ query = this.omit (params, [ 'userref', 'clientOrderId' ]);
+ }
+ const response = await this.privatePostClosedOrders (this.extend (request, query));
//
// {
// "error":[],
| 11 |
diff --git a/generators/languages/templates/src/main/webapp/i18n/de/_health.json b/generators/languages/templates/src/main/webapp/i18n/de/_health.json "details": "Details",
"properties": "Properties",
"name": "Name",
- "value": "Value",
+ "value": "Wert",
"error": "Error"
},
"indicator": {
| 3 |
diff --git a/src/server/app.js b/src/server/app.js @@ -153,6 +153,7 @@ async.series([
saveUninitialized: true,
resave: false,
cookie: {
+ secure: true,
maxAge: config.server.security.cookieMaxAge
},
store: new MongoStore({
| 12 |
diff --git a/sparta.go b/sparta.go @@ -8,7 +8,6 @@ import (
"fmt"
"math/rand"
"os"
- "path/filepath"
"reflect"
"regexp"
"runtime"
@@ -17,7 +16,6 @@ import (
spartaCF "github.com/mweagle/Sparta/aws/cloudformation"
spartaIAM "github.com/mweagle/Sparta/aws/iam"
- "github.com/mweagle/Sparta/system"
gocc "github.com/mweagle/go-cloudcondenser"
gocf "github.com/mweagle/go-cloudformation"
"github.com/pkg/errors"
@@ -1134,34 +1132,7 @@ func validateSpartaPreconditions(lambdaAWSInfos []*LambdaAWSInfo,
if len(errorText) != 0 {
return errors.New(strings.Join(errorText[:], "\n"))
}
- // Check that the sysinfo package is installed. This
- // may not be installed on OSX, since it's excluded
- // via a build tag
- goPath := system.GoPath()
-
- // Check that the file exists
- sysinfoPath := filepath.Join(goPath, "src",
- "github.com",
- "zcalusic",
- "sysinfo",
- "sysinfo.go")
- logger.WithFields(logrus.Fields{
- "sysinfoPath": sysinfoPath,
- }).Debug("Checking installation status of github.com/zcalusic/sysinfo")
- _, sysinfoErr := os.Stat(sysinfoPath)
- if os.IsNotExist(sysinfoErr) {
- // Let's make sure it's really not there.
- // In case `gvm` is managing paths
- sysinfoErr = buildSysInfoSample(logger)
- if sysinfoErr != nil {
- logger.WithFields(logrus.Fields{
- "sysinfoMarkerPath": sysinfoPath,
- "os": runtime.GOOS,
- "gopath": goPath,
- }).Error("The `github.com/zcalusic/sysinfo` package is not installed")
- return errors.New("Please run `go get -u -v github.com/zcalusic/sysinfo` to install this Linux-only package. This package is used when cross-compiling your AWS Lambda binary and cannot be reliably imported across platforms. When you `go get` the package, you may see errors as in `undefined: syscall.Utsname`. These are expected and can be ignored")
- }
- }
+
return nil
}
@@ -1252,7 +1223,7 @@ func HandleAWSLambda(functionName string,
if lambdaErr != nil {
panic(lambdaErr)
}
- lambda.deprecationNotices = append(lambda.deprecationNotices, "sparta.HandleAWSLambda is deprecated starting with v1.6.0. Prefer sparta.NewAWSLambda(...)")
+ lambda.deprecationNotices = append(lambda.deprecationNotices, "sparta.HandleAWSLambda is deprecated starting with v1.6.0. Prefer `sparta.NewAWSLambda(...) (*LambdaAWSInfo, error)`")
return lambda
}
| 2 |
diff --git a/saiku-core/saiku-service/src/main/java/org/saiku/repository/MarkLogicRepositoryManager.java b/saiku-core/saiku-service/src/main/java/org/saiku/repository/MarkLogicRepositoryManager.java @@ -267,6 +267,14 @@ public class MarkLogicRepositoryManager implements IRepositoryManager {
RequestOptions options = new RequestOptions();
options.setCacheResult(false); // stream by default
+ if (s != null) { // Fixing path problems
+ s = s.replace('\\', '/');
+
+ if (!s.startsWith("/")) {
+ s = "/" + s;
+ }
+ }
+
AdhocQuery request = session.newAdhocQuery("doc('" + s + "')", options);
try {
@@ -297,6 +305,10 @@ public class MarkLogicRepositoryManager implements IRepositoryManager {
@Override
public InputStream getBinaryInternalFile(String s) throws RepositoryException {
+ if (s != null) {
+ s = s.replace('\\', '/'); // Use the right path separator for Marklogic documents
+ }
+
Session session = contentSource.newSession();
RequestOptions options = new RequestOptions();
@@ -346,11 +358,6 @@ public class MarkLogicRepositoryManager implements IRepositoryManager {
@Override
public List<DataSource> getAllDataSources() throws RepositoryException {
List<DataSource> dataSources = new ArrayList<>();
-
- for (File file : getFilesFromFolder(DATASOURCES_DIRECTORY, false)) {
- if (file != null && file.getName() != null && file.getName().toLowerCase().endsWith("sds")) {
- InputStream fileContent = getBinaryInternalFile(file.getPath());
-
JAXBContext jaxbContext = null;
Unmarshaller jaxbMarshaller = null;
@@ -366,12 +373,18 @@ public class MarkLogicRepositoryManager implements IRepositoryManager {
log.error("Could not create the XML unmarshaller", e);
}
+ if (jaxbMarshaller != null) {
+ for (File file : getFilesFromFolder(DATASOURCES_DIRECTORY, false)) {
+ if (file != null && file.getName() != null && file.getName().toLowerCase().endsWith("sds")) {
DataSource d = null;
try {
- d = (DataSource) (jaxbMarshaller != null ? jaxbMarshaller.unmarshal(fileContent) : null);
+ InputStream stream = getBinaryInternalFile(file.getPath());
+ d = (DataSource) jaxbMarshaller.unmarshal(stream);
} catch (JAXBException e) {
log.error("Could not unmarshall the XML file", e);
+ } catch (Exception e) {
+ log.error("Unexpected error while trying to unmarshall the XML file", e);
}
if (d != null) {
@@ -380,6 +393,7 @@ public class MarkLogicRepositoryManager implements IRepositoryManager {
}
}
}
+ }
return dataSources;
}
| 14 |
diff --git a/sockets/sockets.js b/sockets/sockets.js @@ -1038,9 +1038,9 @@ var actionsObj = {
}
},
- mtestGame: {
- command: "mtestGame",
- help: "/mtestGame <number>: Add <number> bots to a test game and start it automatically.",
+ mtestgame: {
+ command: "mtestgame",
+ help: "/mtestgame <number>: Add <number> bots to a test game and start it automatically.",
run: function (data, senderSocket, io) {
var args = data.args;
| 10 |
diff --git a/src/server/service/config-manager.js b/src/server/service/config-manager.js @@ -32,7 +32,7 @@ class ConfigManager {
debug('ConfigManager#loadConfigs', this.configObject);
// cache all config keys
- this.setConfigKeys();
+ this.reloadConfigKeys();
}
/**
@@ -112,7 +112,7 @@ class ConfigManager {
return keys;
}
- setConfigKeys() {
+ reloadConfigKeys() {
this.configKeys = this.getConfigKeys();
}
@@ -182,7 +182,7 @@ class ConfigManager {
await this.configModel.bulkWrite(queries);
await this.loadConfigs();
- this.setConfigKeys();
+ this.reloadConfigKeys();
}
/**
| 10 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -11,7 +11,7 @@ import * as universe from './universe.js';
import {rigManager} from './rig.js';
import {buildMaterial} from './shaders.js';
import {teleportMeshes} from './teleport.js';
-import {appManager, renderer, scene, camera, dolly} from './app-object.js';
+import {appManager, renderer, scene, orthographicScene, camera, dolly} from './app-object.js';
import buildTool from './build-tool.js';
import * as notifications from './notifications.js';
import {getExt, bindUploadFileButton} from './util.js';
@@ -777,6 +777,17 @@ const _updateWeapons = timeDiff => {
_handleUseAnimation();
crosshairEl.classList.toggle('visible', ['camera', 'firstperson', 'thirdperson'].includes(cameraManager.getTool()) && !appManager.grabbedObjects[0]);
+
+ _updatePopover();
+};
+
+const popoverMesh = new THREE.Mesh(new THREE.PlaneBufferGeometry(2, 2), new THREE.MeshBasicMaterial({
+ color: 0x000000,
+}));
+popoverMesh.position.z = -1;
+orthographicScene.add(popoverMesh);
+const _updatePopover = () => {
+ popoverMesh.scale.set(800/(window.innerWidth*window.devicePixelRatio), 400/(window.innerHeight*window.devicePixelRatio), 1);
};
/* renderer.domElement.addEventListener('wheel', e => {
| 0 |
diff --git a/assets/js/components/data/index.js b/assets/js/components/data/index.js @@ -77,14 +77,10 @@ const dataAPI = {
maxRequests: 10,
init() {
- global.googlesitekit.initialized = true;
- this.collectModuleData = this.collectModuleData.bind( this );
- global.googlesitekit.cache = [];
-
addAction(
'googlesitekit.moduleLoaded',
'googlesitekit.collectModuleListingData',
- this.collectModuleData
+ this.collectModuleData.bind( this )
);
},
| 2 |
diff --git a/package.json b/package.json "moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|scss)$": "identity-obj-proxy"
- }
+ },
+ "modulePathIgnorePatterns": [
+ "<rootDir>/templates/"
+ ]
},
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.9.0",
| 8 |
diff --git a/test/browse.es b/test/browse.es @@ -10,7 +10,7 @@ const
module.exports = async function () {
const browser
- = puppeteer.launch ({ headless, executablePath: path })
+ = await puppeteer.launch ({ headless, executablePath: path })
return async function (url) {
console.warn ('Browsing to', url, await browser)
| 3 |
diff --git a/LICENSE.md b/LICENSE.md MIT License
-Copyright (c) 2021 Oleg Solomka
+Copyright (c) 2021 Oleg Solomka, Xavier Foucrier, Jonas Sandstedt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
| 0 |
diff --git a/articles/quickstart/native/cordova/download.md b/articles/quickstart/native/cordova/download.md +To run the sample follow these steps:
-To run the example you need [Node.JS LTS](https://nodejs.org/en/download/) installed, and follow these steps:
+1) Set the **Allowed Callback URLs** in the [Application Settings](${manage_url}/#/applications/${account.clientId}/settings) to
+```bash
+com.auth0.cordova.example://${account.namespace}/cordova/com.auth0.cordova.example/callback
+```
+2) Set **Allowed Origins (CORS)s** in the [Application Settings](${manage_url}/#/applications/${account.clientId}/settings) to
+
+```bash
+file://*
+```
+3) Make sure [Node.JS LTS](https://nodejs.org/en/download/) is set up and run the following commands:
+
+```bash
+npm install -g cordova
+npm install
+```
+4) Run the app (this sample uses Webpack):
+
+```bash
+# command to instruct webpack to build the application bundle.
+npm run build
+# emulate the app, {platform} being ios or android, ensure the Android Emulator is already started
+cordova emulate {platform}
+```
\ No newline at end of file
| 7 |
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,7 +6,7 @@ Before creating a pull request, please make sure:
- You have read the guide for contributing
- See https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- You signed all your commits (otherwise we won't be able to merge the PR)
- - See https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md#sign-your-work
+ - See https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md#certificate-of-origin---sign-your-work
- You added unit tests for the new functionality
- You mention in the PR description which issue it is addressing, e.g. "Resolves #123"
-->
| 14 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -115,28 +115,10 @@ jobs:
name: Docker Push
command: |
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
-
- #sudo apt-get -y install python3-pip wget
- #sudo pip3 install awscli
-
- #if [ -z "${AWS_REGION}" ]; then
- # AWS_REGION=us-west-2
- #fi
-
- #if [ "${CLOUDFORMATION_AWS_ACCESS_KEY_ID}" ]; then
- # AWS_ACCESS_KEY_ID=${CLOUDFORMATION_AWS_ACCESS_KEY_ID}
- #fi
-
- #if [ "${CLOUDFORMATION_AWS_SECRET_ACCESS_KEY}" ]; then
- # AWS_SECRET_ACCESS_KEY=${CLOUDFORMATION_AWS_SECRET_ACCESS_KEY}
- #fi
-
- #$(aws ecr get-login --no-include-email --region ${AWS_REGION})
docker push "$DOCKER_REPOSITORY:$CIRCLE_SHA1"
cat docker-cache/docker-tags.txt \
| xargs -t -I % \
docker push "$DOCKER_REPOSITORY:%"
- ./bin/ecr-docker-push.sh
deploy-to-ecs:
<<: *defaults
| 2 |
diff --git a/test/integration/offline.js b/test/integration/offline.js @@ -390,8 +390,9 @@ describe('Offline', () => {
method: 'GET',
url: '/fn1',
}, res => {
- expect(res.headers).to.have.property('set-cookie').which.contains('foo=bar');
- expect(res.headers).to.have.property('set-cookie').which.contains('floo=baz');
+ expect(res.headers).to.have.property('set-cookie');
+ expect(res.headers['set-cookie'].some(header => header.includes('foo=bar'))).to.be.true();
+ expect(res.headers['set-cookie'].some(header => header.includes('floo=baz'))).to.be.true();
done();
});
});
| 1 |
diff --git a/js/webcomponents/bisweb_grapherelement.js b/js/webcomponents/bisweb_grapherelement.js @@ -264,82 +264,8 @@ class GrapherModule extends HTMLElement {
this.lastdata.numvoxels,
showVolume);
- let options = null;
- let d_type = '';
-
- if (numframes > 1 && showVolume === false) {
- options = {
- title: {
- display: true,
- text: 'Average Intensity in each Region vs Time'
- },
- elements: {
- line: {
- tension: 0, // disables bezier curves
- }
- },
- scales: {
- xAxes: [{
- scaleLabel: {
- display: true,
- labelString: 'Time (s)',
- fontSize: 20
- }
- }],
- yAxes: [{
- ticks: {
- beginAtZero: false
- },
- scaleLabel: {
- display: true,
- labelString: 'Intensity',
- fontSize: 20
- }
- }]
- },
- legend: {
- position: 'right',
- display: false
- }
- };
- d_type = 'line';
- } else {
- let heading = "Volume of each Region";
- if (showVolume === false)
- heading = "Average Intensity in each Region";
-
- options = {
- title: {
- display: true,
- text: heading,
- },
- legend: {
- position: 'right',
- display: false
- },
- scales: {
- yAxes: [{
- scaleLabel: {
- display: true,
- labelString: 'Volume (mm^3)',
- fontSize: 10
- }
- }],
- xAxes: [{
- scaleLabel: {
- display: true,
- labelString: 'Region Index',
- fontSize: 10
- }
- }]
- }
- };
- d_type = 'bar';
- }
-
this.createGUI(showbuttons);
-
this.graphWindow.show();
let dm=this.getCanvasDimensions();
if (!dm) {
@@ -516,10 +442,15 @@ class GrapherModule extends HTMLElement {
createLineChart(data, colors, frame) {
+ //line chart seems to fill lines because the data is spikier? Doesn't do it for smooth datasets
console.log('data', data, 'colors', colors);
new Taucharts.Chart({
guide: {
- showAnchors : true,
+ showAnchors : 'never',
+ split : false,
+ showGridLines: 'xy',
+ nice : true,
+ interpolate : 'linear',
x : {
padding : 10,
label : { text : 'frame' }
| 2 |
diff --git a/src/strategies/latency.js b/src/strategies/latency.js */
"use strict";
+const Promise = require("bluebird");
const _ = require("lodash");
const { random } = require("lodash");
@@ -48,7 +49,7 @@ class LatencyStrategy extends BaseStrategy {
this.brokerStopped = false;
- this.hostLatency = new Map();
+ this.hostAvgLatency = new Map();
/* hostMap contains:
hostname => {
@@ -101,9 +102,7 @@ class LatencyStrategy extends BaseStrategy {
*/
let hosts = this.hostMap.values();
- this.broker.Promise.map(hosts, (host) => {
- return this.broker.transit.sendPing(host.nodeList[0]);
- }, { concurrency: 5 }).then(() => {
+ Promise.map(hosts, host => this.broker.transit.sendPing(host.nodeList[0]), { concurrency: 5 }).then(() => {
setTimeout(() => this.pingHosts(), 1000 * this.opts.pingInterval);
});
}
@@ -113,20 +112,14 @@ class LatencyStrategy extends BaseStrategy {
let node = this.registry.nodes.get(payload.nodeID);
if (!node) return;
- let avgLatency = null;
+ let info = this.getHostLatency(node);
- this.mapNode(node);
+ if (info.historicLatency.length > (this.opts.collectCount - 1))
+ info.historicLatency.shift();
- let hostMap = this.hostMap.get(node.hostname);
+ info.historicLatency.push(payload.elapsedTime);
- if (hostMap.historicLatency.length > (this.opts.collectCount - 1))
- hostMap.historicLatency.shift();
-
- hostMap.historicLatency.push(payload.elapsedTime);
-
- avgLatency = hostMap.historicLatency.reduce((sum, latency) => {
- return sum + latency;
- }, 0) / hostMap.historicLatency.length;
+ const avgLatency = info.historicLatency.reduce((sum, latency) => sum + latency, 0) / info.historicLatency.length;
this.broker.localBus.emit("$node.latencySlave", {
hostname: node.hostname,
@@ -135,24 +128,26 @@ class LatencyStrategy extends BaseStrategy {
}
// Master
- mapNode(node) {
- if (typeof this.hostMap.get(node.hostname) === "undefined") {
- this.hostMap.set(node.hostname, {
+ getHostLatency(node) {
+ let info = this.hostMap.get(node.hostname);
+ if (typeof info === "undefined") {
+ info = {
historicLatency: [],
nodeList: [ node.id ]
- });
+ };
+ this.hostMap.set(node.hostname, info);
}
+ return info;
}
// Master
addNode(payload) {
let node = payload.node;
- this.mapNode(node);
// each host may have multiple nodes
- let hostMap = this.hostMap.get(node.hostname);
- if (hostMap.nodeList.indexOf(node.id) === -1) {
- hostMap.nodeList.push(node.id);
+ let info = this.getHostLatency(node);
+ if (info.nodeList.indexOf(node.id) === -1) {
+ info.nodeList.push(node.id);
}
}
@@ -160,41 +155,38 @@ class LatencyStrategy extends BaseStrategy {
removeHostMap(payload) {
let node = payload.node;
- let hostMap = this.hostMap.get(node.hostname);
+ let info = this.hostMap.get(node.hostname);
// This exists to make sure that we don't get an "undefined",
// therefore the test coverage here is unnecessary.
/* istanbul ignore next */
- if (typeof hostMap === "undefined") return;
-
- let nodeIndex = hostMap.nodeList.indexOf(node.id);
- // This exists to make sure that we find the index of the node,
- // therefore the test coverage here is unnecessary.
- /* istanbul ignore else */
- if (nodeIndex > -1) {
- hostMap.nodeList.splice(nodeIndex, 1);
- }
-
- // ^ There was actually an debate about this:
- // https://github.com/gotwarlost/istanbul/issues/35
+ if (typeof info === "undefined") return;
- if (hostMap.nodeList.length > 0) return;
+ info.nodeList = info.nodeList.filter(id => id !== node.id);
+ if (info.nodeList.length == 0) {
// only remove the host if the last node disconnected
-
this.broker.localBus.emit("$node.latencySlave.removeHost", node.hostname);
this.hostMap.delete(node.hostname);
}
+ }
- // Slave
+ // Master + Slave
updateLatency(payload) {
- this.hostLatency.set(payload.hostname, payload.avgLatency);
+ this.hostAvgLatency.set(payload.hostname, payload.avgLatency);
}
// Slave
removeHostLatency(hostname) {
- this.hostLatency.delete(hostname);
+ this.hostAvgLatency.delete(hostname);
}
+ /**
+ * Select an endpoint by network latency
+ *
+ * @param {Array<Endpoint>} list
+ * @returns {Endpoint}
+ * @memberof LatencyStrategy
+ */
select(list) {
let minEp = null;
let minLatency = null;
@@ -209,7 +201,7 @@ class LatencyStrategy extends BaseStrategy {
} else {
ep = list[random(0, list.length - 1)];
}
- const epLatency = this.hostLatency.get(ep.node.hostname);
+ const epLatency = this.hostAvgLatency.get(ep.node.hostname);
// Check latency of endpoint
if (typeof epLatency !== "undefined") {
| 7 |
diff --git a/aws/cloudformation/util.go b/aws/cloudformation/util.go @@ -997,7 +997,11 @@ func ConvergeStackState(serviceName string,
aws.StringValue(eachEvent.ResourceType),
aws.StringValue(eachEvent.LogicalResourceId),
aws.StringValue(eachEvent.ResourceStatusReason))
+ // Only append if the resource failed because something else failed
+ // and this resource was canceled.
+ if !strings.Contains(errMsg, "cancelled") {
errorMessages = append(errorMessages, errMsg)
+ }
case cloudformation.ResourceStatusCreateInProgress,
cloudformation.ResourceStatusUpdateInProgress:
existingMetric, existingMetricExists := resourceMetrics[*eachEvent.LogicalResourceId]
| 8 |
diff --git a/site/plugins.json b/site/plugins.json "compatibility": [
{
"version": "1.1.5",
- "siteDependencies": {
- "next": "<10.0.6"
- }
+ "siteDependencies": { "next": "<10.0.6" }
}
]
},
| 13 |
diff --git a/src/shareManagement.js b/src/shareManagement.js @@ -200,10 +200,10 @@ class Shares {
let data = 'shares'
const send = {}
- if (path !== '' || (optionalParams && optionalParams.spaceRef)) {
- data += '?'
-
+ if (path !== '') {
send.path = this.helpers._normalizePath(path)
+ }
+
optionalParams = this.helpers._convertObjectToBool(optionalParams)
if (optionalParams) {
@@ -230,6 +230,8 @@ class Shares {
/* jshint camelcase: true */
}
+ if (Object.keys(send).length) {
+ data += '?'
let urlString = ''
for (const key in send) {
urlString += '&' + encodeURIComponent(key) + '=' + encodeURIComponent(send[key])
| 7 |
diff --git a/bin/name.js b/bin/name.js @@ -37,7 +37,7 @@ function run(stack,options={}){
}
var stackname=stack.replace('/','-')
var full=`${namespace}-${stackname}`
- var path=`["${namespace}"].["${stackname}"]`
+ var path=`["${config.profile}"].["${namespace}"].["${stackname}"]`
if(options.hasOwnProperty("set")){
increment=options.set
@@ -58,7 +58,7 @@ function run(stack,options={}){
function set(value){
_.set(increments,path,parseInt(value))
- fs.writeFileSync(__dirname+'/.inc.json',JSON.stringify(increments))
+ fs.writeFileSync(__dirname+'/.inc.json',JSON.stringify(increments,null,2))
}
}
| 7 |
diff --git a/src/layers/core/grid-layer/grid-layer.js b/src/layers/core/grid-layer/grid-layer.js @@ -118,8 +118,7 @@ export default class GridLayer extends Layer {
latDelta: this.props.latDelta,
lngDelta: this.props.lngDelta,
opacity: this.props.opacity,
- viewMatrix,
- testScale: 80
+ viewMatrix
}, uniforms)});
}
| 2 |
diff --git a/generators/client/templates/react/src/test/javascript/jest.conf.js.ejs b/generators/client/templates/react/src/test/javascript/jest.conf.js.ejs @@ -7,5 +7,9 @@ module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'app/(.*)': '<rootDir>/src/main/webapp/app/$1'
- }
+ },
+ testPathIgnorePatterns: [
+ '<rootDir>/node_modules/',
+ '<rootDir>/src/test/javascript/spec/app/modules/account/sessions/sessions.reducer.spec.ts'
+ ]
};
| 8 |
diff --git a/README.md b/README.md @@ -262,14 +262,14 @@ const socket = new Pusher(APP_KEY, {
});
```
-Note: if you intend to use secure websockets, or `wss`, you can not simply specify `wss` in `enabledTransports`, you must specify `ws` in `enabledTransports` as well as set the `encrypted` option to `true`.
+Note: if you intend to use secure websockets, or `wss`, you can not simply specify `wss` in `enabledTransports`, you must specify `ws` in `enabledTransports` as well as set the `forceTLS` option to `true`.
```js
// Only use secure WebSockets
const socket = new Pusher(APP_KEY, {
cluster: APP_CLUSTER,
enabledTransports: ['ws'],
- encrypted: true
+ forceTLS: true
});
```
| 14 |
diff --git a/examples/cdn-example/index.html b/examples/cdn-example/index.html const Dashboard = Uppy.Dashboard
const Webcam = Uppy.Webcam
const Tus = Uppy.Tus
- const Informer = Uppy.Informer
const uppy = Uppy.Core({debug: true, autoProceed: false})
.use(Uppy.Dashboard, {
})
.use(Webcam, {target: Dashboard})
.use(Tus, {endpoint: 'https://master.tus.io/files/', resume: true})
- .use(Informer, {target: Dashboard})
uppy.run()
| 2 |
diff --git a/edit.js b/edit.js @@ -279,14 +279,16 @@ const _getPotentialIndex = (x, y, z, subparcelSize) => x + y*subparcelSize*subpa
let animals = [];
(async () => {
const animalsMeshes = await _loadGltf('./animals.glb');
- console.log('got animals', animalsMeshes);
- // const deers = animalsMeshes.getObjectByName('Deer');
- // const animal = deers.getObjectByName('alt584');
- const animal = animalsMeshes.getObjectByName('GreenFrog');
+ // console.log('got animals', animalsMeshes);
+ const deers = animalsMeshes.getObjectByName('Deer');
+ const animal = deers.getObjectByName('alt584');
+ // const animal = animalsMeshes.getObjectByName('GreenFrog');
const aabb = new THREE.Box3().setFromObject(animal);
const center = aabb.getCenter(new THREE.Vector3());
const size = aabb.getSize(new THREE.Vector3());
+ const headPivot = center.clone()
+ .add(size.clone().multiply(new THREE.Vector3(0, 1/2 * 0.5, 1/2 * 0.5)));
const legsPivot = center.clone()
.add(size.clone().multiply(new THREE.Vector3(0, -1/2 + 1/3, 0)));
const legsSepFactor = 0.5;
@@ -300,8 +302,17 @@ let animals = [];
.add(size.clone().multiply(new THREE.Vector3(1/2 * legsSepFactor, 0, 1/2 * legsSepFactor)));
const positions = animal.geometry.attributes.position.array;
+ const heads = new Float32Array(positions.length);
const legs = new Float32Array(positions.length/3*4);
for (let i = 0, j = 0; i < positions.length; i += 3, j += 4) {
+ localVector.fromArray(positions, i);
+ if (localVector.z > headPivot.z) {
+ localVector.sub(headPivot);
+ } else {
+ localVector.setScalar(0);
+ }
+ localVector.toArray(heads, i);
+
localVector.fromArray(positions, i);
let xAxis;
if (localVector.y < legsPivot.y) {
@@ -323,16 +334,22 @@ let animals = [];
}
}
} else {
- localVector.set(0, 0, 0);
+ localVector.setScalar(0);
xAxis = 0;
}
localVector.toArray(legs, j);
legs[j+3] = xAxis;
}
+ animal.geometry.setAttribute('head', new THREE.BufferAttribute(heads, 3));
animal.geometry.setAttribute('leg', new THREE.BufferAttribute(legs, 4));
const material = new THREE.ShaderMaterial({
uniforms: {
+ headRotation: {
+ type: 'v4',
+ value: new THREE.Quaternion(),
+ needsUpdate: true,
+ },
walkFactor: {
type: 'f',
value: 0,
@@ -351,8 +368,10 @@ let animals = [];
#define PI 3.1415926535897932384626433832795
attribute vec3 color;
+ attribute vec3 head;
attribute vec4 leg;
+ uniform vec4 headRotation;
uniform float walkFactor;
uniform float walkCycle;
varying vec3 vColor;
@@ -368,16 +387,23 @@ let animals = [];
qr.w = cos(half_angle);
return qr;
}
+ vec3 multiply_vq(vec3 v, vec4 q) {
+ return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
+ }
vec3 rotate_vertex_position(vec3 position, vec3 axis, float angle)
{
vec4 q = quat_from_axis_angle(axis, angle);
- vec3 v = position.xyz;
- return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
+ return multiply_vq(position, q);
}
void main() {
vec3 p = position;
- if (leg.y != 0.0) {
+ if (head.y != 0.) {
+ // p = vec3(0.);
+ p -= head.xyz;
+ p += multiply_vq(head, headRotation);
+ }
+ if (leg.y != 0.) {
p -= leg.xyz;
p += rotate_vertex_position(leg.xyz, vec3(leg.w, 0., 0.), sin(walkCycle*PI*2.)*PI/2.*walkFactor);
}
@@ -3213,6 +3239,8 @@ function animate(timestamp, frame) {
}
});
for (const animal of animals) {
+ animal.material.uniforms.headRotation.value.setFromEuler(localEuler.set(-0.2, 0.2, 0, 'YXZ'));
+ animal.material.uniforms.headRotation.needsUpdate = true;
animal.material.uniforms.walkFactor.value = 1;
animal.material.uniforms.walkFactor.needsUpdate = true;
animal.material.uniforms.walkCycle.value = (Date.now()%2000)/2000;
| 0 |
diff --git a/src/components/Menu/NestedList.js b/src/components/Menu/NestedList.js @@ -6,19 +6,9 @@ import ListItem, {style as listItemStyle} from './ListItem';
import {style as menuStyle} from './Menu';
import Radium from 'radium';
-const NestedList = React.createClass({
- propTypes: {
- pages: pagesShape.isRequired,
- title: PropTypes.string.isRequired,
- theme: PropTypes.object.isRequired
- },
- contextTypes: {
- router: PropTypes.object.isRequired
- },
- render() {
- const {theme, pages, title} = this.props;
+const NestedList = ({theme, pages, title}, {router}) => {
const collapsed = !pages
- .map((d) => d.path && this.context.router.isActive(d.path))
+ .map((d) => d.path && router.isActive(d.path))
.filter(Boolean)
.length;
@@ -42,7 +32,16 @@ const NestedList = React.createClass({
}
</div>
);
- }
-});
+};
+
+NestedList.propTypes = {
+ pages: pagesShape.isRequired,
+ title: PropTypes.string.isRequired,
+ theme: PropTypes.object.isRequired
+};
+
+NestedList.contextTypes = {
+ router: PropTypes.object.isRequired
+};
export default Radium(NestedList);
| 14 |
diff --git a/assets/sass/components/settings/_googlesitekit-settings-notice.scss b/assets/sass/components/settings/_googlesitekit-settings-notice.scss .googlesitekit-settings-notice__text {
position: relative;
-
- &::before {
- background-position: center center;
- background-repeat: no-repeat;
- background-size: 2px 12px;
- border-radius: 50%;
- border-style: solid;
- border-width: 2px;
- content: "";
- display: block;
- height: 22px;
- left: 0;
- position: absolute;
- width: 22px;
- }
}
.googlesitekit-settings-notice__learn-more {
&--warning {
background-color: $c-background-notice-warning;
color: $c-text-notice-warning;
-
- .googlesitekit-settings-notice__text::before {
- border-color: $c-icon-notice-warning;
- }
}
&--info {
background-color: $c-background-notice-info;
color: $c-text-notice-info;
-
- .googlesitekit-settings-notice__text::before {
- background-size: 20px 19px;
- border-color: $c-icon-notice-info;
- border-radius: 0;
- border-width: 0;
- height: 19px;
- width: 20px;
- }
}
&--suggestion {
background-color: $c-background-notice-suggestion;
color: $c-text-notice-suggestion;
-
- .googlesitekit-settings-notice__text::before {
- //background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%222%22%20height%3D%2211%22%20viewBox%3D%220%200%202%2011%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%231967d2%22%20fill-rule%3D%22evenodd%22%3E%3Cpath%20d%3D%22M0%204h2v7H0zM0%200h2v2H0z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
- border-color: $c-icon-notice-suggestion;
- }
}
}
| 2 |
diff --git a/articles/quickstart/spa/_includes/_login_preamble.md b/articles/quickstart/spa/_includes/_login_preamble.md Use the hosted login page to provide a way for your users to log in to your ${library} application.
When the user logs in, Auth0 returns three items:
-* `access_token` - an access token
-* `id_token` - an ID token
-* `expires_in` - the number of seconds before the access token expires
+* `access_token`: an access token. To learn more, see the [access token documentation](/tokens/access-token).
+* `id_token`: an ID token. To learn more, see the [ID token documentation](/tokens/id-token).
+* `expires_in`: the number of seconds before the access token expires
You can use these items in your application to set up and manage authentication.
| 0 |
diff --git a/packages/light-electron/package.json b/packages/light-electron/package.json "lint": "semistandard 'src/**/*.js' --parser babel-eslint",
"package": "electron-builder",
"start": "electron-webpack dev --ui-dev --light --ws-origins all",
- "start-electron": "electron electron/ --ui-dev --light --ws-origins all",
- "start-js": "react-app-rewired start",
- "test": "echo Skipped.",
- "watch-css": "npm run build-css -- --watch --recursive"
+ "test": "echo Skipped."
},
"dependencies": {
"async-retry": "^1.2.1",
| 2 |
diff --git a/app/shared/actions/producers.js b/app/shared/actions/producers.js @@ -80,16 +80,22 @@ export function getProducers(previous = false) {
const votes = parseInt(producer.total_votes, 10);
const percent = votes / parseInt(current.total_producer_vote_weight, 10);
const isBackup = (backupMinimumPercent && percent > backupMinimumPercent);
-
- const tokenPrecision = connection.tokenPrecision || 4;
- const voteWeightMultiple = voteWeightMultiples[connection.chain] || 10 ** tokenPrecision;
-
- const tokenVotes = (votes / calcVoteWeight() / voteWeightMultiple).toFixed(0);
+ const tokenVotes = (votes / calcVoteWeight() / 10000).toFixed(0);
+ let owner = producer.owner;
+ switch (connection.keyPrefix) {
+ case 'FIO': {
+ owner = producer.fio_address;
+ break;
+ }
+ default: {
+ // no default
+ }
+ }
return Object.assign({}, {
isBackup,
key: `${producer.owner}-${producer.total_votes}`,
last_produced_block_time: producer.last_produced_block_time,
- owner: producer.owner,
+ owner,
percent,
tokenVotes,
producer_key: producer.producer_key,
| 11 |
diff --git a/tools/platforms/WindowsPlatform.hx b/tools/platforms/WindowsPlatform.hx @@ -209,7 +209,7 @@ class WindowsPlatform extends PlatformTarget
{
var command = #if lime "lime" #else "hxp" #end;
- Log.info("You must define HL_PATH to copy HL dependencies: '" + command + " setup hl' first");
+ Log.error("You must define HL_PATH to copy HashLink dependencies, please run '" + command + " setup hl' first");
}else{
System.copyFile(project.environment.get("HL_PATH") + '/ssl.hdll', applicationDirectory + '/ssl.hdll');
| 7 |
diff --git a/react/src/base/inputs/HelperText.stories.js b/react/src/base/inputs/HelperText.stories.js @@ -3,8 +3,9 @@ import SprkTextInput from './SprkTextInput/SprkTextInput';
import SprkInput from './SprkInput/SprkInput';
import SprkLabel from './SprkLabel/SprkLabel';
import SprkInputContainer from './SprkInputContainer/SprkInputContainer';
-import SprkErrorContainer from './SprkErrorContainer/SprkErrorContainer';
import SprkHelperText from './SprkHelperText/SprkHelperText';
+import SprkFieldError from './SprkFieldError/SprkFieldError';
+import SprkIcon from '../../components/icons/SprkIcon';
import { markdownDocumentationLinkBuilder } from '../../../../storybook-utilities/markdownDocumentationLinkBuilder';
export default {
@@ -12,7 +13,7 @@ export default {
decorators: [(story) => <div className="sprk-o-Box">{story()}</div>],
component: SprkInput,
parameters: {
- jest: ['SprkErrorContainer', 'SprkInputIconCheck', 'SprkHelperText'],
+ jest: ['SprkHelperText'],
info: `
${markdownDocumentationLinkBuilder('input')}
- Helper text must be placed below the Input and above the error container.
@@ -22,30 +23,44 @@ ${markdownDocumentationLinkBuilder('input')}
export const helperText = () => (
<SprkInputContainer>
- <SprkLabel>Text Input</SprkLabel>
- <SprkInput additionalClasses="sprk-u-Width-100" />
- <SprkHelperText>Helper Text for the form field.</SprkHelperText>
+ <SprkLabel htmlFor="text-1">Text Input</SprkLabel>
+ <SprkInput
+ id="text-1"
+ additionalClasses="sprk-u-Width-100"
+ ariaDescribedBy="helper-text-1"
+ />
+ <SprkHelperText id="helper-text-1">
+ Helper Text for the form field.
+ </SprkHelperText>
</SprkInputContainer>
);
helperText.story = {
name: 'Default',
parameters: {
- jest: ['SprkInput', 'SprkLabel', 'SprkInputContainer'],
+ jest: ['SprkInput', 'SprkLabel', 'SprkInputContainer', 'SprkHelperText'],
},
};
export const invalidHelperText = () => (
<SprkInputContainer>
- <SprkLabel>Text Input</SprkLabel>
- <SprkInput isValid={false} additionalClasses="sprk-u-Width-100" />
- <SprkHelperText>Helper Text for the form field.</SprkHelperText>
- <SprkErrorContainer
- id="invalid-helper"
- message="Update this story once error container is done"
- >
- There is an error on this field.
- </SprkErrorContainer>
+ <SprkLabel htmlFor="text-2">Text Input</SprkLabel>
+ <SprkInput
+ ariaDescribedBy="helper-text-2 invalid-helper"
+ id="text-2"
+ isValid={false}
+ additionalClasses="sprk-u-Width-100"
+ />
+ <SprkHelperText id="helper-text-2">
+ Helper Text for the form field.
+ </SprkHelperText>
+ <SprkFieldError id="invalid-helper">
+ <SprkIcon
+ iconName="exclamation-filled"
+ additionalClasses="sprk-b-ErrorIcon"
+ />
+ <div className="sprk-b-ErrorText">There is an error on this field.</div>
+ </SprkFieldError>
</SprkInputContainer>
);
@@ -53,10 +68,12 @@ invalidHelperText.story = {
name: 'With Error Text',
parameters: {
jest: [
+ 'SprkHelperText',
'SprkInput',
'SprkLabel',
'SprkInputContainer',
- 'SprkErrorContainer',
+ 'SprkFieldError',
+ 'SprkIcon',
],
},
};
| 3 |
diff --git a/spec/models/carto/user_table_spec.rb b/spec/models/carto/user_table_spec.rb @@ -7,8 +7,6 @@ describe Carto::UserTable do
let(:user) { create(:carto_user) }
before(:all) do
- bypass_named_maps
-
@user = user
@carto_user = user
@user_table = Carto::UserTable.new
| 2 |
diff --git a/src/views/Send/SendNFT.vue b/src/views/Send/SendNFT.vue <div class="account-content mx-3">
<div>
<Accordion v-for="(assets, key) in nftCollection" :key="assets.id">
- <h3 slot="header" id="nft-asset-header">{{ key }} ({{ assets.length }})</h3>
+ <h3 slot="header" id="nft-asset-header">
+ {{ nftCollectionName(assets, key) }} ({{ assets.length }})
+ </h3>
<div class="nft-assets__container__images">
<div
class="nft-image"
@@ -523,6 +525,13 @@ export default {
}
this.activeView = view
},
+ nftCollectionName(assets, key) {
+ if (key && key !== 'undefined' && key !== 'null') {
+ return key
+ } else {
+ return assets.filter((asset) => asset.name)[0]?.name || 'Unknown Collection'
+ }
+ },
cancelCustomFee() {
this.activeView = 'selectedAsset'
this.selectedFee = 'average'
| 3 |
diff --git a/stories/module-analytics-components.stories.js b/stories/module-analytics-components.stories.js @@ -85,141 +85,36 @@ generateReportBasedWidgetStories( {
moduleSlugs: [ 'analytics' ],
datastore: STORE_NAME,
group: 'Analytics Module/Components/Page Dashboard/All Traffic Widget',
+ referenceDate: '2021-01-06',
data: [
- {
- nextPageToken: null,
- columnHeader: {
- dimensions: [
- 'ga:channelGrouping',
- ],
- metricHeader: {
- metricHeaderEntries: [
- {
- name: 'ga:users',
- type: 'INTEGER',
- },
- ],
- },
- },
- data: {
- dataLastRefreshed: null,
- isDataGolden: null,
- rowCount: 3,
- samplesReadCounts: null,
- samplingSpaceSizes: null,
- rows: [
- {
- dimensions: [
- 'Organic Search',
- ],
- metrics: [
- {
- values: [
- '77',
- ],
- },
- {
- values: [
- '129',
- ],
- },
- ],
- },
- {
- dimensions: [
- 'Direct',
- ],
- metrics: [
- {
- values: [
- '58',
- ],
- },
- {
- values: [
- '80',
- ],
- },
- ],
- },
- {
- dimensions: [
- 'Referral',
- ],
- metrics: [
- {
- values: [
- '51',
- ],
- },
- {
- values: [
- '59',
- ],
- },
- ],
- },
- ],
- totals: [
- {
- values: [
- '186',
- ],
- },
- {
- values: [
- '268',
- ],
- },
+ dashboardUserDimensionsData[ 'ga:channelGrouping' ],
+ dashboardUserDimensionsData[ 'ga:country' ],
+ dashboardUserDimensionsData[ 'ga:deviceCategory' ],
+ dashboardUserTotalsData,
+ dashboardUserGraphData,
],
- minimums: [
+ options: [
{
- values: [
- '51',
- ],
+ ...dashboardUserDimensionsArgs[ 'ga:channelGrouping' ],
+ url: 'https://www.elasticpress.io/features/',
},
{
- values: [
- '59',
- ],
+ ...dashboardUserDimensionsArgs[ 'ga:country' ],
+ url: 'https://www.elasticpress.io/features/',
},
- ],
- maximums: [
{
- values: [
- '77',
- ],
+ ...dashboardUserDimensionsArgs[ 'ga:deviceCategory' ],
+ url: 'https://www.elasticpress.io/features/',
},
{
- values: [
- '129',
- ],
- },
- ],
- },
+ ...dashboardUserTotalsArgs,
+ url: 'https://www.elasticpress.io/features/',
},
- ],
- referenceDate: '2021-01-13',
- options: {
- startDate: '2020-12-16',
- endDate: '2021-01-12',
- compareStartDate: '2020-11-18',
- compareEndDate: '2020-12-15',
- metrics: [
{
- expression: 'ga:users',
- },
- ],
- dimensions: [
- 'ga:channelGrouping',
- ],
- orderby: {
- fieldName: 'ga:users',
- sortOrder: 'DESCENDING',
- },
- limit: 6,
+ ...dashboardUserGraphArgs,
url: 'https://www.elasticpress.io/features/',
},
+ ],
Component: DashboardAllTrafficWidget,
wrapWidget: false,
setup,
| 1 |
diff --git a/public/javascripts/Gallery/css/cards.css b/public/javascripts/Gallery/css/cards.css @@ -92,7 +92,7 @@ with respect to the image holder. This allows the validation menu to be placed o
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
}
-.card-info:hover {
+.gallery-card:hover > .card-info {
border-width: 0; /* Using a drop shadow on hover, and we don't need both the border and shadow. */
}
| 1 |
diff --git a/docs/source/platform/schema-validation.md b/docs/source/platform/schema-validation.md @@ -7,7 +7,7 @@ As GraphQL scales within an organization, it's important in schema evolution to
As such, schema change validation is one of the cornerstones of the [Apollo Platform](/docs/intro/platform.html) and we've built a set of tools to make the workflow possible.
-> **Note:** Schema validation is an Apollo Platform feature available on the [_Team_ and _Enterprise_ plans](https://www.apollographql.com/plans/). To get started with the Apollo Platform, begin with [the documentation](https://www.apollographql.com/docs/). If you already have an Engine account, upgrade to a [Team plan](https://engine.apollographql.com/trypro).
+> **Note:** Schema validation is an Apollo Platform feature available on the [_Team_ and _Enterprise_ plans](https://www.apollographql.com/plans/). To get started with the Apollo Platform, begin with [the documentation](https://www.apollographql.com/docs/). If you already have an Engine account, upgrade to a [Team plan](https://engine.apollographql.com/upgrade).
<h2 id="schema-validation">How it works</h2>
| 14 |
diff --git a/bl-kernel/admin/themes/booty/html/navbar.php b/bl-kernel/admin/themes/booty/html/navbar.php <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>">
<?php $L->p('Content') ?></a>
</li>
+ <?php if (!checkRole(array('admin'),false)): ?>
+ <li class="nav-item">
+ <a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$login->username() ?>">
+ <?php $L->p('Profile') ?></a>
+ </li>
+ <?php endif; ?>
+ <?php if (checkRole(array('admin'),false)): ?>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>">
<?php $L->p('Categories') ?></a>
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>">
<?php $L->p('About') ?></a>
</li>
+ <?php endif; ?>
+ <?php if (checkRole(array('admin'),false)): ?>
+ <?php
+ if (!empty($plugins['adminSidebar'])) {
+ foreach ($plugins['adminSidebar'] as $pluginSidebar) {
+ echo '<li class="nav-item">';
+ echo $pluginSidebar->adminSidebar();
+ echo '</li>';
+ }
+ }
+ ?>
+ <?php endif; ?>
<li class="nav-item">
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>">
<?php $L->p('Logout') ?></a>
| 2 |
diff --git a/benchmarks/dbmon/scripts.js b/benchmarks/dbmon/scripts.js @@ -9,13 +9,11 @@ perfMonitor.startFPSMonitor();
perfMonitor.startMemMonitor();
perfMonitor.initProfiler("render");
-function run() {
- app.set("databases", ENV.generateData().toArray());
+var run = function() {
perfMonitor.startProfile("render");
- Moon.nextTick(function() {
+ app.set("databases", ENV.generateData().toArray());
perfMonitor.endProfile("render");
renderRate.ping();
- });
setTimeout(run, ENV.timeout);
}
| 7 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -40,6 +40,8 @@ const localEuler = new THREE.Euler();
const localEuler2 = new THREE.Euler();
const localMatrix = new THREE.Matrix4();
+const y180Quaternion = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 1, 0), Math.PI);
+
VRMSpringBoneImporter.prototype._createSpringBone = (_createSpringBone => {
const localVector = new THREE.Vector3();
return function(a, b) {
| 0 |
diff --git a/articles/tutorials/generic-oauth2-connection-examples.md b/articles/tutorials/generic-oauth2-connection-examples.md @@ -125,19 +125,24 @@ After the call completes successfully, you will be able to login using these new
* [Create an application](http://www.twitch.tv/kraken/oauth2/clients/new)
* Copy `Client ID` and `Client Secret` to config file below
-```
+```har
{
- "name": "twitch",
- "strategy": "oauth2",
- "options": {
- "client_id": "YOUR-TWITCH-CLIENTID",
- "client_secret": "YOUR-TWITCH-CLIENTSECRET",
- "authorizationURL": "https://api.twitch.tv/kraken/oauth2/authorize",
- "tokenURL": "https://api.twitch.tv/kraken/oauth2/token",
- "scope": ["user_read"],
- "scripts": {
- "fetchUserProfile": "function(accessToken, ctx, cb){ request.get('https://api.twitch.tv/kraken/user', { headers: { 'Authorization': 'OAuth ' + accessToken, 'Accept': 'application/vnd.twitchtv.v3+json' } }, function(e, r, b) { if (e) return cb(e); if (r.statusCode !== 200 ) return cb(new Error('StatusCode: ' + r.statusCode)); var profile = JSON.parse(b); profile.id = profile._id; delete profile._id; profile.links=profile._links; delete profile._links; return cb(null, profile);});}"
- }
+ "method": "POST",
+ "url": "https://YOURACCOUNT.auth0.com/api/v2/connections",
+ "httpVersion": "HTTP/1.1",
+ "cookies": [],
+ "headers": [{
+ "name": "Authorization",
+ "value": "Bearer ABCD"
+ }],
+ "queryString": [],
+ "postData": {
+ "mimeType": "application/json",
+ "text": "{ \"name\": \"twitch\", \"strategy\": \"oauth2\", \"options\": { \"client_id\", \"YOUR-TWITCH-CLIENT-ID\", \"client_secret\": \"YOUR-TWITCH-CLIENT-SECRET\", \"authorizationURL\": \"https://api.twitch.tv/kraken/oauth2/authorize\", \"tokenURL\": \"https://api.twitch.tv/kraken/oauth2/token\", \"scope\": [\"user_read\"], \"scripts\": { \"fetchUserProfile\": \"function(accessToken, ctx, cb){ request.get('https://api.twitch.tv/kraken/user', { headers: { 'Authorization': 'OAuth ' + accessToken, 'Accept': 'application/vnd.twitchtv.v3+json' } }, function(e, r, b) { if (e) return cb(e); if (r.statusCode !== 200 ) return cb(new Error('StatusCode: ' + r.statusCode)); var profile = JSON.parse(b); profile.id = profile._id; delete profile._id; profile.links=profile._links; delete profile._links; return cb(null, profile);});}"
+ },
+ "headersSize": -1,
+ "bodySize": -1,
+ "comment": ""
}
```
| 0 |
diff --git a/src/client/js/components/PageEditor/LinkEditModal.jsx b/src/client/js/components/PageEditor/LinkEditModal.jsx @@ -75,6 +75,10 @@ class LinkEditModal extends React.PureComponent {
labelInputValue: label,
linkInputValue: link,
linkerType: type,
+ isUseRelativePath: false,
+ isUsePermanentLink: false,
+ markdown: '',
+ permalink: '',
});
}
| 12 |
diff --git a/app/pages/collections/collection-card.jsx b/app/pages/collections/collection-card.jsx import PropTypes from 'prop-types';
import React from 'react';
import FlexibleLink from '../../components/flexible-link';
+import Thumbnail from '../../components/thumbnail'
export default class CollectionCard extends React.Component {
constructor(props) {
@@ -16,7 +17,13 @@ export default class CollectionCard extends React.Component {
setSubjectPreview(src) {
const splitSrc = src ? src.split('.') : [];
if (src && splitSrc[splitSrc.length - 1] !== 'mp4') {
- this.collectionCard.style.backgroundImage = `url('${src}')`;
+ const thumbnailSrc = Thumbnail.getThumbnailSrc({
+ origin: 'https://thumbnails.zooniverse.org',
+ width: 220,
+ height: 270,
+ src
+ })
+ this.collectionCard.style.backgroundImage = `url('${thumbnailSrc}')`;
this.collectionCard.style.backgroundPosition = 'initial';
this.collectionCard.style.backgroundRepeat = 'no-repeat';
this.collectionCard.style.backgroundSize = 'cover';
| 4 |
diff --git a/src/redux/Restaurant/reducers.js b/src/redux/Restaurant/reducers.js @@ -399,10 +399,22 @@ export default (state = initialState, action = {}) => {
switch (name) {
case 'order:created':
+ case 'order:accepted':
+ case 'order:cancelled':
+
+ // FIXME
+ // Fix this on API side
+ let newOrder = { ...data.order }
+ if (name === 'order:cancelled' && newOrder.state !== 'cancelled') {
+ newOrder = {
+ ...newOrder,
+ state: 'cancelled',
+ }
+ }
return {
...state,
- orders: addOrReplace(state, data.order),
+ orders: addOrReplace(state, newOrder),
}
default:
break
| 9 |
diff --git a/src/apps.json b/src/apps.json ],
"env": "^gerrit_",
"html": [
- ">Gerrit Code Review</a>\\s*\"\\s*\\(([0-9.])\\)\\;version:\\1",
+ ">Gerrit Code Review</a>\\s*\"\\s*\\(([0-9.]+)\\)\\;version:\\1",
"<(?:div|style) id=\"gerrit_"
],
"icon": "gerrit.svg",
| 1 |
diff --git a/website/site/data/updates.yml b/website/site/data/updates.yml updates:
+ - date: '2018-07-21'
+ description: Fix multipart extension support for GitLab
+ version: 1.9.4
- date: '2018-07-03'
description: Fix numbers in TOML output.
version: 1.9.3
| 3 |
diff --git a/components/button-stateful/index.jsx b/components/button-stateful/index.jsx @@ -164,7 +164,9 @@ class ButtonStateful extends React.Component {
handleClick = (e) => {
if (isFunction(this.props.onClick)) this.props.onClick(e);
if (typeof this.props.active !== 'boolean') {
- this.setState({ active: !this.state.active });
+ this.setState(prevState => ({
+ active: !prevState.active
+ }));
}
};
| 3 |
diff --git a/src/components/play-mode/hotbar/Hotbar.jsx b/src/components/play-mode/hotbar/Hotbar.jsx @@ -22,6 +22,46 @@ const fullscreenFragmentShader = `\
uniform float uSelectFactor;
varying vec2 vUv;
+ //---------------------------------------------------------------------------
+ //1D Perlin noise implementation
+ //---------------------------------------------------------------------------
+ #define HASHSCALE 0.1031
+
+ float hash(float p)
+ {
+ vec3 p3 = fract(vec3(p) * HASHSCALE);
+ p3 += dot(p3, p3.yzx + 19.19);
+ return fract((p3.x + p3.y) * p3.z);
+ }
+
+ float fade(float t) { return t*t*t*(t*(6.*t-15.)+10.); }
+
+ float grad(float hash, float p)
+ {
+ int i = int(1e4*hash);
+ return (i & 1) == 0 ? p : -p;
+ }
+
+ float perlinNoise1D(float p)
+ {
+ float pi = floor(p), pf = p - pi, w = fade(pf);
+ return mix(grad(hash(pi), pf), grad(hash(pi + 1.0), pf - 1.0), w) * 2.0;
+ }
+
+ float fbm(float pos, int octaves, float persistence)
+ {
+ float total = 0., frequency = 1., amplitude = 1., maxValue = 0.;
+ for(int i = 0; i < octaves; ++i)
+ {
+ total += perlinNoise1D(pos * frequency) * amplitude;
+ maxValue += amplitude;
+ amplitude *= persistence;
+ frequency *= 2.;
+ }
+ return total / maxValue;
+ }
+
+
struct Tri {
vec2 a;
vec2 b;
| 0 |
diff --git a/bin/enforcers/Parameter.js b/bin/enforcers/Parameter.js const EnforcerRef = require('../enforcer-ref');
const Exception = require('../exception');
const Result = require('../result');
+const Value = require('../value');
const rxFalse = /^false/i;
const rxTrue = /^true$/i;
@@ -272,9 +273,7 @@ module.exports = {
explode: {
type: 'boolean',
allowed: major === 3,
- default: ({parent}) => {
- return parent.definition.style === 'form';
- },
+ default: ({parent}) => parent.result.style === 'form',
errors: ({exception, parent}) => {
const type = parent.definition.schema && parent.definition.schema.type;
if (parent.definition.in === 'cookie' && parent.definition.explode && (type === 'array' || type === 'object')) {
| 1 |
diff --git a/src/immer.js.flow b/src/immer.js.flow +// @flow
+
declare export function extendShallowObservable(target: any): any
/**
@@ -12,21 +14,21 @@ declare export function extendShallowObservable(target: any): any
* @param thunk - function that receives a proxy of the current state as first argument and which can be freely modified
* @returns The next state: a new state, or the current state if nothing was modified
*/
-declare export default function<S>(
+declare export default function produce<S>(
currentState: S,
recipe: (draftState: S) => void
): S
// curried invocations
-declare export default function<S, A, B, C>(
+declare export default function produce<S, A, B, C>(
recipe: (draftState: S, a: A, b: B, c: C) => void
): (currentState: S, a: A, b: B, c: C) => S
-declare export default function<S, A, B>(
+declare export default function produce<S, A, B>(
recipe: (draftState: S, a: A, b: B) => void
): (currentState: S, a: A, b: B) => S
-declare export default function<S, A>(
+declare export default function produce<S, A>(
recipe: (draftState: S, a: A) => void
): (currentState: S) => S
-declare export default function<S>(
+declare export default function produce<S>(
recipe: (draftState: S, ...extraArgs: any[]) => void
): (currentState: S, ...extraArgs: any[]) => S
| 7 |
diff --git a/.github/workflows/deployRelease.yml b/.github/workflows/deployRelease.yml @@ -53,18 +53,6 @@ jobs:
path: |
./dist/alloy.js
./dist/alloy.min.js
- createTestBranch:
- name: Create test branch from release tag
- runs-on: ubuntu-latest
- needs: release
- steps:
- - uses: gagle/package-version@v1
- id: package-version
- - uses: peterjgrainger/[email protected]
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- branch: ${{ steps.package-version.outputs.version }}
prerelease:
name: "Prerelease"
runs-on: ubuntu-latest
@@ -101,7 +89,7 @@ jobs:
record:
name: "Record Version"
runs-on: ubuntu-latest
- needs: [prerelease, createTestBranch]
+ needs: [prerelease, release]
if: failure() == false
steps:
- uses: adobe/project-card-release-automation/record-release@v1
| 2 |
diff --git a/.travis.yml b/.travis.yml @@ -29,24 +29,25 @@ matrix:
env: BROWSER=chrome
addons:
chrome: stable
+ - name: "Firefox Stable"
+ env: BROWSER=firefox
+ addons:
+ firefox: latest
+ allow_failures:
- name: "Chrome Beta"
env: BROWSER=chrome
addons:
chrome: beta
+ - name: "Firefox Beta"
+ env: BROWSER=firefox
+ addons:
+ firefox: latest-beta
# - name: "Safari"
# env: BROWSER=safari
# - name: "Firefox ESR"
# env: BROWSER=firefox
# addons:
# firefox: latest-esr
- - name: "Firefox Stable"
- env: BROWSER=firefox
- addons:
- firefox: latest
- - name: "Firefox Beta"
- env: BROWSER=firefox
- addons:
- firefox: latest-beta
notifications:
email:
| 11 |
diff --git a/generators/client/templates/angular/src/main/webapp/app/shared/login/login.component.html.ejs b/generators/client/templates/angular/src/main/webapp/app/shared/login/login.component.html.ejs <input type="password" class="form-control" name="password" id="password" placeholder="{{'login.form.password.placeholder' | translate}}"
formControlName="password">
</div>
- <div class="form-check">
+ <div class="form-check"<% if (authenticationType === 'session' && databaseType === 'no') { %> hidden<% } %>>
<label class="form-check-label" for="rememberMe">
<input class="form-check-input" type="checkbox" name="rememberMe" id="rememberMe" formControlName="rememberMe" checked>
<span jhiTranslate="login.form.rememberme">Remember me</span>
<button type="submit" class="btn btn-primary" jhiTranslate="login.form.button">Sign in</button>
</form>
<p></p>
+ <%_ if (!skipUserManagement) { _%>
<div class="alert alert-warning">
<a class="alert-link" (click)="requestResetPassword()" jhiTranslate="login.password.forgot">Did you forget your password?</a>
</div>
<span jhiTranslate="global.messages.info.register.noaccount">You don't have an account yet?</span>
<a class="alert-link" (click)="register()" jhiTranslate="global.messages.info.register.link">Register a new account</a>
</div>
+ <%_ } _%>
</div>
</div>
</div>
| 2 |
diff --git a/public/javascripts/SVLabel/src/SVLabel/task/TaskContainer.js b/public/javascripts/SVLabel/src/SVLabel/task/TaskContainer.js @@ -178,7 +178,6 @@ function TaskContainer (navigationModel, neighborhoodModel, streetViewService, s
success: function (result) {
var task;
console.log("Number of tasks received: " + result.length);
- console.log(result[0]);
for (var i = 0; i < result.length; i++) {
task = svl.taskFactory.create(result[i]);
if ((result[i].features[0].properties.completed)) task.complete();
@@ -411,9 +410,11 @@ function TaskContainer (navigationModel, neighborhoodModel, streetViewService, s
// Indicates neighborhood is complete
if (candidateTasks.length === 0) {
neighborhoodModel.setNeighborhoodCompleteAcrossAllUsers();
- return false;
- } else {
+ console.log("Neighborhood complete");
return true;
+ } else {
+ console.log("Neighborhood not complete");
+ return false;
}
}
@@ -447,13 +448,15 @@ function TaskContainer (navigationModel, neighborhoodModel, streetViewService, s
userCandidateTasks = userCandidateTasks.filter(function (t) {
return !t.isCompleted();
});
- console.log("Filtered based on completion by user: " + userCandidateTasks.length);
+ console.log("Connected tasks filtered based on completion by user: " + userCandidateTasks.length);
if (userCandidateTasks.length === 0) {
userCandidateTasks = self.getIncompleteTasks(currentNeighborhoodId).filter(function (t) {
return (t.getStreetEdgeId() !== (finishedTask ? finishedTask.getStreetEdgeId() : null));
});
}
+ console.log("Neighborhood tasks filtered based on completion by user: " + userCandidateTasks.length);
+
}
// If the neighborhood is NOT 100% complete (across all users)
else {
@@ -466,7 +469,7 @@ function TaskContainer (navigationModel, neighborhoodModel, streetViewService, s
return !t.isCompleted();
});
- console.log("Filtered based on completion count: " + userCandidateTasks.length);
+ console.log("Connected tasks filtered based on completion count: " + userCandidateTasks.length);
// If there aren't any amongst connected tasks, select an incomplete task (or unaudited street) in the
// neighborhood
@@ -475,6 +478,8 @@ function TaskContainer (navigationModel, neighborhoodModel, streetViewService, s
return (t.getStreetEdgeId() !== (finishedTask ? finishedTask.getStreetEdgeId(): null));
});
}
+ console.log("Neighborhood tasks filtered based on completion count: " + userCandidateTasks.length);
+
}
if (userCandidateTasks.length === 0) return null;
| 1 |
diff --git a/extensions/README.md b/extensions/README.md @@ -19,6 +19,8 @@ STAC specification defines only a minimal core, but is designed for extension. I
implementations will use several 'extensions' to fully describe their data. This document describes how extensions
work, and links to the 'core' extensions included in this repo, as well as to a variety of 'community' extensions.
+**For the complete list of available extensions see the [STAC extensions overview page](https://stac-extensions.github.io/).**
+
Extensions to the core STAC specification provide additional JSON fields that can be used to better describe
the data. Most tend to be about describing a particular domain or type of data, but some imply
functionality.
| 0 |
diff --git a/lib/tasks/user_migrator.rake b/lib/tasks/user_migrator.rake @@ -25,7 +25,7 @@ namespace :cartodb do
puts "Export finished with status #{ume.state}"
if ume.state == Carto::UserMigrationExport::STATE_COMPLETE
import_params = {
- org_import: true,
+ org_import: ume.organization.present?,
import_metadata: true,
exported_file: ume.exported_file,
json_file: ume.json_file,
| 12 |
diff --git a/Source/Scene/DebugCameraPrimitive.js b/Source/Scene/DebugCameraPrimitive.js @@ -105,7 +105,7 @@ define([
}
var scratchColor = new Color();
-
+ var scratchSplits = [1.0, 100000.0];
/**
* @private
*/
@@ -128,6 +128,12 @@ define([
var frustumSplits = frameState.frustumSplits;
var numFrustums = frustumSplits.length - 1;
+ if (numFrustums <= 0) {
+ frustumSplits = scratchSplits; // Use near and far planes if no splits created
+ frustumSplits[0] = this._camera.frustum.near;
+ frustumSplits[1] = this._camera.frustum.far;
+ numFrustums = 1;
+ }
var positions = new Float64Array(3 * 4 * (numFrustums + 1));
var f;
| 4 |
diff --git a/docs/components/CodeSnippet.scss b/docs/components/CodeSnippet.scss .dxb-codesnippet {
position: relative;
padding: 3px 5px;
+ background: #494949;
pre {
background: transparent !important;
}
}
+.dxe-codesplit-right .dxb-codesnippet {
+ background: transparent;
+}
+
.dxe-codesplit-right .cxb-tab.cxm-code {
@extend .cxb-tab.cxm-line;
color: white;
| 12 |
diff --git a/src/components/DisplayInput.js b/src/components/DisplayInput.js @@ -28,7 +28,9 @@ class DisplayInput extends React.Component {
};
static defaultProps = {
- elementProps: {},
+ elementProps: {
+ type: 'text'
+ },
isFocused: false,
primaryColor: StyleConstants.Colors.PRIMARY,
valid: true
@@ -88,6 +90,7 @@ class DisplayInput extends React.Component {
id={this._inputId}
key='input'
style={styles.input}
+ type='text'
/>
</div>
)}
| 12 |
diff --git a/src/Tracker.js b/src/Tracker.js @@ -23,20 +23,18 @@ class Tracker {
this.shardId = shardId;
this.shardCount = shardCount;
if (carbonToken) {
- setInterval(() => this.updateCarbonitex(this.client.guilds.length), updateInterval);
+ setInterval(() => this.updateCarbonitex(this.client.guilds.size), updateInterval);
}
if (botsDiscordPwToken && botsDiscordPwUser) {
- setInterval(() => this.updateDiscordBotsWeb(this.client.guilds.length), updateInterval);
+ setInterval(() => this.updateDiscordBotsWeb(this.client.guilds.size), updateInterval);
}
}
/**
* Updates carbonitex.net if the corresponding token is provided
* @param {number} guildsLen number of guilds that this bot is present on
- * @returns {boolean} Whether or not the update completed successfully
*/
updateCarbonitex(guildsLen) {
- let completed = false;
if (carbonToken) {
this.logger.debug('Updating Carbonitex');
this.logger.debug(`${this.client.user.username} is on ${guildsLen} servers`);
@@ -51,20 +49,16 @@ class Tracker {
request(requestBody)
.then((parsedBody) => {
this.logger.debug(parsedBody);
- completed = true;
})
.catch(error => this.logger.error(error));
}
- return completed;
}
/**
* Updates bots.discord.pw if the corresponding token is provided
* @param {number} guildsLen number of guilds that this bot is present on
- * @returns {boolean} Whether or not the update completed successfully
*/
updateDiscordBotsWeb(guildsLen) {
- let completed = false;
if (botsDiscordPwToken && botsDiscordPwUser) {
this.logger.debug('Updating discord bots');
this.logger.debug(`${this.client.username} is on ${guildsLen} servers`);
@@ -73,6 +67,7 @@ class Tracker {
url: `https://bots.discord.pw/api/bots/${botsDiscordPwUser}/stats`,
headers: {
Authorization: botsDiscordPwToken,
+ 'Content-Type': 'application/json',
},
body: {
shard_id: parseInt(this.shardId, 10),
@@ -84,11 +79,9 @@ class Tracker {
request(requestBody)
.then((parsedBody) => {
this.logger.debug(parsedBody);
- completed = true;
})
- .catch(error => this.logger.error(error));
+ .catch(this.logger.error);
}
- return completed;
}
/**
| 3 |
diff --git a/lib/tests/run_tests.js b/lib/tests/run_tests.js @@ -139,7 +139,7 @@ module.exports = {
console.log(`Coverage report created. You can find it here: ${fs.dappPath('coverage/index.html')}\n`);
const opn = require('opn');
const _next = () => { next(); };
- opn(fs.dappPath('coverage/index.html'), {wait: false})
+ opn(fs.dappPath('coverage/__root__/index.html'), {wait: false})
.then(() => new Promise(resolve => setTimeout(resolve, 1000)))
.then(_next, _next);
});
| 7 |
diff --git a/server/game/cards/locations/06/scorchingdeserts.js b/server/game/cards/locations/06/scorchingdeserts.js @@ -12,12 +12,11 @@ class ScorchingDeserts extends DrawCard {
ability.costs.sacrificeSelf()
],
target: {
- activePromptTitle: 'Select a character',
- cardCondition: card => (
+ cardCondition: (card, context) => (
card.location === 'play area' &&
card.getType() === 'character' &&
card.getNumberOfIcons() < 2 &&
- this.game.currentChallenge.isParticipating(card) &&
+ (context.event.name === 'onAttackersDeclared' ? this.game.currentChallenge.isAttacking(card) : this.game.currentChallenge.isDefending(card)) &&
card.controller !== this.controller)
},
handler: context => {
| 11 |
diff --git a/spec/models/geocoding_spec.rb b/spec/models/geocoding_spec.rb @@ -264,13 +264,17 @@ describe Geocoding do
end
it 'returns the used credits when the user is over geocoding quota' do
+ user_geocoder_metrics = CartoDB::GeocoderUsageMetrics.new(@user.username, nil)
geocoding = FactoryGirl.create(:geocoding, user: @user, processed_rows: 0, cache_hits: 100, kind: 'high-resolution', geocoder_type: 'heremaps', formatter: 'foo')
+ user_geocoder_metrics.incr(:geocoder_here, :success_responses, 100)
# 100 total (user has 200) => 0 used credits
geocoding.calculate_used_credits.should eq 0
geocoding = FactoryGirl.create(:geocoding, user: @user, processed_rows: 0, cache_hits: 150, kind: 'high-resolution', geocoder_type: 'heremaps', formatter: 'foo')
+ user_geocoder_metrics.incr(:geocoder_cache, :success_responses, 150)
# 250 total => 50 used credits
geocoding.calculate_used_credits.should eq 50
geocoding = FactoryGirl.create(:geocoding, user: @user, processed_rows: 100, cache_hits: 0, kind: 'high-resolution', geocoder_type: 'heremaps', formatter: 'foo')
+ user_geocoder_metrics.incr(:geocoder_here, :success_responses, 100)
# 350 total => 100 used credits
geocoding.calculate_used_credits.should eq 100
end
| 1 |
diff --git a/content/concepts/did-ddo.md b/content/concepts/did-ddo.md @@ -25,16 +25,7 @@ An _asset_ in Ocean represents a downloadable file, compute service, or similar.
An _asset_ should have a DID and DDO. The DDO should include [metadata](#metadata) about the asset, and define access in at least one [service](#services). The DDO can only can be modified by _owners_ or _delegated users_.
-There _must_ be at least one client library acting as _resolver_, to get a DDO from a DID. A metadata cache like Aquarius can help in reading and searching through DDO data from the chain.
-
-## State
-
-Each asset has a state, which is held by the NFT contract. The possible states are:
-
-- `0` = active
-- `1` = end-of-life
-- `2` = deprecated (by another asset)
-- `3` = revoked by publisher
+A metadata cache like _Aquarius_ can help in reading and searching through encrypted DDO data from the chain.
## Publishing & Retrieving DDOs
@@ -353,6 +344,15 @@ event MetadataUpdated(
_Aquarius_ should always check the hash after data is decrypted via a _Provider_ API call, in order to ensure DDO integrity.
+## State
+
+Each asset has a state, which is held by the NFT contract. The possible states are:
+
+- `0` = active
+- `1` = end-of-life
+- `2` = deprecated (by another asset)
+- `3` = revoked by publisher
+
## Aquarius Enhanced DDO Response
The following fields are added by _Aquarius_ in its DDO response for convenience reasons. These are never stored on-chain, and are never taken into consideration when [hashing the DDO](#ddo-hash).
| 5 |
diff --git a/embark-ui/src/components/ContractDebugger.js b/embark-ui/src/components/ContractDebugger.js import PropTypes from "prop-types";
import React, {Component} from 'react';
-import {
- Page,
- Grid, Table
-} from "tabler-react";
import {
Row,
Col,
@@ -61,34 +57,28 @@ class ContractDebugger extends Component {
render() {
return (
- <Page.Content title={this.props.contract.className + ' Debugger'}>
- <Grid.Row>
- <Grid.Col>
+ <Row>
+ <Col>
<Input name="txHash" id="txHash" onChange={(e) => this.handleChange(e)}/>
<Button color="primary" onClick={(e) => this.debug(e)}>Debug Tx</Button>
- </Grid.Col>
- </Grid.Row>
+ </Col>
- <Grid.Row>
- <Grid.Col>
+ <Col>
<Button color="light" className="btn-square debugButton jumpBack" alt="jump to previous breakpoint" onClick={(e) => this.debugJumpBack(e)}></Button>
<Button color="light" className="btn-square debugButton jumpForward" alt="jump to revious breakpoint" onClick={(e) => this.debugJumpForward(e)}></Button>
<Button color="light" className="btn-square debugButton stepOverBack" alt="step back" onClick={(e) => this.debugStepOverBackward(e)}></Button>
<Button color="light" className="btn-square debugButton stepOverForward" alt="step over" onClick={(e) => this.debugStepOverForward(e)}></Button>
<Button color="light" className="btn-square debugButton stepIntoForward" alt="step into" onClick={(e) => this.debugStepIntoForward(e)}></Button>
<Button color="light" className="btn-square debugButton stepIntoBack" alt="step out" onClick={(e) => this.debugStepIntoBackward(e)}></Button>
- </Grid.Col>
- </Grid.Row>
+ </Col>
- <Grid.Row>
- <Grid.Col>
+ <Col>
<br /><strong>Scopes</strong>
<div>
<ReactJson src={{locals: this.props.debuggerInfo.locals, contract: this.props.debuggerInfo.globals}} theme="monokai" sortKeys={true} name={false} collapse={1} />
</div>
- </Grid.Col>
- </Grid.Row>
- </Page.Content>
+ </Col>
+ </Row>
);
}
}
| 3 |
diff --git a/reader/readerContent.css b/reader/readerContent.css @@ -13,7 +13,7 @@ body[theme="dark"] {
body[theme="sepia"] {
background-color: rgb(245, 237, 220);
- color: rgba(80, 55, 35, 1);
+ color: rgb(68, 47, 30);
}
iframe {
@@ -84,6 +84,10 @@ img, picture, video {
height: auto;
margin: auto;
}
+body[theme="dark"] img,
+body[theme="dark"] picture {
+ filter: brightness(0.95);
+}
p {
line-height: 1.5em;
word-break: break-word;
| 3 |
diff --git a/assets/js/modules/analytics/dashboard/dashboard-widget-analytics-adsense-top-pages.js b/assets/js/modules/analytics/dashboard/dashboard-widget-analytics-adsense-top-pages.js @@ -36,7 +36,8 @@ import { TYPE_MODULES } from '../../../components/data';
import { getDataTableFromData, TableOverflowContainer } from '../../../components/data-table';
import Layout from '../../../components/layout/layout';
import PreviewTable from '../../../components/preview-table';
-import { analyticsAdsenseReportDataDefaults } from '../util';
+import CTA from '../../../components/notifications/cta';
+import { analyticsAdsenseReportDataDefaults, isDataZeroForReporting } from '../util';
class AnalyticsAdSenseDashboardWidgetTopPagesTable extends Component {
static renderLayout( component ) {
@@ -56,7 +57,9 @@ class AnalyticsAdSenseDashboardWidgetTopPagesTable extends Component {
render() {
const { data } = this.props;
- if ( ! data || ! data.length ) {
+ // Do not return zero data callout here since it will already be
+ // present on the page from other sources.
+ if ( isDataZeroForReporting( data ) ) {
return null;
}
@@ -129,11 +132,6 @@ class AnalyticsAdSenseDashboardWidgetTopPagesTable extends Component {
}
}
-// @todo: need to have test account that connected analytics to adsense but has zero data.
-const isDataZero = () => {
- return false;
-};
-
/**
* Check error data response, and handle the INVALID_ARGUMENT specifically.
*
@@ -146,10 +144,22 @@ const isDataZero = () => {
*
*/
const getDataError = ( data ) => {
- if ( ! data || ! data.error ) {
- return false;
+ if ( data.code && data.message && data.data && data.data.status ) {
+ // Specifically looking for string "badRequest"
+ if ( data.data.reason && 'badRequest' === data.data.reason ) {
+ return AnalyticsAdSenseDashboardWidgetTopPagesTable.renderLayout(
+ <CTA
+ title={ __( 'Restricted metric(s)', 'google-site-kit' ) }
+ description={ __( 'You need to link Analytics and AdSense to get report for your top earning pages. Learn more: https://support.google.com/adsense/answer/6084409 ', 'google-site-kit' ) }
+ />
+ );
}
+ return data.message;
+ }
+
+ // Legacy errors? Maybe this is never hit but better be safe than sorry.
+ if ( data.error ) {
// We don't want to show error as AdsenseDashboardOutro will be rendered for this case.
if ( 400 === data.error.code && 'INVALID_ARGUMENT' === data.error.status && getModulesData().analytics.active ) {
return null;
@@ -164,6 +174,9 @@ const getDataError = ( data ) => {
}
return __( 'Unidentified error', 'google-site-kit' );
+ }
+
+ return false;
};
export default withData(
@@ -187,6 +200,7 @@ export default withData(
fullWidth: true,
createGrid: true,
},
- isDataZero,
+ // Force isDataZero to false since it is handled within the component.
+ () => false,
getDataError
);
| 9 |
diff --git a/src/components/Validator.js b/src/components/Validator.js @@ -140,7 +140,9 @@ export var Validator = {
check: function(component, setting, value) {
// From http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
- return re.test(value);
+
+ // Allow emails to be valid if the component is pristine and no value is provided.
+ return (component.pristine && !value) || re.test(value);
}
},
date: {
| 11 |
diff --git a/test/jasmine/tests/geo_test.js b/test/jasmine/tests/geo_test.js @@ -380,6 +380,25 @@ describe('geojson / topojson utils', function() {
expect(out).toEqual(false);
});
});
+
+ describe('should distinguish between US and US Virgin Island', function() {
+
+ // N.B. Virgin Island don't appear at the 'world_110m' resolution
+ var topojsonName = 'world_50m';
+ var topojson = GeoAssets.topojson[topojsonName];
+
+ var shouldPass = [
+ 'Virgin Islands (U.S.)',
+ ' Virgin Islands (U.S.) '
+ ];
+
+ shouldPass.forEach(function(str) {
+ it('(case ' + str + ')', function() {
+ var out = _locationToFeature(topojson, str, 'country names');
+ expect(out.id).toEqual('VIR');
+ });
+ });
+ });
});
describe('Test geo interactions', function() {
| 0 |
diff --git a/rule-server/src/static/archives.json b/rule-server/src/static/archives.json "name": "Latest Deployment",
"path": "/archives/latest"
},
+ {
+ "id": "21September2022",
+ "name": "21 September 2022 Deployment",
+ "version": "3.1.39",
+ "path": "/archives/2022.09.21"
+ },
{
"id": "10August2022",
"name": "10 August 2022 Deployment",
| 3 |
diff --git a/src/context/testCaseActions.js b/src/context/testCaseActions.js @@ -136,24 +136,21 @@ export const deleteAsync = id => ({
id,
});
-export const updateAsync = ({ id,
- queryVariant,
- querySelector,
- queryValue,
- isNot,
- matcherType,
- matcherValue,
- suggestions,
+export const updateAsync = ({
+ id,
+ method,
+ route,
+ store,
+ matcher,
+ expectedResponse,
}) => ({
- type: actionTypes.UPDATE_ASSERTION,
+ type: actionTypes.UPDATE_ASYNC,
id,
- queryVariant,
- querySelector,
- queryValue,
- isNot,
- matcherType,
- matcherValue,
- suggestions,
+ method,
+ route,
+ store,
+ matcher,
+ expectedResponse,
});
export const createNewTest = () => ({
| 3 |
diff --git a/src/encoded/tests/data/inserts/user.json b/src/encoded/tests/data/inserts/user.json ],
"uuid": "de7f5444-ee87-4e4e-b621-9c136ea1d4b1"
},
+ {
+ "email": "[email protected]",
+ "first_name":"Khine",
+ "last_name":"Lin",
+ "lab": "/labs/j-michael-cherry/",
+ "status": "current",
+ "groups": [
+ "admin"
+ ],
+ "uuid": "6667a92a-d202-493a-8c7d-7a56d1380356"
+ },
{
"email": "[email protected]",
"first_name": "J. Michael",
| 0 |
diff --git a/spec/server/unit/conf_spec.coffee b/spec/server/unit/conf_spec.coffee @@ -4,6 +4,7 @@ os = require("os")
path = require("path")
Promise = require("bluebird")
Conf = require("#{root}lib/util/conf")
+exit = require("#{root}lib/util/exit")
lockFile = Promise.promisifyAll(require("lockfile"))
fs = Promise.promisifyAll(require("fs-extra"))
@@ -16,6 +17,13 @@ describe "lib/util/conf", ->
it "throws if cwd is not specified", ->
expect(-> new Conf()).to.throw("Must specify cwd when creating new Conf()")
+ it "unlocks file on exit", ->
+ @sandbox.stub(lockFile, "unlockSync")
+ @sandbox.stub(exit, "ensure")
+ new Conf({cwd: @dir})
+ exit.ensure.yield()
+ expect(lockFile.unlockSync).to.be.called
+
context "configName", ->
it "defaults to config.json", ->
expect(path.basename(new Conf({cwd: @dir}).path)).to.equal("config.json")
| 0 |
diff --git a/tests/Unit/CrudPanel/CrudPanelColumnsTest.php b/tests/Unit/CrudPanel/CrudPanelColumnsTest.php @@ -18,7 +18,7 @@ class CrudPanelColumnsTest extends BaseDBCrudPanelTest
'tableColumn' => false,
'orderable' => false,
'searchLogic' => false,
- 'priority' => 1,
+ 'priority' => 0,
],
];
@@ -47,7 +47,7 @@ class CrudPanelColumnsTest extends BaseDBCrudPanelTest
'tableColumn' => false,
'orderable' => false,
'searchLogic' => false,
- 'priority' => 1,
+ 'priority' => 0,
],
'column2' => [
@@ -58,7 +58,7 @@ class CrudPanelColumnsTest extends BaseDBCrudPanelTest
'tableColumn' => false,
'orderable' => false,
'searchLogic' => false,
- 'priority' => 2,
+ 'priority' => 1,
],
];
@@ -86,7 +86,7 @@ class CrudPanelColumnsTest extends BaseDBCrudPanelTest
'tableColumn' => false,
'orderable' => false,
'searchLogic' => false,
- 'priority' => 1,
+ 'priority' => 0,
],
'column2' => [
'name' => 'column2',
@@ -96,7 +96,7 @@ class CrudPanelColumnsTest extends BaseDBCrudPanelTest
'tableColumn' => false,
'orderable' => false,
'searchLogic' => false,
- 'priority' => 2,
+ 'priority' => 1,
],
'column3' => [
'name' => 'column3',
@@ -106,7 +106,7 @@ class CrudPanelColumnsTest extends BaseDBCrudPanelTest
'tableColumn' => false,
'orderable' => false,
'searchLogic' => false,
- 'priority' => 3,
+ 'priority' => 2,
],
];
| 3 |
diff --git a/examples/py/exchanges.py b/examples/py/exchanges.py @@ -25,7 +25,7 @@ for id in ccxt.exchanges:
def log(*args):
print(' '.join([str(arg) for arg in args]))
-log('The ccxt library supports', green(len(ccxt.exchanges)), 'exchanges:')
+log('The ccxt library supports', green(str(len(ccxt.exchanges))), 'exchanges:')
# output a table of all exchanges
log(pink('{:<15} {:<15} {:<15}'.format('id', 'name', 'URL')))
| 1 |
diff --git a/sirepo/package_data/static/js/radia.js b/sirepo/package_data/static/js/radia.js @@ -1024,12 +1024,8 @@ SIREPO.app.directive('radiaViewer', function(appState, errorService, frameCache,
var b = renderer.computeVisiblePropBounds();
radiaService.objBounds = b;
//srdbg('bnds', b);
- var points = new window.Float32Array([
- b[0], b[2], b[4], b[1], b[2], b[4], b[1], b[3], b[4], b[0], b[3], b[4],
- b[0], b[2], b[5], b[1], b[2], b[5], b[1], b[3], b[5], b[0], b[3], b[5],
- ]);
//srdbg('l', [Math.abs(b[1] - b[0]), Math.abs(b[3] - b[2]), Math.abs(b[5] - b[4])]);
- //srdbg('ctr', [(b[1] - b[0]) / 2, (b[3] - b[2]) / 2, (b[5] - b[4]) / 2]);
+ //srdbg('ctr', [(b[1] + b[0]) / 2, (b[3] + b[2]) / 2, (b[5] + b[4]) / 2]);
var padPct = 0.1;
var l = [
@@ -1040,7 +1036,6 @@ SIREPO.app.directive('radiaViewer', function(appState, errorService, frameCache,
return (1 + padPct) * c;
});
-
var bndBox = cm.buildBox(l, [(b[1] + b[0]) / 2, (b[3] + b[2]) / 2, (b[5] + b[4]) / 2]);
bndBox.actor.getProperty().setRepresentationToWireframe();
//var lf = vtk.Filters.General.vtkLineFilter.newInstance();
@@ -1048,7 +1043,15 @@ SIREPO.app.directive('radiaViewer', function(appState, errorService, frameCache,
renderer.addActor(bndBox.actor);
var vpb = vtkPlotting.vpBox(bndBox.source, renderer);
renderWindow.render();
- vpb.initializeWorld();
+ vpb.defaultCfg.edgeCfg.z.sense = -1;
+ vpb.initializeWorld(
+ {
+ edgeCfg: {
+ x: {sense: 1},
+ y: {sense: 1},
+ z: {sense: -1},
+ }
+ });
$scope.axisObj = vpb;
var acfg = {};
@@ -1058,7 +1061,7 @@ SIREPO.app.directive('radiaViewer', function(appState, errorService, frameCache,
acfg[dim].label = dim + ' [mm]';
acfg[dim].max = b[2 * i + 1];
acfg[dim].min = b[2 * i];
- acfg[dim].numPoints = 100;
+ acfg[dim].numPoints = 2;
acfg[dim].screenDim = dim === 'z' ? 'y' : 'x';
});
$scope.axisCfg = acfg;
| 12 |
diff --git a/fixed-price-subscriptions/server/go/server.go b/fixed-price-subscriptions/server/go/server.go @@ -350,9 +350,9 @@ func handleWebhook(w http.ResponseWriter, r *http.Request) {
DefaultPaymentMethod: stripe.String(pi.PaymentMethod.ID),
}
sub.Update(invoice.Subscription.ID, params)
- fmt.Println("Default payment method set for subscription: %s", pi.PaymentMethod)
+ fmt.Println("Default payment method set for subscription: ", pi.PaymentMethod)
}
- fmt.Println("Payment succeeded for invoice: %s", event.ID)
+ fmt.Println("Payment succeeded for invoice: ", event.ID)
}
type errResp struct {
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.