code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/components/Discussion/graphql/store.js b/components/Discussion/graphql/store.js @@ -121,12 +121,7 @@ export const bumpTagCounts = ({ comment, initialParentId }) => draft => {
* Merge multiple comments (a whole CommentConnection) into the Discussion draft. This
* function is used in the discussionQuery fetchMore code path.
*/
-export const mergeComments = ({
- parentId,
- appendAfter,
- comments,
- activeTag
-}) => draft => {
+export const mergeComments = ({ parentId, appendAfter, comments }) => draft => {
const nodes = draft.discussion.comments.nodes
/*
| 13 |
diff --git a/src/core/core.adapters.js b/src/core/core.adapters.js * @return {*}
*/
function abstract() {
- throw new Error('This method is not implemented: either no adapter can be found or an incomplete integration was provided.');
+ throw new Error('This method is not implemented: Check that a complete date adapter is provided.');
}
/**
| 7 |
diff --git a/docs/source/guides/core-concepts/cypress-in-a-nutshell.md b/docs/source/guides/core-concepts/cypress-in-a-nutshell.md @@ -58,7 +58,7 @@ Can you read this? If you did, it might sound something like this:
This is a relatively simple, straightforward test, but consider how much code has been covered by it, both on the client and the server!
-For the remainder of this guide we'll go through the basics of Cypress that make this example work. We'll demystify the rules Cypress follows so you can productively script the browser to act as much like an end user as possible, as well as discuss how to take shortcuts when it's useful.
+For the remainder of this guide, we'll explore the basics of Cypress that make this example work. We'll demystify the rules Cypress follows so you can productively script the browser to act as much like an end user as possible, as well as discuss how to take shortcuts when it's useful.
# Finding Elements
@@ -70,26 +70,29 @@ In jQuery, you're used to looking up elements like this:
$('.my-selector')
```
-Similarly, in Cypress you look up elements like this:
+In Cypress, the query is the same:
```js
cy.get('.my-selector')
```
-Just the same, right? So we can just assign that and move on with our day?
+Accessing the DOM elements from the query works differently, however:
```js
+// This is fine.
+let $jqElement = $('.my-selector')
+
// This will not work!
-let myElement = cy.get('.my-selector')
+let $cyElement = cy.get('.my-selector')
```
-Not so fast...
+Let's look at why this is...
## Cypress is _Not_ Like jQuery
-Question: What happens when jQuery can't find the selector it queries?
+**Question:** What happens when jQuery can't find the selector it queries?
-Answer: Oops! The dreaded `null` enters your code, and you ignore it at your own risk!
+**Answer:** *Oops!* The dreaded `null` enters your code, and you ignore it at your own risk!
```js
// $() returns immediately with null
@@ -98,9 +101,9 @@ let $myElement = $('.my-selector').first()
doSomething($myElement)
```
-Question: What happens when Cypress can't find the selector it queries?
+**Question:** What happens when Cypress can't find the selector it queries?
-Answer: No big deal! Cypress expects this and automatically retries the query for you until it is found or the timeout is reached.
+**Answer:** *No big deal!* Anticipating this kind of thing, Cypress automatically retries the query for you until it is found, or the timeout is reached.
```js
// cy.get() queries using jQuery, repeating the query until...
@@ -115,13 +118,13 @@ cy.get('.my-selector').first()
```
This makes Cypress robust, immune to a thousand tiny, common problems at once. Think about all the circumstances that could cause the jQuery version to fail:
-- DOM not loaded yet
-- framework hasn't finished bootstrapping
+- the DOM has not loaded yet
+- your framework hasn't finished bootstrapping
- an XHR hasn't completed
- an animation hasn't completed
- and on and on...
-Traditionally, you'd be forced to write custom code to ensure against any and all of these issues. Not in Cypress! With built-in retrying and customizable timeouts, Cypress sidesteps all of this instantly. The only change in your code is leveraging a Promise-like `.then()` command whenever you need to access the element directly.
+Traditionally, you'd be forced to write custom code to ensure against any and all of these issues: a nasty mashup of arbitrary waits, conditional retries, and null checks littering your code. Not in Cypress! With built-in retrying and customizable timeouts, Cypress sidesteps all of this, instantly. The only change in your code is a shift to leverage the Promise-like `.then()` command whenever you need to access the element directly.
{% note info %}
In Cypress, when you want to interact with a DOM element directly, call `.then()` and pass a function to it that will receive the element.
| 7 |
diff --git a/assets/js/modules/analytics/datastore/accounts.js b/assets/js/modules/analytics/datastore/accounts.js @@ -29,7 +29,6 @@ import API from 'googlesitekit-api';
import Data from 'googlesitekit-data';
import { isValidAccountSelection } from '../util';
import { STORE_NAME, ACCOUNT_CREATE, PROPERTY_CREATE, FORM_ACCOUNT_CREATE } from './constants';
-import { STORE_NAME as CORE_USER } from '../../../googlesitekit/datastore/user/constants';
import { STORE_NAME as CORE_FORMS } from '../../../googlesitekit/datastore/forms/constants';
import { createFetchStore } from '../../../googlesitekit/data/create-fetch-store';
import { actions as tagActions } from './tags';
@@ -344,10 +343,9 @@ const baseSelectors = {
*/
getAccountTicketTermsOfServiceURL: createRegistrySelector( ( select ) => ( state ) => {
const { accountTicketID } = state;
- const email = select( CORE_USER ).getEmail();
const tosURL = select( STORE_NAME ).getServiceURL( { path: `/termsofservice/${ accountTicketID }`, query: { provisioningSignup: 'false' } } );
- if ( undefined === accountTicketID || ! email || ! tosURL ) {
+ if ( undefined === accountTicketID || ! tosURL ) {
return undefined;
}
| 2 |
diff --git a/README.md b/README.md @@ -4,7 +4,7 @@ This is a starter kit for Hack Oregon front-end development using React + Redux.
This repo should help get started and keep the different projects aligned.
#### Guide
-1. Get [Node 6.5 +](https://nodejs.org) - I recommend using [Node Version Manager](https://github.com/creationix/nvm).
+1. Get [Node 6.5 +](https://nodejs.org) - I recommend using [Node Version Manager](https://github.com/creationix/nvm#install-script):
2. `git clone https://github.com/hackoregon/hackor-frontend-starter.git`.
3. `npm i` - install
4. `npm start` - start dev mode (watching tests + linter)
| 3 |
diff --git a/config/redirects.js b/config/redirects.js @@ -2531,11 +2531,11 @@ module.exports = [
to: '/private-cloud/migrate-private-cloud-custom-domains'
},
{
- from: ['/private-cloud/onboarding/private-cloud', '/appliance/private-cloud-requirements', '/private-cloud/private-cloud-onboarding/standard-private-cloud-infrastructure-requirements'],
+ from: ['/private-cloud/onboarding/private-cloud', '/appliance/private-cloud-requirements'],
to: '/private-cloud/private-cloud-onboarding/standard-private-cloud-infrastructure-requirements'
},
{
- from: '/private/cloud/onboarding/managed-private-cloud/infrastructure',
+ from: '/private-cloud/onboarding/managed-private-cloud/infrastructure',
to: '/private-cloud/private-cloud-onboarding/customer-hosted-managed-private-cloud-infrastructure-requirements'
},
{
| 3 |
diff --git a/articles/connections/social/github.md b/articles/connections/social/github.md @@ -4,9 +4,8 @@ connection: Github
image: /media/connections/github.png
seo_alias: github
index: 7
-description: How to obtain a Client Id and Client Secret for GitHub.
+description: How to add GitHub login to your app and access their API
---
-
# Connect your app to GitHub
To configure a GitHub connection, you will need to register Auth0 with GitHub.
@@ -40,11 +39,29 @@ Once the application is registered, your app's `Client ID` and `Client Secret` w

-### 4. Copy your GitHub app's Client ID and Client Secret
+## 4. Copy your GitHub app's Client ID and Client Secret
Go to your [Auth0 Dashboard](${manage_url}) and select **Connections > Social**, then choose **Github**. Copy the `Client ID` and `Client Secret` from the **Developer Applications** of your app on Github into the fields on this page on Auth0.

+## 5. Access GitHub's API
+
+Once you successfully authenticate a user, GitHub includes an [access token](/tokens/access-token) in the user profile it returns to Auth0.
+
+You can then use this token to call their API.
+
+In order to get a GitHub access token, you have to retrieve the full user's profile, using the Auth0 Management API, and extrach the access token from the response. For detailed steps refer to [Call an Identity Provider API](/connections/calling-an-external-idp-api).
+
+Once you have the token you can call the API, following GitHub's documentation.
+
+::: note
+For more information on these tokens, refer to [Identity Provider Access Tokens](/tokens/idp).
+:::
+
+## Troubleshooting
+
+If you are receiving `Access Denied` when calling the GitHub API, you probably have not requested the correct permissions for the user during login. For information on how to fix that, refer to [Add scopes/permissions to call Identity Provider's APIs](/connections/adding-scopes-for-an-external-idp).
+
<%= include('../_quickstart-links.md') %>
| 0 |
diff --git a/components/maplibre/ban-map/index.js b/components/maplibre/ban-map/index.js @@ -251,7 +251,8 @@ function BanMap({map, isSourceLoaded, popup, address, setSources, setLayers, onS
}, []) // eslint-disable-line react-hooks/exhaustive-deps
useEffect(() => {
- setSources([{
+ setSources([
+ {
name: 'base-adresse-nationale',
type: 'vector',
format: 'pbf',
@@ -266,7 +267,16 @@ function BanMap({map, isSourceLoaded, popup, address, setSources, setLayers, onS
name: 'cadastre',
type: 'vector',
url: 'https://openmaptiles.geo.data.gouv.fr/data/cadastre.json'
- }])
+ },
+ {
+ name: 'positions',
+ type: 'geojson',
+ data: {
+ type: 'FeatureCollection',
+ features: []
+ }
+ }
+ ])
setLayers([
...cadastreLayers,
adresseCircleLayer,
@@ -277,6 +287,29 @@ function BanMap({map, isSourceLoaded, popup, address, setSources, setLayers, onS
])
}, [setSources, setLayers])
+ useEffect(() => {
+ if (map && address?.type === 'numero' && isSourceLoaded) {
+ const positionsSource = map.getSource('positions')
+ if (positionsSource) {
+ positionsSource.setData({
+ type: 'FeatureCollection',
+ features: address.positions.map(p => ({
+ type: 'Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: p.position.coordinates
+ },
+ properties: {
+ ...address,
+ type: p.positionType,
+ nomVoie: address.voie.nomVoie
+ }
+ }))
+ })
+ }
+ }
+ }, [map, address])
+
useEffect(() => {
if (isSourceLoaded && map.getLayer('adresse-complet-label') && map.getLayer('adresse-label')) {
if (address && address.type === 'numero') {
@@ -346,10 +379,12 @@ BanMap.propTypes = {
id: PropTypes.string.isRequired,
type: PropTypes.string.isRequired,
position: PropTypes.object,
+ positions: PropTypes.object,
parcelles: PropTypes.array,
displayBBox: PropTypes.array,
lat: PropTypes.number,
- lon: PropTypes.number
+ lon: PropTypes.number,
+ voie: PropTypes.object
}),
map: PropTypes.object.isRequired,
isSourceLoaded: PropTypes.bool,
| 0 |
diff --git a/README.md b/README.md [](https://circleci.com/gh/ayr-ton/kamu)
+[](https://codeclimate.com/github/flavia-by-flavia/kamu/coverage)
+[](https://codeclimate.com/github/flavia-by-flavia/kamu)
+
Join the Telegram contributors chat at https://t.me/joinchat/AfhaV0XSlMQFRcYnMddG8w
Kamu is an application that focus on managing a physical library where you can add books, borrow and return them.
| 0 |
diff --git a/Specs/Scene/findMetadataGroupSpec.js b/Specs/Scene/findMetadataGroupSpec.js @@ -20,17 +20,19 @@ describe("Scene/findMetadataGroup", function () {
});
var mockTileset = {
- getGroup: function (groupId) {
- return new MetadataGroup({
- id: groupId,
+ metadata: {
+ groups: {
+ testGroup: new MetadataGroup({
+ id: "testGroup",
class: layerClass,
group: {
properties: {
- name: "Test Layer " + groupId,
+ name: "Test Layer testGroup",
elevation: 150.0,
},
},
- });
+ }),
+ },
},
};
@@ -48,12 +50,11 @@ describe("Scene/findMetadataGroup", function () {
});
it("returns the group metadata if there is an extension", function () {
- var groupId = "testGroup";
var contentHeader = {
uri: "https://example.com/model.b3dm",
extensions: {
"3DTILES_metadata": {
- group: groupId,
+ group: "testGroup",
},
},
};
| 3 |
diff --git a/src/components/my-purchase-card.js b/src/components/my-purchase-card.js @@ -63,41 +63,50 @@ class MyPurchaseCard extends Component {
render() {
const { listing, offer, offerId } = this.props
- const created = Number(offer.createdAt)
- const soldAt = created * 1000 // convert seconds since epoch to ms
const { category, name, pictures, price } = listing
- const voided = ['rejected', 'withdrawn'].includes(offer.status)
- const step = offerStatusToStep(offer.status)
+ const { buyer, events, status } = offer
+ const voided = ['rejected', 'withdrawn'].includes(status)
+ const step = offerStatusToStep(status)
- let verb
- switch (offer.status) {
+ let event, verb
+ switch (status) {
case 'created':
+ event = events.find(({ event }) => event === 'OfferCreated')
verb = this.props.intl.formatMessage(this.intlMessages.created)
break
case 'accepted':
+ event = events.find(({ event }) => event === 'OfferAccepted')
verb = this.props.intl.formatMessage(this.intlMessages.accepted)
break
case 'withdrawn':
- const actor = offer.events.find(({ event }) => event === 'OfferWithdrawn').returnValues[0]
+ event = events.find(({ event }) => event === 'OfferWithdrawn')
- verb = actor === offer.buyer ?
+ const actor = event ? event.returnValues[0] : null
+
+ verb = actor === buyer ?
this.props.intl.formatMessage(this.intlMessages.withdrawn) :
this.props.intl.formatMessage(this.intlMessages.rejected)
break
case 'disputed':
+ event = events.find(({ event }) => event === 'OfferDisputed')
verb = this.props.intl.formatMessage(this.intlMessages.disputed)
break
case 'finalized':
+ event = events.find(({ event }) => event === 'OfferFinalized')
verb = this.props.intl.formatMessage(this.intlMessages.finalized)
break
case 'sellerReviewed':
+ event = events.find(({ event }) => event === 'OfferData')
verb = this.props.intl.formatMessage(this.intlMessages.reviewed)
break
default:
+ event = { timestamp: Date.now() / 1000 }
verb = this.props.intl.formatMessage(this.intlMessages.unknown)
}
- const timestamp = `${verb} on ${this.props.intl.formatDate(soldAt)}`
+ const timestamp = `${verb} on ${this.props.intl.formatDate(
+ event.timestamp * 1000
+ )}`
const photo = pictures && pictures.length > 0 && pictures[0]
return (
| 9 |
diff --git a/apps/macwatch2/ChangeLog b/apps/macwatch2/ChangeLog 0.01: Created first version of the app with numeric date, only works in light mode
0.02: New icon, shimmied date right a bit
0.03: Incorporated improvements from Peer David for accuracy, fix dark mode, widgets run in background
+0.04: Changed clock to use 12/24 hour format based on locale
| 3 |
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -4222,12 +4222,19 @@ function permutationcal(nval, rval) {
// document.getElementById("permutation_wrong").innerHTML="Enter a Number."
document.getElementById("premutation_div_div2").style.display = "none";
document.getElementById("permutation_div_div1").style.display = "none";
+ } else if(val3<0 || val4<0) {
+ document.getElementById("permutation_wrong").innerHTML =
+ "n and r must be positive integers.";
+ document.getElementById("premutation_div_div2").style.display = "none";
+ document.getElementById("permutation_div_div1").style.display = "block";
} else if (val3 < val4) {
document.getElementById("permutation_wrong").innerHTML =
"n must be greater than r.";
document.getElementById("premutation_div_div2").style.display = "none";
document.getElementById("permutation_div_div1").style.display = "block";
- } else {
+
+ } else
+ {
let ans1 = 1,
ans2 = 1,
ans3 = 0;
@@ -4267,12 +4274,20 @@ function combinationcal(nval, rval) {
if (isNaN(val3) || isNaN(val4)) {
document.getElementById("combination_div_div2").style.display = "none";
document.getElementById("combination_div_div1").style.display = "none";
+ } else if(val3<0 || val4<0) {
+ document.getElementById("combination_wrong").innerHTML =
+ "n and r must be positive integers";
+ document.getElementById("combination_div_div2").style.display = "none";
+ document.getElementById("combination_div_div1").style.display = "block";
+
} else if (val3 < val4) {
document.getElementById("combination_wrong").innerHTML =
"n must be greater than r.";
document.getElementById("combination_div_div2").style.display = "none";
document.getElementById("combination_div_div1").style.display = "block";
- } else {
+
+ } else
+ {
let ans1 = 1,
ans2 = 1,
ans3 = 1;
| 1 |
diff --git a/packages/react/src/components/CardEditor/CardEditForm/CardEditForm.jsx b/packages/react/src/components/CardEditor/CardEditForm/CardEditForm.jsx @@ -214,7 +214,7 @@ export const hideCardPropertiesForEditor = (card) => {
: columns // TABLE CARD
? { ...card, content: { ...card.content, columns } }
: card,
- ['id', 'content.src', 'content.imgState', 'i18n', 'validateUploadedImage']
+ ['content.src', 'content.imgState', 'i18n', 'validateUploadedImage']
);
};
| 1 |
diff --git a/react/src/base/inputs/SprkCheckbox.stories.js b/react/src/base/inputs/SprkCheckbox.stories.js @@ -433,20 +433,20 @@ hugeLayoutSix.story = {
export const legacy = () => (
<SprkSelectionInput
- groupLabel="Checkbox Input"
+ groupLabel="Checkbox Group Label"
choices={[
{
- label: 'Checkbox Item 1',
+ label: 'Legacy Checkbox Item 1',
name: 'check[]',
value: 'item-1',
},
{
- label: 'Checkbox Item 2',
+ label: 'Legacy Checkbox Item 2',
name: 'check[]',
value: 'item-2',
},
{
- label: 'Checkbox Item 3',
+ label: 'Legacy Checkbox Item 3',
name: 'check[]',
value: 'item-2',
},
@@ -464,20 +464,20 @@ legacy.story = {
export const legacyInvalidCheckbox = () => (
<SprkSelectionInput
- groupLabel="Checkbox Input"
+ groupLabel="Checkbox Group Label"
choices={[
{
- label: 'Checkbox Item 1',
+ label: 'Legacy Checkbox Item 1',
name: 'check[]',
value: 'item-1',
},
{
- label: 'Checkbox Item 2',
+ label: 'Legacy Checkbox Item 2',
name: 'check[]',
value: 'item-2',
},
{
- label: 'Checkbox Item 3',
+ label: 'Legacy Checkbox Item 3',
name: 'check[]',
value: 'item-3',
},
@@ -497,20 +497,20 @@ legacyInvalidCheckbox.story = {
export const legacyDisabledCheckbox = () => (
<SprkSelectionInput
- groupLabel="Checkbox Input"
+ groupLabel="Checkbox Group Label"
choices={[
{
- label: 'Checkbox Item 1',
+ label: 'Legacy Checkbox Item 1',
name: 'check[]',
value: 'item-1',
},
{
- label: 'Checkbox Item 2',
+ label: 'Legacy Checkbox Item 2',
name: 'check[]',
value: 'item-2',
},
{
- label: 'Checkbox Item 3',
+ label: 'Legacy Checkbox Item 3',
name: 'check[]',
value: 'item-3',
},
| 3 |
diff --git a/map.html b/map.html container.style.top = `${newPosition.y}px`;
}
});
+ window.addEventListener('resize', e => {
+ _updateTiles();
+ });
console.timeEnd('render');
}, 5000);
| 9 |
diff --git a/src/plots/cartesian/position_defaults.js b/src/plots/cartesian/position_defaults.js @@ -72,6 +72,10 @@ module.exports = function handlePositionDefaults(containerIn, containerOut, coer
// in the axes popover to hide domain for the overlaying axis.
// perhaps I should make a private version _domain that all axes get???
var domain = coerce('domain', dfltDomain);
+
+ // according to https://www.npmjs.com/package/canvas-size
+ // the minimum value of max canvas width across browsers and devices is 4096
+ // which applied in the calculation below:
if(domain[0] > domain[1] - 1 / 4096) containerOut.domain = dfltDomain;
Lib.noneOrAll(containerIn.domain, containerOut.domain, dfltDomain);
}
| 0 |
diff --git a/world.js b/world.js @@ -612,8 +612,7 @@ world.addEventListener('objectadd', e => {
};
_bindHitTracker();
});
-
-world.isObject = object => objects.includes(object);
+// world.isObject = object => objects.includes(object);
world.bindInput = () => {
window.addEventListener('resize', e => {
| 2 |
diff --git a/modules/RTC/JitsiLocalTrack.js b/modules/RTC/JitsiLocalTrack.js @@ -342,7 +342,6 @@ export default class JitsiLocalTrack extends JitsiTrack {
*/
_stopStreamEffect() {
this._streamEffect.stopEffect();
- this._streamEffect = null;
return this._originalStream;
}
| 1 |
diff --git a/src/components/Ammo.jsx b/src/components/Ammo.jsx @@ -9,16 +9,6 @@ import Graph from './Graph.jsx';
import rawData from '../data.json';
-const styles = {
- updatedLabel: {
- fontSize: '10px',
- position: 'absolute',
- top: 2,
- left: 4,
- color: '#ccc',
- },
-};
-
const MAX_DAMAGE = 170;
const MAX_PENETRATION = 70;
@@ -92,7 +82,7 @@ function Ammo() {
return (
<div>
<div
- style = { styles.updatedLabel }
+ className = {'updated-label'}
>
{`Ammo updated: ${new Date(rawData.updated).toLocaleDateString()}`}
</div>
| 4 |
diff --git a/src/schema/mutations/EditStrategy.js b/src/schema/mutations/EditStrategy.js @@ -8,16 +8,16 @@ import { StrategyInputType } from '../types/input';
const args = {
id: { type: new GraphQLNonNull(GraphQLID) },
- newStrategy: { type: new GraphQLNonNull(StrategyInputType) },
+ strategy: { type: new GraphQLNonNull(StrategyInputType) },
};
-const resolve = (parent, { id: _id, newStrategy }) => new Promise((res, rej) => {
+const resolve = (parent, { id: _id, strategy: editedStrategy }) => new Promise((res, rej) => {
Strategy.findOne({ _id }).exec((err, strategy) => {
if (err) {
rej(err);
return;
}
- strategy = newStrategy;
+ strategy.subStrategies = editedStrategy.subStrategies;
strategy.save((error) => {
if (error) {
rej(error);
@@ -29,7 +29,7 @@ const resolve = (parent, { id: _id, newStrategy }) => new Promise((res, rej) =>
});
const mutation = {
- editParticipant: {
+ editStrategy: {
type: StrategyType,
args,
resolve,
| 10 |
diff --git a/src/OutputChannel.js b/src/OutputChannel.js @@ -553,9 +553,13 @@ export class OutputChannel extends EventEmitter {
*/
playNote(note, options = {}) {
- // Send note on message and, optionally, note off message
+ // Send note on and, optionally, note off message (if duration is a positive number)
this.sendNoteOn(note, options);
- if (!isNaN(options.duration)) this.sendNoteOff(note, options);
+
+ // https://stackoverflow.com/questions/600763#answer-601877
+ if (options.duration > 0 && isFinite(String(options.duration).trim() || NaN)) {
+ this.sendNoteOff(note, options);
+ }
return this;
| 7 |
diff --git a/src/views/community/components/communityFeeds.js b/src/views/community/components/communityFeeds.js @@ -11,16 +11,11 @@ import { CommunityMeta } from 'src/components/entities/profileCards/components/c
import { WatercoolerChat } from './watercoolerChat';
import { PostsFeeds } from './postsFeeds';
import { SegmentedControl, Segment } from 'src/components/segmentedControl';
+import { useAppScroller } from 'src/hooks/useAppScroller';
import { FeedsContainer, SidebarSection } from '../style';
export const CommunityFeeds = (props: CommunityFeedsType) => {
- const {
- community,
- scrollToTop,
- scrollToPosition,
- scrollToBottom,
- contextualScrollToBottom,
- } = props;
+ const { community, scrollToPosition, contextualScrollToBottom } = props;
const defaultSegment = community.watercoolerId ? 'chat' : 'posts';
const [activeSegment, setActiveSegment] = React.useState(defaultSegment);
@@ -88,10 +83,14 @@ export const CommunityFeeds = (props: CommunityFeedsType) => {
is chat, we want that scrolled to the bottom by default, since the behavior
of chat is to scroll up for older messages
*/
+ const { scrollToBottom, scrollToTop } = useAppScroller();
useEffect(
() => {
- if (activeSegment === 'chat') scrollToBottom();
+ if (activeSegment === 'chat') {
+ scrollToBottom();
+ } else {
scrollToTop();
+ }
},
[activeSegment]
);
| 4 |
diff --git a/app/assets/stylesheets/editor-3/_menu.scss b/app/assets/stylesheets/editor-3/_menu.scss @import 'vars';
.EditorMenu {
+ display: flex;
position: relative;
flex: 0 0 72px;
+ flex-direction: column;
+ align-items: center;
width: 72px;
min-height: 450px;
padding: 20px 0 $baseSize * 2;
background: $cBlue;
}
-.EditorMenu-navigation {
- display: flex;
- flex-direction: column;
- align-items: center;
-}
-
.EditorMenu-navigationItem {
width: $baseSize * 4;
height: $baseSize * 4;
}
.EditorMenu-logo {
- display: flex;
- align-items: center;
- justify-content: center;
+ margin: 0 auto 48px;
+
+ svg {
width: 32px;
height: 32px;
- margin: 0 auto 48px;
+ }
.point {
transform-origin: 50%;
| 7 |
diff --git a/src/traces/table/plot.js b/src/traces/table/plot.js @@ -141,12 +141,11 @@ module.exports = function plot(gd, wrappedTraceHolders) {
columnBlock.enter()
.append('g')
.classed('columnBlock', true)
- .attr('id', function(d) {return d.key;})
- .style('user-select', 'none');
+ .attr('id', function(d) {return d.key;});
columnBlock
.style('cursor', function(d) {
- return d.dragHandle ? 'ew-resize' : d.calcdata.scrollbarState.barWiggleRoom ? 'ns-resize' : 'default';
+ return d.dragHandle ? 'ew-resize' : 'auto';
});
var cellsColumnBlock = columnBlock.filter(cellsBlock);
| 11 |
diff --git a/src/ActionModal/components/SendModal.vue b/src/ActionModal/components/SendModal.vue @@ -219,9 +219,7 @@ export default {
this.amount = atoms(this.balance)
},
isMaxAmount() {
- console.log(this.amount)
- console.log(atoms(this.balance))
- return this.amount === atoms(this.balance)
+ return this.amount == atoms(this.balance)
},
bech32Validate(param) {
try {
| 14 |
diff --git a/tests/test_Court.py b/tests/test_Court.py @@ -647,6 +647,8 @@ class TestCourt(unittest.TestCase):
self.assertEqual(self.havven.balanceOf(voter), 1000)
fast_forward(fee_period + 1)
self.havven.checkFeePeriodRollover(DUMMY)
+ fast_forward(fee_period + 1)
+ self.havven.checkFeePeriodRollover(DUMMY)
# Begin a confiscation motion against the suspect.
motion_id = self.startVotingPeriod(owner, suspect)
| 1 |
diff --git a/framer/TextLayer.coffee b/framer/TextLayer.coffee @@ -38,7 +38,9 @@ class exports.TextLayer extends Layer
fontSize: 40
fontWeight: 400
lineHeight: 1.25
- font: options.fontFamily ? @defaultFont()
+
+ if not options.font? and not options.fontFamily?
+ options.fontFamily = @defaultFont()
super options
| 12 |
diff --git a/PostTimelineFilters.user.js b/PostTimelineFilters.user.js // @description Inserts several filter options for post timelines
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.6.4
+// @version 1.6.5
//
// @include */posts*/timeline*
// ==/UserScript==
});
// Hide votes (daily summary) is the new default
+ if(location.search.includes('filter=flags')) {
+ $('a[data-filter="only-flags"]').click();
+ }
+ else {
$('a#newdefault').click();
}
+ }
function appendStyles() {
| 11 |
diff --git a/FotN Companion/script.json b/FotN Companion/script.json "name": "FotN Companion",
"script": "FotN Companion.js",
"version": "1.0",
- "previousversions": "[]",
+ "previousversions": [],
"authors": "Joshua S.",
"roll20userid": "1220608",
"description": "# FotN Companion\r\rThis script allows you to wyrd (draw runes from a deck) and have those runes placed on an official FotN playmat located on a page called 'playmats', remove runes from the playmat, generate a deck based on an official FotN character sheet's rune list or a set of user described runes, place alka tokens to the map, and will reflect status from the official FotN character sheet to an appropriate playmat. This script is usable on its own, but will function better when used with the FotN character sheet and MapChange script. It allows the following commands: !wyrd, !cleanup, !build, !alka. Please see the readme file at https://github.com/yehoshua1312/Yehoshua/blob/master/roll20/roll20-character-sheets/README.txt for complete instructions."
| 3 |
diff --git a/packages/app/src/migrations/20210921173042-add-is-trashed-field.js b/packages/app/src/migrations/20210921173042-add-is-trashed-field.js @@ -11,23 +11,37 @@ module.exports = {
logger.info('Apply migration');
mongoose.connect(config.mongoUri, config.mongodb.options);
- const deletedPages = await Page.find({ status: Page.STATUS_DELETED });
- const deletedPageList = deletedPages.map(deletedPage => deletedPage._id);
+ const deletedPageStatusQuery = { status: Page.STATUS_DELETED };
- const addFieldRequests = [
+ const PAGE_COUNT = await Page.count(deletedPageStatusQuery);
+ const OFFSET = 1000;
+ let skip = 0;
+
+ const deletedPagesPromises = [];
+ const addFieldRequests = [];
+
+ while (PAGE_COUNT > skip) {
+ deletedPagesPromises.push(Page.find(deletedPageStatusQuery).select('_id').skip(skip).limit(OFFSET));
+ skip += OFFSET;
+ }
+
+ for await (const deletedPages of deletedPagesPromises) {
+ const deletedPageIdList = deletedPages.map(deletedPage => deletedPage._id);
+ addFieldRequests.push(
{
updateMany: {
- filter: { relatedPage: { $in: deletedPageList } },
+ filter: { relatedPage: { $in: deletedPageIdList } },
update: { $set: { isPageTrashed: true } },
},
},
{
updateMany: {
- filter: { relatedPage: { $nin: deletedPageList } },
+ filter: { relatedPage: { $nin: deletedPageIdList } },
update: { $set: { isPageTrashed: false } },
},
},
- ];
+ );
+ }
try {
await db.collection('pagetagrelations').bulkWrite(addFieldRequests);
| 7 |
diff --git a/src/nodejs/restWorker.js b/src/nodejs/restWorker.js @@ -66,6 +66,7 @@ class RestWorker {
if (!isValid.valid) {
const message = `Bad declaration: ${JSON.stringify(isValid.errors)}`;
logger.info(message);
+ this.state = {};
restOperation.setStatusCode(400);
restOperation.setBody({ message });
} else {
| 12 |
diff --git a/src/jena/fuseki-docker/docker-compact-entrypoint.sh b/src/jena/fuseki-docker/docker-compact-entrypoint.sh #!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
set -e
-cd /fuseki
+cd /fuseki/databases
-/jena-fuseki/bin/tdb2.tdbcompact --loc=/fuseki/databases/localData
+# Go through all directories in the /fuseki/databases
+for dir in */; do
+ echo "Compacting /fuseki/databases/${dir::-1}..."
-cd databases/localData
+ /jena-fuseki/bin/tdb2.tdbcompact --loc=/fuseki/databases/${dir::-1}
-find . -iname 'Data*' ! -wholename $(find . -iname 'Data*' -type d | sort -n | tail -n 1) -type d -exec rm -rf {} +
+ # Wait 5 seconds to ensure the compacting is finished (this is usually done in less than 2 seconds)
+ sleep 5
+ # Remove the old Data directory
+ cd /fuseki/databases/${dir::-1}
+ find . -iname 'Data*' ! -wholename $(find . -iname 'Data*' -type d | sort -n | tail -n 1) -type d -exec rm -rf {} +
+done
| 7 |
diff --git a/aura-impl/src/main/java/org/auraframework/impl/ServerServiceImpl.java b/aura-impl/src/main/java/org/auraframework/impl/ServerServiceImpl.java @@ -256,6 +256,8 @@ public class ServerServiceImpl implements ServerService {
found = true;
}
}
+ } catch (UnsupportedOperationException uoe) {
+ // ignore, definitionService.exists throws this for dynamically created definitions (layout)
} catch (Exception e) {
// this should not happen, as "exists" should never throw, but if it does, just log it and continue.
exceptionAdapter.handleException(e);
| 8 |
diff --git a/includes/Core/Authentication/Clients/OAuth_Client.php b/includes/Core/Authentication/Clients/OAuth_Client.php @@ -15,14 +15,12 @@ use Google\Site_Kit\Context;
use Google\Site_Kit\Core\Authentication\Credentials;
use Google\Site_Kit\Core\Authentication\Google_Proxy;
use Google\Site_Kit\Core\Authentication\Profile;
-use Google\Site_Kit\Core\Authentication\Verification;
use Google\Site_Kit\Core\Authentication\Exception\Google_Proxy_Code_Exception;
use Google\Site_Kit\Core\Storage\Encrypted_Options;
use Google\Site_Kit\Core\Storage\Encrypted_User_Options;
use Google\Site_Kit\Core\Storage\Options;
use Google\Site_Kit\Core\Storage\User_Options;
use Google\Site_Kit\Core\Util\Scopes;
-use Google\Site_Kit\Modules\Search_Console;
use Google\Site_Kit_Dependencies\Google_Service_PeopleService;
use WP_HTTP_Proxy;
| 2 |
diff --git a/src/pipeline/bundle-js.js b/src/pipeline/bundle-js.js @@ -11,15 +11,14 @@ const stream = require('stream');
let b;
const toStream = (str) => {
- const Readable = stream.Readable;
- const s = new Readable;
+ const s = new stream.Readable;
s.push(str);
s.push(null);
return s;
};
-const getTransform = (opts, paths) => {
+const getTransform = (opts) => {
const _getTransform = (name) => {
return (opts[name] || []).map(d => require(d));
};
@@ -39,30 +38,24 @@ module.exports = function (opts, paths, output) {
packageCache: {},
fullPaths: true,
cacheFile: path.join(paths.TMP_DIR, 'browserify-cache.json'),
- transform: getTransform(opts, paths),
+ transform: getTransform(opts),
plugin: [
(b) => {
- const requires = [{
- key: 'syntaxHighlighting',
- requireName: '__IDYLL_SYNTAX_HIGHLIGHT__'
- }, {
- key: 'data',
- requireName: '__IDYLL_DATA__'
- }, {
- key: 'components',
- requireName: '__IDYLL_COMPONENTS__'
- }, {
- key: 'ast',
- requireName: '__IDYLL_AST__'
- }];
- requires.forEach((obj) => {
- b.exclude(obj.requireName);
+ const aliases = {
+ ast: '__IDYLL_AST__',
+ components: '__IDYLL_COMPONENTS__',
+ data: '__IDYLL_DATA__',
+ syntaxHighlighting: '__IDYLL_SYNTAX_HIGHLIGHT__'
+ };
- b.require(toStream(output[obj.key]), {
- expose: obj.requireName,
+ for (const key in output) {
+ if (!aliases[key]) continue;
+ b.exclude(aliases[key]);
+ b.require(toStream(output[key]), {
+ expose: aliases[key],
basedir: paths.TMP_DIR
})
- });
+ }
}
]
};
| 2 |
diff --git a/instancing.js b/instancing.js @@ -446,7 +446,7 @@ export class GeometryAllocator {
if (this.hasOcclusionCulling) {
let foundId;
let surfaceY = -Infinity;
- const findCameraChunk = (i) => {
+ const findSearchStartingChunk = (i) => {
// find the chunk that the camera is inside
localVector3D2.set(0, 0, 0);
localVector3D3.set(0, 0, 0);
@@ -455,16 +455,18 @@ export class GeometryAllocator {
if (isPointInPillar(camera.position, min, max)) {
if (surfaceY < min.y) {
+ if (min.y <= 0 && min.y <= camera.position.y) {
surfaceY = min.y;
currentChunkMin.copy(min);
currentChunkMax.copy(max);
foundId = i;
}
}
+ }
};
for (let i = 0; i < this.numDraws; i++) {
- findCameraChunk(i);
+ findSearchStartingChunk(i);
}
if (foundId) {
| 0 |
diff --git a/server/game/cards/01 - Core/VenerableHistorian.js b/server/game/cards/01 - Core/VenerableHistorian.js @@ -4,20 +4,13 @@ class VenerableHistorian extends DrawCard {
setupCardAbilities() {
this.action({
title: 'Honor this character',
- condition: () => this.game.currentConflict && this.game.currentConflict.isParticipating(this) && this.isMoreHonorableThanOpponent(),
+ condition: () => this.game.currentConflict && this.game.currentConflict.isParticipating(this) && this.game.getOtherPlayer(this.controller) < this.controller.honor,
handler: () => {
this.game.addMessage('{0} uses {1} to honor itself', this.controller, this);
this.controller.honorCard(this);
}
});
}
- isMoreHonorableThanOpponent() {
- let otherPlayer = this.game.getOtherPlayer(this.controller);
- if(otherPlayer && otherPlayer.honor < this.controller.honor) {
- return true;
- }
- return false;
- }
}
VenerableHistorian.id = 'venerable-historian';
| 3 |
diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js @@ -270,8 +270,8 @@ function cancelMoneyRequest(chatReportID, iouReportID, type, moneyRequestAction)
const currentUserEmail = optimisticReportAction.actorEmail;
- // The owner of the iou report is the person who is owed money
- // Hence is current user is the owner, cancelling a request will lower the total and vice versa for declining
+ // The owner of the IOU report is the account who is owed money,
+ // hence if current user is the owner, cancelling a request will lower the total and vice versa for declining
// or if the current user is not an owner of the report.
if (currentUserEmail === iouReport.ownerEmail) {
iouReport.total += type === CONST.IOU.REPORT_ACTION_TYPE.CANCEL ? -amount : amount;
@@ -290,8 +290,6 @@ function cancelMoneyRequest(chatReportID, iouReportID, type, moneyRequestAction)
iouReport.total = -iouReport.total;
}
- console.log("Optimistic action added: ", optimisticReportAction);
-
const optimisticData = [
{
onyxMethod: CONST.ONYX.METHOD.MERGE,
| 7 |
diff --git a/tests/test_SelfDestructible.py b/tests/test_SelfDestructible.py @@ -2,7 +2,7 @@ import unittest
from utils.deployutils import compile_contracts, attempt_deploy, mine_tx, W3, MASTER, DUMMY, UNIT
from utils.deployutils import take_snapshot, restore_snapshot, fast_forward, fresh_account
-from utils.testutils import assertReverts, assertClose, send_value, block_time
+from utils.testutils import HavvenTestCase, send_value, block_time
from tests.contract_interfaces.self_destructible_interface import SelfDestructibleInterface
@@ -17,7 +17,7 @@ def tearDownModule():
print()
-class TestSelfDestructible(unittest.TestCase):
+class TestSelfDestructible(HavvenTestCase):
def setUp(self):
self.snapshot = take_snapshot()
@@ -26,24 +26,21 @@ class TestSelfDestructible(unittest.TestCase):
@classmethod
def setUpClass(cls):
- cls.assertReverts = assertReverts
- cls.assertClose = assertClose
+ cls.sd_duration = 60 * 60 * 24 * 7 * 4
+ cls.NULL_INITIATION = (2**256 - 1) // 2
+ cls.contract_balance = 10 * UNIT
compiled = compile_contracts([SD_SOURCE],
remappings=['""=contracts'])
-
- cls.sd_duration = 60 * 60 * 24 * 7 * 4
-
cls.sd_contract, txr = attempt_deploy(compiled, 'PayableSD', MASTER, [MASTER, DUMMY, cls.sd_duration])
-
cls.sd = SelfDestructibleInterface(cls.sd_contract)
- cls.NULL_INITIATION = (2**256 - 1) // 2
-
- send_value(MASTER, cls.sd_contract.address, 10 * UNIT)
+ # Send some value to the contract so that we can test receipt of funds by beneficiary
+ send_value(MASTER, cls.sd_contract.address, cls.contract_balance)
def test_constructor(self):
+ self.assertNotEqual(MASTER, DUMMY)
self.assertEqual(self.sd.owner(), MASTER)
self.assertEqual(self.sd.selfDestructBeneficiary(), DUMMY)
self.assertEqual(self.sd.initiationTime(), self.NULL_INITIATION)
@@ -52,11 +49,17 @@ class TestSelfDestructible(unittest.TestCase):
owner = self.sd.owner()
notowner = DUMMY
self.assertNotEqual(owner, notowner)
- self.assertReverts(self.sd.setBeneficiary, DUMMY, MASTER)
+
+ # Only the owner may set the beneficiary
+ self.assertReverts(self.sd.setBeneficiary, notowner, owner)
+
+ # The owner can correctly set the variable...
self.assertEqual(self.sd.selfDestructBeneficiary(), DUMMY)
- self.sd.setBeneficiary(MASTER, MASTER)
- self.assertEqual(self.sd.selfDestructBeneficiary(), MASTER)
- self.sd.setBeneficiary(MASTER, DUMMY)
+ self.sd.setBeneficiary(owner, owner)
+ self.assertEqual(self.sd.selfDestructBeneficiary(), owner)
+
+ # ...and set it back.
+ self.sd.setBeneficiary(owner, DUMMY)
self.assertEqual(self.sd.selfDestructBeneficiary(), DUMMY)
def test_initiateSelfDestruct(self):
@@ -82,17 +85,29 @@ class TestSelfDestructible(unittest.TestCase):
owner = self.sd.owner()
notowner = DUMMY
self.assertNotEqual(owner, notowner)
+
+ # The contract cannot be self-destructed before the SD has been initiated.
self.assertReverts(self.sd.selfDestruct, owner)
+
self.sd.initiateSelfDestruct(owner)
+
+ # Neither owners nor non-owners may not self-destruct before the time has elapsed.
self.assertReverts(self.sd.selfDestruct, notowner)
self.assertReverts(self.sd.selfDestruct, owner)
fast_forward(seconds=self.sd_duration, days=-1)
+ self.assertReverts(self.sd.selfDestruct, notowner)
self.assertReverts(self.sd.selfDestruct, owner)
fast_forward(seconds=10, days=1)
beneficiary = self.sd.selfDestructBeneficiary()
self.assertEqual(beneficiary, DUMMY)
pre_balance = W3.eth.getBalance(beneficiary)
+
+ # Non-owner should not be able to self-destruct even if the time has elapsed.
+ self.assertReverts(self.sd.selfDestruct, notowner)
+
self.sd.selfDestruct(owner)
- self.assertGreater(W3.eth.getBalance(beneficiary), pre_balance)
+
+ # The balance in the contract is correctly refunded to the beneficiary.
+ self.assertEqual(W3.eth.getBalance(beneficiary), pre_balance + self.contract_balance)
| 7 |
diff --git a/lib/Dependency.js b/lib/Dependency.js const compareLocations = require("./compareLocations");
const DependencyReference = require("./dependencies/DependencyReference");
+/** @typedef {Object} Position
+ * @property {number} column
+ * @property {number} line
+ */
+
+/** @typedef {Object} Loc
+ * @property {Position} start
+ * @property {Position} end
+ */
+
class Dependency {
constructor() {
this.module = null;
@@ -48,17 +58,4 @@ class Dependency {
}
Dependency.compare = (a, b) => compareLocations(a.loc, b.loc);
-/** @typedef {Object} Position
- * @property {number} column
- * @property {number} line
- */
-
-/** @typedef {Object} Loc
- * @property {Position} start
- * @property {Position} end
- */
-
-exports Position;
-exports Loc;
-
module.exports = Dependency;
| 2 |
diff --git a/main.js b/main.js @@ -761,7 +761,7 @@ function onReady() {
resolve();
});
}));
- scheduleDeviceConfig(device);
+ scheduleDeviceConfig(device, 30 * 1000); // grant net bit time to settle first
});
Promise.all(chain);
});
@@ -789,12 +789,9 @@ function scheduleDeviceConfig(device, delay) {
if (pendingDevConfigs.indexOf(ieeeAddr) !== -1) { // device is already scheduled
return;
}
- adapter.log.debug(`Schedule device config for ${ieeeAddr}`);
- pendingDevConfigs.push(ieeeAddr);
- if (!delay) {
- delay = 30 * 1000;
- }
- if (pendingDevConfigRun == null) {
+ adapter.log.debug(`Schedule device config for ${ieeeAddr} ${device.modelId}`);
+ pendingDevConfigs.unshift(ieeeAddr); // add as first in list
+ if (!delay || pendingDevConfigRun == null) {
const configCall = () => {
adapter.log.debug(`Pending device configs: `+JSON.stringify(pendingDevConfigs));
if (pendingDevConfigs && pendingDevConfigs.length > 0) {
@@ -803,14 +800,14 @@ function scheduleDeviceConfig(device, delay) {
configureDevice(devToConfig, (ok, msg) => {
if (ok) {
if (msg !== false) { // false = no config needed
- adapter.log.info(`Successfully configured ${ieeeAddr}`);
+ adapter.log.info(`Successfully configured ${ieeeAddr} ${devToConfig.modelId}`);
}
var index = pendingDevConfigs.indexOf(ieeeAddr);
if (index > -1) {
pendingDevConfigs.splice(index, 1);
}
} else {
- adapter.log.warn(`Failed to configure ${ieeeAddr} ` + devToConfig.modelId + `, try again in 300 sec`);
+ adapter.log.warn(`Dev ${ieeeAddr} ${devToConfig.modelId} not configured yet, will try again in latest 300 sec`);
scheduleDeviceConfig(devToConfig, 300 * 1000);
}
});
@@ -818,14 +815,18 @@ function scheduleDeviceConfig(device, delay) {
}
if (pendingDevConfigs.length == 0) {
pendingDevConfigRun = null;
- }
- else {
+ } else {
pendingDevConfigRun = setTimeout(configCall, 300 * 1000);
}
};
+ if (!delay) { // run immediately
+ clearTimeout(pendingDevConfigRun);
+ configCall();
+ } else {
pendingDevConfigRun = setTimeout(configCall, delay);
}
}
+}
function configureDevice(device, callback) {
// Configure reporting for this device.
| 7 |
diff --git a/loaders.js b/loaders.js @@ -6,6 +6,7 @@ this file contains common file format loaders which are re-used throughout the e
import {GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader.js';
import {DRACOLoader} from 'three/examples/jsm/loaders/DRACOLoader.js';
import {KTX2Loader} from 'three/examples/jsm/loaders/KTX2Loader.js';
+import {MeshoptDecoder} from 'three/examples/jsm/libs/meshopt_decoder.module.js';
import {getRenderer} from './renderer.js';
import {ShadertoyLoader} from './shadertoy.js';
import {GIFLoader} from './GIFLoader.js';
@@ -29,6 +30,9 @@ const _ktx2Loader = memoize(() => {
ktx2Loader.setTranscoderPath('/three/basis/');
return ktx2Loader;
});
+const _meshoptDecoder = memoize(() => {
+ return MeshoptDecoder;
+});
const _gltfLoader = memoize(() => {
const gltfLoader = new GLTFLoader();
{
@@ -39,6 +43,10 @@ const _gltfLoader = memoize(() => {
const ktx2Loader = _ktx2Loader();
gltfLoader.setKTX2Loader(ktx2Loader);
}
+ {
+ const meshoptDecoder = _meshoptDecoder();
+ gltfLoader.setMeshoptDecoder(meshoptDecoder);
+ }
return gltfLoader;
});
const _shadertoyLoader = memoize(() => new ShadertoyLoader());
@@ -54,6 +62,9 @@ const loaders = {
get ktx2Loader() {
return _ktx2Loader();
},
+ get meshoptDecoder() {
+ return _meshoptDecoder();
+ },
get gltfLoader() {
return _gltfLoader();
},
| 0 |
diff --git a/includes/templates/admin/edit-story.php b/includes/templates/admin/edit-story.php @@ -36,7 +36,7 @@ $rest_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_b
// Preload common data.
$preload_paths = [
sprintf( '/web-stories/v1/%s/%s?context=edit', $rest_base, $post->ID ),
- '/web-stories/v1/media?context=edit&per_page=100&page=1&_web_stories_envelope=1',
+ '/web-stories/v1/media?context=edit&per_page=100&page=1&_web_stories_envelope=true',
'/web-stories/v1/fonts',
];
| 1 |
diff --git a/src/components/KeyboardShortcutsModal.js b/src/components/KeyboardShortcutsModal.js @@ -37,7 +37,7 @@ class KeyboardShortcutsModal extends React.PureComponent {
}
this.unsubscribeShortCutModal = KeyboardShortcut.subscribe('?', () => {
this.toggleKeyboardShortcutModal(true);
- }, shortcutModifiers, false, 'openShortcutDialog');
+ }, shortcutModifiers, true, 'openShortcutDialog');
}
componentWillUnmount() {
| 11 |
diff --git a/editor/svg-editor.js b/editor/svg-editor.js @@ -4576,9 +4576,11 @@ editor.init = function () {
const cur = curConfig[type === 'fill' ? 'initFill' : 'initStroke'];
// set up gradients to be used for the buttons
const svgdocbox = new DOMParser().parseFromString(
- `<svg xmlns="http://www.w3.org/2000/svg"><rect width="16.5" height="16.5"
+ `<svg xmlns="http://www.w3.org/2000/svg">
+ <rect width="16.5" height="16.5"
fill="#${cur.color}" opacity="${cur.opacity}"/>
- <defs><linearGradient id="gradbox_"/></defs></svg>`,
+ <defs><linearGradient id="gradbox_"/></defs>
+ </svg>`,
'text/xml'
);
@@ -4586,9 +4588,9 @@ editor.init = function () {
docElem = $(container)[0].appendChild(document.importNode(docElem, true));
docElem.setAttribute('width', 16.5);
- this.rect = docElem.firstChild;
+ this.rect = docElem.firstElementChild;
this.defs = docElem.getElementsByTagName('defs')[0];
- this.grad = this.defs.firstChild;
+ this.grad = this.defs.firstElementChild;
this.paint = new $.jGraduate.Paint({solidColor: cur.color});
this.type = type;
| 11 |
diff --git a/kotobaweb/src/controls/numeric_input_box.jsx b/kotobaweb/src/controls/numeric_input_box.jsx @@ -53,10 +53,24 @@ class NumericInputBox extends Component {
});
}
- handleBlur = () => {
- if (!this.isValid(this.state.pendingValue)) {
- this.setState({ pendingValue: this.props.value.toString() });
+ handleBlur = (ev) => {
+ let numericValue = parseFloat(ev.target.value);
+ let newPendingValue;
+
+ if (numericValue < this.props.minValue) {
+ this.props.onChange(this.props.minValue);
+ newPendingValue = this.props.minValue.toString();
+ } else if (numericValue > this.props.maxValue) {
+ this.props.onChange(this.props.maxValue);
+ newPendingValue = this.props.maxValue.toString();
+ } else {
+ newPendingValue = this.props.value.toString();
}
+
+ this.setState(
+ { pendingValue: newPendingValue },
+ () => { this.input.value = newPendingValue; }
+ );
}
handleInputKeyUp = (ev) => {
@@ -78,6 +92,7 @@ class NumericInputBox extends Component {
max={this.props.maxValue}
step={this.getStep()}
onKeyUp={this.handleInputKeyUp}
+ ref={(input) => { this.input = input; }}
/>
);
}
| 7 |
diff --git a/.github/workflows/release-start.yml b/.github/workflows/release-start.yml @@ -56,11 +56,11 @@ jobs:
- name: Lerna version (stable)
if: github.event.inputs.channel == 'stable'
- run: npm run version -- --yes 'minor'
+ run: npm run version -- --yes --no-push 'minor'
- name: Lerna version (alpha/beta)
if: github.event.inputs.channel != 'stable'
- run: npm run version -- --yes --preid "${{ github.event.inputs.channel }}" "${{ github.event.inputs.iteration == '0' && 'preminor' || 'prerelease' }}"
+ run: npm run version -- --yes --no-push --preid "${{ github.event.inputs.channel }}" "${{ github.event.inputs.iteration == '0' && 'preminor' || 'prerelease' }}"
- name: Config version
run: APP_VERSION="${{ env.RELEASE_VERSION }}" npm run app-bump-version
| 2 |
diff --git a/src/core/lib/Colossus.mjs b/src/core/lib/Colossus.mjs @@ -60,6 +60,7 @@ export class ColossusComputer {
this.rotorPtrs = {};
this.totalmotor = 0;
+ this.P5Zbit = [0, 0];
}
@@ -165,6 +166,10 @@ export class ColossusComputer {
*/
this.runQbusProcessingAddition();
+ // Store Z bit impulse 5 two back required for P5 limitation
+ this.P5Zbit[1] = this.P5Zbit[0];
+ this.P5Zbit[0] = this.ITAlookup[charZin].split("")[4];
+
// Step rotors
this.stepThyratrons();
@@ -184,14 +189,32 @@ export class ColossusComputer {
let S1bPtr = this.Sptr[0]-1;
if (S1bPtr===0) S1bPtr = ROTOR_SIZES.S1;
+ // Get Chi rotor 5 two back to calculate plaintext (Z+Chi+Psi=Plain)
+ let X5bPtr=this.Xptr[4]-1;
+ if (X5bPtr==0) X5bPtr=ROTOR_SIZES.X5;
+ X5bPtr=X5bPtr-1;
+ if (X5bPtr==0) X5bPtr=ROTOR_SIZES.X5;
+ // Get Psi rotor 5 two back to calculate plaintext (Z+Chi+Psi=Plain)
+ let S5bPtr=this.Sptr[4]-1;
+ if (S5bPtr==0) S5bPtr=ROTOR_SIZES.S5;
+ S5bPtr=S5bPtr-1;
+ if (S5bPtr==0) S5bPtr=ROTOR_SIZES.S5;
+
const x2sw = this.limitations.X2;
const s1sw = this.limitations.S1;
+ const p5sw = this.limitations.P5;
// Limitation calculations
let lim=1;
if (x2sw) lim = this.rings.X[2][X2bPtr-1];
- if (s1sw) {
- lim = lim ^ this.rings.S[1][S1bPtr-1];
+ if (s1sw) lim = lim ^ this.rings.S[1][S1bPtr-1];
+
+ // P5
+ if (p5sw) {
+ let p5lim = this.P5Zbit[1];
+ p5lim = p5lim ^ this.rings.X[5][X5bPtr-1];
+ p5lim = p5lim ^ this.rings.S[5][S5bPtr-1];
+ lim = lim ^ p5lim;
}
// console.log(this.Mptr);
| 0 |
diff --git a/src/apps.json b/src/apps.json "cookies": {
"DokuWiki": ""
},
+ "html": [
+ "<div[^>]+id=\"dokuwiki__>",
+ "<a[^>]+href=\"#dokuwiki__"
+ ],
"icon": "DokuWiki.png",
"implies": "PHP",
"meta": {
| 7 |
diff --git a/apps/gpsservice/README.md b/apps/gpsservice/README.md A configurable, low power GPS widget that runs in the background.
+NOTE: This app has been superceded by [gpssetup](https://github.com/espruino/BangleApps/blob/master/apps/gpssetup/README.md)
+
+
## Goals
To develop a low power GPS widget that runs in the background and to
| 3 |
diff --git a/package.json b/package.json "multer": "^1.3.0",
"nice-cache": "0.0.5",
"oc-client": "3.2.12",
- "oc-client-browser": "1.4.2",
+ "oc-client-browser": "1.5.3",
"oc-empty-response-handler": "1.0.0",
"oc-get-unix-utc-timestamp": "1.0.2",
"oc-s3-storage-adapter": "1.1.6",
| 3 |
diff --git a/client/GameBoard.jsx b/client/GameBoard.jsx @@ -380,33 +380,14 @@ export class InnerGameBoard extends React.Component {
<PlayerStats fate={otherPlayer ? otherPlayer.fate : 0} honor={otherPlayer ? otherPlayer.totalHonor : 0} user={otherPlayer ? otherPlayer.user : null} />
<div className='deck-info'>
<div className='deck-type'>
- <CardCollection className='stronghold' source='stronghold' cards={[]} topCard={otherPlayer ? otherPlayer.stronghold : undefined} onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} disablePopup />
+ <CardCollection className='stronghold province' source='stronghold province' cards={[]} topCard={otherPlayer ? otherPlayer.stronghold : undefined} onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} disablePopup />
</div>
{ otherPlayer ? <div className={'first-player-indicator ' + (!thisPlayer.firstPlayer ? '' : 'hidden')}>First player</div> : ''}
</div>
</div>
<div className='middle'>
<div className='rings-pane'>
- <div className='plot-group'>
- {this.getAdditionalPlotPiles(otherPlayer, false)}
- <CardCollection className={otherPlayer && otherPlayer.plotSelected ? 'plot plot-selected' : 'plot'}
- title='Plots' source='plot deck' cards={otherPlayer ? otherPlayer.plotDeck : []}
- topCard={{ facedown: true, kneeled: true }} orientation='horizontal'
- onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} disableMouseOver disablePopup
- onCardClick={this.onCardClick} orientation='horizontal' />
- <CardCollection className='plot' title='Used Plots' source='revealed plots' cards={otherPlayer ? otherPlayer.plotDiscard : []}
- topCard={otherPlayer ? otherPlayer.activePlot : undefined} orientation='horizontal' onMouseOver={this.onMouseOver}
- onMouseOut={this.onMouseOut} onCardClick={this.onCardClick} />
- </div>
- <div className='plot-group our-side'>
- <CardCollection className='plot' title='Used Plots' source='revealed plots' cards={thisPlayer.plotDiscard} topCard={thisPlayer.activePlot}
- onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} orientation='horizontal' onMenuItemClick={this.onMenuItemClick}
- onCardClick={this.onCardClick} onDragDrop={this.onDragDrop} />
- <CardCollection className={thisPlayer.plotSelected ? 'plot plot-selected' : 'plot'}
- title='Plots' source='plot deck' cards={thisPlayer.plotDeck} topCard={{ facedown: true, kneeled: true }} orientation='horizontal'
- onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} onCardClick={this.onCardClick} onDragDrop={this.onDragDrop} />
- {this.getAdditionalPlotPiles(thisPlayer, !this.state.spectating)}
- </div>
+
</div>
<div className='middle-right'>
<div className='inset-pane'>
@@ -430,7 +411,7 @@ export class InnerGameBoard extends React.Component {
<div className='deck-info'>
<div className={'first-player-indicator ' + (thisPlayer.firstPlayer ? '' : 'hidden')}>First player</div>
<div className='deck-type'>
- <CardCollection className='stronghold' source='stronghold' cards={[]} topCard={thisPlayer.stronghold} onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} disablePopup onCardClick={this.onFactionCardClick} />
+ <CardCollection className='stronghold province' source='stronghold province' cards={[]} topCard={thisPlayer.stronghold} onMouseOver={this.onMouseOver} onMouseOut={this.onMouseOut} disablePopup onCardClick={this.onFactionCardClick} />
</div>
</div>
</div>
| 10 |
diff --git a/src/encoded/static/components/auditmatrix.js b/src/encoded/static/components/auditmatrix.js @@ -40,7 +40,7 @@ GroupMoreButton.defaultProps = {
class AuditMatrix extends React.Component {
static generateYGroupOpen(matrix) {
- // Make a state for each of the Y groups (each Y group currently shows a biosample type).
+ // Make a state for each of the Y groups (each Y group currently shows an audit category).
// To do that, we have to get each of the bucket keys, which will be the keys into the
// object that keeps track of whether the group shows all or not. If a group has fewer than
// the maximum number of items to show a See More button, it doesn't get included in the
@@ -159,9 +159,15 @@ class AuditMatrix extends React.Component {
const xBuckets = matrix.x.buckets;
const xLimit = matrix.x.limit || xBuckets.length;
let yGroups = matrix.y[primaryYGrouping].buckets;
- const orderKey = ['audit.ERROR.category', 'audit.NOT_COMPLIANT.category', 'audit.WARNING.category', 'no_audits', 'audit.INTERNAL_ACTION.category'];
+ // The following lines are to make sure that the audit categories are in the correct
+ // order and to assign a proper title to each colored row.
+ const orderKey = ['audit.ERROR.category', 'audit.NOT_COMPLIANT.category',
+ 'audit.WARNING.category', 'no_audits', 'audit.INTERNAL_ACTION.category'];
const titleKey = ['Error', 'Not Compliant', 'Warning', 'No audits', 'Internal Action'];
- const noAuditKey = ['no red or orange or yellow audits', 'no red or orange audits', 'no red audits', 'no audits'];
+ const noAuditKey = ['no red or orange or yellow audits', 'no red or orange audits',
+ 'no red audits', 'no audits'];
+ // For each group, compare against the key arrays above and format yGroups so that
+ // it has the same order as the keys and each group in yGroups has the correct title.
let orderIndex = 0;
let rowIndex = 0;
const tempYGroups = [];
@@ -211,7 +217,8 @@ class AuditMatrix extends React.Component {
table: 'table',
};
- // Make an array of colors corresponding to the ordering of biosample_type
+ // Make an array of colors corresponding to the ordering of audits
+ // The last color doesn't appear unless you are logged in (DCC Action)
const biosampleTypeColors = ['#cc0700', '#ff8000', '#e0e000', '#009802', '#a0a0a0'];
return (
@@ -297,6 +304,7 @@ class AuditMatrix extends React.Component {
parsed.query['y.limit'] = null;
delete parsed.search; // this makes format compose the search string out of the query object
let groupHref = url.format(parsed);
+ // Change groupHref to the proper url if it is the no_audits row.
if (group.key === 'no_audits') {
groupHref = '?type=Experiment&status=released&audit.ERROR.category!=*&audit.NOT_COMPLIANT.category!=*&audit.WARNING.category!=*&audit.INTERNAL_ACTION.category!=*&y.limit=';
}
@@ -319,6 +327,7 @@ class AuditMatrix extends React.Component {
const groupRows = (this.state.yGroupOpen[group.key] || this.state.allYGroupsOpen) ? groupBuckets : groupBuckets.slice(0, yLimit);
rows.push(...groupRows.map((yb) => {
let href = `${searchBase}&${group.key}=${globals.encodedURIComponent(yb.key)}`;
+ // The following lines give the proper urls to the no audits sub rows.
if (yb.key === 'no red audits') {
href = `${searchBase}&audit.ERROR.category!=*`;
}
| 0 |
diff --git a/articles/extensions/authorization-extension/v2/index.md b/articles/extensions/authorization-extension/v2/index.md toc: true
description: This page explains how to setup and manage the Authorization Extension v2.
---
-
# Auth0 Authorization Extension v2
The Auth0 Authorization Extension provides user authorization support in Auth0. Currently the extension supports authorizations for Users using Groups, Roles and Permissions.
@@ -27,7 +26,7 @@ When you click on the link to open the extension for the first time, you will be

-## Migration from v1 to v2 of the Authorization Extension (breaking changes)
+## Migration from v1 to v2 (breaking changes)
::: panel Application section
One of the major changes of the v2 of the Authorization Extension is that the **Applications** section has been removed. The driving factor for this change is complexity: Defining a policy when someone can or cannot access an application depends on different factors (roles, groups, time of day, MFA, ...). This is why the desired approach for this use case is [rules](#controlling-application-access).
@@ -220,6 +219,10 @@ Click the **Explorer** section to see the API endpoints that can be called.

+::: note
+You can also find detailed information about the endpoints at our [Authorization Extension API Explorer](/api/authorization-extension).
+:::
+
## Rule Behavior for the Authorization Extension
In addition to API access, you can also deploy a rule that reaches out to the extension each time a user logs in. Once the rule is enabled, it will do the following:
| 0 |
diff --git a/config/sidebar.yml b/config/sidebar.yml @@ -262,37 +262,37 @@ articles:
- title: SAML Identity Providers
url: /protocols/saml/identity-providers/
+ - title: Pass Parameters to Identity Providers
+ url: /connections/pass-parameters-to-idps
+
- title: Passwordless
url: /connections/passwordless
children:
- - title: Relevant API Endpoints
- url: /connections/passwordless/reference/relevant-api-endpoints
-
- - title: Troubleshooting
- url: /connections/passwordless/reference/troubleshoot
-
+ - title: Passwordless Methods
+ children:
+ - title: Email
+ url: /connections/passwordless/email-otp
+ - title: Magic Link
+ url: /connections/passwordless/email-magic-link
+ - title: SMS
+ url: /connections/passwordless/sms-otp
- title: Universal Login
url: /connections/passwordless/guides/universal-login
hidden: true
-
- title: Embedded Login
url: /connections/passwordless/guides/embedded-login
- hidden: true
-
- - title: Using Email
- url: /connections/passwordless/email-otp
- hidden: true
-
- - title: Using SMS
- url: /connections/passwordless/sms-otp
- hidden: true
+ children:
+ - title: Passwordless APIs
+ url: /connections/passwordless/reference/relevant-api-endpoints
+ - title: Native Apps
+ url: /connections/passwordless/guides/embedded-login-native
+ - title: Web Apps
+ url: /connections/passwordless/guides/embedded-webapps
+ - title: SPAs
+ url: /connections/passwordless/guides/embedded-spa
- title: FAQ
- url: /connections/passwordless/faq
- hidden: true
-
- - title: Pass Parameters to Identity Providers
- url: /connections/pass-parameters-to-idps
+ url: /connections/passwordless/reference/troubleshoot
## ------------------------------------------------------------
## Authorization
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md # Changelog
-## Unreleased
+## 1.65.0
- Rename the npm package from instana-nodejs-sensor to @instana/collector. See [migration guide](packages/collector/README.md#migrating-from-instana-nodejs-sensor-to-instanacollector) for details.
- Split into @instana/core and @instana/collector.
- Fix trace context continuity when multiple instances of `bluebird` are present.
| 6 |
diff --git a/src/core/operations/Magic.mjs b/src/core/operations/Magic.mjs @@ -45,7 +45,7 @@ class Magic extends Operation {
"value": false
},
{
- "name": "Output Filter (Regex)",
+ "name": "Crib (known plaintext string or regex)",
"type": "string",
"value": ""
}
| 10 |
diff --git a/token-metadata/0xc760721eB65AA6B0a634df6A008887C48813fF63/metadata.json b/token-metadata/0xc760721eB65AA6B0a634df6A008887C48813fF63/metadata.json "symbol": "CTG",
"address": "0xc760721eB65AA6B0a634df6A008887C48813fF63",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/token-metadata/0x1B4052d98fb1888C2Bf3B8d3b930e0aFf8A910dF/metadata.json b/token-metadata/0x1B4052d98fb1888C2Bf3B8d3b930e0aFf8A910dF/metadata.json "symbol": "COM",
"address": "0x1B4052d98fb1888C2Bf3B8d3b930e0aFf8A910dF",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -8,11 +8,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Removed
- The API portion of STAC has been split off into a [new repository: stac-api-spec](https://github.com/radiantearth/stac-api-spec) and will start being versioned and released separately than the core STAC spec.
+- proj4 string from proj extension
+- Various warnings about how the spec is very early and likely will change.
### Added
- 'alternate' as a listed 'rel' type with recommended 'text/html' to communicate there is an html version.
- Added a code of conduct based on github's template.
-
+- overview document that gives a more explanatory discussion of the various parts of the spec and how they relate
- Add `proj:shape` and `proj:transform` to the projections extension.
### Changed
@@ -20,10 +22,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Moved `eo:gsd` from `eo` extension to core `gsd` field in Item common metadata
- `asset` extension renamed to `item-assets` and renamed `assets` field in Collections to `item_assets`
-### Removed
-
-- proj4 string from proj extension
-
### Fixed
## [v0.9.0] - 2020-02-26
| 0 |
diff --git a/test/web-platform-tests/to-upstream/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/window-external.html b/test/web-platform-tests/to-upstream/html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis/window-external.html "use strict";
test(() => {
- assert_exists(window, "external");
+ assert_own_property(window, "external");
}, "window.external exists");
test(() => {
| 14 |
diff --git a/src/client/js/components/User/UserPicture.jsx b/src/client/js/components/User/UserPicture.jsx @@ -63,11 +63,18 @@ export default class UserPicture extends React.Component {
RootElm = this.withTooltip(RootElm);
}
+ let userPictureSrc;
+ if (user.imageUrlCached != null) {
+ userPictureSrc = user.imageUrlCached;
+ }
+ else {
+ userPictureSrc = DEFAULT_IMAGE;
+ }
return (
<RootElm>
<img
- src={this.getUserPicture(user)}
+ src={userPictureSrc}
alt={user.username}
className={this.getClassName()}
/>
| 4 |
diff --git a/example/package.json b/example/package.json "react-native-elements": "^2.2.1",
"react-native-gesture-handler": "^1.6.1",
"react-native-safe-area-context": "^3.1.9",
- "react-native-safe-area-view": "^0.13.1",
"react-native-screens": "^2.4.0",
"react-native-svg": "^12.1.0",
"react-native-vector-icons": "6.6.0",
| 2 |
diff --git a/test/jasmine/tests/treemap_test.js b/test/jasmine/tests/treemap_test.js @@ -1294,6 +1294,42 @@ describe('Test treemap restyle:', function() {
.then(_assert('back to dflt', ['Root', 'B', 'A\nnode1', 'b\nnode3']))
.then(done, done.fail);
});
+
+ it('should be able to restyle *marker.fillet*', function(done) {
+ var mock = {
+ data: [{
+ type: 'treemap',
+ labels: ['Root', 'A', 'B', 'b'],
+ parents: ['', 'Root', 'Root', 'B'],
+ text: ['node0', 'node1', 'node2', 'node3'],
+ values: [0, 1, 2, 3],
+ pathbar: { visible: false }
+ }]
+ };
+
+ function _assert(msg, exp) {
+ return function() {
+ var layer = d3Select(gd).select('.treemaplayer');
+ layer.selectAll('.surface').each(function() {
+ var surfaces = d3Select(this);
+ var path = surfaces[0][0].getAttribute('d');
+ expect(path.indexOf('a') !== -1).toEqual(exp);
+ });
+ };
+ }
+
+ Plotly.newPlot(gd, mock)
+ .then(_assert('no arcs', false))
+ .then(function() {
+ return Plotly.restyle(gd, 'marker.fillet', 10);
+ })
+ .then(_assert('has arcs', true))
+ .then(function() {
+ return Plotly.restyle(gd, 'marker.fillet', 0);
+ })
+ .then(_assert('no arcs', false))
+ .then(done, done.fail);
+ });
});
describe('Test treemap tweening:', function() {
| 0 |
diff --git a/modules/deadstones.js b/modules/deadstones.js @@ -25,7 +25,7 @@ function hasNLiberties(board, vertex, N, visited = {}, count = 0, sign = null) {
return friendlyNeighbors.some(n => hasNLiberties(board, n, N, visited, count, sign))
}
-function makeFastMove(board, sign, vertex) {
+function makePseudoMove(board, sign, vertex) {
let neighbors = board.getNeighbors(vertex)
let neighborSigns = neighbors.map(n => board.get(n))
@@ -186,7 +186,7 @@ exports.playTillEnd = function(board, sign, iterations = null) {
while (freeVertices.length > 0) {
let randomIndex = Math.floor(Math.random() * freeVertices.length)
let vertex = freeVertices[randomIndex]
- let freedVertices = makeFastMove(board, sign, vertex, false)
+ let freedVertices = makePseudoMove(board, sign, vertex, false)
freeVertices.splice(randomIndex, 1)
| 10 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/contextMenu.js @@ -198,6 +198,11 @@ RED.contextMenu = (function() {
}
// Allow escape key hook and other editor events to close context menu
RED.keyboard.add("red-ui-workspace-context-menu", "escape", function () { RED.contextMenu.hide() })
+ RED.events.on("editor:open",function() { RED.contextMenu.hide() });
+ RED.events.on("search:open",function() { RED.contextMenu.hide() });
+ RED.events.on("type-search:open",function() { RED.contextMenu.hide() });
+ RED.events.on("actionList:open",function() { RED.contextMenu.hide() });
+ RED.events.on("view:selection-changed",function() { RED.contextMenu.hide() });
return {
show: show,
hide: disposeMenu
| 11 |
diff --git a/src/selectors/event-filters.test.js b/src/selectors/event-filters.test.js @@ -9,6 +9,7 @@ import {
buildCategoryFilter
} from "./basic-event-filters";
import {
+ eventIsAfter,
selectDateFilter,
selectTimeFilter,
buildEventFilter,
@@ -260,6 +261,28 @@ describe("selectTagFilterSelectedCount", () => {
});
});
+describe("eventIsAfter", () => {
+ it("filters events before the passed date", () => {
+ const date = DateTime.fromISO("2018-07-07T00:00:00+01:00");
+ const event = buildEvent({
+ startTime: "2018-07-01T00:00:00+01:00",
+ endTime: "2018-07-01T12:00:00+01:00"
+ });
+
+ expect(eventIsAfter(date)(event)).toEqual(false);
+ });
+
+ it("does not filter events after the passed date", () => {
+ const date = DateTime.fromISO("2018-07-07T00:00:00+01:00");
+ const event = buildEvent({
+ startTime: "2018-08-01T00:00:00+01:00",
+ endTime: "2018-08-01T12:00:00+01:00"
+ });
+
+ expect(eventIsAfter(date)(event)).toEqual(true);
+ });
+});
+
describe("buildEventFilter", () => {
const showEventsAfter = DateTime.fromISO("2018-07-07T00:00:00+01:00");
const event = buildEvent({
| 0 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,12 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.42.4] -- 2018-11-07
+
+### Fixed
+- Remove rendering artifacts from `table` orca PDF exports [#3220]
+
+
## [1.42.3] -- 2018-11-06
### Fixed
| 3 |
diff --git a/external/graphdb-service.js b/external/graphdb-service.js @@ -5,9 +5,9 @@ const { GetQueryPayload, QueryType } = require('graphdb').query;
const { RDFMimeType } = require('graphdb').http;
const axios = require('axios');
const { execSync } = require('child_process');
-const jsonld = require("jsonld");
-const N3 = require("n3");
-const { BufferList } = require('bl')
+const jsonld = require('jsonld');
+const N3 = require('n3');
+const { BufferList } = require('bl');
class GraphdbService {
constructor(config) {
@@ -60,7 +60,7 @@ class GraphdbService {
try {
const stream = await this.repository.query(payload);
- const bl = new BufferList()
+ const bl = new BufferList();
stream.on('data', (bindings) => {
bl.append(bindings);
});
@@ -82,7 +82,7 @@ class GraphdbService {
try {
const stream = await this.repository.query(payload);
- const bl = new BufferList()
+ const bl = new BufferList();
stream.on('data', (bindings) => {
bl.append(bindings);
});
@@ -103,7 +103,7 @@ class GraphdbService {
.setResponseType(RDFMimeType.BOOLEAN_RESULT);
try {
const stream = await this.repository.query(payload);
- const bl = new BufferList()
+ const bl = new BufferList();
stream.on('data', (bindings) => {
bl.append(bindings);
});
@@ -131,7 +131,7 @@ class GraphdbService {
async fromRDF(assertion, context, frame) {
const copy = await jsonld.fromRDF(assertion.join('\n'), {
algorithm: 'URDNA2015',
- format: 'application/n-quads'
+ format: 'application/n-quads',
});
const framed = await jsonld.frame(copy, frame);
@@ -154,53 +154,64 @@ class GraphdbService {
keywords: [],
};
- parser.parse(
+ const quads = [];
+ await parser.parse(
rdf.join('\n'),
(error, quad, prefixes) => {
- if (error)
+ if (error) {
reject(error);
- if (quad)
+ }
+ if (quad) {
+ quads.push(quad);
+ }
+ },
+ );
+
+ for (const quad of quads) {
+ try {
switch (quad._predicate.id) {
- case "http://schema.org/hasType":
+ case 'http://schema.org/hasType':
result.metadata.type = JSON.parse(quad._object.id);
break;
- case "http://schema.org/hasTimestamp":
+ case 'http://schema.org/hasTimestamp':
result.metadata.timestamp = JSON.parse(quad._object.id);
break;
- case "http://schema.org/hasIssuer":
+ case 'http://schema.org/hasIssuer':
result.metadata.issuer = JSON.parse(quad._object.id);
break;
- case "http://schema.org/hasVisibility":
+ case 'http://schema.org/hasVisibility':
result.metadata.visibility = !!quad._object.id.includes('true');
break;
- case "http://schema.org/hasDataHash":
+ case 'http://schema.org/hasDataHash':
result.metadata.dataHash = JSON.parse(quad._object.id);
break;
- case "http://schema.org/hasAsset":
- result.assets.push(JSON.parse(quad._object.id))
+ case 'http://schema.org/hasAsset':
+ result.assets.push(JSON.parse(quad._object.id));
break;
- case "http://schema.org/hasKeyword":
- result.keywords.push(JSON.parse(quad._object.id))
+ case 'http://schema.org/hasKeyword':
+ result.keywords.push(JSON.parse(quad._object.id));
break;
- case "http://schema.org/hasSignature":
+ case 'http://schema.org/hasSignature':
result.signature = JSON.parse(quad._object.id);
break;
- case "http://schema.org/hasRootHash":
+ case 'http://schema.org/hasRootHash':
result.rootHash = JSON.parse(quad._object.id);
break;
- case "http://schema.org/hasBlockchain":
+ case 'http://schema.org/hasBlockchain':
result.blockchain.name = JSON.parse(quad._object.id);
break;
- case "http://schema.org/hasTransactionHash":
+ case 'http://schema.org/hasTransactionHash':
result.blockchain.transactionHash = JSON.parse(quad._object.id);
break;
default:
break;
}
- else
+ } catch (e) {
+ this.logger.error({ msg: `Error in extracting metadata: ${e}. ${e.stack}`, Event_name: 'ExtractMetadataError' });
+ }
+ }
accept(result);
});
- });
}
async createMetadata(assertion) {
@@ -217,7 +228,6 @@ class GraphdbService {
return result.map((x) => x.replace('_:c14n0', `<did:dkg:${assertion.id}>`));
}
-
async createBlockchainMetadata(assertion) {
const result = await this.toRDF({
'@context': 'https://www.schema.org/',
@@ -266,8 +276,8 @@ class GraphdbService {
${nquads}
}
}`;
- let g = await this.execute(query);
- return JSON.parse(g).results.bindings.map(x=>x.g.value.replace('did:dkg:',''));
+ const g = await this.execute(query);
+ return JSON.parse(g).results.bindings.map((x) => x.g.value.replace('did:dkg:', ''));
}
async searchByQuery(query, options, localQuery) {
@@ -291,7 +301,7 @@ class GraphdbService {
group by ?outerAssetId
LIMIT ${options.limit}`;
let result = await this.execute(sparqlQuery);
- result = JSON.parse(result).results.bindings
+ result = JSON.parse(result).results.bindings;
return result;
}
@@ -310,7 +320,7 @@ class GraphdbService {
LIMIT ${options.limit}`;
let result = await this.execute(sparqlQuery);
- result = JSON.parse(result).results.bindings
+ result = JSON.parse(result).results.bindings;
return result;
}
| 9 |
diff --git a/token-metadata/0x426FC8BE95573230f6e6bc4af91873F0c67b21b4/metadata.json b/token-metadata/0x426FC8BE95573230f6e6bc4af91873F0c67b21b4/metadata.json "symbol": "BPLC",
"address": "0x426FC8BE95573230f6e6bc4af91873F0c67b21b4",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/lib/urlHelper.js b/src/lib/urlHelper.js @@ -24,18 +24,17 @@ export function getNewEntryUrl(collectionName, direct) {
const uriChars = /[\w\-.~]/i;
const ucsChars = /[\xA0-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFEF}\u{10000}-\u{1FFFD}\u{20000}-\u{2FFFD}\u{30000}-\u{3FFFD}\u{40000}-\u{4FFFD}\u{50000}-\u{5FFFD}\u{60000}-\u{6FFFD}\u{70000}-\u{7FFFD}\u{80000}-\u{8FFFD}\u{90000}-\u{9FFFD}\u{A0000}-\u{AFFFD}\u{B0000}-\u{BFFFD}\u{C0000}-\u{CFFFD}\u{D0000}-\u{DFFFD}\u{E1000}-\u{EFFFD}]/u;
// `sanitizeIRI` does not actually URI-encode the chars (that is the browser's and server's job), just removes the ones that are not allowed.
-export function sanitizeIRI(str, { replacement = "" } = {}) {
+function sanitizeIRI(str, { replacement = "" } = {}) {
+ if (!isString(str)) throw "The input slug must be a string.";
if (!isString(replacement)) throw "`options.replacement` must be a string.";
- if (replacement !== "") {
- const validReplacement = (sanitizeIRI(replacement) === replacement);
- if (!validReplacement) throw "The replacement character(s) (options.replacement) is itself unsafe.";
- }
+ // This is where sanitization is actually done.
+ const sanitize = (input) => {
let result = "";
// We cannot use a `map` function here because `string.split()`
// splits things like emojis into UTF-16 surrogate pairs,
// and we want to use UTF-8 (it isn't required, but is nicer).
- for (const char of str) {
+ for (const char of input) {
if (uriChars.test(char) || ucsChars.test(char)) {
result += char;
} else {
@@ -45,6 +44,16 @@ export function sanitizeIRI(str, { replacement = "" } = {}) {
return result;
}
+ // Check and make sure the replacement character is actually a safe char itself.
+ if (replacement !== "") {
+ const validReplacement = (sanitize(replacement) === replacement);
+ if (!validReplacement) throw "The replacement character(s) (options.replacement) is itself unsafe.";
+ }
+
+ // Actually do the sanitization.
+ return sanitize(str);
+}
+
export function sanitizeSlug(str, { replacement = '-' } = {}) {
if (!isString(str)) throw "The input slug must be a string.";
if (!isString(replacement)) throw "`options.replacement` must be a string.";
| 2 |
diff --git a/token-metadata/0xbD03BD923c7D51019Fd84571D84e4eBcf7213509/metadata.json b/token-metadata/0xbD03BD923c7D51019Fd84571D84e4eBcf7213509/metadata.json "symbol": "RCKT",
"address": "0xbD03BD923c7D51019Fd84571D84e4eBcf7213509",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/democracylab/settings.py b/democracylab/settings.py @@ -324,6 +324,8 @@ ENVIRONMENT_VARIABLE_WARNINGS = {
# TODO: Set to True in productions
# SESSION_COOKIE_SECURE = True
+CSRF_COOKIE_SAMESITE = 'None'
+SESSION_COOKIE_SAMESITE = 'None'
# Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/
| 12 |
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 7.5.1 (unreleased)
-### Breaking
-
-### Feature
-
### Bugfix
- Avoid React hydration complaining about mismatched server output in toolbar. In component rendering, replaced the use of `__CLIENT__` with a state-stored `isClient`, as that is more correct. @tiberiuichim
-### Internal
-
## 7.5.0 (2020-07-29)
### Feature
| 6 |
diff --git a/packages/docs/docs/website/versioned_docs/version-2.0.0/writing_contracts.md b/packages/docs/docs/website/versioned_docs/version-2.0.0/writing_contracts.md @@ -138,7 +138,7 @@ For instance, in the following example, even if `MyContract` is upgradeable (if
```solidity
import "zos-lib/contracts/Initializable.sol";
import "openzeppelin-eth/contracts/token/ERC20/ERC20.sol";
-import "openzeppelin-eth/contracts/token/ERC20/RC20Detailed.sol";
+import "openzeppelin-eth/contracts/token/ERC20/ERC20Detailed.sol";
contract MyContract is Initializable {
ERC20 public token;
| 0 |
diff --git a/package-lock.json b/package-lock.json "code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"concat-map": {
"version": "0.0.1",
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"core-util-is": {
"version": "1.0.2",
"inherits": {
"version": "2.0.3",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"ini": {
"version": "1.3.5",
"version": "1.0.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true,
- "optional": true
+ "dev": true
},
"object-assign": {
"version": "4.1.1",
"version": "1.4.0",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"wrappy": "1"
}
"version": "1.0.2",
"bundled": true,
"dev": true,
- "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
| 13 |
diff --git a/includes/Core/Authentication/Clients/OAuth_Client.php b/includes/Core/Authentication/Clients/OAuth_Client.php @@ -37,7 +37,6 @@ final class OAuth_Client {
const OPTION_REDIRECT_URL = 'googlesitekit_redirect_url';
const OPTION_AUTH_SCOPES = 'googlesitekit_auth_scopes';
const OPTION_ERROR_CODE = 'googlesitekit_error_code';
- const OPTION_PROXY_NONCE = 'googlesitekit_proxy_nonce';
const OPTION_PROXY_ACCESS_CODE = 'googlesitekit_proxy_access_code';
const PROXY_URL = 'https://sitekit.withgoogle.com';
@@ -720,24 +719,6 @@ final class OAuth_Client {
);
}
- /**
- * Checks whether the given proxy nonce is valid.
- *
- * @since 1.0.0
- *
- * @param string $nonce Nonce to validate.
- * @return bool True if nonce is valid, false otherwise.
- */
- public function validate_proxy_nonce( $nonce ) {
- $valid_nonce = $this->options->get( self::OPTION_PROXY_NONCE );
- if ( $nonce !== $valid_nonce ) {
- return false;
- }
-
- $this->options->delete( self::OPTION_PROXY_NONCE );
- return true;
- }
-
/**
* Converts the given error code to a user-facing message.
*
| 2 |
diff --git a/packages/node_modules/@node-red/nodes/core/io/32-udp.js b/packages/node_modules/@node-red/nodes/core/io/32-udp.js @@ -222,7 +222,6 @@ module.exports = function(RED) {
});
udpInputPortsInUse[p] = sock;
}
- }
node.on("input", function(msg) {
if (msg.hasOwnProperty("payload")) {
| 2 |
diff --git a/assets/sass/components/settings/_googlesitekit-settings-module.scss b/assets/sass/components/settings/_googlesitekit-settings-module.scss }
}
- .googlesitekit-settings-module__footer {
- border-top: 1px solid $c-utility-divider;
- }
-
.googlesitekit-settings-module__footer-cancel {
margin-left: $grid-gap-desktop;
}
| 2 |
diff --git a/accessibility-checker-engine/help/IBMA_Color_Contrast_WCAG2AA.mdx b/accessibility-checker-engine/help/IBMA_Color_Contrast_WCAG2AA.mdx @@ -24,7 +24,7 @@ When text and its background colors have less than a 4.5 to 1 contrast ratio it
<div id="locLevel" className="level-violation">Violation</div>
-## Text contrast of `<{0}>` with the background is less than the requirement of "{3}"
+## Text contrast of `<{0}>` with its background is less than the WCAG AA minimum requirements for text of size "{1}"px and weight of "{2}"
Color contrast of text with its background must meet WCAG 2.1 AA minimum requirements
[IBM 1.4.3 Contrast (Minimum)](http://www.ibm.com/able/guidelines/ci162/contrast.html) | [WCAG 2.1 technique G18 ](https://www.w3.org/WAI/WCAG21/Techniques/general/G18) | [WCAG 2.1 technique G145 ](https://www.w3.org/WAI/WCAG21/Techniques/general/G145)
@@ -33,7 +33,8 @@ Color contrast of text with its background must meet WCAG 2.1 AA minimum require
## What to do
- * For this "{1}" point text of weight "{2}", adjust the color of the text or its background to give at least a "{3}" contrast ratio.
+ * For large text that is atleast "18" point or atleast "14" point when bold, adjust the color of the text or its background to give at least a "3" contrast ratio;
+ * OR, for body text that is less than "18" point or less than "14" point when bold, adjust the color of the text or its background to give at least a "4.5" contrast ratio.
</Column>
| 2 |
diff --git a/assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/Overview.js b/assets/js/modules/search-console/components/dashboard/SearchFunnelWidget/Overview.js @@ -46,6 +46,8 @@ import { MODULES_SEARCH_CONSOLE } from '../../../datastore/constants';
import { useFeature } from '../../../../../hooks/useFeature';
import CompleteModuleActivationCTA from '../../../../../components/CompleteModuleActivationCTA';
import ActivateModuleCTA from '../../../../../components/ActivateModuleCTA';
+import ActivateAnalyticsCTA from './ActivateAnalyticsCTA';
+import CreateGoalCTA from './CreateGoalCTA';
import CTA from '../../../../../components/notifications/CTA';
import ViewContextContext from '../../../../../components/Root/ViewContextContext';
import DataBlock from '../../../../../components/DataBlock';
@@ -207,9 +209,12 @@ const Overview = ( {
{ ( ! analyticsModuleConnected || ! analyticsModuleActive ) &&
! isNavigatingToReauthURL && (
<Cell { ...halfCellProps }>
- { ! analyticsModuleActive && (
+ { ! analyticsModuleActive &&
+ ( zeroDataStatesEnabled ? (
+ <ActivateAnalyticsCTA />
+ ) : (
<ActivateModuleCTA moduleSlug="analytics" />
- ) }
+ ) ) }
{ analyticsModuleActive &&
! analyticsModuleConnected && (
@@ -264,7 +269,10 @@ const Overview = ( {
<Cell { ...quarterCellProps }>
{ viewContext === VIEW_CONTEXT_DASHBOARD &&
- ! analyticsGoalsData?.items?.length && (
+ ! analyticsGoalsData?.items?.length &&
+ zeroDataStatesEnabled ? (
+ <CreateGoalCTA />
+ ) : (
<CTA
title={ __(
'Use goals to measure success',
| 4 |
diff --git a/src/libs/UnreadIndicatorUpdater/updateUnread/index.website.js b/src/libs/UnreadIndicatorUpdater/updateUnread/index.website.js @@ -10,7 +10,7 @@ import CONFIG from '../../../CONFIG';
*/
function updateUnread(totalCount) {
const hasUnread = totalCount !== 0;
- document.title = hasUnread ? `(NEW!) ${CONFIG.SITE_TITLE}` : CONFIG.SITE_TITLE;
+ document.title = hasUnread ? `(${totalCount}) ${CONFIG.SITE_TITLE}` : CONFIG.SITE_TITLE;
document.getElementById('favicon').href = hasUnread ? CONFIG.FAVICON.UNREAD : CONFIG.FAVICON.DEFAULT;
}
| 14 |
diff --git a/storybook-utilities/icon-utilities/icon-loader.js b/storybook-utilities/icon-utilities/icon-loader.js const request = new XMLHttpRequest();
-request.open('GET', 'https://spark-assets.netlify.app/spark-icons.svg');
+request.open('GET', 'https://spark-assets.netlify.app/spark-icons-v14.svg');
request.send();
// eslint-disable-next-line func-names
request.onload = function () {
| 3 |
diff --git a/src/core/Core.js b/src/core/Core.js @@ -886,6 +886,7 @@ class Uppy {
* @param {object} instance The plugin instance to remove.
*/
removePlugin (instance) {
+ this.log(`Removing plugin ${instance.id}`)
this.emit('plugin-remove', instance)
if (instance.uninstall) {
@@ -908,6 +909,8 @@ class Uppy {
* Uninstall all plugins and close down this Uppy instance.
*/
close () {
+ this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`)
+
this.reset()
this._storeUnsubscribe()
| 0 |
diff --git a/src/plots/gl3d/scene.js b/src/plots/gl3d/scene.js @@ -457,7 +457,7 @@ proto.render = function() {
this.oldEventData = eventData;
} else {
Fx.loneUnhover(svgContainer);
- gd.emit('plotly_unhover', this.oldEventData);
+ if(this.oldEventData) gd.emit('plotly_unhover', this.oldEventData);
this.oldEventData = undefined;
}
| 3 |
diff --git a/userscript.user.js b/userscript.user.js @@ -12251,7 +12251,7 @@ var $$IMU_EXPORT$$;
};
var get_meta = function(text, property) {
- var regex = new RegExp("<meta\\s+(?:(?:property|name)=[\"']" + property + "[\"']\\s+content=[\"']([^'\"]+)[\"']|content=[\"']([^'\"]+)[\"']\\s+(?:property|name)=[\"']" + property + "[\"'])\\s*\/?>");
+ var regex = new RegExp("<meta\\s+(?:(?:property|name)=[\"']" + property + "[\"']\\s+(?:content|value)=[\"']([^'\"]+)[\"']|(?:content|value)=[\"']([^'\"]+)[\"']\\s+(?:property|name)=[\"']" + property + "[\"'])\\s*\/?>");
var match = text.match(regex);
if (!match)
return null;
@@ -70010,6 +70010,35 @@ var $$IMU_EXPORT$$;
}
}
+ if (domain_nowww === "twitpic.com") {
+ // https://twitpic.com/96mhds
+ newsrc = website_query({
+ website_regex: /^[a-z]+:\/\/[^/]+\/+([0-9a-z]+)(?:[?#].*)?$/,
+ query_for_id: "https://twitpic.com/${id}",
+ process: function(done, resp, cache_key) {
+ var url = get_meta(resp.responseText, "twitter:image");
+ if (!url) {
+ console_error(cache_key, "Unable to find url for", resp);
+ }
+
+ var obj = {
+ url: url,
+ extra: {
+ page: resp.finalUrl
+ }
+ };
+
+ var title = get_meta(resp.responseText, "twitter:title");
+ if (title) {
+ obj.extra.caption = title;
+ }
+
+ return done(obj, 60*60);
+ }
+ });
+ if (newsrc) return newsrc;
+ }
+
if (domain === "dn3pm25xmtlyu.cloudfront.net") {
// https://dn3pm25xmtlyu.cloudfront.net/photos/thumb/555322240.gif?1333773919&Expires=1480264803&Signature=FfWz5yprJzJPkKnGj1PniS28A3cEc6CPohd8u2xWu013k71zXIczP~lXauNR7QbU583vN1VLGOw1y3vCjlIm~nsibhW-~FeJtQYxXnAGQz8eCm3B95s0yOp6wczpQbAS43bgiirrro8zct9K37Xsvuljl6P8fyTs4fk6GeaCLkw_&Key-Pair-Id=APKAIYVGSUJFNRFZBBTA
match = src.match(/\/photos\/+[a-z]+\/+([0-9]+)\./);
@@ -70025,49 +70054,10 @@ var $$IMU_EXPORT$$;
extra: { page: get_twitpic_page_from_id(id) },
};
- var query_twitpic = function(id, cb) {
- var cache_key = "twitpic:" + id;
-
- api_cache.fetch(cache_key, cb, function(done) {
- options.do_request({
- url: get_twitpic_page_from_id(id),
- method: "GET",
- onload: function(result) {
- if (result.readyState !== 4)
- return;
-
- if (result.status !== 200) {
- console_error(e);
- return done(null, false);
- }
-
- var match = result.responseText.match(/<meta\s+name="twitter:image"\s+value="(https:\/\/dn3pm25xmtlyu\.[^"']+)"\s*\/>/);
- if (!match) {
- console_error("Unable to find match", result);
- return done(null, false);
- }
-
- return done(decode_entities(match[1]), 60*60);
- }
- });
- });
- };
-
- if (options && options.cb && options.do_request) {
- query_twitpic(id, function(url) {
- if (url) {
- obj.url = url;
- }
-
- return options.cb(obj);
- });
-
- return {
- waiting: true
- };
- }
-
- return obj;
+ return [{
+ url: obj.extra.page,
+ is_pagelink: true
+ }, obj];
}
}
| 7 |
diff --git a/app/main.js b/app/main.js @@ -36,12 +36,7 @@ const userWarningExportWalletEncrypted = "You are going to export an ENCRYPTED w
// Uncomment if you want to run in production
// Show/Hide Development menu
-process.env.NODE_ENV = "production";
-
-// Wait function to avoid api rate-limiting
-function sleep(millis) {
- return new Promise(resolve => setTimeout(resolve, millis));
-}
+// process.env.NODE_ENV = "production";
function attachUpdaterHandlers() {
function onUpdateDownloaded() {
@@ -611,13 +606,11 @@ function importOnePK(pk, name = "", isT = true) {
async function apiGet(url) {
const resp = await axiosApi(url);
- await sleep(1000);
return resp.data;
}
async function apiPost(url, form) {
const resp = await axiosApi.post(url, querystring.stringify(form));
- await sleep(1000);
return resp.data;
}
| 13 |
diff --git a/fixed-price-subscriptions/server/node/server.js b/fixed-price-subscriptions/server/node/server.js @@ -4,6 +4,47 @@ const { resolve } = require('path');
const bodyParser = require('body-parser');
// Replace if using a different env file or config
require('dotenv').config({ path: './.env' });
+
+if (
+ !process.env.STRIPE_SECRET_KEY ||
+ !process.env.STRIPE_PUBLISHABLE_KEY ||
+ !process.env.BASIC ||
+ !process.env.PREMIUM ||
+ !process.env.STATIC_DIR
+) {
+ console.log(
+ 'The .env file is not configured. Follow the instructions in the readme to configure the .env file. https://github.com/stripe-samples/subscription-use-cases'
+ );
+ console.log('');
+ process.env.STRIPE_SECRET_KEY
+ ? ''
+ : console.log('Add STRIPE_SECRET_KEY to your .env file.');
+
+ process.env.STRIPE_PUBLISHABLE_KEY
+ ? ''
+ : console.log('Add STRIPE_PUBLISHABLE_KEY to your .env file.');
+
+ process.env.BASIC
+ ? ''
+ : console.log(
+ 'Add BASIC priceID to your .env file. See repo readme for setup instructions.'
+ );
+
+ process.env.STRIPE_SECRET_KEY
+ ? ''
+ : console.log(
+ 'Add PREMIUM priceID to your .env file. See repo readme for setup instructions.'
+ );
+
+ process.env.STATIC_DIR
+ ? ''
+ : console.log(
+ 'Add STATIC_DIR to your .env file. Check .env.example in the root folder for an example'
+ );
+
+ process.exit();
+}
+
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
app.use(express.static(process.env.STATIC_DIR));
| 0 |
diff --git a/assets/js/components/setup/setup-proxy.js b/assets/js/components/setup/setup-proxy.js @@ -77,7 +77,6 @@ function SetupUsingProxy() {
let title;
let description;
- const startSetupText = __( 'Sign in with Google', 'google-site-kit' );
if ( 'revoked' === getQueryArg( location.href, 'googlesitekit_context' ) ) {
title = sprintf(
@@ -175,7 +174,7 @@ function SetupUsingProxy() {
onClick={ onButtonClick }
disabled={ ! complete }
>
- { startSetupText }
+ { __( 'Sign in with Google', 'google-site-kit' ) }
</Button>
{ inProgressFeedback }
{ ! isSecondAdmin && isResettable && <ResetButton /> }
| 2 |
diff --git a/src/intrinsics/Promise.mjs b/src/intrinsics/Promise.mjs @@ -26,6 +26,7 @@ import {
PromiseResolve,
PromiseCapabilityRecord,
SetFunctionLength,
+ SetFunctionName,
} from '../abstract-ops/all.mjs';
import {
Q, X,
@@ -194,7 +195,7 @@ function Promise_reject([r], { thisValue }) {
if (Type(C) !== 'Object') {
return surroundingAgent.Throw('TypeError', 'Promise.reject called on non-object');
}
- const promiseCapability = NewPromiseCapability(C);
+ const promiseCapability = Q(NewPromiseCapability(C));
Q(Call(promiseCapability.Reject, Value.undefined, [r]));
return promiseCapability.Promise;
}
@@ -219,12 +220,17 @@ export function CreatePromise(realmRec) {
['resolve', Promise_resolve, 1],
]);
+ {
+ const fn = CreateBuiltinFunction(Promise_symbolSpecies, [], realmRec);
+ X(SetFunctionName(fn, wellKnownSymbols.species, new Value('get')));
+ X(SetFunctionLength(fn, new Value(0)));
promiseConstructor.DefineOwnProperty(wellKnownSymbols.species, Descriptor({
- Get: CreateBuiltinFunction(Promise_symbolSpecies, [], realmRec),
+ Get: fn,
Set: Value.undefined,
Enumerable: Value.false,
Configurable: Value.true,
}));
+ }
promiseConstructor.DefineOwnProperty(new Value('prototype'), Descriptor({
Writable: Value.false,
| 1 |
diff --git a/lib/resque/user_jobs.rb b/lib/resque/user_jobs.rb @@ -67,8 +67,8 @@ module Resque
@queue = :users
def self.perform(options = {})
- run_action(options, @queue, lambda { |options|
- options.symbolize_keys[:urls].each { |url| delete(url, options.symbolize_keys[:request_params]) }
+ run_action(options, @queue, lambda { |job_options|
+ job_options.symbolize_keys[:urls].each { |url| delete(url, job_options.symbolize_keys[:request_params]) }
})
end
| 1 |
diff --git a/README.md b/README.md @@ -218,6 +218,8 @@ Once the app finishes loading, an interactive tutorial takes you by the hand and
# Docker Deployments
+Docker container images can be found at https://github.com/users/Superalgos/packages/container/package/superalgos
+
If you wish to run Superalgos over docker platform, follow these steps.
## 1. Install Docker
@@ -226,6 +228,8 @@ Follow the link to [install docker](https://docs.docker.com/engine/install/).
## 2. Run
+You will need to create local storage directories beforehand, by example with `mkdir Data-Storage Log-Files My-Workspaces`
+
```
docker run \
-d \
@@ -233,11 +237,16 @@ docker run \
--name superalgos \
-p 18041:18041 \
-p 34248:34248 \
+ -v $(pwd)/Data-Storage:/app/Data-Storage \
+ -v $(pwd)/Log-Files:/app/Log-Files \
+ -v $(pwd)/My-Workspaces:/app/My-Workspaces \
ghcr.io/superalgos/superalgos:latest
```
Now you can access to the Superalgos UI at http://127.0.0.1:34248
+To see console logs you can use `docker logs superalgos -f`
+
When you're done just exec `docker kill superalgos`
**Note:** This has not been extensively tested yet. If you run into troubles, please contact us at the [Superalgos Support Group](https://t.me/superalgossupport).
| 7 |
diff --git a/approved.yaml b/approved.yaml @@ -208,7 +208,7 @@ itsatrapthemepathfinder:
falloutterminal:
- "FalloutTerminal"
-- "System Toolbox"
+ - "Utility"
chatsetattr:
- "ChatSetAttr"
@@ -309,7 +309,7 @@ healthcolors:
truepagecopy:
- "TruePageCopy"
-- "Character"
+- "Maps & Drawing"
- "hidden"
srrollextender:
@@ -382,7 +382,7 @@ onerollengine:
changetokenimage:
- "ChangeTokenImage"
-- "Utility"
+- "Tokens"
5ebattlemaster:
- "5EBattleMaster"
@@ -490,7 +490,7 @@ inspirationtrack:
syncpage:
- SyncPage
-- Utility
+- "Maps & Drawing"
combattracker:
- CombatTracker
@@ -498,11 +498,11 @@ combattracker:
movelighting:
- moveLighting
-- Utility
+- "Dynamic Lighting"
elevation:
- Elevation
-- Utility
+ - "Dynamic Lighting"
hero6playable:
- HeroSystem6e
@@ -510,7 +510,7 @@ hero6playable:
publicsheet:
- PublicSheet
-- Utility
+- "Character"
gmsheet:
- GMSheet
@@ -590,7 +590,7 @@ charsheetutils:
healthstatus:
- "Health Status"
- - "Utility"
+ - "Tokens"
difficultyrating:
- "DifficultyRating"
@@ -610,7 +610,7 @@ handsup:
gmaura:
- "GMAura"
- - Utility
+ - "Tokens"
savageworldsraiseroller:
- 'Savage Worlds Raise Roller'
@@ -622,7 +622,7 @@ knightstylesmarkers:
emas:
- 'Emas'
- - System Toolbox
+ - 'Chat'
pcpp:
- 'PCPP'
@@ -650,7 +650,7 @@ talesfromtheloopdierolelr:
flight:
- 'Flight'
- - 'Utility'
+ - "Tokens"
shadowofdemonlord:
- 'Shadow of the Demon Lord'
@@ -662,11 +662,11 @@ myz:
doorknocker:
- 'Door Knocker'
- - 'Utility'
+ - "Dynamic Lighting"
randomrotate:
- 'RandomRotate'
- - 'Utility'
+ - "Tokens"
dealer:
- 'Dealer'
@@ -674,11 +674,11 @@ dealer:
facing:
- 'Facing'
- - 'Utility'
+ - "Tokens"
wilddice:
- 'WildDice'
- - 'Utility'
+ - "System Toolbox"
aligmenttracker:
- 'AlignmentTracker'
@@ -686,7 +686,7 @@ aligmenttracker:
modifytokenimage:
- ModifyTokenImage
- - 'Utility'
+ - "Tokens"
apiheartbeat:
- 'APIHeartBeat'
@@ -694,19 +694,19 @@ apiheartbeat:
fliptoken:
- 'Flip Tokens'
- - 'Utility'
+ - "Tokens"
coloremote:
- 'ColorEmote'
- - 'Utility'
+ - 'Chat'
colorenote:
- 'ColorNote'
- - 'Utility'
+ - 'Chat'
sharevision:
- 'ShareVision'
- - 'Utility'
+ - "Dynamic Lighting"
peekcard:
- 'PeekCard'
@@ -714,7 +714,7 @@ peekcard:
markingconditions:
- 'Marking Conditions'
- - System Toolbox
+ - "Tokens"
imperialcalendar:
- 'ImperialCalendar'
@@ -734,7 +734,7 @@ base64:
dryerase:
- "DryErase"
- - "Utility"
+ - "Maps & Drawing"
maplock:
- "MapLock"
@@ -758,7 +758,7 @@ tableexport:
tokencondition:
- "TokenCondition"
- - "Utility"
+ - "Tokens"
libtokenmrkers:
- "libTokenMarkers"
@@ -806,7 +806,7 @@ savageworldsstatuschanger:
midgardturntrackerhelper:
- "MidgardTurnTrackerHelper"
- - "Utility"
+ - "System Toolbox"
shortrest:
- "ShortRest"
@@ -814,7 +814,7 @@ shortrest:
tokenmarker:
- "TokenMarker"
- - "Utility"
+ - "Tokens"
heroroller:
- "HeroRoller"
@@ -826,7 +826,7 @@ universalvttimport:
udlwindows:
- "UDLWindows"
- - "Utility"
+ - "Dynamic Lighting"
supernotes:
- "Supernotes"
@@ -834,7 +834,7 @@ supernotes:
changemapclonetokens:
- "ChangeMap_CloneTokens"
- - "Utility"
+ - "Maps & Drawing"
restandrecovery:
- "Rest-and-Recovery"
@@ -842,7 +842,7 @@ restandrecovery:
tokenactionmarker:
- "Token-Action-Maker"
- - "Utility"
+ - "Tokens"
5erestinstyle:
- "5E Resting in Style"
@@ -850,11 +850,11 @@ tokenactionmarker:
huntersmark:
- "HuntersMark"
- - "Utility"
+ - "Tokens"
spintokens:
- "SpinTokens"
- - "Utility"
+ - "Tokens"
agonecleanolds:
- "AgoneCleanOlds"
@@ -866,7 +866,7 @@ deltagreenrpgcompanion:
dynamiclightrecorder:
- "DynamicLightRecorder"
- - "Utility"
+ - "Dynamic Lighting"
gofish:
- "GoFish!"
@@ -886,7 +886,7 @@ fotncompanion:
hiddenrollmessages:
- "HiddenRollMessages"
- - "Utility"
+ - "Chat"
dkrystal:
- "KrystalDice"
@@ -898,7 +898,7 @@ paladinaura:
dldarkness:
- "DL Darkness"
- - "Utility"
+ - "Dynamic Lighting"
dsacritchecker:
- "DSA4_1-CritChecker"
@@ -922,7 +922,7 @@ rolltablehandouts:
dealinit:
- "Deal-Init"
- - "System Tooolbox"
+ - "System Toolbox"
teleport:
- "Teleport"
| 3 |
diff --git a/src/scripts/renderer/webview/listeners.js b/src/scripts/renderer/webview/listeners.js @@ -35,9 +35,8 @@ function createBadgeDataUrl (text) {
// Log console messages
webView.addEventListener('console-message', function (event) {
const msg = event.message.replace(/%c/g, '');
- const fwNormal = 'font-weight: normal;';
- const fwBold = 'font-weight: bold;';
- console.log('WV: ' + msg, fwBold, fwNormal);
+ console.log('WV: ' + msg);
+ log('WV:', msg);
});
// Listen for title changes to update the badge
| 7 |
diff --git a/bin/templates/cordova/lib/pluginHandlers.js b/bin/templates/cordova/lib/pluginHandlers.js @@ -30,8 +30,19 @@ var handlers = {
var dest = path.join(obj.targetDir, path.basename(obj.src));
+ // TODO: This code needs to be replaced, since the core plugins need to be re-mapped to a different location in
+ // a later plugins release. This is for legacy plugins to work with Cordova.
+
if (options && options.android_studio === true) {
+ // If a Java file is using the new directory structure, don't penalize it
+ if (!obj.targetDir.includes('app/src/main')) {
+ if (obj.src.endsWith('.java')) {
dest = path.join('app/src/main/java', obj.targetDir.substring(4), path.basename(obj.src));
+ } else if (obj.src.endsWith('.xml')) {
+ // We are making a huge assumption here that XML files will be going to res/xml or values/xml
+ dest = path.join('app/src/main', obj.targetDir, path.basename(obj.src));
+ }
+ }
}
if (options && options.force) {
| 1 |
diff --git a/includes/Core/Authentication/Authentication.php b/includes/Core/Authentication/Authentication.php @@ -197,28 +197,6 @@ final class Authentication {
}
);
- // TODO: Remove this after testing.
- add_action(
- 'admin_notices',
- function() {
- if ( ! $this->get_oauth_client()->using_proxy() ) {
- return;
- }
- $setup_url = $this->get_oauth_client()->get_proxy_setup_url();
- $permissions_url = $this->get_oauth_client()->get_proxy_permissions_url();
- ?>
- <div class="notice notice-info">
- <p>
- <strong>TEMPORARY:</strong>
- <a href="<?php echo esc_url( $setup_url ); ?>"><?php esc_html_e( 'Go to proxy setup', 'google-site-kit' ); ?></a>
- or
- <a href="<?php echo esc_url( $permissions_url ); ?>"><?php esc_html_e( 'Manage proxy sites', 'google-site-kit' ); ?></a>
- </p>
- </div>
- <?php
- }
- );
-
add_action(
'wp_login',
function() {
| 2 |
diff --git a/app/views/shared/_google_tag_manager.html.erb b/app/views/shared/_google_tag_manager.html.erb <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
-'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '>m_auth=Ls3Afsp76EFiMNy2zJxOJA>m_preview=env-5>m_cookies_win=x';f.parentNode.insertBefore(j,f);
+'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','<%= container_id %>');</script>
<!-- End Google Tag Manager -->
| 2 |
diff --git a/src/components/WizardInline/WizardFooter/WizardFooter.jsx b/src/components/WizardInline/WizardFooter/WizardFooter.jsx @@ -37,6 +37,7 @@ const WizardFooter = ({
onNext,
onBack,
onSubmit,
+ className,
onCancel,
cancelLabel,
backLabel,
@@ -52,7 +53,7 @@ const WizardFooter = ({
{footerLeftContent && (
<div className="WizardInline-custom-footer-content">{footerLeftContent}</div>
)}
- <StyledFooterButtons>
+ <StyledFooterButtons className={className}>
{!hasPrev ? (
<Button onClick={onCancel} kind="secondary">
{cancelLabel}
| 1 |
diff --git a/scripts/publish.sh b/scripts/publish.sh @@ -6,14 +6,6 @@ set -e
# beta or prod
MODE=$1
-# Check permission
-ACCOUNT=`npm whoami`
-
-if [[ $ACCOUNT != 'deck.gl' ]]; then
- echo "Must sign in to deck.gl account to publish"
- exit 1
-fi
-
case $MODE in
"beta")
# npm-tag argument: npm publish --tag <beta>
| 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.