code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/nerdamer.core.js b/nerdamer.core.js @@ -5984,6 +5984,7 @@ var nerdamer = (function (imports) {
};
this.callPeekers = function(name) {
+ if (settings.callPeekers) {
var peekers = this.peekers[name];
//remove the first items and stringify
var args = arguments2Array(arguments).slice(1).map(stringify);
@@ -5991,6 +5992,7 @@ var nerdamer = (function (imports) {
for(var i=0; i<peekers.length; i++) {
peekers[i].apply(null, args);
}
+ }
};
/*
* Tokenizes the string
| 0 |
diff --git a/userscript.user.js b/userscript.user.js @@ -47791,6 +47791,8 @@ var $$IMU_EXPORT$$;
if (domain_nosub === "newtumbl.com") {
// https://dn0.newtumbl.com/img/81100/14861971/1/21809496/nT_sei0rd05cpjcffzfr0pqaee7_300.jpg
// https://dn0.newtumbl.com/img/81100/14861971/1/21809496/nT_sei0rd05cpjcffzfr0pqaee7.jpg
+ // https://dn0.newtumbl.com/img/82808/13699929/1/20114140/nT_gikzbtguejyr0gabqkn82gea_600.jpg
+ // https://dn0.newtumbl.com/img/82808/13699929/1/20114140/nT_gikzbtguejyr0gabqkn82gea.jpg
obj = {
url: src,
headers: {
@@ -47814,10 +47816,92 @@ var $$IMU_EXPORT$$;
return obj;
}
+ regex = /(\/img\/+[0-9]+\/+[0-9]+\/+[0-9]+\/+[0-9]+\/+nT_[0-9a-z]{10,})\.[^/.]+(?:[?#].*)?$/;
+
+ // https://github.com/qsniyg/maxurl/issues/220
+ if (regex.test(src) && options && options.do_request && options.cb) {
+ var cachelink = src.replace(regex, "$1");
+ api_cache.fetch("newtumbl:" + cachelink, function(url) {
+ if (url) {
+ obj.url = url;
+ }
+
+ options.cb(obj);
+ }, function(done) {
+ var req;
+
+ var do_test = function(ext) {
+ loaded = false;
+ loading_ext = ext;
+ var loadfunc = function(resp) {
+ onload(resp, ext);
+ };
+
+ req = options.do_request({
+ url: src.replace(regex, "$1." + ext),
+ method: "GET",
+ headers: {
+ Referer: ""
+ },
+ onprogress: loadfunc,
+ onload: loadfunc
+ });
+ };
+
+ var loaded = false;
+ var loading_ext;
+ var onload = function(resp, current_ext) {
+ if (loading_ext !== current_ext || loaded) {
+ req.abort();
+ return;
+ }
+
+ if (resp.readyState === 4 || resp.responseHeaders) {
+ loaded = true;
+ req.abort();
+ }
+
+ if (!loaded)
+ return;
+
+ if (resp.status !== 200) {
+ return done(null, false);
+ }
+
+ var headers_list = parse_headers(resp.responseHeaders);
+ var headers = headers_list_to_dict(headers_list);
+
+ // todo: improve?
+ var splitted = headers["content-type"].split("/");
+ var mediatype = splitted[0];
+ var ext = splitted[1];
+
+ var newsrc = src.replace(regex, "$1." + ext);
+
+ if (current_ext === "mp4") {
+ if (mediatype === "video") {
+ return done(newsrc, 24*60*60);
+ } else {
+ do_test("gif");
+ }
+ } else {
+ return done(newsrc, 24*60*60);
+ }
+ };
+
+ do_test("mp4");
+ });
+
+ return {
+ waiting: true
+ };
+ }
+
// https://dn2.newtumbl.com/img/520981/20720207/1/12312357/nT_nhur9hhheh63uqxj6ppjzst9_300.jpg
// https://dn2.newtumbl.com/img/520981/20720207/1/12312357/nT_nhur9hhheh63uqxj6ppjzst9.mp4
// note that non-mp4's get turned into mp4's like this, but this isn't too bad because content-type isn't video/
- newsrc = src.replace(/(\/img\/+[0-9]+\/+[0-9]+\/+[0-9]+\/+[0-9]+\/+nT_[0-9a-z]{10,})\.(?:jpg|JPG|jpeg|JPEG|png|PNG|webp|WEBP|gif|GIF)(?:[?#].*)?$/, "$1.mp4");
+ // gifs get broken though
+ newsrc = src.replace(/(\/img\/+[0-9]+\/+[0-9]+\/+[0-9]+\/+[0-9]+\/+nT_[0-9a-z]{10,})\.(?:jpg|JPG|jpeg|JPEG|png|PNG|webp|WEBP)(?:[?#].*)?$/, "$1.mp4");
if (newsrc !== src) {
obj.url = newsrc;
return obj;
| 7 |
diff --git a/contribs/gmf/src/controllers/abstract.js b/contribs/gmf/src/controllers/abstract.js @@ -664,7 +664,10 @@ function isIOS() {
function headingFromDevices(deviceOrientation) {
let hdg = deviceOrientation.getHeading();
let orientation = window.orientation;
- if (!isIOS()) {
+ if (hdg === undefined) {
+ return undefined;
+ }
+ if (angular.isDefined(hdg) && !isIOS()) {
hdg = -hdg;
if (window.screen.orientation.angle) {
orientation = window.screen.orientation.angle;
@@ -697,15 +700,6 @@ function headingFromDevices(deviceOrientation) {
gmf.AbstractController.prototype.headingUpdate = function() {
let heading = headingFromDevices(this.deviceOrientation);
if (angular.isDefined(heading)) {
-
- // The icon rotate
- // if (btnStatus == 1 ||
- // (btnStatus == 2 && userTakesControl)) {
- // updateHeadingFeature();
- // map.render();
-
- // // The map rotate
- // } else if (btnStatus == 2 && !userTakesControl) {
heading = -heading;
let currRotation = this.map.getView().getRotation();
const diff = heading - currRotation;
@@ -720,12 +714,6 @@ gmf.AbstractController.prototype.headingUpdate = function() {
duration: 350,
easing: ol.easing.linear
});
- // updateHeadingFeature(0);
- // var rotation = forceRotation || headingFromDevices();
- // if (angular.isDefined(rotation)) {
- // positionFeature.set('rotation', 0);
- // }
- // }
}
};
@@ -739,32 +727,20 @@ gmf.AbstractController.prototype.autorotateListener = function() {
const headngUpdateWhenMapRotate = throttle(this.headingUpdate, 300, this);
// let headngUpdateWhenIconRotate = gaThrottle.throttle(headingUpdate, 50);
- this.deviceOrientation.on(['change:heading'], (event) => {
- console.log(2, event);
+ this.deviceOrientation.on(['change'], (event) => {
const heading = headingFromDevices(this.deviceOrientation);
+ if (!angular.isDefined(heading)) {
+ console.error('Heading is undefined');
+ return;
+ }
- // The icon rotate
- // if (btnStatus == 1 || (btnStatus == 2 && userTakesControl)) {
- // headngUpdateWhenIconRotate();
-
- // The map rotate
- // } else
-
- console.log(heading, currHeading);
- if (heading < currHeading - 0.001 ||
- currHeading + 0.001 < heading) {
+ if (heading < currHeading - 0.05 ||
+ currHeading + 0.05 < heading) {
currHeading = heading;
- console.log('rotate map');
headngUpdateWhenMapRotate();
}
});
- this.deviceOrientation.once(['change:heading'], (event) => {
- console.log('head0');
- // The change heading event is triggered only if the device really
- // manage orientation (real mobile).
- // maxNumStatus = 2;
- });
this.deviceOrientation.setTracking(true);
// Geolocation control events
| 9 |
diff --git a/package.json b/package.json "@textile/threads-client": "^2.1.2",
"@textile/threads-id": "^0.5.1",
"@toruslabs/customauth": "^11.0.0",
- "@toruslabs/customauth-react-native-sdk": "^3.0.1",
+ "@toruslabs/customauth-react-native-sdk": "^3.1.0",
"@tradle/react-native-http": "^2.0.1",
"@walletconnect/client": "^1.7.8",
"FormData": "^0.10.1",
| 3 |
diff --git a/packages/spark-core/components/_buttons.scss b/packages/spark-core/components/_buttons.scss &::after {
content: '';
- border-bottom: ($btn-border-width + 1px) solid $red-real;
+ border-bottom: ($btn-border-width + 1px) solid $btn-border-color;
display: block;
width: 100%;
padding-top: $space-xs;
| 3 |
diff --git a/token-metadata/0xf04a8ac553FceDB5BA99A64799155826C136b0Be/metadata.json b/token-metadata/0xf04a8ac553FceDB5BA99A64799155826C136b0Be/metadata.json "symbol": "FLIXX",
"address": "0xf04a8ac553FceDB5BA99A64799155826C136b0Be",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/projects/ngx-extended-pdf-viewer/src/lib/theme/common/viewer-with-images.scss b/projects/ngx-extended-pdf-viewer/src/lib/theme/common/viewer-with-images.scss @@ -1530,7 +1530,7 @@ ngx-extended-pdf-viewer {
#errorMoreInfo {
background-color: $page-background;
- color: $background;
+ color: $error-color;
padding: 3px;
margin: 3px;
width: 98%;
| 12 |
diff --git a/src/Header.jsx b/src/Header.jsx @@ -20,6 +20,8 @@ import * as ceramicApi from '../ceramic.js';
// import * as ceramicAdmin from '../ceramic-admin.js';
import sceneNames from '../scenes/scenes.json';
+const localEuler = new THREE.Euler();
+
// console.log('index 1');
const _makeName = (N = 8) => (Math.random().toString(36)+'00000000000000000').slice(2, N+2);
| 0 |
diff --git a/src/apps.json b/src/apps.json 19
],
"icon": "Clipboard.js.svg",
- "script": "clipboard(?:\\.min)?\\.js",
+ "script": "clipboard(?:-([\\d.]+))?(?:\\.min)?\\.js\\;version:\\1",
"website": "https://clipboardjs.com/"
},
"CloudCart": {
| 7 |
diff --git a/app/main.js b/app/main.js @@ -1318,12 +1318,14 @@ ipcMain.on("send-many", function (event, fromAddresses, toAddress, fee, threshol
let recipients = [{address: toAddress, satoshis: amountInSatoshiToSend}];
// Refund thresholdLimitInSatoshi amount to current address
+ if (thresholdLimitInSatoshi > 0) {
for (let i = 0; i < nFromAddresses; i++) {
recipients = recipients.concat({
address: fromAddresses[i],
satoshis: thresholdLimitInSatoshi
})
}
+ }
// Create transaction
let txObj = zencashjs.transaction.createRawTx(history, recipients, blockHeight, blockHash);
| 11 |
diff --git a/.babelrc b/.babelrc {
- "presets": ["es2015", "stage-0"],
- "plugins": ["transform-runtime"]
+ "presets": [
+ "es2015"
+ ],
+ "plugins": [
+ "syntax-async-functions",
+ "transform-async-to-generator",
+ "transform-regenerator",
+ "transform-runtime"
+ ]
}
\ No newline at end of file
| 3 |
diff --git a/src/components/common/header/AppToolbar.js b/src/components/common/header/AppToolbar.js @@ -11,7 +11,7 @@ export const SOURCES_URL = 'https://sources.mediacloud.org/';
export const BLOG_URL = 'http://mediacloud.org/';
export const TOOLS_URL = 'https://tools.mediacloud.org/';
-const BrandToolbar = (props) => {
+const AppToolbar = (props) => {
const { backgroundColor, drawer } = props;
const { formatMessage } = props.intl;
const styles = { backgroundColor };
@@ -75,7 +75,7 @@ const BrandToolbar = (props) => {
);
};
-BrandToolbar.propTypes = {
+AppToolbar.propTypes = {
// from composition chain
intl: PropTypes.object.isRequired,
// from parent
@@ -85,5 +85,5 @@ BrandToolbar.propTypes = {
export default
injectIntl(
- BrandToolbar
+ AppToolbar
);
| 10 |
diff --git a/src/track.js b/src/track.js @@ -54,7 +54,6 @@ var getSlideStyle = function (spec) {
style.left = -spec.index * spec.slideWidth;
}
style.opacity = (spec.currentSlide === spec.index) ? 1 : 0;
- style.visibility = (spec.currentSlide === spec.index) ? 'visible' : 'hidden';
style.transition = 'opacity ' + spec.speed + 'ms ' + spec.cssEase + ', ' + 'visibility ' + spec.speed + 'ms ' + spec.cssEase;
style.WebkitTransition = 'opacity ' + spec.speed + 'ms ' + spec.cssEase + ', ' + 'visibility ' + spec.speed + 'ms ' + spec.cssEase;
}
| 2 |
diff --git a/plugins/keppel/app/javascript/app/components/accounts/create.jsx b/plugins/keppel/app/javascript/app/components/accounts/create.jsx @@ -79,7 +79,7 @@ const FormBody = ({ values }) => {
<Form.ElementHorizontal label='Upstream source' name='url' required>
<Form.Input elementType='input' type='text' name='url' />
- <p className='form-control-static'>{'Enter the domain name of a registry (for Docker Hub, use "registry-1.docker.io"). If you only want to replicate images below a certain path, append the path after the domain name (e.g. "gcr.io/google_containers").'}</p>
+ <p className='form-control-static'>{'Enter the domain name of a registry (for Docker Hub, use "index.docker.io"). If you only want to replicate images below a certain path, append the path after the domain name (e.g. "gcr.io/google_containers").'}</p>
</Form.ElementHorizontal>
<Form.ElementHorizontal label='User name' name='username'>
| 4 |
diff --git a/articles/multifactor-authentication/developer/mfa-from-id-token.md b/articles/multifactor-authentication/developer/mfa-from-id-token.md @@ -39,10 +39,12 @@ In this section we will see how you can check if a user logged in with MFA in a
First, we need to authenticate a user and get an ID Token. To do that we will use the [OAuth 2.0 Authorization Code grant](/client-auth/server-side-web).
+Send the following `GET` request to Auth0's Authentication API when a user tries to log in:
+
```text
https://${account.namespace}/authorize?
- audience=${account.namespace}/userinfo&
+ audience=https://${account.namespace}/userinfo&
scope=openid&
response_type=code&
client_id=${account.clientId}&
@@ -59,7 +61,7 @@ Where:
| `response_type` | Tells Auth0 what kind of credentials to send in the response (this varies based on which [OAuth 2.0 grant](/protocols/oauth2#authorization-grant-types) you use). |
| `client_id` | Client ID of your app. Find it in [Client Settings](${account.namespace}/#/clients/${account.clientId}/settings). |
| `redirect_uri` | The URI to which Auth0 will send the response after the user authenticates. Set it to the URI that you want to redirect the user after login. Whitelist this value in [Client Settings](${account.namespace}/#/clients/${account.clientId}/settings). |
-| `state` | An authentication parameter used to help mitigate CSRF attacks. For more info see [State](/protocols/oauth2/oauth-state)|
+| `state` | An authentication parameter used to help mitigate CSRF attacks. For more info see [State](/protocols/oauth2/oauth-state). |
Call this URL when a user tries to log in. For example:
@@ -77,7 +79,7 @@ http://localhost:3000/?code=9nmp6bZS8GqJm4IQ&state=SAME_VALUE_YOU_SENT_AT_THE_RE
You need to verify that the `state` value is the same with the one you sent at the request and extract the code parameter (we will use it in the next step).
-### 2. Exchange the code for token
+### 2. Exchange the code for tokens
Next, we will exchange the Authorization Code we just got (the value of the `code` response parameter) for our tokens.
@@ -112,20 +114,18 @@ The `id_token` will be a [JSON Web Token (JWT)](/jwt) containing information abo
### 3. Validate the token
-Before you store and/or use an ID Token you must validate it. This process includes the following steps:
-
+Before you store and/or use an ID Token you **must** validate it. This process includes the following steps:
- Check that the token is well formed
- Verify the token's signature
- Verify that the token hasn't expired
- Verify that the token was issued by Auth0
- Verify that your application is the intended audience for the token
-For details on how to do these validations, see:
-
+For details on how to do these validations, see the following docs:
- [Validate an ID Token](/tokens/id-token#validate-an-id-token)
-- [Verify Access Tokens for Custom APIs](/api-auth/tutorials/verify-access-token): this tutorial is about how an API can verify an Access Token, but the content applies also to server-side web apps that validate ID Tokens.
+- [Verify Access Tokens for Custom APIs](/api-auth/tutorials/verify-access-token) (this tutorial is about how an API can verify an Access Token, but the content applies also to server-side web apps that validate ID Tokens)
-There are many libraries you can use to do these validations. For example, in the snippet below we use the [jwks-rsa](https://github.com/auth0/node-jwks-rsa) and [express-jwt](https://github.com/auth0/express-jwt) libraries, in order to make our lives a little easier.
+There are many libraries you can use to do these validations. For example, in the snippet below we use the [jwks-rsa](https://github.com/auth0/node-jwks-rsa) and [express-jwt](https://github.com/auth0/express-jwt) libraries.
```js
// Create middleware for checking the JWT
@@ -141,10 +141,14 @@ const checkJwt = jwt({
// Validate the audience and the issuer
audience: 'https://${account.namespace}/userinfo',
issuer: 'https://${account.namespace}/',
- algorithms: ['RS256'],
-
- //Request the amr property
- requestProperty: 'amr'
+ algorithms: ['RS256']
+}), function(req, res) {
+ // Check if the token contains the amr claim, and if so that it includes an mfa value
+ if (req.user.amr && req.user.amr.indexOf("mfa") > -1) {
+ console.log("User logged in with MFA");
+ } else {
+ console.log("User did not use MFA");
+ }
});
```
| 3 |
diff --git a/core/server/api/v3/session.js b/core/server/api/v3/session.js const Promise = require('bluebird');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const models = require('../../models');
const auth = require('../../services/auth');
const api = require('./index');
+const messages = {
+ accessDenied: 'Access denied.'
+};
+
const session = {
read(frame) {
/*
@@ -20,7 +24,7 @@ const session = {
if (!object || !object.username || !object.password) {
return Promise.reject(new errors.UnauthorizedError({
- message: i18n.t('errors.middleware.auth.accessDenied')
+ message: tpl(messages.accessDenied)
}));
}
@@ -40,7 +44,7 @@ const session = {
}).catch(async (err) => {
if (!errors.utils.isIgnitionError(err)) {
throw new errors.UnauthorizedError({
- message: i18n.t('errors.middleware.auth.accessDenied'),
+ message: tpl(messages.accessDenied),
err
});
}
| 14 |
diff --git a/exampleSite/content/fragments/item/docs.md b/exampleSite/content/fragments/item/docs.md @@ -8,6 +8,53 @@ title = "Documentation"
enable = true
+++
-# UNDER CONSTRUCTION
+### Variables
+
+#### Content
+*type: string*
+*Default Hugo variable. Defined simply by entering it's value under the frontmatter section.*
+
+This variable is optional.
+
+#### align
+*type: string*
+*accepted values: right, center, left*
+*default: center*
+
+Defines the layout of the fragment.
+
+#### pre
+*type: string*
+
+The value shown before the sidebar content. This variable is optional.
+
+#### post
+*type: string*
+
+The value shown after the sidebar content. This variable is optional.
+
+#### buttons
+*type: array of objects*
+
+Buttons can be defined using the same [variables as buttons fragment](/fragments/buttons#buttons).
+
+If an asset is defined or the fragment is centered, buttons are displayed in the main section of the fragment. If not, they're displayed in the siderbar.
+
+This variable is optional.
+
+#### asset
+*type: [asset object](/docs/global-variables/#asset)*
+
+Either an image or an icon. The asset is displayed in the sidebar unless the fragment is centered.
+
+#### header
+*type: object*
+
+A table can be displayed by setting `header` and `rows` variables following the same API as the [table fragment](/fragments/table#docs).
+
+#### rows
+*type: array of object*
+
+A table can be displayed by setting `header` and `rows` variables following the same API as the [table fragment](/fragments/table#docs).
[Global variables](/docs/global-variables) are documented as well and have been omitted from this page.
| 0 |
diff --git a/userscript.user.js b/userscript.user.js @@ -88505,13 +88505,13 @@ var $$IMU_EXPORT$$;
process: function(done, resp, cache_key) {
var match = resp.responseText.match(/<a id=image-link class=sample href="(\/\/(?:[^/]+\.)?sankakucomplex\.com\/[^"]+)"/);
if (!match) {
- match = resp.responseText.match(/<video id=image (?:(?:width|height)=[0-9]+\s+){0,}src="(\/\/is\.[^"]+)"/);
+ match = resp.responseText.match(/<video id=image (?:(?:width|height)=[0-9]+\s+){0,}src="(\/\/(?:[^/]+\.)?sankakucomplex\.com\/[^"]+)"/);
}
if (!match) {
- match = resp.responseText.match(/<a id=image-link class=full>\s*<img[^>]+ src="(\/\/is\.[^"]+)"/);
+ match = resp.responseText.match(/<a id=image-link class=full>\s*<img[^>]+ src="(\/\/(?:[^/]+\.)?sankakucomplex\.com\/[^"]+)"/);
}
if (!match) {
- match = resp.responseText.match(/<a href="(\/\/is\.[^"]+)" id=highres itemprop=contentUrl/);
+ match = resp.responseText.match(/<a href="(\/\/(?:[^/]+\.)?sankakucomplex\.com\/[^"]+)" id=highres itemprop=contentUrl/);
}
if (!match) {
| 1 |
diff --git a/src/angular/projects/spark-angular/src/lib/directives/inputs/sprk-input/sprk-input.directive.ts b/src/angular/projects/spark-angular/src/lib/directives/inputs/sprk-input/sprk-input.directive.ts @@ -16,9 +16,9 @@ export class SprkInputDirective implements OnInit {
OnChange($event) {
const value = (this.ref.nativeElement as HTMLInputElement).value;
if (value.length > 0) {
- this.ref.nativeElement.classList.add('sprk-b-TextInput--float-label');
+ this.ref.nativeElement.classList.add('sprk-b-Input--has-floating-label');
} else {
- this.ref.nativeElement.classList.remove('sprk-b-TextInput--float-label');
+ this.ref.nativeElement.classList.remove('sprk-b-Input--has-floating-label');
}
}
| 3 |
diff --git a/src/background.js b/src/background.js @@ -8,6 +8,7 @@ class Background {
fetch(){
this.gitlab = GitLab.createFromConfig(this.config, this.storage);
+ this.fetchCurrentUser().then(user => (this.currentUser = user));
this.config.activeProjectIds.forEach((project_id) => {
this.gitlab.getProjectEvents(project_id).then((project_events) => {
// latest check
@@ -26,8 +27,6 @@ class Background {
});
});
});
-
- this.gitlab.getCurrentUser().then(user => (this.currentUser = user));
}
notifyProjectEvent(project_id, project_event){
@@ -257,6 +256,10 @@ class Background {
}
return message;
}
+
+ fetchCurrentUser() {
+ return this.currentUser ? Promise.resolve(this.currentUser) : this.gitlab.getCurrentUser();
+ }
}
try {
| 8 |
diff --git a/src/core/operations/CRC8Checksum.mjs b/src/core/operations/CRC8Checksum.mjs */
import Operation from "../Operation";
+import OperationError from "../errors/OperationError";
+
+import { toHex } from "../lib/Hex";
/**
* CRC-8 Checksum operation
@@ -19,8 +22,8 @@ class CRC8Checksum extends Operation {
this.name = "CRC-8 Checksum";
this.module = "Crypto";
- this.description = "";
- this.infoURL = "";
+ this.description = "A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data.<br><br>The CRC was invented by W. Wesley Peterson in 1961.";
+ this.infoURL = "https://wikipedia.org/wiki/Cyclic_redundancy_check";
this.inputType = "ArrayBuffer";
this.outputType = "string";
this.args = [
@@ -28,36 +31,97 @@ class CRC8Checksum extends Operation {
"name": "Algorithm",
"type": "option",
"value": [
- "CRC-8"
+ "CRC-8",
+ "CRC-8/CDMA2000",
+ "CRC-8/DARC",
+ "CRC-8/DVB-S2",
+ "CRC-8/EBU",
+ "CRC-8/I-CODE",
+ "CRC-8/ITU",
+ "CRC-8/MAXIM",
+ "CRC-8/ROHC",
+ "CRC-8/WCDMA"
]
}
]
}
- calculateCRC8(algorithmName, polynomial, initializationValue, refIn, refOut, xorOut, check) {
- let initializationValue = this.reverseBits();
+ /**
+ * Generates the pre-computed lookup table for byte division
+ *
+ * @param polynomial
+ */
+ calculateCRC8LookupTable(polynomial) {
+ const crc8Table = new Uint8Array(256);
+
+ let currentByte;
+ for (let i = 0; i < 256; i++) {
+ currentByte = i;
+ for (let bit = 0; bit < 8; bit++) {
+ if ((currentByte & 0x80) != 0) {
+ currentByte <<= 1;
+ currentByte ^= polynomial;
+ } else {
+ currentByte <<= 1;
+ }
+ }
+
+ crc8Table[i] = currentByte;
+ }
+
+ return crc8Table;
+ }
+
+ /**
+ * Calculates the CRC-8 Checksum from an input
+ *
+ * @param {ArrayBuffer} input
+ * @param {number} polynomial
+ * @param {number} initializationValue
+ * @param {boolean} inputReflection
+ * @param {boolean} outputReflection
+ * @param {number} xorOut
+ * @param {number} check
+ */
+ calculateCRC8(input, polynomial, initializationValue, inputReflection, outputReflection, xorOut, check) {
+ const crcSize = 8;
+ const crcTable = this.calculateCRC8LookupTable(polynomial);
+
+ let crc = initializationValue != 0 ? initializationValue : 0;
+ let currentByte, position;
+
+ input = new Uint8Array(input);
+ for (let inputByte of input) {
+ currentByte = inputReflection ? this.reverseBits(inputByte, crcSize) : inputByte;
+
+ position = (currentByte ^ crc ) & 255;
+ crc = crcTable[position];
+ }
+
+ crc = outputReflection ? this.reverseBits(crc, crcSize) : crc;
+
+ if (xorOut != 0) crc = crc ^ xorOut;
- return crc;
+ return toHex(new Uint8Array([crc]));
}
/**
- * For an 8 bit initialization value reverse the bits.
+ * Reverse the bits for a given input byte.
*
- * @param input
+ * @param {number} input
*/
- reverseBits(input) {
- let reflectedBits = input.toString(2).split('');
- for (let i = 0; i < hashSize / 2; i++) {
- let x = reflectedBits[i];
- reflectedBits[i] = reflectedBits[hashSize - i - 1];
- reflectedBits[hashSize - i - 1] = x;
+ reverseBits(input, hashSize) {
+ let reversedByte = 0;
+ for (let i = hashSize - 1; i >= 0; i--) {
+ reversedByte |= ((input & 1) << i);
+ input >>= 1;
}
- return parseInt(reflectedBits.join(''));
+ return reversedByte;
}
/**
- * @param {byteArray} input
+ * @param {ArrayBuffer} input
* @param {Object[]} args
* @returns {string}
*/
@@ -65,18 +129,29 @@ class CRC8Checksum extends Operation {
const algorithm = args[0];
if (algorithm === "CRC-8") {
- return this.calculateCRC8(algorithm, 0x7, 0x0, false, false, 0x0, 0xF4)
+ return this.calculateCRC8(input, 0x7, 0x0, false, false, 0x0, 0xF4);
+ } else if (algorithm === "CRC-8/CDMA2000") {
+ return this.calculateCRC8(input, 0x9B, 0xFF, false, false, 0x0, 0xDA);
+ } else if (algorithm === "CRC-8/DARC") {
+ return this.calculateCRC8(input, 0x39, 0x0, true, true, 0x0, 0x15);
+ } else if (algorithm === "CRC-8/DVB-S2") {
+ return this.calculateCRC8(input, 0xD5, 0x0, false, false, 0x0, 0xBC);
+ } else if (algorithm === "CRC-8/EBU") {
+ return this.calculateCRC8(input, 0x1D, 0xFF, true, true, 0x0, 0x97);
+ } else if (algorithm === "CRC-8/I-CODE") {
+ return this.calculateCRC8(input, 0x1D, 0xFD, false, false, 0x0, 0x7E);
+ } else if (algorithm === "CRC-8/ITU") {
+ return this.calculateCRC8(input, 0x7, 0x0, false, false, 0x55, 0xA1);
+ } else if (algorithm === "CRC-8/MAXIM") {
+ return this.calculateCRC8(input, 0x31, 0x0, true, true, 0x0, 0xA1);
+ } else if (algorithm === "CRC-8/ROHC") {
+ return this.calculateCRC8(input, 0x7, 0xFF, true, true, 0x0, 0xD0);
+ } else if (algorithm === "CRC-8/WCDMA") {
+ return this.calculateCRC8(input, 0x9B, 0x0, true, true, 0x0, 0x25);
}
- return "";
+ throw new OperationError("Unknown checksum algorithm");
}
-
}
-const hashSize = 8;
-
-// const CRC8AlgoParameters = {
-// 'CRC8'
-// }
-
export default CRC8Checksum;
| 0 |
diff --git a/token-metadata/0x9b06D48E0529ecF05905fF52DD426ebEc0EA3011/metadata.json b/token-metadata/0x9b06D48E0529ecF05905fF52DD426ebEc0EA3011/metadata.json "symbol": "XSP",
"address": "0x9b06D48E0529ecF05905fF52DD426ebEc0EA3011",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/blockchain.js b/blockchain.js import flowConstants from './flow-constants.js';
const {FungibleToken, NonFungibleToken, ExampleToken, ExampleNFT, ExampleAccount} = flowConstants;
+import wordList from './flow/wordlist.js';
/* import flowConstants from './flow-constants.js';
import {accountsHost} from './constants.js';
@@ -507,6 +508,33 @@ function resolveContractSource(contractSource) {
.replace(/EXAMPLEACCOUNTADDRESS/g, ExampleAccount);
}
+function hexToWordList(hex) {
+ const words = [];
+ let n = BigInt('0x' + hex);
+ n <<= 2n;
+ while (n !== 0n) {
+ const a = n & 0x7FFn;
+ words.push(wordList[Number(a)]);
+ n -= a;
+ n >>= 11n;
+ }
+ return words.join(' ');
+}
+function wordListToHex(words) {
+ words = words.split(/\s+/);
+
+ let n = 0n;
+ for (let i = words.length - 1; i >= 0; i--) {
+ const word = words[i];
+ const index = wordList.indexOf(word);
+ const a = BigInt(index);
+ n <<= 11n;
+ n |= a;
+ }
+ n >>= 2n;
+ return n.toString(16);
+}
+
export {
// testFlow,
getContractSource,
| 0 |
diff --git a/lib/avatar/redrawAvatar.js b/lib/avatar/redrawAvatar.js @@ -3,8 +3,9 @@ const getGeneralToken = require('../util/getGeneralToken.js').func
exports.optional = ['jar']
-const nextFunction = (jar, token) => {
- return http({
+function redrawAvatar (jar, token) {
+ return new Promise((resolve, reject) => {
+ const httpOpt = {
url: '//avatar.roblox.com/v1/avatar/redraw-thumbnail',
options: {
method: 'POST',
@@ -14,23 +15,23 @@ const nextFunction = (jar, token) => {
},
resolveWithFullResponse: true
}
- }).then((res) => {
- if (res.statusCode === 200) {
- if (!res.body.success) {
- throw new Error(res.body)
}
+ return http(httpOpt).then((res) => {
+ if (res.statusCode === 200) {
+ resolve()
} else if (res.statusCode === 429) {
- throw new Error('Redraw avatar floodchecked')
+ reject(new Error('Redraw avatar floodchecked'))
} else {
- throw new Error('Redraw avatar failed')
+ reject(new Error('Redraw avatar failed'))
}
})
+ })
}
exports.func = (args) => {
const jar = args.jar
return getGeneralToken({ jar: jar }).then((xcsrf) => {
- return nextFunction(jar, xcsrf)
+ return redrawAvatar(jar, xcsrf)
})
}
| 4 |
diff --git a/token-metadata/0x5C84bc60a796534bfeC3439Af0E6dB616A966335/metadata.json b/token-metadata/0x5C84bc60a796534bfeC3439Af0E6dB616A966335/metadata.json "symbol": "BONE",
"address": "0x5C84bc60a796534bfeC3439Af0E6dB616A966335",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/README.md b/README.md @@ -101,8 +101,8 @@ We appreciate all contributions to the **siimple** project and help make it bett
| Project | Description |
|---------|-------------|
-| (siimple-rubygem)[https://github.com/BerkhanBerkdemir/siimple-rubygem] | siimple Ruby Gem for any type of Ruby web application |
-| (siimact)[https://github.com/mirgj/siimact] | siimact: A set of React components for Siimple CSS Framework |
+| [siimple-rubygem](https://github.com/BerkhanBerkdemir/siimple-rubygem) | siimple Ruby Gem for any type of Ruby web application |
+| [siimact](https://github.com/mirgj/siimact) | siimact: A set of React components for Siimple CSS Framework |
## License
| 1 |
diff --git a/angular/projects/spark-angular/src/lib/components/inputs/Checkbox.stories.ts b/angular/projects/spark-angular/src/lib/components/inputs/Checkbox.stories.ts +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { storyWrapper } from '../../../../../../.storybook/helpers/storyWrapper';
import { SprkLabelModule } from '../../directives/inputs/sprk-label/sprk-label.module';
import { SprkSelectionContainerModule } from './sprk-selection-container/sprk-selection-container.module';
@@ -20,26 +21,25 @@ export default {
},
decorators: [
storyWrapper(
- storyContent => (
+ (storyContent) =>
`<div class="sprk-o-Box">
<form (submit)="onSubmit($event)" #sampleForm="ngForm">
${storyContent}
</form>
- <div>`
- )
- )
+ <div>`,
+ ),
],
props: {
- onSubmit(event): void {
+ onSubmit(): void {
this.form_submitted = true;
- }
+ },
},
parameters: {
info: `
${markdownDocumentationLinkBuilder('input')}
`,
docs: { iframeHeight: 200 },
- }
+ },
};
const modules = {
@@ -50,7 +50,7 @@ const modules = {
SprkFieldErrorModule,
SprkIconModule,
SprkSelectionLabelModule,
- SprkSelectionInputModule
+ SprkSelectionInputModule,
],
};
@@ -125,10 +125,8 @@ export const defaultStory = () => ({
`,
props: {
onSelect() {
- this.checkbox_input1 === true
- ? (this.isChecked = true)
- : (this.isChecked = false);
- }
+ this.isChecked = this.checkbox_input1 === true;
+ },
},
});
@@ -223,10 +221,8 @@ export const invalidCheckbox = () => ({
`,
props: {
onSelect() {
- this.checkbox_input1 === true
- ? (this.isChecked = true)
- : (this.isChecked = false);
- }
+ this.isChecked = this.checkbox_input1 === true;
+ },
},
});
@@ -321,10 +317,8 @@ export const disabledCheckbox = () => ({
`,
props: {
onSelect() {
- this.checkbox_input1 === true
- ? (this.isChecked = true)
- : (this.isChecked = false);
- }
+ this.isChecked = this.checkbox_input1 === true;
+ },
},
});
| 3 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -9,6 +9,12 @@ To see all merged commits on the master branch that will be part of the next plo
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.55.1] -- 2020-09-02
+
+### Fixed
+ - Install `image-size` module in dependencies [#5119]
+
+
## [1.55.0] -- 2020-09-02
### Added
| 3 |
diff --git a/website/themes/uppy/layout/index.ejs b/website/themes/uppy/layout/index.ejs .use(Uppy.GoogleDrive, { target: Uppy.Dashboard, companionUrl: COMPANION_ENDPOINT })
.use(Uppy.Instagram, { target: Uppy.Dashboard, companionUrl: COMPANION_ENDPOINT })
.use(Uppy.Dropbox, { target: Uppy.Dashboard, companionUrl: COMPANION_ENDPOINT })
+ .use(Uppy.Facebook, { target: Uppy.Dashboard, companionUrl: COMPANION_ENDPOINT })
+ .use(Uppy.OneDrive, { target: Uppy.Dashboard, companionUrl: COMPANION_ENDPOINT })
.use(Uppy.Webcam, { target: Uppy.Dashboard })
.use(Uppy.Url, { target: Uppy.Dashboard, companionUrl: COMPANION_ENDPOINT })
.use(Uppy.Tus, { endpoint: TUS_ENDPOINT})
| 0 |
diff --git a/ccxt.js b/ccxt.js @@ -15249,7 +15249,7 @@ var hitbtc2 = extend (hitbtc, {
async fetchOpenOrders (symbol = undefined, params = {}) {
await this.loadMarkets ();
- let market;
+ let market = undefined;
if (symbol) {
market = this.market (symbol);
params = this.extend ({'symbol': market['id']});
| 1 |
diff --git a/token-metadata/0x1Aa61c196E76805fcBe394eA00e4fFCEd24FC469/metadata.json b/token-metadata/0x1Aa61c196E76805fcBe394eA00e4fFCEd24FC469/metadata.json "symbol": "SAFE",
"address": "0x1Aa61c196E76805fcBe394eA00e4fFCEd24FC469",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/classes/version/version.ts b/src/classes/version/version.ts @@ -6,6 +6,7 @@ import { Transaction } from '../transaction';
import { removeTablesApi, setApiOnPlace, parseIndexSyntax } from './schema-helpers';
import { exceptions } from '../../errors';
import { createTableSchema } from '../../helpers/table-schema';
+import { nop, promisableChain } from '../../functions/chaining-functions';
/** class Version
*
@@ -61,7 +62,7 @@ export class Version implements IVersion {
}
upgrade(upgradeFunction: (trans: Transaction) => PromiseLike<any> | void): Version {
- this._cfg.contentUpgrade = upgradeFunction;
+ this._cfg.contentUpgrade = promisableChain(this._cfg.contentUpgrade || nop, upgradeFunction);
return this;
}
}
| 11 |
diff --git a/DisplayInlineCommentFlagHistory.user.js b/DisplayInlineCommentFlagHistory.user.js // @description Grabs post timelines and display comment flag counts beside post comments, on comment hover displays flags
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.3.3
+// @version 1.4
//
// @include https://*stackoverflow.com/questions/*
// @include https://*serverfault.com/questions/*
// @include https://*askubuntu.com/questions/*
// @include https://*mathoverflow.com/questions/*
// @include https://*.stackexchange.com/questions/*
+//
+// @include https://*stackoverflow.com/posts/*/timeline*
+// @include https://*serverfault.com/posts/*/timeline*
+// @include https://*superuser.com/posts/*/timeline*
+// @include https://*askubuntu.com/posts/*/timeline*
+// @include https://*mathoverflow.com/posts/*/timeline*
+// @include https://*.stackexchange.com/posts/*/timeline*
// ==/UserScript==
(function() {
.rude-abusive {
color: red;
}
+.post-timeline tr.dno[style^="display:block;"],
+.post-timeline tr.dno[style^="display: block;"] {
+ display: table-row !important;
+}
+.post-timeline tr.dno[style^="display"],
+.post-timeline tr.dno[style^="display"] {
+ border-left: 2px double #f4a83d;
+}
</style>
`;
$('body').append(styles);
| 1 |
diff --git a/dygraph-externs.js b/dygraph-externs.js @@ -40,7 +40,7 @@ Dygraph.prototype.isZoomed;
/** @type {function(): string} */
Dygraph.prototype.toString;
-/** @type {function(string, string)} */
+/** @type {function(string, string=)} */
Dygraph.prototype.getOption;
/** @type {function(): number} */
@@ -127,7 +127,7 @@ Dygraph.prototype.isSeriesLocked;
/** @type {function(): number} */
Dygraph.prototype.numAxes;
-/** @type {function(Object, Boolean=)} */
+/** @type {function(Object, boolean=)} */
Dygraph.prototype.updateOptions;
/** @type {function(number, number)} */
| 1 |
diff --git a/packages/app/src/test/integration/service/page.test.js b/packages/app/src/test/integration/service/page.test.js @@ -909,26 +909,44 @@ describe('PageService', () => {
},
]);
+ const parent = await Page.find({ path: '/' });
+ await Page.insertMany([
+ {
+ path: '/migratedD',
+ grant: Page.GRANT_PUBLIC,
+ creator: testUser1,
+ lastUpdateUser: testUser1,
+ parent: parent._id,
+ },
+ ]);
+
// migrate
await crowi.pageService.v5InitialMigration(Page.GRANT_PUBLIC);
- const migratedPages = await Page.find({
+ const nMigratedPages = await Page.count({
path: {
- $in: ['/publicA', '/publicA/privateB/publicC', '/parenthesis/(a)[b]{c}d', '/parenthesis/(a)[b]{c}d/public'],
+ $in: ['/publicA', '/publicA/privateB/publicC', '/parenthesis/(a)[b]{c}d', '/parenthesis/(a)[b]{c}d/public', '/migratedD'],
},
isEmpty: false,
- grant: Page.GRANT_PUBLIC,
+ parent: { $ne: null },
});
- const migratedEmptyPages = await Page.find({
+ const nMigratedEmptyPages = await Page.count({
path: {
$in: ['/publicA/privateB', '/parenthesis'],
},
isEmpty: true,
- grant: Page.GRANT_PUBLIC,
+ parent: { $ne: null },
+ });
+ const nNonMigratedPages = await Page.count({
+ path: {
+ $in: ['/publicA/privateB'],
+ },
+ parent: null,
});
- expect(migratedPages.length).toBe(4);
- expect(migratedEmptyPages.length).toBe(2);
+ expect(nMigratedPages).toBe(5);
+ expect(nMigratedEmptyPages).toBe(2);
+ expect(nNonMigratedPages).toBe(1);
});
});
| 7 |
diff --git a/token-metadata/0x0f8794f66C7170c4f9163a8498371A747114f6C4/metadata.json b/token-metadata/0x0f8794f66C7170c4f9163a8498371A747114f6C4/metadata.json "symbol": "FMA",
"address": "0x0f8794f66C7170c4f9163a8498371A747114f6C4",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/docs/sphinx_greenlight_build.md b/docs/sphinx_greenlight_build.md @@ -67,8 +67,6 @@ index 79a01b68..fe5758af 100644
Also make the following modifications to `app.json`
-( Get the IP address of your raspberry pi to put in the `public_url` field with `hostname -I` )
-
```diff
diff --git a/config/app.json b/config/app.json
index 8255a2b5..07879e40 100644
@@ -80,21 +78,13 @@ index 8255a2b5..07879e40 100644
"production": {
+ "connect_ui": true,
+ "lightning_provider": "GREENLIGHT",
++ "logging": "TRIBES,MEME,NOTIFICATION,EXPRESS,NETWORK,DB,LSAT"
"senza_url": "https://staging.senza.us/api/v2/",
"macaroon_location": "/relay/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
- "tls_location": "/relay/.lnd/tls.cert",
"lnd_log_location": "/relay/.lnd/logs/bitcoin/mainnet/lnd.log",
"node_ip": "localhost",
"lnd_ip": "localhost",
-@@ -43,7 +44,7 @@
- "hub_check_invite_url": "https://hub.sphinx.chat/check_invite",
- "media_host": "memes.sphinx.chat",
- "tribes_host": "tribes.sphinx.chat",
-- "public_url": "",
-+ "public_url": "10.161.66.250:3001",
- "connection_string_path": "connection_string.txt",
- "ssl": {
- "enabled": false,
```
Finally, while still standing in the `config` directory, run
| 3 |
diff --git a/packages/yoroi-extension/chrome/extension/connector/api.js b/packages/yoroi-extension/chrome/extension/connector/api.js @@ -776,7 +776,7 @@ export async function connectorSignCardanoTx(
...requiredScriptSignKeys,
]);
- console.log('totalAdditionalRequiredSignKeys', JSON.stringify(totalAdditionalRequiredSignKeys));
+ console.log('totalAdditionalRequiredSignKeys', [...totalAdditionalRequiredSignKeys]);
const additionalSignaturesRequired = totalAdditionalRequiredSignKeys.size > 0;
const queryAllBaseAddresses = (): Promise<Array<FullAddressPayload>> => {
@@ -789,9 +789,20 @@ export async function connectorSignCardanoTx(
return Promise.resolve([]);
}
- const [utxos, allBaseAddresses] = await Promise.all([
+ const queryAllRewardAddresses = (): Promise<Array<FullAddressPayload>> => {
+ if (additionalSignaturesRequired) {
+ return getAllAddressesForDisplay({
+ publicDeriver,
+ type: CoreAddressTypes.CARDANO_REWARD,
+ });
+ }
+ return Promise.resolve([]);
+ }
+
+ const [utxos, allBaseAddresses, allRewardAddresses] = await Promise.all([
withHasUtxoChains.getAllUtxos(),
queryAllBaseAddresses(),
+ queryAllRewardAddresses(),
]);
const requiredTxSignAddresses = new Set<string>();
@@ -822,7 +833,7 @@ export async function connectorSignCardanoTx(
console.log('requiredAddress', requiredAddress.to_bech32());
requiredTxSignAddresses.add(bytesToHex(requiredAddress.to_bytes()));
}
- console.log('requiredTxSignAddresses', JSON.stringify(requiredTxSignAddresses));
+ console.log('requiredTxSignAddresses', [...requiredTxSignAddresses]);
for (const baseAddress of allBaseAddresses) {
const { address, addressing } = baseAddress;
if (requiredTxSignAddresses.delete(address)) {
@@ -832,7 +843,13 @@ export async function connectorSignCardanoTx(
break;
}
}
- console.log('otherRequiredSigners', JSON.stringify(otherRequiredSigners));
+ for (const rewardAddress of allRewardAddresses) {
+ const { address, addressing } = rewardAddress;
+ if (totalAdditionalRequiredSignKeys.has(address.slice(2))) {
+ otherRequiredSigners.push({ address, addressing });
+ }
+ }
+ console.log('otherRequiredSigners', [...otherRequiredSigners]);
}
const submittedTxs = loadSubmittedTransactions() || [];
| 11 |
diff --git a/articles/client-auth/v2/mobile-desktop.md b/articles/client-auth/v2/mobile-desktop.md @@ -138,3 +138,28 @@ Request Parameters:
* `code_verifier`: The cryptographically random key used to generate the `code_challenge` passed to the `/authorize` endpoint
* `code`: The authorization code received from the initial `authorize` call
* `redirect_uri`: the `redirect_uri` passed to `/authorize` (these two values must match exactly)
+
+If all goes well, you'll receive an HTTP 200 response with the following payload:
+
+```json
+{
+ "access_token":"eyJz93a...k4laUWw",
+ "refresh_token":"GEbRxBN...edjnXbL",
+ "id_token":"eyJ0XAi...4faeEoQ",
+ "token_type":"Bearer",
+ "expires_in":86400
+}
+```
+
+Note that Auth0 includes the `refresh_token` only if you've:
+
+* Included the `offline_access` scope in your initial call to the `authorize` endpoint;
+* Enabled **Allow Offline Access** for your API in the using the [API Settings tab](${manage_url}/#/apis) in the Auth0 Dashboard.
+
+#### The `id_token`
+
+Auth0's `id_token` is a [JSON Web Token (JWT)](/jwt) of type **Bearer** containing information about the user. You will need to decode this token to read the claims (or attributes) of the user. The JWT website provides a [list of libraries you can use to decode](https://jwt.io/#libraries-io) the `id_token`.
+
+If you would like additional information on JWTs, please visit our section on [JWT section](/jwt).
+
+Once you've decoded the JWT, you can extract user information from the `id_token` payload. The JSON payload contains the user claims (attributes), as well as metadata.
| 0 |
diff --git a/bin/logagent.js b/bin/logagent.js @@ -72,7 +72,7 @@ var moduleAlias = {
'drop-events': '../lib/plugins/output-filter/dropEventsFilter.js',
'docker-enrichment': '../lib/plugins/output-filter/docker-log-enrichment.js',
'kubernetes-enrichment': '../lib/plugins/output-filter/kubernetes-enrichment.js',
- 'geo-ip': '../lib/plugins/output-filter/geo-ip.js',
+ 'geoip': '../lib/plugins/output-filter/geo-ip.js',
// output plugins
'elasticsearch': '../lib/plugins/output/elasticsearch.js',
'slack-webhook': '../lib/plugins/output/slack-webhook.js',
| 10 |
diff --git a/test/support/assert.js b/test/support/assert.js @@ -48,7 +48,8 @@ assert.imageEqualsFile = function(buffer, referenceImageRelativeFilePath, tolera
if (err) {
var testImageFilePath = randomImagePath();
testImage.save(testImageFilePath);
- debug("Images didn't match, test image is %s, expected is %s", testImageFilePath, referenceImageFilePath);
+ debug(`Images didn't match. Test result: file://${testImageFilePath} Expected: file://${referenceImageFilePath}`);
+ debug(`Create a GIF with: convert -delay 50 -loop 0 ${testImageFilePath} ${referenceImageFilePath} /tmp/diff.gif`);
}
callback(err);
});
| 7 |
diff --git a/src/components/IOUConfirmationList.js b/src/components/IOUConfirmationList.js @@ -148,7 +148,7 @@ class IOUConfirmationList extends Component {
this.toggleOption = this.toggleOption.bind(this);
this.confirm = this.confirm.bind(this);
this.scrollToIndex = this.scrollToIndex.bind(this);
- this.maybeToggleIndex = this.maybeToggleIndex.bind(this);
+ this.maybeToggleParticipant = this.maybeToggleParticipant.bind(this);
}
componentDidMount() {
@@ -397,11 +397,13 @@ class IOUConfirmationList extends Component {
/**
* @param {Number} index
*/
- maybeToggleIndex(index) {
+ maybeToggleParticipant(index) {
+ // This can happen when the search bar is highlighted instead of an option from the list
if (!this.allOptions[index]) {
return;
}
+ // If this is a 1:1 request, there's no participant we can toggle, so return early
if (!this.props.hasMultipleParticipants) {
return;
}
@@ -420,7 +422,7 @@ class IOUConfirmationList extends Component {
initialFocusedIndex={this.allOptions.length}
listLength={this.allOptions.length + 1}
onFocusedIndexChanged={this.scrollToIndex}
- onEnterKeyPressed={this.maybeToggleIndex}
+ onEnterKeyPressed={this.maybeToggleParticipant}
shouldEnterKeyEventBubble={focusedIndex => !this.allOptions[focusedIndex]}
>
{({focusedIndex}) => (
| 10 |
diff --git a/packages/cx/src/charts/Bar.d.ts b/packages/cx/src/charts/Bar.d.ts @@ -17,6 +17,9 @@ interface BarProps extends ColumnBarBaseProps {
/** Base CSS class to be applied to the element. Defaults to `bar`. */
baseClass?: string,
+ /** Tooltip configuration. For more info see Tooltips. */
+ tooltip?: Cx.StringProp | Cx.StructuredProp
+
}
export class Bar extends Cx.Widget<BarProps> {}
\ No newline at end of file
| 0 |
diff --git a/src/components/form.js b/src/components/form.js @@ -103,6 +103,7 @@ module.exports = function(app) {
'</div>' +
'<form-builder-option property="customClass"></form-builder-option>' +
'<form-builder-option property="reference"></form-builder-option>' +
+ '<form-builder-option property="clearOnHide"></form-builder-option>' +
'<form-builder-option property="protected"></form-builder-option>' +
'<form-builder-option property="persistent"></form-builder-option>' +
'<form-builder-option property="encrypted"></form-builder-option>' +
| 11 |
diff --git a/assets/js/components/GoogleChart.js b/assets/js/components/GoogleChart.js @@ -63,7 +63,7 @@ export default function GoogleChart( props ) {
if ( onReady ) {
global.google.visualization.events.addListener( googleChart, 'ready', () => {
- onReady( googleChart, data );
+ onReady( googleChart );
} );
}
| 2 |
diff --git a/articles/quickstart/spa/react/02-custom-login.md b/articles/quickstart/spa/react/02-custom-login.md @@ -15,7 +15,7 @@ budicon: 448
In the [previous step](/quickstart/spa/react/01-login), we enabled login with Auth0's Lock widget. You can also build your own UI with a custom design for authentication if you like. To do this, use the [auth0.js library](https://github.com/auth0/auth0.js).
-::: panel-info Version Requirements
+::: panel Version Requirements
This quickstart and the accompanying sample demonstrate custom login with auth0.js version 8. If you are using auth0.js version 7, please see the [reference guide](https://auth0.com/docs/libraries/auth0js/v7) for the library, as well as the [legacy React custom login sample](https://github.com/auth0-samples/auth0-react-sample/tree/auth0js-v7/02-Custom-Login).
:::
| 14 |
diff --git a/src/builders/launch-query.js b/src/builders/launch-query.js @@ -16,13 +16,13 @@ module.exports = (req) => {
// eslint-disable-next-line no-underscore-dangle
query._id = ObjectId(req.query.flight_id);
}
- // Allow date range comparisons using a veriety of date formats
+ // Allow date range comparisons using a variety of date formats
if (req.query.start && (req.query.final || req.query.end)) {
let startParsed;
let endParsed;
- const re = /^[0-9]*$/; // Matches any string of consecutive numbers ex. 1520314380
- if (re.test(req.query.start && (req.query.final || req.query.end))) {
+ // Matches any string of consecutive numbers ex. 1520314380
// If the date is unix, it is converted to a compatible date constructor param
+ if (/^[0-9]*$/.test(req.query.start && (req.query.final || req.query.end))) {
startParsed = new Date(req.query.start * 1000);
endParsed = new Date(req.query.final * 1000 || req.query.end * 1000);
} else {
@@ -43,7 +43,13 @@ module.exports = (req) => {
query.launch_year = req.query.launch_year;
}
if (req.query.launch_date_utc) {
- query.launch_date_utc = req.query.launch_date_utc;
+ // Allow any valid date format
+ const date = new Date(req.query.launch_date_utc);
+ try {
+ query.launch_date_utc = date.toISOString();
+ } catch (e) {
+ console.log(e);
+ }
}
if (req.query.launch_date_local) {
query.launch_date_local = req.query.launch_date_local;
| 11 |
diff --git a/src/scene/scene.js b/src/scene/scene.js pc.extend(pc, function () {
/**
* @name pc.Scene
- * @class A scene is a container for {@link pc.Model} instances.
+ * @class A scene is graphical representation of an environment. It manages the scene hierarchy, all
+ * graphical objects, lights, and scene-wide properties.
* @description Creates a new Scene.
* @property {pc.Color} ambientLight The color of the scene's ambient light. Defaults to black (0, 0, 0).
* @property {String} fog The type of fog used by the scene. Can be:
@@ -260,6 +261,7 @@ pc.extend(pc, function () {
* <li>pc.FOG_EXP</li>
* <li>pc.FOG_EXP2</li>
* </ul>
+ * Defaults to pc.FOG_NONE.
* @property {pc.Color} fogColor The color of the fog (if enabled). Defaults to black (0, 0, 0).
* @property {Number} fogDensity The density of the fog (if enabled). This property is only valid if the
* fog property is set to pc.FOG_EXP or pc.FOG_EXP2. Defaults to 0.
@@ -284,16 +286,17 @@ pc.extend(pc, function () {
* Defaults to pc.TONEMAP_LINEAR.
* @property {pc.Texture} skybox A cube map texture used as the scene's skybox. Defaults to null.
* @property {Number} skyboxIntensity Multiplier for skybox intensity. Defaults to 1.
- * @property {Number} skyboxMip The mip level of the skybox to be displayed. Defaults to 0 (base level).
- * Only valid for prefiltered cubemap skyboxes.
- * @property {Number} lightmapSizeMultiplier Lightmap resolution multiplier
- * @property {Number} lightmapMaxResolution Maximum lightmap resolution
- * @property {Number} lightmapMode Baking mode, with possible values:
+ * @property {Number} skyboxMip The mip level of the skybox to be displayed. Only valid for prefiltered
+ * cubemap skyboxes. Defaults to 0 (base level).
+ * @property {Number} lightmapSizeMultiplier The lightmap resolution multiplier. Defaults to 1.
+ * @property {Number} lightmapMaxResolution The maximum lightmap resolution. Defaults to 2048.
+ * @property {Number} lightmapMode The lightmap baking mode. Can be:
* <ul>
* <li>pc.BAKE_COLOR: single color lightmap
* <li>pc.BAKE_COLORDIR: single color lightmap + dominant light direction (used for bump/specular)
* </ul>
- * Only lights with bakeDir=true will be used for generating the dominant light direction.
+ * Only lights with bakeDir=true will be used for generating the dominant light direction. Defaults to
+ * pc.BAKE_COLORDIR.
*/
var Scene = function Scene() {
this.root = null;
| 7 |
diff --git a/packages/@uppy/core/types/index.d.ts b/packages/@uppy/core/types/index.d.ts @@ -135,6 +135,12 @@ export interface Locale<TNames extends string = string> {
pluralize?: (n: number) => number
}
+export interface Logger {
+ debug: (...args: any[]) => void;
+ warn: (...args: any[]) => void;
+ error: (...args: any[]) => void;
+}
+
export interface Restrictions {
maxFileSize?: number | null
minFileSize?: number | null
@@ -148,6 +154,7 @@ export interface UppyOptions<TMeta extends IndexedObject<any> = Record<string, u
id?: string
autoProceed?: boolean
allowMultipleUploads?: boolean
+ logger?: Logger
debug?: boolean
restrictions?: Restrictions
meta?: TMeta
| 0 |
diff --git a/DeletedUsersHelper.user.js b/DeletedUsersHelper.user.js // @description Additional capability and improvements to display/handle deleted users
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.2.1
+// @version 1.3
//
// @include https://*stackoverflow.com/*
// @include https://*serverfault.com/*
}
+ // See also https://github.com/samliew/dynamic-width
$.fn.dynamicWidth = function () {
- $.each(this, function(i, el) {
- const $el = $(el);
- if (!$.fn.dynamicWidth.fakeEl) $.fn.dynamicWidth.fakeEl = $('<span>').hide().appendTo(document.body);
- $.fn.dynamicWidth.fakeEl.text(el.value || el.innerText || el.placeholder).css('font', $el.css('font'));
- $el.css('width', $.fn.dynamicWidth.fakeEl.width());
+ var plugin = $.fn.dynamicWidth;
+ if (!plugin.fakeEl) plugin.fakeEl = $('<span>').hide().appendTo(document.body);
+
+ function sizeToContent (el) {
+ var $el = $(el);
+ var cs = getComputedStyle(el);
+ plugin.fakeEl.text(el.value || el.innerText || el.placeholder).css('font', $el.css('font'));
+ $el.css('width', plugin.fakeEl.width() + parseFloat(cs.paddingLeft) + parseFloat(cs.paddingRight));
+ }
+
+ return this.each(function (i, el) {
+ sizeToContent(el);
+ $(el).on('change keypress keyup blur', evt => sizeToContent(evt.target));
});
- return this;
};
function formatDeletedUserPage() {
+
+ // Format info section
const pre = $('#mainbar-full pre');
const details = pre.text().split(/\r?\n/);
- const deldate = details[0].split('on ')[1].replace(/(\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+) PM/, '$3-0$1-0$2 0$4:0$5:0$6Z').replace(/\d(\d\d)/g, '$1');
+ const deldate = details[0].split('on ')[1].replace(/(\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+) [AP]M/, '$3-0$1-0$2 0$4:0$5:0$6Z').replace(/(?<=[^\d])\d?(\d\d)/g, '$1');
const username = details[1].match(/: ([^\(]+)/)[1].trim();
const userid = details[1].match(/\((\d+)\)/)[1];
const networkid = details[1].match(/=(\d+)\)/)[1];
const modname = details[1].match(/deleted by ([^\(]+)/)[1].trim();
const modid = details[1].match(/\((\d+)\)/g)[1].replace(/[^\d]+/g, '');
const lastip = details[details.length - 2].split(': ')[1];
- const reason = details.slice(2, details.length - 2).join('\n').replace('Reason: ', '')
- .replace(/(https?:\/\/[^\s\)]+)\b/gi, '<a href="$1" target="_blank">$1</a>');
+ const reason = details.slice(2, details.length - 2).join('\n').replace('Reason: ', '').replace(/(https?:\/\/[^\s\)]+)\b/gi, '<a href="$1" target="_blank">$1</a>');
const $html = $(`
<div class="del-user-info">
@@ -226,6 +235,12 @@ ${reason}</div>
.on('click dblclick', function() {
this.select();
});
+
+ // Format links section
+ $('#mainbar-full').next('a').wrap(`<div id="del-user-links"></div>`);
+ const userlinks = $('#del-user-links');
+ userlinks.append(`<a href="/admin/users-with-ip/${lastip}">Users with IP address "${lastip}"</a>`);
+ userlinks.append(`<a href="/admin/find-users?q=${username}">Search users with username "${username}"</a>`);
}
@@ -351,6 +366,9 @@ table#posts td {
white-space: pre-line;
margin: 20px 0;
}
+#del-user-links > a {
+ display: block;
+}
</style>
`;
$('body').append(styles);
| 1 |
diff --git a/articles/integrations/aws-api-gateway-2/part-1.md b/articles/integrations/aws-api-gateway-2/part-1.md @@ -6,7 +6,7 @@ toc: true
# AWS API Gateway Tutorial - Part 1
-::: note
+::: warning
This portion of the tutorial has been adapted from the [official AWS example](http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-from-example.html). Please refer to this example for in-depth notes and discussion.
:::
@@ -97,6 +97,8 @@ You'll be asked to provide the following values:
Once you've provided the appropriate values, click **Deploy** to proceed.
+
+
### Test the Deployment
When the API has successfully deployed, you'll be redirected to the **Test Stage Editor**. You can, at this point, test the API to see if it deployed correctly.
| 0 |
diff --git a/defaultConfig.js b/defaultConfig.js @@ -126,8 +126,8 @@ module.exports = {
|--------------------------------------------------------------------------
|
| The color palette defined above is also assigned to the "colors" key of
- | your Tailwind config. This makes it easy to access them your CSS using
- | Tailwind's config helper. For example:
+ | your Tailwind config. This makes it easy to access them in your CSS
+ | using Tailwind's config helper. For example:
|
| .error { color: config('colors.red') }
|
@@ -144,7 +144,8 @@ module.exports = {
| Screens in Tailwind are essentially CSS media queries. They define the
| responsive breakpoints for your project. By default Tailwind takes a
| "mobile first" approach, where each screen size represents a minimum
- | viewport width.
+ | viewport width. Feel free to have as few or as many screens as you
+ | want, naming them in whatever way you'd prefer for your project.
|
| Tailwind also allows for more complex screen definitions, which can be
| useful in certain situations. Be sure to read the full responsive
@@ -182,7 +183,7 @@ module.exports = {
fonts: {
'sans': '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue',
'serif': 'Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif',
- 'mono': '"SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
+ 'mono': 'Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
},
| 2 |
diff --git a/world.js b/world.js @@ -809,7 +809,7 @@ const _connectRoom = async (roomName, worldURL) => {
};
const objects = [];
-world.addObject = (contentId, parentId, position, quaternion) => {
+world.addObject = (contentId, parentId = null, position = new THREE.Vector3(), quaternion = new THREE.Quaternion(), options = {}) => {
state.transact(() => {
const instanceId = getRandomString();
const trackedObject = world.getTrackedObject(instanceId);
@@ -818,6 +818,7 @@ world.addObject = (contentId, parentId, position, quaternion) => {
trackedObject.set('contentId', contentId);
trackedObject.set('position', position.toArray());
trackedObject.set('quaternion', quaternion.toArray());
+ trackedObject.set('options', JSON.stringify(options));
});
};
world.removeObject = object => {
@@ -857,7 +858,8 @@ world.removeObject = object => {
world.addEventListener('trackedobjectadd', async e => {
const trackedObject = e.data;
const trackedObjectJson = trackedObject.toJSON();
- const {instanceId, parentId, contentId, position, quaternion} = trackedObjectJson;
+ const {instanceId, parentId, contentId, position, quaternion, options: optionsString} = trackedObjectJson;
+ const options = JSON.parse(optionsString);
const file = await (async () => {
if (typeof contentId === 'number') {
@@ -907,7 +909,7 @@ world.addEventListener('trackedobjectadd', async e => {
}
})();
if (file) {
- const mesh = await runtime.loadFile(file);
+ const mesh = await runtime.loadFile(file, options);
mesh.position.fromArray(position);
mesh.quaternion.fromArray(quaternion);
| 0 |
diff --git a/README.md b/README.md @@ -8,7 +8,7 @@ Fractal is a tool to help you **build** and **document** web component libraries
**Read the Fractal documentation at http://fractal.build/guide.**
-**Need help?** We have an active and helpful community on [Fractal's Slack workspace](https://slack.fractal.build/) - join us there for support and tips.
+**Need help?** We have an active and helpful community on [Fractal's Discord server](https://discord.gg/vuRz4Yx) - join us there for support and tips.
## Introduction
| 14 |
diff --git a/test/specs/dom_components/model/Symbols.js b/test/specs/dom_components/model/Symbols.js @@ -120,6 +120,13 @@ describe('Symbols', () => {
describe('Creating 3 symbols in the wrapper', () => {
let allInst, all, comp, symbol, compInitChild;
+
+ const getFirstInnSymbol = cmp =>
+ cmp
+ .components()
+ .at(0)
+ .__getSymbol();
+
beforeEach(() => {
comp = wrapper.append(compMultipleNodes)[0];
compInitChild = comp.components().length;
@@ -149,13 +156,18 @@ describe('Symbols', () => {
);
// Check symbol references
expect(added.__getSymbols().length).toBe(allInst.length);
+ allInst.forEach(cmp => expect(getFirstInnSymbol(cmp)).toBe(added));
});
test('Adding a new component to an instance of the symbol, it will be propogated to all symbols', () => {
- comp.append(simpleComp, { at: 0 })[0];
+ const added = comp.append(simpleComp, { at: 0 })[0];
all.forEach(cmp =>
expect(cmp.components().length).toBe(compInitChild + 1)
);
+ // Check symbol references
+ const addSymb = added.__getSymbol();
+ expect(symbol.components().at(0)).toBe(addSymb);
+ allInst.forEach(cmp => expect(getFirstInnSymbol(cmp)).toBe(addSymb));
});
test('Moving a new added component in the instance, will propagate the action in all symbols', () => {
@@ -166,14 +178,7 @@ describe('Symbols', () => {
// All symbols still have the same amount of components
all.forEach(cmp => expect(cmp.components().length).toBe(newChildLen));
// All instances refer to the same symbol
- allInst.forEach(cmp =>
- expect(
- cmp
- .components()
- .at(0)
- .__getSymbol()
- ).toBe(symbRef)
- );
+ allInst.forEach(cmp => expect(getFirstInnSymbol(cmp)).toBe(symbRef));
// The moved symbol contains all its instances
expect(
symbol
| 7 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js @@ -334,8 +334,7 @@ RED.deploy = (function() {
var invalidNodes = [];
RED.nodes.eachNode(function(node) {
- hasInvalid = hasInvalid || !node.valid;
- if (!node.valid) {
+ if (!node.valid && !node.d) {
invalidNodes.push(getNodeInfo(node));
}
if (node.type === "unknown") {
@@ -345,6 +344,7 @@ RED.deploy = (function() {
}
});
hasUnknown = unknownNodes.length > 0;
+ hasInvalid = invalidNodes.length > 0;
var unusedConfigNodes = [];
RED.nodes.eachConfig(function(node) {
| 8 |
diff --git a/src/storage_manager/config/config.js b/src/storage_manager/config/config.js @@ -53,7 +53,7 @@ module.exports = {
// set contentType paramater of $.ajax
// true: application/json; charset=utf-8'
// false: 'x-www-form-urlencoded'
- contentTypeJson: false,
+ contentTypeJson: true,
credentials: 'include'
};
| 12 |
diff --git a/packages/neutrine/src/widgets/toast/index.js b/packages/neutrine/src/widgets/toast/index.js @@ -22,7 +22,8 @@ export class Toast extends React.Component {
this.timer = null;
//Bind some methods
this.close = this.close.bind(this);
- this.display = this.display.bind(this);
+ this.show = this.show.bind(this);
+ //this.display = this.display.bind(this);
this.displayError = this.displayError.bind(this);
this.displayWarning = this.displayWarning.bind(this);
this.displaySuccess = this.displaySuccess.bind(this);
@@ -33,36 +34,30 @@ export class Toast extends React.Component {
return this.setState({"visible": false});
}
//Display a toast message
- display(color, message, time) {
+ show(options) {
let self = this;
//Check the provided time
- if (typeof time !== "number" || time <= 0) {
- time = this.props.timeout;
+ if (typeof options.timeout !== "number" || optionstimeout <= 0) {
+ options.timeout = this.props.timeout;
}
+ //Build the new state
+ let newState = {
+ "visible": true,
+ "color": options.type,
+ "message": options.message
+ };
//Display this toast message
- return this.setState({"visible": true, "color": color, "message": message}, function () {
+ return this.setState(newState, function () {
//Check if there are an active timer
if (self.timer) {
clearTimeout(self.timer);
}
//Register the new timer
- self.timer = delay(time, function () {
+ self.timer = delay(options.timeout, function () {
return self.setState({"visible": false});
});
});
}
- //Display an error message
- displayError(message, time) {
- return this.display("error", message, time);
- }
- //Display a warning message
- displayWarning(message, time) {
- return this.display("warning", message, time);
- }
- //Display a success message
- displaySuccess(message, time) {
- return this.display("success", message, time);
- }
//Build the alert element
renderAlert() {
let self = this;
@@ -94,3 +89,8 @@ Toast.defaultProps = {
"timeout": 5000
};
+//Create a new toaster component
+//export const createToaster = function (parent, props) {
+// //TODO
+//};
+
| 7 |
diff --git a/ui/src/components/Diagram/DiagramManageMenu.jsx b/ui/src/components/Diagram/DiagramManageMenu.jsx @@ -37,8 +37,8 @@ class CollectionManageMenu extends Component {
<Button icon="cog" onClick={this.toggleEdit}>
<FormattedMessage id="diagram.info.edit" defaultMessage="Settings" />
</Button>
- <Button icon="download" onClick={triggerDownload}>
- <FormattedMessage id="diagram.info.edit" defaultMessage="Download" />
+ <Button icon="export" onClick={triggerDownload}>
+ <FormattedMessage id="diagram.info.edit" defaultMessage="Export" />
</Button>
<Button icon="trash" onClick={this.toggleDelete}>
<FormattedMessage id="diagram.info.delete" defaultMessage="Delete" />
| 10 |
diff --git a/src/api-gateway/createAuthScheme.js b/src/api-gateway/createAuthScheme.js @@ -214,7 +214,6 @@ export default function createAuthScheme(
enhancedAuthContext,
principalId: policy.principalId,
usageIdentifierKey: policy.usageIdentifierKey,
- user: policy.principalId,
},
}),
)
| 2 |
diff --git a/src/app/Http/Controllers/CrudController.php b/src/app/Http/Controllers/CrudController.php @@ -89,7 +89,7 @@ class CrudController extends BaseController
*/
protected function setupConfigurationForCurrentOperation()
{
- $className = 'setup'.\Str::studly($this->crud->getCurrentOperation()).'Configuration';
+ $className = 'setup'.\Str::studly($this->crud->getCurrentOperation()).'Operation';
if (method_exists($this, $className)) {
$this->{$className}();
| 10 |
diff --git a/articles/protocols/saml/saml-apps/index.md b/articles/protocols/saml/saml-apps/index.md ---
description: This page lists SAML Configurations for various SSO integrations including Google Apps, Hosted Graphite, Litmos, Cisco Webex, Sprout Video, FreshDesk, Tableau Server, Datadog, Egencia, Workday and Pluralsight.
+toc: true
---
# SAML Configurations for SSO Integrations
@@ -24,9 +25,8 @@ description: This page lists SAML Configurations for various SSO integrations in
],
}
```
-**Callback URL**: `https://www.google.com/a/{YOUR-GOOGLE-DOMAIN}/acs`
----
+The **Callback URL** is `https://www.google.com/a/{YOUR-GOOGLE-DOMAIN}/acs`.
## Hosted Graphite
@@ -40,9 +40,7 @@ description: This page lists SAML Configurations for various SSO integrations in
}
```
-**Callback URL**: `https://www.hostedgraphite.com/complete/saml/{YOUR-USER-ID}/`
-
----
+The **Callback URL** is `https://www.hostedgraphite.com/complete/saml/{YOUR-USER-ID}/`.
## Litmos
@@ -70,9 +68,7 @@ description: This page lists SAML Configurations for various SSO integrations in
}
```
-**Callback URL**: `https://{YOUR DOMAIN}.litmos.com/integration/samllogin`
-
----
+The **Callback URL** is `https://{YOUR DOMAIN}.litmos.com/integration/samllogin`.
## Cisco WebEx
@@ -92,8 +88,6 @@ description: This page lists SAML Configurations for various SSO integrations in
}
```
----
-
## SproutVideo
```
@@ -113,9 +107,8 @@ description: This page lists SAML Configurations for various SSO integrations in
],
}
```
-**Callback URL**: `https://{YOUR SPROUT VIDEO ACCOUNT}.vids.io`
----
+The **Callback URL** is `https://{YOUR SPROUT VIDEO ACCOUNT}.vids.io`.
## FreshDesk
@@ -138,9 +131,7 @@ description: This page lists SAML Configurations for various SSO integrations in
}
```
-**Callback URL**: `https://{FD Domain}.freshdesk.com/login/saml`
-
----
+The **Callback URL** is `https://{FD Domain}.freshdesk.com/login/saml`.
## Tableau Server
@@ -167,9 +158,7 @@ description: This page lists SAML Configurations for various SSO integrations in
}
```
-**Callback URL**: `http://{YOUR TABLEAU SERVER}/wg/saml/SSO/index.html`
-
----
+The **Callback URL** is `http://{YOUR TABLEAU SERVER}/wg/saml/SSO/index.html`.
## Datadog
@@ -189,12 +178,10 @@ description: This page lists SAML Configurations for various SSO integrations in
}
```
-**Callback URL**: `https://app.datadoghq.com/account/saml/assertion`
+The **Callback URL** is `https://app.datadoghq.com/account/saml/assertion`.
Notice that Datadog has an option to automatically provision new users. Check [here](http://docs.datadoghq.com/guides/saml/) for more details.
----
-
## Egencia
```json
@@ -213,9 +200,7 @@ Notice that Datadog has an option to automatically provision new users. Check [h
}
```
-**Callback URL**: `https://www.egencia.com/auth/v1/artifactConsumer`
-
----
+The **Callback URL** is `https://www.egencia.com/auth/v1/artifactConsumer`.
## Workday
@@ -237,9 +222,7 @@ Notice that Datadog has an option to automatically provision new users. Check [h
}
```
-**Callback URL**: `https://impl.workday.com/<tenant>/fx/home.flex`
-
----
+The **Callback URL** is `https://impl.workday.com/<tenant>/fx/home.flex`.
## Pluralsight
@@ -263,9 +246,7 @@ Notice that Datadog has an option to automatically provision new users. Check [h
}
```
-**Callback URL**: `https://prod-pf.pluralsight.com/sp/ACS.saml2`
-
----
+The **Callback URL** is `https://prod-pf.pluralsight.com/sp/ACS.saml2`.
## Eloqua (Oracle Eloqua Marketing Cloud)
@@ -287,9 +268,8 @@ Notice that Datadog has an option to automatically provision new users. Check [h
```
-**Callback URL**: `https://login.eloqua.com/auth/saml2/acs`
+The **Callback URL** is `https://login.eloqua.com/auth/saml2/acs`.
::: note
The Service Provider Entity URL copied from within the IDP settings in Eloqua to set the audience restriction within Auth0.
:::
----
| 0 |
diff --git a/src/filters/filterselectorComponent.js b/src/filters/filterselectorComponent.js @@ -576,6 +576,7 @@ export class FilterSelectorController {
if (!dataSource) {
return;
}
+ panels.openToolPanel('filter', {state: true});
// A data source has been selected. Make sure the component is active.
if (!this.active) {
| 11 |
diff --git a/assets/js/components/ErrorNotice.test.js b/assets/js/components/ErrorNotice.test.js @@ -44,7 +44,9 @@ describe( 'ErrorNotice', () => {
);
} );
- afterEach( () => invalidateResolutionSpy.mockReset() );
+ afterEach( () => {
+ invalidateResolutionSpy.mockReset();
+ } );
it( "should not render the `Retry` button if the error's `selectorData.name` is not `getReport`", () => {
const { queryByText } = render(
| 4 |
diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js @@ -1852,7 +1852,14 @@ describe('Test axes', function() {
});
describe('handleTickValueDefaults', function() {
+ var viaTemplate;
+
function mockSupplyDefaults(axIn, axOut, axType) {
+ if(viaTemplate) {
+ axOut._template = axIn;
+ axIn = {};
+ }
+
function coerce(attr, dflt) {
return Lib.coerce(axIn, axOut, Cartesian.layoutAttributes, attr, dflt);
}
@@ -1860,7 +1867,13 @@ describe('Test axes', function() {
handleTickValueDefaults(axIn, axOut, coerce, axType);
}
- it('should set default tickmode correctly', function() {
+ [
+ '(without template) ',
+ '(with template) '
+ ].forEach(function(woTemplate, index) {
+ viaTemplate = index === 1;
+
+ it(woTemplate + 'should set default tickmode correctly', function() {
var axIn = {};
var axOut = {};
mockSupplyDefaults(axIn, axOut, 'linear');
@@ -1893,7 +1906,7 @@ describe('Test axes', function() {
expect(axIn.tickmode).toBeUndefined();
});
- it('should set nticks iff tickmode=auto', function() {
+ it(woTemplate + 'should set nticks iff tickmode=auto', function() {
var axIn = {};
var axOut = {};
mockSupplyDefaults(axIn, axOut, 'linear');
@@ -1910,7 +1923,7 @@ describe('Test axes', function() {
expect(axOut.nticks).toBe(undefined);
});
- it('should set tick0 and dtick iff tickmode=linear', function() {
+ it(woTemplate + 'should set tick0 and dtick iff tickmode=linear', function() {
var axIn = {tickmode: 'auto', tick0: 1, dtick: 1};
var axOut = {};
mockSupplyDefaults(axIn, axOut, 'linear');
@@ -1936,7 +1949,7 @@ describe('Test axes', function() {
expect(axOut.dtick).toBe(0.00159);
});
- it('should handle tick0 and dtick for date axes', function() {
+ it(woTemplate + 'should handle tick0 and dtick for date axes', function() {
var someMs = 123456789;
var someMsDate = Lib.ms2DateTimeLocal(someMs);
var oneDay = 24 * 3600 * 1000;
@@ -1982,7 +1995,7 @@ describe('Test axes', function() {
});
});
- it('should handle tick0 and dtick for log axes', function() {
+ it(woTemplate + 'should handle tick0 and dtick for log axes', function() {
var axIn = {tick0: '0.2', dtick: 0.3};
var axOut = {};
mockSupplyDefaults(axIn, axOut, 'log');
@@ -2027,7 +2040,7 @@ describe('Test axes', function() {
});
});
- it('should set tickvals and ticktext iff tickmode=array', function() {
+ it(woTemplate + 'should set tickvals and ticktext iff tickmode=array', function() {
var axIn = {tickmode: 'auto', tickvals: [1, 2, 3], ticktext: ['4', '5', '6']};
var axOut = {};
mockSupplyDefaults(axIn, axOut, 'linear');
@@ -2041,7 +2054,7 @@ describe('Test axes', function() {
expect(axOut.ticktext).toEqual(['who', 'do', 'we', 'appreciate']);
});
- it('should not coerce ticktext/tickvals on multicategory axes', function() {
+ it(woTemplate + 'should not coerce ticktext/tickvals on multicategory axes', function() {
var axIn = {tickvals: [1, 2, 3], ticktext: ['4', '5', '6']};
var axOut = {};
mockSupplyDefaults(axIn, axOut, 'multicategory');
@@ -2049,6 +2062,7 @@ describe('Test axes', function() {
expect(axOut.ticktext).toBe(undefined);
});
});
+ });
describe('saveRangeInitial', function() {
var saveRangeInitial = Axes.saveRangeInitial;
| 0 |
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml -name: Mark stale issues and pull requests
-
+name: "Mark stale issues and pull requests"
on:
schedule:
- cron: "30 1 * * *"
-
jobs:
stale:
-
runs-on: ubuntu-latest
-
steps:
- uses: actions/stale@v3
with:
| 1 |
diff --git a/docs/articles/documentation/test-api/assertions/README.md b/docs/articles/documentation/test-api/assertions/README.md @@ -97,7 +97,7 @@ The following web page is an example:
<script>
var btn = document.getElementById('btn');
-btn.addEventListener(function() {
+btn.addEventListener('click', function() {
window.setTimeout(function() {
btn.innerText = 'Loading...';
}, 100);
| 1 |
diff --git a/pages/app/MyRW.js b/pages/app/MyRW.js @@ -28,7 +28,7 @@ const MYRW_TABS = [{
label: 'Datasets',
value: 'datasets',
route: 'myrw',
- params: { tab: 'datasets' }
+ params: { tab: 'datasets', subtab: 'my_datasets' }
}, {
label: 'Widgets',
value: 'widgets',
| 12 |
diff --git a/test/www/jxcore/bv_tests/testThaliNotificationClient.js b/test/www/jxcore/bv_tests/testThaliNotificationClient.js @@ -446,6 +446,37 @@ test('Resolves an action locally', function (t) {
notificationClient._peerAvailabilityChanged(globals.TCPEvent);
});
+test('Ignores errors thrown by peerPool.enqueue', function (t) {
+ var getPeerHostInfoStub = stubGetPeerHostInfo();
+ var peerPool = {
+ enqueue: function () {
+ throw new Error('oops');
+ }
+ };
+
+ var notificationClient =
+ new ThaliNotificationClient(peerPool,
+ globals.sourceKeyExchangeObject, function () {});
+
+ notificationClient.start([]);
+
+ var TCPEvent = {
+ peerIdentifier: 'id3212',
+ peerAvailable: true,
+ newAddressPort: true,
+ generation: 0,
+ connectionType: ThaliMobileNativeWrapper.connectionTypes.TCP_NATIVE
+ };
+
+ t.doesNotThrow(function () {
+ notificationClient._peerAvailabilityChanged(TCPEvent);
+ });
+
+ notificationClient.stop();
+ getPeerHostInfoStub.restore();
+ t.end();
+});
+
test('Resolves an action locally using ThaliPeerPoolDefault', function (t) {
// Scenario:
| 0 |
diff --git a/packages/cli/src/models/compiler/Compiler.ts b/packages/cli/src/models/compiler/Compiler.ts @@ -7,8 +7,8 @@ import { CompilerOptions } from './solidity/SolidityContractsCompiler';
const log = new Logger('Compiler');
export default {
- async call(): Promise<void> {
- Truffle.isTruffleProject()
+ async call(): Promise<{ stdout: string, stderr: string } | void> {
+ return Truffle.isTruffleProject()
? this.compileWithTruffle()
: this.compileWithSolc();
},
| 0 |
diff --git a/public/viewjs/purchase.js b/public/viewjs/purchase.js @@ -45,7 +45,7 @@ $('#save-purchase-button').on('click', function(e)
jsonData.price = price;
}
- if (Grocy.UserSettings.show_purchased_date_on_purchase)
+ if (BoolVal(Grocy.UserSettings.show_purchased_date_on_purchase))
{
jsonData.purchased_date = Grocy.Components.DateTimePicker2.GetValue();
}
| 1 |
diff --git a/src/components/accounts/ledger/LedgerSignInModal.js b/src/components/accounts/ledger/LedgerSignInModal.js @@ -55,6 +55,10 @@ const AnimateList = styled.div`
background: #8fd6bd;
color: #1f825f;
}
+ &.confirm .status {
+ background: #6ad1e3;
+ color: #14889d;
+ }
&.pending .status {
background: #f4c898;
color: #ae6816;
| 9 |
diff --git a/src/selectors/base-selector.js b/src/selectors/base-selector.js @@ -173,15 +173,6 @@ class BaseSelector extends Component {
}
}
- getFocusedOptionId() {
- const filteredResults = this.filterSuggestions();
- const {highlightedSuggestionIndex} = this.state;
- if (filteredResults.length > 0 && highlightedSuggestionIndex > -1 && filteredResults.length > highlightedSuggestionIndex) {
- return `option-${filteredResults[highlightedSuggestionIndex].id}`;
- }
- return null;
- }
-
render() {
const {
value,
| 4 |
diff --git a/dc-worker.js b/dc-worker.js @@ -273,9 +273,9 @@ const _handleMethod = async ({method, args, instance: instanceKey, taskId}) => {
}
}
case 'setCamera': {
- const {instance: instanceKey, position, quaternion, projectionMatrix} = args;
+ const {instance: instanceKey, worldPosition, cameraPosition, cameraQuaternion, projectionMatrix} = args;
const instance = instances.get(instanceKey);
- dc.setCamera(instance, position, quaternion, projectionMatrix);
+ dc.setCamera(instance, worldPosition, cameraPosition, cameraQuaternion, projectionMatrix);
return true;
}
case 'setClipRange': {
| 0 |
diff --git a/token-metadata/0x679131F591B4f369acB8cd8c51E68596806c3916/metadata.json b/token-metadata/0x679131F591B4f369acB8cd8c51E68596806c3916/metadata.json "symbol": "TLN",
"address": "0x679131F591B4f369acB8cd8c51E68596806c3916",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -11,4 +11,4 @@ Alternatively, you can simply open up the index.html file and run it through the
## Adding Pages
-For now, you should refer to the [docute documentation](https://docute.js.org/#/home) in order to figure out how to add/edit existing pages. Or you can just copt/paste/modify some of the existing code in the `main.js` file. Honestly, this is just here as a placeholder; I'll edit it again later.
\ No newline at end of file
+For now, you should refer to the [docute documentation](https://docute.js.org/#/home) in order to figure out how to add/edit existing pages. Or you can just copy/paste/modify some of the existing code in the `main.js` file. Honestly, this is just here as a placeholder; I'll edit it again later.
| 1 |
diff --git a/token-metadata/0x3212b29E33587A00FB1C83346f5dBFA69A458923/metadata.json b/token-metadata/0x3212b29E33587A00FB1C83346f5dBFA69A458923/metadata.json "symbol": "IMBTC",
"address": "0x3212b29E33587A00FB1C83346f5dBFA69A458923",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/app/containers/ConnectDapp/ConnectDapp.jsx b/app/containers/ConnectDapp/ConnectDapp.jsx // @flow
import React, { useEffect, useState } from 'react'
import classNames from 'classnames'
-import { wallet } from '@cityofzion/neon-js-next'
+import { wallet, rpc } from '@cityofzion/neon-js-next'
import axios from 'axios'
import CloseButton from '../../components/CloseButton'
@@ -227,17 +227,22 @@ const ConnectDapp = ({
setFee(fee)
}
- const getContractManifest = async (invocation, chainId) => {
+ const getContractManifest = async invocation => {
setLoading(true)
- const hash = invocation.scriptHash
+
+ let endpoint = await getNode(net)
+ if (!endpoint) {
+ endpoint = await getRPCEndpoint(net)
+ }
+ const rpcClient = new rpc.RPCClient(endpoint)
+
const {
- data: {
manifest: { name, abi },
- },
- } = await axios.get(
- chainId.includes('mainnet')
- ? `https://dora.coz.io/api/v1/neo3/mainnet/contract/${hash}`
- : `https://dora.coz.io/api/v1/neo3/testnet_rc4/contract/${hash}`,
+ } = await rpcClient.execute(
+ new rpc.Query({
+ method: 'getcontractstate',
+ params: [invocation.scriptHash],
+ }),
)
setLoading(false)
return { name, abi }
@@ -245,10 +250,7 @@ const ConnectDapp = ({
const mapContractDataToInvocation = async request => {
for (const invocation of request.request.params.invocations) {
- const { name, abi } = await getContractManifest(
- invocation,
- request.chainId,
- )
+ const { name, abi } = await getContractManifest(invocation)
invocation.contract = {
name,
abi,
| 3 |
diff --git a/lib/targets/ios/tasks/list-devices.js b/lib/targets/ios/tasks/list-devices.js @@ -6,25 +6,26 @@ const deserializeDevices = function(stdout) {
if (stdout === undefined) { return devices; }
let list = stdout.split('\n');
- //First line is always 'known devices'
+
+ //First line is always '== Devices =='
list.shift();
- list.forEach((item) => {
- if (item.trim() === '') { return; }
- let split = item.split(/[(]|[[]/g);
+ for (let item of list) {
+ let line = item.trim();
- if (split[split.length - 1].includes('Simulator')) {
- return;
- }
+ if (line === '') { continue; }
+ if (line === '== Simulators ==') { break; }
+
+ let split = item.split(/[(]|[[]/g);
let deviceName = split[0].trim();
- //Cant exclude from instruments
+ //Cant exclude from device list
if (deviceName.includes('MacBook')) {
- return;
+ continue;
}
let apiVersion = split[1].replace(')', '').trim();
- let uuid = split[split.length - 1].replace(']', '').trim();
+ let uuid = split[split.length - 1].replace(')', '').trim();
let device = new Device({
platform: 'ios',
@@ -35,15 +36,15 @@ const deserializeDevices = function(stdout) {
});
devices.push(device);
- });
+ }
return devices;
};
module.exports = function() {
let list = [
- '/usr/bin/instruments',
- ['-s','devices']
+ '/usr/bin/xctrace',
+ ['list', 'devices']
];
return spawn(...list).then((output) => {
| 14 |
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 7.11.2 (unreleased)
-### Breaking
-
-### Feature
-
-- Increase z-index of `block-add-button` @steffenri
-
### Bugfix
- Fix `null` response issue when passing custom `Accept:` headers to actions #1771 @avoinea
- Removed all `<<<<<HEAD` artifacts from translations @steffenri
+- Increase z-index of `block-add-button` @steffenri
### Internal
| 6 |
diff --git a/docs/specs/dynamic-query-params.yaml b/docs/specs/dynamic-query-params.yaml @@ -9,7 +9,11 @@ paths:
- Query Params
summary: Various ways to pass query params
description: >
- Following OpenAPI spec demnstrate various ways to pass query params. It os also possible to create dynamic query params from the keys of an object
+ Following OpenAPI spec demonstrate various ways to pass query params.
+ - you may pass predefined query params
+ - you may create dynamic query params by defining a query-param as an object,
+ in that case each key of the object will be treated as a seperate param
+ - Array serialization depends on `style` and `explode` property
```
openapi: 3.0.0
| 7 |
diff --git a/static/css/app.css b/static/css/app.css @@ -726,3 +726,13 @@ input[type=number]::-webkit-outer-spin-button {
flex-direction: column;
align-items: center;
}
+
+/**
+* Maps
+**/
+#siteMap {
+ min-height: 400px;
+ /* The height is 400 pixels */
+ width: 100%;
+ /* The width is the width of the web page */
+}
\ No newline at end of file
| 0 |
diff --git a/lib/core/plugin.js b/lib/core/plugin.js @@ -24,7 +24,6 @@ var Plugin = function(options) {
this.pluginTypes = [];
this.uploadCmds = [];
this.apiCalls = [];
- this.processes = [];
this.imports = [];
this.embarkjs_code = [];
this.embarkjs_init_code = {};
@@ -232,11 +231,6 @@ Plugin.prototype.registerAPICall = function(method, endpoint, cb) {
this.addPluginType('apiCalls');
};
-Plugin.prototype.registerProcess = function(processName) {
- this.processes.push({processName});
- this.addPluginType('processes');
-};
-
Plugin.prototype.runFilePipeline = function() {
var self = this;
| 2 |
diff --git a/src/compiler/nodes.imba1 b/src/compiler/nodes.imba1 @@ -7444,11 +7444,12 @@ export class TagModifier < TagPart
@name.traverse
@name = @name.value
- if @name isa IsolatedFunc # not to be isolated for tsc
+ if @name isa Func # not to be isolated for tsc
let evparam = @name.params.at(0,yes,'e')
let stateparam = @name.params.at(1,yes,'$')
@name.traverse
+ if @name isa IsolatedFunc
@value = @name
@name = STR('$_')
@params = ListNode.new([@value].concat(@value.leaks or []))
@@ -7476,7 +7477,19 @@ export class TagModifier < TagPart
def js
if STACK.tsc
- return params ? params.c : quoted
+ if @name isa Func
+ return "(" + @name.c + ")(e,\{\})"
+ # let key =
+ let key = quoted.slice(1,-1).split('-')
+ # let op = OP('.',LIT('e.MODIFIERS'),@name)
+ # return "{op.c}({params ? params.c : ''})"
+ let call = "{M(key[0],@name)}({params ? params.c : ''})"
+
+ if !params or params.count == 0
+ call = M(call,@name)
+ # need to deal with emit- flag- etc in another way
+ return "e.MODIFIERS.{call}"
+ # return params ? params.c : quoted
if params and params.count > 0
"[{quoted},{params.c}]"
@@ -7584,6 +7597,11 @@ export class TagHandler < TagPart
def js o
if STACK.tsc
+ let out = "{@tag.tvar}.addEventListener({quoted},(e)=>" + '{\n'
+ for mod in modifiers
+ out += mod.c + ';\n'
+ out += '})'
+ return out
return "[{quoted},{modifiers.c}]"
return "on$({quoted},{modifiers.c},{scope__.context.c})"
@@ -7611,7 +7629,7 @@ class TagHandlerCallback < ValueNode
value = (STACK.tsc ? Func : IsolatedFunc).new([],[val],null,{})
- if value isa IsolatedFunc
+ if value isa Func
let evparam = value.params.at(0,yes,'e')
let stateparam = value.params.at(1,yes,'$')
| 7 |
diff --git a/src/utils/wallet.js b/src/utils/wallet.js @@ -750,7 +750,12 @@ class Wallet {
const { publicKey, secretKey } = parseSeedPhrase(seedPhrase)
const tempKeyStore = new nearApiJs.keyStores.InMemoryKeyStore()
- const accountIds = accountId ? [accountId] : await getAccountIds(publicKey)
+ let accountIds = [accountId]
+ if (!accountId) {
+ accountIds = await getAccountIds(publicKey)
+ const implicitAccountId = Buffer.from(PublicKey.fromString(publicKey).data).toString('hex')
+ accountIds.push(implicitAccountId)
+ }
const connection = nearApiJs.Connection.fromConfig({
networkId: NETWORK_ID,
| 11 |
diff --git a/src/struct/Command.js b/src/struct/Command.js @@ -23,8 +23,8 @@ const { ArgumentMatches, ArgumentSplits } = require('../util/Constants');
* <br>The exec function is <code>((message, edited) => {})</code>.
* @prop {PromptOptions} [defaultPrompt={}] - The default prompt options.
* @prop {Object} [options={}] - An object for custom options.
- * @prop {string|string[]} [description=''] - Description of the command.
* <br>Accessible with Command#options.
+ * @prop {string|string[]} [description=''] - Description of the command.
*/
/**
| 5 |
diff --git a/src/createReduxForm.js b/src/createReduxForm.js @@ -998,8 +998,8 @@ const createReduxForm = (structure: Structure<*, *>) => {
const pristine = shouldResetValues || deepEqual(initial, values)
const asyncErrors = getIn(formState, 'asyncErrors')
- const syncErrors = getIn(formState, 'syncErrors') || {}
- const syncWarnings = getIn(formState, 'syncWarnings') || {}
+ const syncErrors = getIn(formState, 'syncErrors') || plain.empty
+ const syncWarnings = getIn(formState, 'syncWarnings') || plain.empty
const registeredFields = getIn(formState, 'registeredFields')
const valid = isValid(form, getFormState, false)(state)
const validExceptSubmit = isValid(form, getFormState, true)(state)
| 4 |
diff --git a/util.js b/util.js @@ -369,4 +369,18 @@ export function convertMeshToPhysicsMesh(mesh) {
const newGeometry = BufferGeometryUtils.mergeBufferGeometries(newGeometries);
const physicsMesh = new THREE.Mesh(newGeometry);
return physicsMesh;
-};
\ No newline at end of file
+}
+
+export function parseCoord(s) {
+ if (s) {
+ const split = s.match(/^\[(-?[0-9\.]+),(-?[0-9\.]+),(-?[0-9\.]+)\]$/);
+ let x, y, z;
+ if (split && !isNaN(x = parseFloat(split[1])) && !isNaN(y = parseFloat(split[2])) && !isNaN(z = parseFloat(split[3]))) {
+ return new THREE.Vector3(x, y, z);
+ } else {
+ return null;
+ }
+ } else {
+ return null;
+ }
+}
\ No newline at end of file
| 0 |
diff --git a/app/components/DepositWithdraw/blocktrades/BlockTradesBridgeDepositRequest.jsx b/app/components/DepositWithdraw/blocktrades/BlockTradesBridgeDepositRequest.jsx @@ -701,8 +701,12 @@ class BlockTradesBridgeDepositRequest extends React.Component {
output_coin_info.backingCoinType !=
pair.inputCoinType &&
input_coin_info &&
- input_coin_info.restricted == false &&
- output_coin_info.restricted == false
+ ((input_coin_info.restricted == false &&
+ output_coin_info.restricted == false) ||
+ (input_coin_info.restricted == true &&
+ input_coin_info.authorized == true) ||
+ (output_coin_info.restricted == true &&
+ output_coin_info.authorized == true))
) {
// filter out mappings where one of the wallets is offline
if (
| 11 |
diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md @@ -69,5 +69,5 @@ Please take o look at the [video]( https://www.youtube.com/watch?v=bxdC7MfrO7A&t
- [Node.js i18n](https://github.com/nodejs/i18n) repo
- [nodejs/node](https://github.com/nodejs/node/tree/master/doc) repository
- [Crowdin](https://crowdin.com/)
-- [Node.js Slack Community](http://node-js.slack.com) ([register](http://www.nodeslackers.com/)) There is _#i18n_ channel.
+- [Node.js Slack Community](http://node-js.slack.com) - After [registering](http://www.nodeslackers.com/), join us in the [#i18n](https://node-js.slack.com/messages/C8S7FCNR1) channel.
| 1 |
diff --git a/app/features/selectable.js b/app/features/selectable.js @@ -467,7 +467,7 @@ export function Selectable() {
hover_state.target = el
hover_state.element = no_hover
- ? null
+ ? createCorners(el)
: createHover(el)
hover_state.label = no_label
@@ -616,6 +616,19 @@ export function Selectable() {
}
}
+ const createCorners = el => {
+ if (!el.hasAttribute('data-pseudo-select') && !el.hasAttribute('data-label-id')) {
+ if (hover_state.element)
+ hover_state.element.remove()
+
+ hover_state.element = document.createElement('visbug-corners')
+ document.body.appendChild(hover_state.element)
+ hover_state.element.position = {el}
+
+ return hover_state.element
+ }
+ }
+
const setHandle = (el, handle) => {
handle.position = {
el,
| 4 |
diff --git a/src/client/js/legacy/crowi.js b/src/client/js/legacy/crowi.js @@ -371,6 +371,7 @@ $(function() {
.done(function(res) {
// error
if (!res.ok) {
+ $('#renamePage .msg, #unportalize .msg').hide();
$(`#renamePage .msg-${res.code}, #unportalize .msg-${res.code}`).show();
$('#renamePage #linkToNewPage, #unportalize #linkToNewPage').html(`
<a href="${nameValueMap.new_path}">${nameValueMap.new_path} <i class="icon-login"></i></a>
@@ -405,6 +406,7 @@ $(function() {
}).done(function(res) {
// error
if (!res.ok) {
+ $('#duplicatePage .msg').hide();
$(`#duplicatePage .msg-${res.code}`).show();
$('#duplicatePage #linkToNewPage').html(`
<a href="${nameValueMap.new_path}">${nameValueMap.new_path} <i class="icon-login"></i></a>
@@ -432,6 +434,7 @@ $(function() {
}).done(function(res) {
// error
if (!res.ok) {
+ $('#deletePage .msg').hide();
$(`#deletePage .msg-${res.code}`).show();
}
else {
| 7 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -58,6 +58,7 @@ const animationsSelectMap = {
'Rifle Idle.fbx': new THREE.Vector3(0, Infinity, 0),
'Standing Torch Idle 01.fbx': new THREE.Vector3(0, Infinity, 0),
'standing melee attack downward.fbx': new THREE.Vector3(0, Infinity, 0),
+ 'sword and shield idle.fbx': new THREE.Vector3(0, Infinity, 0),
'sword and shield slash.fbx': new THREE.Vector3(0, Infinity, 0),
'sword and shield attack (4).fbx': new THREE.Vector3(0, Infinity, 0),
'One Hand Sword Combo.fbx': new THREE.Vector3(0, Infinity, 0),
@@ -98,6 +99,7 @@ const animationsDistanceMap = {
'Rifle Idle.fbx': new THREE.Vector3(0, Infinity, 0),
'Standing Torch Idle 01.fbx': new THREE.Vector3(0, Infinity, 0),
'standing melee attack downward.fbx': new THREE.Vector3(0, Infinity, 0),
+ 'sword and shield idle.fbx': new THREE.Vector3(0, Infinity, 0),
'sword and shield slash.fbx': new THREE.Vector3(0, Infinity, 0),
'sword and shield attack (4).fbx': new THREE.Vector3(0, Infinity, 0),
'One Hand Sword Combo.fbx': new THREE.Vector3(0, Infinity, 0),
@@ -139,6 +141,7 @@ let animations;
`Rifle Idle.fbx`,
`Standing Torch Idle 01.fbx`,
`standing melee attack downward.fbx`,
+ `sword and shield idle.fbx`,
`sword and shield slash.fbx`,
`sword and shield attack (4).fbx`,
`One Hand Sword Combo.fbx`,
| 0 |
diff --git a/server/migrations.js b/server/migrations.js @@ -518,7 +518,7 @@ Migrations.add('add-templates', () => {
});
});
-Migrations.add('fix-circular-reference', () => {
+Migrations.add('fix-circular-reference_', () => {
Cards.find().forEach((card) => {
if (card.parentId === card._id) {
Cards.update(card._id, {$set: {parentId: ''}}, noValidateMulti);
| 10 |
diff --git a/spec/connectors/importer_spec.rb b/spec/connectors/importer_spec.rb @@ -512,24 +512,6 @@ describe CartoDB::Connector::Importer do
map.center.should eq "[39.75365697136308, -2.318115234375]"
end
- it 'fails to import a visualization export if public map quota is exceeded' do
- filepath = "#{Rails.root}/services/importer/spec/fixtures/visualization_export_with_csv_table.carto"
-
- Carto::User.any_instance.stubs(:public_map_quota).returns(0)
- @data_import = DataImport.create(
- user_id: @user.id,
- data_source: filepath,
- updated_at: Time.now.utc,
- append: false,
- create_visualization: true
- )
- @data_import.values[:data_source] = filepath
- expect { @data_import.run_import! }.to raise_error('Public map quota exceeded')
- @data_import.success.should eq false
- @data_import.error_code.should eq 8007
- Carto::User.any_instance.unstub(:public_map_quota)
- end
-
it 'imports a visualization export when the table already exists' do
@existing_table = create_table(name: 'twitter_t3chfest_reduced', user_id: @user.id)
filepath = "#{Rails.root}/services/importer/spec/fixtures/visualization_export_with_csv_table.carto"
@@ -712,5 +694,23 @@ describe CartoDB::Connector::Importer do
canonical_layer = user_table.visualization.data_layers.first
canonical_layer.user_tables.count.should eq 1
end
+
+ it 'fails to import a visualization export if public map quota is exceeded' do
+ filepath = "#{Rails.root}/services/importer/spec/fixtures/visualization_export_with_csv_table.carto"
+
+ Carto::User.any_instance.stubs(:public_map_quota).returns(0)
+ @data_import = DataImport.create(
+ user_id: @user.id,
+ data_source: filepath,
+ updated_at: Time.now.utc,
+ append: false,
+ create_visualization: true
+ )
+ @data_import.values[:data_source] = filepath
+ expect { @data_import.run_import! }.to raise_error('Public map quota exceeded')
+ @data_import.success.should eq false
+ @data_import.error_code.should eq 8007
+ Carto::User.any_instance.unstub(:public_map_quota)
+ end
end
end
| 5 |
diff --git a/src/apps.json b/src/apps.json "html": "Powered by <a href=\"[^>]+SilverStripe",
"icon": "SilverStripe.svg",
"meta": {
- "generator": "SilverStripe"
+ "generator": "^SilverStripe"
},
- "website": "http://www.silverstripe.org"
+ "implies": "PHP",
+ "website": "https://www.silverstripe.org"
},
"SimpleHTTP": {
"cats": [
| 7 |
diff --git a/dom-renderer.jsx b/dom-renderer.jsx import * as THREE from 'three';
-import {sceneLowerPriority} from './renderer.js';
+// import {sceneLowerPriority} from './renderer.js';
import easing from './easing.js';
+import physicsManager from './physics-manager.js';
const cubicBezier = easing(0, 1, 0, 1);
@@ -36,6 +37,21 @@ class DomItem extends THREE.Object3D {
iframeMesh.name = 'domPunchThroughNode';
this.iframeMesh = iframeMesh;
floatNode.add(iframeMesh);
+
+ const p = position;
+ const q = quaternion;
+ const hs = new THREE.Vector3(iframeMesh.worldWidth, iframeMesh.worldHeight, 0.01)
+ .multiplyScalar(0.5);
+ const dynamic = false;
+ const physicsObject = physicsManager.addBoxGeometry(
+ p,
+ q,
+ hs,
+ dynamic
+ );
+ physicsManager.disableActor(physicsObject);
+ physicsManager.disableGeometryQueries(physicsObject);
+ this.physicsObject = physicsObject;
}
startAnimation(enabled, startTime, endTime) {
this.enabled = enabled;
@@ -73,11 +89,32 @@ class DomItem extends THREE.Object3D {
this.iframeMesh.material.opacity = 1 - this.value;
+ this.physicsObject.position.setFromMatrixPosition(this.iframeMesh.matrixWorld);
+ this.physicsObject.quaternion.setFromRotationMatrix(this.iframeMesh.matrixWorld);
+ this.physicsObject.updateMatrixWorld();
+ physicsManager.setTransform(this.physicsObject);
+
this.visible = true;
} else {
this.visible = false;
}
}
+ onBeforeRaycast() {
+ if (this.enabled) {
+ physicsManager.enableActor(this.physicsObject);
+ physicsManager.enableGeometryQueries(this.physicsObject);
+ }
+ }
+ onAfterRaycast() {
+ if (this.enabled) {
+ physicsManager.disableActor(this.physicsObject);
+ physicsManager.disableGeometryQueries(this.physicsObject);
+ }
+ }
+ destroy() {
+ physicsManager.enableActor(this.physicsObject);
+ physicsManager.removeGeometry(this.physicsObject);
+ }
}
class IFrameMesh extends THREE.Mesh {
@@ -86,7 +123,9 @@ class IFrameMesh extends THREE.Mesh {
height,
}) {
const scaleFactor = DomRenderEngine.getScaleFactor(width, height);
- const geometry = new THREE.PlaneBufferGeometry(width * scaleFactor, height * scaleFactor);
+ const worldWidth = width * scaleFactor;
+ const worldHeight = height * scaleFactor;
+ const geometry = new THREE.PlaneBufferGeometry(worldWidth, worldHeight);
const material = new THREE.MeshBasicMaterial({
color: 0xFFFFFF,
side: THREE.DoubleSide,
@@ -105,6 +144,8 @@ class IFrameMesh extends THREE.Mesh {
const context = renderer.getContext();
context.enable(context.SAMPLE_ALPHA_TO_COVERAGE);
};
+ this.worldWidth = worldWidth;
+ this.worldHeight = worldHeight;
}
}
@@ -113,6 +154,8 @@ export class DomRenderEngine extends EventTarget {
super();
this.doms = [];
+ this.physicsObjects = [];
+ this.lastHover = false;
}
static getScaleFactor(width, height) {
return Math.min(1/width, 1/height);
@@ -127,8 +170,8 @@ export class DomRenderEngine extends EventTarget {
render = () => (<div />),
}) {
const dom = new DomItem(position, quaternion, scale, width, height, worldWidth, render);
-
this.doms.push(dom);
+ this.physicsObjects.push(dom.physicsObject);
this.dispatchEvent(new MessageEvent('update'));
@@ -138,6 +181,34 @@ export class DomRenderEngine extends EventTarget {
const index = this.doms.indexOf(dom);
if (index !== -1) {
this.doms.splice(index, 1);
+ this.physicsObjects.splice(index, 1);
+ }
+ }
+ /* update() {
+ const hover = this.doms.some(dom => {
+ return false;
+ });
+ if (hover !== this.lastHover) {
+ this.lastHover = hover;
+
+ this.dispatchEvent(new MessageEvent('hover', {
+ data: {
+ hover,
+ },
+ }));
+ }
+ } */
+ getPhysicsObjects() {
+ return this.physicsObjects;
+ }
+ onBeforeRaycast() {
+ for (const dom of this.doms) {
+ dom.onBeforeRaycast();
+ }
+ }
+ onAfterRaycast() {
+ for (const dom of this.doms) {
+ dom.onAfterRaycast();
}
}
destroy() {
| 0 |
diff --git a/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs b/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs @@ -586,7 +586,11 @@ _%>
<%_ if (searchEngine === 'elasticsearch') { _%>
// Validate the <%= entityClass %> in Elasticsearch
+ <%_ if (service !== 'no' && dto !== 'mapstruct') { _%>
verify(mock<%= entityClass %>SearchRepository, times(2)).save(<%= asEntity(entityInstance) %>);
+<%_ } else { _%>
+ verify(mock<%= entityClass %>SearchRepository, times(1)).save(<%= asEntity(entityInstance) %>);
+<%_ } _%>
<%_ } _%>
}
<%_ } _%>
| 1 |
diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js @@ -4222,6 +4222,123 @@ describe('Test axes', function() {
]);
});
+ it('should discard coords within break bounds - date hour case of [23, 1]', function() {
+ _calc({
+ x: [
+ '2020-01-01 22',
+ '2020-01-01 23',
+ '2020-01-01 23:30',
+ '2020-01-01 23:59',
+ '2020-01-01 23:59:30',
+ '2020-01-01 23:59:59',
+ '2020-01-02 00:00:00',
+ '2020-01-02 00:00:01',
+ '2020-01-02 00:00:30',
+ '2020-01-02 00:30',
+ '2020-01-02 01',
+ '2020-01-02 02'
+ ]
+ }, {
+ xaxis: {
+ rangebreaks: [
+ {pattern: 'hour', bounds: [23, 1], operation: '()'}
+ ]
+ }
+ });
+ _assert('with dflt operation', [
+ Lib.dateTime2ms('2020-01-01 22'),
+ Lib.dateTime2ms('2020-01-01 23'),
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ Lib.dateTime2ms('2020-01-02 01'),
+ Lib.dateTime2ms('2020-01-02 02')
+ ]);
+ });
+
+ it('should discard coords within break bounds - date hour case of [23, 0]', function() {
+ _calc({
+ x: [
+ '2020-01-01 22',
+ '2020-01-01 23',
+ '2020-01-01 23:30',
+ '2020-01-01 23:59',
+ '2020-01-01 23:59:30',
+ '2020-01-01 23:59:59',
+ '2020-01-02 00:00:00',
+ '2020-01-02 00:00:01',
+ '2020-01-02 00:00:30',
+ '2020-01-02 00:30',
+ '2020-01-02 01',
+ '2020-01-02 02'
+ ]
+ }, {
+ xaxis: {
+ rangebreaks: [
+ {pattern: 'hour', bounds: [23, 0], operation: '()'}
+ ]
+ }
+ });
+ _assert('with dflt operation', [
+ Lib.dateTime2ms('2020-01-01 22'),
+ Lib.dateTime2ms('2020-01-01 23'),
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ Lib.dateTime2ms('2020-01-02 00:00:00'),
+ Lib.dateTime2ms('2020-01-02 00:00:01'),
+ Lib.dateTime2ms('2020-01-02 00:00:30'),
+ Lib.dateTime2ms('2020-01-02 00:30'),
+ Lib.dateTime2ms('2020-01-02 01'),
+ Lib.dateTime2ms('2020-01-02 02')
+ ]);
+ });
+
+ it('should discard coords within break bounds - date hour case of [23, 24]', function() {
+ _calc({
+ x: [
+ '2020-01-01 22',
+ '2020-01-01 23',
+ '2020-01-01 23:30',
+ '2020-01-01 23:59',
+ '2020-01-01 23:59:30',
+ '2020-01-01 23:59:59',
+ '2020-01-02 00:00:00',
+ '2020-01-02 00:00:01',
+ '2020-01-02 00:00:30',
+ '2020-01-02 00:30',
+ '2020-01-02 01',
+ '2020-01-02 02'
+ ]
+ }, {
+ xaxis: {
+ rangebreaks: [
+ {pattern: 'hour', bounds: [23, 24], operation: '()'}
+ ]
+ }
+ });
+ _assert('with dflt operation', [
+ Lib.dateTime2ms('2020-01-01 22'),
+ Lib.dateTime2ms('2020-01-01 23'),
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ BADNUM,
+ Lib.dateTime2ms('2020-01-02 00:00:00'),
+ Lib.dateTime2ms('2020-01-02 00:00:01'),
+ Lib.dateTime2ms('2020-01-02 00:00:30'),
+ Lib.dateTime2ms('2020-01-02 00:30'),
+ Lib.dateTime2ms('2020-01-02 01'),
+ Lib.dateTime2ms('2020-01-02 02')
+ ]);
+ });
+
it('should discard coords within [values[i], values[i] + dvalue] bounds', function() {
var x = [
// Thursday
| 0 |
diff --git a/src/components/general/map-gen/MapGen.jsx b/src/components/general/map-gen/MapGen.jsx import * as THREE from 'three';
import React, { useState, useEffect, useRef } from 'react';
-// import classnames from 'classnames';
+import classnames from 'classnames';
// import {world} from '../../../../world.js';
// import webaverse from '../../../../webaverse.js';
import {registerIoEventHandler, unregisterIoEventHandler} from '../../../IoHandler.jsx';
@@ -1402,12 +1402,8 @@ export const MapGen = ({
moved: false,
});
}
- /* function doubleClick(e) {
- e.preventDefault();
- e.stopPropagation();
- selectObject();
- } */
+ const selectedObjectName = selectedObject ? selectedObject.name : '';
return (
<div className={styles.mapGen}>
@@ -1417,11 +1413,12 @@ export const MapGen = ({
height={height}
className={styles.canvas}
onMouseDown={mouseDown}
- // onDoubleClick={doubleClick}
ref={canvasRef}
/>
) : null}
-
+ <div className={classnames(styles.sidebar, selectedObject ? styles.open : null)}>
+ <h1>{selectedObjectName}</h1>
+ </div>
</div>
);
};
\ No newline at end of file
| 0 |
End of preview. Expand
in Data Studio
No dataset card yet
- Downloads last month
- 54