code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/iris/models/thread.js b/iris/models/thread.js @@ -247,6 +247,7 @@ export const getPublicThreadsByUser = (
.filter({ isPrivate: false })
// return the thread object as pure without the isPrivate field from the community join earlier
.without('isPrivate')
+ .orderBy(db.desc('lastActive'), db.desc('createdAt'))
.run()
);
};
@@ -274,9 +275,10 @@ const getUsersThreadsForParticipantFeed = (userId, first, after) => {
})
.zip()
// hide any that are deleted
+ .filter(thread => db.not(thread.hasFields('deletedAt')))
+ .orderBy(db.desc('lastActive'), db.desc('createdAt'))
.skip(after || 0)
.limit(first)
- .filter(thread => db.not(thread.hasFields('deletedAt')))
.pluck('id')
.run()
);
| 1 |
diff --git a/public/javascripts/Choropleth.js b/public/javascripts/Choropleth.js /**
* Central function that handles the creation of choropleths and maps.
*/
-function Choropleth(_, $, difficultRegionIds, params, polygonData, polygonRateData, mapParamData) {
+function Choropleth(_, $, difficultRegionIds, params, layers, polygonData, polygonRateData, mapParamData) {
var labelText = {
"NoSidewalk": "Missing Sidewalks",
"NoCurbRamp": "Missing Curb Ramps",
@@ -57,12 +57,11 @@ function Choropleth(_, $, difficultRegionIds, params, polygonData, polygonRateDa
}
// Renders the neighborhood polygons, colored by completion percentage.
- function initializeChoroplethNeighborhoodPolygons(map, rates) {
+ function initializeChoroplethNeighborhoodPolygons(map, rates, layers) {
var regionData;
// Default region color, used to check if any regions are missing data.
- var neighborhoodPolygonStyle = params.neighborhoodPolygonStyle,
- layers = [],
- currentLayer;
+ var neighborhoodPolygonStyle = params.neighborhoodPolygonStyle
+ var currentLayer;
// Finds the matching neighborhood's completion percentage, and uses it to determine the fill color.
function style(feature) {
@@ -312,7 +311,7 @@ function Choropleth(_, $, difficultRegionIds, params, polygonData, polygonRateDa
*/
function initializeChoropleth(data) {
// make a choropleth of neighborhood completion percentages
- initializeChoroplethNeighborhoodPolygons(choropleth, data);
+ initializeChoroplethNeighborhoodPolygons(choropleth, data, layers);
$('#loadingChoropleth').hide();
}
| 3 |
diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/method/index.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/method/index.js @@ -26,6 +26,8 @@ module.exports = {
if (event.http.private) {
template.Properties.ApiKeyRequired = true;
+ } else {
+ template.Properties.ApiKeyRequired = false;
}
const methodLogicalId = this.provider.naming
| 12 |
diff --git a/src/components/__snapshots__/SaveEventButton.test.js.snap b/src/components/__snapshots__/SaveEventButton.test.js.snap @@ -39,7 +39,7 @@ exports[`renders correctly 1`] = `
"ddd": 0,
"fr": 25,
"h": 48,
- "ip": 6,
+ "ip": 17,
"layers": Array [
Object {
"ao": 0,
@@ -173,9 +173,9 @@ exports[`renders correctly 1`] = `
],
},
"n": Array [
- "0p695_1_0p277_0p334",
- "0p695_1_0p277_0p333",
- "0p695_1_0p277_-2p821",
+ "0p695_1_0p277_0p186",
+ "0p695_1_0p277_0p185",
+ "0p695_1_0p277_-1p567",
],
"o": Object {
"x": Array [
@@ -184,9 +184,9 @@ exports[`renders correctly 1`] = `
0.277,
],
"y": Array [
- 0.334,
- 0.333,
- -2.821,
+ 0.186,
+ 0.185,
+ -1.567,
],
},
"s": Array [
@@ -236,10 +236,10 @@ exports[`renders correctly 1`] = `
178.025,
100,
],
- "t": 26,
+ "t": 22,
},
Object {
- "t": 30,
+ "t": 26,
},
],
},
@@ -456,7 +456,7 @@ exports[`renders correctly 1`] = `
"bm": 0,
"ddd": 0,
"ind": 2,
- "ip": 13,
+ "ip": 18,
"ks": Object {
"a": Object {
"a": 0,
@@ -532,7 +532,7 @@ exports[`renders correctly 1`] = `
"s": Array [
29,
],
- "t": 22.543,
+ "t": 22,
},
Object {
"e": Array [
@@ -560,7 +560,7 @@ exports[`renders correctly 1`] = `
"s": Array [
29,
],
- "t": 33,
+ "t": 29,
},
Object {
"e": Array [
@@ -588,10 +588,10 @@ exports[`renders correctly 1`] = `
"s": Array [
29,
],
- "t": 37,
+ "t": 33,
},
Object {
- "t": 40,
+ "t": 36,
},
],
},
@@ -601,25 +601,25 @@ exports[`renders correctly 1`] = `
"k": Array [
Object {
"e": Array [
- 26.618,
+ 29.261,
],
"i": Object {
"x": Array [
- 0.786,
+ 0.845,
],
"y": Array [
- 0.477,
+ 0.399,
],
},
"n": Array [
- "0p786_0p477_0p724_0p065",
+ "0p845_0p399_0p724_0p052",
],
"o": Object {
"x": Array [
0.724,
],
"y": Array [
- 0.065,
+ 0.052,
],
},
"s": Array [
@@ -640,23 +640,23 @@ exports[`renders correctly 1`] = `
],
},
"n": Array [
- "0p701_1p001_0p308_0p653",
+ "0p701_1p001_0p105_0p381",
],
"o": Object {
"x": Array [
- 0.308,
+ 0.105,
],
"y": Array [
- 0.653,
+ 0.381,
],
},
"s": Array [
- 26.618,
+ 29.261,
],
- "t": 26,
+ "t": 23,
},
Object {
- "t": 40,
+ "t": 36,
},
],
},
@@ -672,8 +672,8 @@ exports[`renders correctly 1`] = `
"k": Array [
Object {
"e": Array [
- 161,
- 161,
+ 188,
+ 188,
100,
],
"i": Object {
@@ -691,7 +691,7 @@ exports[`renders correctly 1`] = `
"n": Array [
"0p667_1_0p167_0p167",
"0p667_1_0p167_0p167",
- "0p667_1_0p167_13p952",
+ "0p667_1_0p167_14p118",
],
"o": Object {
"x": Array [
@@ -702,7 +702,7 @@ exports[`renders correctly 1`] = `
"y": Array [
0.167,
0.167,
- 13.952,
+ 14.118,
],
},
"s": Array [
@@ -725,14 +725,14 @@ exports[`renders correctly 1`] = `
0.667,
],
"y": Array [
- 0.979,
- 0.979,
+ 0.994,
+ 0.994,
1,
],
},
"n": Array [
- "0p477_0p979_0p333_0",
- "0p477_0p979_0p333_0",
+ "0p477_0p994_0p333_0",
+ "0p477_0p994_0p333_0",
"0p667_1_0p333_0",
],
"o": Object {
@@ -748,14 +748,14 @@ exports[`renders correctly 1`] = `
],
},
"s": Array [
- 161,
- 161,
+ 188,
+ 188,
100,
],
- "t": 22,
+ "t": 21,
},
Object {
- "t": 33,
+ "t": 29,
},
],
},
@@ -1960,7 +1960,7 @@ exports[`renders correctly 1`] = `
],
"markers": Array [],
"nm": "Heart_List",
- "op": 54,
+ "op": 37,
"v": "5.1.9",
"w": 48,
}
| 3 |
diff --git a/core/algorithm-builder/environments/nodejs/wrapper/package.json b/core/algorithm-builder/environments/nodejs/wrapper/package.json "author": "",
"license": "ISC",
"dependencies": {
- "@hkube/nodejs-wrapper": "^2.0.41"
+ "@hkube/nodejs-wrapper": "^2.0.45"
},
"devDependencies": {}
}
\ No newline at end of file
| 3 |
diff --git a/README.md b/README.md @@ -93,7 +93,7 @@ Using melonJS
Basic Example
```JavaScript
-import * as me from "https://cdn.jsdelivr.net/npm/melonjs/dist/melonjs.module.js";
+import * as me from "https://esm.run/melonjs";
me.device.onReady(function () {
// initialize the display canvas once the device/browser is ready
@@ -170,15 +170,11 @@ If you need to import the ES6 module of melonjs (e.g. for Webpack):
Or can simply be added to your html, using [jsDeliver](https://www.jsdelivr.com/package/npm/melonjs) content delivery network (CDN) :
```html
-<!-- load the ES5 UMD bundle of melonJS v10.0.0 -->
-<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/melonjs.js"></script>
-<!-- load the ES6 module bundle of melonJS v10.0.0 -->
-<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/melonjs.module.js"></script>
+<!-- load the ES6 module bundle of melonJS v10.0 -->
+<script src="https://esm.run/[email protected]"></script>
<!-- omit the version completely to get the latest one -->
<!-- you should NOT use this in production -->
-<script src="https://cdn.jsdelivr.net/npm/melonjs/dist/melonjs.js"></script>
-<!-- add ".min" to any JS/CSS file to get a minified version -->
-<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/melonjs.min.js"></script>
+<script src="https://esm.run/melonjs"></script>
```
> Note: starting from the 10.0.0 version, the debug plugin is no longer provided as part of the melonJS library release, and has been moved to the official [boilerplate](https://github.com/melonjs/es6-boilerplate)
| 4 |
diff --git a/assets/js/stripe.js b/assets/js/stripe.js @@ -50,7 +50,7 @@ function onSubmit(configId, form, stripe, card) {
currency: formData.currency,
price: formData.price,
metadata: Object.assign(formData, {}),
- }
+ };
if (formData.custom_value === "true") {
price = formData.custom_price_text;
serializedForm.currency = form.$('[data-input=currency]').attr('data-value');
| 0 |
diff --git a/CHANGES.md b/CHANGES.md @@ -25,6 +25,7 @@ Change Log
* Set `projectionPicker` to `true` in the options when creating a `Viewer` to add a widget that will switch projections. [#5021](https://github.com/AnalyticalGraphicsInc/cesium/pull/5021)
* Call `switchToOrthographicFrustum` or `switchToPerspectiveFrustum` on `Camera` to change projections.
* Fix billboard, point and label clustering in 2D and Columbus view. [#5136](https://github.com/AnalyticalGraphicsInc/cesium/pull/5136)
+* Fixed issues with imagerySplitPosition and the international date line in 2D mode. [#5151](https://github.com/AnalyticalGraphicsInc/cesium/pull/5151)
### 1.31 - 2017-03-01
| 3 |
diff --git a/lib/node_modules/@stdlib/repl/presentation/lib/main.js b/lib/node_modules/@stdlib/repl/presentation/lib/main.js @@ -1101,6 +1101,10 @@ setNonEnumerableReadOnly( Presentation.prototype, 'watch', function watch() {
if ( this._source === '' ) {
throw new Error( 'invalid operation. No presentation file to watch. Use the `load()` method to load a presentation.' );
}
+ if ( this._watcher ) {
+ debug( 'Already watching a source presentation file for changes.' );
+ return this;
+ }
self = this;
opts = {
'persistent': false,
| 9 |
diff --git a/policykit/tests/test_policy_evaluation.py b/policykit/tests/test_policy_evaluation.py @@ -5,7 +5,7 @@ from django.test import Client, TestCase
from integrations.metagov.library import update_metagov_community, metagov_slug
from integrations.metagov.models import MetagovProcess, MetagovPlatformAction
from integrations.slack.models import SlackCommunity, SlackPinMessage, SlackUser
-from policyengine.models import CommunityRole, PlatformPolicy
+from policyengine.models import CommunityRole, PlatformPolicy, ConstitutionPolicy, PolicykitAddCommunityDoc
all_actions_pass_policy = {
"filter": "return True",
@@ -32,12 +32,6 @@ class EvaluationTests(TestCase):
)
self.user = SlackUser.objects.create(username="test", community=self.community)
- # create a test user with can_execute permissions
- can_execute = Permission.objects.get(name="Can execute slack pin message")
- self.user_with_can_execute = SlackUser.objects.create(username="powerful-user", community=self.community)
- self.user_with_can_execute.user_permissions.add(can_add)
- self.user_with_can_execute.user_permissions.add(can_execute)
-
# Activate a plugin to use in tests
update_metagov_community(
community=self.community,
@@ -58,13 +52,20 @@ class EvaluationTests(TestCase):
policy = PlatformPolicy(
**all_actions_fail_policy,
community=self.community,
- description="test",
- name="test policy",
+ description="all actions fail",
+ name="all actions fail",
)
policy.save()
+ # create a test user with can_execute permissions
+ can_execute = Permission.objects.get(name="Can execute slack pin message")
+ can_add = Permission.objects.get(name="Can add slack pin message")
+ user_with_can_execute = SlackUser.objects.create(username="powerful-user", community=self.community)
+ user_with_can_execute.user_permissions.add(can_add)
+ user_with_can_execute.user_permissions.add(can_execute)
+
# action initiated by user with "can_execute" should pass
- action = SlackPinMessage(initiator=self.user_with_can_execute, community=self.community)
+ action = SlackPinMessage(initiator=user_with_can_execute, community=self.community)
action.execute = lambda: None # don't do anything on execute
action.save()
self.assertEqual(action.proposal.status, "passed")
@@ -75,6 +76,37 @@ class EvaluationTests(TestCase):
action.save()
self.assertEqual(action.proposal.status, "failed")
+ def test_can_execute_constitution(self):
+ """Test that users with can_execute permissions can execute any constitution action and mark it as 'passed'"""
+ all_actions_fail_policy = {
+ **all_actions_pass_policy,
+ "check": "return FAILED",
+ }
+ policy = ConstitutionPolicy(
+ **all_actions_fail_policy,
+ community=self.community,
+ description="all actions fail",
+ name="all actions fail",
+ )
+ policy.save()
+
+ # create a test user with can_execute permissions for PolicykitAddCommunityDoc
+ can_add = Permission.objects.get(name="Can add policykit add community doc")
+ can_execute = Permission.objects.get(name="Can execute policykit add community doc")
+ user_with_can_execute = SlackUser.objects.create(username="powerful-user", community=self.community)
+ user_with_can_execute.user_permissions.add(can_add)
+ user_with_can_execute.user_permissions.add(can_execute)
+
+ # action initiated by user with "can_execute" should pass
+ action = PolicykitAddCommunityDoc(name="my doc", initiator=user_with_can_execute, community=self.community)
+ action.save()
+ self.assertEqual(action.proposal.status, "passed")
+
+ # action initiated by user without "can_execute" should fail
+ action = PolicykitAddCommunityDoc(name="my other doc", initiator=self.user, community=self.community)
+ action.save()
+ self.assertEqual(action.proposal.status, "failed")
+
def test_close_process(self):
# 1) Create Policy and PlatformAction
policy_code = {
| 0 |
diff --git a/plugins/image/src/_md5.js b/plugins/image/src/_md5.js +/* eslint-disable no-bitwise */
/*
* JavaScript MD5
* https://github.com/blueimp/JavaScript-MD5
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
-/* global define */
-
-/* eslint-disable strict */
-
-
/**
* Add integers, wrapping at 2^32.
| 11 |
diff --git a/src/pages/404.js b/src/pages/404.js import React from "react"
-import { Link } from "gatsby"
+import AnchorLink from "../components/mdx/anchor-link" // TODO
import SEO from "../components/seo"
import DocsTitle from "../components/docs-title"
@@ -10,7 +10,8 @@ const NotFoundPage = () => (
<SEO title="Not found"/>
<h1>Not found</h1>
<p>Unfortunately, the page you requested cannot be found.</p>
- <p><Link to="/">Go to <DocsTitle/> docs home</Link></p>
+ {/* TODO - get className from somewhere? */}
+ <p><AnchorLink href="/">Go to <DocsTitle/> docs home</AnchorLink></p>
</>
)
| 7 |
diff --git a/content/en/guide/v10/hooks.md b/content/en/guide/v10/hooks.md @@ -224,8 +224,8 @@ The `useCallback` hook can be used to ensure that the returned function will rem
```jsx
const onClick = useCallback(
- () => console.log(a, b);
- [a, b],
+ () => console.log(a, b),
+ [a, b]
);
```
| 14 |
diff --git a/webpack.config.js b/webpack.config.js @@ -38,7 +38,7 @@ module.exports = {
disableHostCheck: true,
historyApiFallback: true,
headers: {
- "Content-Security-Policy-Report-Only": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src *; img-src *; frame-src 'self' ucscxena: https://www.youtube.com https://xenageneset.berkeleybop.io/xena/"
+ "Content-Security-Policy-Report-Only": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src *; img-src * data:; frame-src 'self' ucscxena: https://www.youtube.com https://xenageneset.berkeleybop.io/xena/"
},
proxy: {
'/api/**': {
| 11 |
diff --git a/components/layout/theme.css b/components/layout/theme.css }
& .panel {
+ height: calc(100vh - var(--appbar-height));
+ max-height: calc(100vh - var(--appbar-height));
top: var(--appbar-height);
&:not(.bodyScroll) {
- height: calc(100vh - var(--appbar-height));
- max-height: calc(100vh - var(--appbar-height));
overflow-y: scroll;
}
@media screen and (--xxs-viewport) and (--portrait) {
+ height: calc(100vh - var(--appbar-height-m-portrait));
+ max-height: calc(100vh - var(--appbar-height-m-portrait));
top: var(--appbar-height-m-portrait);
}
@media screen and (--xs-viewport) and (--landscape) {
+ height: calc(100vh - var(--appbar-height-m-landscape));
+ max-height: calc(100vh - var(--appbar-height-m-landscape));
top: var(--appbar-height-m-landscape);
}
}
| 1 |
diff --git a/src/angular/projects/spark-angular/package.json b/src/angular/projects/spark-angular/package.json "lerna-publish": "cd ../../dist/spark-angular && npm publish"
},
"peerDependencies": {
- "@angular/animations": "^7.0.0 || ^8.0.0",
- "@angular/common": "^7.0.0 || ^8.0.0",
- "@angular/compiler": "^7.0.0 || ^8.0.0",
- "@angular/compiler-cli": "^7.0.0 || ^8.0.0",
- "@angular/core": "^7.0.0 || ^8.0.0",
- "@angular/forms": "^7.0.0 || ^8.0.0",
- "@angular/platform-browser": "^7.0.0 || ^8.0.0",
- "@angular/platform-browser-dynamic": "^7.0.0 || ^8.0.0",
- "@angular/router": "^7.0.0 || ^8.0.0",
+ "@angular/animations": ">=7.0.0 <=8.0.0",
+ "@angular/common": ">=7.0.0 <=8.0.0",
+ "@angular/compiler": ">=7.0.0 <=8.0.0",
+ "@angular/compiler-cli": ">=7.0.0 <=8.0.0",
+ "@angular/core": ">=7.0.0 <=8.0.0",
+ "@angular/forms": ">=7.0.0 <=8.0.0",
+ "@angular/platform-browser": ">=7.0.0 <=8.0.0",
+ "@angular/platform-browser-dynamic": ">=7.0.0 <=8.0.0",
+ "@angular/router": ">=7.0.0 <=8.0.0",
"@sparkdesignsystem/spark": "^12.0.0",
"lodash": "^4.17.10",
"tiny-date-picker": "^3.2.6"
| 3 |
diff --git a/metaversefile-api.js b/metaversefile-api.js @@ -442,6 +442,9 @@ metaversefile.setApi({
throw new Error('useApp cannot be called outside of render()');
}
},
+ useScene() {
+ return scene;
+ },
useWorld() {
return {
/* addObject() {
| 0 |
diff --git a/contribs/gmf/src/theme/Themes.js b/contribs/gmf/src/theme/Themes.js @@ -586,15 +586,13 @@ export function getSnappingConfig(node) {
/**
* Get the maximal resolution defined for this layer. Looks in the
* layer itself before to look into its metadata.
- * @param {import('gmf/themes.js').GmfLayerWMS} gmfLayer the GeoMapFish Layer. WMTS layer is
- * also allowed (the type is defined as GmfLayerWMS only to avoid some
- * useless tests to know if a maxResolutionHint property can exist
- * on the node).
+ * @param {import('gmf/themes.js').GmfLayerWMS|import('gmf/themes.js').GmfLayerWMTS} gmfLayer the GeoMapFish Layer.
* @return {number|undefined} the max resolution or undefined if any.
* @hidden
*/
export function getNodeMaxResolution(gmfLayer) {
const metadata = gmfLayer.metadata;
+ // @ts-ignore: ignore error about maxResolutionHint no present in GmfLayerWMTS typedef
let maxResolution = gmfLayer.maxResolutionHint;
if (maxResolution === undefined && metadata !== undefined) {
maxResolution = metadata.maxResolution;
@@ -606,15 +604,13 @@ export function getNodeMaxResolution(gmfLayer) {
/**
* Get the minimal resolution defined for this layer. Looks in the
* layer itself before to look into its metadata.
- * @param {import('gmf/themes.js').GmfLayerWMS} gmfLayer the GeoMapFish Layer. WMTS layer is
- * also allowed (the type is defined as GmfLayerWMS only to avoid some
- * useless tests to know if a minResolutionHint property can exist
- * on the node).
+ * @param {import('gmf/themes.js').GmfLayerWMS|import('gmf/themes.js').GmfLayerWMTS} gmfLayer the GeoMapFish Layer.
* @return {number|undefined} the min resolution or undefined if any.
* @hidden
*/
export function getNodeMinResolution(gmfLayer) {
const metadata = gmfLayer.metadata;
+ // @ts-ignore: ignore error about minResolutionHint no present in GmfLayerWMTS typedef
let minResolution = gmfLayer.minResolutionHint;
if (minResolution === undefined && metadata !== undefined) {
minResolution = metadata.minResolution;
| 11 |
diff --git a/userscript.user.js b/userscript.user.js @@ -47980,9 +47980,10 @@ var $$IMU_EXPORT$$;
if (newsrc) return newsrc;
}
- if (domain === "static-lvlt.xhcdn.com") {
+ if (domain_nosub === "xhcdn.com") {
// https://static-lvlt.xhcdn.com/xh-tpl3/images/pixel.gif
- if (/\/xh-tpl[0-9]*\/+images\/+pixel\./.test(src)) {
+ // https://static-lvlt.xhcdn.com/xh-desktop/images/pixel.gif
+ if (/\/xh-(?:tpl|desktop)[0-9]*\/+images\/+pixel\./.test(src)) {
return {
url: src,
bad: "mask"
@@ -107337,6 +107338,7 @@ var $$IMU_EXPORT$$;
};
var add_file = function(data, our_source, progresscb, cb) {
+ // fixme: if img is blob, we need to free it
if (data.data.img) {
// otherwise it'll both use bandwidth and play the audio
if (data.data.img.tagName === "VIDEO") {
| 9 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js b/packages/node_modules/@node-red/editor-client/src/js/ui/palette.js @@ -98,18 +98,36 @@ RED.palette = (function() {
var displayLines = [];
- var currentLine = words[0];
- var currentLineWidth = RED.view.calculateTextWidth(currentLine, "red-ui-palette-label", 0);
-
- for (var i=1;i<words.length;i++) {
- var newWidth = RED.view.calculateTextWidth(currentLine+" "+words[i], "red-ui-palette-label", 0);
+ var currentLine = "";
+ for (var i=0;i<words.length;i++) {
+ var word = words[i];
+ var sep = (i == 0) ? "" : " ";
+ var newWidth = RED.view.calculateTextWidth(currentLine+sep+word, "red-ui-palette-label", 0);
if (newWidth < nodeWidth) {
- currentLine += " "+words[i];
- currentLineWidth = newWidth;
+ currentLine += sep +word;
} else {
+ if (i > 0) {
displayLines.push(currentLine);
- currentLine = words[i];
- currentLineWidth = RED.view.calculateTextWidth(currentLine, "red-ui-palette-label", 0);
+ }
+ while (true) {
+ var wordWidth = RED.view.calculateTextWidth(word, "red-ui-palette-label", 0);
+ if (wordWidth >= nodeWidth) {
+ // break word if too wide
+ for(var j = word.length; j > 0; j--) {
+ var s = word.substring(0, j);
+ var width = RED.view.calculateTextWidth(s, "red-ui-palette-label", 0);
+ if (width < nodeWidth) {
+ displayLines.push(s);
+ word = word.substring(j);
+ break;
+ }
+ }
+ }
+ else {
+ currentLine = word;
+ break;
+ }
+ }
}
}
displayLines.push(currentLine);
| 11 |
diff --git a/components/evenement/event.js b/components/evenement/event.js @@ -211,7 +211,20 @@ function Event({event, background, isPassed, id, activeEvent, handleOpen}) {
}
Event.propTypes = {
- event: PropTypes.object.isRequired,
+ event: PropTypes.shape({
+ titre: PropTypes.string,
+ adresse: PropTypes.object,
+ description: PropTypes.string,
+ date: PropTypes.string,
+ href: PropTypes.string,
+ tags: PropTypes.array,
+ type: PropTypes.string,
+ heureDebut: PropTypes.string,
+ heureFin: PropTypes.string,
+ cible: PropTypes.string,
+ isOnlineOnly: PropTypes.bool,
+ instructions: PropTypes.string,
+ }).isRequired,
id: PropTypes.string.isRequired,
handleOpen: PropTypes.func.isRequired,
activeEvent: PropTypes.string,
| 0 |
diff --git a/test/jasmine/bundle_tests/finance_test.js b/test/jasmine/bundle_tests/finance_test.js @@ -13,16 +13,18 @@ describe('Bundle with finance trace type', function() {
var mock = require('@mocks/finance_style.json');
- it('should register the correct trace modules for the generated traces', function() {
+ it('should not register transforms anymore', function() {
var transformModules = Object.keys(Plotly.Plots.transformsRegistry);
- expect(transformModules).toEqual(['ohlc', 'candlestick']);
+ expect(transformModules).toEqual([]);
});
it('should register the correct trace modules for the generated traces', function() {
var traceModules = Object.keys(Plotly.Plots.modules);
- expect(traceModules).toEqual(['scatter', 'box', 'ohlc', 'candlestick']);
+ // scatter is registered no matter what
+ // ohlc uses some parts of box by direct require but does not need to register it.
+ expect(traceModules).toEqual(['scatter', 'ohlc', 'candlestick']);
});
it('should graph ohlc and candlestick traces', function(done) {
@@ -30,8 +32,8 @@ describe('Bundle with finance trace type', function() {
Plotly.plot(createGraphDiv(), mock.data, mock.layout).then(function() {
var gSubplot = d3.select('g.cartesianlayer');
- expect(gSubplot.selectAll('g.trace.scatter').size()).toEqual(2);
- expect(gSubplot.selectAll('g.trace.boxes').size()).toEqual(2);
+ expect(gSubplot.selectAll('g.trace.ohlc').size()).toEqual(1);
+ expect(gSubplot.selectAll('g.trace.boxes').size()).toEqual(1);
destroyGraphDiv();
done();
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,14 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.48.1] -- 2019-05-30
+
+### Fixed
+- Fix single-sample-point `histogram2d` traces with set bins settings [#3922]
+- Fix bingroup attributes for `histogram2dcontour` traces [#3922]
+- Fix hover label content on empty `histogram2d` bins [#3922]
+
+
## [1.48.0] -- 2019-05-28
### Added
| 3 |
diff --git a/components/Vote/Election.js b/components/Vote/Election.js -import React, { useEffect, useState } from 'react'
+import React, { useEffect, useMemo, useState } from 'react'
import {
A,
Button,
@@ -21,8 +21,6 @@ import ElectionConfirm from './ElectionConfirm'
import { Card, sharedStyles } from './text'
import createPersistedState from '../../lib/hooks/use-persisted-state'
-const useGenElection = createPersistedState('republik-general-election')
-
const { P } = Interaction
const query = gql`
@@ -170,6 +168,11 @@ const Election = compose(
mandatoryCandidates,
showMeta
}) => {
+ const electionId = election.id
+ const useGenElection = useMemo(
+ () => createPersistedState(`republik-general-election-${electionId}`),
+ [electionId]
+ )
const [vote, setVote] = useGenElection(
[...election.candidacies]
.sort((c1, c2) => {
| 7 |
diff --git a/assets/stylesheets/sessions/sessions.scss b/assets/stylesheets/sessions/sessions.scss @@ -119,7 +119,6 @@ $cWhite: #FFF;
}
p.Sessions-text--sharedSecret {
- color: $cWhite;
width: 100%;
height: auto;
margin: 0 auto;
@@ -137,7 +136,6 @@ $cWhite: #FFF;
}
p.Sessions-text--code {
- color: $cWhite;
font-weight: 500;
font-size: 12px;
@@ -190,6 +188,10 @@ $cWhite: #FFF;
line-height: 20px;
text-align: center;
+ .Sessions-text--code, .Sessions-text--sharedSecret {
+ color: #979EA1;
+ }
+
a {
color: $cLocationBlue;
text-decoration: none;
@@ -208,6 +210,10 @@ $cWhite: #FFF;
line-height: 20px;
text-align: center;
+ .Sessions-text--code, .Sessions-text--sharedSecret {
+ color: $cWhite;
+ }
+
a {
color: $cWhite;
text-decoration: none;
| 3 |
diff --git a/src/encoded/static/components/app.js b/src/encoded/static/components/app.js @@ -45,6 +45,7 @@ const portal = {
{ id: 'assaymatrix', title: 'Experiment matrix', url: '/matrix/?type=Experiment&status=released&perturbed=false', tag: 'collection' },
{ id: 'chip', title: 'ChIP-seq matrix', url: '/chip-seq-matrix/?type=Experiment&replicates.library.biosample.donor.organism.scientific_name=Homo%20sapiens&assay_title=Histone%20ChIP-seq&assay_title=Mint-ChIP-seq&status=released', tag: 'collection' },
{ id: 'bodymap', title: 'Human body map', url: '/summary/?type=Experiment&replicates.library.biosample.donor.organism.scientific_name=Homo+sapiens', tag: 'collection' },
+ { id: 'series', title: 'Functional genomics series', url: '/series-search/?type=OrganismDevelopmentSeries', tag: 'collection' },
{ id: 'sep-mm-0' },
{ id: 'functional-characterization', title: 'Functional Characterization data' },
{ id: 'functional-char-assays', title: 'High-throughput assays', url: '/search/?type=FunctionalCharacterizationExperiment&audit.WARNING.category!=lacking+processed+data', tag: 'collection' },
| 0 |
diff --git a/articles/api/authentication/api-authz/_authz-client.md b/articles/api/authentication/api-authz/_authz-client.md @@ -187,7 +187,7 @@ This is the OAuth 2.0 grant that Client-side web apps utilize in order to access
|:-----------------|:------------|
| `audience` <br/> | The unique identifier of the target API you want to access. |
| `scope` | The scopes which you want to request authorization for. These must be separated by a space. You can request any of the [standard OIDC scopes](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) about users, such as `profile` and `email`, custom claims that must conform to a namespaced format, or any scopes supported by the target API (for example, `read:contacts`). |
-| `response_type` <br/><span class="label label-danger">Required</span> | This will specify the type of token you will receive at the end of the flow. Use `token` to get only an `access_token`, or `id_token token` to get both an `id_token` and an `access_token`. |
+| `response_type` <br/><span class="label label-danger">Required</span> | This will specify the type of token you will receive at the end of the flow. Use `token` to get only an `access_token`, `id_token` to get only an `id_token`, or `id_token token` to get both an `id_token` and an `access_token`. |
| `client_id` <br/><span class="label label-danger">Required</span> | Your application's Client ID. |
| `state` <br/><span class="label label-primary">Recommended</span> | An opaque value the clients adds to the initial request that Auth0 includes when redirecting the back to the client. This value must be used by the client to prevent CSRF attacks. |
| `redirect_uri` | The URL to which Auth0 will redirect the browser after authorization has been granted by the user. |
| 3 |
diff --git a/apps/antonclk/app.js b/apps/antonclk/app.js @@ -99,7 +99,7 @@ function updateState() {
}
function isoStr(date) {
- return date.getFullYear() + "-" + ("0" + (date.getMonth() + 1)).substr(-2) + "-" + ("0" + date.getDate()).substr(-2);
+ return date.getFullYear() + "-" + ("0" + (date.getMonth() + 1)).slice(-2) + "-" + ("0" + date.getDate()).substr(-2);
}
var calWeekBuffer = [false,false,false]; //buffer tz, date, week no (once calculated until other tz or date is requested)
@@ -140,7 +140,7 @@ function draw() {
g.setFontAlign(0, 0).setFont("Anton").drawString(timeStr, x, y); // draw time
if (secondsScreen) {
y += 65;
- var secStr = (secondsWithColon ? ":" : "") + ("0" + date.getSeconds()).substr(-2);
+ var secStr = (secondsWithColon ? ":" : "") + ("0" + date.getSeconds()).slice(-2);
if (doColor())
g.setColor(0, 0, 1);
g.setFont("AntonSmall");
@@ -193,7 +193,7 @@ function draw() {
if (calWeek || weekDay) {
var dowcwStr = "";
if (calWeek)
- dowcwStr = " #" + ("0" + ISO8601calWeek(date)).substring(-2);
+ dowcwStr = " #" + ("0" + ISO8601calWeek(date)).slice(-2);
if (weekDay)
dowcwStr = require("locale").dow(date, calWeek ? 1 : 0) + dowcwStr; //weekDay e.g. Monday or weekDayShort #<calWeek> e.g. Mon #01
else //week #01
| 14 |
diff --git a/app/views/admin/visualizations/embed_map_error.html.erb b/app/views/admin/visualizations/embed_map_error.html.erb </div>
<p class='CDB-Text CDB-Size-large'>
- Map or dataset not found, or with restricted access. Please <%= link_to "login", login_url(after: request.original_url) %> to your account and try again
+ Map or dataset not found, or with restricted access. Please <%= link_to "login", login_url(after: request.original_url), target: "_blank" %> to your account and try again
</p>
</div>
</div>
| 12 |
diff --git a/token-metadata/0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE/metadata.json b/token-metadata/0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE/metadata.json "symbol": "SHIB",
"address": "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/views/SeedPhrase/Warning.vue b/src/views/SeedPhrase/Warning.vue <strong>Warning</strong>
</NavBar>
<div class="warning-phrase_warning-line"></div>
- <div class="warning-phrase_top-text mx-auto mt-2 px-2 mb-5">
+ <div class="mx-auto mt-2 px-2 mb-5 text-center">
<h1>Show Seed Phrase?</h1>
<h4>Anyone who has this seed phrase can steal your funds!</h4>
</div>
<div class="warning-phrase_eye-svg mx-auto mt-4">
<Eye />
</div>
- <div class="warning-phrase_bottom-text mx-auto">
+ <div class="mx-auto text-center">
<h5 class="mx-auto px-5">
View it in private without cameras around
</h5>
@@ -43,17 +43,10 @@ export default {
&_warning-line {
border: 3px solid $danger;
}
- &_top-text {
- color: $color-text-primary;
- text-align: center;
- }
&_eye-svg {
height: 150px;
width: 150px;
}
- &_bottom-text {
- text-align: center;
- }
}
</style>
| 1 |
diff --git a/app/student.front.js b/app/student.front.js @@ -91,7 +91,6 @@ $('.math .close').mousedown(e => {
onClose()
})
const mathField = MQ.MathField($equationEditor.get(0), {
- spaceBehavesLikeTab: true,
handlers: {
edit: () => !latexEditorFocus && $latexEditor.val(mathField.latex()),
downOutOf: field => {
| 2 |
diff --git a/player/js/utils/PropertyFactory.js b/player/js/utils/PropertyFactory.js @@ -701,7 +701,6 @@ var PropertyFactory = (function(){
var max = Math.max;
var min = Math.min;
var floor = Math.floor;
- this.mdf = false;
function updateRange(){
if(this.dynamicProperties.length){
var i, len = this.dynamicProperties.length;
| 2 |
diff --git a/docs/linking.md b/docs/linking.md @@ -319,7 +319,7 @@ The `Promise` will reject on Android if it was impossible to check if the URL ca
>
> As of iOS 9, your app also needs to provide the `LSApplicationQueriesSchemes` key inside `Info.plist` or `canOpenURL()` will always return `false`.
-> When targeting Android 11 (SDK 30) you must specify the intents for the schemes you want to handle in `AndroidManifext.xml`. A list of common intents can be found [here](https://developer.android.com/guide/components/intents-common).
+> When targeting Android 11 (SDK 30) you must specify the intents for the schemes you want to handle in `AndroidManifest.xml`. A list of common intents can be found [here](https://developer.android.com/guide/components/intents-common).
>
> For example to handle `https` schemes the following needs to be added to your manifest:
>
| 1 |
diff --git a/src/mixins/event-handlers.js b/src/mixins/event-handlers.js @@ -6,102 +6,6 @@ import { siblingDirection } from '../utils/trackUtils'
import { getWidth, getHeight, getSwipeDirection } from '../utils/innerSliderUtils'
var EventHandlers = {
- // continuous invokation while swiping/dragging is going on
- //swipeMove: function (e) {
- //if (!this.state.dragging) {
- //e.preventDefault();
- //return;
- //}
- //if (this.state.scrolling) {
- //return;
- //}
- //if (this.state.animating) {
- //e.preventDefault();
- //return;
- //}
- //if (this.props.vertical && this.props.swipeToSlide && this.props.verticalSwiping) {
- //e.preventDefault();
- //}
- //var swipeLeft;
- //var curLeft, positionOffset;
- //var touchObject = this.state.touchObject;
-
- //curLeft = getTrackLeft(assign({
- //slideIndex: this.state.currentSlide,
- //trackRef: this.track
- //}, this.props, this.state));
- //touchObject.curX = (e.touches) ? e.touches[0].pageX : e.clientX;
- //touchObject.curY = (e.touches) ? e.touches[0].pageY : e.clientY;
- //touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));
- //var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));
-
- //if (!this.props.verticalSwiping && !this.state.swiping && verticalSwipeLength > 10) {
- //this.setState({
- //scrolling: true
- //})
- //return;
- //}
-
- //if (this.props.verticalSwiping) {
- //touchObject.swipeLength = verticalSwipeLength;
- //}
-
- //positionOffset = (this.props.rtl === false ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);
-
- //if (this.props.verticalSwiping) {
- //positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;
- //}
-
- //var currentSlide = this.state.currentSlide;
- //var dotCount = Math.ceil(this.state.slideCount / this.props.slidesToScroll); // this might not be correct, using getDotCount may be more accurate
- //var swipeDirection = getSwipeDirection(this.state.touchObject, this.props.verticalSwiping);
- //var touchSwipeLength = touchObject.swipeLength;
-
- //if (this.props.infinite === false) {
- //if ((currentSlide === 0 && swipeDirection === 'right') || (currentSlide + 1 >= dotCount && swipeDirection === 'left')) {
- //touchSwipeLength = touchObject.swipeLength * this.props.edgeFriction;
-
- //if (this.state.edgeDragged === false && this.props.edgeEvent) {
- //this.props.edgeEvent(swipeDirection);
- //this.setState({ edgeDragged: true });
- //}
- //}
- //}
- //if (this.state.swiped === false && this.props.swipeEvent) {
- //this.props.swipeEvent(swipeDirection);
- //this.setState({ swiped: true });
- //}
-
- //if (!this.props.vertical) {
- //if (!this.props.rtl) {
- //swipeLeft = curLeft + touchSwipeLength * positionOffset;
- //}
- //else {
- //swipeLeft = curLeft - touchSwipeLength * positionOffset;
- //}
- //} else {
- //swipeLeft = curLeft + (touchSwipeLength * (this.state.listHeight / this.state.listWidth)) * positionOffset;
- //}
-
- //if (this.props.verticalSwiping) {
- //swipeLeft = curLeft + touchSwipeLength * positionOffset;
- //}
-
- //this.setState({
- //touchObject: touchObject,
- //swipeLeft: swipeLeft,
- //trackStyle: getTrackCSS(assign({left: swipeLeft}, this.props, this.state))
- //});
-
- //if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8)
- //{ return; }
- //if (touchObject.swipeLength > 10) {
- //this.setState({
- //swiping: true
- //})
- //e.preventDefault();
- //}
- //},
getNavigableIndexes() {
let max;
let breakPoint = 0;
| 2 |
diff --git a/services/importer/lib/importer/downloader.rb b/services/importer/lib/importer/downloader.rb @@ -131,8 +131,7 @@ module CartoDB
def headers
return @headers if @headers
- response = Carto::Http::Client.get('downloader', log_requests: true)
- .head(@translated_url, typhoeus_options)
+ response = http_client.head(@translated_url, typhoeus_options)
@http_response_code = response.code
raise_if_url_invalid(response.effective_url || @translated_url)
| 4 |
diff --git a/userscript.user.js b/userscript.user.js @@ -44870,12 +44870,25 @@ var $$IMU_EXPORT$$;
domain === "i.know.cf" ||
// http://oyster.ignimgs.com/mediawiki/apis.ign.com/best-of-2017-awards/thumb/8/86/Anime.jpg/610px-Anime.jpg
// http://oyster.ignimgs.com/mediawiki/apis.ign.com/best-of-2017-awards/8/86/Anime.jpg
- src.match(/\/thumb\/.\/..\/[^/]*\.[^/]*\/[0-9]*px-/)) {
- newsrc = src.replace(/\/(?:thumb\/)?(.)\/(..)\/([^/]*)\/.*/, "/$1/$2/$3");
+ src.match(/\/thumb\/+[0-9a-f]\/+[0-9a-f]{2}\/+[^/]*\.[^/]*\/+[0-9]+px-[^/]*(?:[?#].*)?$/)) {
+ newsrc = src.replace(/\/(?:thumb\/+)?(.)\/+(..)\/+([^/]*)\/+[0-9]+px-.*?$/, "/$1/$2/$3");
if (newsrc !== src)
return newsrc;
}
+ if (domain === "upload.wikimedia.org") {
+ match = src.match(/\/commons\/+[0-9a-f]\/+[0-9a-f]{2}\/+([^/]+\.[^/.]+)(?:[?#].*)?$/);
+ if (match) {
+ return {
+ url: src,
+ is_original: true,
+ extra: {
+ page: "https://commons.wikimedia.org/wiki/File:" + match[1]
+ }
+ };
+ }
+ }
+
// Dokuwiki
if (domain_nowww === "wikitoes.com" ||
// http://www.substech.com/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=electron_microscope.png
| 7 |
diff --git a/utils/field.js b/utils/field.js @@ -22,8 +22,8 @@ const { isReservedTableName } = require('../jdl/jhipster/reserved-keywords');
const generateFakeDataForField = (field, faker, changelogDate, type = 'csv') => {
let data;
- if (field.options && field.options.faker) {
- data = faker.faker(field.options.faker);
+ if (field.options && field.options.fakerTemplate) {
+ data = faker.faker(field.options.fakerTemplate);
} else if (field.fieldValidate && field.fieldValidateRules.includes('pattern')) {
const generated = field.createRandexp().gen();
if (type === 'csv') {
| 10 |
diff --git a/resources/css/custom-stylesheet.css b/resources/css/custom-stylesheet.css @@ -579,12 +579,8 @@ body.no-acrylic {
background: var(--modalBGColor);
overflow: overlay;
position: relative;
- /*box-shadow: 0 2px 20px rgba(0, 0, 0, 0.24);*/
animation: ameModalIn 0.10s var(--appleEase);
will-change: opacity, transform;
- -webkit-backdrop-filter: blur(60px) saturate(210%);
- backdrop-filter: blur(60px) saturate(210%);
- /*border: 1px solid rgba(0,0,0,0.20);*/
box-shadow: 0 8px 40px var(--dialogShadowColor);
}
@@ -607,7 +603,7 @@ body.no-acrylic {
}
-@media (prefers-color-scheme: light) {
+/* @media (prefers-color-scheme: light) {
.ameModal {
background: rgb(255 255 255 / 92%);
}
@@ -617,7 +613,7 @@ body.no-acrylic {
.ameModal {
background: rgb(31 31 31 / 85%);
}
-}
+} */
.ameUserMenu {
border-radius: 6px;
| 2 |
diff --git a/README.md b/README.md @@ -203,14 +203,14 @@ Automation flows can also be triggered via REST API. TagUI has an API service an
0,15,30,45 * * * * /full_path_on_your_server/tagui_crontab
```
-To call an automation flow from your application or web browser, use below API syntax. Custom input(s) supported. Automation flows can also be triggered from emails using the API. For email integration, [install Tmail](https://github.com/tebelorg/Tmail). Its main job is an open-source mailbot to act on incoming emails or perform mass emailing; its part-time job is delivering emails by API.
+To call an automation flow from your application or web browser, use below API syntax. Custom input(s) supported. Automation flows can also be triggered from emails using the API. For email integration, [install Tmail](https://github.com/tebelorg/Tmail). Its main job is an open-source mailbot to act on incoming emails or perform mass emailing; its part-time job is delivering emails by API. Emails with run-time variables can be sent directly from your flow with a single line (see flow sample 6C_datatables).
```
your_website_url/tagui_service.php?SETTINGS="flow_filename option(s)"
```
Besides integrating with web applications, TagUI can be extended to integrate with hardware (eg Arduino or Raspberry Pi) for physical world interactions or machine learning service providers for AI decision-making ability. Input parameters can be sent to an automation flow to be used as variables p1 to p9. Output parameters from an automation flow can be sent to your Arduino or application REST URL (see flow samples 3_github and 6C_datatables for examples).
-For making outgoing API calls in your automation flow, to feed data somewhere or send emails etc, use the api step followed by full URL (including parameters) of the API call. Response from the API will be printed to output and saved in api_result variable. Emails with run-time variables can be sent directly from your flow with a single line.
+For making outgoing API calls in your automation flow, to feed data somewhere or send emails etc, use the api step followed by full URL (including parameters) of the API call. Response from the API will be printed to output and saved in api_result variable. If the API response is JSON data, the variable api_json will be created for easy access to JSON data elements. For example api_json.parent_element.child_element retrieves value of child_element. If not, api_json will be null.
### TESTING
The step check allows simple testing of conditions. For professional test automation, CasperJS comes with a tester module for unit and functional testing purpose. To use the advanced testing features, run TagUI with the test option.
| 7 |
diff --git a/t/03_license_applied.t b/t/03_license_applied.t @@ -27,8 +27,8 @@ my %exclude = (
"./NOTICE.txt" => "Part of the license",
"./ChangeLog.md" => "No license needed",
"./README.md" => "No license needed",
- "./docs/Development_environment.md"
- => "No license needed",
+ "./README.md" => "No license needed",
+ "./CONTRIBUTING.md" => "No license needed",
"./docs/Development_on_MacOS.md"
=> "No license needed",
"./LICENSE.txt" => "It is the license itself",
| 8 |
diff --git a/src/android/java/io/jxcore/node/JXcoreExtension.java b/src/android/java/io/jxcore/node/JXcoreExtension.java @@ -97,7 +97,6 @@ public class JXcoreExtension implements SurroundingStateObserver {
}
public static void LoadExtensions() {
- getInstance();
if (mConnectionHelper != null) {
Log.e(TAG, "LoadExtensions: A connection helper instance already exists - this indicates that this method was called twice - disposing of the previous instance");
mConnectionHelper.dispose();
| 2 |
diff --git a/src/components/inputnumber/InputNumber.js b/src/components/inputnumber/InputNumber.js @@ -135,31 +135,50 @@ export class InputNumber extends Component {
currencyDisplay: this.props.currencyDisplay,
useGrouping: this.props.useGrouping,
minimumFractionDigits: this.props.minFractionDigits,
- maximumFractionDigits: this.props.maxFractionDigits,
+ maximumFractionDigits: this.props.maxFractionDigits
};
}
constructParser() {
this.numberFormat = new Intl.NumberFormat(this.props.locale, this.getOptions());
- const parts = this.numberFormat.formatToParts(-12345.6);
const numerals = [...new Intl.NumberFormat(this.props.locale, {useGrouping: false}).format(9876543210)].reverse();
const index = new Map(numerals.map((d, i) => [d, i]));
- this._currency = new RegExp(`[${this.getRegExpPattern(parts, 'currency')}]`, 'g');
- this._decimal = new RegExp(`[${this.getRegExpPattern(parts, 'decimal')}]`);
- this._group = new RegExp(`[${this.getRegExpPattern(parts, 'group')}]`, 'g');
- this._literal = new RegExp(`[${this.getRegExpPattern(parts, 'literal')}]`, 'g');
- this._minusSign = new RegExp(`[${this.getRegExpPattern(parts, 'minusSign')}]`, 'g');
this._numeral = new RegExp(`[${numerals.join('')}]`, 'g');
- this._suffix = new RegExp(`[${this.props.suffix}]`, 'g');
- this._prefix = new RegExp(`[${this.props.prefix}]`, 'g');
+ this._decimal = this.getDecimalExpression();
+ this._group = this.getGroupingExpression();
+ this._minusSign = this.getMinusSignExpression();
+ this._currency = this.getCurrencyExpression();
+ this._suffix = new RegExp(`[${this.props.suffix||''}]`, 'g');
+ this._prefix = new RegExp(`[${this.props.prefix||''}]`, 'g');
this._index = d => index.get(d);
}
- getRegExpPattern(parts, type) {
- let part = parts.find(d => d.type === type);
- return part ? part.value : '';
+ getDecimalExpression() {
+ const formatter = new Intl.NumberFormat(this.props.locale, {useGrouping: false});
+ return new RegExp(`[${formatter.format(1.1).trim().replace(this._numeral, '')}]`, 'g');
}
+ getGroupingExpression() {
+ const formatter = new Intl.NumberFormat(this.props.locale, {useGrouping: true});
+ return new RegExp(`[${formatter.format(1000).trim().replace(this._numeral, '')}]`, 'g');
+ }
+
+ getMinusSignExpression() {
+ const formatter = new Intl.NumberFormat(this.props.locale, {useGrouping: false});
+ return new RegExp(`[${formatter.format(-1).trim().replace(this._numeral, '')}]`, 'g');
+ }
+
+ getCurrencyExpression() {
+ if (this.props.currency) {
+ const formatter = new Intl.NumberFormat(this.props.locale, {style: 'currency', currency: this.props.currency, currencyDisplay: this.props.currencyDisplay});
+ return new RegExp(`[${formatter.format(1).replace(/\s/g, '').replace(this._numeral, '').replace(this._decimal, '').replace(this._group, '')}]`, "g");
+ }
+ else {
+ return new RegExp(`[]`,'g');
+ }
+ }
+
+
formatValue(value) {
if (value != null) {
if (this.props.format) {
@@ -187,7 +206,6 @@ export class InputNumber extends Component {
.replace(/\s/g, '')
.replace(this._currency, '')
.replace(this._group, '')
- .replace(this._literal, '')
.replace(this._suffix, '')
.replace(this._prefix, '')
.replace(this._minusSign, '-')
| 14 |
diff --git a/articles/support/matrix.md b/articles/support/matrix.md @@ -71,11 +71,11 @@ toc: true
</thead>
<tbody>
<tr>
- <td>Google Chrome</td>
+ <td>Google Chrome (Latest version)</td>
<td><div class="label label-primary">Supported</div></td>
</tr>
<tr>
- <td>Apple Safari</td>
+ <td>Apple Safari (Latest version)</td>
<td><div class="label label-warning">Sustained</div></td>
</tr>
<tr>
@@ -83,11 +83,11 @@ toc: true
<td><div class="label label-warning">Sustained</div></td>
</tr>
<tr>
- <td>Microsoft Edge</td>
+ <td>Microsoft Edge (Latest version)</td>
<td><div class="label label-warning">Sustained</div></td>
</tr>
<tr>
- <td>Mozilla Firefox</td>
+ <td>Mozilla Firefox (Latest version)</td>
<td><div class="label label-warning">Sustained</div></td>
</tr>
</tbody>
@@ -110,11 +110,11 @@ toc: true
</thead>
<tbody>
<tr>
- <td>Google Chrome</td>
+ <td>Google Chrome (Latest version)</td>
<td><div class="label label-primary">Supported</div></td>
</tr>
<tr>
- <td>Apple Safari</td>
+ <td>Apple Safari (Latest version)</td>
<td><div class="label label-warning">Sustained</div></td>
</tr>
<tr>
@@ -122,11 +122,11 @@ toc: true
<td><div class="label label-warning">Sustained</div></td>
</tr>
<tr>
- <td>Microsoft Edge</td>
+ <td>Microsoft Edge (Latest version)</td>
<td><div class="label label-warning">Sustained</div></td>
</tr>
<tr>
- <td>Mozilla Firefox</td>
+ <td>Mozilla Firefox (Latest version)</td>
<td><div class="label label-warning">Sustained</div></td>
</tr>
</tbody>
@@ -167,11 +167,11 @@ toc: true
</thead>
<tbody>
<tr>
- <td>Google Chrome</td>
+ <td>Google Chrome (Latest version)</td>
<td><div class="label label-primary">Supported</div></td>
</tr>
<tr>
- <td>Apple Safari</td>
+ <td>Apple Safari (Latest version)</td>
<td><div class="label label-warning">Supported</div></td>
</tr>
<tr>
@@ -179,11 +179,11 @@ toc: true
<td><div class="label label-warning">Supported</div></td>
</tr>
<tr>
- <td>Microsoft Edge</td>
+ <td>Microsoft Edge (Latest version)</td>
<td><div class="label label-warning">Supported</div></td>
</tr>
<tr>
- <td>Mozilla Firefox</td>
+ <td>Mozilla Firefox (Latest version)</td>
<td><div class="label label-warning">Supported</div></td>
</tr>
</tbody>
| 0 |
diff --git a/packages/fether-electron/src/main/utils/staticPath.js b/packages/fether-electron/src/main/utils/staticPath.js /* global __static */
-import { app } from 'electron';
+const appIsPackaged = !process.defaultApp;
/**
* Get the path to the `static` folder.
*
* @see https://github.com/electron-userland/electron-webpack/issues/52
*/
-const staticPath = app.isPackaged
+const staticPath = appIsPackaged
? __dirname.replace(/app\.asar$/, 'static')
: __static;
| 1 |
diff --git a/src/utils/__tests__/parseMultiValueQueryStringParameters.test.js b/src/utils/__tests__/parseMultiValueQueryStringParameters.test.js @@ -117,6 +117,13 @@ const tests = [
expectedMulti: { '?=/&:': ['?=/&:'] },
},
+ {
+ description: 'end of line',
+ param: '%0A=%0A',
+ expected: { '\n': '\n' },
+ expectedMulti: { '\n': ['\n'] },
+ },
+
// silly test section:
{
description: 'silly I.',
| 0 |
diff --git a/contracts/ExternStateFeeToken.sol b/contracts/ExternStateFeeToken.sol @@ -238,8 +238,8 @@ contract ExternStateFeeToken is Proxyable, SafeDecimalMath {
internal
returns (bool)
{
- uint fee = safeSub(value, priceToSpend(value));
- uint amountReceived = safeSub(value, fee);
+ uint amountReceived = priceToSpend(value);
+ uint fee = safeSub(value, fee);
return _internalTransfer(sender, to, amountReceived, fee);
}
| 2 |
diff --git a/lib/model/security/profile.ts b/lib/model/security/profile.ts @@ -33,10 +33,11 @@ import { KuzzleRequest } from '../../../index';
const assertionError = kerror.wrap('api', 'assert');
-export type ProfilePolicy = {
+/** @internal */
+export type InternalProfilePolicy = {
role: Role;
restrictedTo: OptimizedPolicyRestrictions;
-}
+};
/**
* @class Profile
@@ -59,7 +60,7 @@ export default class Profile {
*
* @returns {Promise}
*/
- async getPolicies(): Promise<ProfilePolicy[]> {
+ async getPolicies(): Promise<InternalProfilePolicy[]> {
if (!global.kuzzle) {
throw kerror.get('security', 'profile', 'uninitialized', this._id);
}
@@ -74,7 +75,7 @@ export default class Profile {
* @param {Request} request
* @returns {Promise}
*/
- async getAllowedPolicies(request: KuzzleRequest): Promise<ProfilePolicy[]> {
+ async getAllowedPolicies(request: KuzzleRequest): Promise<InternalProfilePolicy[]> {
if (this.optimizedPolicies === undefined || this.optimizedPolicies.length === 0) {
return [];
}
| 10 |
diff --git a/publish.sh b/publish.sh @@ -5,16 +5,17 @@ set -e
RED='\033[0;31m'
NC='\033[0m' # No Color
+# Do this BEFORE checking there are no git changes!
+echo "Generating documentation ..."
+npm run build-docs
+npm run build-readme
+
PACKAGE_NAME=`node -pe "require('./package.json').name"`
PACKAGE_VERSION=`node -pe "require('./package.json').version"`
BRANCH=`git status | grep 'On branch' | cut -d ' ' -f 3`
BRANCH_UP_TO_DATE=`git status | grep 'nothing to commit' | tr -s \n ' '`;
GIT_TAG="v${PACKAGE_VERSION}"
-echo "Generating documentation ..."
-npm run build-docs
-npm run build-readme
-
if [ -z "${BRANCH_UP_TO_DATE}" ]; then
printf "${RED}You have uncommitted changes!${NC}\n"
exit 1
| 7 |
diff --git a/components/base-adresse-nationale/postal-codes.js b/components/base-adresse-nationale/postal-codes.js @@ -30,6 +30,7 @@ function PostalCodes({codes}) {
width: fit-content;
list-style: none;
text-align: center;
+ color: ${theme.colors.white};
padding: 10px;
border-radius: 5px;
left: 0;
| 0 |
diff --git a/articles/tutorials/using-auth0-to-secure-a-cli.md b/articles/tutorials/using-auth0-to-secure-a-cli.md @@ -29,6 +29,10 @@ The steps to follow to implement this grant are the following:
1. __Initiate the Authorization Request__. The regular OAuth 2.0 authorization request, with the caveat that now it includes two parameters: the `code_challenge` and the `code_challenge_method` which should be `S256`. If the authorization is successful, then Auth0 will redirect the browser to the callback with a `code` query parameter: `${account.callback}/?code=123`.
+::: warning
+ In order for the CLI to be able to receive the callback and retrieve the code, it should run on the web server.
+:::
+
1. __Exchange the Authorization Code for a Token__. With the `code`, the program then uses the [/oauth/token endpoint](/api/authentication#authorization-code-pkce-) to obtain a token. In this second step, the CLI program adds a `verifier` parameter with the exact same random secret generated in step 1. Auth0 uses this to correlate and verify that the request originates from the same client. If successful the response is another JSON object, with an `id_token`, and `access_token`. Note that if the `verifier` doesn't match with what was sent in the [/authorize endpoint](/api/authentication#authorization-code-grant-pkce-), the request will fail.
::: note
| 0 |
diff --git a/lib/helpers/http/request.js b/lib/helpers/http/request.js @@ -27,28 +27,31 @@ class HTTPError extends Error {
}
}
-function requestWrap(method, url, options) {
- if (options.form) {
+function requestWrap(method, url, {
+ form,
+ body,
+ query,
+ ...options
+}) {
+ if (form) {
/* eslint-disable no-param-reassign */
- options.form = options.body;
- options.body = undefined;
+ form = body;
+ body = undefined;
/* eslint-enable no-param-reassign */
}
return new Promise((resolve, reject) => {
request({
+ ...options,
+ body,
+ form,
method,
url,
- headers: options.headers,
- qs: options.query,
- body: options.body,
- form: options.form,
- followRedirect: options.followRedirect,
- timeout: options.timeout,
- }, (error, response, body) => {
+ qs: query,
+ }, (error, response, responseBody) => {
if (error) {
reject(error);
} else {
- response.body = body;
+ response.body = responseBody;
const { statusCode } = response;
const limitStatusCode = options.followRedirect ? 299 : 399;
| 4 |
diff --git a/test/jasmine/tests/modebar_test.js b/test/jasmine/tests/modebar_test.js @@ -981,6 +981,29 @@ describe('ModeBar', function() {
expect(function() { manageModeBar(gd); }).toThrowError();
});
+
+ it('add pre-defined buttons as strings for drawing shapes on cartesian subplot', function() {
+ var gd = setupGraphInfo();
+ manageModeBar(gd);
+
+ var initialGroupCount = countGroups(gd._fullLayout._modeBar);
+ var initialButtonCount = countButtons(gd._fullLayout._modeBar);
+
+ gd._context.modeBarButtonsToAdd = [
+ 'drawline',
+ 'drawopenpath',
+ 'drawclosedpath',
+ 'drawcircle',
+ 'drawrect',
+ 'eraseshape'
+ ];
+ manageModeBar(gd);
+
+ expect(countGroups(gd._fullLayout._modeBar))
+ .toEqual(initialGroupCount + 0); // no new group - added inside the dragMode group
+ expect(countButtons(gd._fullLayout._modeBar))
+ .toEqual(initialButtonCount + 6);
+ });
});
describe('modebar on clicks', function() {
| 0 |
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -326,7 +326,7 @@ final class Analytics extends Module implements Module_With_Screen, Module_With_
);
/**
- * Filters the gtag configuration options for the object that is passed to amp-analytics as a JSON component.
+ * Filters the gtag configuration options for the amp-analytics tag.
*
* @since 1.0.0
*
@@ -338,7 +338,7 @@ final class Analytics extends Module implements Module_With_Screen, Module_With_
// Ensure gtag_id is set to the correct value.
if ( ! is_array( $gtag_amp_opt_filtered ) ) {
- $gtag_amp_opt_filtered = array();
+ $gtag_amp_opt_filtered = $gtag_amp_opt;
}
if ( ! isset( $gtag_amp_opt_filtered['vars'] ) || ! is_array( $gtag_amp_opt_filtered['vars'] ) ) {
| 3 |
diff --git a/lib/plugins/create/create.js b/lib/plugins/create/create.js @@ -38,6 +38,10 @@ const validTemplates = [
'aws-go-mod',
'aws-ruby',
'aws-provided',
+ 'tencent-go',
+ 'tencent-nodejs',
+ 'tencent-python',
+ 'tencent-php',
'azure-nodejs',
'cloudflare-workers',
'cloudflare-workers-enterprise',
@@ -61,10 +65,6 @@ const validTemplates = [
'spotinst-java8',
'twilio-nodejs',
'aliyun-nodejs',
- 'tencent-go',
- 'tencent-nodejs',
- 'tencent-python',
- 'tencent-php',
'plugin',
// this template is used to streamline the onboarding process
| 7 |
diff --git a/connectors/connectorTest.js b/connectors/connectorTest.js @@ -61,6 +61,17 @@ export default class ConnectorTest extends Connector{
switch (type) {
case "hijack":
updates = [
+ {
+ data: {
+ announcements: [{
+ prefixes: ["175.254.205.0/25", "170.254.205.0/25"],
+ next_hop: "124.0.0.3"
+ }],
+ peer: "124.0.0.3",
+ path: [1, 2, 3, 4321]
+ },
+ type: "ris_message"
+ },
{
data: {
announcements: [{
| 7 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -84,8 +84,7 @@ jobs:
name: deploy main
command: |
. venv/bin/activate
- fab prep_www_deploy
- fab rsync_www
+ fab deploy_www
workflows:
version: 2
| 12 |
diff --git a/README.md b/README.md @@ -133,8 +133,8 @@ contributors from liability.
*Note:* This is intended to be a set of tools to support a self-driven DIY
implementation and any person choosing to use these tools is solely
responsible for testing and implement these tools independently or
-together as a system. The [DIY part of OpenAPS is important]
-(http://bit.ly/1NBbZtO). While formal training or experience as an
+together as a system. The [DIY part of OpenAPS is important](http://bit.ly/1NBbZtO).
+While formal training or experience as an
engineer or a developer is not required, what *is* required is a growth
mindset to learn what are essentially "building blocks" to implement an
OpenAPS instance. This is not a "set and forget" system; it requires
| 1 |
diff --git a/game.js b/game.js @@ -1682,7 +1682,7 @@ const gameManager = {
}
},
menuUpload: _upload,
- addLocalEmote(index) {
+ /* addLocalEmote(index) {
const localPlayer = metaversefileApi.useLocalPlayer();
if (localPlayer.avatar) {
const timestamp = performance.now();
@@ -1714,7 +1714,7 @@ const gameManager = {
};
world.appManager.addEventListener('frame', frame);
}
- },
+ }, */
isJumping() {
return metaversefileApi.useLocalPlayer().hasAction('jump');
},
| 2 |
diff --git a/webpack.dev.config.js b/webpack.dev.config.js @@ -39,7 +39,10 @@ module.exports = {
{
test: /\.js$/,
loader: 'babel',
- include: path.join(__dirname, 'src'),
+ include: [
+ path.join(__dirname, 'src'),
+ path.join(__dirname, 'node_modules/ello-brains'),
+ ],
exclude: /node_modules/,
},
{
| 11 |
diff --git a/test/esinstall/rollup/rollup.test.js b/test/esinstall/rollup/rollup.test.js @@ -8,16 +8,37 @@ describe('Rollup config', () => {
const spec = 'svelte-routing';
const {
- importMap: {imports}
+ importMap: {imports},
} = await install([spec], {
cwd,
dest,
rollup: {
- plugins: [require('rollup-plugin-svelte')()]
- }
+ plugins: [require('rollup-plugin-svelte')()],
+ },
});
// install would have thrown without the plugin, so getting here is enough.
expect(imports[spec]).toBeTruthy();
});
+
+ it('omitting the rollup plugin will throw on install', async () => {
+ const cwd = __dirname;
+ const dest = path.join(cwd, 'test-rollup-no-plugin');
+ const spec = 'svelte-routing';
+
+ try {
+ await install([spec], {
+ cwd,
+ dest,
+ rollup: {
+ // No plugin makes svelte sad
+ },
+ });
+
+ // Shouldn't have gotten here :(
+ expect(false).toBeTruthy();
+ } catch (err) {
+ expect(err).toBeInstanceOf(Error);
+ }
+ });
});
| 0 |
diff --git a/assets/js/googlesitekit/widgets/components/URLSearchWidget.js b/assets/js/googlesitekit/widgets/components/URLSearchWidget.js @@ -30,10 +30,9 @@ import { CORE_SITE } from '../../datastore/site/constants';
import { CORE_LOCATION } from '../../datastore/location/constants';
import Button from '../../../components/Button';
import PostSearcherAutoSuggest from '../../../components/PostSearcherAutoSuggest';
-import WidgetNull from './WidgetNull';
const { useSelect, useDispatch } = Data;
-function URLSearchWidget( { Widget = WidgetNull } = {} ) {
+function URLSearchWidget( { Widget } ) {
const [ canSubmit, setCanSubmit ] = useState( false );
const [ match, setMatch ] = useState( {} );
| 2 |
diff --git a/packages/cx/src/charts/LineGraph.d.ts b/packages/cx/src/charts/LineGraph.d.ts -import * as Cx from '../core';
+import * as Cx from "../core";
interface LineGraphProps extends Cx.WidgetProps {
-
/**
* Data for the graph. Each entry should be an object with at least two properties
* whose names should match the `xField` and `yField` values.
*/
- data?: Cx.RecordsProp,
+ data?: Cx.RecordsProp;
/** Index of a color from the standard palette of colors. 0-15. */
- colorIndex?: Cx.NumberProp,
+ colorIndex?: Cx.NumberProp;
/** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */
- colorMap?: Cx.StringProp,
+ colorMap?: Cx.StringProp;
/** Name used to resolve the color. If not provided, `name` is used instead. */
- colorName?: Cx.StringProp,
+ colorName?: Cx.StringProp;
/**
* Additional CSS classes to be applied to the field.
* If an object is provided, all keys with a "truthy" value will be added to the CSS class list.
*/
- class?: Cx.ClassProp,
+ class?: Cx.ClassProp;
/**
* Additional CSS classes to be applied to the field.
* If an object is provided, all keys with a "truthy" value will be added to the CSS class list.
*/
- className?: Cx.ClassProp,
-
+ className?: Cx.ClassProp;
/** Additional styles to be applied to the line element. */
- lineStyle?: Cx.StyleProp,
+ lineStyle?: Cx.StyleProp;
/** Additional styles to be applied to the area below the line. */
- areaStyle?: Cx.StyleProp,
+ areaStyle?: Cx.StyleProp;
/** Area switch. Default value is `false`. */
- area?: Cx.BooleanProp,
+ area?: Cx.BooleanProp;
/** Line switch. By default, the line is shown. Set to `false` to hide the line and draw only the area. */
- line?: Cx.BooleanProp,
+ line?: Cx.BooleanProp;
/** Base value used for area charts. Default value is `0`. */
- y0?: Cx.NumberProp,
+ y0?: Cx.NumberProp;
/** Name of the item as it will appear in the legend. */
- name?: Cx.StringProp,
+ name?: Cx.StringProp;
/** Used to indicate if an item is active or not. Inactive items are shown only in the legend. */
- active?: Cx.BooleanProp,
+ active?: Cx.BooleanProp;
/** Name of the stack. If multiple stacks are used, each should have a unique name. Default value is `stack`. */
- stack?: Cx.StringProp,
+ stack?: Cx.StringProp;
/** Indicate that columns should be stacked on top of the other columns. Default value is `false`. */
- stacked?: Cx.BooleanProp
+ stacked?: Cx.BooleanProp;
/**
* Name of the horizontal axis. The value should match one of the horizontal axes set
* in the `axes` configuration of the parent `Chart` component. Default value is `x`.
*/
- xAxis?: string,
+ xAxis?: string;
/**
* Name of the vertical axis. The value should match one of the vertical axes set
* in the `axes` configuration if the parent `Chart` component. Default value is `y`.
*/
- yAxis?: string,
+ yAxis?: string;
/** Name of the property which holds the x value. Default value is `x`. */
- xField?: string,
+ xField?: string;
/** Name of the property which holds the y value. Default value is `y`. */
- yField?: string,
+ yField?: string;
/** Base CSS class to be applied to the element. Defaults to `linegraph`. */
- baseClass?: string,
+ baseClass?: string;
/** Name of the property which holds the y0 value. Default value is `false`, which means y0 value is not read from the data array. */
- y0Field?: string,
+ y0Field?: string;
/** Name of the legend to be used. Default is `legend`. */
- legend?: string,
+ legend?: string;
+
+ legendAction?: string;
+ legendShape?: string;
- legendAction?: string,
- legendShape?: string
+ /** Set to true to avoid forcing the vertical axis to accommodate y0 values. */
+ hiddenBase?: boolean;
}
export class LineGraph extends Cx.Widget<LineGraphProps> {}
| 0 |
diff --git a/src/components/autoplay/autoplay.js b/src/components/autoplay/autoplay.js @@ -9,7 +9,21 @@ const Autoplay = {
delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
}
swiper.autoplay.timeout = Utils.nextTick(() => {
+ if (swiper.params.autoplay.reverseDirection) {
if (swiper.params.loop) {
+ swiper.loopFix();
+ swiper.slidePrev(swiper.params.speed, true, true);
+ swiper.emit('autoplay');
+ } else if (!swiper.isBeginning) {
+ swiper.slidePrev(swiper.params.speed, true, true);
+ swiper.emit('autoplay');
+ } else if (!swiper.params.autoplay.stopOnLastSlide) {
+ swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
+ swiper.emit('autoplay');
+ } else {
+ swiper.autoplay.stop();
+ }
+ } else if (swiper.params.loop) {
swiper.loopFix();
swiper.slideNext(swiper.params.speed, true, true);
swiper.emit('autoplay');
@@ -77,6 +91,7 @@ export default {
delay: 3000,
disableOnInteraction: true,
stopOnLastSlide: false,
+ reverseDirection: false,
},
},
create() {
| 0 |
diff --git a/plugins/debug/debugPanel.js b/plugins/debug/debugPanel.js // some internal string/length
this.help_str = "["+String.fromCharCode(32 + this.debugToggle)+"]show/hide";
- this.help_str_len = this.font.measureText(me.video.renderer, this.help_str).width;
- this.fps_str_len = this.font.measureText(me.video.renderer, "00/00 fps").width;
+ this.help_str_len = this.font.measureText(this.help_str).width;
+ this.fps_str_len = this.font.measureText("00/00 fps").width;
this.memoryPositionX = 325 * this.mod;
// resize the panel if the browser is resized
| 1 |
diff --git a/app/controllers/models/wallet.js b/app/controllers/models/wallet.js @@ -123,7 +123,6 @@ module.exports = function (app, sqlLiteService) {
function _add(data) {
data.createdAt = new Date().getTime();
- console.log('data data data data', data);
return knex.transaction((trx) => {
knex(TABLE_NAME).transacting(trx).insert(data).then((insertedIds) => {
let id = insertedIds[0];
| 2 |
diff --git a/index.js b/index.js @@ -59,8 +59,8 @@ async function uuidToUsername(uuid){
output = user.username;
if(+new Date() - user.date > 3600 * 1000){
- try{
- let { data } = await axios(`https://sessionserver.mojang.com/session/minecraft/profile/${uuid}`);
+ axios(`https://sessionserver.mojang.com/session/minecraft/profile/${uuid}`).then(response => {
+ let { data } = response;
if(user)
db
@@ -73,9 +73,9 @@ async function uuidToUsername(uuid){
.get('usernames')
.push({ uuid: data.id, username: data.name, date: +new Date() })
.write();
- }catch(e){
- return "";
- }
+ }).catch(err => {
+ console.error(err);
+ });
}
return { uuid, display_name: output };
| 14 |
diff --git a/shared/db/db.js b/shared/db/db.js @@ -11,8 +11,8 @@ const IS_PROD = !process.env.FORCE_DEV && process.env.NODE_ENV === 'production';
const DEFAULT_CONFIG = {
// Connect to the test database when, well, testing
db: !process.env.TEST_DB ? 'spectrum' : 'testing',
- max: 1000, // Maximum number of connections, default is 1000
- buffer: 50, // Minimum number of connections open at any given moment, default is 50
+ max: 20, // Maximum number of connections, default is 1000
+ buffer: 20, // Minimum number of connections open at any given moment, default is 50
timeoutGb: 60 * 60 * 1000, // How long should an unused connection stick around, default is an hour, this is a minute
timeout: 30, // The number of seconds for a connection to be opened, default 20
};
| 12 |
diff --git a/Specs/Scene/GroundPrimitiveSpec.js b/Specs/Scene/GroundPrimitiveSpec.js @@ -64,15 +64,10 @@ defineSuite([
var rectangleInstance;
var primitive;
var depthPrimitive;
- var largeScene;
var reusablePrimitive;
- var largeSceneReusablePrimitive;
beforeAll(function() {
scene = createScene();
- largeScene = createScene({
- canvas : createCanvas(2, 2)
- });
scene.postProcessStages.fxaa.enabled = false;
@@ -101,32 +96,12 @@ defineSuite([
}),
asynchronous : false
});
-
- largeSceneReusablePrimitive = new Primitive({
- geometryInstances : new GeometryInstance({
- geometry : new RectangleGeometry({
- ellipsoid : ellipsoid,
- rectangle : bigRectangle
- }),
- id : 'depth rectangle',
- attributes : {
- color : depthColorAttribute
- }
- }),
- appearance : new PerInstanceColorAppearance({
- translucent : false,
- flat : true
- }),
- asynchronous : false
- });
});
});
afterAll(function() {
reusablePrimitive.destroy();
scene.destroyForSpecs();
- largeScene.destroyForSpecs();
-
// Leave ground primitive uninitialized
ApproximateTerrainHeights._initPromise = undefined;
ApproximateTerrainHeights._terrainHeights = undefined;
@@ -181,7 +156,6 @@ defineSuite([
afterEach(function() {
scene.groundPrimitives.removeAll();
- largeScene.groundPrimitives.removeAll();
primitive = primitive && !primitive.isDestroyed() && primitive.destroy();
depthPrimitive = depthPrimitive && !depthPrimitive.isDestroyed() && depthPrimitive.destroy();
});
@@ -333,9 +307,9 @@ defineSuite([
primitive = scene.groundPrimitives.add(new GroundPrimitive({
geometryInstances : rectangleInstance,
- asynchronous : false
+ asynchronous : false,
+ show : false
}));
- primitive.show = false;
var ready = false;
primitive.readyPromise.then(function() {
@@ -494,6 +468,43 @@ defineSuite([
describe('larger scene', function() {
// Screen space techniques may produce unexpected results with 1x1 canvasses
+ var largeScene;
+ var largeSceneReusablePrimitive;
+ beforeAll(function() {
+ largeScene = createScene({
+ canvas : createCanvas(2, 2)
+ });
+
+ var depthColorAttribute = ColorGeometryInstanceAttribute.fromColor(new Color(0.0, 0.0, 1.0, 1.0));
+ depthColor = depthColorAttribute.value;
+ var bigRectangle = Rectangle.fromDegrees(-180 + CesiumMath.EPSILON4, -90 + CesiumMath.EPSILON4, 180 - CesiumMath.EPSILON4, 90 - CesiumMath.EPSILON4);
+
+ largeSceneReusablePrimitive = new Primitive({
+ geometryInstances : new GeometryInstance({
+ geometry : new RectangleGeometry({
+ ellipsoid : ellipsoid,
+ rectangle : bigRectangle
+ }),
+ id : 'depth rectangle',
+ attributes : {
+ color : depthColorAttribute
+ }
+ }),
+ appearance : new PerInstanceColorAppearance({
+ translucent : false,
+ flat : true
+ }),
+ asynchronous : false
+ });
+ });
+ afterAll(function() {
+ largeSceneReusablePrimitive.destroy();
+ largeScene.destroyForSpecs();
+ });
+ afterEach(function(){
+ largeScene.groundPrimitives.removeAll();
+ });
+
function verifyLargerScene(groundPrimitive, expectedColor, destination) {
largeScene.render();
| 5 |
diff --git a/lib/document.js b/lib/document.js @@ -1132,6 +1132,13 @@ Document.prototype.$set = function $set(path, val, type, options) {
return this;
}
+ // If overwriting a subdocument path, make sure to clear out
+ // any errors _before_ setting, so new errors that happen
+ // get persisted. Re: #9080
+ if (schema.$isSingleNested || schema.$isMongooseArray) {
+ _markValidSubpaths(this, path);
+ }
+
if (schema.$isSingleNested && val != null && merge) {
if (val instanceof Document) {
val = val.toObject({ virtuals: false, transform: false });
@@ -2606,6 +2613,26 @@ Document.prototype.$markValid = function(path) {
}
};
+/*!
+ * ignore
+ */
+
+function _markValidSubpaths(doc, path) {
+ if (!doc.$__.validationError) {
+ return;
+ }
+
+ const keys = Object.keys(doc.$__.validationError.errors);
+ for (const key of keys) {
+ if (key.startsWith(path + '.')) {
+ delete doc.$__.validationError.errors[key];
+ }
+ }
+ if (Object.keys(doc.$__.validationError.errors).length === 0) {
+ doc.$__.validationError = null;
+ }
+}
+
/**
* Saves this document by inserting a new document into the database if [document.isNew](/docs/api.html#document_Document-isNew) is `true`,
* or sends an [updateOne](/docs/api.html#document_Document-updateOne) operation **only** with the modifications to the database, it does not replace the whole document in the latter case.
| 1 |
diff --git a/src/input/pointer.js b/src/input/pointer.js // legacy mouse event type
var mouseEventList = [
+ MOUSE_WHEEL[0],
POINTER_MOVE[2],
POINTER_DOWN[2],
POINTER_UP[2],
];
var pointerEventMap = {
+ mousewheel : MOUSE_WHEEL,
pointermove: POINTER_MOVE,
pointerdown: POINTER_DOWN,
pointerup: POINTER_UP,
| 1 |
diff --git a/components/App.js b/components/App.js @@ -326,7 +326,7 @@ export const App = (props) => {
`;
}
-export const updateProps = (newProps, cb) => {
+export const updateProps = newProps => {
const appContainer = document.getElementById('appContainer');
for (let k in newProps) {
appState[k] = newProps[k];
@@ -343,18 +343,14 @@ export const updateProps = (newProps, cb) => {
appContainer.innerHTML = App(appState);
setBindings(appContainer, onclickBindings);
}
- if (cb) {
- cb();
- }
}
window.addEventListener('stateChanged', (e) => {
const changedState = getSpecificState(e.detail.changedKeys);
- const cb = e.detail.cb ? e.detail.cb : null;
for (let k in changedState) {
appState[k] = changedState[k];
}
- updateProps(changedState, cb);
+ updateProps(changedState);
})
window.addEventListener('load', () => {
| 2 |
diff --git a/character-controller.js b/character-controller.js @@ -1057,7 +1057,7 @@ class StaticUninterpolatedPlayer extends PlayerBase {
for (let i = 0; i < this.actions.length; i++) {
const action = this.actions[i];
if (action.type === type) {
- this.actions.splice(i, 1);
+ this.removeActionIndex(i);
break;
}
}
| 2 |
diff --git a/client/src/pages/Profile.js b/client/src/pages/Profile.js @@ -116,7 +116,7 @@ const Profile = () => {
postsDispatch({ type: FETCH_POSTS });
try {
if (userId) {
- const res = await axios.get(`/api/posts?limit=5&authorId=${userId}`);
+ const res = await axios.get(`/api/posts?limit=-1&authorId=${userId}`);
postsDispatch({
type: SET_POSTS,
posts: res.data,
| 12 |
diff --git a/test/b_capped_sto.js b/test/b_capped_sto.js @@ -86,7 +86,7 @@ contract("CappedSTO", accounts => {
let startTime_ETH2;
let endTime_ETH2;
const cap = web3.utils.toWei("10000");
- const rate = 1000;
+ const rate = web3.utils.toWei("1000");
const E_fundRaiseType = 0;
const address_zero = "0x0000000000000000000000000000000000000000";
@@ -97,7 +97,7 @@ contract("CappedSTO", accounts => {
let blockNo;
const P_cap = web3.utils.toWei("50000");
const P_fundRaiseType = 1;
- const P_rate = 5;
+ const P_rate = web3.utils.toWei("5");
const cappedSTOSetupCost = web3.utils.toWei("20000", "ether");
const maxCost = cappedSTOSetupCost;
const STOParameters = ["uint256", "uint256", "uint256", "uint256", "uint8[]", "address"];
@@ -298,7 +298,7 @@ contract("CappedSTO", accounts => {
assert.equal(await I_CappedSTO_Array_ETH[0].startTime.call(), startTime_ETH1, "STO Configuration doesn't set as expected");
assert.equal(await I_CappedSTO_Array_ETH[0].endTime.call(), endTime_ETH1, "STO Configuration doesn't set as expected");
assert.equal((await I_CappedSTO_Array_ETH[0].cap.call()).toNumber(), cap, "STO Configuration doesn't set as expected");
- assert.equal(await I_CappedSTO_Array_ETH[0].rate.call(), rate, "STO Configuration doesn't set as expected");
+ assert.equal((await I_CappedSTO_Array_ETH[0].rate.call()).toNumber(), rate, "STO Configuration doesn't set as expected");
assert.equal(
await I_CappedSTO_Array_ETH[0].fundRaiseTypes.call(E_fundRaiseType),
true,
@@ -554,7 +554,7 @@ contract("CappedSTO", accounts => {
assert.equal(await I_CappedSTO_Array_ETH[1].startTime.call(), startTime_ETH2, "STO Configuration doesn't set as expected");
assert.equal(await I_CappedSTO_Array_ETH[1].endTime.call(), endTime_ETH2, "STO Configuration doesn't set as expected");
assert.equal((await I_CappedSTO_Array_ETH[1].cap.call()).toNumber(), cap, "STO Configuration doesn't set as expected");
- assert.equal(await I_CappedSTO_Array_ETH[1].rate.call(), rate, "STO Configuration doesn't set as expected");
+ assert.equal((await I_CappedSTO_Array_ETH[1].rate.call()).toNumber(), rate, "STO Configuration doesn't set as expected");
assert.equal(
await I_CappedSTO_Array_ETH[1].fundRaiseTypes.call(E_fundRaiseType),
true,
@@ -993,7 +993,7 @@ contract("CappedSTO", accounts => {
it("Should successfully invest in second STO", async () => {
const polyToInvest = 1000;
- const stToReceive = polyToInvest * P_rate;
+ const stToReceive = (polyToInvest * P_rate)/Math.pow(10, 18);
await I_PolyToken.getTokens(polyToInvest * Math.pow(10, 18), account_investor3);
| 3 |
diff --git a/src/components/keyboard/keyboard.js b/src/components/keyboard/keyboard.js @@ -69,6 +69,7 @@ const Keyboard = {
for (let i = 0; i < swiperCoord.length; i += 1) {
const point = swiperCoord[i];
if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {
+ if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line
inView = true;
}
}
| 8 |
diff --git a/tools/deployer/delegate/src/DelegateMapping.ts b/tools/deployer/delegate/src/DelegateMapping.ts @@ -38,6 +38,15 @@ export function handleUnsetRule(event: UnsetRule): void {
}
export function handleProvideOrder(event: ProvideOrder): void {
- // should update the Delegate rule's values
- // original rule - all trades = new rule
+ var ruleIdentifier =
+ event.params.owner.toHex() +
+ event.params.senderToken.toHex() +
+ event.params.signerToken.toHex()
+ var rule = DelegateRule.load(ruleIdentifier)
+ rule.maxSenderAmount = BigInt.fromI32(rule.maxSenderAmount.toI32() - event.params.senderAmount.toI32())
+ // if there is nothing mark the rule as inactive
+ if (rule.maxSenderAmount == BigInt.fromI32(0)) {
+ rule.active = false
+ }
+ rule.save()
}
| 3 |
diff --git a/src/pages/Group/AddServiceComponent.js b/src/pages/Group/AddServiceComponent.js @@ -407,7 +407,7 @@ export default class AddServiceComponent extends PureComponent {
<Market
{...MarketParameter}
isHelm={false}
- scopeMax="localApplication"
+ scopeMax={scopeProMax || 'localApplication'}
handleServiceComponent={() => {
this.handleServiceComponent(false, 'market', null);
}}
| 1 |
diff --git a/workshops/reinvent2018/readme.md b/workshops/reinvent2018/readme.md @@ -238,7 +238,7 @@ containing QnABot configuration using the Designer.
2) Use 'Import' to the import a configuration file from the following url:
<pre>
- https://raw.githubusercontent.com/aws-samples/develop/aws-ai-qna-bot/workshops/reinvent2018/samples/sun-questions-qna-step-2.json
+ https://raw.githubusercontent.com/aws-samples/aws-ai-qna-bot/develop/workshops/reinvent2018/samples/sun-questions-qna-step-2.json
</pre>
This file contains the questions preconfigured for the step.
@@ -481,7 +481,7 @@ photo response.
Use 'Import' to the import a configuration file from the following url:
<pre>
- https://raw.githubusercontent.com/aws-samples/develop/aws-ai-qna-bot/workshops/reinvent2018/samples/sun-questions-qna-step-3.json
+ https://raw.githubusercontent.com/aws-samples/aws-ai-qna-bot/develop/workshops/reinvent2018/samples/sun-questions-qna-step-3.json
</pre>
This file contains the questions preconfigured for the step.
@@ -926,7 +926,7 @@ If an argument (N) is supplied as an integer, the function will return N most re
Use 'Import' to the import a configuration file from the following url:
<pre>
- https://raw.githubusercontent.com/aws-samples/develop/aws-ai-qna-bot/workshops/reinvent2018/samples/sun-questions-qna-step-7.json
+ https://raw.githubusercontent.com/aws-samples/aws-ai-qna-bot/develop/workshops/reinvent2018/samples/sun-questions-qna-step-7.json
</pre>
This file contains the questions preconfigured for the step.
| 3 |
diff --git a/.github/workflows/TEST-release.yml b/.github/workflows/TEST-release.yml @@ -23,7 +23,7 @@ jobs:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
blazegraph:
- image: blazegraph:2.1.6
+ image: lyrasis/blazegraph:2.1.6
ports:
- 7200:7200
strategy:
| 3 |
diff --git a/src/blockchain/LiquidPledgingMonitor.js b/src/blockchain/LiquidPledgingMonitor.js @@ -63,9 +63,9 @@ export default class {
},
);
- this.txMonitor.on(this.txMonitor.LP_EVENT, this.newEvent.bind(this));
- this.txMonitor.on(this.txMonitor.MILESTONE_EVENT, this.newEvent.bind(this));
- this.txMonitor.on(this.txMonitor.VAULT_EVENT, this.newEvent.bind(this));
+ this.txMonitor.on(this.txMonitor.LP_EVENT, e => this.newEvent(e, true));
+ this.txMonitor.on(this.txMonitor.MILESTONE_EVENT, e => this.newEvent(e, true));
+ this.txMonitor.on(this.txMonitor.VAULT_EVENT, e => this.newEvent(e, true));
}
// semi-private methods:
@@ -256,7 +256,7 @@ export default class {
* Handle new events as they are emitted. Here we save the event so that they can be processed
* later after waiting for x number of confirmations (defined in config).
*/
- newEvent(event) {
+ newEvent(event, reprocess = false) {
this.updateConfig(event.blockNumber);
// NOTE: perissology: I'm not sure if we want to do this. If we uncomment the following code, we won't have
@@ -312,7 +312,7 @@ export default class {
const oldEvent = data[0];
const mutation = Object.assign({}, oldEvent, event);
- if (oldEvent.confirmed) {
+ if (oldEvent.confirmed && !reprocess) {
logger.error(
'RE-ORG ERROR: LiquidPledgingMonitor.newEvent was called, however the matching event has already been confirmed. Consider increasing the requiredConfirmations.',
event,
| 11 |
diff --git a/js/exmo.js b/js/exmo.js @@ -328,7 +328,10 @@ module.exports = class exmo extends Exchange {
}
let orders = await this.privatePostUserOpenOrders ();
if (typeof market !== 'undefined')
+ if (typeof orders[market['id']] !== 'undefined')
orders = orders[market['id']];
+ else
+ orders = [];
return this.parseOrders (orders, market, since, limit);
}
| 9 |
diff --git a/html/components/footer.stories.js b/html/components/footer.stories.js @@ -81,7 +81,7 @@ export const defaultStory = () => {
<div class="sprk-o-Stack__item sprk-o-Stack sprk-o-Stack--medium">
<div class="sprk-o-Stack__item">
<a class="sprk-b-Link sprk-b-Link--plain" href="#nogo">
- <img src="https://spark-assets.netlify.app/rocket-hq.svg" alt="Rocket HQ Logo">
+ <img src="https://spark-assets.netlify.app/rocket-hq-white.svg" alt="Rocket HQ Logo">
</a>
</div>
| 3 |
diff --git a/lib/modules/ens/embarkjs.js b/lib/modules/ens/embarkjs.js @@ -226,29 +226,6 @@ __embarkENS.lookup = function (address, callback) {
});
};
-__embarkENS.registerSubDomain = function (name, address, callback) {
- callback = callback || function () {};
-
- const resolveAddr = address || '0x0000000000000000000000000000000000000000';
- const toSend = this.registrar.methods.register(web3.utils.sha3(name), web3.eth.defaultAccount, resolveAddr);
-
- toSend.estimateGas().then(gasEstimated => {
- return toSend.send({gas: gasEstimated + 1000}).then(transaction => {
- if (transaction.status !== "0x1" && transaction.status !== "0x01" && transaction.status !== true) {
- console.warn('Failed transaction', transaction);
- return callback('Failed to register. Check gas cost.');
- }
- callback(null, transaction);
- }).catch(err => {
- callback('Failed to register with error: ' + (err.message || err));
- console.error(err);
- });
- }).catch(err => {
- callback("Register would error. Is it already registered? Do you have token balance? Is Allowance set? " + (err.message || err));
- console.error(err);
- });
-};
-
__embarkENS.registerSubDomain = function (name, address, callback) {
callback = callback || function () {};
| 2 |
diff --git a/app-object.js b/app-object.js @@ -201,6 +201,18 @@ class App extends THREE.Object3D {
});
}
}
+ get contentId() {
+ return this.getComponent('contentId');
+ }
+ set contentId(contentId) {
+ this.setComponent('contentId', contentId);
+ }
+ get instanceId() {
+ return this.getComponent('instanceId');
+ }
+ set instanceId(instanceId) {
+ this.setComponent('instanceId', instanceId);
+ }
addModule(m) {
throw new Error('method not bound');
}
| 0 |
diff --git a/src/components/CardList.js b/src/components/CardList.js @@ -11,7 +11,25 @@ const Table = styled.div`
margin-bottom: 2rem;
`
-const Item = styled(Link)`
+const Item = styled.div`
+ cursor: pointer;
+ text-decoration: none;
+ display: flex;
+ justify-content: space-between;
+ color: ${(props) => props.theme.colors.text} !important;
+ box-shadow: 0 1px 1px ${(props) => props.theme.colors.tableItemBoxShadow};
+ margin-bottom: 1px;
+ padding: 1rem;
+ width: 100%;
+ color: #000;
+ &:hover {
+ border-radius: 4px;
+ box-shadow: 0 0 1px ${(props) => props.theme.colors.primary};
+ background: ${(props) => props.theme.colors.tableBackgroundHover};
+ }
+`
+
+const ItemLink = styled(Link)`
text-decoration: none;
display: flex;
justify-content: space-between;
@@ -56,13 +74,28 @@ const Image = styled(Img)`
margin-top: 4px;
`
-const CardList = ({ content, className }) => {
+const CardList = ({ content, className, clickHandler }) => {
return (
<Table className={className}>
{content.map((listItem, idx) => {
const { title, description, caption, link, image, alt, id } = listItem
- return (
- <Item key={id || idx} to={link}>
+ const isLink = !!link
+ return isLink ? (
+ <ItemLink key={id || idx} to={link}>
+ {image && <Image fixed={image} alt={alt} />}
+ <LeftContainer>
+ <ItemTitle>{title}</ItemTitle>
+
+ <ItemDesc>{description}</ItemDesc>
+ </LeftContainer>
+ {caption && (
+ <RightContainer>
+ <ItemDesc>{caption}</ItemDesc>
+ </RightContainer>
+ )}
+ </ItemLink>
+ ) : (
+ <Item key={idx} onClick={() => clickHandler(idx)}>
{image && <Image fixed={image} alt={alt} />}
<LeftContainer>
<ItemTitle>{title}</ItemTitle>
| 11 |
diff --git a/src/constants/colors.js b/src/constants/colors.js @@ -21,6 +21,7 @@ export const whiteColor = "#ffffff";
export const velvetColor = "#660c63";
export const blackColor = "#111111";
export const coralColor = "#ff5b44";
+export const shadowColor = "rgba(0, 0, 0, 0.1)";
// CUSTOM
| 0 |
diff --git a/token-metadata/0xF063fE1aB7a291c5d06a86e14730b00BF24cB589/metadata.json b/token-metadata/0xF063fE1aB7a291c5d06a86e14730b00BF24cB589/metadata.json "symbol": "SALE",
"address": "0xF063fE1aB7a291c5d06a86e14730b00BF24cB589",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/mesh-lodder.js b/mesh-lodder.js @@ -47,6 +47,17 @@ const textureInitializers = {
}, */
};
+const _eraseVertices = (geometry, positionStart, positionCount/*, indexStart, indexCount*/) => {
+ console.log('erase vertices', geometry, positionStart, positionCount/*, indexStart, indexCount*/);
+ for (let i = 0; i < positionCount; i++) {
+ geometry.attributes.position.array[positionStart + i] = 0;
+ geometry.attributes.position.needsUpdate = true; // XXX needs to use update range
+ }
+ /* for (let i = 0; i < indexCount; i++) {
+ geometry.index.array[indexStart + i] = 0;
+ } */
+};
+
export class MeshLodder {
constructor() {
const positions = new Float32Array(bufferSize * 3);
@@ -74,6 +85,7 @@ export class MeshLodder {
this.mesh.frustumCulled = false;
this.contentIndex = {};
+ this.itemRegistry = [];
this.shapeAddresses = {};
this.physicsObjects = [];
this.compiled = false;
@@ -380,6 +392,35 @@ export class MeshLodder {
#getContentIndexNames() {
return Object.keys(this.contentIndex).sort();
}
+ getItemByPhysicsId(physicsId) {
+ const physicsObjectIndex = this.physicsObjects.findIndex(p => p.physicsId === physicsId);
+ if (physicsObjectIndex !== -1) {
+ const item = this.itemRegistry[physicsObjectIndex];
+ return item;
+ } else {
+ return null;
+ }
+ }
+ deleteItem(item) {
+ const index = this.itemRegistry.indexOf(item);
+ if (index !== -1) {
+ const item = this.itemRegistry[index];
+ const {geometry} = this.mesh;
+ _eraseVertices(
+ geometry,
+ item.position.start,
+ item.position.count,
+ // item.index.start,
+ // item.index.count,
+ );
+
+ const physicsObject = this.physicsObjects[index];
+ physicsManager.removeGeometry(physicsObject);
+
+ this.itemRegistry.splice(index, 1);
+ this.physicsObjects.splice(index, 1);
+ }
+ }
update() {
if (this.compiled) {
const currentCoord = this.#getCurrentCoord(localVector2D);
@@ -426,10 +467,30 @@ export class MeshLodder {
const quaternion = localQuaternion;
const scale = localVector2;
const shape = physicsManager.addConvexShape(shapeAddress, position, quaternion, scale);
+
this.physicsObjects.push(shape);
+
+ // return shape;
};
+ // const physicsObject = _addPhysicsShape();
_addPhysicsShape();
+ const _addItemToRegistry = () => {
+ const item = {
+ // physicsId: physicsObject.physicsId,
+ position: {
+ start: positionIndex * 3,
+ count: g.attributes.position.count * 3,
+ },
+ index: {
+ start: indexIndex,
+ count: g.index.count,
+ },
+ };
+ this.itemRegistry.push(item);
+ };
+ _addItemToRegistry();
+
const _mapPositions = (g, geometry) => {
const count = g.attributes.position.count;
| 0 |
diff --git a/src/math/vector3.js b/src/math/vector3.js * @return {me.Vector3d} Reference to this object for method chaining
*/
abs : function () {
- return this._set((this.x < 0) ? -this.x : this.x, (this.y < 0) ? -this.y : this.y, (this.z < 0) ? -this.Z : this.z);
+ return this._set((this.x < 0) ? -this.x : this.x, (this.y < 0) ? -this.y : this.y, (this.z < 0) ? -this.z : this.z);
},
/**
| 1 |
diff --git a/tests/e2e/specs/Modeler.spec.js b/tests/e2e/specs/Modeler.spec.js @@ -113,6 +113,7 @@ describe('Modeler', () => {
const taskPosition = { x: 200, y: 200 };
dragFromSourceToDest(nodeTypes.task, taskPosition);
getElementAtPosition(taskPosition).click();
+ cy.get('#accordion-button-advanced').click();
cy.get('[name=id]').should('have.value', 'node_2');
| 1 |
diff --git a/userscript.user.js b/userscript.user.js @@ -18688,6 +18688,7 @@ var $$IMU_EXPORT$$;
if (domain_nosub === "shopify.com" && /^cdn[0-9]*\./.test(domain)) {
// https://cdn.shopify.com/s/files/1/0947/6410/products/a2178934757_10_1024x1024.jpeg?v=1458824230
+ // https://cdn.shopify.com/s/files/1/0947/6410/products/a2178934757_10_x1024.jpeg?v=1458824230
// https://cdn.shopify.com/s/files/1/0947/6410/products/a2178934757_10.jpeg?v=1458824230
// https://cdn.shopify.com/s/files/1/0947/6410/products/Om-Sweet-Om_1024x1024.png?v=1450196316
// https://cdn.shopify.com/s/files/1/0947/6410/products/Om-Sweet-Om.png?v=1450196316
@@ -18709,7 +18710,7 @@ var $$IMU_EXPORT$$;
// https://cdn.shopify.com/s/files/1/2656/7538/files/de-mining.jpg
// https://cdn2.shopify.com/s/files/1/0875/3268/products/Max-Payne-3-Sony-PlayStation-3-PS3-Game-Screenshot-4_1024x1024.jpg?v=1501206616
// https://cdn2.shopify.com/s/files/1/0875/3268/products/Max-Payne-3-Sony-PlayStation-3-PS3-Game-Screenshot-4.jpg?v=1501206616
- return src.replace(/_(?:large|medium|small|grande|compact|[0-9]+x(?:[0-9]+)?)(?:@[0-9]+x)?(?:_crop_[a-z]+)?(?:\.progressive)?(\.[^/.]*)(?:[?#].*)?$/, "$1");
+ return src.replace(/_(?:large|medium|small|grande|compact|[0-9]+x(?:[0-9]+)?|x[0-9]+)(?:@[0-9]+x)?(?:_crop_[a-z]+)?(?:\.progressive)?(\.[^/.]*)(?:[?#].*)?$/, "$1");
}
if (domain === "cdn.itv.com") {
| 7 |
diff --git a/app/models/local_sound.rb b/app/models/local_sound.rb @@ -17,7 +17,7 @@ class LocalSound < Sound
end
validates_attachment_content_type :file,
- content_type: [/wav/i, /mpeg/i, /mp3/i, /m4a/i],
+ content_type: [/wav/i, /mpeg/i, /mp3/i, /m4a/i, "audio/mp4"],
message: "must be a WAV, MP3, or M4A"
def to_observation
| 11 |
diff --git a/js/searchbar/placesPlugin.js b/js/searchbar/placesPlugin.js @@ -5,18 +5,6 @@ var searchbarAutocomplete = require('util/autocomplete.js')
var urlParser = require('util/urlParser.js')
var readerDecision = require('readerDecision.js')
-/* For survey */
-var browserUI = require('browserUI.js')
-
-var surveyURL
-fetch('https://minbrowser.github.io/min/searchSurvey/searchSurvey.json').then(function (response) {
- return response.json()
-}).then(function (data) {
- if (data.available && data.url) {
- surveyURL = data.url
- }
-})
-
var places = require('places/places.js')
var searchEngine = require('util/searchEngine.js')
@@ -117,17 +105,6 @@ function showSearchbarPlaceResults (text, input, event, pluginName = 'places') {
searchbarPlugins.addResult(pluginName, data)
}
})
-
- if (surveyURL && pluginName === 'fullTextPlaces') {
- var feedbackLink = document.createElement('span')
- feedbackLink.className = 'search-feedback-link'
- feedbackLink.textContent = 'Search Feedback'
- feedbackLink.addEventListener('click', function (e) {
- var url = surveyURL + '?query=' + encodeURIComponent(text) + '&results=' + encodeURIComponent(results.map(r => r.url).join('\n')) + '&version=' + encodeURIComponent(window.globalArgs['app-version'])
- browserUI.addTab(tabs.add({ url: url }), { enterEditMode: false })
- })
- searchbarPlugins.getContainer('fullTextPlaces').appendChild(feedbackLink)
- }
})
}
| 2 |
diff --git a/lib/node_modules/@stdlib/proxy/ctor/docs/repl.txt b/lib/node_modules/@stdlib/proxy/ctor/docs/repl.txt --------
> function get( obj, prop ) { return obj[ prop ] * 2.0 };
> var h = { 'get': get };
- > var p = {{alias}}( {}, h );
+ > var p = new {{alias}}( {}, h );
> p.proxy.a = 3.14;
> p.proxy.a
6.28
| 4 |
diff --git a/src/UserConfig.js b/src/UserConfig.js @@ -645,12 +645,6 @@ class UserConfig {
return;
}
- console.log(
- chalk.yellow(
- "Warning: Configuration API `addExtension` is an experimental Eleventy feature with an unstable API. Be careful!"
- )
- );
-
this.extensionMap.add(
Object.assign(
{
| 2 |
diff --git a/test/tests/operations/ExtractEmailAddresses.mjs b/test/tests/operations/ExtractEmailAddresses.mjs @@ -30,4 +30,26 @@ TestRegister.addTests([
},
],
},
+ {
+ name: "Extract email address (Internationalized)",
+ input: "\u4f0a\u662d\u5091@\u90f5\u4ef6.\u5546\u52d9 \u093e\u092e@\u092e\u094b\u0939\u0928.\u0908\u0928\u094d\u092b\u094b\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c \u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc Jos\u1ec5Silv\u1ec5@googl\u1ec5.com\nJos\u1ec5Silv\[email protected] and Jos\[email protected]\[email protected], [email protected]\ng\[email protected] and [email protected].\nuser+mailbox/[email protected]\n\u7528\u6237@\u4f8b\u5b50.\u5e7f\u544a\n\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e@\u0909\u0926\u093e\u0939\u0930\u0923.\u0915\u0949\u092e\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nD\xf6rte@S\xf6rensen.example.com\n\u0430\u0434\u0436\u0430\u0439@\u044d\u043a\u0437\u0430\u043c\u043f\u043b.\u0440\u0443\u0441\[email protected]",
+ expectedOutput: "\u4f0a\u662d\u5091@\u90f5\u4ef6.\u5546\u52d9\n\u093e\u092e@\u092e\u094b\u0939\u0928.\u0908\u0928\u094d\u092b\u094b\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nJos\u1ec5Silv\u1ec5@googl\u1ec5.com\nJos\u1ec5Silv\[email protected]\nJos\[email protected]\[email protected]\[email protected]\ng\[email protected]\[email protected]\nuser+mailbox/[email protected]\n\u7528\u6237@\u4f8b\u5b50.\u5e7f\u544a\n\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e@\u0909\u0926\u093e\u0939\u0930\u0923.\u0915\u0949\u092e\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nD\xf6rte@S\xf6rensen.example.com\n\u0430\u0434\u0436\u0430\u0439@\u044d\u043a\u0437\u0430\u043c\u043f\u043b.\u0440\u0443\u0441\[email protected]\n",
+ recipeConfig: [
+ {
+ "op": "Extract email addresses",
+ "args": [false]
+ },
+ ],
+ },
+ {
+ name: "Extract email address - Display total (Internationalized)",
+ input: "\u4f0a\u662d\u5091@\u90f5\u4ef6.\u5546\u52d9 \u093e\u092e@\u092e\u094b\u0939\u0928.\u0908\u0928\u094d\u092b\u094b\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c \u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc Jos\u1ec5Silv\u1ec5@googl\u1ec5.com\nJos\u1ec5Silv\[email protected] and Jos\[email protected]\[email protected], [email protected]\ng\[email protected] and [email protected].\nuser+mailbox/[email protected]\n\u7528\u6237@\u4f8b\u5b50.\u5e7f\u544a\n\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e@\u0909\u0926\u093e\u0939\u0930\u0923.\u0915\u0949\u092e\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nD\xf6rte@S\xf6rensen.example.com\n\u0430\u0434\u0436\u0430\u0439@\u044d\u043a\u0437\u0430\u043c\u043f\u043b.\u0440\u0443\u0441\[email protected]",
+ expectedOutput: "Total found: 19\n\n\u4f0a\u662d\u5091@\u90f5\u4ef6.\u5546\u52d9\n\u093e\u092e@\u092e\u094b\u0939\u0928.\u0908\u0928\u094d\u092b\u094b\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nJos\u1ec5Silv\u1ec5@googl\u1ec5.com\nJos\u1ec5Silv\[email protected]\nJos\[email protected]\[email protected]\[email protected]\ng\[email protected]\[email protected]\nuser+mailbox/[email protected]\n\u7528\u6237@\u4f8b\u5b50.\u5e7f\u544a\n\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e@\u0909\u0926\u093e\u0939\u0930\u0923.\u0915\u0949\u092e\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nD\xf6rte@S\xf6rensen.example.com\n\u0430\u0434\u0436\u0430\u0439@\u044d\u043a\u0437\u0430\u043c\u043f\u043b.\u0440\u0443\u0441\[email protected]\n",
+ recipeConfig: [
+ {
+ "op": "Extract email addresses",
+ "args": [true]
+ },
+ ],
+ },
]);
| 0 |
diff --git a/server/workers/base/renv.lock b/server/workers/base/renv.lock "Repository": "CRAN",
"Hash": "2dc413572eb42475179bfe0afabd2adf"
},
+ "dplyr": {
+ "Package": "dplyr",
+ "Version": "1.0.8",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "ef47665e64228a17609d6df877bf86f2"
+ },
"ellipsis": {
"Package": "ellipsis",
"Version": "0.3.2",
"Repository": "CRAN",
"Hash": "e32cfc0973caba11b65b1fa691b4d8c9"
},
+ "generics": {
+ "Package": "generics",
+ "Version": "0.1.2",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "177475892cf4a55865868527654a7741"
+ },
"glue": {
"Package": "glue",
"Version": "1.4.2",
"Repository": "CRAN",
"Hash": "01f28d4278f15c76cddbea05899c5d6f"
},
+ "purrr": {
+ "Package": "purrr",
+ "Version": "0.3.4",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "97def703420c8ab10d8f0e6c72101e02"
+ },
"rbace": {
"Package": "rbace",
"Version": "0.2.2.91",
},
"rlang": {
"Package": "rlang",
- "Version": "0.4.12",
+ "Version": "1.0.1",
"Source": "Repository",
"Repository": "CRAN",
- "Hash": "0879f5388fe6e4d56d7ef0b7ccb031e5"
+ "Hash": "3bf0219f19d9f5b3c682acbb3546a151"
},
"stringdist": {
"Package": "stringdist",
"Repository": "CRAN",
"Hash": "36eb05ad4cfdfeaa56f5a9b2a1311efd"
},
+ "tidyselect": {
+ "Package": "tidyselect",
+ "Version": "1.1.1",
+ "Source": "Repository",
+ "Repository": "CRAN",
+ "Hash": "7243004a708d06d4716717fa1ff5b2fe"
+ },
"triebeard": {
"Package": "triebeard",
"Version": "0.3.0",
| 3 |
diff --git a/server/preprocessing/other-scripts/vis_layout.R b/server/preprocessing/other-scripts/vis_layout.R @@ -21,6 +21,7 @@ vlog <- getLogger('vis')
vis_layout <- function(text, metadata, service,
max_clusters=15, maxit=500,
mindim=2, maxdim=2,
+ lang="english",
testing=FALSE, taxonomy_separator=NULL, list_size=-1,
vis_type='overview') {
TESTING <<- testing # makes testing param a global variable
| 13 |
diff --git a/src/encoded/schemas/antibody_lot.json b/src/encoded/schemas/antibody_lot.json "targets.investigated_as": {
"title": "Target of antibody"
},
+ "targets.label": {
+ "title": "Target of antibody",
+ "type": "typeahead",
+ "length": "long"
+ },
"characterizations.characterization_method": {
"title": "Characterization method"
},
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.