code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/Gruntfile.js b/Gruntfile.js @@ -44,16 +44,10 @@ module.exports = function (grunt) {
version: '11.0',
platform: 'windows 8.1'
},
- 'SL_IE13': {
+ 'SL_EDGE': {
base: 'SauceLabs',
- browserName: 'internet explorer',
- version: '13',
- platform: 'windows 10'
- },
- 'SL_IE14': {
- base: 'SauceLabs',
- browserName: 'internet explorer',
- version: '14',
+ browserName: 'microsoftedge',
+ version: 'latest',
platform: 'windows 10'
},
'SL_CHROME': {
| 14 |
diff --git a/src/og/layer/Vector.js b/src/og/layer/Vector.js @@ -236,13 +236,41 @@ class Vector extends Layer {
* @returns {og.layer.Vector} - Returns this layer.
*/
add(entity, rightNow) {
-
- let temp = this._hasImageryTiles;
-
if (!(entity._layer || entity._entityCollection)) {
entity._layer = this;
entity._layerIndex = this._entities.length;
this._entities.push(entity);
+ this._proceedEntity(entity, rightNow);
+ }
+ return this;
+ }
+
+ /**
+ * Adds entity to the layer in the index position.
+ * @public
+ * @param {og.Entity} entity - Entity.
+ * @param {Number} index - Index position.
+ * @param {boolean} [rightNow] - Entity insertion option. False is deafult.
+ * @returns {og.layer.Vector} - Returns this layer.
+ */
+ insert(entity, index, rightNow) {
+ if (!(entity._layer || entity._entityCollection)) {
+ entity._layer = this;
+ entity._layerIndex = index;
+ this._entities.splice(index, 0, entity);
+ for (let i = index + 1, len = this._entities.length; i < len; i++) {
+ this._entities[i]._layerIndex = i;
+ }
+
+ this._proceedEntity(entity, rightNow);
+ }
+
+ return this;
+ }
+
+ _proceedEntity(entity, rightNow) {
+
+ let temp = this._hasImageryTiles;
//
//...pointCloud, shape, model etc.
@@ -293,8 +321,6 @@ class Vector extends Layer {
this.events.dispatch(this.events.entityadd, entity);
}
- return this;
- }
/**
* Adds entity array to the layer.
| 0 |
diff --git a/examples/list/animate/MainContainer.mjs b/examples/list/animate/MainContainer.mjs @@ -16,18 +16,9 @@ class MainContainer extends Viewport {
className : 'Neo.examples.list.animate.MainContainer',
autoMount : true,
controller: MainContainerController,
- layout : {ntype: 'vbox', align: 'stretch'}
- }}
-
- /**
- * @param {Object} config
- */
- construct(config) {
- super.construct(config);
-
- let me = this;
+ layout : {ntype: 'vbox', align: 'stretch'},
- me.items = [{
+ items: [{
module: Toolbar,
flex : 'none',
@@ -84,8 +75,8 @@ class MainContainer extends Viewport {
module : List,
reference: 'list',
store : MainStore
- }];
- }
+ }]
+ }}
}
Neo.applyClassConfig(MainContainer);
| 4 |
diff --git a/packages/@uppy/react/src/propTypes.js b/packages/@uppy/react/src/propTypes.js @@ -26,7 +26,10 @@ const dashboard = {
uppy,
inline: PropTypes.bool,
plugins,
- width: PropTypes.number,
+ width: PropTypes.oneOfType([
+ PropTypes.string,
+ PropTypes.number
+ ]),
height: PropTypes.number,
showProgressDetails: PropTypes.bool,
hideUploadButton: PropTypes.bool,
| 11 |
diff --git a/userscript.user.js b/userscript.user.js @@ -763,6 +763,11 @@ var $$IMU_EXPORT$$;
headers_to_set["Sec-Fetch-Site"] = "same-origin";
headers_to_set.origin = data.url.replace(/^([a-z]+:\/\/[^/]+)(?:\/+.*)?$/, "$1");
+ } else if (data.imu_mode === "image") {
+ headers_to_set.accept = "image/webp,image/apng,image/*,*/*;q=0.8";
+ headers_to_set["Sec-Fetch-Dest"] = "image";
+ headers_to_set["Sec-Fetch-Mode"] = "no-cors";
+ headers_to_set["Sec-Fetch-Site"] = "same-site";
}
delete data.imu_mode;
@@ -36138,11 +36143,10 @@ var $$IMU_EXPORT$$;
// no referer is needed: http://www.reddit.com/r/traphentai/comments/fv608m/punish_the_king_of_the_fairies/fmgsi1d/?context=3
obj = {
url: src,
+ can_head: false,
+ imu_mode: "image",
headers: {
- Referer: ""
- },
- referer_ok: {
- same_domain_nosub: true
+ Referer: "https://www.gelbooru.com/"
}
};
@@ -86882,6 +86886,8 @@ var $$IMU_EXPORT$$;
if (add_link) {
a.href = url;
+
+ // set this here instead of outside this block for gelbooru: https://github.com/qsniyg/maxurl/issues/430
a.target = "_blank";
if (settings.mouseover_download) {
if (false) {
| 7 |
diff --git a/lib/device/humidifier.js b/lib/device/humidifier.js @@ -81,10 +81,6 @@ module.exports = class deviceHumidifier {
this.fanService.getCharacteristic(this.hapChar.RotationSpeed).value
)
- if (this.accessory.getService(this.hapServ.Lightbulb)) {
- this.accessory.removeService(this.accessory.getService(this.hapServ.Lightbulb))
- }
-
// Add the lightbulb service if it doesn't already exist
this.lightService =
this.accessory.getService(this.hapServ.Lightbulb) ||
@@ -97,9 +93,10 @@ module.exports = class deviceHumidifier {
this.cacheLightState = this.lightService.getCharacteristic(this.hapChar.On).value
// No set handler for brightness as not supported
- this.lightService
- .getCharacteristic(this.hapChar.Brightness)
- .onSet(async value => await this.internalLightBrightnessUpdate(value))
+ this.lightService.getCharacteristic(this.hapChar.Brightness).setProps({
+ minStep: 100,
+ validValues: [0, 100]
+ })
this.cacheLightBright = this.lightService.getCharacteristic(this.hapChar.Brightness).value
// Add the set handler to the lightbulb hue characteristic
@@ -300,58 +297,6 @@ module.exports = class deviceHumidifier {
}
}
- async internalLightBrightnessUpdate (value) {
- try {
- // Add the request to the queue so updates are send apart
- return await this.queue.add(async () => {
- // Don't continue if the state is the same as before
- if (this.cacheLightBright === value) {
- return
- }
-
- // Avoid multiple changes in short space of time
- const updateKey = this.funcs.generateRandomString(5)
- this.updateKeyBright = updateKey
- await this.funcs.sleep(300)
- if (updateKey !== this.updateKeyBright) {
- return
- }
-
- // This flag stops the plugin from requesting updates while pending on others
- this.updateInProgress = true
-
- // Generate the payload to send for the correct device model
- const namespace = 'Appliance.Control.Light'
- const payload = {
- light: {
- luminance: value,
- channel: 0,
- onoff: 1
- }
- }
-
- // Use the platform function to send the update to the device
- await this.platform.sendUpdate(this.accessory, {
- namespace,
- payload
- })
-
- // Update the cache and log the update has been successful
- this.cacheLightBright = value
- if (this.enableLogging) {
- this.log('[%s] current light brightness [%s%].', this.name, value)
- }
- })
- } catch (err) {
- const eText = this.funcs.parseError(err)
- this.log.warn('[%s] %s %s.', this.name, this.lang.sendFailed, eText)
- setTimeout(() => {
- this.lightService.updateCharacteristic(this.hapChar.Brightness, this.cacheLightBright)
- }, 2000)
- throw new this.hapErr(-70402)
- }
- }
-
async internalLightColourUpdate (value) {
try {
// Add the request to the queue so updates are send apart
| 13 |
diff --git a/articles/appliance/dashboard/updates.md b/articles/appliance/dashboard/updates.md @@ -26,4 +26,6 @@ Once you have selected the appropriate build, any **release notes** applicable w
To begin the update, click on "Update from Internet." You will be prompted once more to confirm to ensure that the appropriate backups have been made, since Appliance updates cannot be undone.
-> You should schedule Production updates with your Auth0 Customer Success Manager so that there is an Auth0 Customer Success Engineer available in case any patches need to be manually applied. For more information on updates, see [Updating the Appliance](/appliance/admin/updating-the-appliance).
+::: panel Schedule Appliance updates
+You should schedule Production updates with your Auth0 Customer Success Manager so that there is an Auth0 Customer Success Engineer available in case any patches need to be manually applied. For more information on updates, see [Updating the Appliance](/appliance/admin/updating-the-appliance).
+:::
| 14 |
diff --git a/packages/app/src/server/service/page-grant.ts b/packages/app/src/server/service/page-grant.ts @@ -37,8 +37,6 @@ type ComparableDescendants = {
};
type UpdateGrantInfo = {
- targetPage: any,
-} & ({
grant: typeof PageGrant.GRANT_PUBLIC,
} | {
grant: typeof PageGrant.GRANT_OWNER,
@@ -50,7 +48,7 @@ type UpdateGrantInfo = {
userIds: Set<ObjectIdLike>,
childrenOrItselfGroupIds: Set<ObjectIdLike>,
},
-});
+};
type DescendantPagesGrantInfo = {
grantSet: Set<number>,
| 7 |
diff --git a/en/blog/index.md b/en/blog/index.md # To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: page
+title: Posts
---
-<h2>{{ page.list_title | default: "Posts" }}</h2>
<ul class="post-list">
{%- for post in site.posts -%}
{%- if post.type == 'posts' -%}
| 4 |
diff --git a/packages/combobox/src/LionCombobox.js b/packages/combobox/src/LionCombobox.js @@ -124,7 +124,9 @@ export class LionCombobox extends OverlayMixin(LionListbox) {
outline: none;
width: 100%;
height: 100%;
- font-size: inherit;
+ font: inherit;
+ color: inherit;
+ border-radius: inherit;
box-sizing: border-box;
padding: 0;`;
| 0 |
diff --git a/index.mjs b/index.mjs @@ -4,6 +4,7 @@ import url from 'url';
import fs from 'fs';
import express from 'express';
import vite from 'vite';
+import fetch from 'node-fetch';
import wsrtc from 'wsrtc/wsrtc-server.mjs';
Error.stackTraceLimit = 300;
@@ -34,6 +35,8 @@ function makeId(length) {
return result;
}
+const proxy = httpProxy.createProxyServer();
+
(async () => {
const app = express();
app.use('*', async (req, res, next) => {
@@ -48,7 +51,20 @@ function makeId(length) {
.replace(/^\/public/, '')
.replace(/^(https?:\/(?!\/))/, '$1/');
if (_isMediaType(o.pathname)) {
- res.redirect(u);
+ const proxyReq = /https/.test(u) ? https.request(u) : http.request(u);
+ proxyReq.on('response', proxyRes => {
+ for (const header in proxyRes.headers) {
+ res.setHeader(header, proxyRes.headers[header]);
+ }
+ res.statusCode = proxyRes.statusCode;
+ proxyRes.pipe(res);
+ });
+ proxyReq.on('error', err => {
+ console.error(err);
+ res.statusCode = 500;
+ res.end();
+ });
+ proxyReq.end();
} else if (/^\/login/.test(o.pathname)) {
req.originalUrl = req.originalUrl.replace(/^\/(login)/,'/');
return res.redirect(req.originalUrl);
| 0 |
diff --git a/articles/libraries/auth0js/v8/index.md b/articles/libraries/auth0js/v8/index.md @@ -80,7 +80,7 @@ There are two required parameters that must be passed in the `options` object wh
| `scope` | optional | (String) The default scope(s) used by the application. Using scopes can allow you to return specific claims for specific fields in your request. You should read our [documentation on scopes](/scopes) for further details. |
| `audience` | optional | (String) The default audience to be used for requesting API access. |
| `responseType` | optional | (String) The default `responseType` used. It can be any space separated list of the values `code`, `token`, `id_token`. It defaults to `'token'`, unless a `redirectUri` is provided, then it defaults to `'code'`. |
-| `responseMode` | optional | (String) This option is omitted by default. Can be set to `'form_post'` in order to send the token or code to the `'redirectUri'` via POST. Supported values are `query`, `fragment` and `form_post`. |
+| `responseMode` | optional | (String) This option is omitted by default. Can be set to `'form_post'` in order to send the token or code to the `'redirectUri'` via POST. Supported values are `query`, `fragment` and `form_post`. The `query` value is only supported when `responseType` is `code`. |
| `_disableDeprecationWarnings` | optional | (Boolean) Disables the deprecation warnings, defaults to `false`. |
## Login
| 3 |
diff --git a/articles/dashboard/index.md b/articles/dashboard/index.md @@ -15,14 +15,18 @@ classes: topic-page
<ul class="topic-links">
<li>
<i class="icon icon-budicon-715"></i><a href="/dashboard/creating-users-in-the-management-portal">Create Users in the Dashboard</a>
- </li>
<p>How to create end users using the Dashboard</p>
+ </li>
<li>
<i class="icon icon-budicon-715"></i><a href="/dashboard/dashboard-tenant-settings">Manage Dashboard Administrators</a>
- </li>
<p>How to add and manage user accounts with admin privileges to the Dashboard</p>
+ </li>
<li>
<i class="icon icon-budicon-715"></i><a href="/dashboard/manage-dashboard-admins">Configure Your Dashboard Tenant Settings</a>
- </li>
<p>How to change the settings for a given tenant using the Dashboard</p>
+ </li>
+ <li>
+ <i class="icon icon-budicon-715"></i><a href="/logs">Logs</a>
+ <p>How to view log data and understand log event types</p>
+ </li>
</ul>
| 0 |
diff --git a/src/common/blockchain/ppow-blockchain/blockchain/forks/PPoW-Blockchain-Fork.js b/src/common/blockchain/ppow-blockchain/blockchain/forks/PPoW-Blockchain-Fork.js @@ -111,6 +111,7 @@ class PPoWBlockchainFork extends InterfaceBlockchainFork {
let downloading = true;
let pos = 0;
let buffers = [];
+ let timeoutCount = 100;
while (downloading && pos < timeoutCount) {
| 12 |
diff --git a/src/UnitTests/Core/Games/Heist/HeistGameTests/AttemptToJoinHeistShould.cs b/src/UnitTests/Core/Games/Heist/HeistGameTests/AttemptToJoinHeistShould.cs @@ -11,7 +11,7 @@ public class AttemptToJoinHeistShould
[Fact]
public void AllowJoining_GivenRandomSelectionForFirstTimer()
{
- var heistGame = new HeistGame(new Mock<IAutomatedActionSystem>().Object);
+ var heistGame = new HeistGame(new Mock<IAutomatedActionSystem>().Object, null);
var displayName = "nameOfPerson";
JoinGameResult attemptToJoinHeist = heistGame.AttemptToJoinHeist(displayName, out HeistRoles role);
@@ -22,7 +22,7 @@ public void AllowJoining_GivenRandomSelectionForFirstTimer()
[Fact]
public void DisallowJoining_GivenSameJoiner()
{
- var heistGame = new HeistGame(new Mock<IAutomatedActionSystem>().Object);
+ var heistGame = new HeistGame(new Mock<IAutomatedActionSystem>().Object, null);
var displayName = "nameOfPerson";
JoinGameResult attemptToJoinHeist1 = heistGame.AttemptToJoinHeist(displayName, out HeistRoles role1);
| 1 |
diff --git a/src/bot/publicbot/commands/earn.js b/src/bot/publicbot/commands/earn.js @@ -5,9 +5,12 @@ else {
Users.findOne({id: message.author.id}).then(user=>{
if(!user) message.reply("Nani?! You're not logined!\nPlease login to RDL to make an account in order to recieve money!\nLogin link:\nhttps://discord.rovelstars.com/login");
else {
+ let act = false;
+ if(message.guild.id=="602906543356379156"){
act = privatebot.users.cache.get(message.author.id).presence.activites.filter(e=>{return (e.type=="CUSTOM_STATUS" && (e.state.includes("dscrdly.com") || e.state.includes("discord.rovelstars.com")))});
if(act.length==0) act=false;
else act=true;
+ }
const c = Math.floor(Math.random()*10)+1;
user.bal+=c;
if(act) user.bal+=10;
| 11 |
diff --git a/lib/assets/javascripts/new-dashboard/store/mutations/visualizations.js b/lib/assets/javascripts/new-dashboard/store/mutations/visualizations.js @@ -45,32 +45,14 @@ export function setVisualizations (state, visualizationsData) {
state.isFetching = false;
}
-export function updateLike (state, {visualizationId, liked}) {
- const visualization = state.list[visualizationId];
-
- if (visualization) {
- visualization.liked = liked;
- }
-}
-
-export function updateNumberLikes (state, {visualizationId, liked}) {
- state.list[visualizationId].liked = liked;
- state.metadata.total_likes += liked ? 1 : -1;
+export function updateNumberLikes (state, {visualizationAttributes}) {
+ state.metadata.total_likes += visualizationAttributes.liked ? 1 : -1;
}
-export function updateVisualizationGlobally (state, {visualizationId, visualizationAttributes}) {
- const isVisualizationInMaps = state.maps.list.hasOwnProperty(visualizationId);
- if (isVisualizationInMaps) {
- Object.assign(state.maps.list[visualizationId], visualizationAttributes);
- }
-
- const isVisualizationInDatasets = state.datasets.list.hasOwnProperty(visualizationId);
- if (isVisualizationInDatasets) {
- Object.assign(state.datasets.list[visualizationId], visualizationAttributes);
- }
+export function updateVisualization (state, {visualizationId, visualizationAttributes}) {
+ const isVisualizationPresent = state.list.hasOwnProperty(visualizationId);
- const isVisualizationInRecentContent = state.recentContent.list.hasOwnProperty(visualizationId);
- if (isVisualizationInRecentContent) {
- Object.assign(state.recentContent.list[visualizationId], visualizationAttributes);
+ if (isVisualizationPresent) {
+ Object.assign(state.list[visualizationId], visualizationAttributes);
}
}
| 2 |
diff --git a/Specs/Core/S2CellSpec.js b/Specs/Core/S2CellSpec.js @@ -224,23 +224,29 @@ describe("Core/S2Cell", function () {
});
it("gets correct center of cell", function () {
- expect(S2Cell.fromToken("1").getCenter()).toEqual(
- Cartesian3.fromDegrees(0, 0)
+ expect(S2Cell.fromToken("1").getCenter()).toEqualEpsilon(
+ Cartesian3.fromDegrees(0.0, 0.0),
+ CesiumMath.EPSILON15
);
- expect(S2Cell.fromToken("3").getCenter()).toEqual(
- Cartesian3.fromDegrees(90, 0)
+ expect(S2Cell.fromToken("3").getCenter()).toEqualEpsilon(
+ Cartesian3.fromDegrees(90.0, 0.0),
+ CesiumMath.EPSILON15
);
- expect(S2Cell.fromToken("5").getCenter()).toEqual(
- Cartesian3.fromDegrees(-180, 90)
+ expect(S2Cell.fromToken("5").getCenter()).toEqualEpsilon(
+ Cartesian3.fromDegrees(-180.0, 90.0),
+ CesiumMath.EPSILON15
);
- expect(S2Cell.fromToken("7").getCenter()).toEqual(
- Cartesian3.fromDegrees(-180, 0)
+ expect(S2Cell.fromToken("7").getCenter()).toEqualEpsilon(
+ Cartesian3.fromDegrees(-180.0, 0.0),
+ CesiumMath.EPSILON15
);
- expect(S2Cell.fromToken("9").getCenter()).toEqual(
- Cartesian3.fromDegrees(-90, 0)
+ expect(S2Cell.fromToken("9").getCenter()).toEqualEpsilon(
+ Cartesian3.fromDegrees(-90.0, 0.0),
+ CesiumMath.EPSILON15
);
- expect(S2Cell.fromToken("b").getCenter()).toEqual(
- Cartesian3.fromDegrees(0, -90)
+ expect(S2Cell.fromToken("b").getCenter()).toEqualEpsilon(
+ Cartesian3.fromDegrees(0.0, -90.0),
+ CesiumMath.EPSILON15
);
expect(S2Cell.fromToken("2ef59bd352b93ac3").getCenter()).toEqualEpsilon(
Cartesian3.fromDegrees(105.64131803774308, -10.490091033598308),
@@ -254,6 +260,10 @@ describe("Core/S2Cell", function () {
it("throws on invalid vertex index", function () {
var cell = new S2Cell(BigInt("3383782026971709440"));
+ expect(function () {
+ cell.getVertex(-1);
+ }).toThrowDeveloperError();
+
expect(function () {
cell.getVertex(4);
}).toThrowDeveloperError();
| 7 |
diff --git a/server/game/cards/01 - Core/TogashiInitiate.js b/server/game/cards/01 - Core/TogashiInitiate.js @@ -6,8 +6,8 @@ class TogashiInitiate extends DrawCard {
title: 'Honor this character',
condition: () => this.game.currentConflict && this.game.currentConflict.isAttacking(this),
cost: ability.costs.payFateToRing(1),
- handler: () => {
- this.game.addMessage('{0} uses {1} to honor itself', this.controller, this);
+ handler: context => {
+ this.game.addMessage('{0} uses {1} to honor itself by paying 1 fate to the {2} ring', this.controller,this, context.costs.payFateToRing.element);
this.controller.honorCard(this);
}
});
| 3 |
diff --git a/README.md b/README.md # [Ably](https://www.ably.io)
-[](https://badge.fury.io/js/ably)
-[](https://badge.fury.io/bo/ably)
+[](https://img.shields.io/npm/v/ably.svg?style=flat)
A JavaScript client library for [Ably Realtime](https://www.ably.io), a realtime data delivery platform.
| 14 |
diff --git a/planet.js b/planet.js @@ -558,7 +558,7 @@ let channelConnectionOpen = null;
const peerConnections = [];
const _connectRoom = async (roomName, worldURL) => {
- channelConnection = new XRChannelConnection(`wss://${worldURL}:4443`, {roomName});
+ channelConnection = new XRChannelConnection(`wss://${worldURL}`, {roomName});
channelConnection.addEventListener('open', async e => {
channelConnectionOpen = true;
| 2 |
diff --git a/io-manager.js b/io-manager.js @@ -359,7 +359,7 @@ window.addEventListener('keydown', e => {
if (weaponsManager.canPush()) {
ioManager.keys.backward = true;
// weaponsManager.menuPush(1);
- } else if (!(e.shiftKey && (e.ctrlKey || e.metaKey))) {
+ } /* else if (!(e.shiftKey && (e.ctrlKey || e.metaKey))) {
e.preventDefault();
e.stopPropagation();
document.getElementById('key-c').dispatchEvent(new KeyboardEvent('click', { // camera
@@ -369,7 +369,7 @@ window.addEventListener('keydown', e => {
altKey: e.altKey,
metaKey: e.metaKey,
}));
- }
+ } */
break;
}
case 82: { // R
| 2 |
diff --git a/docs/installation.rst b/docs/installation.rst Installation
============
-Requirements: geth (1.5.8 or higher), node (6.9.1 or higher is recommended) and npm
+Requirements: geth (1.6.5 or higher recommended, 1.6.0 or lower for whisper support), node (6.9.1 or higher is recommended) and npm
serpent (develop) if using contracts with Serpent, testrpc (3.0 or higher)
if using the simulator or the test functionality. Further: depending on
the dapp stack you choose: `IPFS <https://ipfs.io/>`__
| 3 |
diff --git a/articles/libraries/lock/v11/migration-v9-v11.md b/articles/libraries/lock/v11/migration-v9-v11.md @@ -4,9 +4,10 @@ title: Migrating from Lock.js v9 to v11
description: How to migrate from Lock.js v9 to v11
toc: true
---
-
# Migrating from Lock.js v9 to v11
+This guide includes all the information you need to update your Lock 9 installation to Lock 11.
+
## Migration Steps
<%= include('../../_includes/_get_lock_latest_version') %>
| 0 |
diff --git a/docs/source/docs/positioning.blade.md b/docs/source/docs/positioning.blade.md @@ -28,22 +28,22 @@ title: "Positioning"
<tbody class="align-baseline">
<tr>
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.static</td>
- <td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">position: 'static';</td>
+ <td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">position: static;</td>
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Position an element according to the normal flow of the document.</td>
</tr>
<tr>
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.fixed</td>
- <td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">position: 'fixed';</td>
+ <td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">position: fixed;</td>
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Position an element relative to the browser window.</td>
</tr>
<tr>
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.absolute</td>
- <td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">position: 'absolute';</td>
+ <td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">position: absolute;</td>
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Position an element outside of the normal flow of the document, causing neighboring elements to act as if the element doesn't exist.</td>
</tr>
<tr>
<td class="p-2 border-t border-smoke-light font-mono text-xs text-purple-dark whitespace-no-wrap">.relative</td>
- <td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">position: 'relative';</td>
+ <td class="p-2 border-t border-smoke-light font-mono text-xs text-blue-dark whitespace-no-wrap">position: relative;</td>
<td class="p-2 border-t border-smoke-light text-sm text-grey-darker">Position an element according to the normal flow of the document.</td>
</tr>
<tr>
| 2 |
diff --git a/server/views/topics/apicache.py b/server/views/topics/apicache.py @@ -261,7 +261,7 @@ def topic_tag_counts(user_mc_key, topics_id, tag_sets_id, sample_size):
not a topicSentenceFieldCount method that takes filters (which doesn't exit)
'''
snapshots_id, timespans_id, foci_id, q = filters_from_args(request.args)
- timespan_query = "{~ timespan:"+str(timespans_id)+" }"
+ timespan_query = "timespans_id:{}".format(timespans_id)
if (q is None) or (len(q) == 0):
query = timespan_query
else:
| 4 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -13,7 +13,7 @@ import {angleDifference, getVelocityDampingFactor} from '../util.js';
import easing from '../easing.js';
import CBOR from '../cbor.js';
import Simplex from '../simplex-noise.js';
-import {crouchMaxTime, useMaxTime, avatarInterpolationFrameRate, avatarInterpolationTimeDelay, avatarInterpolationNumFrames} from '../constants.js';
+import {crouchMaxTime, useMaxTime, aimMaxTime, avatarInterpolationFrameRate, avatarInterpolationTimeDelay, avatarInterpolationNumFrames} from '../constants.js';
import {FixedTimeStep} from '../interpolants.js';
import metaversefile from 'metaversefile';
import {
@@ -1228,8 +1228,9 @@ class Avatar {
this.swordSideSlashTime = 0;
this.swordTopDownSlashState = false;
this.swordTopDownSlashTime = 0;
- this.aimState = false;
- this.aimDirection = new THREE.Vector3();
+ this.aimTime = NaN;
+ this.aimAnimation = null;
+ // this.aimDirection = new THREE.Vector3();
// internal state
this.lastPosition = new THREE.Vector3();
@@ -2220,7 +2221,8 @@ class Avatar {
_getHorizontalBlend(k, lerpFn, dst);
};
- if (this.useTime >= 0) {
+ // console.log('got aim time', this.useAnimation, this.useTime, this.aimAnimation, this.aimTime);
+ if (this.useAnimation) {
return spec => {
const {
animationTrackName: k,
@@ -2229,7 +2231,8 @@ class Avatar {
} = spec;
if (isTop) {
- const useAnimation = (this.useAnimation && useAnimations[this.useAnimation]) //|| useAnimations[defaultUseAnimation];
+ const useAnimation = (this.useAnimation && useAnimations[this.useAnimation]);
+ // console.log('get use animation', [this.useAnimation, useAnimation]);
if (useAnimation) {
const t2 = (this.useTime/useMaxTime) % useAnimation.duration;
const src2 = useAnimation.interpolants[k];
@@ -2243,6 +2246,29 @@ class Avatar {
_handleDefault(spec);
}
};
+ } else if (this.aimAnimation) {
+ return spec => {
+ const {
+ animationTrackName: k,
+ dst,
+ isTop,
+ } = spec;
+
+ if (isTop) {
+ const aimAnimation = (this.aimAnimation && aimAnimations[this.aimAnimation]);
+ if (aimAnimation) {
+ const t2 = (this.aimTime/aimMaxTime) % aimAnimation.duration;
+ const src2 = aimAnimation.interpolants[k];
+ const v2 = src2.evaluate(t2);
+
+ dst.fromArray(v2);
+ } else {
+ _handleDefault(spec);
+ }
+ } else {
+ _handleDefault(spec);
+ }
+ };
}
return _handleDefault;
};
| 4 |
diff --git a/core/server/api/v3/invites.js b/core/server/api/v3/invites.js const Promise = require('bluebird');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const invites = require('../../services/invites');
const models = require('../../models');
const api = require('./index');
const ALLOWED_INCLUDES = [];
const UNSAFE_ATTRS = ['role_id'];
+const messages = {
+ inviteNotFound: 'Invite not found.'
+};
module.exports = {
docName: 'invites',
@@ -50,7 +53,7 @@ module.exports = {
.then((model) => {
if (!model) {
return Promise.reject(new errors.NotFoundError({
- message: i18n.t('errors.api.invites.inviteNotFound')
+ message: tpl(messages.inviteNotFound)
}));
}
@@ -78,7 +81,7 @@ module.exports = {
.then(() => null)
.catch(models.Invite.NotFoundError, () => {
return Promise.reject(new errors.NotFoundError({
- message: i18n.t('errors.api.invites.inviteNotFound')
+ message: tpl(messages.inviteNotFound)
}));
});
}
| 14 |
diff --git a/electron/cli/index.js b/electron/cli/index.js @@ -43,7 +43,7 @@ const camelcase = flag =>
// Now we must think which arguments passed to cli must be passed down to
// parity.
const parityArgv = cli.rawArgs
- .splice(cli.rawArgs.findIndex(item => item.startsWith('--'))) // Remove all arguments until one --option
+ .splice(Math.max(cli.rawArgs.findIndex(item => item.startsWith('--'))), 0) // Remove all arguments until one --option
.filter((item, index, array) => {
const key = camelcase(item.replace('--', '').replace('no-', '')); // Remove first 2 '--' and then camelCase
@@ -58,7 +58,9 @@ const parityArgv = cli.rawArgs
return true;
}
- const previousKey = camelcase(array[index - 1].substring(2));
+ const previousKey = camelcase(
+ array[index - 1].replace('--', '').replace('no-', '')
+ );
if (cli[previousKey] === item) {
// If it's an argument of an option consumed by commander.js, then we
// skip it too
| 1 |
diff --git a/nyc/index.html b/nyc/index.html </div>
<div class="bio-container">
<div class="organizer-container">
- <img src="./images/bios/antonia_photo.jpg" class="organizer" />
+ <img src="./images/bios/melissa_photo.jpg" class="organizer" />
</div>
<div class="bio">
- <p class="name">Antonia Blair</p>
+ <p class="name">Melissa Ferrari</p>
<p>
- Antonia Blair is a software developer based in Brooklyn. Before learning to program,
- she worked as a writer and art book editor. She is particularly interested in the intersection of art and technology.
+ Melissa is working towards a PhD in physics at NYU where she uses Python to solve problems related to squishy things.
+ She learns Python by attending workshops and conferences, watching online tutorials, and putting her skills into practice by attending hackathons and data science challenges.
</p>
<p class="social-buttons">
- <a href="https://twitter.com/AntoniaBlairArt" target="_blank"><span class="fa fa-twitter"> </span></a>
- <a href="https://www.linkedin.com/in/antonia-blair-31767a32" target="_blank"><span class="fa fa-linkedin"> </span></a>
- <a href="http://www.antoniablair.com" target="_blank"><span class="fa fa-desktop"> </span></a>
- <a href="https://github.com/antoniablair" target="_blank"><span class="fa fa-github"> </span></a>
+ <a href="https://twitter.com/Ferrari3Melissa" target="_blank"><span class="fa fa-twitter"> </span></a>
+ <a href="https://www.linkedin.com/in/melissa-ferrari/" target="_blank"><span class="fa fa-linkedin"> </span></a>
+ <a href="https://github.com/mferrari3" target="_blank"><span class="fa fa-github"> </span></a>
</p>
</div>
</div>
<div class="bio-container">
<div class="organizer-container">
- <img src="./images/bios/melissa_photo.jpg" class="organizer" />
+ <img src="./images/bios/antonia_photo.jpg" class="organizer" />
</div>
<div class="bio">
- <p class="name">Melissa Ferrari</p>
+ <p class="name">Antonia Blair</p>
<p>
- Melissa is working towards a PhD in physics at NYU where she uses Python to solve problems related to squishy things.
- She learns Python by attending workshops and conferences, watching online tutorials, and putting her skills into practice by attending hackathons and data science challenges.
+ Antonia Blair is a software developer based in Brooklyn. Before learning to program,
+ she worked as a writer and art book editor. She is particularly interested in the intersection of art and technology.
</p>
<p class="social-buttons">
- <a href="https://twitter.com/Ferrari3Melissa" target="_blank"><span class="fa fa-twitter"> </span></a>
- <a href="https://www.linkedin.com/in/melissa-ferrari/" target="_blank"><span class="fa fa-linkedin"> </span></a>
- <a href="https://github.com/mferrari3" target="_blank"><span class="fa fa-github"> </span></a>
+ <a href="https://twitter.com/AntoniaBlairArt" target="_blank"><span class="fa fa-twitter"> </span></a>
+ <a href="https://www.linkedin.com/in/antonia-blair-31767a32" target="_blank"><span class="fa fa-linkedin"> </span></a>
+ <a href="http://www.antoniablair.com" target="_blank"><span class="fa fa-desktop"> </span></a>
+ <a href="https://github.com/antoniablair" target="_blank"><span class="fa fa-github"> </span></a>
</p>
</div>
</div>
| 5 |
diff --git a/src/v1/internal/packstream-v2.js b/src/v1/internal/packstream-v2.js @@ -220,10 +220,10 @@ function unpackDuration(unpacker, structSize, buffer) {
}
function packLocalTime(value, packer, onError) {
- const totalNanos = cypherLocalTimeToNanoOfDay(value);
+ const nanoOfDay = cypherLocalTimeToNanoOfDay(value);
const packableStructFields = [
- packer.packable(totalNanos, onError)
+ packer.packable(nanoOfDay, onError)
];
packer.packStruct(LOCAL_TIME, packableStructFields, onError);
}
@@ -242,11 +242,11 @@ function unpackLocalTime(unpacker, structSize, buffer) {
* @param {function} onError the error callback.
*/
function packTime(value, packer, onError) {
- const totalNanos = cypherLocalTimeToNanoOfDay(value.localTime);
+ const nanoOfDay = cypherLocalTimeToNanoOfDay(value.localTime);
const offsetSeconds = int(value.offsetSeconds);
const packableStructFields = [
- packer.packable(totalNanos, onError),
+ packer.packable(nanoOfDay, onError),
packer.packable(offsetSeconds, onError)
];
packer.packStruct(TIME, packableStructFields, onError);
| 7 |
diff --git a/src/js/base/module/Editor.js b/src/js/base/module/Editor.js @@ -69,13 +69,13 @@ export default class Editor {
/**
* fontName Command for document.execCommand
*/
- this.fontName = this.wrapCommand((fontFamily) => {
+ this.fontName = this.wrapCommand((fontName) => {
// [workaround]
// - If the font family has spaces, you must enclose it in quotation marks.
- if (env.isChrome && fontFamily.indexOf(' ') > -1) {
- fontFamily = '"' + fontFamily + '"';
+ if (env.isChrome && fontName.indexOf(' ') > -1) {
+ fontName = `"${fontName}"`;
}
- document.execCommand('fontName', false, fontFamily);
+ document.execCommand('fontName', false, fontName);
});
context.memo('help.fontName', this.lang.help.fontName);
| 14 |
diff --git a/runtime.js b/runtime.js @@ -118,9 +118,51 @@ const _loadGltf = async (file, {optimize = false, physics = false, physics_url =
URL.revokeObjectURL(srcUrl);
}
}
- const {parser} = o;
+ const {parser, animations} = o;
o = o.scene;
- const _loadLightmaps = parser => {
+ const animationMixers = [];
+ const _loadHubsComponents = () => {
+ const _loadAnimations = () => {
+ o.traverse(o => {
+ if (o.isMesh) {
+ console.log('got o', o, animations);
+ const clip = animations.find(a => a.name === 'idle');
+
+ const mesh = o;
+
+ const mixer = new THREE.AnimationMixer( mesh );
+ // const clips = mesh.animations;
+
+ // Update the mixer on each frame
+ let lastTimestamp = Date.now();
+ function update (delta) {
+ const now = Date.now();
+ const timeDiff = now - lastTimestamp;
+ const deltaSeconds = timeDiff / 1000;
+ mixer.update( deltaSeconds );
+ lastTimestamp = now;
+ }
+
+ // Play a specific animation
+ // const clip = THREE.AnimationClip.findByName( clips, 'idle' );
+ if (clip) {
+ const action = mixer.clipAction( clip );
+ action.play();
+
+ /* // Play all animations
+ clips.forEach( function ( clip ) {
+ mixer.clipAction( clip ).play();
+ } ); */
+ animationMixers.push({
+ update,
+ });
+ }
+ }
+ });
+ };
+ _loadAnimations();
+
+ const _loadLightmaps = () => {
const _loadLightmap = async (parser, materialIndex) => {
const lightmapDef = parser.json.materials[materialIndex].extensions.MOZ_lightmap;
const [material, lightMap] = await Promise.all([
@@ -142,7 +184,9 @@ const _loadGltf = async (file, {optimize = false, physics = false, physics_url =
}
}
};
- _loadLightmaps(parser);
+ _loadLightmaps();
+ };
+ _loadHubsComponents();
const mesh = (() => {
if (optimize) {
@@ -230,6 +274,14 @@ const _loadGltf = async (file, {optimize = false, physics = false, physics_url =
mesh.getPhysicsIds = () => physicsIds;
mesh.getStaticPhysicsIds = () => staticPhysicsIds;
+ const appId = ++appIds;
+ const app = appManager.createApp(appId);
+ appManager.setAnimationLoop(appId, () => {
+ for (const mixer of animationMixers) {
+ mixer.update();
+ }
+ });
+
return mesh;
/* const u = URL.createObjectURL(file);
| 0 |
diff --git a/src/components/EditorWidgets/Markdown/MarkdownControl/VisualEditor/keys.js b/src/components/EditorWidgets/Markdown/MarkdownControl/VisualEditor/keys.js @@ -3,37 +3,6 @@ import { isHotkey } from 'is-hotkey';
export default onKeyDown;
-/**
- * Minimal re-implementation of Slate's undo/redo functionality, but with focus
- * forced back into editor afterward.
- */
-function changeHistory(change, type) {
-
- /**
- * Get the history for undo or redo (determined via `type` param).
- */
- const { history } = change.value;
- if (!history) return;
- const historyOfType = history[`${type}s`];
-
- /**
- * If there is a next history item to apply, and it's valid, apply it.
- */
- const next = historyOfType.first();
- const historyOfTypeIsValid = historyOfType.size > 1
- || (next && next.length > 1)
- || (next && next[0] && next[0].type !== 'set_selection';
-
- if (next && historyOfTypeIsValid) {
- change[type]();
- }
-
- /**
- * Always ensure focus is set.
- */
- return change.focus();
-}
-
function onKeyDown(event, change) {
const createDefaultBlock = () => {
return Block.create({
@@ -70,26 +39,9 @@ function onKeyDown(event, change) {
}
if (isHotkey(`mod+${event.key}`, event)) {
-
- /**
- * Undo and redo work automatically with Slate, but focus is lost in certain
- * actions. We override Slate's built in undo/redo here and force focus
- * back to the editor each time.
- */
- if (event.key === 'y') {
- event.preventDefault();
- return changeHistory(change, 'redo');
- }
-
- if (event.key === 'z') {
- event.preventDefault();
- return changeHistory(change, event.isShift ? 'redo' : 'undo');
- }
-
const marks = {
b: 'bold',
i: 'italic',
- u: 'underline',
s: 'strikethrough',
'`': 'code',
};
| 2 |
diff --git a/docs/plugins.md b/docs/plugins.md @@ -42,20 +42,20 @@ Each plugin has a different responsibility, and each enables itself:
## Using a plugin
Plugins are local to the project, or external npm packages. Plugin configuration consists of a module name with options.
-This example uses the `release-it-bar` module and is configured in `package.json`:
+This example uses the `release-it-plugin` module and is configured in `package.json`:
```json
{
"devDependencies": {
"release-it": "*",
- "release-it-bar": "*"
+ "release-it-plugin": "*"
},
"release-it": {
"github": {
"release": true
},
"plugins": {
- "release-it-bar": {
+ "release-it-plugin": {
"key": "value"
}
}
@@ -63,12 +63,12 @@ This example uses the `release-it-bar` module and is configured in `package.json
}
```
-Alternatively, here's a `foo` plugin as a local module:
+Alternatively, here's a `release-it-plugin` as a local module:
```json
{
"plugins": {
- "./scripts/foo.js": {
+ "./scripts/release-it-plugin.js": {
"key": "value"
}
}
@@ -78,12 +78,27 @@ Alternatively, here's a `foo` plugin as a local module:
## Creating a plugin
To create a plugin, extend the `Plugin` class, and implement one or more release-cycle methods. See the "interface"
-below (where none of the methods is required). Any of these methods can be `async` (except for
-`getIncrementedVersionCI`). If you're interested in writing a plugin, please take a look at
-[the `runTasks` test helper](https://github.com/release-it/release-it/blob/master/test/util/index.js#L33-L54), to see
-how a plugin is integrated in the release process. Also see the
-[base `Plugin` class](https://github.com/release-it/release-it/blob/master/lib/plugin/Plugin.js) where the plugin should
-be extended from.
+below (where none of the methods is required). Any of these methods can be `async`. See this
+[test helper](https://github.com/release-it/release-it/blob/master/test/util/index.js#L54) to get an idea of the methods
+a release-it plugin can implement.
+
+Note that `release-it` should be a `peerDependency` (and probably also a `devDependency` to use its helpers in the
+plugin tests). Here's an example `package.json`:
+
+```json
+{
+ "name": "release-it-plugin",
+ "version": "1.0.0",
+ "description": "My release-it plugin",
+ "main": "index.js",
+ "peerDpendencies": {
+ "release-it": "^14.2.0"
+ },
+ "devDependencies": {
+ "release-it": "^14.2.0"
+ }
+}
+```
### Example
@@ -362,8 +377,4 @@ Here's an example:
- All packages tagged with [`"release-it-plugin"` on npm](https://www.npmjs.com/search?q=keywords:release-it-plugin).
- Recipe: [my-version](https://github.com/release-it/release-it/blob/master/docs/recipes/my-version.md) - example plugin
-- Internal release-it plugins:
- - [Git](https://github.com/release-it/release-it/blob/master/lib/plugin/git/Git.js)
- - [GitHub](https://github.com/release-it/release-it/blob/master/lib/plugin/github/GitHub.js)
- - [GitLab](https://github.com/release-it/release-it/blob/master/lib/plugin/gitlab/GitLab.js)
- - [npm](https://github.com/release-it/release-it/blob/master/lib/plugin/npm/npm.js)
+- [Internal release-it plugins](https://github.com/release-it/release-it/tree/master/lib/plugin)
| 7 |
diff --git a/src/components/views/ProbeNetwork/index.js b/src/components/views/ProbeNetwork/index.js @@ -71,9 +71,13 @@ class ProbeNetwork extends Component {
const probes = this.props.data.probes[0];
const { processedData, probes: network } = probes;
return (
- <Container className="probe-network" style={{ height: "100%" }}>
+ <Container fluid className="probe-network" style={{ height: "100%" }}>
<Row style={{ height: "100%" }}>
- <Col sm={8} style={{ height: "100%" }} className="network-grid">
+ <Col
+ sm={{ size: 6, offset: 1 }}
+ style={{ height: "100%" }}
+ className="network-grid"
+ >
<Measure
bounds
onResize={contentRect => {
@@ -92,7 +96,7 @@ class ProbeNetwork extends Component {
)}
</Measure>
</Col>
- <Col sm={{ size: 3, offset: 1 }}>
+ <Col sm={{ size: 3, offset: 2 }}>
<h3>Processed Data</h3>
<Card className="processedData">
<CardBody>
| 7 |
diff --git a/components/Feed/Feed.js b/components/Feed/Feed.js @@ -16,7 +16,8 @@ const dateFormat = timeFormat('%A,\n%d.%m.%Y')
const groupByDate = nest().key(d => dateFormat(new Date(d.meta.publishDate)))
class Feed extends Component {
- renderFeedItem = doc => (
+ renderFeedItem = doc =>
+ doc ? (
<TeaserFeed
{...doc.meta}
title={doc.meta.shortTitle || doc.meta.title}
@@ -45,7 +46,7 @@ class Feed extends Component {
/>
}
/>
- )
+ ) : null
render() {
const { documents, showHeader } = this.props
| 1 |
diff --git a/app/models/carto/user_migration_import.rb b/app/models/carto/user_migration_import.rb @@ -66,18 +66,41 @@ module Carto
def import(service, package)
if import_metadata?
log.append('=== Importing metadata ===')
+ begin
imported = service.import_from_directory(package.meta_dir)
+ rescue => e
+ log.append('=== Error importing metadata. Rollback! ===')
+ service.rollback_import_from_directory(package.meta_dir)
+ raise e
+ end
org_import? ? self.organization = imported : self.user = imported
save!
end
log.append('=== Importing data ===')
- CartoDB::DataMover::ImportJob.new(import_job_arguments(package.data_dir)).run!
+ import_job = CartoDB::DataMover::ImportJob.new(import_job_arguments(package.data_dir))
+ begin
+ import_job.run!
+ rescue => e
+ log.append('=== Error importing data. Rollback!')
+ import_job.rollback!
+ service.rollback_import_from_directory(package.meta_dir)
+ raise e
+ end
if import_metadata?
log.append('=== Importing visualizations and search tweets ===')
+ begin
+ ActiveRecord::Base.transaction do
service.import_metadata_from_directory(imported, package.meta_dir)
end
+ rescue => e
+ log.append('=== Error importing visualizations and search tweets. Rollback! ===')
+ service.rollback_import_metadata_from_directory(imported, package.meta_dir)
+ import_job.rollback!
+ raise e
+ end
+ end
end
def import_only_data?
| 9 |
diff --git a/device.js b/device.js @@ -344,7 +344,13 @@ function decryptPackage(objEncryptedPackage){
var decrypted_message_buf = Buffer.concat([decrypted1, decrypted2]);
var decrypted_message = decrypted_message_buf.toString("utf8");
console.log("decrypted: "+decrypted_message);
+ try {
var json = JSON.parse(decrypted_message);
+ }
+ catch (e) {
+ console.log("failed to parse decrypted message: " + e);
+ return null;
+ }
if (json.encrypted_package){ // strip another layer of encryption
console.log("inner encryption");
return decryptPackage(json.encrypted_package);
| 9 |
diff --git a/lib/assets/core/javascripts/cartodb3/components/modals/add-widgets/widgets-types.js b/lib/assets/core/javascripts/cartodb3/components/modals/add-widgets/widgets-types.js @@ -156,7 +156,7 @@ module.exports = [
if (columnType === 'date') {
attrs.aggregation = defaults.aggregation;
} else if (columnType === 'number') {
- attrs.bins = defaults.bin;
+ attrs.bins = defaults.bins;
}
// Preselect the correct tuple, if there already exists a widget definition
| 1 |
diff --git a/.flowconfig b/.flowconfig .*/node_modules/react-navigation
.*/node_modules/reqwest
.*/node_modules/sentry-expo
-
.*/node_modules/react-apollo
.*/node_modules/dataloader
-
-
-[include]
-
-[libs]
+.*/node_modules/@cypress*
+.*/node_modules/@babel*
+.*/node_modules/@cypress
+.*/node_modules/@babel
[options]
suppress_comment=.*\\$FlowFixMe
| 8 |
diff --git a/src/yy/YyLoader.hx b/src/yy/YyLoader.hx @@ -41,6 +41,7 @@ class YyLoader {
val.resourceName = rxName.replace(val.resourcePath, "$1");
if (val.resourceType == "GMFolder") {
var view:YyView = project.readJsonFileSync(val.resourcePath);
+ val.resourceName = view.folderName;
if (view.isDefaultView) rootView = view;
views.set(key, view);
}
| 12 |
diff --git a/packages/app/src/components/PageEditor/DrawioModal.tsx b/packages/app/src/components/PageEditor/DrawioModal.tsx @@ -130,6 +130,7 @@ export const DrawioModal = React.forwardRef((props: Props, ref: React.LegacyRef<
url.searchParams.append('ui', 'atlas');
url.searchParams.append('configure', '1');
+ return url;
}, [growiHydratedEnv?.DRAWIO_URI, personalSettingsInfo?.lang]);
@@ -156,7 +157,7 @@ export const DrawioModal = React.forwardRef((props: Props, ref: React.LegacyRef<
<div className="w-100 h-100 position-absolute d-flex">
{ isOpened && (
<iframe
- src={drawioUrl}
+ src={drawioUrl.href}
className="border-0 flex-grow-1"
>
</iframe>
| 12 |
diff --git a/src/components/promote/promoteView.js b/src/components/promote/promoteView.js @@ -3,7 +3,6 @@ import { injectIntl } from 'react-intl';
import { Text, View, ScrollView, TouchableOpacity, Alert } from 'react-native';
import { WebView } from 'react-native-webview';
import get from 'lodash/get';
-import ActionSheet from 'react-native-actionsheet';
import Autocomplete from '@esteemapp/react-native-autocomplete-input';
import { ScaleSlider, TextInput } from '..';
import { hsOptions } from '../../constants/hsOptions';
@@ -23,6 +22,7 @@ import { PROMOTE_PRICING, PROMOTE_DAYS } from '../../constants/options/points';
// Styles
import styles from './promoteStyles';
+import { OptionsModal } from '../atoms';
const PromoteView = ({
intl,
@@ -214,7 +214,7 @@ const PromoteView = ({
</View>
</ScrollView>
</View>
- <ActionSheet
+ <OptionsModal
ref={startActionSheet}
options={[
intl.formatMessage({ id: 'alert.confirm' }),
| 14 |
diff --git a/src/encoded/visualization.py b/src/encoded/visualization.py @@ -1089,8 +1089,8 @@ def acc_composite_extend_with_tracks(composite, vis_defs, dataset, assembly, hos
track["longLabel"] = track["longLabel"] + " (" + addendum[0:-1] + ")"
metadata_pairs = {}
- metadata_pairs['file download'] = ('"<a href=\'%s%s\' title=\'Download this file " \
- "from the ENCODE portal\'>%s</a>"' %
+ metadata_pairs['file download'] = ( \
+ '"<a href=\'%s%s\' title=\'Download this file from the ENCODE portal\'>%s</a>"' %
(host, a_file["href"], a_file["accession"]))
lab = convert_mask("{lab.title}", dataset)
if len(lab) > 0 and not lab.startswith('unknown'):
@@ -1130,11 +1130,9 @@ def acc_composite_extend_with_tracks(composite, vis_defs, dataset, assembly, hos
for (subgroup_tag, subgroup) in subgroups.items():
membership[group_tag] = subgroup["tag"]
if "url" in subgroup:
- metadata_pairs[group_title] = ('"<a href=\'%s/%s/\' TARGET=\'_blank\' " \
- "title=\'%s details at the ENCODE " \
- "portal\'>%s</a>"' %
- (host, subgroup["url"], group_title,
- subgroup["title"]))
+ metadata_pairs[group_title] = ( \
+ '"<a href=\'%s/%s/\' TARGET=\'_blank\' title=\'%s details at the ENCODE portal\'>%s</a>"' %
+ (host, subgroup["url"], group_title, subgroup["title"]))
elif group_title == "Biosample":
bs_value = sanitize_label(dataset.get("biosample_summary", ""))
if len(bs_value) == 0:
@@ -1142,8 +1140,8 @@ def acc_composite_extend_with_tracks(composite, vis_defs, dataset, assembly, hos
biosamples = biosamples_for_file(a_file, dataset)
if len(biosamples) > 0:
for bs_acc in sorted(biosamples.keys()):
- bs_value += (" <a href=\'%s%s\' TARGET=\'_blank\' title=\'"
- "%s details at the ENCODE portal\'>%s</a>" %
+ bs_value += ( \
+ " <a href=\'%s%s\' TARGET=\'_blank\' title=\' %s details at the ENCODE portal\'>%s</a>" %
(host, biosamples[bs_acc]["@id"], group_title,
bs_acc))
metadata_pairs[group_title] = '"%s"' % (bs_value)
| 1 |
diff --git a/pages/community/slackccugl.md b/pages/community/slackccugl.md @@ -17,7 +17,7 @@ For this to be the case, it is vital that we all follow a basic set of guideline
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* Exercise consideration, respect and empathy in your speech and actions. Remember, we have all been through different stages of learning when adopting technologies.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
-* Disagreements on things are fine, conflictive behaviour or trolling are not.
+* Disagreements on things are fine, argumentative behaviour or trolling are not.
## How not to behave
| 14 |
diff --git a/lod.js b/lod.js @@ -533,11 +533,12 @@ export class LodChunkTracker extends EventTarget {
const localColor = new THREE.Color();
const _getChunkColorHex = chunk => {
- if (chunk.lod === 1) {
+ const lod = chunk.size;
+ if (lod === 1) {
return 0xFF0000;
- } else if (chunk.lod === 2) {
+ } else if (lod === 2) {
return 0x00FF00;
- } else if (chunk.lod === 4) {
+ } else if (lod === 4) {
return 0x0000FF;
} else {
return 0x0;
@@ -548,12 +549,12 @@ export class LodChunkTracker extends EventTarget {
for (let i = 0; i < this.chunks.length; i++) {
const chunk = this.chunks[i];
localMatrix.compose(
- localVector.copy(chunk.min)
+ localVector.fromArray(chunk.min)
.multiplyScalar(this.chunkSize),
// .add(localVector2.set(0, -60, 0)),
localQuaternion.identity(),
localVector3.set(1, 1, 1)
- .multiplyScalar(chunk.lod * this.chunkSize * 0.9)
+ .multiplyScalar(chunk.size * this.chunkSize * 0.9)
);
localColor.setHex(_getChunkColorHex(chunk));
debugMesh.setMatrixAt(debugMesh.count, localMatrix);
| 4 |
diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx @@ -172,13 +172,11 @@ class Blocks extends React.Component {
this.onWorkspaceMetricsChange();
}
- this.ScratchBlocks.Events.disable();
- this.workspace.clear();
-
+ // Remove and reattach the workspace listener (but allow flyout events)
+ this.workspace.removeChangeListener(this.props.vm.blockListener);
const dom = this.ScratchBlocks.Xml.textToDom(data.xml);
- this.ScratchBlocks.Xml.domToWorkspace(dom, this.workspace);
- this.ScratchBlocks.Events.enable();
- this.workspace.toolbox_.refreshSelection();
+ this.ScratchBlocks.Xml.clearWorkspaceAndLoadFromXml(dom, this.workspace);
+ this.workspace.addChangeListener(this.props.vm.blockListener);
if (this.props.vm.editingTarget && this.state.workspaceMetrics[this.props.vm.editingTarget.id]) {
const {scrollX, scrollY, scale} = this.state.workspaceMetrics[this.props.vm.editingTarget.id];
| 4 |
diff --git a/test/jasmine/tests/gl3d_hover_click_test.js b/test/jasmine/tests/gl3d_hover_click_test.js @@ -1343,7 +1343,6 @@ describe('Test gl3d trace click/hover:', function() {
})
.then(done, done.fail);
});
-
});
describe('hover on traces with (x|y|z|u|v|w)hoverformat and valuehoverformat', function() {
| 1 |
diff --git a/src/webui/preload.js b/src/webui/preload.js @@ -61,24 +61,24 @@ window.ipfsDesktop = {
version: VERSION,
- selectDirectory: () => {
- return new Promise(resolve => {
- remote.dialog.showOpenDialog(remote.getCurrentWindow(), {
+ selectDirectory: async () => {
+ const response = await remote.dialog.showOpenDialog(remote.getCurrentWindow(), {
title: 'Select a directory',
properties: [
'openDirectory',
'createDirectory'
]
- }, async (res) => {
- if (!res || res.length === 0) {
- return resolve()
+ })
+
+ if (!response || response.canceled) {
+ return
}
const files = []
+ const filesToRead = response.filePaths[0]
+ const prefix = path.dirname(filesToRead)
- const prefix = path.dirname(res[0])
-
- for (const path of await readdir(res[0])) {
+ for (const path of await readdir(filesToRead)) {
const size = (await fs.stat(path)).size
files.push({
path: path.substring(prefix.length, path.length),
@@ -87,9 +87,7 @@ window.ipfsDesktop = {
})
}
- resolve(files)
- })
- })
+ return files
},
removeConsent: (consent) => {
| 1 |
diff --git a/src/components/common/form/InputText.js b/src/components/common/form/InputText.js // @flow
import React from 'react'
-import { TextInput } from 'react-native'
-import normalize from 'react-native-elements/src/helpers/normalizeText'
+import { StyleSheet, TextInput } from 'react-native'
import { withStyles } from '../../../lib/styles'
const InputText = (props: any) => {
@@ -15,7 +14,7 @@ const getStylesFromProps = ({ theme }) => {
fontStyle: theme.fonts.slab,
color: theme.colors.darkGray,
borderBottomStyle: 'solid',
- borderBottomWidth: normalize(1),
+ borderBottomWidth: StyleSheet.hairlineWidth,
padding: theme.sizes.default,
borderBottomColor: theme.colors.darkGray
}
| 2 |
diff --git a/src/screens/EventsScreen/FilterHeader.test.js b/src/screens/EventsScreen/FilterHeader.test.js @@ -5,6 +5,7 @@ import FilterHeader from "./FilterHeader";
import type { Props as ComponentProps } from "./FilterHeader";
import FilterHeaderButton from "./FilterHeaderButton";
import FilterHeaderCategories from "./FilterHeaderCategories";
+import ResetAllFiltersButton from "./ResetAllFiltersButton";
const render = (
props: ComponentProps = {
@@ -147,4 +148,24 @@ describe("filter buttons", () => {
expect(mock).toBeCalledWith();
});
+
+ it("calls scrollEventListToTop when users presses 'Reset all filters' button", () => {
+ const mock = jest.fn();
+ const output = render({
+ dateFilter: null,
+ selectedCategories: new Set(["Music"]),
+ onFilterCategoriesPress: () => {},
+ onFilterButtonPress: () => {},
+ onDateFilterButtonPress: () => {},
+ resetAllFiltersPress: () => {},
+ numTagFiltersSelected: 0,
+ scrollEventListToTop: mock
+ });
+ output
+ .find(ResetAllFiltersButton)
+ .props()
+ .onPress();
+
+ expect(mock).toBeCalledWith();
+ });
});
| 0 |
diff --git a/src/libs/deprecatedAPI.js b/src/libs/deprecatedAPI.js @@ -336,8 +336,8 @@ function Report_GetHistory(parameters) {
* @param {Boolean} parameters.pinnedValue
* @returns {Promise}
*/
-function TogglePinnedChat(parameters) {
- const commandName = 'TogglePinnedChat';
+function Report_TogglePinned(parameters) {
+ const commandName = 'Report_TogglePinned';
requireParameters(['reportID', 'pinnedValue'],
parameters, commandName);
return Network.post(commandName, parameters);
@@ -953,7 +953,7 @@ export {
RejectTransaction,
Report_AddComment,
Report_GetHistory,
- TogglePinnedChat,
+ Report_TogglePinned,
Report_EditComment,
Report_UpdateLastRead,
Report_UpdateNotificationPreference,
| 13 |
diff --git a/test-basic/documents-query.js b/test-basic/documents-query.js @@ -515,6 +515,11 @@ describe('document query', function(){
)
.result(function(response) {
response.length.should.equal(1);
+ var document = response[0];
+ document.should.have.property('content');
+ var content = document.content;
+ var assert = require('assert');
+ assert(content.includes('<abc:elem xmlns:abc="http://marklogic.com/test/abc">word</abc:elem>'));
done();
})
.catch(done);
| 0 |
diff --git a/src/core/lib/Protobuf.mjs b/src/core/lib/Protobuf.mjs @@ -205,7 +205,7 @@ class Protobuf {
(this.data[this.offset] & this.VALUE) << shift :
(this.data[this.offset] & this.VALUE) * Math.pow(2, shift);
shift += 7;
- } while ((this.data[this.offset++] & this.MSD) === this.MSB);
+ } while ((this.data[this.offset++] & this.MSB) === this.MSB);
return fieldNumber;
}
| 1 |
diff --git a/token-metadata/0x221657776846890989a759BA2973e427DfF5C9bB/metadata.json b/token-metadata/0x221657776846890989a759BA2973e427DfF5C9bB/metadata.json "symbol": "REP",
"address": "0x221657776846890989a759BA2973e427DfF5C9bB",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/server/src/classes/generic/damageReports/functions/damageTeam.js b/server/src/classes/generic/damageReports/functions/damageTeam.js @@ -34,8 +34,9 @@ Orders: Clean up the mess left from repairing the ${displayName} system.
}
const teamType = type
? type
- : randomFromList(damagePositions.filter(p => p.position !== "Custodian"));
+ : randomFromList(damagePositions.filter(p => p !== "Custodian"));
const damageText = randomFromList(damageTexts[teamType]);
+ console.log(teamType, damageText);
return `${preamble ||
damageText.preamble.replace(
"%SYSTEM%",
| 1 |
diff --git a/data.js b/data.js @@ -1636,16 +1636,6 @@ module.exports = [
url: "http://zeptojs.com",
source: "https://raw.githubusercontent.com/madrobby/zepto/master/src/zepto.js"
},
- {
- name: "xui",
- github: "xui/xui",
- tags: ["base", "dom", "mobile", "ajax", "events", "webkit", "animation"],
- description: "DOM library for authoring HTML5 mobile web applications, works cross-device and cross-platform.",
- url: "http://xuijs.com",
- source: ["https://raw.githubusercontent.com/xui/xui/master/src/header.js",
- "https://raw.githubusercontent.com/xui/xui/master/src/base.js",
- "https://raw.githubusercontent.com/xui/xui/master/src/footer.js"]
- },
{
name: "Underscore",
github: "jashkenas/underscore",
| 2 |
diff --git a/src/client/post/Write/Write.js b/src/client/post/Write/Write.js @@ -136,7 +136,7 @@ class Write extends React.Component {
initialTopics: [],
initialBody: '',
initialReward: rewardsValues.half,
- initialUpvote: true,
+ initialUpvote: nextProps.upvoteSetting,
initialUpdatedDate: Date.now(),
isUpdating: false,
showModalDelete: false,
| 12 |
diff --git a/lib/targetHandler.js b/lib/targetHandler.js @@ -34,6 +34,7 @@ const getCriTarget = async (targetURL) => {
let targetToSwitch;
const targets = (await criTarget.getTargets()).targetInfos;
for(const target of targets){
+ if(target.url.substr(-1) === '/') target.url = target.url.substring(0, target.url.length-1);
if(target.title === targetURL || target.url.split('://')[1] === (targetURL.split('://')[1] || targetURL)) targetToSwitch = target;
}
if(!targetToSwitch) throw new Error('No target with given URL/Title found.');
| 9 |
diff --git a/README.md b/README.md @@ -10,7 +10,7 @@ Say thanks!
## How Small?
-| 542 Bytes SVG | 7,225 Bytes PNG | 414 Bytes SVG | 5,568 Bytes PNG | 251 Bytes SVG | 5,031 Bytes PNG |
+| 542 Bytes SVG | 7,225 Bytes PNG | 414 Bytes SVG | 5,568 Bytes PNG | 250 Bytes SVG | 5,031 Bytes PNG |
| ------------- | --------------- | ------------- | --------------- | ------------- | --------------- |
| <img src="https://edent.github.io/SuperTinyIcons/images/svg/github.svg" width="100" /> | <img src="https://edent.github.io/SuperTinyIcons/images/png/github.png" width="100" /> | <img src="https://edent.github.io/SuperTinyIcons/images/svg/twitter.svg" width="100" /> | <img src="https://edent.github.io/SuperTinyIcons/images/png/twitter.png" width="100" /> | <img src="https://edent.github.io/SuperTinyIcons/images/svg/flickr.svg" width="100" /> | <img src="https://edent.github.io/SuperTinyIcons/images/png/flickr.png" width="100" /> |
| 1 |
diff --git a/docs/colorpicker.html b/docs/colorpicker.html <!-- Latest compiled and minified JavaScript -->
<!-- JSON-Editor -->
- <script src="../dist/dev/jsoneditor.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/@json-editor/json-editor@latest/dist/jsoneditor.min.js"></script>
<!-- JSON-Editor -->
<script src="https://unpkg.com/vanilla-picker@2"></script>
<style type="text/css">
| 4 |
diff --git a/package/src/components/ShippingAddressCheckoutAction/v1/ShippingAddressCheckoutAction.js b/package/src/components/ShippingAddressCheckoutAction/v1/ShippingAddressCheckoutAction.js @@ -179,7 +179,7 @@ class ShippingAddressCheckoutAction extends Component {
this.setState({ formErrors });
}
- isFormFilled = (values) => Object.keys(values).every((key) => (key === "address2" ? true : values[key] !== null));
+ isFormFilled = (values) => Object.keys(values).every((key) => (key === "address2" || key === "company" ? true : values[key] !== null));
submit = () => {
this._form.submit();
| 1 |
diff --git a/angular/projects/spark-angular/src/lib/directives/inputs/sprk-button/sprk-button.stories.ts b/angular/projects/spark-angular/src/lib/directives/inputs/sprk-button/sprk-button.stories.ts @@ -90,40 +90,12 @@ export const tertiary = () => ({
`,
});
-export const disabledPrimary = () => ({
+export const disabled = () => ({
moduleMetadata: modules,
template: `
<button
disabled
- data-id="button-disabled-primary"
- sprkButton
- >
- Button
- </button>
- `,
-});
-
-export const disabledSecondary = () => ({
- moduleMetadata: modules,
- template: `
- <button
- disabled
- class="sprk-c-Button--secondary"
- data-id="button-disabled-secondary"
- sprkButton
- >
- Button
- </button>
- `,
-});
-
-export const disabledTertiary = () => ({
- moduleMetadata: modules,
- template: `
- <button
- disabled
- class="sprk-c-Button--tertiary"
- data-id="button-disabled-tertiary"
+ data-id="button-disabled"
sprkButton
>
Button
| 3 |
diff --git a/packages/rmw-shell/cra-template-rmw/template/.github/workflows/app-deploy.yml b/packages/rmw-shell/cra-template-rmw/template/.github/workflows/app-deploy.yml @@ -14,6 +14,8 @@ jobs:
npm i
- name: Build
run: npm run build
+ env:
+ CI: false
- name: Deploy
run: |
firebase use prod
| 3 |
diff --git a/lib/reducers/cosmosV0-reducers.js b/lib/reducers/cosmosV0-reducers.js @@ -562,12 +562,13 @@ function transactionReducerV2(transaction, reducers, stakingDenom) {
transaction.logs && transaction.logs[index]
? transaction.logs[index].success || false
: false,
- log:
- transaction.logs && transaction.logs[index]
+ log: transaction.logs
+ ? transaction.logs[index].log
? transaction.logs[index].log
: transaction.logs[0] // failing txs show the first logs
? transaction.logs[0].log
- : '',
+ : ''
+ : JSON.parse(transaction.raw_log).message,
involvedAddresses: _.uniq(reducers.extractInvolvedAddresses(transaction))
}))
return returnedMessages
| 1 |
diff --git a/src/resources/views/crud/fields/checklist_dependency.blade.php b/src/resources/views/crud/fields/checklist_dependency.blade.php $secondary_ids = [];
+ $old_primary_dependency = old_empty_or_null($primary_dependency['name'], false) ?? false;
+ $old_secondary_dependency = old_empty_or_null($secondary_dependency['name'], false) ?? false;
+
//create secondary dependency from primary relation, used to check what checkbox must be checked from second checklist
- if (old($primary_dependency['name'])) {
- foreach (old($primary_dependency['name']) as $primary_item) {
+ if ($old_primary_dependency) {
+ foreach ($old_primary_dependency as $primary_item) {
foreach ($dependencyArray[$primary_item] as $second_item) {
$secondary_ids[$second_item] = $second_item;
}
<div class="hidden_fields_primary" data-name = "{{ $primary_dependency['name'] }}">
@if(isset($field['value']))
- @if(old($primary_dependency['name']))
- @foreach( old($primary_dependency['name']) as $item )
+ @if($old_primary_dependency)
+ @foreach($old_primary_dependency as $item )
<input type="hidden" class="primary_hidden" name="{{ $primary_dependency['name'] }}[]" value="{{ $item }}">
@endforeach
@else
@endforeach
value="{{ $connected_entity_entry->id }}"
- @if( ( isset($field['value']) && is_array($field['value']) && in_array($connected_entity_entry->id, $field['value'][0]->pluck('id', 'id')->toArray())) || ( old($primary_dependency["name"]) && in_array($connected_entity_entry->id, old( $primary_dependency["name"])) ) )
+ @if( ( isset($field['value']) && is_array($field['value']) && in_array($connected_entity_entry->id, $field['value'][0]->pluck('id', 'id')->toArray())) || $old_primary_dependency && in_array($connected_entity_entry->id, $old_primary_dependency)))
checked = "checked"
@endif >
{{ $connected_entity_entry->{$primary_dependency['attribute']} }}
<div class="row">
<div class="hidden_fields_secondary" data-name="{{ $secondary_dependency['name'] }}">
@if(isset($field['value']))
- @if(old($secondary_dependency['name']))
- @foreach( old($secondary_dependency['name']) as $item )
+ @if($old_secondary_dependency)
+ @foreach($old_secondary_dependency as $item )
<input type="hidden" class="secondary_hidden" name="{{ $secondary_dependency['name'] }}[]" value="{{ $item }}">
@endforeach
@else
@endforeach
value="{{ $connected_entity_entry->id }}"
- @if( ( isset($field['value']) && is_array($field['value']) && ( in_array($connected_entity_entry->id, $field['value'][1]->pluck('id', 'id')->toArray()) || isset( $secondary_ids[$connected_entity_entry->id])) || ( old($secondary_dependency['name']) && in_array($connected_entity_entry->id, old($secondary_dependency['name'])) )))
+ @if( ( isset($field['value']) && is_array($field['value']) && ( in_array($connected_entity_entry->id, $field['value'][1]->pluck('id', 'id')->toArray()) || isset( $secondary_ids[$connected_entity_entry->id])) || $old_secondary_dependency && in_array($connected_entity_entry->id, $old_secondary_dependency))))
checked = "checked"
@if(isset( $secondary_ids[$connected_entity_entry->id]))
disabled = disabled
| 4 |
diff --git a/src/__experimental__/components/input/input-presentation.style.js b/src/__experimental__/components/input/input-presentation.style.js @@ -13,14 +13,16 @@ const InputPresentationStyle = styled.div`
cursor: text;
display: flex;
flex-wrap: wrap;
- flex: ${({ inputWidth, labelInline }) => (
- labelInline ? 1 : `0 0 ${inputWidth}%`
- )};
+ flex: 0 0 ${({ inputWidth }) => inputWidth}%;
margin: 0;
min-height: ${({ size }) => sizes[size].height};
padding-left: ${({ size }) => sizes[size].padding};
padding-right: ${({ size }) => sizes[size].padding};
+ ${({ labelInline, inputWidth, labelWidth }) => labelInline && css`
+ flex: 0 0 ${(100 - labelWidth) * (inputWidth / 100)}%;
+ `}
+
${({ disabled, theme }) => disabled && css`
background: ${theme.disabled.input};
border-color: ${theme.disabled.border};
@@ -53,6 +55,7 @@ function stylingForValidation(message) {
}
InputPresentationStyle.defaultProps = {
+ inputWidth: 100,
size: 'medium',
theme: baseTheme
};
| 12 |
diff --git a/types.d.ts b/types.d.ts @@ -77,6 +77,7 @@ declare module "php-parser" {
* Defines a boolean value (true/false)
*/
class Boolean extends Literal {
+ value: boolean;
}
/**
* A break statement
@@ -95,7 +96,7 @@ declare module "php-parser" {
*/
class Call extends Expression {
what: Identifier | Variable;
- arguments: Variable[];
+ arguments: Expression[];
}
/**
* A switch case statement
@@ -120,9 +121,9 @@ declare module "php-parser" {
* Defines a catch statement
*/
class Catch extends Statement {
- what: Identifier[];
+ what: Name[];
variable: Variable;
- body: Statement;
+ body: Block;
}
/**
* A class definition
@@ -245,14 +246,14 @@ declare module "php-parser" {
* ```
*/
readonly MODE_NONE: string;
- directives: any[][];
+ directives: DeclareDirective[];
mode: string;
}
/**
* Defines a constant
*/
class DeclareDirective extends Node {
- name: Identifier;
+ key: Identifier;
value: Node | string | number | boolean | null;
}
/**
@@ -260,13 +261,14 @@ declare module "php-parser" {
*/
class Do extends Statement {
test: Expression;
- body: Statement | null;
+ body: Block | null;
}
/**
* Defines system based call
*/
class Echo extends Statement {
shortForm: boolean;
+ expressions: Expression[];
}
/**
* Defines an empty check call
@@ -322,13 +324,14 @@ declare module "php-parser" {
* The heredoc label, defined only when the type is heredoc
*/
label: string | null;
+ value: EncapsedPart[];
}
/**
* Part of `Encapsed` node
*/
class EncapsedPart extends Expression {
expression: Expression;
- syntax: string;
+ syntax: string; // TODO: limit possiblities
curly: boolean;
}
/**
@@ -397,7 +400,7 @@ declare module "php-parser" {
init: Expression[];
test: Expression[];
increment: Expression[];
- body: Statement | null;
+ body: Block | null;
shortForm: boolean;
}
/**
@@ -407,7 +410,7 @@ declare module "php-parser" {
source: Expression;
key: Expression | null;
value: Expression;
- body: Statement | null;
+ body: Block | null;
shortForm: boolean;
}
/**
@@ -469,6 +472,7 @@ declare module "php-parser" {
* Defines inline html output (treated as echo output)
*/
class Inline extends Literal {
+ value: string;
}
/**
* An interface definition
@@ -493,6 +497,7 @@ declare module "php-parser" {
*/
class List extends Expression {
shortForm: boolean;
+ items: Entry[];
}
/**
* Defines an array structure
@@ -606,6 +611,7 @@ declare module "php-parser" {
class NowDoc extends Literal {
label: string;
raw: string;
+ value: string;
}
/**
* Represents the null keyword
@@ -616,6 +622,7 @@ declare module "php-parser" {
* Defines a numeric value
*/
class Number extends Literal {
+ value: number;
}
/**
* Lookup on an offset in an array
@@ -767,6 +774,7 @@ declare module "php-parser" {
class String extends Literal {
unicode: boolean;
isDoubleQuote: boolean;
+ value: string;
}
/**
* Defines a switch statement
@@ -906,7 +914,7 @@ declare module "php-parser" {
*/
class While extends Statement {
test: Expression;
- body: Statement | null;
+ body: Block | null;
shortForm: boolean;
}
/**
| 1 |
diff --git a/index.js b/index.js @@ -27,7 +27,7 @@ function CreateWindow() {
app.ame.handler.GoogleCastHandler(); // Chromecast
- if(process.platform === "win32" && app.transparency) {
+ if(process.platform === "win32") {
app.win.show()
}
| 1 |
diff --git a/README.md b/README.md @@ -87,10 +87,19 @@ npm run build
In isolation each app can be ran individually with the following commands:
```bash
-npm start
+npm run start
npm run launch
```
+To run as a suite of apps run the following commands:
+
+npm run all:start
+npm run launcher:launch
+
+For local development and to run the suite of apps from what is on the local machine a proxy override is needed. To run this change into the developer-proxy directory and run:
+
+npm run proxy
+
The applications run on the following ports:
| Application | Port |
| 3 |
diff --git a/common/components/componentsBySection/MyProjects/MyProjectCard.jsx b/common/components/componentsBySection/MyProjects/MyProjectCard.jsx @@ -94,7 +94,9 @@ class MyProjectCard extends React.PureComponent<Props, State> {
<Button className="MyProjectCard-button" href={editUrl} bsStyle="info">Edit</Button>,
<Button className="MyProjectCard-button" bsStyle="danger" onClick={() => this.props.onProjectClickDelete(this.props.project)}>Delete</Button>
]);
- } else if(this.props.project.isUpForRenewal && this.props.project.isApproved) {
+ }
+
+ if(this.props.project.isUpForRenewal && this.props.project.isApproved) {
buttons = buttons.concat(
[
<Button className="MyProjectCard-button" bsStyle="warning" onClick={() => this.props.onProjectClickRenew(this.props.project)}>Renew</Button>,
| 11 |
diff --git a/RobotNXT/src/main/java/de/fhg/iais/roberta/syntax/codegen/Ast2NxcVisitor.java b/RobotNXT/src/main/java/de/fhg/iais/roberta/syntax/codegen/Ast2NxcVisitor.java @@ -548,6 +548,12 @@ public class Ast2NxcVisitor extends Ast2CppVisitor implements NxtAstVisitor<Void
@Override
public Void visitDriveAction(DriveAction<Void> driveAction) {
+ this.sb.append("__speed").append(" = ");
+ driveAction.getParam().getSpeed().visit(this);
+ this.sb.append(" < 100 ? ");
+ driveAction.getParam().getSpeed().visit(this);
+ this.sb.append(" : 100; ");
+ nlIndent();
final boolean isDuration = driveAction.getParam().getDuration() != null;
final boolean reverse =
this.brickConfiguration.getActorOnPort(this.brickConfiguration.getLeftMotorPort()).getRotationDirection() == DriveDirection.BACKWARD
@@ -572,10 +578,7 @@ public class Ast2NxcVisitor extends Ast2CppVisitor implements NxtAstVisitor<Void
} else {
this.sb.append(", ");
}
- driveAction.getParam().getSpeed().visit(this);
- this.sb.append(" < 100 ? ");
- driveAction.getParam().getSpeed().visit(this);
- this.sb.append(" : 100, ");
+ this.sb.append("__speed").append(", ");
if ( isDuration ) {
this.sb.append("(");
driveAction.getParam().getDuration().getValue().visit(this);
@@ -844,6 +847,7 @@ public class Ast2NxcVisitor extends Ast2CppVisitor implements NxtAstVisitor<Void
}
this.sb.append("long timer1;");
}
+ this.sb.append("float __speed;");
mainTask.getVariables().visit(this);
incrIndentation();
this.sb.append("\n").append("task main() {");
| 5 |
diff --git a/index.d.ts b/index.d.ts @@ -721,7 +721,7 @@ declare namespace Moleculer {
version?: string | number;
}
- type StartedStoppedHandler = () => Promise<void> | void;
+ type StartedStoppedHandler = () => Promise<void[]> | Promise<void> | void;
interface ServiceSchema<S = ServiceSettingSchema> {
name: string;
version?: string | number;
| 7 |
diff --git a/lib/assets/core/javascripts/cartodb3/components/custom-list/custom-view.js b/lib/assets/core/javascripts/cartodb3/components/custom-list/custom-view.js @@ -111,11 +111,11 @@ module.exports = CoreView.extend({
},
_renderActions: function () {
- _.each(this.options.actions, function (a) {
- var view = new CustomListAction(a);
+ _.each(this.options.actions, function (action) {
+ var view = new CustomListAction(action);
this.$('.js-header').append(view.render().el);
this.addView(view);
- }.bind(this));
+ }, this);
},
_focusSearch: function () {
| 4 |
diff --git a/weapons-manager.js b/weapons-manager.js @@ -7,6 +7,7 @@ import uiManager from './ui-manager.js';
import ioManager from './io-manager.js';
import physicsManager from './physics-manager.js';
import {world} from './world.js';
+import * as universe from './universe.js';
import {rigManager} from './rig.js';
import {teleportMeshes} from './teleport.js';
import {appManager, renderer, scene, camera, dolly} from './app-object.js';
| 0 |
diff --git a/articles/connections/social/wordpress.md b/articles/connections/social/wordpress.md @@ -30,7 +30,6 @@ Complete all the fields on the **Create an Application** screen.
|**Field**|**Description**|
|-|-|
-
|**Name** | The name of your application|
|**Description** | The description of your application|
|**Website URL** | The URL to an informational home page about your application|
| 2 |
diff --git a/articles/errors/deprecation-errors.md b/articles/errors/deprecation-errors.md @@ -21,7 +21,7 @@ There are two different ways to search for warning messages showing usage of dep
### Search logs via the Dashboard
-If your application uses a deprecated feature, a Deprecation Notice message will show up in the Logs section of the [Dashboard](/${manage_url}).
+If your application uses a deprecated feature, a Deprecation Notice message will show up in the Logs section of the [Dashboard](${manage_url}/#/).
::: note
In order to not overwhelm the logs with repetitive messages, deprecation notes will only be shown once per hour (the first time it occurs within that hour) rather than for each authentication transaction involving the deprecated feature.
| 3 |
diff --git a/app/src/components/Containers/Volume.js b/app/src/components/Containers/Volume.js @@ -94,17 +94,17 @@ const styles = () =>
smallBar :
{
flex : '0 0 auto',
- margin : '0.3rem',
backgroundSize : '75%',
backgroundRepeat : 'no-repeat',
backgroundColor : 'rgba(0, 0, 0, 1)',
cursor : 'pointer',
transitionProperty : 'opacity, background-color',
width : 3,
- borderRadius : 6,
+ borderRadius : 2,
transitionDuration : '0.25s',
position : 'absolute',
- bottom : 0,
+ top : '50%',
+ transform : 'translateY(-50%)',
'&.level0' : { height: 0 },
'&.level1' : { height: '0.2vh' },
'&.level2' : { height: '0.4vh' },
| 1 |
diff --git a/packages/bitcore-wallet-service/test/chain/doge.js b/packages/bitcore-wallet-service/test/chain/doge.js @@ -204,7 +204,7 @@ const aTXP = () => {
'outputs': [
{
'toAddress': 'DKdkvdJfQwQmnT9Hvq1CdB9kzsy76f1Qsd',
- 'amount': 77700000000000,
+ 'amount': 7770000000000,
'message': 'first message'
}, {
'toAddress': 'DL2EGukahtib57Sg7FtHsvf8HgwMJtbBA3',
| 3 |
diff --git a/server/classes/generic/damageReports/functions/index.js b/server/classes/generic/damageReports/functions/index.js @@ -9,7 +9,6 @@ export { default as longRangeMessage } from "./longRangeMessage";
export { default as remoteAccess } from "./remoteAccess";
export { default as sendInventory } from "./sendInventory";
export { default as exocomps } from "./exocomps";
-export { default as index } from "./index";
export { default as power } from "./power";
export { default as securityEvac } from "./securityEvac";
export { default as softwarePanel } from "./softwarePanel";
| 2 |
diff --git a/packages/jaeger-ui/public/index.html b/packages/jaeger-ui/public/index.html <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<title>Jaeger UI</title>
<script>
- // Jaeger UI config data is embedded by the query-service. This is
- // later merged with defaults into the redux `state.config` via
- // src/utils/config/get-config.js. The default provided by the query
- // service should be an empty object or it can leave `DEFAULT_CONFIG`
- // unchanged.
+ // Jaeger UI config data is embedded by the query-service via search-replace.
+ // This is later merged with defaults into the redux `state.config` via
+ // src/utils/config/get-config.js.
function getJaegerUiConfig() {
const DEFAULT_CONFIG = null;
const JAEGER_CONFIG = DEFAULT_CONFIG;
return JAEGER_CONFIG;
}
+ // Jaeger version data is embedded by the query-service via search/replace.
+ function getJaegerVersion() {
+ const DEFAULT_VERSION = {"gitCommit":"", "gitVersion":"", "buildDate":""};
+ const JAEGER_VERSION = DEFAULT_VERSION;
+ return JAEGER_VERSION;
+ }
</script>
</head>
<body>
| 0 |
diff --git a/layouts/partials/helpers/image.html b/layouts/partials/helpers/image.html {{/* Global resource fallback */}}
{{- $image := .asset.image -}}
+{{/* static/images directory */}}
{{- .root.page_scratch.Set "image" (printf "images/%s" $image) -}}
{{/* Page specific resource */}}
{{- if .root.page -}}
{{- $location := (printf "%s/%s" .root.page.Dir $image) -}}
{{- if (fileExists (printf "content/%s" $location)) -}}
- {{/* special case index: trim _index/ from url */}}
{{- .root.page_scratch.Set "image" $location -}}
{{- end -}}
{{- end -}}
{{/* Fragment specific resource */}}
{{- $location := (printf "%s/%s" .root.fallthrough.file_path $image) -}}
{{- if (fileExists (printf "content/%s" $location)) -}}
- {{/* special case index: trim _index/ from url */}}
{{- .root.page_scratch.Set "image" $location -}}
{{- end -}}
| 2 |
diff --git a/packages/vue/scripts/create-vue-components-docs.js b/packages/vue/scripts/create-vue-components-docs.js @@ -226,7 +226,7 @@ function readVuepressConfig(filename) {
function parseComponentFile(contentComponentFile) {
const headlines = ["# component-description", "# common-usage"];
- const reString = headlines.join("\\r\\n|\\n([\\s\\S]+?)\\s*?") + "\\r\\n|\\n([\\s\\S]+)";
+ const reString = headlines.join("\\n([\\s\\S]+?)\\s*?") + "\\n([\\s\\S]+)";
const regExp = new RegExp(reString, "m");
const reResult = regExp.exec(contentComponentFile);
@@ -539,7 +539,7 @@ function editVuepressConfigFiles(sfComponents) {
// - (2) the indentation of the start tag (needed for nice indentation),
// - (3) the components part (including start and end tag)
// - (4) everything after the end tag
- let regExp = /([\s\S]+)\r\n|\n(\s*)(\/\/\s*@components-docs-start.*[\s\S]*@components-docs-end)\r\n|\n([\s\S]+)/g;
+ let regExp = /([\s\S]+)\n(\s*)(\/\/\s*@components-docs-start.*[\s\S]*@components-docs-end)\n([\s\S]+)/g;
let reResult = regExp.exec(contentConfigJs);
if (!reResult || reResult.length !== 5) {
@@ -573,7 +573,7 @@ function editVuepressConfigFiles(sfComponents) {
// - (4) the indentation of the start tag (needed for nice indentation)
// - (5) the components part (including start and end tag)
// - (6) everything after the end tag
- regExp = /([\s\S]*?)\r\n|\n?(\/\/\s*@components-docs-start.*[\s\S]*?@components-docs-end)\r\n|\n([\s\S]+?)\n(\s*)(\/\/\s*@components-docs-start.*[\s\S]*@components-docs-end)\n([\s\S]+)/g;
+ regExp = /([\s\S]*?)\n?(\/\/\s*@components-docs-start.*[\s\S]*?@components-docs-end)\n([\s\S]+?)\n(\s*)(\/\/\s*@components-docs-start.*[\s\S]*@components-docs-end)\n([\s\S]+)/g;
reResult = regExp.exec(contentEnhanceApp);
if (!reResult || reResult.length !== 7) {
| 13 |
diff --git a/packages/openapi-framework/index.ts b/packages/openapi-framework/index.ts @@ -197,7 +197,7 @@ export default class OpenAPIFramework implements IOpenAPIFramework {
let paths = [];
let routes = [];
- let routesCheckMap = {};
+ const routesCheckMap = {};
if (this.paths) {
paths = [].concat(this.paths);
@@ -258,7 +258,7 @@ export default class OpenAPIFramework implements IOpenAPIFramework {
const operation = this.operations[operationId];
acc[METHOD_ALIASES[method]] = (() => {
- let innerFunction: any = operation;
+ const innerFunction: any = operation;
innerFunction.apiDoc = methodDoc;
return innerFunction;
})();
| 1 |
diff --git a/public/common.css b/public/common.css @@ -2,7 +2,7 @@ body {margin: 0;color: #333;font: 14px/1.42 "Helvetica Neue", Helvetica, Arial,
section { margin: 2em auto; max-width: 900px; }
article {padding: 20px;background: #fff;}
.paragraph { margin: 10px 0; }
-footer {font-weight: bold;font-size: 15px;overflow: hidden;background: #565555;color: #fff;padding: 10px;}
+footer {font-size: 15px;overflow: hidden;background: #565555;color: #fff;padding: 10px;}
footer section {display: flex;justify-content: space-between;}
footer .paragraph {}
footer a { color:#fff;}
| 2 |
diff --git a/character-controller.js b/character-controller.js @@ -1188,16 +1188,8 @@ class NpcPlayer extends StaticUninterpolatedPlayer {
}
}
-function getPlayerCrouchFactor(player) {
- let factor = 1;
- factor *= 1 - 0.4 * player.actionInterpolants.crouch.getNormalized();
- //factor *= 1 - 0.8 * Math.min(player.actionInterpolants.activate.getNormalized() * 1.5, 1);
- return factor;
-};
-
export {
LocalPlayer,
RemotePlayer,
NpcPlayer,
- getPlayerCrouchFactor,
};
\ No newline at end of file
| 2 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue if (!this.component) return
this.wrapEditableAroundSelected()
this.$nextTick(() => {
- this.refreshInlineEditClones()
+ this.refreshInlineEditElems()
})
}
},
drop: 'after'
}
$perAdminApp.stateAction('addComponentToPath', payload).then((data) => {
- this.refreshInlineEditClones()
+ this.refreshInlineEditElems()
this.iframeEditMode()
this.addComponentModal.visible = false
// TODO: would be nice to select the newly inserted component and focus
this.iframe.doc.querySelector('#peregrine-app').setAttribute('contenteditable', 'false')
this.addIframeExtraStyles()
this.removeLinkTargets()
- this.refreshInlineEditClones()
+ this.refreshInlineEditElems()
this.iframeEditMode()
},
this.cleanUpAfterDelete(componentPath)
}
$perAdminApp.stateAction(addOrMove, payload).then((data) => {
- this.refreshInlineEditClones()
+ this.refreshInlineEditElems()
})
this.unselect(this)
event.dataTransfer.clearData('text')
})
},
- refreshInlineEditClones() {
+ refreshInlineEditElems() {
const selector = `[${Attribute.INLINE}]:not(.inline-edit)`
const elements = this.iframe.app.querySelectorAll(selector)
if (!elements || elements.length <= 0) return
if (payload.path !== '/jcr:content') {
$perAdminApp.stateAction('deletePageNode', payload).then((data) => {
this.cleanUpAfterDelete(payload.path)
- this.refreshInlineEditClones()
+ this.refreshInlineEditElems()
})
}
this.unselect(this)
drop: dropPosition
}
$perAdminApp.stateAction('addComponentToPath', payload).then((data) => {
- this.refreshInlineEditClones()
+ this.refreshInlineEditElems()
})
}
}
| 10 |
diff --git a/example/src/logic/uimodel.js b/example/src/logic/uimodel.js @@ -103,7 +103,8 @@ class UIModel
map( (files) => {
// extract only the hdr file from the stream of files
return files.find( (file) => file.name.endsWith(".hdr"));
- })
+ }),
+ filter(file => file),
)
return observables;
}
| 1 |
diff --git a/README.md b/README.md # fullNodePlus
+## Config Examples
+./config.json
+
+default:
+```
+{
+ "network": "testnet",
+ "chainSource": "bcoin"
+}
+```
+Connect to any mainnet trusted node:
+```
+{
+ "network": "main",
+ "chainSource": "p2p",
+ "p2pHost": "127.0.0.1"
+}
+```
+
## Add Wallet:
POST `/wallet`
| 3 |
diff --git a/backend/registration_api/pkg/services/enrollment_service.go b/backend/registration_api/pkg/services/enrollment_service.go @@ -23,8 +23,8 @@ func CreateEnrollment(enrollment *models.Enrollment, position int) error {
}
enrollment.Code = utils.GenerateEnrollmentCode(enrollment.Phone, position)
- exists, err2 := HashFieldExists(enrollment.Code, "phone")
- if err2 == nil && !exists {
+ exists, err2 := KeyExists(enrollment.Code)
+ if err2 == nil && exists == 0 {
err := kernelService.CreateNewRegistry(enrollment, "Enrollment")
return err
} else {
| 14 |
diff --git a/src/tagui_parse.php b/src/tagui_parse.php @@ -282,7 +282,7 @@ $param1 = str_replace(" JAVASCRIPT_OR ","||",$param1); // to restore back "||" t
$param2 = str_replace(" JAVASCRIPT_OR ","||",$param2); $param3 = str_replace(" JAVASCRIPT_OR ","||",$param3);
if (substr_count($params,"|")!=2)
echo "ERROR - " . current_line() . " if/true/false missing for " . $raw_intent . "\n"; else
-return "{if (".$param1.")\nthis.echo(".$param2.");\nelse this.echo(".$param3.");}".end_fi()."\n";}
+return "{".parse_condition("if (".$param1.")")."\nthis.echo(".$param2.");\nelse this.echo(".$param3.");}".end_fi()."\n";}
function test_intent($raw_intent) {
echo "ERROR - " . current_line() . " use CasperJS tester module to professionally " . $raw_intent . "\n";
@@ -311,30 +311,33 @@ if ($params == "") echo "ERROR - " . current_line() . " statement missing for "
else return $params.end_fi()."\n";}
function code_intent($raw_intent) {
-$params = $raw_intent; // natural language handling for conditions
-if ((substr($params,0,3)=="if ") or (substr($params,0,8)=="else if ")
-or (substr($params,0,4)=="for ") or (substr($params,0,6)=="while ")) {
-$params = str_replace(" more than or equal to "," >= ",$params);
-$params = str_replace(" greater than or equal to "," >= ",$params);
-$params = str_replace(" higher than or equal to "," >= ",$params);
-$params = str_replace(" less than or equal to "," <= ",$params);
-$params = str_replace(" lesser than or equal to "," <= ",$params);
-$params = str_replace(" lower than or equal to "," <= ",$params);
-$params = str_replace(" more than "," > ",$params); $params = str_replace(" greater than "," > ",$params);
-$params = str_replace(" higher than "," > ",$params); $params = str_replace(" less than "," < ",$params);
-$params = str_replace(" lesser than "," < ",$params); $params = str_replace(" lower than "," < ",$params);
-$params = str_replace(" not equal to "," != ",$params); $params = str_replace(" equal to "," == ",$params);
-// $params = str_replace(" not "," ! ",$params); // leaving not out until meaningful to implement
-$params = str_replace(" and ",") && (",$params); $params = str_replace(" or ",") || (",$params);
+$params = parse_condition($raw_intent); return $params.end_fi()."\n";}
+
+function parse_condition($logic) { // natural language handling for conditions
+if ((substr($logic,0,3)=="if ") or (substr($logic,0,8)=="else if ")
+or (substr($logic,0,4)=="for ") or (substr($logic,0,6)=="while ")) {
+$logic = str_replace(" more than or equal to "," >= ",$logic);
+$logic = str_replace(" greater than or equal to "," >= ",$logic);
+$logic = str_replace(" higher than or equal to "," >= ",$logic);
+$logic = str_replace(" less than or equal to "," <= ",$logic);
+$logic = str_replace(" lesser than or equal to "," <= ",$logic);
+$logic = str_replace(" lower than or equal to "," <= ",$logic);
+$logic = str_replace(" more than "," > ",$logic); $logic = str_replace(" greater than "," > ",$logic);
+$logic = str_replace(" higher than "," > ",$logic); $logic = str_replace(" less than "," < ",$logic);
+$logic = str_replace(" lesser than "," < ",$logic); $logic = str_replace(" lower than "," < ",$logic);
+$logic = str_replace(" not equal to "," != ",$logic); $logic = str_replace(" equal to "," == ",$logic);
+// $logic = str_replace(" not "," ! ",$logic); // leaving not out until meaningful to implement
+$logic = str_replace(" and ",") && (",$logic); $logic = str_replace(" or ",") || (",$logic);
// add simple opening and closing brackets to the condition if not present
-if ((substr($params,0,3)=="if ") and (substr(trim(substr($params,3)),0,1) != "("))
-$params = "if (" . trim(substr($params,3)) . ")";
-if ((substr($params,0,8)=="else if ") and (substr(trim(substr($params,8)),0,1) != "("))
-$params = "else if (" . trim(substr($params,8)) . ")";
-if ((substr($params,0,4)=="for ") and (substr(trim(substr($params,4)),0,1) != "("))
-$params = "for (" . trim(substr($params,4)) . ")";
-if ((substr($params,0,6)=="while ") and (substr(trim(substr($params,6)),0,1) != "("))
-$params = "while (" . trim(substr($params,6)) . ")";} return $params.end_fi()."\n";}
+if ((substr($logic,0,3)=="if ") and (substr(trim(substr($logic,3)),0,1) != "("))
+$logic = "if (" . trim(substr($logic,3)) . ")";
+if ((substr($logic,0,8)=="else if ") and (substr(trim(substr($logic,8)),0,1) != "("))
+$logic = "else if (" . trim(substr($logic,8)) . ")";
+if ((substr($logic,0,4)=="for ") and (substr(trim(substr($logic,4)),0,1) != "("))
+$logic = "for (" . trim(substr($logic,4)) . ")";
+if ((substr($logic,0,6)=="while ") and (substr(trim(substr($logic,6)),0,1) != "("))
+$logic = "while (" . trim(substr($logic,6)) . ")";}
+return $logic;}
?>
| 7 |
diff --git a/ChatImprovements.user.js b/ChatImprovements.user.js // @description Show users in room as a list with usernames, more timestamps
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 0.9.2
+// @version 0.9.3
//
// @include https://chat.stackoverflow.com/*
// @include https://chat.stackexchange.com/*
function parseMessageLink(i, el) {
// Convert non-transcript chatroom links to the room transcript
- if(el.href.includes('chat.') && el.href.includes('/rooms/')) {
+ if(el.href.includes('chat.') && el.href.includes('/rooms/') && !el.href.includes('/info/')) {
el.href = el.href.replace('/rooms/', '/transcript/');
el.innerText = el.innerText.replace('/rooms/', '/transcript/');
}
| 8 |
diff --git a/program-device.mabu b/program-device.mabu @@ -178,7 +178,9 @@ LIBPATHS = $(MLSDK)/lumin/stl/libc++/lib \
$(MLSDK)/lumin/usr/lib \
$(MLSDK)/lib/lumin \
node_modules/libnode.a \
- mllib
+ node_modules/native-canvas-deps\lib2\magicleap \
+ node_modules/native-audio-deps\lib2\magicleap \
+ node_modules/native-video-deps\lib2\magicleap
# flags for C/C++/assembly preprocessing
#
| 4 |
diff --git a/html/popup.html b/html/popup.html <!DOCTYPE html>
<head>
<title>DuckDuckGo</title>
-<link rel="stylesheet" type="text/css" href="popup.css">
+<link rel="stylesheet" type="text/css" href="css/popup.css">
</head>
<body>
<div id="topbar">
<input id="search_button_homepage" tabindex="2" value="" type="submit">
<input id="search_form_input_clear" tabindex="3" value=" " type="button">
</form>
-
-
-<img id="icon_advanced" class="maximized" src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDIwIDIwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGcgaWQ9Im1pbmltaXplIj48cGF0aCBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojQUFBQUFBOyIgZD0iTTEwLDBjNS41LDAsMTAsNC41LDEwLDEwYzAsNS41LTQuNSwxMC0xMCwxMFMwLDE1LjUsMCwxMEMwLDQuNSw0LjUsMCwxMCwweiIvPjxwYXRoIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsOiNGRkZGRkY7IiBkPSJNMTQsOXYySDZWOUgxNHoiLz48L2c+PC9zdmc+">
</div>
<div id="advanced">
| 2 |
diff --git a/src/og/renderer/Renderer.js b/src/og/renderer/Renderer.js @@ -15,8 +15,6 @@ import { screenFrame } from '../shaders/screenFrame.js';
import { FontAtlas } from '../utils/FontAtlas.js';
import { TextureAtlas } from '../utils/TextureAtlas.js';
-window.SCREEN = 0;
-
/**
* Represents high level WebGL context interface that starts WebGL handler working in real time.
* @class
@@ -388,7 +386,13 @@ Renderer.prototype.initialize = function () {
if (this.handler.gl.type === "webgl") {
this.sceneFramebuffer = new Framebuffer(this.handler);
this.sceneFramebuffer.init();
+
this._fnScreenFrame = this._screenFrameNoMSAA;
+
+ this.screenTexture = {
+ screen: this.sceneFramebuffer.textures[0],
+ picking: this.pickingFramebuffer.textures[0]
+ };
} else {
let _maxMSAA = this.getMaxMSAA(this._internalFormat);
@@ -421,6 +425,11 @@ Renderer.prototype.initialize = function () {
}).init();
this._fnScreenFrame = this._screenFrameMSAA;
+
+ this.screenTexture = {
+ screen: this.bloomFramebuffer.textures[0],
+ picking: this.pickingFramebuffer.textures[0]
+ };
}
this.handler.onCanvasResize = () => {
@@ -436,14 +445,15 @@ Renderer.prototype.initialize = function () {
this.addControl(temp[i]);
}
- this.screenTexture = {
- screen: this.bloomFramebuffer.textures[0],
- picking: this.pickingFramebuffer.textures[0]
- }
-
this.outputTexture = this.screenTexture.screen;
};
+Renderer.prototype.setCurrentScreen = function (screenName) {
+ if (this.screenTexture[screenName]) {
+ this.outputTexture = this.screenTexture[screenName];
+ }
+};
+
Renderer.prototype._resize = function () {
let obj = this.handler.canvas;
this.activeCamera.setAspectRatio(obj.clientWidth / obj.clientHeight);
@@ -713,13 +723,7 @@ Renderer.prototype._screenFrameMSAA = function () {
sh.activate();
gl.activeTexture(gl.TEXTURE0);
-
gl.bindTexture(gl.TEXTURE_2D, this.outputTexture);
-
- //gl.bindTexture(gl.TEXTURE_2D, this.bloomFramebuffer.textures[0]);
- //gl.bindTexture(gl.TEXTURE_2D, this.pickingFramebuffer.textures[0]);
- //gl.bindTexture(gl.TEXTURE_2D, globe.planet._heightPickingFramebuffer.textures[0]);
-
gl.uniform1i(p.uniforms.texture, 0);
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
@@ -735,8 +739,7 @@ Renderer.prototype._screenFrameNoMSAA = function () {
gl.disable(gl.DEPTH_TEST);
sh.activate();
gl.activeTexture(gl.TEXTURE0);
- gl.bindTexture(gl.TEXTURE_2D, this.sceneFramebuffer.textures[window.SCREEN]);
- // gl.bindTexture(gl.TEXTURE_2D, this.pickingFramebuffer.textures[0]);
+ gl.bindTexture(gl.TEXTURE_2D, this.outputTexture);
gl.uniform1i(p.uniforms.texture, 0);
gl.bindBuffer(gl.ARRAY_BUFFER, this._screenFrameCornersBuffer);
gl.vertexAttribPointer(p.attributes.corners, 2, gl.FLOAT, false, 0, 0);
| 0 |
diff --git a/src/WebformBuilder.js b/src/WebformBuilder.js @@ -1049,7 +1049,7 @@ export default class WebformBuilder extends Component {
const schema = parentContainer ? parentContainer[index]: (comp ? comp.schema : []);
this.emit('saveComponent',
schema,
- component,
+ comp.component,
parentComponent.schema,
path,
index,
| 14 |
diff --git a/userscript.user.js b/userscript.user.js @@ -24040,14 +24040,87 @@ var $$IMU_EXPORT$$;
if (domain === "lohas.nicoseiga.jp") {
// https://lohas.nicoseiga.jp/thumb/6494066i
// https://lohas.nicoseiga.jp/thumb/6494066l -- same size
+ // https://lohas.nicoseiga.jp/thumb/6494066cz -- smaller
// https://lohas.nicoseiga.jp/thumb/7639531m
// https://lohas.nicoseiga.jp/thumb/7639531i -- doesn't work
// https://lohas.nicoseiga.jp/thumb/7639531l -- largest
+ // https://seiga.nicovideo.jp/seiga/im7639531 -- doesn't exist
// larger images:
// https://lohas.nicoseiga.jp/material/4e1a77/8032880
// http://lohas.nicoseiga.jp/priv/5eb1a6e1e94c0e1a55c4b54145af82950dc5145e/1487849470/6505819
// (l, i), d, m, t, c, u, z, q, s
- return src.replace(/(\/thumb\/[0-9]+)[a-z](\?.*)?$/, "$1l$2");
+ newsrc = src.replace(/(\/thumb\/+[0-9]+)[a-z][a-z]?(\?.*)?$/, "$1l$2");
+ if (newsrc !== src)
+ return newsrc;
+
+ var get_nicovideo_obj = function(id) {
+ return {
+ url: src,
+ extra: {page: "https://seiga.nicovideo.jp/seiga/im" + id}
+ };
+ };
+
+ obj = null;
+ match = src.match(/\/thumb\/+([0-9]+)(?:[a-z]+)(?:[?#].*)?$/);
+ if (match) {
+ id = match[1];
+ obj = get_nicovideo_obj(id);
+ }
+
+ if (match && options.do_request && options.cb) {
+ var cache_key = "nicoseiga:" + id;
+ api_cache.fetch(cache_key, options.cb, function(done) {
+ options.do_request({
+ url: "https://seiga.nicovideo.jp/image/source/" + id,
+ method: "GET",
+ onload: function(resp) {
+ if (resp.readyState !== 4)
+ return;
+
+ if (resp.status !== 200) {
+ console_error(resp)
+ return done(null, false);
+ }
+
+ // for https://lohas.nicoseiga.jp/thumb/7639531l, https://seiga.nicovideo.jp/image/source/7639531 is the image itself
+ // TODO; maybe HEAD request to avoid downloading it twice?
+ var headers = headers_list_to_dict(parse_headers(resp.responseHeaders));
+ if ("content-type" in headers) {
+ if (/^image\//.test(headers["content-type"])) {
+ // original page doesn't exist in this case
+ return done(resp.finalUrl, 6*60*60);
+ }
+ }
+
+ var match = resp.responseText.match(/<div\s+class=\"illust_view_big\"[^>]+data-src=\"([^"]+)\"/);
+ if (!match) {
+ console_error("Unable to find match (are you logged in to nicovideo?)", resp);
+ return done(null, false);
+ }
+
+ var url = decode_entities(match[1]);
+ obj.url = urljoin(resp.finalUrl, url, true);
+ done(obj, 6*60*60);
+ }
+ });
+ });
+
+ return {
+ waiting: true
+ };
+ }
+
+ if (!match) {
+ match = src.match(/\/priv\/+[0-9a-f]{10,}\/+[0-9]+\/+([0-9]+)(?:[?#].*)?$/);
+ if (match) {
+ id = match[1];
+ obj = get_nicovideo_obj(id);
+ }
+ }
+
+ if (obj) {
+ return obj;
+ }
}
if (domain === "appdata.hungryapp.co.kr") {
| 7 |
diff --git a/src/lib/vue-sequence-ext.css b/src/lib/vue-sequence-ext.css +body {
+ margin: 0;
+}
+
+.sequence-diagram {
+ margin-top: 20px;
+}
.button {
backface-visibility: hidden;
position: relative;
- margin: 20px;
+ margin: 1px;
cursor: pointer;
display: inline-block;
white-space: nowrap;
| 5 |
diff --git a/test/jasmine/tests/config_test.js b/test/jasmine/tests/config_test.js @@ -9,6 +9,7 @@ var click = require('../assets/click');
var mouseEvent = require('../assets/mouse_event');
var failTest = require('../assets/fail_test');
var delay = require('../assets/delay');
+
var RESIZE_DELAY = 300;
describe('config argument', function() {
@@ -812,5 +813,41 @@ describe('config argument', function() {
.catch(failTest)
.then(done);
});
+
+ it('should not disable scrollZoom when page is made scrollable by large graph', function(done) {
+ gd = document.createElement('div');
+ gd.id = 'graph';
+ document.body.appendChild(gd);
+
+ // locking down fix for:
+ // https://github.com/plotly/plotly.js/issues/2371
+
+ var xrng0;
+ var yrng0;
+
+ Plotly.newPlot(gd, [{
+ y: [1, 2, 1]
+ }], {
+ width: 2 * window.innerWidth
+ }, {
+ scrollZoom: true
+ })
+ .then(function() {
+ xrng0 = gd._fullLayout.xaxis.range.slice();
+ yrng0 = gd._fullLayout.yaxis.range.slice();
+ })
+ .then(_scroll)
+ .then(function() {
+ var xrng = gd._fullLayout.xaxis.range;
+ expect(xrng[0]).toBeGreaterThan(xrng0[0], 'scrolled x-range[0]');
+ expect(xrng[1]).toBeLessThan(xrng0[1], 'scrolled x-range[1]');
+
+ var yrng = gd._fullLayout.yaxis.range;
+ expect(yrng[0]).toBeGreaterThan(yrng0[0], 'scrolled y-range[0]');
+ expect(yrng[1]).toBeLessThan(yrng0[1], 'scrolled y-range[1]');
+ })
+ .catch(failTest)
+ .then(done);
+ });
});
});
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.