code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/commands/utility/AvatarCommand.js b/src/commands/utility/AvatarCommand.js @@ -20,6 +20,10 @@ export default class AvatarCommand extends Command {
return true;
}
+ isAvailableInDMs() {
+ return true;
+ }
+
buildOptions(builder) {
builder
.addUserOption(option =>
@@ -53,7 +57,7 @@ export default class AvatarCommand extends Command {
const user = interaction.options.getUser('user') ?? interaction.user;
let url = user.displayAvatarURL(IMAGE_OPTIONS);
- if (interaction.options.getBoolean('use-server-profile') ?? true) {
+ if (interaction.guild && (interaction.options.getBoolean('use-server-profile') ?? true)) {
const member = await (new MemberWrapper(user, new GuildWrapper(interaction.guild))).fetchMember();
if (member) {
url = member.displayAvatarURL(IMAGE_OPTIONS);
| 11 |
diff --git a/io-manager.js b/io-manager.js @@ -594,6 +594,11 @@ ioManager.bindInput = () => {
}
break;
}
+ case 27: {
+ // if (weaponsManager.getMouseSelectedObject()) {
+ weaponsManager.setMouseSelectedObject(null);
+ // }
+ }
}
});
const _updateMouseMovement = e => {
| 0 |
diff --git a/SearchbarNavImprovements.user.js b/SearchbarNavImprovements.user.js // @description Site search selector on meta sites. Add advanced search helper when search box is focused. Adds link to meta in left sidebar, and link to main from meta.
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 2.4
+// @version 2.5
//
// @include https://*stackoverflow.com/*
// @include https://*serverfault.com/*
<label class="section-label"># Answers</label>
<div class="fromto">
<label for="answers-from">from:</label>
- <input type="number" name="answers-from" id="answers-from" placeholder="any" data-range-to="answers-to" data-prefix="answers:" data-checks="#type-a" />
+ <input type="number" name="answers-from" id="answers-from" placeholder="any" data-range-to="answers-to" data-prefix="answers:" data-checks="#type-q" />
<label for="answers-to">to:</label>
- <input type="number" name="answers-to" id="answers-to" placeholder="any" data-checks="#type-a" />
+ <input type="number" name="answers-to" id="answers-to" placeholder="any" data-checks="#type-q" />
</div>
</div>
<div id="tab-answers" class="fixed-width-radios">
$('ol.nav-links ol.nav-links', lsidebar).first().append(`<li><a id="nav-meta" href="${metaUrl}/questions" class="nav-links--link">Meta</a></li>`);
}
- // If on a question page
- if(location.pathname.indexOf('/questions/') === 0) {
- const qid = $('#question').attr('data-questionid');
- if(qid) searchfield.val(`inquestion:${qid} `);
- }
-
initAdvancedSearch();
}
| 2 |
diff --git a/server/game/cards/01 - Core/GoldenPlainsOutpost.js b/server/game/cards/01 - Core/GoldenPlainsOutpost.js @@ -12,7 +12,8 @@ class GoldenPlainsOutpost extends StrongholdCard {
return (card.hasTrait('cavalry') &&
card.controller === this.controller &&
!this.game.currentConflict.isParticipating(card) &&
- card.allowGameAction('moveToConflict'));
+ card.allowGameAction('moveToConflict')) &&
+ card.location === 'play area';
}
},
handler: context => {
| 1 |
diff --git a/src/encoded/types/antibody_lot.py b/src/encoded/types/antibody_lot.py @@ -164,12 +164,14 @@ def lot_reviews(characterizations, targets, request):
# The default if no characterizations have been submitted
base_review = {
- 'biosample_term_name': 'any cell type and tissues',
+ 'biosample_term_name': 'any cell type or tissue',
'biosample_term_id': 'NTR:99999999',
'organisms': sorted(target_organisms['all']),
'targets': sorted(targets),
- 'status': 'characterized to standards with exemption' if is_control else 'awaiting characterization',
- 'detail': 'IgG does not require further characterization.' if is_control else 'No characterizations submitted for this antibody lot yet.'
+ 'status': 'characterized to standards with exemption'
+ if is_control else ab_states[(None, None)],
+ 'detail': 'IgG does not require further characterization.'
+ if is_control else ab_state_details[(None, None)]
}
if not characterizations:
@@ -206,7 +208,6 @@ def lot_reviews(characterizations, targets, request):
for characterization_path in characterizations:
characterization = request.embed(characterization_path, '@@object')
target = request.embed(characterization['target'], '@@object')
- organism = request.embed(target['organism'], '@@object')
# instead of adding to the target_organism list with whatever they put in the
# characterization we need to instead compare the lane organism to see if it's in the
@@ -214,7 +215,7 @@ def lot_reviews(characterizations, targets, request):
# organism not in the antibody_lot.targets list so it'll have to be reviewed and
# added if legitimate.
review_targets.add(target['@id'])
- char_organisms[characterization['@id']] = organism['@id']
+ char_organisms[characterization['@id']] = target['organism']
# Split into primary and secondary to treat separately
if 'primary_characterization_method' in characterization:
primary_chars.append(characterization)
@@ -237,6 +238,9 @@ def lot_reviews(characterizations, targets, request):
# The default if no primary characterizations have been submitted
base_review['status'] = ab_states[(None, secondary_status)]
base_review['detail'] = ab_state_details[(None, secondary_status)]
+ if base_review['status'] == 'not pursued':
+ base_review['biosample_term_name'] = 'at least one cell type or tissue'
+ base_review['biosample_term_id'] = 'NTR:00000000'
return [base_review]
# Done with easy cases, the remaining require reviews.
@@ -268,13 +272,15 @@ def build_lot_reviews(primary_chars,
'biosample_term_name': 'at least one cell type or tissue',
'biosample_term_id': 'NTR:00000000',
'organisms': [char_organisms[primary['@id']]],
- 'targets': [primary['target']],
- 'status': 'awaiting characterization',
- 'detail': 'No characterizations submitted for this antibody lot yet.'
+ 'targets': [primary['target']]
}
if not primary.get('characterization_reviews', []):
base_review['status'] = ab_states[(primary['status'], secondary_status)]
base_review['detail'] = ab_state_details[(primary['status'], secondary_status)]
+ if base_review['status'] == 'partially characterized':
+ base_review['biosample_term_name'] = 'any cell type or tissue'
+ base_review['biosample_term_id'] = 'NTR:99999999'
+
# Don't need to rank and unique the primaries with unknown cell types, we can't
# know if they're distinct or not anyway without characterization reviews.
char_reviews[(base_review['biosample_term_name'],
@@ -290,7 +296,7 @@ def build_lot_reviews(primary_chars,
base_review = dict()
lane_organism = lane_review['organism']
- base_review['biosample_term_name'] = 'any cell type and tissues' \
+ base_review['biosample_term_name'] = 'any cell type or tissue' \
if is_histone_mod else lane_review['biosample_term_name']
base_review['biosample_term_id'] = 'NTR:99999999' \
if is_histone_mod else lane_review['biosample_term_id']
| 2 |
diff --git a/assets/js/modules/tagmanager/datastore/containers.js b/assets/js/modules/tagmanager/datastore/containers.js @@ -52,15 +52,11 @@ const fetchGetContainersStore = createFetchStore( {
);
},
controlCallback: ( { accountID } ) => {
- // Always request both contexts to prevent filtering on server.
- // TODO: Remove `usageContext` param when legacy component is removed and datapoint
- // defaults to returning all containers if no context is provided.
- const usageContext = [ CONTEXT_WEB, CONTEXT_AMP ];
return API.get(
'modules',
'tagmanager',
'containers',
- { accountID, usageContext },
+ { accountID },
{ useCache: false }
);
},
| 2 |
diff --git a/grocy.openapi.json b/grocy.openapi.json "next_execution_assigned_to_user_id": {
"type": "integer"
},
+ "start_date": {
+ "type": "string",
+ "format": "date-time"
+ },
"row_created_timestamp": {
"type": "string",
"format": "date-time"
| 0 |
diff --git a/edit.js b/edit.js @@ -336,39 +336,6 @@ scene.add(floorMesh); */
const floorPhysicsId = physicsManager.addBoxGeometry(new THREE.Vector3(0, -1, 0), new THREE.Quaternion(), new THREE.Vector3(100, 1, 100), false);
- {
- const u = 'https://avaer.github.io/home/home.glb';
- const res = await fetch(u);
- const file = await res.blob();
- file.name = u;
- let mesh = await runtime.loadFile(file, {
- optimize: false,
- });
- mesh.updateMatrixWorld();
- mesh = mesh.children[0];
- mesh.frustumCulled = false;
- {
- const {geometry} = mesh;
- const matrix = mesh.matrixWorld.clone().premultiply(new THREE.Matrix4().makeScale(0.5, 0.5, 0.5));
- const positions = new Float32Array(geometry.attributes.position.count * 3);
- for (let i = 0, j = 0; i < positions.length; i += 3, j += geometry.attributes.position.data.stride) {
- localVector
- .fromArray(geometry.attributes.position.data.array, j)
- .applyMatrix4(matrix)
- .toArray(positions, i);
- }
- geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
- }
- mesh.position.set(0, 0, 0);
- mesh.quaternion.set(0, 0, 0, 1);
- mesh.scale.set(1, 1, 1);
- // mesh.geometry.applyMatrix4(new THREE.Matrix4().makeScale(0.5, 0.5, 0.5));
- console.log('loaded file', mesh);
- scene.add(mesh);
-
- physicsManager.addGeometry(mesh);
- }
-
{
const mesh = await runtime.loadFile({
name: 'home.scn',
| 2 |
diff --git a/src/renderer/marketplace/incorporation/detail/index.jsx b/src/renderer/marketplace/incorporation/detail/index.jsx @@ -228,7 +228,7 @@ class IncorporationsDetailView extends Component {
if (!this.props.rp) return false;
const { applications } = this.props.rp;
- if (applications.length === 0) return false;
+ if (!applications || applications.length === 0) return false;
let application;
let index = applications.length - 1;
| 1 |
diff --git a/docs/source/index.blade.php b/docs/source/index.blade.php @extends('_layouts.master')
@section('body')
+
<div class="flex flex-col">
<div class="min-h-screen bg-pattern bg-center bg-smoke-light border-t-6 border-tailwind-teal flex items-center justify-center leading-tight p-6 pb-16">
<div>
<svg class="mx-auto block h-24 mb-3" viewBox="0 0 90 90" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><circle id="b" cx="40" cy="40" r="40"/><filter x="-8.8%" y="-6.2%" width="117.5%" height="117.5%" filterUnits="objectBoundingBox" id="a"><feOffset dy="2" in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" in="shadowBlurOuter1"/></filter><linearGradient x1="0%" y1="0%" y2="100%" id="c"><stop stop-color="#2383AE" offset="0%"/><stop stop-color="#6DD7B9" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><g transform="translate(5 5)"><use fill="#000" filter="url(#a)" xlink:href="#b"/><use fill="#FFF" xlink:href="#b"/></g><path d="M25.6 33.92C27.52 26.24 32.32 22.4 40 22.4c11.52 0 12.96 8.64 18.72 10.08 3.84.96 7.2-.48 10.08-4.32-1.92 7.68-6.72 11.52-14.4 11.52-11.52 0-12.96-8.64-18.72-10.08-3.84-.96-7.2.48-10.08 4.32zM11.2 51.2c1.92-7.68 6.72-11.52 14.4-11.52 11.52 0 12.96 8.64 18.72 10.08 3.84.96 7.2-.48 10.08-4.32-1.92 7.68-6.72 11.52-14.4 11.52-11.52 0-12.96-8.64-18.72-10.08-3.84-.96-7.2.48-10.08 4.32z" fill="url(#c)" transform="translate(5 5)"/></g></svg>
<h1 class="text-center font-semibold text-3xl tracking-tight">Tailwind <span class="tracking-tight">CSS</span></h1>
</div>
- <h2 class="mt-12 font-light text-4xl text-center">A Utility-First CSS Framework<br class="hidden sm:inline-block"> for Rapid UI Development</h2>
- <div class="mt-12 flex justify-center leading-none">
- <a class="rounded-full font-semibold block px-12 py-3 border-2 border-tailwind-teal bg-tailwind-teal text-white hover:border-tailwind-teal-light hover:bg-tailwind-teal-light hover:bg-tailwind-teal-light" href="/docs/what-is-tailwind">Get Started</a>
- <a class="rounded-full font-semibold block px-12 py-3 ml-4 border-2 border-tailwind-teal text-tailwind-teal hover:text-white hover:border-tailwind-teal-light hover:bg-tailwind-teal-light hover:bg-tailwind-teal-light" href="https://github.com/tailwindcss/tailwindcss">GitHub</a>
+ <h2 class="mt-12 font-light text-3xl sm:text-4xl text-center">A Utility-First CSS Framework<br class="hidden sm:inline-block"> for Rapid UI Development</h2>
+ <div class="mt-12 sm:flex sm:justify-center">
+ <a class="mt-6 sm:mt-0 mx-auto sm:mx-2 max-w-xs rounded-full text-center leading-none font-semibold block px-12 py-3 border-2 border-tailwind-teal bg-tailwind-teal text-white hover:border-tailwind-teal-light hover:bg-tailwind-teal-light hover:bg-tailwind-teal-light" href="/docs/what-is-tailwind">Get Started</a>
+ <a class="mt-6 sm:mt-0 mx-auto sm:mx-2 max-w-xs rounded-full text-center leading-none font-semibold block px-12 py-3 border-2 border-tailwind-teal text-tailwind-teal hover:text-white hover:border-tailwind-teal-light hover:bg-tailwind-teal-light hover:bg-tailwind-teal-light" href="https://github.com/tailwindcss/tailwindcss">GitHub</a>
</div>
</div>
</div>
</div>
</div>
- <div class="mt-10 mb-16 mx-auto flex justify-center text-grey-darker">
- <div>Version 0.1.0 - Alpha</div>
- <a class="block ml-6 sm:ml-12 flex items-center hover:text-orange" href="https://github.com/tailwindcss/tailwindcss">
+ <div class="mt-10 mb-16 mx-auto flex flex-wrap justify-center text-grey-darker">
+ <div class="w-full mb-8 sm:m-0 sm:w-auto text-center">Version 0.1.0 - Alpha</div>
+ <a class="block sm:ml-12 flex items-center hover:text-orange" href="https://github.com/tailwindcss/tailwindcss">
<svg class="w-5 h-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 0a10 10 0 0 0-3.16 19.49c.5.1.68-.22.68-.48l-.01-1.7c-2.78.6-3.37-1.34-3.37-1.34-.46-1.16-1.11-1.47-1.11-1.47-.9-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.9 1.52 2.34 1.08 2.91.83.1-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.94 0-1.1.39-1.99 1.03-2.69a3.6 3.6 0 0 1 .1-2.64s.84-.27 2.75 1.02a9.58 9.58 0 0 1 5 0c1.91-1.3 2.75-1.02 2.75-1.02.55 1.37.2 2.4.1 2.64.64.7 1.03 1.6 1.03 2.69 0 3.84-2.34 4.68-4.57 4.93.36.31.68.92.68 1.85l-.01 2.75c0 .26.18.58.69.48A10 10 0 0 0 10 0"/></svg>
<span class="ml-2">GitHub</span>
</a>
</a>
</div>
</div>
+
@endsection
| 7 |
diff --git a/test/jasmine/tests/range_slider_test.js b/test/jasmine/tests/range_slider_test.js @@ -516,12 +516,24 @@ describe('the range slider', function() {
describe('in general', function() {
+ beforeAll(function() {
+ jasmine.addMatchers(customMatchers);
+ });
+
beforeEach(function() {
gd = createGraphDiv();
});
afterEach(destroyGraphDiv);
+ function assertRange(axRange, rsRange) {
+ // lower toBeCloseToArray precision for FF38 on CI
+ var precision = 1e-2;
+
+ expect(gd.layout.xaxis.range).toBeCloseToArray(axRange, precision);
+ expect(gd.layout.xaxis.rangeslider.range).toBeCloseToArray(rsRange, precision);
+ }
+
it('should plot when only x data is provided', function(done) {
Plotly.plot(gd, [{ x: [1, 2, 3] }], { xaxis: { rangeslider: {} }})
.then(function() {
@@ -541,6 +553,80 @@ describe('the range slider', function() {
})
.then(done);
});
+
+ it('should expand its range in accordance with new data arrays', function(done) {
+ Plotly.plot(gd, [{
+ y: [2, 1, 2]
+ }], {
+ xaxis: { rangeslider: {} }
+ })
+ .then(function() {
+ assertRange([-0.13, 2.13], [-0.13, 2.13]);
+
+ return Plotly.restyle(gd, 'y', [[2, 1, 2, 1]]);
+ })
+ .then(function() {
+ assertRange([-0.19, 3.19], [-0.19, 3.19]);
+
+ return Plotly.extendTraces(gd, { y: [[2, 1]] }, [0]);
+ })
+ .then(function() {
+ assertRange([-0.32, 5.32], [-0.32, 5.32]);
+
+ return Plotly.addTraces(gd, { x: [0, 10], y: [2, 1] });
+ })
+ .then(function() {
+ assertRange([-0.68, 10.68], [-0.68, 10.68]);
+
+ return Plotly.deleteTraces(gd, [1]);
+ })
+ .then(function() {
+ assertRange([-0.31, 5.31], [-0.31, 5.31]);
+ })
+ .then(done);
+ });
+
+ it('should not expand its range when range slider range is set', function(done) {
+ Plotly.plot(gd, [{
+ y: [2, 1, 2]
+ }], {
+ xaxis: { rangeslider: { range: [-1, 11] } }
+ })
+ .then(function() {
+ assertRange([-0.13, 2.13], [-1, 11]);
+
+ return Plotly.restyle(gd, 'y', [[2, 1, 2, 1]]);
+ })
+ .then(function() {
+ assertRange([-0.19, 3.19], [-1, 11]);
+
+ return Plotly.extendTraces(gd, { y: [[2, 1]] }, [0]);
+ })
+ .then(function() {
+ assertRange([-0.32, 5.32], [-1, 11]);
+
+ return Plotly.addTraces(gd, { x: [0, 10], y: [2, 1] });
+ })
+ .then(function() {
+ assertRange([-0.68, 10.68], [-1, 11]);
+
+ return Plotly.deleteTraces(gd, [1]);
+ })
+ .then(function() {
+ assertRange([-0.31, 5.31], [-1, 11]);
+
+ return Plotly.update(gd, {
+ y: [[2, 1, 2, 1, 2]]
+ }, {
+ 'xaxis.rangeslider.autorange': true
+ });
+ })
+ .then(function() {
+ assertRange([-0.26, 4.26], [-0.26, 4.26]);
+
+ })
+ .then(done);
+ });
});
});
| 0 |
diff --git a/generators/server/templates/src/main/resources/config/couchmove/changelog/_V0__create_indexes.n1ql b/generators/server/templates/src/main/resources/config/couchmove/changelog/_V0__create_indexes.n1ql -- create indexes
CREATE INDEX type ON ${bucket}(`_class`)
WITH { "defer_build" : true };
+<%_ if (!skipUserManagement) { _%>
CREATE INDEX user_mail ON ${bucket}(email)
WHERE `_class` = "<%=packageName%>.domain.User"
@@ -45,6 +46,7 @@ CREATE INDEX social_user ON ${bucket}(userId, providerId, providerUserId)
CREATE INDEX social_provider ON ${bucket}(providerId, providerUserId)
WHERE `_class` = "<%=packageName%>.domain.SocialUserConnectionRepository"
WITH { "defer_build" : true };<% } %>
+<%_ } _%>
-- build indexes asynchronously
-BUILD INDEX ON ${bucket}(type, user_mail, audit_event<% if (authenticationType === 'oauth2') { %>, client_details, authentication_approval, access_token_refresh, access_token_id, access_token_user<% } else if (authenticationType === 'session') { %>, token_login, token_date<% } %><% if (enableSocialSignIn) { %>, social_user, social_provider<% } %>);
+BUILD INDEX ON ${bucket}(type<% if (!skipUserManagement) { %>, user_mail, audit_event<% if (authenticationType === 'oauth2') { %>, client_details, authentication_approval, access_token_refresh, access_token_id, access_token_user<% } else if (authenticationType === 'session') { %>, token_login, token_date<% } %><% if (enableSocialSignIn) { %>, social_user, social_provider<% } %><% } %>);
| 8 |
diff --git a/assets/js/modules/idea-hub/components/setup/SetupForm.js b/assets/js/modules/idea-hub/components/setup/SetupForm.js @@ -39,8 +39,8 @@ export default function SetupForm() {
const { setTosAccepted } = useDispatch( STORE_NAME );
const onChange = useCallback( ( event ) => {
- const { checked: accept } = event.target;
- setTosAccepted( accept );
+ const { checked } = event.target;
+ setTosAccepted( checked );
}, [ setTosAccepted ] );
return (
| 2 |
diff --git a/src/pages/ReimbursementAccount/ACHContractStep.js b/src/pages/ReimbursementAccount/ACHContractStep.js @@ -19,7 +19,7 @@ import ONYXKEYS from '../../ONYXKEYS';
import compose from '../../libs/compose';
import * as ReimbursementAccountUtils from '../../libs/ReimbursementAccountUtils';
import reimbursementAccountPropTypes from './reimbursementAccountPropTypes';
-import ReimbursementAccountForm from './ReimbursementAccountForm';
+import Form from '../../components/Form';
const propTypes = {
/** Name of the company */
@@ -179,9 +179,11 @@ class ACHContractStep extends React.Component {
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_BANK_ACCOUNT}
shouldShowBackButton
/>
- <ReimbursementAccountForm
- reimbursementAccount={this.props.reimbursementAccount}
- onSubmit={this.submit}
+ <Form
+ formID="test"
+ validate={() => {}}
+ onSubmit={() => {}}
+ submitButtonText="Save"
>
<Text style={[styles.mb5]}>
<Text>{this.props.translate('beneficialOwnersStep.checkAllThatApply')}</Text>
@@ -284,7 +286,7 @@ class ACHContractStep extends React.Component {
)}
errorText={this.getErrorText('certifyTrueInformation')}
/>
- </ReimbursementAccountForm>
+ </Form>
</>
);
}
| 14 |
diff --git a/src/canvas/view/FrameView.js b/src/canvas/view/FrameView.js @@ -256,7 +256,9 @@ export default Backbone.View.extend({
},
renderScripts() {
- const { el } = this;
+ const { el, model, em } = this;
+ const evLoad = 'frame:load';
+ const evOpts = { el, model, view: this };
const canvas = this.getCanvasModel();
const appendScript = scripts => {
if (scripts.length > 0) {
@@ -269,10 +271,14 @@ export default Backbone.View.extend({
el.contentDocument.head.appendChild(scriptEl);
} else {
this.renderBody();
+ em && em.trigger(evLoad, evOpts);
}
};
- el.onload = () => appendScript([...canvas.get('scripts')]);
+ el.onload = () => {
+ em && em.trigger(`${evLoad}:before`, evOpts);
+ appendScript([...canvas.get('scripts')]);
+ };
},
renderStyles(opts = {}) {
| 11 |
diff --git a/tests/functional_test.js b/tests/functional_test.js @@ -66,7 +66,8 @@ function assertHeader(uri, header, value) {
it(`has ${header}`, (done) => {
request(uri, (response) => {
assert.equal(200, response.statusCode);
- assert(Object.prototype.hasOwnProperty.call(response.headers, header));
+ assert(Object.prototype.hasOwnProperty.call(response.headers, header),
+ 'Expected: ${header} in: ${Object.keys(response.headers).join(", ")}');
if (typeof value !== 'undefined') {
assert.equal(response.headers[header], value);
@@ -234,7 +235,7 @@ describe('functional', () => {
});
// Run Tests
- async.each(publicURIs, (uri, callback) => {
+ async.eachLimit(publicURIs, 5, (uri, callback) => {
describe(uri, () => {
it('content-type', (done) => {
request(uri, (response) => {
| 0 |
diff --git a/token-metadata/0x846C66cf71C43f80403B51fE3906B3599D63336f/metadata.json b/token-metadata/0x846C66cf71C43f80403B51fE3906B3599D63336f/metadata.json "symbol": "PMA",
"address": "0x846C66cf71C43f80403B51fE3906B3599D63336f",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/client/app/cloud/project/compute/infrastructure/virtualMachine/addEdit/cloud-project-compute-infrastructure-virtualMachine-addEdit.controller.js b/client/app/cloud/project/compute/infrastructure/virtualMachine/addEdit/cloud-project-compute-infrastructure-virtualMachine-addEdit.controller.js @@ -1087,19 +1087,14 @@ angular.module("managerApp")
// add price infos
const price = { price : {value : 0}, monthlyPrice : { value : 0}};
- _.forEach(flavor.planCodes, planCode => {
- const plan = self.panelsData.prices[planCode];
- if (!plan) {
- console.warn("fail to get price of planCode", planCode)
- return;
+ const planHourly = self.panelsData.prices[flavor.planCodes.hourly];
+ if (planHourly) {
+ price.price = planHourly.price;
}
- if (planCode.includes("monthly")) {
- price.monthlyPrice = plan.price;
- } else {
- price.price = plan.price;
+ const planMonthly = self.panelsData.prices[flavor.planCodes.monthly];
+ if (planMonthly) {
+ price.monthlyPrice = planMonthly.price;
}
- });
-
flavor.price = price;
var currentFlavorUsage = {
| 4 |
diff --git a/packages/app/src/components/PageAlert/OldRevisionAlert.tsx b/packages/app/src/components/PageAlert/OldRevisionAlert.tsx import React from 'react';
+
+import Link from 'next/link';
import { useTranslation } from 'react-i18next';
+
import { useIsLatestRevision } from '~/stores/context';
+import { useSWRxCurrentPage } from '~/stores/page';
export const OldRevisionAlert = (): JSX.Element => {
- const { t } = useTranslation()
+ const { t } = useTranslation();
const { data: isLatestRevision } = useIsLatestRevision();
+ const { data: page } = useSWRxCurrentPage();
- if (isLatestRevision == null || isLatestRevision) {
- return <></>
+ if (page == null || isLatestRevision == null || isLatestRevision) {
+ return <></>;
}
return (
<div className="alert alert-warning">
<strong>{ t('Warning') }: </strong> { t('page_page.notice.version') }
- <a href="{ encodeURI(page.path) }"><i className="icon-fw icon-arrow-right-circle"></i>{ t('Show latest') }</a>
+ <Link href={encodeURI(page._id)}>
+ <a><i className="icon-fw icon-arrow-right-circle"></i>{ t('Show latest') }</a>
+ </Link>
</div>
);
};
| 4 |
diff --git a/token-metadata/0x08AD83D779BDf2BBE1ad9cc0f78aa0D24AB97802/metadata.json b/token-metadata/0x08AD83D779BDf2BBE1ad9cc0f78aa0D24AB97802/metadata.json "symbol": "RWS",
"address": "0x08AD83D779BDf2BBE1ad9cc0f78aa0D24AB97802",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/components/PayoutDetail.js b/src/components/PayoutDetail.js @@ -28,7 +28,6 @@ const PayoutDetail = ({ post }) => {
promotionCost,
cashoutInTime,
isPayoutDeclined,
- maxAcceptedPayout,
pastPayouts,
authorPayouts,
curatorPayouts,
@@ -45,7 +44,6 @@ const PayoutDetail = ({ post }) => {
Will release <FormattedRelative value={cashoutInTime} />
</div>}
{isPayoutDeclined && <div>Declined Payout</div>}
- <AmountWithLabel label="Max Accepted Payout" amount={maxAcceptedPayout} />
<AmountWithLabel label="Total Past Payouts" amount={pastPayouts} />
<AmountWithLabel label="Authors Payout" amount={authorPayouts} />
<AmountWithLabel label="Curators Payout" amount={curatorPayouts} />
| 2 |
diff --git a/tests/unit/NetworkTest.js b/tests/unit/NetworkTest.js @@ -93,6 +93,42 @@ test('consecutive API calls eventually succeed when authToken is expired', () =>
// Given a test user login and account ID
const TEST_USER_LOGIN = '[email protected]';
const TEST_USER_ACCOUNT_ID = 1;
+ const TEST_PERSONAL_DETAILS = {
+ [TEST_USER_LOGIN]: {
+ avatar: 'https://d1wpcgnaa73g0y.cloudfront.net/d77919198004a3d382b30ccc2edf037612ca2416.jpeg',
+ firstName: '',
+ lastName: '',
+ timeZone: {automatic: true, selected: 'Europe/Amsterdam'},
+ avatarThumbnail: 'https://d1wpcgnaa73g0y.cloudfront.net/d77919198004a3d382b30ccc2edf037612ca2416_128.jpeg',
+ },
+ };
+ const TEST_ACCOUNT_DATA = {
+ email: TEST_USER_LOGIN,
+ isTwoFactorAuthRequired: false,
+ samlRequired: false,
+ samlSupported: false,
+ twoFactorAuthEnabled: false,
+ validated: true,
+ };
+ const TEST_CHAT_LIST = [1, 2, 3];
+
+ let chatList;
+ Onyx.connect({
+ key: 'test_chatList',
+ callback: val => chatList = val,
+ });
+
+ let account;
+ Onyx.connect({
+ key: 'test_account',
+ callback: val => account = val,
+ });
+
+ let personalDetailsList;
+ Onyx.connect({
+ key: 'test_personalDetailsList',
+ callback: val => personalDetailsList = val,
+ });
// When we sign in
return signInWithTestUser(TEST_USER_ACCOUNT_ID, TEST_USER_LOGIN)
@@ -114,20 +150,44 @@ test('consecutive API calls eventually succeed when authToken is expired', () =>
jsonCode: 407,
}))
- // The remaining requests should succeed
+ // The request to Authenticate should succeed and we mock the responses for the remaining calls
.mockImplementationOnce(() => Promise.resolve({
jsonCode: 200,
authToken: 'qwerty12345',
}))
- .mockImplementation(() => Promise.resolve({
+ // Get&returnValueList=personalDetailsList
+ .mockImplementationOnce(() => Promise.resolve({
+ jsonCode: 200,
+ personalDetailsList: TEST_PERSONAL_DETAILS,
+ }))
+
+ // Get&returnValueList=account
+ .mockImplementationOnce(() => Promise.resolve({
+ jsonCode: 200,
+ account: TEST_ACCOUNT_DATA,
+ }))
+
+ // Get&returnValueList=chatList
+ .mockImplementationOnce(() => Promise.resolve({
jsonCode: 200,
+ chatList: TEST_CHAT_LIST,
}));
- // And then make 3 API requests in quick succession with an expired authToken
- API.Get({returnValueList: 'chatList'});
- API.Get({returnValueList: 'personalDetailsList'});
- API.Get({returnValueList: 'account'});
+ // And then make 3 API requests in quick succession with an expired authToken and handle the response
+ API.Get({returnValueList: 'chatList'})
+ .then((response) => {
+ Onyx.merge('test_chatList', response.chatList);
+ });
+ API.Get({returnValueList: 'personalDetailsList'})
+ .then((response) => {
+ Onyx.merge('test_personalDetailsList', response.personalDetailsList);
+ });
+ API.Get({returnValueList: 'account'})
+ .then((response) => {
+ Onyx.merge('test_account', response.account);
+ });
+
return waitForPromisesToResolve();
})
.then(() => {
@@ -137,5 +197,8 @@ test('consecutive API calls eventually succeed when authToken is expired', () =>
const callsToAuthenticate = _.filter(HttpUtils.xhr.mock.calls, ([command]) => command === 'Authenticate');
expect(callsToGet.length).toBe(6);
expect(callsToAuthenticate.length).toBe(1);
+ expect(account).toEqual(TEST_ACCOUNT_DATA);
+ expect(personalDetailsList).toEqual(TEST_PERSONAL_DETAILS);
+ expect(chatList).toEqual(TEST_CHAT_LIST);
});
});
| 7 |
diff --git a/js/passwordManager/keychain.js b/js/passwordManager/keychain.js +/*
+A note about the keychain storage format:
+keytar saves entries as (service, account, password), but only supports listing all entries given a particular service
+We need a way to find all passwords created by Min, so we use "min saved password" as the service name,
+and then store both the account domain and username in the "account" field as a JS object
+*/
+
class Keychain {
constructor () {
this.name = 'Built-in password manager'
+ this.keychainServiceName = 'Min saved password'
}
getDownloadLink () {
@@ -24,10 +32,18 @@ class Keychain {
}
async getSuggestions (domain) {
- return ipc.invoke('keychainFindCredentials', domain).then(function (results) {
- return results.map(function (result) {
+ return ipc.invoke('keychainFindCredentials', this.keychainServiceName).then(function (results) {
+ return results
+ .filter(function (result) {
+ try {
+ return JSON.parse(result.account).domain === domain
+ } catch (e) {
+ return false
+ }
+ })
+ .map(function (result) {
return {
- username: result.account,
+ username: JSON.parse(result.account).username,
password: result.password,
manager: 'Keychain'
}
@@ -40,7 +56,7 @@ class Keychain {
}
saveCredential (domain, username, password) {
- ipc.invoke('keychainSetPassword', domain, username, password)
+ ipc.invoke('keychainSetPassword', this.keychainServiceName, JSON.stringify({ domain: domain, username: username }), password)
}
}
| 3 |
diff --git a/src/styles/codemirror.less b/src/styles/codemirror.less .CodeMirror-line {
line-height: 22px !important;
}
-
+ .CodeMirror-fullscreen {
+ position: fixed !important;;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ height: auto;
+ width: 100% !important;;
+ z-index: 9;
+ }
.CodeMirror-sizer {
padding-top: 40px;
}
background: #272822;
color: #fff;
border-radius: 5px;
- line-height : 1.6
+ line-height: 1.6;
}
.CodeMirror.cm-s-monokai .CodeMirror-gutter.CodeMirror-linenumbers {
background: rgba(0, 0, 0, 0.8);
color: #d0d0d0;
border-right: none;
- margin-right: -1px
+ margin-right: -1px;
}
.CodeMirror.cm-s-monokai .CodeMirror-cursor {
| 1 |
diff --git a/munin/mm-plugin b/munin/mm-plugin @@ -52,8 +52,8 @@ if [ "$1" = "config" ]; then
exit 0
fi
-ROOMS=`docker exec -t mm_mm_1 /opt/multiparty-meeting/server/connect.js --stats | grep 'rooms' | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | sed -E 's/rooms:([0-9]+)/\1/g'`
-PEERS=`docker exec -t mm_mm_1 /opt/multiparty-meeting/server/connect.js --stats | grep 'peers' | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | sed -E 's/peers:([0-9]+)/\1/g'`
+ROOMS=`docker exec -t mm_mm_1 /opt/edumeet/server/connect.js --stats | grep 'rooms' | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | sed -E 's/rooms:([0-9]+)/\1/g'`
+PEERS=`docker exec -t mm_mm_1 /opt/edumeet/server/connect.js --stats | grep 'peers' | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | sed -E 's/peers:([0-9]+)/\1/g'`
echo "rooms.value ${ROOMS}"
echo "peers.value ${PEERS}"
| 14 |
diff --git a/deployment-scripts/docker-compose.yml b/deployment-scripts/docker-compose.yml @@ -91,11 +91,9 @@ services:
cpus: ".2"
restart: on-failure
environment:
- - MGMT_CONSOLE_URL=deepfence-internal-router
- - MGMT_CONSOLE_PORT=443
- - SCOPE_HOSTNAME=deepfence-management-console
- networks:
- - deepfence_net
+ - MGMT_CONSOLE_URL=127.0.0.1
+ - MGMT_CONSOLE_PORT=8443
+ network_mode: "host"
volumes:
- /sys/kernel/debug:/sys/kernel/debug:rw
- /var/log/fenced
@@ -238,6 +236,8 @@ services:
core: 0
networks:
- deepfence_net
+ ports:
+ - "127.0.0.1:8443:443"
environment:
ENABLE_AUTH: "false"
restart: always
| 12 |
diff --git a/src/Services/Air/templates/AIR_AVAILABILTIY_REQUEST.handlebars.js b/src/Services/Air/templates/AIR_AVAILABILTIY_REQUEST.handlebars.js @@ -3,8 +3,6 @@ module.exports = `
<soap:Body>
<air:AvailabilitySearchReq
AuthorizedBy="user" TraceId="{{requestId}}" TargetBranch="{{TargetBranch}}"
- SolutionResult="true"
- ReturnBrandedFares="true"
xmlns:air="http://www.travelport.com/schema/air_v36_0"
xmlns:com="http://www.travelport.com/schema/common_v36_0"
>
| 2 |
diff --git a/streaming/bot.go b/streaming/bot.go @@ -350,7 +350,7 @@ func RemoveStreamingRole(member *discordgo.Member, role int64, guildID int64) {
}
err := common.RemoveRole(member, role, guildID)
- if err != nil && !common.IsDiscordErr(err, discordgo.ErrCodeMissingPermissions, discordgo.ErrCodeUnknownRole) {
+ if err != nil && !common.IsDiscordErr(err, discordgo.ErrCodeMissingPermissions, discordgo.ErrCodeUnknownRole, discordgo.ErrCodeMissingAccess) {
log.WithError(err).WithField("guild", guildID).WithField("user", member.User.ID).WithField("role", role).Error("Failed removing streaming role")
}
}
| 8 |
diff --git a/app/models/carto/api_key.rb b/app/models/carto/api_key.rb @@ -201,10 +201,6 @@ module Carto
end
end
- def sequel_user
- @sequel_user ||= ::User[user_id]
- end
-
def create_db_config
begin
self.db_role = Carto::DB::Sanitize.sanitize_identifier("#{user.username}_role_#{SecureRandom.hex}")
| 2 |
diff --git a/src/components/topic/platforms/AvailablePlatform.js b/src/components/topic/platforms/AvailablePlatform.js @@ -73,8 +73,11 @@ const AvailablePlatform = ({ platform, onAdd, onEdit, onDelete, preventAdditions
<div className="actions">
{(!platform.isEnabled) && <AppButton primary label={messages.add} onClick={() => onAdd(platform)} disabled={preventAdditions} />}
{(platform.isEnabled) && <AppButton primary label={messages.edit} onClick={() => onEdit(platform)} />}
- {(platform.isEnabled) && (platform.platform !== PLATFORM_OPEN_WEB) && (platform.source !== MEDIA_CLOUD_SOURCE) && (
+ {(platform.isEnabled) && (platform.source !== MEDIA_CLOUD_SOURCE) && (
+ <>
+ <br />
<AppButton secondary label={messages.remove} onClick={() => onDelete(platform)} />
+ </>
)}
</div>
</Col>
| 11 |
diff --git a/token-metadata/0x625aE63000f46200499120B906716420bd059240/metadata.json b/token-metadata/0x625aE63000f46200499120B906716420bd059240/metadata.json "symbol": "ASUSD",
"address": "0x625aE63000f46200499120B906716420bd059240",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml @@ -50,6 +50,7 @@ jobs:
SITE_ID: ${{ secrets.UNLOCK_PROTOCOL_COM_NETLIFY_PROD_SITE_ID }}
AUTH_TOKEN: ${{ secrets.UNLOCK_PROTOCOL_COM_NETLIFY_PROD_AUTH_TOKEN }}
UNLOCK_GA_ID: ${{ secrets.UNLOCK_PROTOCOL_COM_NETLIFY_PROD_UNLOCK_GA_ID }}
+ NEXT_PUBLIC_UNLOCK_ENV: prod
deploy-paywall-app:
if: ${{ github.repository_owner == 'unlock-protocol' }}
| 12 |
diff --git a/app/modules/handler/electron/index.js b/app/modules/handler/electron/index.js @@ -5,6 +5,7 @@ import { configureIPC } from '../../../shared/electron/ipc';
import { clearURI } from '../actions/uri';
import { windowStateKeeper } from '../../../shared/electron/windowStateKeeper';
+const { exec } = require('child_process');
const log = require('electron-log');
const path = require('path');
@@ -49,6 +50,11 @@ const createProtocolHandlers = (resourcePath, store, request = false) => {
}
});
+ // macOS: Tell Chrome it should enable the "Always open" checkbox for the first ESR link
+ if (process.platform === 'darwin') {
+ exec('defaults write com.google.Chrome ExternalProtocolDialogShowAlwaysOpenCheckbox -bool true');
+ }
+
// TODO: Needs proper hide/close logic independent of the primary ui
ui.on('close', (e) => {
if (ui.isVisible()) {
| 12 |
diff --git a/tests/e2e/utils/test-client-config.js b/tests/e2e/utils/test-client-config.js /* eslint-disable camelcase */
export const testClientConfig = {
web: {
- client_id: '1234567890-asdfasdfasdfasdfzxcvzxcvzxcvzxcv.apps.googleusercontent.com',
+ client_id: '1234567890-asdfasdfasdfasdfzxcvzxcvzxcvzxcv.apps.sitekit.withgoogle.com',
client_secret: 'x_xxxxxxxxxxxxxxxxxxxxxx',
project_id: 'test-project-id',
auth_uri: 'https://accounts.google.com/o/oauth2/auth',
| 3 |
diff --git a/web3swift.xcodeproj/project.pbxproj b/web3swift.xcodeproj/project.pbxproj F5213FF52673849600EBDC50 /* CryptoSwift.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5213FEF2673849600EBDC50 /* CryptoSwift.xcframework */; };
F5213FF62673849600EBDC50 /* BigInt.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5213FF02673849600EBDC50 /* BigInt.xcframework */; };
F5213FF72673849600EBDC50 /* BigInt.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5213FF02673849600EBDC50 /* BigInt.xcframework */; };
- F5213FF82673849600EBDC50 /* PromiseKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5213FF12673849600EBDC50 /* PromiseKit.xcframework */; };
- F5213FF92673849600EBDC50 /* PromiseKit.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5213FF12673849600EBDC50 /* PromiseKit.xcframework */; };
F5213FFA2673849600EBDC50 /* SipHash.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5213FF22673849600EBDC50 /* SipHash.xcframework */; };
F5213FFB2673849600EBDC50 /* SipHash.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5213FF22673849600EBDC50 /* SipHash.xcframework */; };
F5213FFC2673849600EBDC50 /* Starscream.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5213FF32673849600EBDC50 /* Starscream.xcframework */; };
E2EDC5ED241EE1E600410EA6 /* Bridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bridge.swift; sourceTree = "<group>"; };
F5213FEF2673849600EBDC50 /* CryptoSwift.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = CryptoSwift.xcframework; path = Carthage/Build/CryptoSwift.xcframework; sourceTree = "<group>"; };
F5213FF02673849600EBDC50 /* BigInt.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BigInt.xcframework; path = Carthage/Build/BigInt.xcframework; sourceTree = "<group>"; };
- F5213FF12673849600EBDC50 /* PromiseKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PromiseKit.xcframework; path = Carthage/Build/PromiseKit.xcframework; sourceTree = "<group>"; };
F5213FF22673849600EBDC50 /* SipHash.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = SipHash.xcframework; path = Carthage/Build/SipHash.xcframework; sourceTree = "<group>"; };
F5213FF32673849600EBDC50 /* Starscream.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Starscream.xcframework; path = Carthage/Build/Starscream.xcframework; sourceTree = "<group>"; };
/* End PBXFileReference section */
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- F5213FF82673849600EBDC50 /* PromiseKit.xcframework in Frameworks */,
F5213FFA2673849600EBDC50 /* SipHash.xcframework in Frameworks */,
F5213FF62673849600EBDC50 /* BigInt.xcframework in Frameworks */,
F5213FF42673849600EBDC50 /* CryptoSwift.xcframework in Frameworks */,
F5213FF72673849600EBDC50 /* BigInt.xcframework in Frameworks */,
F5213FF52673849600EBDC50 /* CryptoSwift.xcframework in Frameworks */,
F5213FFB2673849600EBDC50 /* SipHash.xcframework in Frameworks */,
- F5213FF92673849600EBDC50 /* PromiseKit.xcframework in Frameworks */,
F5213FFD2673849600EBDC50 /* Starscream.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
children = (
F5213FF02673849600EBDC50 /* BigInt.xcframework */,
F5213FEF2673849600EBDC50 /* CryptoSwift.xcframework */,
- F5213FF12673849600EBDC50 /* PromiseKit.xcframework */,
F5213FF22673849600EBDC50 /* SipHash.xcframework */,
F5213FF32673849600EBDC50 /* Starscream.xcframework */,
13A8D5BD21B9296B00469740 /* CoreImage.framework */,
| 2 |
diff --git a/src/client/js/util/reveal/plugins/growi-renderer.js b/src/client/js/util/reveal/plugins/growi-renderer.js @@ -160,9 +160,12 @@ import GrowiRenderer from '../../GrowiRenderer';
function divideSlides(markdown) {
const interceptorManager = growiRenderer.crowi.interceptorManager;
let context = { markdown };
- interceptorManager.process('preRender', context);
+ // detach code block.
interceptorManager.process('prePreProcess', context);
+ // if there is only '\n' in the first line, replace it.
+ context.markdown = context.markdown.replace(/^\n/, '');
context.markdown = context.markdown.replace(/[\n]+#/g, '\n\n\n#');
+ // restore code block.
interceptorManager.process('postPreProcess', context);
return context.markdown;
}
| 14 |
diff --git a/lib/assets/test/spec/new-dashboard/unit/specs/components/QuickActions/__snapshots__/DatasetQuickActions.spec.js.snap b/lib/assets/test/spec/new-dashboard/unit/specs/components/QuickActions/__snapshots__/DatasetQuickActions.spec.js.snap // Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`DatasetQuickAction.vue should render correct contents 1`] = `
-<div class="quick-actions"><a href="javascript:void(0)" class="quick-actions-select is-active"><img svg-inline="" src="new-dashboard/assets/icons/common/options.svg"></a>
- <div class="quick-actions-dropdown is-active">
- <h6 class="quick-actions-title text is-semibold is-xsmall is-txtSoftGrey">QuickActions.title</h6>
- <ul>
- <li><a href="#" class="action text is-caption is-txtPrimary">QuickActions.editInfo</a></li>
- <li><a href="#" class="action text is-caption is-txtPrimary">QuickActions.manageTags</a></li>
- <li><a href="#" class="action text is-caption is-txtPrimary">QuickActions.createMap</a></li>
- <li><a href="#" class="action text is-caption is-txtPrimary">QuickActions.changePrivacy</a></li>
- <li><a href="#" class="action text is-caption is-txtPrimary">QuickActions.share</a></li>
- <li><a href="#" class="action text is-caption is-txtPrimary">QuickActions.duplicate</a></li>
- <li><a href="#" class="action text is-caption is-txtPrimary">QuickActions.lock</a></li>
- <li><a href="#" class="action text is-caption is-txtAlert">QuickActions.delete</a></li>
- </ul>
- </div>
-</div>
-`;
-
-exports[`DatasetQuickAction.vue should render correct contents locked 1`] = `
-<div class="quick-actions"><a href="javascript:void(0)" class="quick-actions-select is-active"><img svg-inline="" src="new-dashboard/assets/icons/common/options.svg"></a>
- <div class="quick-actions-dropdown is-active">
- <h6 class="quick-actions-title text is-semibold is-xsmall is-txtSoftGrey">QuickActions.title</h6>
- <ul>
- <li><a href="#" class="action text is-caption is-txtPrimary">QuickActions.duplicate</a></li>
- <li><a href="#" class="action text is-caption is-txtPrimary">QuickActions.unlock</a></li>
- </ul>
- </div>
-</div>
-`;
-
exports[`DatasetQuickAction.vue should render open dropdown with actions for locked datasets 1`] = `
<div class="quick-actions"><a href="javascript:void(0)" class="quick-actions-select is-active"><img svg-inline="" src="new-dashboard/assets/icons/common/options.svg"></a>
<div class="quick-actions-dropdown is-active">
| 2 |
diff --git a/token-metadata/0xEA26c4aC16D4a5A106820BC8AEE85fd0b7b2b664/metadata.json b/token-metadata/0xEA26c4aC16D4a5A106820BC8AEE85fd0b7b2b664/metadata.json "symbol": "QKC",
"address": "0xEA26c4aC16D4a5A106820BC8AEE85fd0b7b2b664",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/lib/svg_text_utils.js b/src/lib/svg_text_utils.js @@ -755,10 +755,12 @@ function alignHTMLWith(_base, container, options) {
};
}
+var onePx = '1px ';
+
exports.makeTextShadow = function(color) {
- var x = '1px ';
- var y = '1px ';
- var b = '1px ';
+ var x = onePx;
+ var y = onePx;
+ var b = onePx;
return x + y + b + color + ', ' +
'-' + x + '-' + y + b + color + ', ' +
x + '-' + y + b + color + ', ' +
| 4 |
diff --git a/packages/insomnia-components/components/sidebar/sidebar-paths.js b/packages/insomnia-components/components/sidebar/sidebar-paths.js @@ -15,6 +15,8 @@ const StyledMethods: React.ComponentType<{}> = styled.span`
padding-left: var(--padding-lg);
`;
+const isNotXDashKey = key => key.indexOf('x-') !== 0;
+
// Implemented as a class component because of a caveat with render props
// https://reactjs.org/docs/render-props.html#be-careful-when-using-render-props-with-reactpurecomponent
export default class SidebarPaths extends React.Component<Props> {
@@ -37,7 +39,7 @@ export default class SidebarPaths extends React.Component<Props> {
return (
<div>
- {filteredValues.map(([route, method]) => (
+ {filteredValues.map(([route, routeBody]) => (
<React.Fragment key={route}>
<SidebarItem gridLayout onClick={() => onClick('paths', route)}>
<div>
@@ -47,7 +49,9 @@ export default class SidebarPaths extends React.Component<Props> {
</SidebarItem>
<SidebarItem>
<StyledMethods>
- {Object.keys((method: any)).map(method => (
+ {Object.keys((routeBody: any))
+ .filter(isNotXDashKey)
+ .map(method => (
<span
key={method}
className={`method-${method}`}
| 8 |
diff --git a/src/views/splash/presentation.jsx b/src/views/splash/presentation.jsx @@ -35,7 +35,7 @@ const ShareProjectMessage = require('./activity-rows/share-project.jsx');
const TopBanner = require('./hoc/top-banner.jsx');
const MiddleBanner = require('./hoc/middle-banner.jsx');
-const HOC_START_TIME = 157526280000; // 2019-12-02 00:00:00
+const HOC_START_TIME = 1575262800000; // 2019-12-02 00:00:00
const HOC_END_TIME = 1577077200000; // 2019-12-23 00:00:00
require('./splash.scss');
| 12 |
diff --git a/Source/Scene/Vector3DTileGeometry.js b/Source/Scene/Vector3DTileGeometry.js @@ -68,7 +68,11 @@ define([
this._center = options.center;
if (!defined(this._center)) {
+ if (defined(this._boundingVolume)) {
this._center = Cartesian3.clone(this._boundingVolume.center);
+ } else {
+ this._center = Cartesian3.clone(Cartesian3.ZERO);
+ }
}
this._boundingVolumes = undefined;
| 1 |
diff --git a/lib/Stats.js b/lib/Stats.js @@ -95,7 +95,7 @@ class Stats {
const showProvidedExports = optionOrFallback(options.providedExports, !forToString);
const showChildren = optionOrFallback(options.children, true);
const showSource = optionOrFallback(options.source, !forToString);
- const showStackTrace = optionOrFallback(options.stackTrace, true);
+ const showModuleTrace = optionOrFallback(options.moduleTrace, true);
const showErrors = optionOrFallback(options.errors, true);
const showErrorDetails = optionOrFallback(options.errorDetails, !forToString);
const showWarnings = optionOrFallback(options.warnings, true);
@@ -165,7 +165,7 @@ class Stats {
text += e.message;
if(showErrorDetails && e.details) text += `\n${e.details}`;
if(showErrorDetails && e.missing) text += e.missing.map(item => `\n[${item}]`).join("");
- if(showStackTrace && e.dependencies && e.origin) {
+ if(showModuleTrace && e.dependencies && e.origin) {
text += `\n @ ${e.origin.readableIdentifier(requestShortener)}`;
e.dependencies.forEach(dep => {
if(!dep.loc) return;
| 10 |
diff --git a/app-template/index.html b/app-template/index.html <meta name="msapplication-tap-highlight" content="no">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="css/main.css">
+ <link rel="stylesheet" type="text/css" href="css/chartist.css">
<link rel="stylesheet" type="text/css" href="css/bitcoin.com.css">
<link rel="stylesheet" type="text/css" href="css/icomoon.css">
<title>*USERVISIBLENAME* - *PURPOSELINE*</title>
<script src="lib/angular-components.js"></script>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
-
+ <script src="js/moment.min.js"></script>
+ <script src="js/chartist.min.js"></script>
<script src="js/app.js"></script>
</body>
| 3 |
diff --git a/workshops/terraform/lab5.md b/workshops/terraform/lab5.md @@ -349,12 +349,11 @@ This video shows some of the key concepts, including the forking of environments
Note that the standard Terraform executable itself is free to use. [Terraform Enterprise](https://www.hashicorp.com/products/terraform) has a Pro and Premium tier, depending on the required level of features.
-
## End of Lab 5
We have reached the end of the lab. You have moved to running Terraform locally and we're now using Service Principals for authentication.
-We have also looked at the Azure Marketplace offering for Terraform, and at Terraform Enterprise.
+We have also looked at the Azure Marketplace offering for Terraform, and at Terraform Enterprise. If you would like to see a labs on configuring Terraform Enterprise then add a comment below.
Your .tf files should look similar to those in <https://github.com/richeney/terraform-lab5>.
| 7 |
diff --git a/README.md b/README.md @@ -8,11 +8,20 @@ It is licensed under the terms of the Apache License, Version 2.0 (see LICENSE).
Copyright (c) 2012 - 2016 [duckduckgo.com](https://duckduckgo.com)
+## Setting up the development environment
+First time:
+- Install [Node.js](https://nodejs.org)
+- Run `npm install`
+
+After making any changes to the popup:
+- `grunt`
+
## Testing
Tests use [Selenium Webdriver](http://seleniumhq.github.io/selenium/docs/api/javascript/index.html) and require:
- [Node.js](https://nodejs.org/en/)
- A Google Chrome executable (you must have the browser installed on your machine)
-To install dependencies, just run `npm install`.
+To install dependencies, run `npm install`.
For tests, run `npm test`.
+
| 3 |
diff --git a/CLI/commands/transfer_manager.js b/CLI/commands/transfer_manager.js @@ -695,33 +695,42 @@ async function manualApprovalTransferManager() {
case 'Modify the existing manual approvals':
let options = [];
(await getApprovals()).forEach((a) => {
- options.push(`From ${a.from} to ${a.to} - Allowance: ${web3.utils.fromWei(a.allowance)} - Expiry time: ${moment.unix(a.expiryTime).format('MMMM Do YYYY')} - Description: ${web3.utils.toAscii(a.description)}\n\n`);
+ options.push(`${a.from},${a.to},${web3.utils.fromWei(a.allowance)},${a.expiryTime},${web3.utils.toAscii(a.description)}`);
})
let rowIndex = readlineSync.keyInSelect(options, 'Select a row to modify', { cancel: 'Return' });
- let optionSelected = options[rowIndex];
- console.log('Selected:', rowIndex != -1 ? optionSelected.description : 'Return', '\n');
-
- let actualAllowance = optionSelected.allowance;
- let actualExpiryTime = optionSelected.expiryTime;
- let actualDescription = optionSelected.description;
-
- let newAllowance = readlineSync.question(`Enter the new amount of tokens which will be approved (${actualAllowance}): `, {
+ if (rowIndex == -1) {
+ return
+ }
+ let optionSelected = options[rowIndex].split(",");
+ let actualExpiryTime = optionSelected[3];
+ let actualDescription = optionSelected[4];
+
+ let changeAllowance = readlineSync.question(`Enter (1) to increased, (0) to decreased or leave empty to no change in allowances: `, { defaultInput: 2 });
+ let newAllowance;
+ if (parseInt(changeAllowance) != 2) {
+ let minWord = parseInt(changeAllowance) == 1 ? "incresed" : "decreased";
+ newAllowance = readlineSync.question(`Enter the amount of tokens to ${minWord}: `, {
limit: function (input) {
- if (input == "") {
- return true
- }
return parseFloat(input) > 0
},
limitMessage: "Amount must be bigger than 0"
});
- let oneHourFromNow = Math.floor(Date.now() / 1000 + 3600);
- let expiryTime = readlineSync.questionInt(`Enter the time(Unix Epoch time) until which the transfer is allowed(1 hour from now = ${oneHourFromNow}): `, { defaultInput: oneHourFromNow });
- let description = readlineSync.question('Enter the description about the manual approval: ', {
+ } else {
+ newAllowance = "0";
+ }
+ let newExpiryTime = readlineSync.questionInt(`Enter the new time(Unix Epoch time) until which the transfer is allowed (${actualExpiryTime}): `, { defaultInput: actualExpiryTime });
+ let newDescription = readlineSync.question(`Enter the new description about the manual approval (${actualDescription}): `, {
limit: function (input) {
return input != "" && getBinarySize(input) < 33
},
- limitMessage: "Description is required"
+ limitMessage: "Description is required",
+ defaultInput: actualDescription
});
+
+ let modifyManualApprovalAction = currentTransferManager.methods.modifyManualApproval(optionSelected[0], optionSelected[1], parseInt(newExpiryTime), web3.utils.toWei(newAllowance), web3.utils.fromAscii(newDescription), parseInt(changeAllowance));
+ let modifyManualApprovalReceipt = await common.sendTransaction(modifyManualApprovalAction);
+ console.log(chalk.green(`The row has been modify successfully!`));
+
break;
}
}
| 7 |
diff --git a/native/calendar/calendar.react.js b/native/calendar/calendar.react.js @@ -88,7 +88,7 @@ type ExtraData = {
// But not this particular piece of sadness, actually. We have to cache the
// current InnerCalendar ref here so we can access it from the statically
// defined navigationOptions.tabBarOnPress below.
-const currentCalendarRef: ?InnerCalendar = null;
+let currentCalendarRef: ?InnerCalendar = null;
type Props = {
// Redux state
@@ -158,7 +158,7 @@ class InnerCalendar extends React.PureComponent {
scene: { index: number, focused: bool },
jumpToIndex: (index: number) => void,
) => {
- if (scene.focused) {
+ if (scene.focused && currentCalendarRef) {
currentCalendarRef.scrollToToday();
} else {
jumpToIndex(scene.index);
| 1 |
diff --git a/layouts/partials/helpers/config.html b/layouts/partials/helpers/config.html {{- end -}}
{{- else if and (ne .data.resource "") (in (slice "css" "icon" "js") .type) -}}
{{- $.root.Scratch.Set "config_resource" .data.resource -}}
-
+ {{- if not (or (hasPrefix .data.resource "http://") (hasPrefix .data.resource "https://")) -}}
{{- $page_level_resource := printf "%s%s" $.root.Dir .data.resource -}}
{{- if fileExists (printf "content/%s" $page_level_resource) -}}
{{- $.root.Scratch.Set "config_resource" $page_level_resource -}}
{{- end -}}
+ {{- end -}}
{{- $location := ($.root.Scratch.Get "config_resource") | relLangURL -}}
{{- if and (eq .type "icon") (eq .head true) }}
| 1 |
diff --git a/assets/js/modules/adsense/components/dashboard/DashboardSummaryWidget.js b/assets/js/modules/adsense/components/dashboard/DashboardSummaryWidget.js @@ -35,6 +35,8 @@ import DataBlock from '../../../../components/DataBlock';
import Sparkline from '../../../../components/Sparkline';
import { generateDateRangeArgs } from '../../util/report-date-range-args';
import AdBlockerWarning from '../common/AdBlockerWarning';
+import Row from '../../../../material-components/layout/Row';
+import Cell from '../../../../material-components/layout/Cell';
const { useSelect } = Data;
@@ -103,11 +105,11 @@ function DashboardSummaryWidget( { Widget, WidgetReportZero, WidgetReportError }
if ( isAdblockerActive ) {
return (
<Widget className="googlesitekit-dashboard-adsense-stats mdc-layout-grid">
- <div className="mdc-layout-grid__inner">
- <div className="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
+ <Row>
+ <Cell>
<AdBlockerWarning />
- </div>
- </div>
+ </Cell>
+ </Row>
</Widget>
);
}
| 14 |
diff --git a/token-metadata/0x3a3A65aAb0dd2A17E3F1947bA16138cd37d08c04/metadata.json b/token-metadata/0x3a3A65aAb0dd2A17E3F1947bA16138cd37d08c04/metadata.json "symbol": "AETH",
"address": "0x3a3A65aAb0dd2A17E3F1947bA16138cd37d08c04",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/utils/flux/connect/__spec__.js b/src/utils/flux/connect/__spec__.js @@ -15,9 +15,9 @@ describe('connect', () => {
testState => ({ one: testState })
)(Presenter);
- const $ = mount(<ConnectedComponent />);
+ const wrapper = mount(<ConnectedComponent />);
- expect($.find(Presenter).props()).toEqual({ one: 1 });
+ expect(wrapper.find(Presenter).props()).toEqual({ one: 1 });
});
it('updates the component on change of a store', () => {
@@ -38,16 +38,16 @@ describe('connect', () => {
testState => ({ one: testState })
)(Presenter);
- const $ = mount(<ConnectedComponent />);
+ const wrapper = mount(<ConnectedComponent />);
- expect($.find(Presenter).props()).toEqual({ one: 1 });
+ expect(wrapper.find(Presenter).props()).toEqual({ one: 1 });
Dispatcher.dispatch({
actionType: UPDATE_A,
value: 2
});
- expect($.find(Presenter).props()).toEqual({ one: 2 });
+ expect(wrapper.find(Presenter).props()).toEqual({ one: 2 });
});
it('connects stores to props', () => {
@@ -65,8 +65,8 @@ describe('connect', () => {
})
)(Presenter);
- const $ = mount(<ConnectedComponent />);
- expect($.find(Presenter).props()).toEqual({ one: 1, two: 2 });
+ const wrapper = mount(<ConnectedComponent />);
+ expect(wrapper.find(Presenter).props()).toEqual({ one: 1, two: 2 });
});
it('removes change listeners on unmount of the component', () => {
@@ -76,13 +76,13 @@ describe('connect', () => {
const ConnectedComponent = connect(testStore, () => {})(Presenter);
- const $ = mount(<ConnectedComponent />);
+ const wrapper = mount(<ConnectedComponent />);
const removeChangeListener = jest.spyOn(testStore, 'removeChangeListener');
expect(removeChangeListener).toHaveBeenCalledTimes(0);
- $.unmount();
+ wrapper.unmount();
expect(removeChangeListener).toHaveBeenCalledTimes(1);
});
| 10 |
diff --git a/src/domain/navigation/index.js b/src/domain/navigation/index.js @@ -30,7 +30,7 @@ function allowsChild(parent, child) {
switch (parent?.type) {
case undefined:
// allowed root segments
- return type === "login" || type === "session";
+ return type === "login" || type === "session" || type === "sso";
case "session":
return type === "room" || type === "rooms" || type === "settings";
case "rooms":
| 11 |
diff --git a/lib/services/log.js b/lib/services/log.js const { name: NAME } = require('../../package.json')
// TODO logs
-const logPrefix = `[${NAME}]`
+const logPrefix = `[${NAME.split('/').pop()}]`
const log = console.log.bind(console, logPrefix)
log.debug = () => {}
log.error = console.error.bind(console, logPrefix)
| 4 |
diff --git a/gulpfile.js b/gulpfile.js @@ -8,7 +8,7 @@ const cleanCSS = require('gulp-clean-css');
const rename = require('gulp-rename');
const concat = require('gulp-concat');
const babelMinify = require('babel-minify');
-const child_process = require('child_process');
+const childProcess = require('child_process');
const merge = require('merge-stream');
const zip = require('gulp-zip');
var packageJson = JSON.parse(fs.readFileSync('./package.json'));
@@ -22,7 +22,7 @@ function minifyJs(fileName) {
);
}
gulp.task('runWebpack', function() {
- return child_process.execSync('yarn run build');
+ return childProcess.execSync('yarn run build');
});
gulp.task('copyFiles', function() {
return merge(
@@ -149,13 +149,13 @@ gulp.task('generate-service-worker', function(callback) {
});
gulp.task('packageExtension', function() {
- child_process.execSync('cp -R app/ extension/');
- child_process.execSync('cp src/manifest.json extension');
- child_process.execSync('cp src/options.js extension');
- child_process.execSync('cp src/options.html extension');
- child_process.execSync('cp src/eventPage.js extension');
- child_process.execSync('cp src/icon-16.png extension');
- child_process.execSync(
+ childProcess.execSync('cp -R app/ extension/');
+ childProcess.execSync('cp src/manifest.json extension');
+ childProcess.execSync('cp src/options.js extension');
+ childProcess.execSync('cp src/options.html extension');
+ childProcess.execSync('cp src/eventPage.js extension');
+ childProcess.execSync('cp src/icon-16.png extension');
+ childProcess.execSync(
'rm -rf extension/service-worker.js extension/partials'
);
return merge(
@@ -176,7 +176,7 @@ gulp.task('packageExtension', function() {
});
gulp.task('cleanup', function() {
- return child_process.execSync('rm -rf build');
+ return childProcess.execSync('rm -rf build');
});
gulp.task('release', function(callback) {
| 10 |
diff --git a/app-template/package-template.json b/app-template/package-template.json "bezier-easing": "^2.0.3",
"bhttp": "1.2.1",
"bitauth": "^0.2.1",
- "bitcore-wallet-client": "https://github.com/Bitcoin-com/bitcore-wallet-client-new.git",
+ "bitcore-wallet-client": "https://github.com/Bitcoin-com/bitcore-wallet-client.git",
"bower": "^1.7.9",
"cordova-android": "5.1.1",
"cordova-custom-config": "^3.0.5",
| 3 |
diff --git a/test/acceptance/copy-abort.js b/test/acceptance/copy-abort.js @@ -89,13 +89,13 @@ describe('Cancel "copy to" commands', function () {
const dropTable = querystring.stringify({ q: dropTableQuery, api_key: 1234 });
- const createTableOptions = {
+ const dropTableOptions = {
url: `http://${host}:${port}/api/v1/sql?${dropTable}`,
headers: { host: 'vizzuality.cartodb.com' },
method: 'GET'
};
- request(createTableOptions, function (err, res) {
+ request(dropTableOptions, function (err, res) {
if (err) {
return done(err);
}
| 7 |
diff --git a/lib/ui/docs.js b/lib/ui/docs.js import { client } from '../connection'
import { CompositeDisposable } from 'atom'
+const views = require('./views')
-let { searchdocs, methods, regenerateCache } =
- client.import({rpc: ['searchdocs', 'methods', ''], msg: ['regenerateCache']})
+let { searchdocs, methods, moduleinfo, regenerateCache } =
+ client.import({rpc: ['searchdocs', 'methods', 'moduleinfo'], msg: ['regenerateCache']})
let ink, pane
@@ -12,28 +13,22 @@ export function activate(_ink) {
ink = _ink
pane = ink.DocPane.fromId('Documentation')
- pane.setItems([])
-
- pane.process = (item) => {
- item.html = require('./views').render(item.html)
-
- processLinks(item.html.getElementsByTagName('a'))
-
- item.onClickName = () => {
- methods({word: item.name, mod: item.mod}).then((symbols) =>
- ink.goto.goto(symbols))
- }
-
- item.onClickModule = () => {
-
- }
-
- return item
- }
pane.search = (text, mod, exportedOnly, allPackages) => {
client.boot()
- return searchdocs({query: text, mod, exportedOnly, allPackages})
+ return new Promise((resolve) => {
+ searchdocs({query: text, mod, exportedOnly, allPackages}).then((res) => {
+ if (res.error) {
+ res.errmsg = views.render(res.errmsg)
+ } else {
+ for (i = 0; i < res.items.length; i++) {
+ res.items[i].score = res.scores[i]
+ res.items[i] = processItem(res.items[i])
+ }
+ }
+ resolve(res)
+ })
+ })
}
subs = new CompositeDisposable()
@@ -47,6 +42,23 @@ export function activate(_ink) {
}))
}
+function processItem (item) {
+ item.html = views.render(item.html)
+
+ processLinks(item.html.getElementsByTagName('a'))
+
+ item.onClickName = () => {
+ methods({word: item.name, mod: item.mod}).then((symbols) =>
+ ink.goto.goto(symbols))
+ }
+
+ item.onClickModule = () => {
+ moduleinfo({mod: item.mod}).then(({doc}) => pane.showDocument(views.render(doc)))
+ }
+
+ return item
+}
+
function processLinks (links) {
for (let i = 0; i < links.length; i++) {
const link = links[i]
| 9 |
diff --git a/src/core/Core.js b/src/core/Core.js @@ -867,6 +867,7 @@ class Uppy {
info (message, type, duration) {
const isComplexMessage = typeof message === 'object'
+ duration = typeof duration === 'undefined' ? 3000 : duration
this.setState({
info: {
| 0 |
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml @@ -6,7 +6,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run ESLint
- run: npx eslint src
+ run: |
+ npm install
+ npx eslint src
Check_main_file:
runs-on: ubuntu-latest
steps:
| 3 |
diff --git a/common/fixedpool/fixedpool.go b/common/fixedpool/fixedpool.go package fixedpool
import (
- "errors"
"github.com/sirupsen/logrus"
"os"
"runtime"
@@ -105,11 +104,10 @@ func NewCustom(network, addr string, size int, df DialFunc) (*Pool, error) {
if os.Getenv("YAGPDB_DISABLE_REDIS_POOL_DEBUG") == "" {
go func() {
- t := time.NewTicker(time.Second * 10)
+ t := time.NewTicker(time.Second * 60)
for {
<-t.C
logrus.Println("Redis pool size: ", len(p.pool))
- runtime.GC()
}
}()
}
@@ -128,17 +126,7 @@ func New(network, addr string, size int) (*Pool, error) {
// Get retrieves an available redis client. If there are none available it will
// create a new one on the fly
func (p *Pool) Get() (*redis.Client, error) {
- after := time.NewTimer(time.Second * 30)
-
- select {
- case conn := <-p.pool:
- after.Stop()
- return conn, nil
- case <-after.C:
- panic("Ran out of connections?")
- }
-
- return nil, errors.New("Pool is empty")
+ return <-p.pool, nil
}
// Put returns a client back to the pool. If the pool is full the client is
| 7 |
diff --git a/lib/function/algebra/simplify.js b/lib/function/algebra/simplify.js @@ -351,23 +351,17 @@ function factory (type, config, load, typed, math) {
// Create a new node by cloning the rhs of the matched rule
res = repl.clone();
- // Replace placeholders with their respective nodes
- //console.log('Traversing rule ' + res);
- res.traverse(function(n, path, parent) {
- if(n.isSymbolNode) {
- n.TransformThisNode = true;
+ // Replace placeholders with their respective nodes without traversing deeper into the replaced nodes
+ function _transform(node) {
+ if(node.isSymbolNode && matches.placeholders.hasOwnProperty(node.name)) {
+ return matches.placeholders[node.name].clone();
}
- });
-
- res = res.transform(function(n, path, parent) {
- if(n.TransformThisNode) {
- if(matches.placeholders.hasOwnProperty(n.name)) {
- var replace = matches.placeholders[n.name].clone();
- return replace;
+ else {
+ return node.map(_transform);
}
}
- return n;
- });
+
+ res = _transform(res);
// var after = res.toString({parenthesis: 'all'});
// console.log('Simplified ' + before + ' to ' + after);
| 7 |
diff --git a/src/functions.js b/src/functions.js @@ -491,7 +491,7 @@ function getDateComponent(component) {
}
if (component != "weekday") {
- ret.twodigit = (ret < 10? "0" : "") + (ret < 1? "0" : "") + ret % 100;
+ ret.twodigit = (ret % 100 < 10? "0" : "") + ret % 100;
}
return ret;
| 1 |
diff --git a/src/renderer/components/editorWithTabs/sourceCode.vue b/src/renderer/components/editorWithTabs/sourceCode.vue @@ -64,6 +64,12 @@ export default {
lineWrapping: true,
styleActiveLine: true,
direction: textDirection,
+ // The amount of updates needed when scrolling. Settings this to >Infinity< or use CSS
+ // >height: auto< result in bad performance because the whole document is always rendered.
+ // Since we are using >height: auto< setting this to >Infinity< to fix #171. The best
+ // solution would be to set a fixed height like in #791 but then the scrollbar is not on
+ // the right side. Please also see CodeMirror#1104.
+ viewportMargin: Infinity,
lineNumberFormatter (line) {
if (line % 10 === 0 || line === 1) {
return line
@@ -254,6 +260,7 @@ export default {
overflow: auto;
}
.source-code .CodeMirror {
+ height: auto;
margin: 50px auto;
max-width: var(--editorAreaWidth);
background: transparent;
| 12 |
diff --git a/src/plot_api/plot_api.js b/src/plot_api/plot_api.js @@ -261,8 +261,8 @@ exports.plot = function(gd, data, layout, config) {
if(regl) {
// Unfortunately, this can happen when relayouting to large
// width/height on some browsers.
- if(fullLayout.width !== regl._gl.drawingBufferWidth ||
- fullLayout.height !== regl._gl.drawingBufferHeight
+ if(Math.floor(fullLayout.width) !== regl._gl.drawingBufferWidth ||
+ Math.floor(fullLayout.height) !== regl._gl.drawingBufferHeight
) {
var msg = 'WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.';
if(drawFrameworkCalls) {
| 7 |
diff --git a/example/index.html b/example/index.html @@ -122,7 +122,6 @@ function getUrlParam(parameter, defaultvalue){
</b-select>
</b-field>
- <label class="label">Variants</label>
<b-field label="Variants">
<b-radio v-for="item in materialVariants" v-bind:key="item.titel"
v-bind:native-value="item.title" v-stream:input="variantChanged$" v-model="selectedVariant">
| 2 |
diff --git a/docs/docs/examples.md b/docs/docs/examples.md @@ -570,7 +570,7 @@ Alternatively, use the `data-width` attribute to set the width of the select. Se
Add an icon to an option or optgroup with the `data-icon` attribute:
-<span class="alert alert-info" role="alert">
+<span class="alert alert-info d-block" role="alert">
<strong>Note:</strong> Glyphicons are not included in Bootstrap 4. To use FontAwesome, or another icon library, you'll need to set `iconBase` to something other than `'glyphicon'`.
</span>
| 12 |
diff --git a/web/base_viewer.js b/web/base_viewer.js @@ -1096,9 +1096,15 @@ class BaseViewer {
if (!this.pdfDocument) {
return false;
}
- if (pageNumber < 1 || pageNumber > this.pagesCount) {
+ if (
+ !(
+ Number.isInteger(pageNumber) &&
+ pageNumber > 0 &&
+ pageNumber <= this.pagesCount
+ )
+ ) {
console.error(
- `${this._name}.isPageVisible: "${pageNumber}" is out of bounds.`
+ `${this._name}.isPageVisible: "${pageNumber}" is not a valid page.`
);
return false;
}
| 7 |
diff --git a/ghost/core/test/e2e-browser/frontend.spec.js b/ghost/core/test/e2e-browser/frontend.spec.js @@ -41,9 +41,8 @@ test.describe('Ghost Frontend', () => {
await page.locator('.gh-nav a[href="#/members/"]').click();
// 1 member, should be Testy, on Portal Tier
- // TODO: These fail seemingly without reasons
- expect(page.getByRole('link', {name: 'Testy McTesterson [email protected]'}), 'Should have 1 paid member').toBeVisible();
- expect(page.getByRole('link', {name: tierName}), `Paid member should be on ${tierName}`);
+ await expect(page.getByRole('link', {name: 'Testy McTesterson [email protected]'}), 'Should have 1 paid member').toBeVisible();
+ await expect(page.getByRole('link', {name: tierName}), `Paid member should be on ${tierName}`).toBeVisible();
});
});
});
| 1 |
diff --git a/OpenRobertaParent/RobotNAO/src/main/java/de/fhg/iais/roberta/syntax/codegen/nao/PythonVisitor.java b/OpenRobertaParent/RobotNAO/src/main/java/de/fhg/iais/roberta/syntax/codegen/nao/PythonVisitor.java @@ -1421,7 +1421,7 @@ public class PythonVisitor extends RobotPythonVisitor implements NaoAstVisitor<V
this.sb.append(INDENT).append(INDENT).append("h.sonar.unsubscribe(\"OpenRobertaApp\")\n");
break;
case NAOMARK:
- this.sb.append(INDENT).append(INDENT).append("h.mark.unsubscribe(\"RobertaLab\", 500, 0.0)\n");
+ this.sb.append(INDENT).append(INDENT).append("h.mark.unsubscribe(\"RobertaLab\")\n");
break;
case NAOFACE:
this.sb.append(INDENT).append(INDENT).append("faceRecognitionModule.unsubscribe()\n");
| 1 |
diff --git a/.eslintrc.json b/.eslintrc.json "rules": {
"curly": ["error"],
"eol-last": ["error"],
- // Blockly/Google use 2-space indents.
- // Blockly/Google uses +4 space indents for line continuations.
- // Ignore default rules for ternary expressions.
- "indent": [
- "error", 2,
- {
- "SwitchCase": 1,
- "MemberExpression": 2,
- "ObjectExpression": 1,
- "FunctionDeclaration": {
- "body": 1,
- "parameters": 2
- },
- "FunctionExpression": {
- "body": 1,
- "parameters": 2
- },
- "CallExpression": {
- "arguments": 2
- },
- "ignoredNodes": ["ConditionalExpression"]
- }
- ],
"keyword-spacing": ["error"],
"linebreak-style": ["error", "unix"],
"max-len": [
],
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
"no-unused-vars": [
- "error",
+ "warn",
{
"args": "after-used",
// Ignore vars starting with an underscore.
"argsIgnorePattern": "^_"
}
],
- "no-use-before-define": ["error"],
// Blockly uses for exporting symbols. no-self-assign added in eslint 5.
"no-self-assign": ["off"],
// Blockly uses single quotes except for JSON blobs, which must use double quotes.
| 3 |
diff --git a/src/traces/pie/plot.js b/src/traces/pie/plot.js @@ -344,9 +344,10 @@ function plotTextLines(slices, trace) {
function attachFxHandlers(sliceTop, gd, cd) {
var cd0 = cd[0];
- var trace = cd0.trace;
var cx = cd0.cx;
var cy = cd0.cy;
+ var trace = cd0.trace;
+ var isFunnelArea = trace.type === 'funnelarea';
// hover state vars
// have we drawn a hover label, so it should be cleared later
@@ -410,8 +411,10 @@ function attachFxHandlers(sliceTop, gd, cd) {
x0: hoverCenterX - rInscribed * cd0.r,
x1: hoverCenterX + rInscribed * cd0.r,
y: hoverCenterY,
- _y0: hoverCenterY - rInscribed * cd0.r,
- _y1: hoverCenterY + rInscribed * cd0.r,
+ _x0: isFunnelArea ? cx + pt.TL[0] : hoverCenterX - rInscribed * cd0.r,
+ _x1: isFunnelArea ? cx + pt.TR[0] : hoverCenterX + rInscribed * cd0.r,
+ _y0: isFunnelArea ? cy + pt.TL[1] : hoverCenterY - rInscribed * cd0.r,
+ _y1: isFunnelArea ? cy + pt.BL[1] : hoverCenterY + rInscribed * cd0.r,
text: text.join('<br>'),
name: (trace2.hovertemplate || hoverinfo.indexOf('name') !== -1) ? trace2.name : undefined,
idealAlign: pt.pxmid[0] < 0 ? 'left' : 'right',
| 7 |
diff --git a/src/js/utils.js b/src/js/utils.js @@ -169,6 +169,7 @@ function _makeCenteredTippy() {
positionFixed: true
};
+ tippyOptions.arrow = false;
tippyOptions.popperOptions = tippyOptions.popperOptions || {};
const finalPopperOptions = Object.assign(
| 2 |
diff --git a/sirepo/package_data/template/radia/geometry.py.jinja b/sirepo/package_data/template/radia/geometry.py.jinja @@ -87,8 +87,11 @@ def _write_dmp(g_id, f_path):
with open(f_path, 'wb') as f:
f.write(radia_util.dump_bin(g_id))
-
+{% if isParallel %}
with radia_util.MPI() as m:
+{% else %}
+if True:
+{% endif %}
{% if doReset %}
radia_util.reset()
{% endif %}
@@ -99,7 +102,9 @@ with radia_util.MPI() as m:
{% if doSolve %}
res = radia_util.solve(g_id, {{ solvePrec }}, {{ solveMaxIter }}, {{ solveMethod }})
+ {% if isParallel %}
m.barrier()
+ {% endif %}
sirepo.mpi.restrict_op_to_first_rank(lambda: _write_dict_to_h5(res, '{{ h5SolutionPath }}'))
{% endif %}
@@ -111,7 +116,9 @@ with radia_util.MPI() as m:
{% else %}
f = None
{% endif %}
+ {% if isParallel %}
m.barrier()
+ {% endif %}
if f:
g_data = radia_util.vector_field_to_data(g_id, '{{ geomName }}', f, radia_util.FIELD_UNITS['{{ fieldType }}'])
sirepo.mpi.restrict_op_to_first_rank(lambda: _write_dict_to_h5(g_data , '{{ h5FieldPath }}'))
| 14 |
diff --git a/examples/layer-browser/src/app.js b/examples/layer-browser/src/app.js @@ -54,19 +54,23 @@ class App extends PureComponent {
ScatterplotLayer: true
},
settings: {
- // immutable: false,
- // Effects are experimental for now. Will be enabled in the future
- // effects: false,
multiview: false,
- separation: 0,
+ useDevicePixelRatio: false,
pickingRadius: 0,
- drawPickingColors: false
+ drawPickingColors: false,
+
+ separation: 0
// the rotation controls works only for layers in
// meter offset projection mode. They are commented out
// here since layer browser currently only have one layer
- // in this mode.
+ // in this mode, and that layer's data is rotation symmetrical
// rotationZ: 0,
// rotationX: 0
+
+ // immutable: false,
+ // Effects are experimental for now. Will be enabled in the future
+ // effects: false,
+
},
hoveredItem: null,
clickedItem: null,
@@ -226,7 +230,7 @@ class App extends PureComponent {
_renderMap() {
const {width, height, mapViewState, settings} = this.state;
- const {effects, pickingRadius, drawPickingColors} = settings;
+ const {effects, pickingRadius, drawPickingColors, useDevicePixelRatio} = settings;
const viewports = this._getViewports();
@@ -253,6 +257,8 @@ class App extends PureComponent {
onLayerClick={this._onClick}
initWebGLParameters
+ useDevicePixelRatio={useDevicePixelRatio}
+
debug={false}
drawPickingColors={drawPickingColors}
>
| 0 |
diff --git a/webaverse.js b/webaverse.js @@ -33,6 +33,7 @@ import {
import transformControls from './transform-controls.js';
import * as metaverseModules from './metaverse-modules.js';
import soundManager from './sound-manager.js';
+import dioramaManager from './diorama.js';
import metaversefileApi from 'metaversefile';
// const leftHandOffset = new THREE.Vector3(0.2, -0.2, -0.4);
@@ -337,7 +338,7 @@ export default class Webaverse extends EventTarget {
game.pushPlayerUpdates();
soundManager.update(timeDiffCapped);
-
+ dioramaManager.update(timestamp, timeDiffCapped);
const session = renderer.xr.getSession();
const xrCamera = session ? renderer.xr.getCamera(camera) : camera;
@@ -388,5 +389,40 @@ window.addEventListener('keydown', e => {
});
})();
}
+ } else if (e.which === 221) { // ]
+ const localPlayer = metaversefileApi.useLocalPlayer();
+ if (localPlayer.avatar) {
+ dioramaManager.createDiorama(localPlayer);
+ /* (async () => {
+ const audioUrl = '/sounds/vocals.mp3';
+ const audioUrl2 = '/sounds/music.mp3';
+
+ const _loadAudio = u => new Promise((accept, reject) => {
+ const audio = new Audio(u);
+ audio.addEventListener('canplaythrough', async e => {
+ accept(audio);
+ }, {once: true});
+ audio.addEventListener('error', e => {
+ reject(e);
+ });
+ // audio.play();
+ // audioContext.resume();
+ });
+
+ const audios = await Promise.all([
+ _loadAudio(audioUrl),
+ _loadAudio(audioUrl2),
+ ]);
+ localPlayer.avatar.say(audios[0]);
+ await localPlayer.avatar.microphoneWorker.waitForLoad();
+
+ audios[0].play();
+ audios[1].play();
+
+ audios[0].addEventListener('ended', e => {
+ localPlayer.avatar.setMicrophoneMediaStream(null);
+ });
+ })(); */
+ }
}
});
\ No newline at end of file
| 0 |
diff --git a/userscript.user.js b/userscript.user.js @@ -12927,12 +12927,8 @@ var $$IMU_EXPORT$$;
},
allow_possibly_different: {
name: "Possibly different images",
- description: "Enables rules that return images that possibly differ",
+ description: "Enables rules that return images that possibly differ, usually due to server-side caching",
category: "rules",
- example_websites: [
- "YouTube video thumbnails"
- ],
- hidden: true, // not currently used
onupdate: update_rule_setting
},
allow_possibly_broken: {
@@ -88337,15 +88333,38 @@ var $$IMU_EXPORT$$;
// https://assets.mubicdn.net/images/cast_member/39283/image-w240.jpg?1478101707
// https://assets.mubicdn.net/images/cast_member/39283/image-w240.jpg
// https://assets.mubicdn.net/images/cast_member/39283/image-original.jpg -- doesn't work
+ // https://assets.mubicdn.net/images/notebook/post_spotlight_images/8231/images-w690.jpg
+ // https://assets.mubicdn.net/images/notebook/post_spotlight_images/8231/images-original.jpg -- looks oddly upscaled
+ // https://assets.mubicdn.net/images/notebook/post_spotlight_images/8824/images-original.png -- 1438x597, not upscaled
+ // https://assets.mubicdn.net/images/cast_member/523655/image-w240.jpg
+ // https://assets.mubicdn.net/images/cast_member/523655/image-original.jpg
domain === "assets.mubicdn.net") {
// https://images.mubicdn.net/images/film/77584/cache-87167-1445943264/image-w1280.jpg?size=1200x
// https://images.mubicdn.net/images/film/77584/cache-87167-1445943264/image-original.jpg
// https://images.mubicdn.net/images/film/186296/image-w1280.jpg?size=740x
// https://images.mubicdn.net/images/film/186296/image-w1280.jpg -- -original doesn't work
+
+ // different: https://github.com/qsniyg/maxurl/issues/675 (thanks to TheLastZombie for reporting)
+ // https://images.mubicdn.net/images/film/781/cache-47795-1605261679/image-w1280.jpg
+ // https://images.mubicdn.net/images/film/781/cache-47795-1605261679/image-original.jpg
+ // https://images.mubicdn.net/images/film/603/cache-33536-1578611751/image-w1280.jpg
+ // https://images.mubicdn.net/images/film/603/cache-33536-1578611751/image-original.jpg
newsrc = src.replace(/[?#].*$/, "");
if (newsrc !== src) return newsrc;
- return src.replace(/(\/images\/+[^/]+\/+[0-9]+\/+[^/]+\/+image-)[wh][0-9]+(\.[^/.]+)$/, "$1original$2");
+ newsrc = src.replace(/(\/images\/+(?:[^/]+\/+)?(?:[0-9]+\/+[^/]+|[^/]+\/+[0-9]+)\/+images?-)[wh][0-9]+(\.[^/.]+)$/, "$1original$2");
+ if (newsrc !== src) {
+ if (/\/cache-[0-9]+-[0-9]+\//.test(src)) {
+ return {
+ url: newsrc,
+ problems: {
+ possibly_different: true
+ }
+ };
+ } else {
+ return newsrc;
+ }
+ }
}
if (domain === "d2t8nixuow17vt.cloudfront.net") {
| 7 |
diff --git a/packages/docs/tutorial/tutorial-requests.yaml b/packages/docs/tutorial/tutorial-requests.yaml @@ -62,9 +62,9 @@ _ref:
Choose the following:
- **Which API are you using?**: Google Sheets API
- - **Where will you be calling the API from?** : Web server (e.g. node.js, Tomcat)
- **What data will you be accessing?**: Application data
- **Are you planning to use this API with App Engine or Compute Engine?**: No, I'm not using them
+ - **Where will you be calling the API from?** : Web server (e.g. node.js, Tomcat)
Then click "What credentials do I need?"
| 1 |
diff --git a/src/post/Feed/PostFeedCard.js b/src/post/Feed/PostFeedCard.js @@ -85,14 +85,19 @@ const PostFeedCard = ({
}) => {
const isReplyPost = !!post.parent_author;
const preview = {
- text: () => (<div key="text" className="PostFeedCard__cell PostFeedCard__cell--text">
+ text: () => (
+ <div key="text" className="PostFeedCard__cell PostFeedCard__cell--text">
<BodyShort body={post.body} />
- </div>),
+ </div>
+ ),
+
embed: () => (embeds && embeds[0]) && <PostFeedEmbed key="embed" post={post} />,
- image: () => imagePath && <div key="image" className="PostFeedCard__thumbs">
- <PostModalLink post={post} onClick={() => openPostModal(post.id)}>
+
+ image: () => imagePath &&
+ <div key="image" className="PostFeedCard__thumbs">
+ <Link to={post.url} onClick={() => openPostModal(post.id)}>
<img alt="post" key={imagePath} src={imagePath} />
- </PostModalLink>
+ </Link>
</div>
};
| 14 |
diff --git a/Source/Core/Spherical.js b/Source/Core/Spherical.js /*global define*/
define([
+ './Check',
'./defaultValue',
'./defined',
'./DeveloperError'
], function(
+ Check,
defaultValue,
defined,
DeveloperError) {
@@ -34,9 +36,7 @@ define([
*/
Spherical.fromCartesian3 = function(cartesian3, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(cartesian3)) {
- throw new DeveloperError('cartesian3 is required');
- }
+ Check.typeOf.object(cartesian3, 'cartesian3');
//>>includeEnd('debug');
var x = cartesian3.x;
@@ -85,9 +85,7 @@ define([
*/
Spherical.normalize = function(spherical, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(spherical)) {
- throw new DeveloperError('spherical is required');
- }
+ Check.typeOf.object(spherical, 'spherical');
//>>includeEnd('debug');
if (!defined(result)) {
| 14 |
diff --git a/lib/waterline/utils/query/forge-stage-two-query.js b/lib/waterline/utils/query/forge-stage-two-query.js @@ -173,6 +173,12 @@ module.exports = function forgeStageTwoQuery(query, orm) {
case 'count': return [ 'criteria' ];
case 'sum': return [ 'numericAttrName', 'criteria' ];
case 'avg': return [ 'numericAttrName', 'criteria' ];
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ // FUTURE: consider renaming "numericAttrName" to something like "targetField"
+ // so that it's more descriptive even after being forged as part of a s3q.
+ // But note that this would be a pretty big change throughout waterline core,
+ // possibly other utilities, as well as being a breaking change to the spec
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case 'create': return [ 'newRecord' ];
case 'createEach': return [ 'newRecords' ];
| 0 |
diff --git a/README.md b/README.md @@ -24,6 +24,7 @@ This plugin is updated by its users, I just do maintenance and ensure that PRs a
* [Usage with Babel](#usage-with-babel)
* [Token authorizers](#token-authorizers)
* [Custom authorizers](#custom-authorizers)
+* [Remote authorizers](#remote-authorizers)
* [AWS API Gateway features](#aws-api-gateway-features)
* [Velocity nuances](#velocity-nuances)
* [Debug process](#debug-process)
@@ -196,6 +197,13 @@ The plugin only supports retrieving Tokens from headers. You can configure the h
"authorizerResultTtlInSeconds": "0"
}
```
+## Remote authorizers
+You are able to mock the response from remote authorizers by setting the environmental variable `AUTHORIZER` before running `sls offline start`
+
+Example:
+> Unix: `export AUTHORIZER='{"principalId": "123"}'`
+
+> Windows: `SET AUTHORIZER='{"principalId": "123"}'`
## AWS API Gateway Features
| 0 |
diff --git a/src/core/Dish.mjs b/src/core/Dish.mjs @@ -166,29 +166,27 @@ class Dish {
*/
async getTitle(maxLength) {
let title = "";
- const cloned = this.clone();
+ let cloned;
switch (this.type) {
case Dish.FILE:
- title = cloned.value.name;
+ title = this.value.name;
break;
case Dish.LIST_FILE:
- title = `${cloned.value.length} file(s)`;
+ title = `${this.value.length} file(s)`;
break;
case Dish.ARRAY_BUFFER:
case Dish.BYTE_ARRAY:
- title = await cloned.detectDishType();
- if (title === null) {
- cloned.value = cloned.value.slice(0, 2048);
- title = await cloned.get(Dish.STRING);
- }
- break;
+ title = await this.detectDishType();
+ if (title !== null) break;
+ // fall through if no mime type was detected
default:
+ cloned = this.clone();
+ cloned.value = cloned.value.slice(0, 256);
title = await cloned.get(Dish.STRING);
}
- title = title.slice(0, maxLength);
- return title;
+ return title.slice(0, maxLength);
}
| 7 |
diff --git a/package.json b/package.json "@babel/core": "7.5.0",
"@babel/plugin-proposal-class-properties": "7.10.4",
"@babel/plugin-transform-exponentiation-operator": "7.10.4",
- "@babel/plugin-transform-flow-strip-types": "7.10.4",
"@babel/plugin-transform-runtime": "7.11.5",
"@babel/runtime": "7.11.2",
"babel-core": "6.26.3",
"@react-native-community/eslint-config": "^2.0.0",
"eslint-plugin-fp": "^2.3.0",
"eslint-plugin-import": "2.22.1",
- "flow-bin": "^0.136.0",
"husky": "4.3.0",
"jest": "25.5.4",
"@sinonjs/fake-timers": "^6.0.0",
| 2 |
diff --git a/tools/genbuiltins.py b/tools/genbuiltins.py @@ -1349,9 +1349,10 @@ def resolve_magic(elem, objid_to_bidx):
# Helper to find a property from a property list, remove it from the
# property list, and return the removed property.
-def steal_prop(props, key):
+def steal_prop(props, key, allow_accessor=True):
for idx,prop in enumerate(props):
if prop['key'] == key:
+ if not (isinstance(prop['value'], dict) and prop['value']['type'] == 'accessor') or allow_accessor:
return props.pop(idx)
return None
@@ -1653,8 +1654,8 @@ def gen_ramobj_initdata_for_object(meta, be, bi, string_to_stridx, natfunc_name_
prop_proto = steal_prop(props, 'prototype')
prop_constr = steal_prop(props, 'constructor')
- prop_name = steal_prop(props, 'name')
- prop_length = steal_prop(props, 'length')
+ prop_name = steal_prop(props, 'name', allow_accessor=False)
+ prop_length = steal_prop(props, 'length', allow_accessor=False)
length = -1 # default value -1 signifies varargs
if prop_length is not None:
@@ -1774,13 +1775,13 @@ def gen_ramobj_initdata_for_props(meta, be, bi, string_to_stridx, natfunc_name_t
# name: encoded specially for function objects, so steal and ignore here
if bi['class'] == 'Function':
- prop_name = steal_prop(props, 'name')
+ prop_name = steal_prop(props, 'name', allow_accessor=False)
assert(prop_name is not None)
assert(isinstance(prop_name['value'], str))
assert(prop_name['attributes'] == 'c')
# length: encoded specially, so steal and ignore
- prop_proto = steal_prop(props, 'length')
+ prop_proto = steal_prop(props, 'length', allow_accessor=False)
# Date.prototype.toGMTString needs special handling and is handled
# directly in duk_hthread_builtins.c; so steal and ignore here.
| 9 |
diff --git a/test/MergeTest.js b/test/MergeTest.js @@ -194,6 +194,34 @@ test("Edge case from #2470", (t) => {
);
});
+test.skip("Edge case from #2684 (multiple conflicting override: props)", (t) => {
+ t.deepEqual(
+ Merge(
+ {
+ a: {
+ "override:b": {
+ c: [1],
+ },
+ },
+ },
+ {
+ a: {
+ "override:b": {
+ c: [2],
+ },
+ },
+ }
+ ),
+ {
+ a: {
+ b: {
+ c: [2],
+ },
+ },
+ }
+ );
+});
+
test("Deep, override: empty", (t) => {
t.deepEqual(Merge({}, { a: { b: [3, 4] } }), { a: { b: [3, 4] } });
t.deepEqual(Merge({}, { a: [2] }), { a: [2] });
| 0 |
diff --git a/common/lib/transport/connectionmanager.js b/common/lib/transport/connectionmanager.js @@ -64,11 +64,11 @@ var ConnectionManager = (function() {
params.stream = this.stream;
if(this.heartbeats !== undefined)
params.heartbeats = this.heartbeats;
+ params.v = Defaults.apiVersion;
+ params.lib = Defaults.libstring;
if(options.transportParams !== undefined) {
Utils.mixin(params, options.transportParams);
}
- params.v = Defaults.apiVersion;
- params.lib = Defaults.libstring;
return params;
};
| 11 |
diff --git a/src/js/services/spotify/actions.js b/src/js/services/spotify/actions.js @@ -907,8 +907,8 @@ export function getPlaylist( uri ){
// convert links in description
var description = response.description
- description = description.replace('<a href="spotify:artist:', '<a href="#'+global.baseURL+'artist/spotify:artist:')
- description = description.replace('<a href="spotify:album:', '<a href="#'+global.baseURL+'album/spotify:album:')
+ description = description.split('<a href="spotify:artist:').join('<a href="#'+global.baseURL+'artist/spotify:artist:')
+ description = description.split('<a href="spotify:album:').join('<a href="#'+global.baseURL+'album/spotify:album:')
var playlist = Object.assign(
{},
| 14 |
diff --git a/src/windshaft/map-base.js b/src/windshaft/map-base.js @@ -55,6 +55,7 @@ var WindshaftMap = Backbone.Model.extend({
}.bind(this);
options.error = function (response) {
+ response = response || {};
var windshaftErrors = this._getErrorsFromResponse(response);
this._modelUpdater.setErrors(windshaftErrors);
| 12 |
diff --git a/spec_app/spec/javascripts/up/link_spec.js.coffee b/spec_app/spec/javascripts/up/link_spec.js.coffee @@ -602,6 +602,21 @@ describe 'up.link', ->
up.hello $link
expect(up.link.isFollowable($link)).toBe(true)
+ it 'returns true for an [up-layer] link', ->
+ $link = $fixture('a[href="/foo"][up-layer="modal"]')
+ up.hello $link
+ expect(up.link.isFollowable($link)).toBe(true)
+
+ it 'returns true for an [up-mode] link', ->
+ $link = $fixture('a[href="/foo"][up-mode="modal"]')
+ up.hello $link
+ expect(up.link.isFollowable($link)).toBe(true)
+
+ it 'returns true for an [up-follow] link', ->
+ $link = $fixture('a[href="/foo"][up-follow]')
+ up.hello $link
+ expect(up.link.isFollowable($link)).toBe(true)
+
it 'returns true for an [up-modal] link', ->
$link = $fixture('a[href="/foo"][up-modal=".target"]')
up.hello $link
| 7 |
diff --git a/lambda/es-proxy-layer/package-lock.json b/lambda/es-proxy-layer/package-lock.json }
},
"node_modules/follow-redirects": {
- "version": "1.14.4",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
- "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==",
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
+ "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
"funding": [
{
"type": "individual",
}
},
"node_modules/minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"node_modules/neo-async": {
"version": "2.6.2",
}
},
"follow-redirects": {
- "version": "1.14.4",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
- "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g=="
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
+ "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA=="
},
"handlebars": {
"version": "4.7.7",
"requires": {}
},
"minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
},
"neo-async": {
"version": "2.6.2",
| 3 |
diff --git a/src/Request/uapi-request.js b/src/Request/uapi-request.js @@ -66,7 +66,9 @@ module.exports = function (
// adding target branch param from auth variable and render xml
params.TargetBranch = auth.targetBranch;
params.Username = auth.username;
- params.emulatePcc = auth.emulatePcc || false;
+ params.emulatePcc = auth.emulatePcc
+ ? auth.emulatePcc.toUpperCase()
+ : false;
const renderedObj = template(params);
return renderedObj;
};
| 0 |
diff --git a/src/parser/function.js b/src/parser/function.js @@ -365,7 +365,10 @@ module.exports = {
read_argument_list: function () {
let result = [];
this.expect("(") && this.next();
- if (this.token !== ")") {
+ if (this.token === this.tok.T_ELLIPSIS && this.peek() === ")") {
+ result.push(this.token);
+ this.next();
+ } else if (this.token !== ")") {
result = this.read_non_empty_argument_list();
}
this.expect(")") && this.next();
| 9 |
diff --git a/packages/yoroi-extension/features/transactions.feature b/packages/yoroi-extension/features/transactions.feature @@ -417,15 +417,14 @@ Feature: Send transaction
@it-171
Scenario: Can send all of a custom token (IT-171)
Given There is an Ergo wallet stored named ergo-token-wallet
- And I have a wallet with funds
+ And I have an ERGO wallet with funds
When I go to the send transaction screen
-
And I open the token selection dropdown
And I select token "USD"
- And I open the amount dropdown and select send all
And I fill the address of the form:
| address |
| 9guxMsa2S1Z4xzr5JHUHZesznThjZ4BMM9Ra5Lfx2E9duAnxEmv |
+ And I open the amount dropdown and select send all
And The transaction fees are "0.001100000"
And I click on the next button in the wallet send form
And I see send money confirmation dialog
| 4 |
diff --git a/best-practices.md b/best-practices.md * [Field and ID formatting](#field-and-id-formatting)
* [Field selection and Metadata Linking](#field-selection-and-metadata-linking)
* [Datetime selection](#datetime-selection)
+* [Null Geometries](#null-geometries)
* [Representing Vector Layers in STAC](#representing-vector-layers-in-stac)
* [Common Use Cases of Additional Fields for Assets](#common-use-cases-of-additional-fields-for-assets)
* [Static and Dynamic Catalogs](#static-and-dynamic-catalogs)
@@ -69,6 +70,23 @@ might choose to have `datetime` be the start. The key is to put in a date and ti
the focus of STAC. If `datetime` is set to `null` then it is strongly recommended to use it in conjunction with a content extension
that explains why it should not be set for that type of data.
+## Null Geometries
+
+Though the [GeoJSON standard](https://tools.ietf.org/html/rfc7946) allows null geometries, in STAC we strongly recommend
+that every item have a geometry, since the general expectation one using a SpatioTemporal Catalog is to be able to query
+all data by space and time. But there are some use cases where it can make sense to create a STAC Item before it gets
+a geometry. The most common of these is 'level 1' satellite data, which is a picture downlinked before it has been
+geospatially located.
+
+These follow the GeoJSON concept that it is an ['unlocated' feature](https://tools.ietf.org/html/rfc7946#section-3.2).
+So if the catalog has data that is not located then it can follow GeoJSON and set the geometry to null.
+
+TODO: we have to figure out what to do with BBOX, it needs to not be required to make this work, since the GeoJSON schema
+says a BBOX has minItems: 4. This waters down what is required in STAC even more, and potentially makes it so
+validation won't catch if someone has filled out a geometry and not a bbox.
+
+
+
## Representing Vector Layers in STAC
Many implementors are tempted to try to use STAC for 'everything', using it as a universal catalog of all their 'stuff'.
| 0 |
diff --git a/public/styles.css b/public/styles.css body { color: #333; margin: 5em; font: 14px/1.42 "Helvetica Neue", Helvetica, Arial, sans-serif; }
-.answer { border: 1px solid #aaa; padding: 5px; box-sizing: content-box; }
+.answer { border: 1px solid #aaa; padding: 5px; box-sizing: content-box; min-height: 100px;}
.list { border: 1px solid #eee; margin-bottom: 10px; }
.toggle {display: block;border: none;color: #68b4df;background: none;text-transform: uppercase;cursor: pointer;}
.button { padding: 5px; display: inline-block; cursor: pointer; width: 20px; text-align: center; }
@@ -14,12 +14,12 @@ button:hover { background: #eee; }
border: 1px solid #aaa;
line-height: 0.8;
vertical-align: top;
- font-size: 30px;
+ font-size: 20px;
position: absolute;
- right: -15px;
- top: -15px;
- width: 30px;
- height: 30px;
+ left: -10px;
+ top: -10px;
+ width: 20px;
+ height: 20px;
border-radius: 100px;
background: #eee;
text-align: center;
@@ -28,6 +28,7 @@ button:hover { background: #eee; }
.boxes { display: flex; }
.equationEditor {
width: 50%;
+ padding:10px;
}
.mathToolbar {
margin-bottom: 5px;
| 5 |
diff --git a/fragments/filter/README.md b/fragments/filter/README.md - **Conformance Classes:**
- Filter: <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:filter>
- Item Search Filter: <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:item-search-filter>
- - CQL2 Text: <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:cql-text>
- - CQL2 JSON: <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:cql-json>
+ - CQL Text: <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:cql-text>
+ - CQL JSON: <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:cql-json>
- Basic CQL: <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:basic-cql>
- Advanced Comparison Operators: <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:advanced-comparison-operators>
- Basic Spatial Operators: <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:basic-spatial-operators>
@@ -136,14 +136,14 @@ The implementation **must** support these conformance classes:
Basic CQL conformance classes to apply to the Item Search endpoint (`/search`). This class is the correlate of the OAFeat CQL Features
Filter class that binds Filter and Basic CQL to the Features resource (`/collections/{cid}/items`).
-The implementation **must** support at least one of the "CQL2 Text" or "CQL2 JSON" conformance classes that define
+The implementation **must** support at least one of the "CQL Text" or "CQL JSON" conformance classes that define
the CQL format used in the filter parameter:
-- CQL2 Text (`https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:cql-text`) defines that the CQL2 Text format is supported by Item Search
+- CQL Text (`https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:cql-text`) defines that the CQL Text format is supported by Item Search
- CQL JSON (`https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:cql-json`) defines that the CQL JSON format is supported by Item Search
If both are advertised as being supported, it is only required that both be supported for GET query parameters, and that
-only that CQL JSON be supported for POST JSON requests. It is recommended that clients use CQL2 Text in GET requests and
+only that CQL JSON be supported for POST JSON requests. It is recommended that clients use CQL Text in GET requests and
CQL JSON in POST requests.
For additional capabilities, the following classes can be implemented:
@@ -179,7 +179,7 @@ to the Features resource is not supported, as POST is used by the
It recommended that implementers start with fully implementing only a subset of functionality. A good place to start is
implementing only the Basic CQL conformance class of logical and comparison operators, defining a static Queryables
-schema with no queryables advertised, and only implementing CQL2 Text. Following from that can be support for
+schema with no queryables advertised, and only implementing CQL Text. Following from that can be support for
INTERSECTS, defining a static Queryables schema with only the basic Item properties, and
implementing CQL JSON. From there, other comparison operators can be implemented and a more
dynamic Queryables schema.
| 10 |
diff --git a/app/screens/home/search/initial/modifiers/modifier.tsx b/app/screens/home/search/initial/modifiers/modifier.tsx // See LICENSE.txt for license information.
import React, {Dispatch, RefObject, SetStateAction, useCallback} from 'react';
-import {StyleSheet} from 'react-native';
+import {Platform, StyleSheet} from 'react-native';
import OptionItem from '@components/option_item';
import {SearchRef} from '@components/search';
@@ -33,6 +33,12 @@ const Modifier = ({item, searchRef, searchValue, setSearchValue}: Props) => {
addModifierTerm(item.term);
}, [item.term, searchValue]);
+ const setNativeCursorPositionProp = (position?: number) => {
+ setTimeout(() => {
+ searchRef.current?.setNativeProps({selection: {start: position, end: position}});
+ }, 50);
+ };
+
const addModifierTerm = preventDoubleTap((modifierTerm) => {
let newValue = '';
if (!searchValue) {
@@ -46,10 +52,17 @@ const Modifier = ({item, searchRef, searchValue, setSearchValue}: Props) => {
setSearchValue(newValue);
if (item.cursorPosition) {
const position = newValue.length + item.cursorPosition;
+ setNativeCursorPositionProp(position);
+
+ if (Platform.OS === 'android') {
+ // on Android the selection set by setNativeProps is permanent thus the caret returns to the same
+ // position after we stop typing for a few ms. By setting the position to undefined,
+ // then the caret remains in place.
setTimeout(() => {
- searchRef.current?.setNativeProps({selection: {start: position, end: position}});
+ setNativeCursorPositionProp(undefined);
}, 50);
}
+ }
});
return (
| 1 |
diff --git a/index.mjs b/index.mjs @@ -10,7 +10,7 @@ Error.stackTraceLimit = 300;
const isProduction = process.argv[2] === '-p';
-const _isMediaType = p => /\.(?:png|jpe?g|gif|glb|mp3)$/.test(p);
+const _isMediaType = p => /\.(?:png|jpe?g|gif|glb|mp3|webm|mp4|mov)$/.test(p);
const _tryReadFile = p => {
try {
| 0 |
diff --git a/articles/quickstart/spa/angularjs/_includes/_install_angular_auth0.md b/articles/quickstart/spa/angularjs/_includes/_install_angular_auth0.md ## Install angular-auth0
To use auth0.js in your AngularJS application, you need a thin wrapper called angular-auth0.
+
Install angular-auth0.
```bash
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.