code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/components/IOUConfirmationList.js b/src/components/IOUConfirmationList.js @@ -152,7 +152,7 @@ class IOUConfirmationList extends Component {
if (this.props.hasMultipleParticipants) {
const formattedMyPersonalDetails = getIOUConfirmationOptionsFromMyPersonalDetail(
this.props.myPersonalDetails,
- this.props.numberFormat(this.calculateAmount(this.state.selectedParticipants) / 100, {
+ this.props.numberFormat(this.calculateAmount(this.state.selectedParticipants, true) / 100, {
style: 'currency',
currency: this.props.selectedCurrency.currencyCode,
}),
| 12 |
diff --git a/token-metadata/0x419c4dB4B9e25d6Db2AD9691ccb832C8D9fDA05E/metadata.json b/token-metadata/0x419c4dB4B9e25d6Db2AD9691ccb832C8D9fDA05E/metadata.json "symbol": "DRGN",
"address": "0x419c4dB4B9e25d6Db2AD9691ccb832C8D9fDA05E",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/app/front.js b/app/front.js @@ -5,18 +5,19 @@ const MQ = MathQuill.getInterface(2)
initToolbar()
$('.mathToolbar').hide()
-
-$(resultNode).click(() => {
+$(resultNode).mousedown(e => {
$('.math').addClass('focus')
+ $(e.target).hide()
$('.mathToolbar').show()
mathField.reflow()
- mathField.focus()
+ setTimeout(() => mathField.focus(), 0)
})
-$('.editMode .close').click(e => {
+$('.editMode .close').mousedown(e => {
e.preventDefault()
$('.math').removeClass('focus')
$('.mathToolbar').hide()
+ $(resultNode).show()
updateResult()
})
const mathField = MQ.MathField(equationEditor, {
| 2 |
diff --git a/plugins/kubernetes/app/assets/javascripts/kubernetes/components/clusters/list.coffee b/plugins/kubernetes/app/assets/javascripts/kubernetes/components/clusters/list.coffee @@ -54,6 +54,9 @@ Clusters = React.createClass
else
tr null,
td colSpan: '5',
+ if error
+ 'Could not retrieve clusters'
+ else
'No clusters found'
| 7 |
diff --git a/CHANGES.md b/CHANGES.md @@ -4,6 +4,9 @@ Change Log
### 1.30 - 2017-02-01
* Deprecated
* The properties `url` and `key` will be removed from `GeocoderViewModel` in 1.31. These properties will be available on geocoder services that support them, like `BingMapsGeocoderService`.
+* Breaking
+ * Removed separate `heading`, `pitch`, `roll` from `Transform.headingPitchRollToFixedFrame` and `Transform.headingPitchRollQuaternion`. [#4843](https://github.com/AnalyticalGraphicsInc/cesium/pull/4843)
+ * Use `headingPitchRoll` object instead.
* Added support for custom geocoder services and autocomplete [#4723](https://github.com/AnalyticalGraphicsInc/cesium/pull/4723).
* Added [Custom Geocoder Sandcastle example](http://localhost:8080/Apps/Sandcastle/index.html?src=Custom%20Geocoder.html)
* Added `GeocoderService`, an interface for geocoders.
| 3 |
diff --git a/runtime.js b/runtime.js @@ -463,7 +463,7 @@ const _loadScript = async file => {
return mesh;
};
let appIds = 0;
-const _loadWebBundle = async (file, opts, instanceId) => {
+const _loadWebBundle = async (file) => {
let arrayBuffer;
if (file.url) {
@@ -548,13 +548,6 @@ const _loadWebBundle = async (file, opts, instanceId) => {
}
};
const _mapScript = script => {
- if (instanceId) {
- script = script.replace("document.monetization", `window.document.monetization${instanceId}`);
- script = script.replace("document.monetization.addEventListener", `window.document.monetization${instanceId}.addEventListener`);
- script = `
- window.document.monetization${instanceId} = window.document.createElement('div');
- ` + script;
- }
const r = /^(\s*import[^\n]+from\s*['"])(.+)(['"])/gm;
script = script.replace(r, function() {
const u = _mapUrl(arguments[2]);
@@ -826,7 +819,7 @@ const _loadIframe = async (file, opts) => {
return object2;
};
-runtime.loadFile = async (file, opts, instanceId) => {
+runtime.loadFile = async (file, opts) => {
switch (getExt(file.name)) {
case 'gltf':
case 'glb': {
@@ -847,7 +840,7 @@ runtime.loadFile = async (file, opts, instanceId) => {
return await _loadScript(file, opts);
}
case 'wbn': {
- return await _loadWebBundle(file, opts, instanceId);
+ return await _loadWebBundle(file, opts);
}
case 'scn': {
return await _loadScn(file, opts);
| 2 |
diff --git a/js/kiri.js b/js/kiri.js @@ -2923,7 +2923,7 @@ self.kiri.license = exports.LICENSE;
var res = JSON.parse(reply);
if (res && res.ver) {
LOC.hash = res.space + "/" + res.ver;
- if (display) alert2("unique settings id is: " + res.space + "/" + res.ver);
+ if (display) alert("unique settings id is: " + res.space + "/" + res.ver);
}
} else {
updateSpaceState();
| 13 |
diff --git a/runtime/vdom/HTMLElement.js b/runtime/vdom/HTMLElement.js @@ -215,7 +215,7 @@ defineProperty(proto, 'value', {
});
HTMLElement.$__morphAttrs = function(fromEl, toEl) {
- var attrs = toEl.$__attributes;
+ var attrs = toEl.$__attributes || toEl._vattrs;
var attrName;
var i;
| 9 |
diff --git a/hot/dev-server.js b/hot/dev-server.js @@ -14,12 +14,19 @@ if (module.hot) {
.check(true)
.then(function (updatedModules) {
if (!updatedModules) {
- log("warning", "[HMR] Cannot find update. Need to do a full reload!");
+ log(
+ "warning",
+ "[HMR] Cannot find update. " + typeof window !== "undefined"
+ ? "Need to do a full reload!"
+ : "Please reload manually!"
+ );
log(
"warning",
"[HMR] (Probably because of restarting the webpack-dev-server)"
);
+ if (typeof window !== "undefined") {
window.location.reload();
+ }
return;
}
| 1 |
diff --git a/src/scss/pages/data.scss b/src/scss/pages/data.scss @@ -29,6 +29,14 @@ li {
position: sticky;
top: 0;
}
+ @media (min-width: $viewport-md) and (max-width: $viewport-lg) {
+ width: calc(100vw - 3rem);
+ padding-right: 3rem;
+ }
+ @media (min-width: $viewport-ms) and (max-width: $viewport-md) {
+ width: calc(100vw - 1.5rem);
+ padding-right: 1.5rem;
+ }
h2 {
margin: 0;
}
| 1 |
diff --git a/docs/axes/labelling.md b/docs/axes/labelling.md @@ -24,7 +24,7 @@ The method receives 3 arguments:
* `value` - the tick value in the **internal data format** of the associated scale.
* `index` - the tick index in the ticks array.
-* `ticks` - the array containing all of the [tick objects](../api/interfaces/tick).
+* `ticks` - the array containing all of the [tick objects](../api/interfaces/Tick).
The call to the method is scoped to the scale. `this` inside the method is the scale object.
| 1 |
diff --git a/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/camera/CameraStop.java b/android/rctmgl/src/main/java/com/mapbox/rctmgl/components/camera/CameraStop.java @@ -192,8 +192,8 @@ public class CameraStop {
}
private static int[] clippedPadding(int[] padding, RCTMGLMapView mapView) {
- int height = mapView.getHeight();
- int width = mapView.getWidth();
+ int mapHeight = mapView.getHeight();
+ int mapWidth = mapView.getWidth();
int left = padding[0];
int top = padding[1];
@@ -205,16 +205,16 @@ public class CameraStop {
int resultRight = right;
int resultBottom = bottom;
- if (top + bottom >= height) {
+ if (top + bottom >= mapHeight) {
double totalPadding = top + bottom;
- double extra = totalPadding - height + 1.0; // add 1 to compensate for floating point math
+ double extra = totalPadding - mapHeight + 1.0; // add 1 to compensate for floating point math
resultTop -= (top * extra) / totalPadding;
resultBottom -= (bottom * extra) / totalPadding;
}
- if (left + right >= width) {
+ if (left + right >= mapWidth) {
double totalPadding = left + right;
- double extra = totalPadding - height + 1.0; // add 1 to compensate for floating point math
+ double extra = totalPadding - mapWidth + 1.0; // add 1 to compensate for floating point math
resultLeft -= (left * extra) / totalPadding;
resultRight -= (right * extra) / totalPadding;
}
| 10 |
diff --git a/test/jasmine/tests/sankey_test.js b/test/jasmine/tests/sankey_test.js @@ -1228,7 +1228,7 @@ describe('sankey tests', function() {
.then(done);
});
- it('should not output hover/unhover event data when node.hoverinfo is skip', function(done) {
+ it('@noCI should not output hover/unhover event data when node.hoverinfo is skip', function(done) {
var fig = Lib.extendDeep({}, mock);
Plotly.plot(gd, fig)
| 0 |
diff --git a/token-metadata/0x0f7F961648aE6Db43C75663aC7E5414Eb79b5704/metadata.json b/token-metadata/0x0f7F961648aE6Db43C75663aC7E5414Eb79b5704/metadata.json "symbol": "XIO",
"address": "0x0f7F961648aE6Db43C75663aC7E5414Eb79b5704",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/demos/generator/typed.html b/demos/generator/typed.html </style>
</head>
<body>
- <h1><a href="https://blockly.googlecode.com/">Blockly</a> >
- <a href="../index.html">Demos</a> > Generating TypedLang</h1>
-
- <p>This is a simple demo of generating code from blocks.</p>
-
- <p>→ More info on <a href="https://code.google.com/p/blockly/wiki/LanguageGenerators">Language Generators</a>...</p>
-
<p>
- <!--
- <button onclick="showCode()">Show TypedLang</button>
- <button onclick="runCode()">Run TypedLang</button>
- -->
<form onsubmit="onClickConvert(event)">
<input class="ocamlCode" type="text" value="let x = true && false || false in x"></input>
<input type="submit" value="Convert to block"></input>
| 2 |
diff --git a/src/core/json-schema-components.js b/src/core/json-schema-components.js @@ -210,7 +210,7 @@ export class JsonSchema_boolean extends Component {
title={ errors.length ? errors : ""}
value={ String(value) }
allowedValues={ fromJS(schema.enum || ["true", "false"]) }
- allowEmptyValue={ !this.props.required }
+ allowEmptyValue={ true }
onChange={ this.onEnumChange }/>)
}
}
| 1 |
diff --git a/build/ccxt.php b/build/ccxt.php @@ -788,7 +788,7 @@ class Exchange {
}
public function parseOHLCVs ($ohlcvs, $market = null, $timeframe = 60, $since = null, $limit = null) {
- return $this->parse_ohlcvs ($ohlcv, $market, $timeframe, $since, $limit);
+ return $this->parse_ohlcvs ($ohlcvs, $market, $timeframe, $since, $limit);
}
public function parse_bidask ($bidask, $price_key = 0, $amount_key = 0) {
@@ -844,7 +844,7 @@ class Exchange {
public function parse_orders ($orders, $market = null) {
$result = array ();
foreach ($orders as $order)
- $result[] = $this->parse_order ($orders[$t], $market);
+ $result[] = $this->parse_order ($order, $market);
return $result;
}
| 1 |
diff --git a/test/jasmine/tests/hover_label_test.js b/test/jasmine/tests/hover_label_test.js @@ -4834,7 +4834,7 @@ describe('hovermode: (x|y)unified', function() {
it('should format differing position using *xother* `hovertemplate` and in respect to `xhoverformat`', function(done) {
Plotly.newPlot(gd, [{
type: 'bar',
- hovertemplate: '%{y}%{_xother:.2f}',
+ hovertemplate: 'y(_x):%{y}%{_xother:.2f}',
x: [0, 1.001],
y: [2, 1]
}, {
@@ -4846,12 +4846,12 @@ describe('hovermode: (x|y)unified', function() {
x: [0, 1.251],
y: [2, 3]
}, {
- hovertemplate: '(x)y:%{xother_}%{y}',
+ hovertemplate: '(x_)y:%{xother_}%{y}',
xhoverformat: '.2f',
x: [0, 1.351],
y: [3, 4]
}, {
- hovertemplate: '(x)y:%{_xother_}%{y}',
+ hovertemplate: '(_x_)y:%{_xother_}%{y}',
xhoverformat: '.3f',
x: [0, 1.451],
y: [4, 5]
@@ -4871,31 +4871,31 @@ describe('hovermode: (x|y)unified', function() {
.then(function() {
_hover(gd, { xpx: 100, ypx: 200 });
assertLabel({title: '0.000', items: [
- 'trace 0 : 2 (0.00)',
+ 'trace 0 : y(_x):2 (0.00)',
'trace 1 : (0, 1)',
'trace 2 : (x)y:(0.0)2',
- 'trace 3 : (x)y:(0.00) 3',
- 'trace 4 : (x)y:4',
+ 'trace 3 : (x_)y:(0.00) 3',
+ 'trace 4 : (_x_)y:4',
]});
})
.then(function() {
_hover(gd, { xpx: 250, ypx: 200 });
assertLabel({title: '0.749', items: [
- 'trace 0 : 1 (1.00)',
+ 'trace 0 : y(_x):1 (1.00)',
'trace 1 : 2',
'trace 2 : (x)y:(1.3)3',
- 'trace 3 : (x)y:(1.35) 4',
- 'trace 4 : (x)y: (1.451) 5',
+ 'trace 3 : (x_)y:(1.35) 4',
+ 'trace 4 : (_x_)y: (1.451) 5',
]});
})
.then(function() {
_hover(gd, { xpx: 350, ypx: 200 });
assertLabel({title: '1.35', items: [
- 'trace 0 : 1 (1.00)',
+ 'trace 0 : y(_x):1 (1.00)',
'trace 1 : (0.749, 2)',
'trace 2 : (x)y:(1.3)3',
- 'trace 3 : (x)y:4',
- 'trace 4 : (x)y: (1.451) 5',
+ 'trace 3 : (x_)y:4',
+ 'trace 4 : (_x_)y: (1.451) 5',
]});
})
.then(done, done.fail);
| 7 |
diff --git a/src/context/directory/handlers/attackProtection.ts b/src/context/directory/handlers/attackProtection.ts @@ -40,9 +40,9 @@ function parse(context: DirectoryContext): ParsedAttackProtection {
};
}
- const breachedPasswordDetection = loadJSON(files.breachedPasswordDetection);
- const bruteForceProtection = loadJSON(files.bruteForceProtection);
- const suspiciousIpThrottling = loadJSON(files.suspiciousIpThrottling);
+ const breachedPasswordDetection = loadJSON(files.breachedPasswordDetection, context.mappings);
+ const bruteForceProtection = loadJSON(files.bruteForceProtection, context.mappings);
+ const suspiciousIpThrottling = loadJSON(files.suspiciousIpThrottling, context.mappings);
return {
attackProtection: {
| 14 |
diff --git a/plugins/identity/app/services/service_layer_ng/identity_services/project.rb b/plugins/identity/app/services/service_layer_ng/identity_services/project.rb @@ -98,7 +98,7 @@ module ServiceLayerNg
# This method is used by model.
# It has to return the data hash.
def update_project(id, params)
- api.identity.update_project(id, Misty::to_json({project: params})).data
+ api.identity.update_project(id, project: params).data
end
# This method is used by model.
| 13 |
diff --git a/resource/js/legacy/crowi.js b/resource/js/legacy/crowi.js @@ -74,6 +74,14 @@ Crowi.revisionToc = function(contentId, tocId) {
});
});
});
+
+ // set affix when crowi-plus
+ var config = crowi.getConfig();
+ if ('crowi-plus' === config.layoutType) {
+ $tocId.affix({
+ offset: 100
+ });
+ }
};
| 12 |
diff --git a/components/ban-search.js b/components/ban-search.js @@ -29,7 +29,6 @@ function BanSearch() {
setResults(
results.features
.filter(({properties}) => !['75056', '13055', '69123'].includes(properties.id)) // Filter Paris, Marseille and Lyon
- .splice(0, 10) || []
)
} catch (err) {
setError(err)
| 2 |
diff --git a/universe.js b/universe.js @@ -54,13 +54,22 @@ const universeSpecs = {
position: [0, 0, 0],
start_url: './home.scn',
},
- parcels: [{
+ parcels: [
+ {
name: 'Erithor',
extents: [
- 0, 0, -10 - 4,
- 10, 3, -4,
+ 5, 0, -14,
+ 15, 3, -4,
+ ],
+ },
+ {
+ name: 'Joy',
+ extents: [
+ 5, 0, -24,
+ 15, 3, -14,
+ ],
+ },
],
- }],
};
const _makeLabelMesh = text => {
const w = 2;
| 0 |
diff --git a/src/models/users.js b/src/models/users.js @@ -16,13 +16,15 @@ const mongoose = require('mongoose');
},{ versionKey: false, toJSON: { virtuals: true }, toObject: { virtuals: true }});
Users.virtual('avatarURL').get(function(){
- if((this.avatar=="1")||(this.avatar=="2")||(this.avatar=="3")||(this.avatar=="4")) return `https://cdn.discordapp.com/embed/avatars/${this.avatar}.png`;
+ if((this.avatar=="1")||(this.avatar=="2")||(this.avatar=="3")||(this.avatar=="4")){ return `https://cdn.discordapp.com/embed/avatars/${this.avatar}.png`;}
+ else{
var ani=false;
if(this.avatar.startsWith("a_")) ani=true;
const aniurl=`https://cdn.discordapp.com/avatars/${this.id}/${this.avatar}.gif`;
const nonurl=`https://cdn.discordapp.com/avatars/${this.id}/${this.avatar}.png`;
const url = (ani)?aniurl:nonurl;
return url;
+ }
});
Users.virtual('tag').get(function(){
return `${this.username}#${this.discriminator}`;
| 1 |
diff --git a/packages/dynamodb/index.test-d.ts b/packages/dynamodb/index.test-d.ts -import type middy from '@middy/core'
-import type { Context as LambdaContext } from 'aws-lambda'
+import middy from '@middy/core'
+import { Context as LambdaContext } from 'aws-lambda'
import { DynamoDBClient } from '@aws-sdk/client-dynamodb'
import { captureAWSv3Client } from 'aws-xray-sdk'
import { expectType } from 'tsd'
| 13 |
diff --git a/src/encoded/schemas/antibody_characterization.json b/src/encoded/schemas/antibody_characterization.json "85978cd9-131e-48e2-a389-f752ab05b0a6",
"2eb068c5-b7a6-48ec-aca2-c439e4dabb08",
"332d0e03-a907-4f53-8358-bb00118277c8",
- "ca6e2de3-a6bd-4fce-8b6d-52ef41e7c0c5"
+ "ca6e2de3-a6bd-4fce-8b6d-52ef41e7c0c5",
+ "76091563-a959-4a9c-929c-9acfa1a0a078",
+ "6bae687f-b77a-46b9-af0e-a02c135cf42e",
+ "38dc09c2-4c05-49d2-b73d-4b75261fcbf1"
]
},
"characterizes": {
| 0 |
diff --git a/src/logged_in/components/subscription/Subscription.js b/src/logged_in/components/subscription/Subscription.js import React, { PureComponent } from "react";
import PropTypes from "prop-types";
-import { List, Divider, Paper } from "@material-ui/core";
+import { List, Divider, Paper, withStyles } from "@material-ui/core";
import SubscriptionTable from "./SubscriptionTable";
import SubscriptionInfo from "./SubscriptionInfo";
import AddBalanceDialog from "./AddBalanceDialog";
+const styles = {
+ divider: {
+ backgroundColor: "rgba(0, 0, 0, 0.26)"
+ }
+};
+
class Subscription extends PureComponent {
componentDidMount() {
const { selectSubscription } = this.props;
@@ -12,13 +18,13 @@ class Subscription extends PureComponent {
}
render() {
- const { transactions } = this.props;
+ const { transactions, classes } = this.props;
return (
<Paper>
- <AddBalanceDialog open />
+ <AddBalanceDialog open={false} />
<List disablePadding>
<SubscriptionInfo />
- <Divider />
+ <Divider className={classes.divider} />
<SubscriptionTable transactions={transactions} />
</List>
</Paper>
@@ -27,8 +33,9 @@ class Subscription extends PureComponent {
}
Subscription.propTypes = {
+ classes: PropTypes.object.isRequired,
transactions: PropTypes.array.isRequired,
selectSubscription: PropTypes.func.isRequired
};
-export default Subscription;
+export default withStyles(styles)(Subscription);
| 7 |
diff --git a/core/server/api/v3/posts.js b/core/server/api/v3/posts.js const models = require('../../models');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const getPostServiceInstance = require('../../services/posts/posts-service');
const allowedIncludes = ['tags', 'authors', 'authors.roles', 'email'];
const unsafeAttrs = ['status', 'authors', 'visibility'];
+const messages = {
+ postNotFound: 'Post not found.'
+};
+
const postsService = getPostServiceInstance('v3');
module.exports = {
@@ -73,7 +77,7 @@ module.exports = {
.then((model) => {
if (!model) {
throw new errors.NotFoundError({
- message: i18n.t('errors.api.posts.postNotFound')
+ message: tpl(messages.postNotFound)
});
}
@@ -188,7 +192,7 @@ module.exports = {
.then(() => null)
.catch(models.Post.NotFoundError, () => {
return Promise.reject(new errors.NotFoundError({
- message: i18n.t('errors.api.posts.postNotFound')
+ message: tpl(messages.postNotFound)
}));
});
}
| 14 |
diff --git a/guide/english/css/class-selector/index.md b/guide/english/css/class-selector/index.md title: Class Selector
---
## Class Selector
-A Class Selector is used in a CSS file to apply style to the HTML elements with the corresponding class name. In HTML, you can set the class name for any element by adding a "class" attribute.
+A Class Selector is used in a CSS file to apply style to the HTML elements with the corresponding class name. In HTML, you can set the class name for any element by adding a `class` attribute.
To select elements with a specific class, we use a (.) named as period character, with the name of the class.
| 14 |
diff --git a/karma.conf.js b/karma.conf.js @@ -13,7 +13,7 @@ module.exports = function (config) {
};
if (process.env.TRAVIS) {
- reporters = ['dots', 'coverage', 'clear-screen', 'saucelabs'];
+ reporters = ['coverage', 'clear-screen', 'saucelabs'];
browsers = Object.keys(customLaunchers);
} else {
// Here you can change to what browsers you have on your system. TODO: Move to .env file instead
| 2 |
diff --git a/scene-previewer.js b/scene-previewer.js @@ -9,6 +9,13 @@ const resolution = 2048;
const worldSize = 10000;
const near = 10;
+const localPlane = new THREE.Plane();
+
+const _planeToVector4 = (plane, target) => {
+ target.copy(plane.normal);
+ target.w = plane.constant;
+};
+
const vertexShader = `
varying vec3 vNormal;
varying vec3 vWorldPosition;
@@ -36,9 +43,15 @@ const fragmentShader = `\
//
uniform samplerCube envMap;
+ uniform vec4 plane;
varying vec3 vNormal;
varying vec3 vWorldPosition;
+ float distanceToPoint(vec4 plane, vec3 point) {
+ vec3 normal = plane.xyz;
+ float constant = plane.w;
+ return dot(normal, point) + constant;
+ }
void main() {
vec3 normal = normalize(vNormal);
const float flipEnvMap = 1.;
@@ -55,6 +68,12 @@ const fragmentShader = `\
vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
gl_FragColor = envColor;
+
+ float d = distanceToPoint(plane, cameraPosition);
+ gl_FragColor.a = 1.0 - smoothstep(0.0, 15.0, d);
+ if (gl_FragColor.a <= 0.0) {
+ discard;
+ }
}
`;
@@ -90,10 +109,15 @@ class ScenePreviewer {
value: cubeRenderTarget.texture,
needsUpdate: true,
},
+ plane: {
+ value: new THREE.Vector4(0, 0, 0, 0),
+ needsUpdate: false,
+ },
},
vertexShader,
fragmentShader,
side: THREE.BackSide,
+ transparent: true,
});
/* const skyboxMaterial = new THREE.MeshBasicMaterial({
envMap: cubeRenderTarget.texture,
@@ -103,6 +127,18 @@ class ScenePreviewer {
debugger;
}; */
const skyboxMesh = new THREE.Mesh(skyboxGeometry, skyboxMaterial);
+ skyboxMesh.onBeforeRender = () => {
+ const position = new THREE.Vector3();
+ const quaternion = new THREE.Quaternion();
+ const scale = new THREE.Vector3(1, 1, 1);
+ this.mesh.matrixWorld.decompose(position, quaternion, scale);
+
+ const normal = new THREE.Vector3(0, 0, -1).applyQuaternion(quaternion);
+ localPlane.setFromNormalAndCoplanarPoint(normal, position);
+
+ _planeToVector4(localPlane, this.mesh.material.uniforms.plane.value);
+ this.mesh.material.uniforms.plane.needsUpdate = true;
+ };
return skyboxMesh;
};
this.mesh = _makeSkyboxMesh();
| 0 |
diff --git a/server/views/topics/stories.py b/server/views/topics/stories.py @@ -238,7 +238,7 @@ def _topic_story_link_list_by_page_as_csv_row(user_key, topics_id, props, **kwar
# now get the full story info by combining the story ids into a one big list
story_src_ids = [str(s['source_stories_id']) for s in story_link_page['links']]
story_ref_ids = [str(s['ref_stories_id']) for s in story_link_page['links']]
- page_story_ids = story_src_ids + story_ref_ids
+ page_story_ids = list(set(story_src_ids + story_ref_ids))
# note: ideally this would use the stories_id argument to pass them in, but that isn't working :-(
stories_info_list = local_mc.topicStoryList(topics_id, q="stories_id:({})".format(' '.join(page_story_ids)))
# now add in the story info to each row from the links results, so story info is there along with the stories_id
@@ -250,10 +250,15 @@ def _topic_story_link_list_by_page_as_csv_row(user_key, topics_id, props, **kwar
s['ref_info'] = s_info
# now that we have all the story info, stream this page of info the user
for s in story_link_page['links']:
+ try:
cleaned_source_info = csv.dict2row(props, s['source_info'])
cleaned_ref_info = csv.dict2row(props, s['ref_info'])
row_string = ','.join(cleaned_source_info) + ',' + ','.join(cleaned_ref_info) + '\n'
yield row_string
+ except KeyError as ke:
+ yield "error getting story info on link from {} to {}\n".format(s['ref_stories_id'],
+ s['source_stories_id'])
+ logger.exception(ke)
# figure out if we have more pages to process or not
if 'next' in story_link_page['link_ids']:
link_id = story_link_page['link_ids']['next']
| 9 |
diff --git a/edit.js b/edit.js @@ -847,6 +847,51 @@ const geometryWorker = (() => {
this.dataView.setInt32(2*Uint32Array.BYTES_PER_ELEMENT, v, true);
}
pullU8Array(length) {
+ const {offset} = this;
+ this.offset += length;
+ return new Uint8Array(this.dataView.buffer, this.dataView.byteOffset + offset, length);;
+ }
+ pullF32Array(length) {
+ const {offset} = this;
+ this.offset += length*Float32Array.BYTES_PER_ELEMENT;
+ return new Float32Array(this.dataView.buffer, this.dataView.byteOffset + offset, length);
+ }
+ pullI32() {
+ const {offset} = this;
+ this.offset += Int32Array.BYTES_PER_ELEMENT;
+ return this.dataView.getInt32(offset, true);;
+ }
+ pullU32() {
+ const {offset} = this;
+ this.offset += Uint32Array.BYTES_PER_ELEMENT;
+ return this.dataView.getUint32(offset, true);;
+ }
+ pullF32() {
+ const {offset} = this;
+ this.offset += Float32Array.BYTES_PER_ELEMENT;
+ return this.dataView.getFloat32(offset, true);
+ }
+ pushU8Array(uint8Array) {
+ new Uint8Array(this.dataView.buffer, this.dataView.byteOffset + this.offset, uint8Array.length).set(uint8Array);
+ this.offset += uint8Array.byteLength;
+ }
+ pushF32Array(float32Array) {
+ new Float32Array(this.dataView.buffer, this.dataView.byteOffset + this.offset, float32Array.length).set(float32Array);
+ this.offset += float32Array.byteLength;
+ }
+ pushI32(v) {
+ this.dataView.setInt32(this.offset, v, true);
+ this.offset += Int32Array.BYTES_PER_ELEMENT;
+ }
+ pushU32(v) {
+ this.dataView.setUint32(this.offset, v, true);
+ this.offset += Uint32Array.BYTES_PER_ELEMENT;
+ }
+ pushF32(v) {
+ this.dataView.setFloat32(this.offset, v, true);
+ this.offset += Float32Array.BYTES_PER_ELEMENT;
+ }
+ /* pullU8Array(length) {
if (this.offset + length <= messageSize) {
const result = new Uint8Array(this.dataView.buffer, this.dataView.byteOffset + this.offset, length);
this.offset += length;
@@ -930,7 +975,7 @@ const geometryWorker = (() => {
} else {
throw new Error('message overflow');
}
- }
+ } */
}
class CallStack {
constructor() {
| 2 |
diff --git a/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue b/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue @@ -53,6 +53,10 @@ export default {
confirmContent: {
type: Object,
required: true
+ },
+ callbackName: {
+ type: String,
+ default: ''
}
},
emits: [ 'safe-close', 'confirm' ],
@@ -75,7 +79,7 @@ export default {
methods: {
confirm() {
this.modal.showModal = false;
- this.$emit('confirm');
+ this.$emit('confirm', this.callbackName);
}
}
};
@@ -83,9 +87,7 @@ export default {
<style lang="scss" scoped>
.apos-confirm {
- // Repeat modal z-index here since this typically lives inside a modal.
- // TODO: Remove z-index once using Vue 3 Teleport.
- z-index: $z-index-modal-bg;
+ z-index: $z-index-modal-inner;
position: fixed;
top: 0;
right: 0;
@@ -110,7 +112,7 @@ export default {
}
/deep/ .apos-modal__overlay {
- .apos-modal__inner .apos-confirm & {
+ .apos-modal + .apos-confirm & {
display: block;
}
}
| 5 |
diff --git a/README.md b/README.md @@ -66,7 +66,7 @@ Note that you will also need to do an npm install in the main example (`examples
since the npm start command tries to build and run that example.
cd examples/layer-browser
- npm install
+ npm install # or yarn
cd ../..
Note that `npm start` in the main directory actually runs `examples/main`.
| 0 |
diff --git a/package.json b/package.json "safe-compare": "^1.1.2",
"sanitizer": "^0.1.3",
"save": "^2.3.2",
- "socket.io": "2.1.1",
- "socket.io-client": "2.1.1",
+ "socket.io": "1.7.4",
+ "socket.io-client": "1.7.4",
"threads": "^0.10.1",
"tweetnacl": "^1.0.0",
"uuid": "^3.2.1",
| 13 |
diff --git a/tasks/stats.js b/tasks/stats.js @@ -142,7 +142,10 @@ function getMainBundleInfo() {
'',
constants.partialBundlePaths.map(makeBundleHeaderInfo).join('\n'),
'',
- 'Starting in `v1.39.0`, each plotly.js partial bundle has a corresponding npm package with no dependencies.'
+ 'Starting in `v1.39.0`, each plotly.js partial bundle has a corresponding npm package with no dependencies.',
+ '',
+ 'Starting in `v1.50.0`, the minified version of each partial bundle is also published to npm in a separate "dist min" package.',
+ ''
];
}
@@ -209,6 +212,13 @@ function makeBundleInfo(pathObj) {
'var Plotly = require(\'' + pkgName + '\');',
'```',
'',
+ '#### dist min npm package (starting in `v1.50.0`)',
+ '',
+ 'Install [`' + pkgName + '-min`](https://www.npmjs.com/package/' + pkgName + '-min) with',
+ '```',
+ 'npm install ' + pkgName + '-min',
+ '```',
+ '',
'#### Other plotly.js entry points',
'',
'| Flavor | Location |',
| 0 |
diff --git a/aleph/analyze/corasick_entity.py b/aleph/analyze/corasick_entity.py @@ -17,6 +17,7 @@ class AutomatonCache(object):
def __init__(self):
self.latest = None
+ self.automaton = Automaton()
self.matches = {}
def generate(self):
@@ -25,7 +26,6 @@ class AutomatonCache(object):
def _generate(self):
latest = Entity.latest()
- self.automaton = Automaton()
if latest is None:
return
if self.latest is not None and self.latest >= latest:
| 12 |
diff --git a/client/src/components/Feed/utils.js b/client/src/components/Feed/utils.js @@ -5,9 +5,9 @@ export const authorProfileLink = (post) =>
post.author.type === INDIVIDUAL_AUTHOR_TYPE ? "profile" : "organisation"
}/${post.author.id}`;
-export const buildLocationString = ({ city, country }) => {
+export const buildLocationString = ({ city = "", country }) => {
const MAX_LENGTH = 26;
if (city.length >= MAX_LENGTH)
return `${city.substring(0, MAX_LENGTH - 3)}..., ${country}`;
- return `${city}, ${country}`;
+ return city ? `${city}, ${country}` : country;
};
| 9 |
diff --git a/articles/quickstart/native/wpf-winforms/01-login.md b/articles/quickstart/native/wpf-winforms/01-login.md @@ -52,6 +52,7 @@ The returned login result will indicate whether authentication was successful, a
You can check the `IsError` property of the result to see whether the login has failed. The `ErrorMessage` will contain more information regarding the error which occurred.
```csharp
+Form1.cs
var loginResult = await client.LoginAsync();
if (loginResult.IsError)
@@ -65,6 +66,7 @@ if (loginResult.IsError)
On successful login, the login result will contain the `id_token` and `access_token` in the `IdentityToken` and `AccessToken` properties respectively.
```csharp
+Form1.cs
var loginResult = await client.LoginAsync();
if (!loginResult.IsError)
@@ -81,6 +83,7 @@ On successful login, the login result will contain the user information in the `
To obtain information about the user, you can query the claims. You can for example obtain the user's name and email address from the `name` and `email` claims:
```csharp
+Form1.cs
if (!loginResult.IsError)
{
Debug.WriteLine($"name: {loginResult.User.FindFirst(c => c.Type == "name")?.Value}");
@@ -95,6 +98,7 @@ The exact claims returned will depend on the scopes that were requested. For mor
You can obtain a list of all the claims contained in the `id_token` by iterating through the `Claims` collection:
```csharp
+Form1.cs
if (!loginResult.IsError)
{
foreach (var claim in loginResult.User.Claims)
| 0 |
diff --git a/token-metadata/0x9A48BD0EC040ea4f1D3147C025cd4076A2e71e3e/metadata.json b/token-metadata/0x9A48BD0EC040ea4f1D3147C025cd4076A2e71e3e/metadata.json "symbol": "USD++",
"address": "0x9A48BD0EC040ea4f1D3147C025cd4076A2e71e3e",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/packages/reactotron-app/rebuild.sh b/packages/reactotron-app/rebuild.sh @@ -22,25 +22,25 @@ codesign -s "Developer ID Application: Steve Kellock (J9982RF89V)" -vvv --deep -
cd release
# 32 bit windows
-# cd win32-ia32
-# mv Reactotron-win32-ia32 Reactotron
-# zip -r Reactotron-win32-ia32.zip Reactotron
-# mv Reactotron-win32-ia32.zip ../
+cd win32-ia32
+mv Reactotron-win32-ia32 Reactotron
+zip -r Reactotron-win32-ia32.zip Reactotron
+mv Reactotron-win32-ia32.zip ../
# cd ../
#
# # 64 bit windows
-# cd win32-x64
-# mv Reactotron-win32-x64 Reactotron
-# zip -r Reactotron-win32-x64.zip Reactotron
-# mv Reactotron-win32-x64.zip ../
+cd win32-x64
+mv Reactotron-win32-x64 Reactotron
+zip -r Reactotron-win32-x64.zip Reactotron
+mv Reactotron-win32-x64.zip ../
# cd ..
#
# # 32 bit linux
-# cd linux-ia32
-# mv Reactotron-linux-ia32 Reactotron
-# zip -r Reactotron-linux-ia32.zip Reactotron
-# mv Reactotron-linux-ia32.zip ../
-# cd ..
+cd linux-ia32
+mv Reactotron-linux-ia32 Reactotron
+zip -r Reactotron-linux-ia32.zip Reactotron
+mv Reactotron-linux-ia32.zip ../
+cd ..
# 64 bit linux
cd linux-x64
| 13 |
diff --git a/_data/conferences.yml b/_data/conferences.yml note: Mandatory abstract deadline on Dec 14, 2021. More info <a href='https://facctconference.org/2022/cfp.html'>here</a>.
- title: CHIL
- year: 2022
- id: chil22
+ year: 2023
+ id: chil23
link: https://www.chilconference.org/
- deadline: '2022-01-14 23:59:59'
+ deadline: '2023-02-03 23:59:59'
timezone: UTC-12
- place: Online
- date: April 7-8, 2022
- start: 2022-04-07
- end: 2022-04-08
- paperslink: https://www.chilconference.org/2021/proceedings.html
+ place: Cambridge, Massachusetts, USA
+ date: June 22-24, 2023
+ start: 2023-06-22
+ end: 2023-06-24
+ paperslink: https://proceedings.mlr.press/v174/
hindex: -1
sub: ML
- note: Recommended abstract deadline on Jan 10, 2021. More info <a href='https://www.chilconference.org'>here</a>.
- title: NAACL
year: 2022
| 3 |
diff --git a/docs/unstable_api.md b/docs/unstable_api.md These methods and classes are useful in some special cases but are not stable and can change at any moment.
-## bot._chunkColumn(x, z)
-
-Return the column at `x` and `y`. A column has :
-
- * a `blockType`
- * a `light`
- * a `skylight`
- * a `biome`
-
-`blockType`, `light` and `skylight` are arrays of size 16.
-
## bot._client
`bot._client` is created using [node-minecraft-protocol](https://github.com/PrismarineJS/node-minecraft-protocol).
| 2 |
diff --git a/js/webviewMenu.js b/js/webviewMenu.js var Menu, MenuItem, clipboard // these are only loaded when the menu is shown
var webviewMenu = {
+ lastDisplayedAt: 0,
showMenu: function (data) { // data comes from a context-menu event
if (!Menu || !MenuItem || !clipboard) {
Menu = remote.Menu
@@ -134,7 +135,7 @@ var webviewMenu = {
}))
}
- if (data.editFlags.canPaste) {
+ if (data.editFlags && data.editFlags.canPaste) {
clipboardActions.push(new MenuItem({
label: 'Paste',
click: function () {
@@ -186,9 +187,22 @@ var webviewMenu = {
})
menu.popup(remote.getCurrentWindow())
+
+ webviewMenu.lastDisplayedAt = Date.now()
}
}
bindWebviewEvent('context-menu', function (e, data) {
+ /* if the shift key was pressed and the page does not have a custom context menu, both the contextmenu and context-menu events will fire. To avoid showing a menu twice, we check if a menu has just been dismissed before this event occurs.
+ Note: this only works if the contextmenu event fires before the context-menu one, which may change in future Electron versions. */
+ if (Date.now() - webviewMenu.lastDisplayedAt > 5) {
webviewMenu.showMenu(data)
+ }
}, true) // only available on webContents
+
+/* this runs when the shift key is pressed to override a custom context menu */
+bindWebviewEvent('contextmenu', function (e) {
+ if (e.shiftKey) {
+ webviewMenu.showMenu({})
+ }
+})
| 11 |
diff --git a/modules/Cockpit/Controller/Accounts.php b/modules/Cockpit/Controller/Accounts.php @@ -43,10 +43,11 @@ class Accounts extends \Cockpit\AuthController {
$uid = null;
$account = ["user"=>"", "email"=>"", "active"=>true, "group"=>"admin", "i18n"=>$this->app->helper("i18n")->locale];
+ $fields = $this->app->retrieve('config/account/fields', null);
$languages = $this->getLanguages();
$groups = $this->module('cockpit')->getGroups();
- return $this->render('cockpit:views/accounts/account.php', compact('account', 'uid', 'languages', 'groups'));
+ return $this->render('cockpit:views/accounts/account.php', compact('account', 'uid', 'languages', 'groups', 'fields'));
}
public function save() {
| 1 |
diff --git a/components/mapbox/ban-map/index.js b/components/mapbox/ban-map/index.js @@ -59,7 +59,9 @@ function BanMap({map, isSourceLoaded, popup, address, setSources, setLayers, onS
const centerAddress = () => {
if (address) {
- map.fitBounds(address.displayBBox)
+ map.fitBounds(address.displayBBox, {
+ padding: 30
+ })
}
}
| 0 |
diff --git a/tools/scripts/npm_publish b/tools/scripts/npm_publish @@ -385,7 +385,11 @@ update_version() {
echo 'Updating project version...' >&2
echo "Current version: ${current_version}" >&2
echo "Release version: ${release_version}" >&2
+ if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s/${current_version}/${release_version}/" "${package_json}"
+ else
+ sed -i "s/${current_version}/${release_version}/" "${package_json}"
+ fi
if [[ "$?" -ne 0 ]]; then
echo '' >&2
echo 'Error: unexpected error. Encountered an error when updating project version.' >&2
| 9 |
diff --git a/src/module/rules.js b/src/module/rules.js @@ -224,7 +224,6 @@ export default function (engine) {
"calculateNpcXp",
"calculateClasses",
"calculateNpcAbilityValue",
- { closure: "calculateArmorModifiers", stackModifiers: "stackModifiers" },
{ closure: "calculateAbilityCheckModifiers", stackModifiers: "stackModifiers"}
]
},
| 2 |
diff --git a/README.md b/README.md @@ -37,6 +37,7 @@ system, and use hooks to execute any command you need to test, build, and/or pub
- [Installation](#installation)
- [Usage](#usage)
+- [Dry Run](#dry-run)
- [Configuration](#configuration)
- [Interactive vs. CI mode](#interactive-vs-ci-mode)
- [Latest version](#latest-version)
@@ -115,14 +116,17 @@ Release a new version:
release-it
```
-You will be prompted to select the new version, and more questions will follow based on your setup. For a "dry run" (to
-show the interactivity and the commands it _would_ execute):
+You will be prompted to select the new version, and more questions will follow based on your setup.
+
+## Dry Run
+
+To show the interactivity and the commands it _would_ execute:
```bash
release-it --dry-run
```
-Note: read-only commands are still executed (`$ ...`), while the rest is not (`! ...`):
+Note: read-only commands are still executed (`$ ...`), while potentially writing/mutating commands are not (`! ...`):
```bash
$ git rev-parse --git-dir
@@ -352,6 +356,7 @@ Since v11, release-it can be extended in many, many ways. Here are some plugins:
| [release-it-yarn-workspaces](https://github.com/rwjblue/release-it-yarn-workspaces) | Releases each of your projects configured workspaces |
| [release-it-calver-plugin](https://github.com/casmith/release-it-calver-plugin) | Enables Calendar Versioning (calver) with release-it |
| [@grupoboticario/news-fragments](https://github.com/grupoboticario/news-fragments) | An easy way to generate your changelog file |
+| [@j-ulrich/release-it-regex-bumper](https://github.com/j-ulrich/release-it-regex-bumper) | Regular expression based version read/write plugin for release-it |
Internally, release-it uses its own plugin architecture (for Git, GitHub, GitLab, npm).
@@ -380,7 +385,7 @@ Use `--disable-metrics` to opt-out of sending some anonymous statistical data to
- With `release-it -VV`, release-it also prints every internal command and its output.
- Prepend `DEBUG=release-it:* release-it [...]` to print configuration and more error details.
-Use `verbose: 2` to have the equivalent of `-VV` on the command line in a configuration file.
+Use `verbose: 2` in a configuration file to have the equivalent of `-VV` on the command line.
## Use release-it programmatically
| 7 |
diff --git a/test/unit/@node-red/runtime/lib/api/diagnostics_spec.js b/test/unit/@node-red/runtime/lib/api/diagnostics_spec.js @@ -33,6 +33,11 @@ describe("runtime-api/diagnostics", function() {
flowFile: "flows.json",
mqttReconnectTime: 321,
serialReconnectTime: 432,
+ socketReconnectTime: 2222,
+ socketTimeout: 3333,
+ tcpMsgQueueSize: 4444,
+ inboundWebSocketTimeout: 5555,
+ runtimeState: {enabled: true, ui: false},
adminAuth: {},//should be sanitised to "SET"
httpAdminRoot: "/admin/root/",
httpAdminCors: {},//should be sanitised to "SET"
@@ -45,6 +50,7 @@ describe("runtime-api/diagnostics", function() {
uiHost: "something.secret.com",//should be sanitised to "SET"
uiPort: 1337,//should be sanitised to "SET"
userDir: "/var/super/secret/",//should be sanitised to "SET",
+ nodesDir: "/var/super/secret/",//should be sanitised to "SET",
contextStorage: {
default : { module: "memory" },
file: { module: "localfilesystem" },
@@ -73,8 +79,9 @@ describe("runtime-api/diagnostics", function() {
//result.runtime.xxxxx
const runtimeCount = Object.keys(result.runtime).length;
- runtimeCount.should.eql(4);//ensure no more than 4 keys are present in runtime
+ runtimeCount.should.eql(5);//ensure 5 keys are present in runtime
result.runtime.should.have.property('isStarted',true)
+ result.runtime.should.have.property('flows')
result.runtime.should.have.property('modules').type("object");
result.runtime.should.have.property('settings').type("object");
result.runtime.should.have.property('version','7.7.7');
@@ -87,7 +94,7 @@ describe("runtime-api/diagnostics", function() {
//result.runtime.settings.xxxxx
const settingsCount = Object.keys(result.runtime.settings).length;
- settingsCount.should.eql(21);//ensure no more than the 21 settings listed below are present in the settings object
+ settingsCount.should.eql(27);//ensure no more than the 21 settings listed below are present in the settings object
result.runtime.settings.should.have.property('available',true);
result.runtime.settings.should.have.property('apiMaxLength', "UNSET");//deliberately disabled to ensure UNSET is returned
result.runtime.settings.should.have.property('debugMaxLength', 1111);
@@ -96,6 +103,11 @@ describe("runtime-api/diagnostics", function() {
result.runtime.settings.should.have.property('flowFile', "flows.json");
result.runtime.settings.should.have.property('mqttReconnectTime', 321);
result.runtime.settings.should.have.property('serialReconnectTime', 432);
+ result.runtime.settings.should.have.property('socketReconnectTime', 2222);
+ result.runtime.settings.should.have.property('socketTimeout', 3333);
+ result.runtime.settings.should.have.property('tcpMsgQueueSize', 4444);
+ result.runtime.settings.should.have.property('inboundWebSocketTimeout', 5555);
+ result.runtime.settings.should.have.property('runtimeState', {enabled: true, ui: false});
result.runtime.settings.should.have.property("adminAuth", "SET"); //should be sanitised to "SET"
result.runtime.settings.should.have.property("httpAdminCors", "SET"); //should be sanitised to "SET"
result.runtime.settings.should.have.property('httpAdminRoot', "/admin/root/");
@@ -109,6 +121,7 @@ describe("runtime-api/diagnostics", function() {
result.runtime.settings.should.have.property("uiPort", "SET"); //should be sanitised to "SET"
result.runtime.settings.should.have.property("userDir", "SET"); //should be sanitised to "SET"
result.runtime.settings.should.have.property('contextStorage').type("object");
+ result.runtime.settings.should.have.property('nodesDir', "SET")
//result.runtime.settings.contextStorage.xxxxx
const contextCount = Object.keys(result.runtime.settings.contextStorage).length;
| 3 |
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js @@ -3,7 +3,6 @@ import moment from 'moment';
import _ from 'underscore';
import lodashGet from 'lodash/get';
import ExpensiMark from 'expensify-common/lib/ExpensiMark';
-import Str from 'expensify-common/lib/str';
import Onyx from 'react-native-onyx';
import ONYXKEYS from '../../ONYXKEYS';
import * as Pusher from '../Pusher/pusher';
@@ -1262,7 +1261,7 @@ function editReportComment(reportID, originalReportAction, textForNewComment) {
const actionToMerge = {};
newReportAction.message[0].isEdited = true;
newReportAction.message[0].html = htmlForNewComment;
- newReportAction.message[0].text = Str.stripHTML(htmlForNewComment.replace(/((<br[^>]*>)+)/gi, ' '));
+ newReportAction.message[0].text = parser.htmlToText(htmlForNewComment);
actionToMerge[sequenceNumber] = newReportAction;
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, actionToMerge);
| 14 |
diff --git a/templates/master/elasticsearch/metricfirehose.js b/templates/master/elasticsearch/metricfirehose.js @@ -2,7 +2,6 @@ module.exports={
"MetricFirehose": {
"Type" : "AWS::KinesisFirehose::DeliveryStream",
"Properties" : {
- "DeliveryStreamName" : "qna-Metrics",
"DeliveryStreamType" : "DirectPut",
"ElasticsearchDestinationConfiguration" : {
"BufferingHints" : {
@@ -68,12 +67,8 @@ module.exports={
}
]
},
- "Path": "/"
- }
- },
- "FirehosePutS3PutES":{
- "Type" : "AWS::IAM::Policy",
- "Properties" : {
+ "Path": "/",
+ "Policies": [ {
"PolicyDocument" : {
"Version": "2012-10-17",
"Statement": [
@@ -177,8 +172,8 @@ module.exports={
}
]
},
- "PolicyName" : "PutQnAMetricsFirehose",
- "Roles" : [{"Ref":"FirehoseESS3Role"}]
+ "PolicyName" : "PutQnAMetricsFirehose"
+ }]
}
}
}
| 2 |
diff --git a/screenshot.js b/screenshot.js @@ -7,8 +7,8 @@ import wbn from './wbn.js';
import * as icons from './icons.js';
import './gif.js';
-const width = 512;
-const height = 512;
+const defaultWidth = 512;
+const defaultHeight = 512;
const cameraPosition = new THREE.Vector3(0, 1, -2);
const cameraTarget = new THREE.Vector3(0, 0, 0);
const FPS = 60;
@@ -23,7 +23,7 @@ const _makePromise = () => {
p.reject = reject;
return p;
};
-const _makeRenderer = () => {
+const _makeRenderer = (width, height) => {
const renderer = new THREE.WebGLRenderer({
alpha: true,
antialias: true,
@@ -128,9 +128,7 @@ const _makeUiRenderer = () => {
},
};
};
-const _makeIconString = (hash, ext) => {
- const w = width;
- const h = height;
+const _makeIconString = (hash, ext, w, h) => {
const icon = {
'gltf': icons.vrCardboard,
'glb': icons.vrCardboard,
@@ -220,7 +218,15 @@ const _makeIconString = (hash, ext) => {
toggleElements(false);
const screenshotResult = document.getElementById('screenshot-result');
- let {url, hash, ext, type, dst} = parseQuery(decodeURIComponent(window.location.search));
+ let {url, hash, ext, type, width, height, dst} = parseQuery(decodeURIComponent(window.location.search));
+ width = parseInt(width, 10);
+ if (isNaN(width)) {
+ width = defaultWidth;
+ }
+ height = parseInt(height, 10);
+ if (isNaN(height)) {
+ height = defaultHeight;
+ }
const isVrm = ext === 'vrm';
const isImage = ['png', 'jpg'].includes(ext);
const isVideo = type === 'webm';
@@ -365,7 +371,7 @@ const _makeIconString = (hash, ext) => {
const _renderDefaultCanvas = async () => {
const uiRenderer = _makeUiRenderer();
- const htmlString = _makeIconString(hash, ext);
+ const htmlString = _makeIconString(hash, ext, width, height);
const result = await uiRenderer.render(htmlString, width, height);
const {data, anchors} = result;
const canvas = document.createElement('canvas');
@@ -377,7 +383,7 @@ const _makeIconString = (hash, ext) => {
};
if (['glb', 'vrm', 'vox', 'wbn'].includes(ext)) {
- const {renderer, scene, camera} = _makeRenderer();
+ const {renderer, scene, camera} = _makeRenderer(width, height);
let o;
try {
@@ -587,7 +593,7 @@ const _makeIconString = (hash, ext) => {
result: arrayBuffer,
}, '*', [arrayBuffer]);
} else if (type === 'gif' && ext !== 'gif') {
- const {renderer, scene, camera} = _makeRenderer();
+ const {renderer, scene, camera} = _makeRenderer(width, height);
const o = await (async () => {
switch (ext) {
@@ -672,7 +678,7 @@ const _makeIconString = (hash, ext) => {
result: arrayBuffer,
}, '*', [arrayBuffer]);
} else if (type === 'webm') {
- const {renderer, scene, camera} = _makeRenderer();
+ const {renderer, scene, camera} = _makeRenderer(width, height);
const o = await (async () => {
switch (ext) {
| 0 |
diff --git a/network.js b/network.js @@ -901,11 +901,13 @@ function handleJoint(ws, objJoint, bSaved, callbacks){
assocUnitsInWork[unit] = true;
var validate = function(){
+ mutex.lock(['handleJoint'], function(unlock){
validation.validate(objJoint, {
ifUnitError: function(error){
console.log(objJoint.unit.unit+" validation failed: "+error);
callbacks.ifUnitError(error);
// throw Error(error);
+ unlock();
purgeJointAndDependenciesAndNotifyPeers(objJoint, error, function(){
delete assocUnitsInWork[unit];
});
@@ -917,6 +919,7 @@ function handleJoint(ws, objJoint, bSaved, callbacks){
ifJointError: function(error){
callbacks.ifJointError(error);
// throw Error(error);
+ unlock();
db.query(
"INSERT INTO known_bad_joints (joint, json, error) VALUES (?,?,?)",
[objectHash.getJointHash(objJoint), JSON.stringify(objJoint), error],
@@ -931,6 +934,7 @@ function handleJoint(ws, objJoint, bSaved, callbacks){
},
ifTransientError: function(error){
throw Error(error);
+ unlock();
console.log("############################## transient error "+error);
delete assocUnitsInWork[unit];
},
@@ -941,14 +945,19 @@ function handleJoint(ws, objJoint, bSaved, callbacks){
callbacks.ifNeedHashTree();
// we are not saving unhandled joint because we don't know dependencies
delete assocUnitsInWork[unit];
+ unlock();
+ },
+ ifNeedParentUnits: function(arrMissingUnits){
+ callbacks.ifNeedParentUnits(arrMissingUnits);
+ unlock();
},
- ifNeedParentUnits: callbacks.ifNeedParentUnits,
ifOk: function(objValidationState, validation_unlock){
if (objJoint.unsigned)
throw Error("ifOk() unsigned");
writer.saveJoint(objJoint, objValidationState, null, function(){
validation_unlock();
callbacks.ifOk();
+ unlock();
if (ws)
writeEvent((objValidationState.sequence !== 'good') ? 'nonserial' : 'new_good', ws.host);
notifyWatchers(objJoint, ws);
@@ -960,9 +969,11 @@ function handleJoint(ws, objJoint, bSaved, callbacks){
if (!objJoint.unsigned)
throw Error("ifOkUnsigned() signed");
callbacks.ifOkUnsigned();
+ unlock();
eventBus.emit("validated-"+unit, bSerial);
}
});
+ });
};
joint_storage.checkIfNewJoint(objJoint, {
| 9 |
diff --git a/articles/api/management/v2/tokens-flows.md b/articles/api/management/v2/tokens-flows.md @@ -73,7 +73,7 @@ To generate a token follow the next steps:
"typ": "JWT"
}
```
-4. Delete the dummy claims from the _Payload_ and add the following claims: `iss`, `aud`, `scope`, `iat`, `exp`, `jti`.
+4. Delete the dummy claims from the _Payload_ and add the following claims: `iss`, `aud`, `scope`, `iat`, `exp`.
```json
{
@@ -81,8 +81,7 @@ To generate a token follow the next steps:
"aud": "YOUR_GLOBAL_CLIENT_ID",
"scope": "SPACE-SEPARATED-LIST-OF-SCOPES",
"iat": CURRENT_TIMESTAMP,
- "exp": EXPIRY_TIME,
- "jti": "UNIQUE_JWT_ID"
+ "exp": EXPIRY_TIME
}
```
@@ -98,8 +97,6 @@ To generate a token follow the next steps:
- __exp__: The time at which the token will expire. It must be a number containing a `NumericDate` value, for example `1518808520` (which maps to `Fri, 16 Feb 2018 19:15:20 GMT`).
- - __jti__: The token's unique ID. Without this claim you will not be able to revoke the token, in case it gets compromised. This value must be unique.
-
5. As you type the token on the left hand editor is automatically refreshed. When you are done copy this value.
### Use a Library
@@ -118,8 +115,7 @@ To generate a token follow the next steps:
globalClientSecret,
{ //options
algorithm: 'HS256',
- expiresIn: '1y',
- jwtid: currentTimestamp.toString()
+ expiresIn: '1y'
}
);
@@ -132,39 +128,6 @@ To generate a token follow the next steps:
- The audience (claim `aud`) is the __Global Client Id__ (you can find this value at [Advanced Account Settings](${manage_url}/#/account/advanced)).
- - The token needs to have the `jti` claim set. The reason is that without this you will not be able to revoke it in case it gets compromised. The claim is set with the `jwtid` option, for this library. In this example, we use the current timestamp (`jwtid: currentTimestamp.toString()`). You have to make sure that this value is unique.
-
- We want this token in order to call the [Get all clients](/api/management/v2#!/Clients/get_clients) so we only asked for the scopes required by this endpoint: `read:clients read:client_keys`.
- The token expires in one year (`expiresIn: '1y'`).
-
-### How to revoke this token
-
-If the token has been compromised, you can blacklist it using the [Blacklist endpoint of the Management APIv2](/api/management/v2#!/Blacklists/post_tokens). The steps to follow are:
-
-1. Get a Management APIv2 token (either by Auth0 or create it yourself) that includes the `blacklist:tokens` scope.
-
-1. Call the [Blacklist endpoint of the Management APIv2](/api/management/v2#!/Blacklists/post_tokens).
-
-```har
-{
- "method": "POST",
- "url": "https://${account.namespace}/api/v2/blacklists/tokens",
- "headers": [
- { "name": "Content-Type", "value": "application/json" },
- { "name": "Authorization", "value": "Bearer YOUR_ACCESS_TOKEN" }
- ],
- "postData": {
- "mimeType": "application/json",
- "text": "{\"aud\":\"THE_TOKEN_AUDIENCE\",\"jti\": \"THE_TOKEN_ID\"}"
- }
-}
-```
-
-The request parameters are:
-
-- `aud`: The audience of the token you want to blacklist. For this case, it is your __Global Client Id__.
-
-- `jti`: The unique ID of the token you want to blacklist. You should set this to the same value you used when you created your token.
-
-Note that you should set the Management APIv2 token you got at the first step, at the `Authorization` header.
| 2 |
diff --git a/deepfence_backend/utils/helper.py b/deepfence_backend/utils/helper.py @@ -314,9 +314,34 @@ def get_topology_network_graph(topology_nodes):
graph = nx.DiGraph()
if not topology_nodes:
return graph
+ needed_nodes = {}
for node_id, node_details in topology_nodes.items():
+ if "is_ui_vm" in node_details:
+ if node_details.get("is_ui_vm") is True:
+ continue
+ else:
+ is_ui_vm = False
+ for metadata in node_details.get("metadata", []):
+ if metadata["id"] == "is_ui_vm":
+ if metadata["value"] == "true":
+ is_ui_vm = True
+ break
+ if is_ui_vm:
+ continue
+ node_name = node_details.get("name", node_details.get("label"))
+ if node_details.get("pseudo", False):
+ if node_name != "The Internet":
+ continue
+ needed_nodes[node_id] = node_name
+ for node_id, node_details in topology_nodes.items():
+ if node_id not in needed_nodes:
+ continue
graph.add_node(node_id)
for adj_node_id in node_details.get("adjacency", []):
+ if adj_node_id == node_id:
+ continue
+ if adj_node_id not in needed_nodes:
+ continue
if not graph.has_node(adj_node_id):
graph.add_node(adj_node_id)
graph.add_edge(node_id, adj_node_id)
| 8 |
diff --git a/packages/app/src/components/Page/TagsInput.tsx b/packages/app/src/components/Page/TagsInput.tsx @@ -4,7 +4,6 @@ import React, {
import { AsyncTypeahead } from 'react-bootstrap-typeahead';
-import { toastError } from '~/client/util/apiNotification';
import { useSWRxTagsSearch } from '~/stores/tag';
type TypeaheadInstance = {
@@ -26,9 +25,9 @@ const TagsInput: FC<Props> = (props: Props) => {
const [resultTags, setResultTags] = useState<string[]>([]);
const [searchQuery, setSearchQuery] = useState('');
- const { data: tagsSearchData, error } = useSWRxTagsSearch(searchQuery);
+ const { data: tagsSearch, error } = useSWRxTagsSearch(searchQuery);
- const isLoading = error == null && tagsSearchData === undefined;
+ const isLoading = error == null && tagsSearch === undefined;
const changeHandler = useCallback((selected: string[]) => {
if (props.onTagsUpdated != null) {
@@ -37,10 +36,13 @@ const TagsInput: FC<Props> = (props: Props) => {
}, [props]);
const searchHandler = useCallback(async(query: string) => {
+ const tagsSearchData = tagsSearch?.tags || [];
setSearchQuery(query);
- tagsSearchData?.tags.unshift(searchQuery);
- setResultTags(Array.from(new Set(tagsSearchData?.tags)));
- }, [searchQuery, tagsSearchData?.tags]);
+
+ tagsSearchData.unshift(searchQuery);
+ setResultTags(Array.from(new Set(tagsSearchData)));
+
+ }, [searchQuery, tagsSearch?.tags]);
const keyDownHandler = useCallback((event: React.KeyboardEvent) => {
if (event.key === ' ') {
| 12 |
diff --git a/src/protocol/requests/fetch/index.js b/src/protocol/requests/fetch/index.js @@ -18,8 +18,8 @@ const versions = {
return { request: request({ replicaId, maxWaitTime, minBytes, topics }), response }
},
3: ({ replicaId = REPLICA_ID, maxWaitTime, minBytes, maxBytes, topics }) => {
- const request = require('./v2/request')
- const response = require('./v2/response')
+ const request = require('./v3/request')
+ const response = require('./v3/response')
return { request: request({ replicaId, maxWaitTime, minBytes, maxBytes, topics }), response }
},
}
| 1 |
diff --git a/tsconfig.json b/tsconfig.json "noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "lib",
+ "rootDir": "src",
"strictNullChecks": true,
"strictPropertyInitialization": false,
"strict": true
| 12 |
diff --git a/src/utils.js b/src/utils.js @@ -125,6 +125,9 @@ function params (url) {
const escapeCommandArguments = (o) => {
if(vscode.version < "1.30.0") {
return JSON.stringify(o).replace(/"/g, '"');
+ }
+ if (os.platform()) == 'win32') {
+ return JSON.stringify(o).replace(/\\\\/g, "\/")
}
return JSON.stringify(o)
}
| 14 |
diff --git a/includes/Modules/Site_Verification.php b/includes/Modules/Site_Verification.php @@ -390,28 +390,28 @@ final class Site_Verification extends Module implements Module_With_Scopes {
*
* @since 1.1.0
* @since 1.1.2 Runs on `admin_action_googlesitekit_proxy_setup` and no longer redirects directly.
- * @since n.e.x.t Token and type are now passed as arguments.
+ * @since n.e.x.t Token and method are now passed as arguments.
*
- * @param string $verification_token Verification token.
- * @param string $verification_type Verification method type.
+ * @param string $token Verification token.
+ * @param string $method Verification method type.
*/
- private function handle_verification_token( $verification_token, $verification_type ) {
- switch ( $verification_type ) {
+ private function handle_verification_token( $token, $method ) {
+ switch ( $method ) {
case self::VERIFICATION_TYPE_FILE:
- $this->authentication->verification_file()->set( $verification_token );
+ $this->authentication->verification_file()->set( $token );
break;
case self::VERIFICATION_TYPE_META:
- $this->authentication->verification_meta()->set( $verification_token );
+ $this->authentication->verification_meta()->set( $token );
}
add_filter(
'googlesitekit_proxy_setup_url_params',
- function ( $params ) use ( $verification_type ) {
+ function ( $params ) use ( $method ) {
return array_merge(
$params,
array(
'verify' => 'true',
- 'verification_method' => $verification_type,
+ 'verification_method' => $method,
)
);
}
| 10 |
diff --git a/pages/blog/index.js b/pages/blog/index.js @@ -23,9 +23,9 @@ function BlogIndex({posts}) {
}
}, [filters])
- const removeTag = tag => {
+ const removeTag = useCallback(tag => {
setFilters(filters.filter(t => t !== tag))
- }
+ }, [filters])
const resetFilter = () => {
setFilteredPosts(posts)
| 0 |
diff --git a/modules/statistics/RTPStatsCollector.js b/modules/statistics/RTPStatsCollector.js @@ -3,6 +3,7 @@ import { getLogger } from '@jitsi/logger';
import { MediaType } from '../../service/RTC/MediaType';
import * as StatisticsEvents from '../../service/statistics/Events';
import browser from '../browser';
+import FeatureFlags from '../flags/FeatureFlags';
const GlobalOnErrorHandler = require('../util/GlobalOnErrorHandler');
@@ -309,12 +310,39 @@ StatsCollector.prototype._processAndEmitReport = function() {
videoCodec = ssrcStats.codec;
}
+ if (FeatureFlags.isSourceNameSignalingEnabled()) {
+ const sourceName = track.getSourceName();
+
+ if (sourceName) {
+ const resolution = ssrcStats.resolution;
+
+ if (resolution.width // eslint-disable-line max-depth
+ && resolution.height
+ && resolution.width !== -1
+ && resolution.height !== -1) {
+ resolutions[sourceName] = resolution;
+ }
+ if (ssrcStats.framerate !== 0) { // eslint-disable-line max-depth
+ framerates[sourceName] = ssrcStats.framerate;
+ }
+ if (audioCodec && videoCodec) { // eslint-disable-line max-depth
+ const codecDesc = {
+ 'audio': audioCodec,
+ 'video': videoCodec
+ };
+
+ codecs[sourceName] = codecDesc;
+ }
+ } else {
+ logger.error(`No source name returned by ${track}`);
+ }
+ } else {
const participantId = track.getParticipantId();
if (participantId) {
const resolution = ssrcStats.resolution;
- if (resolution.width
+ if (resolution.width // eslint-disable-line max-depth
&& resolution.height
&& resolution.width !== -1
&& resolution.height !== -1) {
@@ -323,13 +351,13 @@ StatsCollector.prototype._processAndEmitReport = function() {
userResolutions[ssrc] = resolution;
resolutions[participantId] = userResolutions;
}
- if (ssrcStats.framerate !== 0) {
+ if (ssrcStats.framerate !== 0) { // eslint-disable-line max-depth
const userFramerates = framerates[participantId] || {};
userFramerates[ssrc] = ssrcStats.framerate;
framerates[participantId] = userFramerates;
}
- if (audioCodec && videoCodec) {
+ if (audioCodec && videoCodec) { // eslint-disable-line max-depth
const codecDesc = {
'audio': audioCodec,
'video': videoCodec
@@ -344,6 +372,7 @@ StatsCollector.prototype._processAndEmitReport = function() {
logger.error(`No participant ID returned by ${track}`);
}
}
+ }
ssrcStats.resetBitrate();
}
| 1 |
diff --git a/src/inner-slider.js b/src/inner-slider.js @@ -271,12 +271,6 @@ export var InnerSlider = createReactClass({
if (this.props.unslick) {
listProps = { className: 'slick-list' }
innerSliderProps = { className }
- trackProps.trackStyle = {
- ...trackProps.trackStyle,
- transform: '',
- WebkitTransform: '',
- msTransform: ''
- }
}
return (
| 2 |
diff --git a/package.json b/package.json {
"name": "prettier-atom",
"main": "./dist/main.js",
- "version": "0.43.1",
+ "version": "0.44.0",
"description": "Atom plugin for formatting JavaScript using prettier with (optional) prettier-eslint integration",
"keywords": [
"atom",
| 6 |
diff --git a/lib/responder.js b/lib/responder.js @@ -599,133 +599,6 @@ MultipartDispatcher.prototype.objectStream = function dispatchMultipartObjectStr
part end 2
finish
*/
-// function QueuedReader(options, logger, itemsTransform) {
-// if (!(this instanceof QueuedReader)) {
-// return new QueuedReader(options, logger, itemsTransform);
-// }
-// stream.Readable.call(this, options);
-
-// var self = this;
-
-// this.itemsTransform = itemsTransform;
-// this.logger = logger;
-
-// this.minWriters = 5;
-// this.maxItems = 10;
-
-// this.readerQueue = new FifoQueue(10);
-// this.writerQueue = new FifoQueue(this.minWriters);
-// this.itemQueue = new FifoQueue(this.maxItems);
-
-// this.isReading = true;
-// this.queueDone = false;
-
-// this.addItems = function queuedReaderAddItems(data) {
-// self.writerQueue.removeFirst();
-
-// self.logger.debug('concatenated item');
-
-// var itemQueue = self.itemQueue;
-// var beforeLength = itemQueue.length();
-
-// self.itemsTransform(data);
-
-// if (beforeLength < itemQueue.length()) {
-// if (beforeLength === 0) {
-// self.emit('readable');
-// }
-// if (self.isReading || isLast) {
-// logger.debug('writing first item');
-// self.isReading = self.push(itemQueue.pollFirst());
-// }
-// }
-
-// self.nextReader();
-// };
-// }
-// util.inherits(QueuedReader, stream.Readable);
-// QueuedReader.prototype.addReader = function queuedAddReader(reader) {
-// var readerQueue = this.readerQueue;
-// if (readerQueue === null) {
-// return;
-// }
-
-// readerQueue.addLast(reader);
-// this.logger.debug('queued item %d', readerQueue.getTotal());
-// this.nextReader();
-// };
-// QueuedReader.prototype.getItemQueue = function getItemQueue() {
-// return this.itemQueue;
-// };
-// QueuedReader.prototype.isQueueEmpty = function isQueueEmpty() {
-// return (this.readerQueue.length() === 0 && this.writerQueue.length() === 0);
-// };
-// QueuedReader.prototype.nextReader = function queuedReaderNextReader() {
-// if (!this.isReading) {
-// return;
-// }
-
-// var readerQueue = this.readerQueue;
-// if (readerQueue === null || readerQueue.length() === 0) {
-// return;
-// }
-
-// if (this.itemQueue.length() >= this.maxItems) {
-// return;
-// }
-
-// var writerQueue = this.writerQueue;
-// var minWriters = this.minWriters;
-
-// var logger = this.logger;
-
-// var addItems = this.addItems;
-
-// var i = writerQueue.length();
-// var j = readerQueue.length();
-// var writer = null;
-// for (; i <= minWriters && j > 0; i++, j--) {
-// writer = concatStream(addItems);
-// writerQueue.addLast(writer);
-// logger.debug('reading item');
-// readerQueue.pollFirst().pipe(writer);
-// }
-// };
-// QueuedReader.prototype._read = function queuedReaderRead(/*size*/) {
-// var itemQueue = this.itemQueue;
-// if (itemQueue === null) {
-// return;
-// }
-
-// var logger = this.logger;
-
-// var hasItem = itemQueue.hasItem();
-// var canRead = true;
-// while (hasItem && canRead) {
-// logger.debug('writing item');
-// canRead = this.push(itemQueue.pollFirst());
-// hasItem = itemQueue.hasItem();
-// }
-
-// if (this.queueDone && !hasItem && this.readerQueue.length() === 0 &&
-// this.writerQueue.length() === 0) {
-// this.logger.debug('wrote %d items', itemQueue.getTotal());
-// this.push(null);
-
-// this.readerQueue = null;
-// this.writerQueue = null;
-// this.itemQueue = null;
-// } else if (!canRead) {
-// if (this.isReading) {
-// this.isReading = false;
-// }
-// } else {
-// if (!this.isReading) {
-// this.isReading = true;
-// }
-// this.nextReader();
-// }
-// };
function FifoQueue(min) {
if (!(this instanceof FifoQueue)) {
@@ -778,17 +651,17 @@ FifoQueue.prototype.pollFirst = function fifoPollFirst() {
}
return item;
};
-FifoQueue.prototype.getTotal = function fifoGetTotal() {
- return this.total;
-};
FifoQueue.prototype.getQueue = function fifoGetQueue() {
return (this.first === 0 && this.last === this.queue.length) ?
this.queue : this.queue.slice(this.first, this.last + 1);
};
+/*
+FifoQueue.prototype.getTotal = function fifoGetTotal() {
+ return this.total;
+};
FifoQueue.prototype.length = function fifoLength() {
return (this.first >= 0) ? (this.last - this.first) + 1 : 0;
};
-/*
FifoQueue.prototype.at = function fifoAt(i) {
return this.queue[this.first + i];
};
| 2 |
diff --git a/character-controller.js b/character-controller.js @@ -170,6 +170,8 @@ class LocalPlayer extends Player {
if (wearActionIndex !== -1) {
this.actions.splice(wearActionIndex, 1);
+ this.appManager.transplantApp(app, world.appManager);
+
const wearComponent = app.getComponent('wear');
if (wearComponent) {
app.position.copy(this.position)
| 0 |
diff --git a/components/aggregation/mat/TableView.js b/components/aggregation/mat/TableView.js @@ -259,7 +259,7 @@ const TableView = ({ data, query }) => {
return rows
}, [rows, selectedFlatRows])
- const [chartPanelHeight, setChartPanelHeight] = useState(250)
+ const [chartPanelHeight, setChartPanelHeight] = useState(800)
const onPanelResize = useCallback((width, height) => {
console.log(`resized height: ${height}`)
| 12 |
diff --git a/assets/js/util/integrationInfo.js b/assets/js/util/integrationInfo.js @@ -71,11 +71,11 @@ export const PREMADE_CHANNEL_TYPES = [
info: "This Integration simplifies sending data to the Datacake IoT platform.",
docLink: "https://docs.helium.com/use-the-network/console/integrations/datacake"
},
- // {
- // name: "TagoIO",
- // link: "/integrations/new/tago",
- // img: `${Tago}` ,
- // info: "This Integration simplifies sending data to the TagoIO platform.",
- // docLink: "https://docs.helium.com/use-the-network/console/integrations/tago"
- // },
+ {
+ name: "TagoIO",
+ link: "/integrations/new/tago",
+ img: `${Tago}` ,
+ info: "This Integration simplifies sending data to the TagoIO platform.",
+ docLink: "https://docs.helium.com/use-the-network/console/integrations/tago"
+ },
]
| 11 |
diff --git a/static/intro-to-storybook/netlify-settings-npm.png b/static/intro-to-storybook/netlify-settings-npm.png Binary files a/static/intro-to-storybook/netlify-settings-npm.png and b/static/intro-to-storybook/netlify-settings-npm.png differ
| 3 |
diff --git a/app/src/scripts/dataset/dataset.validation.jsx b/app/src/scripts/dataset/dataset.validation.jsx @@ -56,8 +56,7 @@ export default class Validation extends React.Component {
accordion
className="validation-wrap"
activeKey={this.state.activeKey}
- onSelect={this._togglePanel.bind(this)}
- id="validation">
+ onSelect={this._togglePanel.bind(this)}>
<Panel
className="status"
header={this._header(errors, warnings)}
| 1 |
diff --git a/src/plots/cartesian/constants.js b/src/plots/cartesian/constants.js @@ -12,8 +12,8 @@ var counterRegex = require('../../lib/regex').counter;
module.exports = {
idRegex: {
- x: counterRegex('x'),
- y: counterRegex('y')
+ x: counterRegex('x','( domain)?'),
+ y: counterRegex('y','( domain)?')
},
attrRegex: counterRegex('[xy]axis'),
| 0 |
diff --git a/src/commands/addons/index.js b/src/commands/addons/index.js @@ -14,7 +14,7 @@ class AddonsCommand extends Command {
}
}
-AddonsCommand.description = `Handle addon operations
+AddonsCommand.description = `Handle Netlify add-on operations
The addons command will help you manage all your netlify addons
`
AddonsCommand.aliases = ['addon']
| 3 |
diff --git a/src/network/connection.js b/src/network/connection.js @@ -320,7 +320,7 @@ module.exports = class Connection {
this.buffer = decoder.readAll()
if (this.authHandlers) {
- return this.authHandlers.onSuccess(data.slice(0, this.offset + byteLength))
+ return this.authHandlers.onSuccess(data.slice(0, Decoder.int32Size() + expectedResponseSize))
}
const correlationId = response.readInt32()
| 1 |
diff --git a/app/models/amt/AMTAssignmentTable.scala b/app/models/amt/AMTAssignmentTable.scala @@ -33,8 +33,8 @@ object AMTAssignmentTable {
val db = play.api.db.slick.DB
val amtAssignments = TableQuery[AMTAssignmentTable]
- val TURKER_TUTORIAL_PAY: Double = 0.43D
- val TURKER_PAY_PER_MILE: Double = 4.17D
+ val TURKER_TUTORIAL_PAY: Double = 1.00D
+ val TURKER_PAY_PER_MILE: Double = 5.00D
val TURKER_PAY_PER_METER: Double = TURKER_PAY_PER_MILE / 1609.34D
val TURKER_PAY_PER_LABEL_VALIDATION = 0.0D
val VOLUNTEER_PAY: Double = 0.0D
| 3 |
diff --git a/lib/SyndicateJob.js b/lib/SyndicateJob.js @@ -4,6 +4,7 @@ const fetch = require('node-fetch');
const WorldstateObject = require('./WorldstateObject.js');
+const apiBase = process.env.API_BASE_URL || 'https://api.warframestat.us';
const bountyRewardRegex = /Tier(A|B|C|D|E)Table(A|B|C)Rewards/i;
const ghoulRewardRegex = /GhoulBountyTable(A|B)Rewards/i;
@@ -75,7 +76,7 @@ const determineLocation = (i18n) => {
const getCetusBountyRewards = async (i18n) => {
try {
const { location, locationWRot } = determineLocation(i18n);
- const url = `https://api.warframestat.us/drops/search/${encodeURIComponent(location)}?grouped_by=location`;
+ const url = `${apiBase}/drops/search/${encodeURIComponent(location)}?grouped_by=location`;
const reply = await fetch(url).then(res => res.json());
const pool = reply[0][locationWRot];
if (!pool) {
| 11 |
diff --git a/_startups/Lederer-Stark Innovations GbR/Lederer-Stark Innovations GbR.md b/_startups/Lederer-Stark Innovations GbR/Lederer-Stark Innovations GbR.md @@ -13,11 +13,6 @@ promotions:
text: Check out our newest Supplies!
URL: http://www.ls-innovations.de/shop/
color: '#FFFACD'
- - button: Visit our Homepage!
- text: Get to know the Team!
- URL: http://www.ls-innovations.de/#
- color: '#FFFACD'
-
tags:
- supplies
- citizen science
| 2 |
diff --git a/src/components/timeseriesexplorer.js b/src/components/timeseriesexplorer.js @@ -25,7 +25,6 @@ function TimeSeriesExplorer({
states,
anchor,
setAnchor,
- isIntersecting,
}) {
const [chartType, setChartType] = useLocalStorage('timeseriesChartType', 1);
const [isTimeseriesIntersecting, setIsTimeseriesIntersecting] = useState(
@@ -161,7 +160,7 @@ function TimeSeriesExplorer({
chartType={chartType}
mode={timeseriesMode}
logMode={timeseriesLogMode}
- isTotal={activeStateCode === 'TT'}
+ stateCode={activeStateCode}
isIntersecting={isTimeseriesIntersecting}
/>
)}
| 1 |
diff --git a/token-metadata/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/metadata.json b/token-metadata/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/metadata.json "symbol": "USDC",
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"decimals": 6,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/core/api-server/api/graphql/schemas/discovery-schema.js b/core/api-server/api/graphql/schemas/discovery-schema.js @@ -74,6 +74,7 @@ type JobsForDriver {
isMaster: Boolean
workerStartingTime: String
jobCurrentTime: String
+ jobId: String
workerPaused: Boolean
hotWorker: Boolean
error: String
| 0 |
diff --git a/src/lime/utils/AssetLibrary.hx b/src/lime/utils/AssetLibrary.hx @@ -620,7 +620,7 @@ class AssetLibrary
for (asset in manifest.assets)
{
size = hasSize && Reflect.hasField(asset, "size") ? asset.size : 100;
- id = asset.id;
+ id = Reflect.hasField(asset, "id") ? asset.id : asset.path;
if (Reflect.hasField(asset, "path"))
{
@@ -666,7 +666,7 @@ class AssetLibrary
for (asset in manifest.assets)
{
- id = asset.id;
+ id = Reflect.hasField(asset, "id") ? asset.id : asset.path;
if (preload.exists(id) && preload.get(id))
{
| 11 |
diff --git a/packages/app/src/server/service/page.ts b/packages/app/src/server/service/page.ts @@ -454,16 +454,16 @@ class PageService {
try {
count += batch.length;
await renameDescendants(batch, user, options, pathRegExp, newPagePathPrefix);
- logger.debug(`Reverting pages progressing: (count=${count})`);
+ logger.debug(`Renaming pages progressing: (count=${count})`);
}
catch (err) {
- logger.error('revertPages error on add anyway: ', err);
+ logger.error('renameDescendants error on add anyway: ', err);
}
callback();
},
final(callback) {
- logger.debug(`Reverting pages has completed: (totalCount=${count})`);
+ logger.debug(`Renaming pages has completed: (totalCount=${count})`);
// update path
targetPage.path = newPagePath;
pageEvent.emit('syncDescendantsUpdate', targetPage, user);
@@ -991,16 +991,16 @@ class PageService {
try {
count += batch.length;
await deleteDescendants(batch, user);
- logger.debug(`Reverting pages progressing: (count=${count})`);
+ logger.debug(`Deleting pages progressing: (count=${count})`);
}
catch (err) {
- logger.error('revertPages error on add anyway: ', err);
+ logger.error('deleteDescendants error on add anyway: ', err);
}
callback();
},
final(callback) {
- logger.debug(`Reverting pages has completed: (totalCount=${count})`);
+ logger.debug(`Deleting pages has completed: (totalCount=${count})`);
callback();
},
| 7 |
diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js @@ -533,11 +533,10 @@ function addAction(reportID, text, file) {
maxSequenceNumber: newSequenceNumber,
});
- // Generate a client id to store with the local action. Later, we
- // will find and remove this action by referencing the action created
- // in the server. We do this because it's not safe to assume that this
- // action will use the next sequenceNumber. An action created by another
- // user can overwrite that sequenceNumber if it is created before this one.
+ // Generate a clientID so we can save the optimistic action to storage with the clientID as key. Later, we will
+ // remove the temporary action when we add the real action created in the server. We do this because it's not
+ // safe to assume that this will use the very next sequenceNumber. An action created by another can overwrite that
+ // sequenceNumber if it is created before this one.
const temporaryReportActionID = Str.guid(`${Date.now()}_`);
// Store the temporary action ID on the report the comment was added to.
| 7 |
diff --git a/assets/js/googlesitekit/widgets/components/WidgetAreaRenderer.js b/assets/js/googlesitekit/widgets/components/WidgetAreaRenderer.js @@ -49,32 +49,8 @@ export default function WidgetAreaRenderer( { slug, totalAreas } ) {
};
} );
- // TODO: Solve this in a better way.
- /*
- const activeWidgets = widgets.filter( ( widget ) => {
- const widgetExists = widgets.some( ( item ) => item.slug === widget.slug );
- const isComponent = typeof widget.Component === 'function';
- if ( ! widgetExists || ! isComponent ) {
- return false;
- }
- const widgetComponentProps = getWidgetComponentProps( widget.slug );
- console.log( widgetComponentProps ); // eslint-disable-line no-console
- const isActive = widget.Component.prototype.render
- ? new widget.Component( widgetComponentProps ).render()
- : widget.Component( widgetComponentProps );
-
- return Boolean( isActive );
- } );
- */
-
const { activeWidgets, inactiveWidgets } = separateNullWidgets( widgets, widgetStates );
- /*
- if ( activeWidgets.length === 0 ) {
- return null;
- }
- */
-
// Compute the layout.
const {
classNames,
| 2 |
diff --git a/NotAnAnswerFlagQueueHelper.user.js b/NotAnAnswerFlagQueueHelper.user.js // @description Inserts several sort options for the NAA / VLQ / Review LQ Disputed queues
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 3.15.1
+// @version 3.16
//
// @updateURL https://github.com/samliew/SO-mod-userscripts/raw/master/NotAnAnswerFlagQueueHelper.user.js
// @downloadURL https://github.com/samliew/SO-mod-userscripts/raw/master/NotAnAnswerFlagQueueHelper.user.js
console.log("Toggle by: " + filter);
const filterFunction = function() {
- if(filter === 'magisch') return $(this).find('.js-post-flag-group:not(.js-cleared) a[href^="/users/5389107/"]').length > 0; // Magisch's userid on SO
- if(filter === 'ekad') return $(this).find('.js-post-flag-group:not(.js-cleared) a[href^="/users/1905949/"]').length > 0; // ekad's userid on SO
if(filter === 'deleted') return $(this).find('.bg-red-050').length > 0;
if(filter === 'self-answer') {
<a data-toggle="a" title="Show Answers only">A</a>
<a data-toggle="self-answer" title="Self Answer">Self</a>
<a data-toggle="deleted" title="Show Deleted only">Del</a>
-`);
-
- // Insert additional filter options
- if(superusers.includes(StackExchange.options.user.userId)) {
-
- $filterOpts.append(`
-<a data-toggle="magisch" title="Show flags by "Magisch" only">Mg</a>
-<a data-toggle="ekad" title="Show flags by "ekad" only">Ek</a>
`);
}
- }
// Sort options event
$('#flag-queue-tabs').on('click', 'a[data-filter]', function() {
// Remove old "deemed invalid by" flags as they mess up sorting by flagger rank
$('.js-flag-row.js-cleared').filter((i, el) => el.innerText.includes('deemed invalid by')).remove();
- // Show Magisch filter option if there are flags by this user
- if($posts.find('.js-post-flag-group:not(.js-cleared) a[href^="/users/5389107/"]').length > 0) {
- $filterOpts.find('[data-toggle="magisch"]').removeClass('dno');
- }
-
// Selects default decline reason and focus submit button
$('.js-resolve-action[data-type="decline"]').click(function(evt) {
const flagOpts = $(this).closest('.js-post-flag-group, .js-post-flag-options');
| 2 |
diff --git a/guide/english/java/getters-and-setters/index.md b/guide/english/java/getters-and-setters/index.md @@ -3,7 +3,7 @@ title: Getters & Setters
---
# Getters & Setters
-Getters and Setters are used to effectively protect your data, particularly when creating classes. For each instance variable, a getter method returns its value while a setter method sets or updates its value. Getters and setters are also known as accessors and mutators, respectively.
+Getters and Setters are used to implement the principle of encapsulation and so the instance variable can be accessed only by its getter and setter methods. For each instance variable, a getter method returns its value while a setter method sets or updates its value. Getters and setters are also known as accessors and mutators, respectively.
By convention, getters start with `get`, followed by the variable name, with the first letter of the variable name capitalized. Setters start with `set`, followed by the variable name, with the first letter of the variable name capitalized.
| 7 |
diff --git a/src/interaction/Measure.js b/src/interaction/Measure.js @@ -492,11 +492,11 @@ class Measure extends olInteractionInteraction {
* @param {import("ol/proj/Projection.js").default} projection Projection of the polygon coords.
* @param {number|undefined} precision Precision.
* @param {import('ngeo/misc/filters.js').unitPrefix} format The format function.
- * @param {boolean} [spherical=true] Whether to use the spherical area.
+ * @param {boolean} [spherical=false] Whether to use the spherical area.
* @return {string} Formatted string of the area.
* @hidden
*/
-export function getFormattedArea(polygon, projection, precision, format, spherical = true) {
+export function getFormattedArea(polygon, projection, precision, format, spherical = false) {
let area;
if (spherical) {
const geom = /** @type {import("ol/geom/Polygon.js").default} */ (
@@ -531,11 +531,11 @@ export function getFormattedCircleArea(circle, precision, format) {
* @param {import("ol/proj/Projection.js").default} projection Projection of the line string coords.
* @param {number|undefined} precision Precision.
* @param {import('ngeo/misc/filters.js').unitPrefix} format The format function.
- * @param {boolean} [spherical=true] Whether to use the spherical distance.
+ * @param {boolean} [spherical=false] Whether to use the spherical distance.
* @return {string} Formatted string of length.
* @hidden
*/
-export function getFormattedLength(lineString, projection, precision, format, spherical = true) {
+export function getFormattedLength(lineString, projection, precision, format, spherical = false) {
let length = 0;
if (spherical) {
const coordinates = lineString.getCoordinates();
| 12 |
diff --git a/src/assets/loop.svg b/src/assets/loop.svg -<svg width="173" height="122" viewBox="0 0 173 122" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M19.5851 57.7209C18.7846 60.9364 20.7424 64.1921 23.958 64.9926L76.3586 78.0376C79.5742 78.8381 82.8299 76.8803 83.6304 73.6647C84.4309 70.4492 82.4731 67.1935 79.2575 66.393L32.6792 54.7974L44.2747 8.21909C45.0752 5.00352 43.1174 1.74786 39.9019 0.94735C36.6863 0.146845 33.4306 2.10464 32.6301 5.3202L19.5851 57.7209ZM0.66243 58.0568C13.6081 83.2705 28.3055 100.096 43.8523 110.155C59.4835 120.268 75.6781 123.341 91.0765 121.492C121.52 117.836 148.046 95.1288 162.032 71.9001C169.041 60.2595 173.341 47.781 172.979 36.7524C172.795 31.1671 171.404 25.7785 168.367 21.1433C165.3 16.4632 160.783 12.9027 154.963 10.6871C143.593 6.35893 127.376 7.17377 106.065 13.7532C84.5633 20.3916 56.9935 33.1747 22.3153 54.0284L28.4995 64.3122C62.7172 43.7354 89.3666 31.4676 109.605 25.2192C130.035 18.9118 143.081 19.004 150.694 21.902C154.365 23.2996 156.769 25.3394 158.329 27.7199C159.918 30.1453 160.858 33.2776 160.985 37.1467C161.244 45.0268 158.085 55.1904 151.751 65.7104C139.052 86.8026 115.362 106.489 89.6456 109.578C76.9641 111.101 63.5928 108.634 50.3708 100.08C37.0645 91.4704 23.6214 76.5004 11.3376 52.5758L0.66243 58.0568Z" fill="black"/>
+<svg width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <path d="M11.9503 12.2449C11.1638 13.0499 10.2389 13.6226 9.25254 13.9653V11.8009C9.7274 11.5586 10.1775 11.2433 10.5722 10.8378C12.5439 8.81641 12.5439 5.5298 10.5722 3.50938C8.6006 1.492 5.39532 1.492 3.4207 3.50938C1.45103 5.53183 1.45795 8.82858 3.42762 10.85C3.43257 10.8561 3.4484 10.8662 3.4484 10.8632H3.45038L4.94321 9.43809L4.94321 14H0.491421L2.07329 12.2764C2.07329 12.2764 2.06241 12.2642 2.0535 12.2571C-0.679894 9.45711 -0.686813 4.90228 2.04658 2.10228C4.78394 -0.700761 9.21396 -0.700761 11.9503 2.10228C14.6817 4.90228 14.6847 9.44494 11.9503 12.2449Z"
+ fill="#111111"
+ />
</svg>
| 3 |
diff --git a/Source/Core/Ellipsoid.js b/Source/Core/Ellipsoid.js /*global define*/
define([
+ './Check',
'./Cartesian3',
'./Cartographic',
'./defaultValue',
@@ -10,6 +11,7 @@ define([
'./Math',
'./scaleToGeodeticSurface'
], function(
+ Check,
Cartesian3,
Cartographic,
defaultValue,
@@ -27,10 +29,13 @@ define([
z = defaultValue(z, 0.0);
//>>includeStart('debug', pragmas.debug);
- if (x < 0.0 || y < 0.0 || z < 0.0) {
+ /*if (x < 0.0 || y < 0.0 || z < 0.0) {
throw new DeveloperError('All radii components must be greater than or equal to zero.');
- }
+ }*/
//>>includeEnd('debug');
+ Check.typeOf.number.greaterThanOrEquals('x', x, 0.0);
+ Check.typeOf.number.greaterThanOrEquals('y', y, 0.0);
+ Check.typeOf.number.greaterThanOrEquals('z', z, 0.0);
ellipsoid._radii = new Cartesian3(x, y, z);
@@ -283,13 +288,15 @@ define([
*/
Ellipsoid.pack = function(value, array, startingIndex) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(value)) {
+ /*if (!defined(value)) {
throw new DeveloperError('value is required');
}
if (!defined(array)) {
throw new DeveloperError('array is required');
- }
+ }*/
//>>includeEnd('debug');
+ Check.defined('value', value);
+ Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
@@ -308,10 +315,11 @@ define([
*/
Ellipsoid.unpack = function(array, startingIndex, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(array)) {
+ /*if (!defined(array)) {
throw new DeveloperError('array is required');
- }
+ }*/
//>>includeEnd('debug');
+ Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
@@ -338,10 +346,11 @@ define([
*/
Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function(cartographic, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(cartographic)) {
+ /*if (!defined(cartographic)) {
throw new DeveloperError('cartographic is required.');
- }
+ }*/
//>>includeEnd('debug');
+ Check.defined('cartographic', cartographic);
var longitude = cartographic.longitude;
var latitude = cartographic.latitude;
@@ -422,10 +431,11 @@ define([
*/
Ellipsoid.prototype.cartographicArrayToCartesianArray = function(cartographics, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(cartographics)) {
+ /*if (!defined(cartographics)) {
throw new DeveloperError('cartographics is required.');
- }
- //>>includeEnd('debug');
+ }*/
+ //>>includeEnd('debug')
+ Check.defined('cartographics', cartographics);
var length = cartographics.length;
if (!defined(result)) {
@@ -496,10 +506,11 @@ define([
*/
Ellipsoid.prototype.cartesianArrayToCartographicArray = function(cartesians, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(cartesians)) {
+ /*if (!defined(cartesians)) {
throw new DeveloperError('cartesians is required.');
- }
+ }*/
//>>includeEnd('debug');
+ Check.defined('cartesians', cartesians);
var length = cartesians.length;
if (!defined(result)) {
@@ -536,10 +547,11 @@ define([
*/
Ellipsoid.prototype.scaleToGeocentricSurface = function(cartesian, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(cartesian)) {
+ /*if (!defined(cartesian)) {
throw new DeveloperError('cartesian is required.');
- }
+ }*/
//>>includeEnd('debug');
+ Check.defined('cartesian', cartesian);
if (!defined(result)) {
result = new Cartesian3();
@@ -633,7 +645,7 @@ define([
*/
Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function(position, buffer, result) {
//>>includeStart('debug', pragmas.debug);
- if (!defined(position)) {
+ /*if (!defined(position)) {
throw new DeveloperError('position is required.');
}
if (!CesiumMath.equalsEpsilon(this._radii.x, this._radii.y, CesiumMath.EPSILON15)) {
@@ -641,9 +653,19 @@ define([
}
if (this._radii.z === 0) {
throw new DeveloperError('Ellipsoid.radii.z must be greater than 0');
- }
+ }*/
//>>includeEnd('debug');
+ Check.defined('position', position);
+
+ // While it would be more idiomatic to use a Check.typeOf.number.something here,
+ // the resulting error message is a lot harder to read.
+ if (!CesiumMath.equalsEpsilon(this._radii.x, this._radii.y, CesiumMath.EPSILON15)) {
+ throw new DeveloperError('Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)');
+ }
+
+ Check.typeOf.number.greaterThan('_radii.z', this._radii.z, 0);
+
buffer = defaultValue(buffer, 0.0);
var sqauredXOverSquaredZ = this._sqauredXOverSquaredZ;
| 14 |
diff --git a/server/services/getLinkedCatAuthors.php b/server/services/getLinkedCatAuthors.php @@ -151,18 +151,9 @@ function getAuthors() {
// [id, author100_a, doc_count, living_dates and possibly image_link]
foreach ($author_ids as $i => $author_id) {
$author_count = $author_counts[$i];
- $author_name = $author_data[$author_id]["author100_a"];
- $author_date = $author_data[$author_id]["author100_d"];
- $author_image = $author_data[$author_id]["author100_wiki_img"];
- if (is_null($author_name)) {
- $author_name = "";
- }
- if (is_null($author_date)) {
- $author_date = "";
- }
- if (is_null($author_image)) {
- $author_image = "";
- }
+ $author_name = isset($author_data[$author_id]["author100_a"]) ? $author_data[$author_id]["author100_a"] : "";
+ $author_date = isset($author_data[$author_id]["author100_d"]) ? $author_data[$author_id]["author100_d"] : "";
+ $author_image = isset($author_data[$author_id]["author100_wiki_img"]) ? $author_data[$author_id]["author100_wiki_img"] : "";
# the following array contains a placeholder "" for a possible image link
$authors[] = array($author_id, $author_name, $author_count, $author_date, $author_image);
}
| 7 |
diff --git a/src/web/widgets/Axes/DisplayPanel.jsx b/src/web/widgets/Axes/DisplayPanel.jsx @@ -195,9 +195,9 @@ class DisplayPanel extends PureComponent {
<span className={styles.dimensionUnits}>{lengthUnits}</span>
</td>
<td className={styles.workPosition}>
- <span className={styles.integerPart}>{workPosition.x.split('.')[0]}</span>
+ <span className={styles.integerPart}>{workPosition.e.split('.')[0]}</span>
<span className={styles.decimalPoint}>.</span>
- <span className={styles.fractionalPart}>{workPosition.x.split('.')[1]}</span>
+ <span className={styles.fractionalPart}>{workPosition.e.split('.')[1]}</span>
<span className={styles.dimensionUnits}>{lengthUnits}</span>
</td>
<td className={styles.action} />
| 1 |
diff --git a/src/components/NakedButton.tsx b/src/components/NakedButton.tsx -import React from "react"
-import { Button, ButtonProps } from "@chakra-ui/react"
-
-const NakedButton: React.FC<ButtonProps> = ({ children, ...props }) => (
- <Button
- appearance="none"
- bg="inherit"
- border="none"
- color="inherit"
- display="inline-block"
- fontFamily="inherit"
- padding="initial"
- cursor="pointer"
- _hover={{
- bg: "inherit",
- color: "inherit",
- }}
- {...props}
- >
- {children}
- </Button>
-)
+import styled from "@emotion/styled"
+const NakedButton = styled.button`
+ appearance: none;
+ background: none;
+ border: none;
+ color: inherit;
+ display: inline-block;
+ font: inherit;
+ padding: initial;
+ cursor: pointer;
+`
export default NakedButton
| 13 |
diff --git a/README.md b/README.md @@ -40,7 +40,7 @@ GET https://api.spacexdata.com/v1/launches/latest
"rocket_type": "FT"
},
"telemetry": {
- "flight_club": "https://www.flightclub.io/results/?id=5f90f4b8-3e5f-41ef-aa1a-4551254b2589&code=OTV5"
+ "flight_club": "https://www.flightclub.io/results/?code=OTV5"
},
"core_serial": "B1040",
"cap_serial": null,
| 3 |
diff --git a/src/pages/2019/components/Nav/index.js b/src/pages/2019/components/Nav/index.js @@ -2,6 +2,7 @@ import React, { Component } from 'react'
import AnchorLink from 'react-anchor-link-smooth-scroll'
import Plx from 'react-plx'
import styles from '../../styles.module.scss'
+import { colors } from 'theme/'
const top = [
{
@@ -9,8 +10,8 @@ const top = [
end: '#team',
properties: [
{
- startValue: '#0B5FFF',
- endValue: '#0B5FFF',
+ startValue: colors.primary,
+ endValue: colors.primary,
property: 'backgroundColor',
},
{
@@ -26,8 +27,8 @@ const top = [
startOffset: '25vh',
properties: [
{
- startValue: '#0B5FFF',
- endValue: '#6B6C7E',
+ startValue: colors.primary,
+ endValue: colors.neutral4,
property: 'backgroundColor',
},
{
@@ -45,8 +46,8 @@ const team = [
startOffset: '25vh',
properties: [
{
- startValue: '#6b6c7e',
- endValue: '#0B5FFF',
+ startValue: colors.neutral4,
+ endValue: colors.primary,
property: 'backgroundColor',
},
{
@@ -62,8 +63,8 @@ const team = [
startOffset: '25vh',
properties: [
{
- startValue: '#0B5FFF',
- endValue: '#6B6C7E',
+ startValue: colors.primary,
+ endValue: colors.neutral4,
property: 'backgroundColor',
},
{
@@ -81,8 +82,8 @@ const initiatives = [
startOffset: '25vh',
properties: [
{
- startValue: '#6b6c7e',
- endValue: '#0B5FFF',
+ startValue: colors.neutral4,
+ endValue: colors.primary,
property: 'backgroundColor',
},
{
@@ -98,8 +99,8 @@ const initiatives = [
startOffset: '25vh',
properties: [
{
- startValue: '#0B5FFF',
- endValue: '#6B6C7E',
+ startValue: colors.primary,
+ endValue: colors.neutral4,
property: 'backgroundColor',
},
{
@@ -117,8 +118,8 @@ const projects = [
startOffset: '25vh',
properties: [
{
- startValue: '#6b6c7e',
- endValue: '#0B5FFF',
+ startValue: colors.neutral4,
+ endValue: colors.primary,
property: 'backgroundColor',
},
{
@@ -134,8 +135,8 @@ const projects = [
startOffset: '25vh',
properties: [
{
- startValue: '#0B5FFF',
- endValue: '#6B6C7E',
+ startValue: colors.primary,
+ endValue: colors.neutral4,
property: 'backgroundColor',
},
{
@@ -153,8 +154,8 @@ const ops = [
startOffset: '25vh',
properties: [
{
- startValue: '#6b6c7e',
- endValue: '#0B5FFF',
+ startValue: colors.neutral4,
+ endValue: colors.primary,
property: 'backgroundColor',
},
{
| 14 |
diff --git a/assets/js/components/ResetButton.js b/assets/js/components/ResetButton.js @@ -40,12 +40,16 @@ function ResetButton( { children } ) {
const postResetURL = useSelect( ( select ) => select( CORE_SITE ).getAdminURL( 'googlesitekit-splash', { notification: 'reset_success' } ) );
const isDoingReset = useSelect( ( select ) => select( CORE_SITE ).isDoingReset() );
const isNavigatingToPostResetURL = useSelect( ( select ) => select( CORE_LOCATION ).isNavigatingTo( postResetURL || '' ) );
- const [ isInProgress, setIsInProgress ] = useState( false );
+ const [ inProgress, setInProgress ] = useState( false );
const [ dialogActive, setDialogActive ] = useState( false );
- const debouncedInProgress = useDebounce( setIsInProgress, 3000 );
-
- const mediatedSetInProgress = ( bool ) => bool ? setIsInProgress( true ) : debouncedInProgress( false );
+ /*
+ * Using debounce here because the spinner has to render across two separate calls.
+ * Rather than risk it flickering on and off in between the reset call completing and
+ * the navigate call starting, we will just set a debounce to keep the spinner for 3 seconds.
+ */
+ const debouncedSetInProgress = useDebounce( setInProgress, 3000 );
+ const mediatedSetInProgress = ( bool ) => bool ? setInProgress( true ) : debouncedSetInProgress( false );
useEffect( () => {
mediatedSetInProgress( isDoingReset || isNavigatingToPostResetURL );
@@ -112,7 +116,7 @@ function ResetButton( { children } ) {
} ) }
confirmButton={ __( 'Reset', 'google-site-kit' ) }
danger
- inProgress={ isInProgress }
+ inProgress={ inProgress }
/>
</Modal>
</Fragment>
| 7 |
diff --git a/src/ui/ext/Bookmarks.hx b/src/ui/ext/Bookmarks.hx @@ -74,12 +74,14 @@ class Bookmarks {
sync(curr);
wantAdd = (curr.path != file.path || curr.row != lead.row);
+ if (curr.anchor != null) {
curr.anchor.detach();
var doc = curr.anchor.getDocument();
if (doc.gmlBookmarks != null) {
doc.gmlBookmarks.remove(curr.anchor);
}
}
+ }
if (wantAdd) {
var doc = session.doc;
var next:GmlBookmark = {
| 1 |
diff --git a/CHANGES.md b/CHANGES.md ##### Breaking Changes :mega:
-- Fixed an inconsistently handled exception in `camera.getPickRay` that arises when the scene is not rendered. [#10139](https://github.com/CesiumGS/cesium/pull/10139)
+- Fixed an inconsistently handled exception in `camera.getPickRay` that arises when the scene is not rendered. `camera.getPickRay` can now return undefined. [#10139](https://github.com/CesiumGS/cesium/pull/10139)
##### Additions :tada:
| 3 |
diff --git a/userscript.user.js b/userscript.user.js @@ -2162,7 +2162,16 @@ var $$IMU_EXPORT$$;
var content_length = 0;
if (!("content-range" in headers)) {
- // todo: handle better? are there servers that support Range but don't return Content-Range?
+ if ("accept-ranges" in headers) {
+ if (headers["accept-ranges"] === "bytes") {
+ console_error("FIXME: Content-Range is not present, but server supports ranges");
+ return options.onload(null);
+ } else if (headers["accept-ranges"] !== "none") {
+ console_error("Unknown Accept-Ranges value:", headers["accept-ranges"]);
+ return options.onload(null);
+ }
+ }
+ // todo: handle better? are there servers that support Range but don't return Content-Range and Accept-Ranges?
//console_error("Unable to find content-range in", resp);
//return options.onload(null);
content_length = resp.response.byteLength;
| 7 |
diff --git a/js/bitforex.js b/js/bitforex.js @@ -411,8 +411,8 @@ module.exports = class bitforex extends Exchange {
parseOrder (order, market = undefined) {
let id = this.safeString (order, 'orderId');
- let timestamp = this.safeFloat2 (order, 'createTime');
- let lastTradeTimestamp = this.safeFloat2 (order, 'lastTime');
+ let timestamp = this.safeFloat (order, 'createTime');
+ let lastTradeTimestamp = this.safeFloat (order, 'lastTime');
let symbol = market['symbol'];
let sideId = this.safeInteger (order, 'tradeType');
let side = this.parseSide (sideId);
| 14 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.