code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/src/app.js b/src/app.js @@ -27,10 +27,15 @@ const app = express(feathers());
Sentry.init({
dsn: config.sentryDsn,
- // Set tracesSampleRate to 1.0 to capture 100%
- // of transactions for performance monitoring.
- // We recommend adjusting this value in production
- tracesSampleRate: 1.0,
+ // we want to capture 100% of errors
+ sampleRate: 1,
+
+ /**
+ * @see{@link https://docs.sentry.io/platforms/node/configuration/sampling/#setting-a-uniform-sample-rate}
+ */
+ // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
+ // But we recommend adjusting this value in production
+ tracesSampleRate: 0.1,
});
function initFeatherApp() {
| 12 |
diff --git a/src/technologies/u.json b/src/technologies/u.json 67
],
"description": "Usercentrics is a SaaS enterprise solution for Consent Management (CMP) that helps enterprise customers to obtain, manage and document the user consent.",
+ "dom": "link[href*='app.usercentrics.eu'], script[data-usercentrics]",
"icon": "Usercentrics.svg",
"js": {
"usercentrics.appVersion": "([\\d.]+)\\;version:\\1"
| 7 |
diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js @@ -487,7 +487,7 @@ class GithubUtils {
* @returns {Promise<String>}
*/
static getActorWhoClosedIssue(issueNumber) {
- return this.octokit.paginate(this.octokit.issues.listEvents, {
+ return this.paginate(this.octokit.issues.listEvents, {
owner: GITHUB_OWNER,
repo: APP_REPO,
issue_number: issueNumber,
| 4 |
diff --git a/content/questions/type-coercion/index.md b/content/questions/type-coercion/index.md @@ -23,4 +23,4 @@ Which of the following is an example of implicit coercion in JavaScript?
<!-- explanation -->
-Some programming languages have a concept called type casting. This means that, if you want to convert one type to another type, you have to make the conversion explicit. In JavaScript there is a mechanism called _implicit coercion_, which converts types to other types as necessary. In this case, the addition operator `+` automatically converts `2019` to a string so it can be concatenated with the string `"Hello"`!
+Some programming languages have a concept called type casting. This means that, if you want to convert one type to another type, you have to make the conversion explicit. In JavaScript there is a mechanism called _implicit coercion_, which converts types to other types as necessary. In this case, the addition operator `+` automatically converts `2019` to a string so it can be concatenated with the string `"Hello"`. In contrast, `year.toString()` and `String(year)` are both *explicitly* converting it to a string.
| 0 |
diff --git a/src/schema/deserialize.js b/src/schema/deserialize.js @@ -99,17 +99,13 @@ function runDeserialize(exception, map, schema, originalValue, options) {
if (highs.length > 1) {
exception.message('Unable to determine deserialization schema because too many schemas match. Use of a discriminator or making your schemas more specific would help this problem.')
} else {
- result = typeofValue === 'object'
- ? Object.assign(value, highs[0].result)
- : highs[0].result;
+ result = util.merge(value, highs[0].result);
}
} else if (matches.length === 0) {
const child = exception.nest('No matching schemas');
exceptions.forEach(childException => child.push(childException));
} else {
- result = typeofValue === 'object'
- ? Object.assign(value, matches[0].result)
- : matches[0].result;
+ result = util.merge(value, matches[0].result);
}
}
return result;
| 7 |
diff --git a/project/src/system/Locale.mm b/project/src/system/Locale.mm @@ -17,7 +17,16 @@ namespace lime {
#endif
NSString* localeLanguage = [[NSLocale preferredLanguages] firstObject];
- NSString* localeRegion = [[NSLocale currentLocale] countryCode];
+ if (localeLanguage == nil) localeLanguage = @"en";
+
+ NSString* localeRegion = nil;
+ NSLocale* currentLocale = [NSLocale autoupdatingCurrentLocale];
+ if (currentLocale == nil || ![currentLocale respondsToSelector:@selector(countryCode)]) {
+ localeRegion = @"";
+ } else {
+ localeRegion = [currentLocale countryCode];
+ }
+
NSString* locale = [[localeLanguage stringByAppendingString:@"_"] stringByAppendingString:localeRegion];
std::string* result = 0;
| 7 |
diff --git a/project/src/backend/sdl/SDLWindow.cpp b/project/src/backend/sdl/SDLWindow.cpp @@ -71,10 +71,10 @@ namespace lime {
#endif
#ifndef EMSCRIPTEN
+ SDL_SetHint (SDL_HINT_ANDROID_TRAP_BACK_BUTTON, "0");
SDL_SetHint (SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1");
#endif
-
if (flags & WINDOW_FLAG_HARDWARE) {
sdlWindowFlags |= SDL_WINDOW_OPENGL;
| 11 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -79,15 +79,9 @@ workflows:
node-android-ios:
jobs:
- build
- - ios:
+ - android:
requires:
- build
- filters:
- branches:
- ignore: master
- - android:
+ - ios:
requires:
- build
\ No newline at end of file
- filters:
- branches:
- ignore: master
\ No newline at end of file
| 2 |
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-curly-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-curly-test.js @@ -41,6 +41,21 @@ moduleFor(
});
}
+ ['@test populates href with fully supplied query param values, but without @route param']() {
+ this.addTemplate(
+ 'index',
+ `{{#link-to (query-params foo='2' bar='NAW')}}QueryParams{{/link-to}}`
+ );
+
+ return this.visit('/').then(() => {
+ this.assertComponentElement(this.firstChild, {
+ tagName: 'a',
+ attrs: { href: '/?bar=NAW&foo=2' },
+ content: 'QueryParams',
+ });
+ });
+ }
+
['@test populates href with partially supplied query param values, but omits if value is default value']() {
this.addTemplate('index', `{{#link-to 'index' (query-params foo='123')}}Index{{/link-to}}`);
@@ -748,6 +763,50 @@ moduleFor(
});
}
+ ['@test the {{link-to}} does not throw an error if called without a @route argument, but with a @query argument'](
+ assert
+ ) {
+ this.addTemplate(
+ 'index',
+ `
+ {{#link-to (query-params page=pageNumber) id='page-link'}}
+ Index
+ {{/link-to}}
+ `
+ );
+
+ this.add(
+ 'route:index',
+ Route.extend({
+ model() {
+ return [
+ { id: 'yehuda', name: 'Yehuda Katz' },
+ { id: 'tom', name: 'Tom Dale' },
+ { id: 'erik', name: 'Erik Brynroflsson' },
+ ];
+ },
+ })
+ );
+
+ this.add(
+ 'controller:index',
+ Controller.extend({
+ queryParams: ['page'],
+ page: 1,
+ pageNumber: 5,
+ })
+ );
+
+ return this.visit('/')
+ .then(() => {
+ this.shouldNotBeActive(assert, '#page-link');
+ return this.visit('/?page=5');
+ })
+ .then(() => {
+ this.shouldBeActive(assert, '#page-link');
+ });
+ }
+
['@test [GH#17869] it does not cause shadowing assertion with `hash` local variable']() {
this.router.map(function() {
this.route('post', { path: '/post/:id' });
| 7 |
diff --git a/token-metadata/0x19ddC3605052554A1aC2b174aE745c911456841f/metadata.json b/token-metadata/0x19ddC3605052554A1aC2b174aE745c911456841f/metadata.json "symbol": "PON",
"address": "0x19ddC3605052554A1aC2b174aE745c911456841f",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetail/KeyValuesTable.css b/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetail/KeyValuesTable.css @@ -45,7 +45,7 @@ limitations under the License.
}
.KeyValueTable--row:not(:hover) > .KeyValueTable--copyColumn > .KeyValueTable--copyIcon {
- display: none;
+ visibility: hidden;
}
.KeyValueTable--row > td {
| 14 |
diff --git a/source/views/controls/ClearSearchButtonView.js b/source/views/controls/ClearSearchButtonView.js @@ -5,7 +5,7 @@ const ClearSearchButtonView = Class({
Extends: ButtonView,
- type: 'v-ClearSearchButton',
+ className: 'v-ClearSearchButton',
positioning: 'absolute',
shortcut: 'Ctrl-/',
});
| 2 |
diff --git a/ts/core/utils.ts b/ts/core/utils.ts @@ -113,9 +113,13 @@ function clean(obj, isArray) {
return obj;
}
if (Array.isArray(obj)) {
- return obj
+ obj = obj
.map(function (value) { return clean(value, true); })
.filter(function (value) { return value; });
+ if (isArray && !obj.length) {
+ return undefined;
+ }
+ return obj;
}
Object.keys(obj).forEach(function (k) {
obj[k] = clean(obj[k]);
| 2 |
diff --git a/package.json b/package.json "scripts": {
"start": "forever start index.mjs",
"dev": "node index.mjs",
+ "prod": "sudo $(which node) index.mjs -p",
"build": "vite build",
"serve": "vite preview",
"setup:test": "cd test && npm i",
| 0 |
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file.
-## Head
+## 13.6.1
- Fixed: `max-empty-lines` TypeError from inline comment with autofix and sugarss syntax ([#4821](https://github.com/stylelint/stylelint/pull/4821)).
- Fixed: `property-no-unknown` false positives for namespaced variables ([#4803](https://github.com/stylelint/stylelint/pull/4803)).
| 6 |
diff --git a/assets/app/js/app.js b/assets/app/js/app.js reject(url);
};
- script.src = (url.match(/^http/) ? url : App.base(url))+'?v='+App.version;
+ script.src = (url.match(/^(\/\/|http)/) ? url : App.base(url))+'?v='+App.version;
document.getElementsByTagName('head')[0].appendChild(script);
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
- link.href = (url.match(/^http/) ? url : App.base(url))+'?v='+App.version;
+ link.href = (url.match(/^(\/\/|http)/) ? url : App.base(url))+'?v='+App.version;
document.getElementsByTagName('head')[0].appendChild(link);
img.onload = function(){ resolve(url); };
img.onerror = function(){ reject(url); };
- img.src = url;
+ img.src = (url.match(/^(\/\/|http)/) ? url : App.base(url))+'?v='+App.version;
});
}
};
| 11 |
diff --git a/components/admin/data/layers/form/layer-preview/component.js b/components/admin/data/layers/form/layer-preview/component.js @@ -109,8 +109,8 @@ class LayerPreviewComponent extends PureComponent {
render() {
const {
adminLayerPreview,
- interactions,
- layers
+ layers,
+ setLayerInteractionSelected
} = this.props;
const { viewport } = this.state;
@@ -167,7 +167,7 @@ class LayerPreviewComponent extends PureComponent {
lat: interactionLatLng.latitude,
lng: interactionLatLng.longitude
}}
- onChangeInteractiveLayer={() => { console.log('onChangeInteractiveLayer'); }}
+ onChangeInteractiveLayer={setLayerInteractionSelected}
/>
</Popup>
}
| 12 |
diff --git a/lib/assets/javascripts/dashboard/views/organization/organization-users/organization-users-view.js b/lib/assets/javascripts/dashboard/views/organization/organization-users/organization-users-view.js @@ -134,11 +134,11 @@ module.exports = CoreView.extend({
msg: ''
}));
- this._panes.addTab('no_results', noResultsTemplate({
+ this._panes.addTab('no_results', ViewFactory.createByHTML(noResultsTemplate({
icon: 'CDB-IconFont-defaultUser',
title: 'Oh! No results',
desc: 'Unfortunately we haven\'t found any user with these parameters'
- }));
+ })).render());
this._panes.addTab('loading', ViewFactory.createByHTML(loadingView({
title: 'Getting users...'
| 1 |
diff --git a/userscript.user.js b/userscript.user.js @@ -58908,6 +58908,7 @@ var $$IMU_EXPORT$$;
var setup_mask_el = function(mask) {
set_el_all_initial(mask);
+ set_important_style(mask, "opacity", 1);
if (settings.mouseover_mask_styles)
apply_styles(mask, settings.mouseover_mask_styles, true);
@@ -58925,14 +58926,17 @@ var $$IMU_EXPORT$$;
if (settings.mouseover_mask_fade_time > 0) {
set_important_style(mask, "transition", "opacity " + (settings.mouseover_mask_fade_time / 1000.) + "s");
+ // this allows us to respect a custom opacity for mouseover_mask_styles
+ var old_opacity = mask.style.opacity;
+
if (!popup_el_automatic) {
set_important_style(mask, "opacity", 0);
// this is needed in order to make the transition happen
setTimeout(function() {
- set_important_style(mask, "opacity", 1);
+ set_important_style(mask, "opacity", old_opacity);
}, 1);
} else {
- set_important_style(mask, "opacity", 1);
+ set_important_style(mask, "opacity", old_opacity);
}
}
| 11 |
diff --git a/src/lib/client.js b/src/lib/client.js @@ -489,7 +489,7 @@ StreamClient.prototype = {
* @return {object} Faye client
*/
if (this.fayeClient === null) {
- this.fayeClient = new Faye.Client(this.fayeUrl);
+ this.fayeClient = new Faye.Client(this.fayeUrl, {timeout: 10});
var authExtension = this.getFayeAuthorization();
this.fayeClient.addExtension(authExtension);
}
| 4 |
diff --git a/token-metadata/0xC28E27870558cF22ADD83540d2126da2e4b464c2/metadata.json b/token-metadata/0xC28E27870558cF22ADD83540d2126da2e4b464c2/metadata.json "symbol": "SASHIMI",
"address": "0xC28E27870558cF22ADD83540d2126da2e4b464c2",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/generators/kubernetes/templates/console/jhipster-logstash.yml.ejs b/generators/kubernetes/templates/console/jhipster-logstash.yml.ejs See the License for the specific language governing permissions and
limitations under the License.
-%>
-<%#
- Copyright 2013-2020 the original author or authors from the JHipster project.
-
- This file is part of the JHipster project, see https://www.jhipster.tech/
- for more information.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--%>
apiVersion: <%= KUBERNETES_DEPLOYMENT_API_VERSION %>
kind: Deployment
metadata:
| 2 |
diff --git a/test/unit/service-broker.spec.js b/test/unit/service-broker.spec.js @@ -819,7 +819,7 @@ describe("Test broker.loadService", () => {
let broker = new ServiceBroker({ logger: false, hotReload: true });
broker.createService = jest.fn(svc => svc);
- broker.servicesChanged = jest.fn();
+ broker._restartService = jest.fn();
broker.watchService = jest.fn();
it("should load service from schema", () => {
@@ -828,6 +828,7 @@ describe("Test broker.loadService", () => {
expect(service).toBeDefined();
expect(service.__filename).toBeDefined();
expect(broker.createService).toHaveBeenCalledTimes(1);
+ expect(broker._restartService).toHaveBeenCalledTimes(0);
expect(broker.watchService).toHaveBeenCalledTimes(1);
expect(broker.watchService).toHaveBeenCalledWith(service);
});
@@ -835,10 +836,71 @@ describe("Test broker.loadService", () => {
it("should call function which returns Service instance", () => {
broker.createService.mockClear();
broker.watchService.mockClear();
+ broker._restartService.mockClear();
let service = broker.loadService("./test/services/users.service.js");
expect(service).toBeInstanceOf(broker.ServiceFactory);
expect(broker.createService).toHaveBeenCalledTimes(0);
- expect(broker.servicesChanged).toHaveBeenCalledTimes(1);
+ expect(broker._restartService).toHaveBeenCalledTimes(0);
+ expect(broker.watchService).toHaveBeenCalledTimes(1);
+ expect(broker.watchService).toHaveBeenCalledWith(service);
+ });
+
+ it("should call function which returns schema", () => {
+ broker.createService.mockClear();
+ broker.watchService.mockClear();
+ broker._restartService.mockClear();
+ let service = broker.loadService("./test/services/posts.service.js");
+ expect(service).toBeDefined();
+ expect(broker.createService).toHaveBeenCalledTimes(1);
+ expect(broker._restartService).toHaveBeenCalledTimes(0);
+ expect(broker.watchService).toHaveBeenCalledTimes(1);
+ expect(broker.watchService).toHaveBeenCalledWith(service);
+ });
+
+ it("should load ES6 class", () => {
+ broker.createService.mockClear();
+ broker.watchService.mockClear();
+ broker._restartService.mockClear();
+ let service = broker.loadService("./test/services/greeter.es6.service.js");
+ expect(service).toBeDefined();
+ expect(broker.createService).toHaveBeenCalledTimes(0);
+ expect(broker._restartService).toHaveBeenCalledTimes(0);
+ expect(broker.watchService).toHaveBeenCalledTimes(1);
+ expect(broker.watchService).toHaveBeenCalledWith(service);
+ });
+
+});
+
+describe("Test broker.loadService after broker started", () => {
+
+ let broker = new ServiceBroker({ logger: false, hotReload: true });
+ broker.createService = jest.fn(svc => svc);
+ broker._restartService = jest.fn();
+ broker.watchService = jest.fn();
+
+ beforeAll(() => broker.start());
+ afterAll(() => broker.stop());
+
+ it("should load service from schema", () => {
+ // Load schema
+ let service = broker.loadService("./test/services/math.service.js");
+ expect(service).toBeDefined();
+ expect(service.__filename).toBeDefined();
+ expect(broker.createService).toHaveBeenCalledTimes(1);
+ expect(broker._restartService).toHaveBeenCalledTimes(0);
+ expect(broker.watchService).toHaveBeenCalledTimes(1);
+ expect(broker.watchService).toHaveBeenCalledWith(service);
+ });
+
+ it("should call function which returns Service instance", () => {
+ broker.createService.mockClear();
+ broker.watchService.mockClear();
+ broker._restartService.mockClear();
+ let service = broker.loadService("./test/services/users.service.js");
+ expect(service).toBeInstanceOf(broker.ServiceFactory);
+ expect(broker.createService).toHaveBeenCalledTimes(0);
+ expect(broker._restartService).toHaveBeenCalledTimes(1);
+ expect(broker._restartService).toHaveBeenCalledWith(service);
expect(broker.watchService).toHaveBeenCalledTimes(1);
expect(broker.watchService).toHaveBeenCalledWith(service);
});
@@ -846,9 +908,24 @@ describe("Test broker.loadService", () => {
it("should call function which returns schema", () => {
broker.createService.mockClear();
broker.watchService.mockClear();
+ broker._restartService.mockClear();
let service = broker.loadService("./test/services/posts.service.js");
expect(service).toBeDefined();
expect(broker.createService).toHaveBeenCalledTimes(1);
+ expect(broker._restartService).toHaveBeenCalledTimes(0);
+ expect(broker.watchService).toHaveBeenCalledTimes(1);
+ expect(broker.watchService).toHaveBeenCalledWith(service);
+ });
+
+ it("should load ES6 class", () => {
+ broker.createService.mockClear();
+ broker.watchService.mockClear();
+ broker._restartService.mockClear();
+ let service = broker.loadService("./test/services/greeter.es6.service.js");
+ expect(service).toBeDefined();
+ expect(broker.createService).toHaveBeenCalledTimes(0);
+ expect(broker._restartService).toHaveBeenCalledTimes(1);
+ expect(broker._restartService).toHaveBeenCalledWith(service);
expect(broker.watchService).toHaveBeenCalledTimes(1);
expect(broker.watchService).toHaveBeenCalledWith(service);
});
| 1 |
diff --git a/README.md b/README.md @@ -445,7 +445,7 @@ This is also for default plugin options. If the alias definitions extends on de
```javascript
Inputmask.extendAliases({
- 'numeric':
+ 'numeric': {
autoUnmask: true,
allowPlus: false,
allowMinus: false
| 1 |
diff --git a/lib/assets/core/javascripts/cartodb3/editor/layers/analysis-views/source-layer-analysis-view.tpl b/lib/assets/core/javascripts/cartodb3/editor/layers/analysis-views/source-layer-analysis-view.tpl -<p class="Editor-ListAnalysis-itemInfoTitle CDB-Text CDB-Size-small u-secondaryTextColor u-ellipsis u-flex" title="<%- tableName %>">
+<p class="Editor-ListAnalysis-itemInfoTitle CDB-Text CDB-Size-small u-ellipsis u-flex" title="<%- tableName %>">
<span class="CDB-Text is-semibold CDB-Size-small u-rSpace u-upperCase" style="color: <%- bgColor %>">
<%- id %>
</span>
| 2 |
diff --git a/src/selection-handler.js b/src/selection-handler.js @@ -36,12 +36,14 @@ Object.assign(SelectionHandler.prototype, require('./function-bind'), require('.
cancelSelectAll: function() {
// Don't select if within an input field
- var editorEl = Dom.getClosest(document.activeElement, 'input');
- if (editorEl !== document.body) return true;
+ var editorEl1 = Dom.getClosest(document.activeElement, 'input');
+ if (editorEl1 !== document.body) return true;
+
+ var editorEl2 = Dom.getClosest(document.activeElement, '.st-outer');
+
// Don't select all if focused on element outside of the editor.
if (this.options.selectionLimitToEditor) {
- var editorEl = Dom.getClosest(document.activeElement, '.st-outer');
- if (editorEl === document.body) return true;
+ if (editorEl2 !== this.wrapper) return true;
}
},
| 11 |
diff --git a/packages/hulk-cli/package.json b/packages/hulk-cli/package.json "@baidu/hulk-utils": "^2.1.0",
"@baidu/matrix-loader": "^1.1.1",
"@baidu/sentry-webpack-configext": "^1.0.10",
- "@baidu/upload-file": "^0.0.2",
+ "@baidu/upload-file": "^0.0.3",
"@samverschueren/stream-to-observable": "^0.3.0",
"autoprefixer": "^9.6.0",
"babel-loader": "^8.0.5",
| 1 |
diff --git a/karma.conf.js b/karma.conf.js @@ -7,35 +7,26 @@ module.exports = function (config) {
var customLaunchers = {
sl_chrome_latest: {
browserName: 'chrome',
- browserVersion: 'latest',
platformName: 'Windows 10'
},
sl_firefox_latest: {
browserName: 'firefox',
- browserVersion: 'latest',
platformName: 'Windows 10'
},
- sl_safari_latest: {
- browserName: 'safari',
- browserVersion: 'latest',
- platformName: 'macOS 10.15'
- },
sl_edge_latest: {
browserName: 'MicrosoftEdge',
- browserVersion: 'latest',
platformName: 'Windows 10'
},
- sl_ios_latest: {
- browserName: 'Safari',
- platform: 'iOS',
- version: 'latest',
- device: 'iPhone Simulator'
+ sl_safari_latest: {
+ browserName: 'safari',
+ platformName: 'macOS 10.15'
}
};
// define the base configuration for each launcher
Object.keys(customLaunchers).map((key) => {
customLaunchers[key].base = 'SauceLabs';
+ customLaunchers[key].browserVersion = 'latest';
});
// use SauceLabs browsers if running with TravisCI
| 2 |
diff --git a/fastlane/Fastfile b/fastlane/Fastfile @@ -312,7 +312,7 @@ platform :ios do
end
desc 'Get iOS match profiles'
- lane :match do
+ lane :certs do
if !ENV['MATCH_PASSWORD'].nil? && !ENV['MATCH_PASSWORD'].empty?
api_key = get_apple_api_key()
match(
| 10 |
diff --git a/test/vast_tracker.js b/test/vast_tracker.js @@ -285,11 +285,11 @@ describe('VASTTracker', function() {
});
});
- describe('#errorWithCode', () => {
+ describe('#error', () => {
before(() => {
- util.track = function(URLTemplates, variables, options) {
+ util.track = function(URLTemplates, macros, options) {
_eventsSent.push(
- this.resolveURLTemplates(URLTemplates, variables, options)
+ this.resolveURLTemplates(URLTemplates, macros, options)
);
};
});
@@ -297,6 +297,35 @@ describe('VASTTracker', function() {
_eventsSent = [];
});
+ it('should have called error urls with right code', () => {
+ this.Tracker.error(405);
+ _eventsSent[0].should.eql([
+ 'http://example.com/wrapperA-error',
+ 'http://example.com/wrapperB-error',
+ 'http://example.com/error_405'
+ ]);
+ });
+
+ it('should have called error urls with 900 if unknown code', () => {
+ this.Tracker.error(10001);
+ _eventsSent[0].should.eql([
+ 'http://example.com/wrapperA-error',
+ 'http://example.com/wrapperB-error',
+ 'http://example.com/error_900'
+ ]);
+ });
+
+ describe('#errorWithCode', () => {
+ before(() => {
+ this.Tracker.error(
+ _eventsSent.push(
+ this.resolveURLTemplates(URLTemplates, macros, options)
+ ));;
+ });
+ beforeEach(() => {
+ _eventsSent = [];
+ });
+
it('should have called error urls with right code', () => {
this.Tracker.errorWithCode(405);
_eventsSent[0].should.eql([
| 0 |
diff --git a/package.json b/package.json "start-image_viewer": "node devtools/image_viewer/server.js",
"start": "npm run start-test_dashboard",
"baseline": "node tasks/baseline.js",
- "preversion": "npm-link-check && npm dedupe && npm ls",
+ "preversion": "npm-link-check && npm dedupe",
"version": "npm run build && git add -A dist src build",
"postversion": "node -e \"console.log('Version bumped and committed. If ok, run: git push && git push --tags')\""
},
| 2 |
diff --git a/generators/server/templates/_README.md b/generators/server/templates/_README.md @@ -126,7 +126,7 @@ To optimize the <%= baseName %> application for production, run:
./gradlew -Pprod clean bootRepackage<% } %>
<%_ if(!skipClient) { _%>
-This will concatenate and minify the client CSS and JavaScript files. It will also modify [index.html](index.html) so it references these new files.
+This will concatenate and minify the client CSS and JavaScript files. It will also modify `index.html` so it references these new files.
<%_ } _%>
To ensure everything worked, run:
<% if (buildTool == 'maven') { %>
| 2 |
diff --git a/editor.js b/editor.js @@ -321,6 +321,59 @@ const _makeUiMesh = () => {
});
return m;
};
+const _makeContextMenuMesh = uiMesh => {
+ const geometry = new THREE.PlaneBufferGeometry(1, 1)
+ .applyMatrix4(
+ localMatrix.compose(
+ localVector.set(1/2, -1/2, 0),
+ localQuaternion.set(0, 0, 0, 1),
+ localVector2.set(1, 1, 1),
+ )
+ );
+ const material = new THREE.MeshBasicMaterial({
+ color: 0xFF0000,
+ });
+ const model = new THREE.Mesh(geometry, material);
+ model.frustumCulled = false;
+
+ const m = new THREE.Object3D();
+ m.add(model);
+ let animationSpec = null;
+ let lastContextMenu = false;
+ m.update = () => {
+ if (weaponsManager.contextMenu && !lastContextMenu) {
+ m.position.copy(uiMesh.position);
+
+ const now = Date.now();
+ animationSpec = {
+ startTime: now,
+ endTime: now + 1000,
+ };
+ }
+ m.quaternion.copy(uiMesh.quaternion);
+ m.visible = weaponsManager.contextMenu;
+ lastContextMenu = weaponsManager.contextMenu;
+
+ const _setDefaultScale = () => {
+ m.scale.set(1, 1, 1);
+ };
+ if (animationSpec) {
+ const now = Date.now();
+ const {startTime, endTime} = animationSpec;
+ const f = (now - startTime) / (endTime - startTime);
+ if (f >= 0 && f < 1) {
+ const fv = cubicBezier(f);
+ m.scale.set(fv, fv, 1);
+ // model.material.opacity = fv;
+ } else {
+ _setDefaultScale();
+ }
+ } else {
+ _setDefaultScale();
+ }
+ };
+ return m;
+};
const eps = 0.00001;
const cardPreviewHost = `https://card-preview.exokit.org`;
| 0 |
diff --git a/articles/speech-command-recognition-with-tensorflow-and-react/index.md b/articles/speech-command-recognition-with-tensorflow-and-react/index.md @@ -14,9 +14,9 @@ images:
- url: /engineering-education/speech-command-recognition-with-tensorflow-and-react/hero.png
alt: Speech Command Recognition in a React Project with Tensorflow
---
-There are many AI-powered computer systems nowadays that can use speech-based communication to communicate with humans. The main logic that is used in these types of systems is the ability to recognize the speech and perform tasks accordingly. In this tutorial, we are going to explore the basics of speech/commands recognition using a speech-commands recognizer model provided by TensorFlow in a React app ecosystem. The tutorial also demonstrates the use of a system microphone for speech audio input and listen to the audio to make probabilistic predictions. The model library itself makes use of the web browser's WebAudio API. The model can perform inference and transfer learning entirely in the browser, using WebGL GPU acceleration.
+There are many AI-powered computer systems nowadays that can use speech-based communication to communicate with humans. The main logic that is used in these types of systems is the ability to recognize the speech and perform tasks accordingly. In this tutorial, we are going to explore the basics of speech/commands recognition using a speech-commands recognizer model provided by TensorFlow in a React app ecosystem. The tutorial also demonstrates the use of a system microphone for speech audio input and listen to the audio to make probabilistic predictions.
<!--more-->
-In this tutorial, we will learn how to perform speech command recognition in real-time and demonstrate the result of predictions. The idea is to create a React app and trigger the web browser system microphone that feeds the audio data. Then, we are going to load the speech-commands model provided by TensorFlow.org. Feeding the audio data to the model neural network, we are going to listen to the audio and make the predictions. Lastly, we are also going to improve the accuracy recognition by applying the argmax function to our model.
+In this tutorial, we will learn how to perform speech command recognition in real-time and demonstrate the result of predictions. Then, we are going to load the speech-commands model provided by TensorFlow.org. Feeding the audio data to the model neural network, we are going to listen to the audio and make the predictions. Lastly, we are also going to improve the accuracy recognition by applying the argmax function to our model.
### What we will cover in this tutorial...
@@ -43,14 +43,14 @@ Now, we can execute the command `yarn start` or `npm start` to run the project
### Installing Tensorflow.JS & Speech Command Recognition
-Now, we are going to install the main TensorFlow.JS package along with the speech commands recognition package provided by TensorFlow.org. To install, we need to execute the following command in our project terminal:
+Now, we are going to install the main TensorFlow.JS package along with the speech commands recognition package provided by TensorFlow.org. for installation package, we need to execute the following command in our project commmand line or terminal:
```bash
yarn add @tensorflow/tfjs @tensorflow-models/speech-commands
```
- @tensorflow/tfjs: It is the core Tensorflow package based on JavaScript.
-- @tensorflow-models/speech-commands: It is a JavaScript module that enables us to perform recognition of spoken commands comprised of simple isolated English words from a small vocabulary. It makes use of the web browser's WebAudio API.
+- @tensorflow-models/speech-commands: It is a Tensorflow models that enables us to perform recognition of spoken commands.
### Importing Dependencies
| 1 |
diff --git a/package.json b/package.json "eslint": "^4.19.1",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.14.0",
- "mocha": "^5.2.0",
+ "mocha": "^6.0.2",
"nyc": "^13.3.0",
"icrdk": "git://github.com/f5devcentral/f5-icontrollx-dev-kit#master"
}
| 1 |
diff --git a/assets/sass/components/global/_googlesitekit-entity-header.scss b/assets/sass/components/global/_googlesitekit-entity-header.scss -webkit-position: sticky;
position: sticky;
top: 132px;
- z-index: 9; // should be under _googlesitekit-dashboard-navigation
+ z-index: 9; // Should be below _googlesitekit-dashboard-navigation.
body.admin-bar & {
}
a {
- // override default .googlesitekit-cta-link--external SVG's color
+ // Override default .googlesitekit-cta-link--external SVG's color.
background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.6667 10.6667H1.33333V1.33333H6V0H1.33333C0.979711 0 0.640573 0.140476 0.390524 0.390524C0.140476 0.640573 0 0.979711 0 1.33333V10.6667C0 11.0203 0.140476 11.3594 0.390524 11.6095C0.640573 11.8595 0.979711 12 1.33333 12H10.6667C11.4 12 12 11.4 12 10.6667V6H10.6667V10.6667ZM7.33333 0V1.33333H9.72667L3.17333 7.88667L4.11333 8.82667L10.6667 2.27333V4.66667H12V0H7.33333Z' fill='%232998E8'/%3E%3C/svg%3E");
background-size: 12px;
color: $c-picton-blue;
display: inline-block;
- margin: 4px; // to allow outline on focus to be visible
+ margin: 4px; // Allow outline on focus to be visible.
max-width: 100%;
text-decoration: underline;
| 7 |
diff --git a/src/core/FlowControl.js b/src/core/FlowControl.js @@ -127,14 +127,13 @@ const FlowControl = {
*/
function replaceRegister(str) {
// Replace references to registers ($Rn) with contents of registers
- str = str ? str.replace(/((?:^|[^\\])(?:\\.|[^\\])*?)\$R(\d{1,2})/g, (match, pre, regNum) => {
+ return str.replace(/(\\*)\$R(\d{1,2})/g, (match, slashes, regNum) => {
const index = parseInt(regNum, 10) + 1;
- return (index <= state.numRegisters || index >= state.numRegisters + registers.length) ?
- match : pre + registers[index - state.numRegisters];
- }) : str;
-
- // Unescape remaining register references
- return str ? str.replace(/\\\$R(\d{1,2})/, "$R$1") : str;
+ if (index <= state.numRegisters || index >= state.numRegisters + registers.length)
+ return match;
+ if (slashes.length % 2 !== 0) return match.slice(1); // Remove escape
+ return slashes + registers[index - state.numRegisters];
+ });
}
// Step through all subsequent ops and replace registers in args with extracted content
| 7 |
diff --git a/src/encoded/tests/data/inserts/user.json b/src/encoded/tests/data/inserts/user.json "community"
],
"uuid": "af989110-67d2-4c8b-87f0-38d9d6d31868"
+ },
+ {
+ "email": "[email protected]",
+ "first_name": "Jennifer",
+ "groups": [
+ "admin"
+ ],
+ "job_title": "Associate Data Wrangler",
+ "lab": "/labs/j-michael-cherry/",
+ "last_name": "Jou",
+ "schema_version": "8",
+ "status": "current",
+ "submits_for": [
+ "/labs/j-michael-cherry/"
+ ],
+ "viewing_groups": [
+ "community",
+ "ENCODE3",
+ "ENCODE4",
+ "GGR",
+ "REMC",
+ "ENCORE"
+ ],
+ "uuid": "43f2f757-5cbf-490a-9787-a1ee85a4cdcd"
}
]
| 0 |
diff --git a/pages/countries.js b/pages/countries.js @@ -206,7 +206,7 @@ class Countries extends React.Component {
<RegionLink href="#Americas" label='Americas' />
<RegionLink href="#Asia" label='Asia' />
<RegionLink href="#Europe" label='Europe' />
- <RegionLink href="#Antartica" label='Antarctica' />
+ <RegionLink href="#Oceania" label='Oceania' />
<Box>
<Input
onChange={(e) => this.onSearchChange(e.target.value)}
| 14 |
diff --git a/stories/NumericInput.stories.js b/stories/NumericInput.stories.js @@ -132,7 +132,7 @@ storiesOf('NumericInput', module)
))
)
.add(
- 'allowSigns = false',
+ 'allowSigns = false | allowOnlyIntegers = false',
withState({ value: null }, (store) => (
<NumericInput
value={store.state.value}
@@ -142,7 +142,17 @@ storiesOf('NumericInput', module)
))
)
.add(
- 'allowOnlyIntegers',
+ 'allowSigns = true | allowOnlyIntegers = false',
+ withState({ value: null }, (store) => (
+ <NumericInput
+ value={store.state.value}
+ onChange={(value) => store.set({ value })}
+ allowOnlyIntegers={false}
+ />
+ ))
+ )
+ .add(
+ 'allowSigns = false | allowOnlyIntegers = true',
withState({ value: null }, (store) => (
<NumericInput
value={store.state.value}
| 7 |
diff --git a/src/components/Explorer/queryTemplate.js b/src/components/Explorer/queryTemplate.js @@ -25,7 +25,7 @@ function validate(p) {
const queryTemplate = (props) => {
const {
select,
- group = select && select.groupValue ? { value: select.groupKey, groupKeySelect: select.groupKeySelect, alias: select.alias } : null,
+ group,
minPatch,
maxPatch,
hero,
@@ -58,7 +58,7 @@ const queryTemplate = (props) => {
let query;
let groupArray = [];
let selectArray = [];
- // console.log(props)
+ console.log(props)
if (!(Array.isArray(group))) {
groupArray.push(group);
} else {
@@ -69,6 +69,25 @@ const queryTemplate = (props) => {
} else {
selectArray = select;
}
+ selectArray = selectArray.filter(function(x) { return x !== undefined})
+ groupArray = groupArray.filter(function(x) { return x !== undefined})
+ //select && select.groupValue ? { value: select.groupKey, groupKeySelect: select.groupKeySelect, alias: select.alias } : null,
+ selectArray.forEach( function(x, index) {
+ if (x && x.groupValue) {
+ let a = {value: x.groupKey, groupKeySelect: x.groupKeySelect, alias: x.alias, key: "key" + index.toString()}
+ if (x.groupKey === "key") {
+ a.value = "key" + index.toString() + ".key"
+ x.value = "key" + index.toString() + ".key"
+ x.join = x.join + " key" + index.toString()
+ x.groupValue = "key" + index.toString() + "." + x.groupValue
+
+ }
+ groupArray.push(a)
+ }
+ }
+ )
+ console.log(selectArray)
+ console.log(groupArray)
if (selectArray && selectArray.template === 'picks_bans') {
query = `SELECT
hero_id,
@@ -116,6 +135,8 @@ ORDER BY total ${(order && order.value) || 'DESC'}`;
if (validate(selectArray)) {
selectArray.forEach((x) => { selectVal[x.key] = x.groupValue || (x && x.value) || 1; });
}
+ console.log(selectVal)
+ console.log(groupVal)
query = `SELECT
${validate(selectArray) ? selectArray.map(x => (x.distinct && !validate(groupArray) ? `DISTINCT ON (${x.value})` : '')).join('') : ''}\
${(validate(groupArray)) ?
@@ -125,7 +146,7 @@ ${(validate(groupArray)) ?
(validate(selectArray) && selectArray.map(x =>
[
(x && x.countValue) || '',
- (x && x.avgPerMatch) ? `sum(${selectVal[x.key]})::numeric/count(distinct matches.match_id) avg` : `${x && x.avg ? x.avg : `avg(${selectVal[x.key]})`} "AVG ${x.text}"`,
+ (x && x.avgPerMatch) ? `sum(${selectVal[x.key]})::numeric/count(distinct matches.match_id) "AVG ${x.text}"` : `${x && x.avg ? x.avg : `avg(${selectVal[x.key]})`} "AVG ${x.text}"`,
'count(distinct matches.match_id) count',
'sum(case when (player_matches.player_slot < 128) = radiant_win then 1 else 0 end)::float/count(1) winrate',
`((sum(case when (player_matches.player_slot < 128) = radiant_win then 1 else 0 end)::float/count(1))
| 11 |
diff --git a/src/helpers/sentry.js b/src/helpers/sentry.js @@ -10,10 +10,7 @@ if (process.env.NODE_ENV === "production") {
release: `react@${version}`,
dsn: "https://[email protected]/1323903",
beforeSend(event) {
- if (
- event.exception.mechanism.data &&
- invalidMessages.includes(event.exception.mechanism.data.message)
- )
+ if (invalidMessages.includes(event?.exception?.mechanism?.data?.message))
return null;
return event;
},
| 1 |
diff --git a/package.json b/package.json "scripts": {
"lint": "./node_modules/.bin/eslint lib/",
"test": "mocha test/ --no-timeouts",
- "testdapp_1": "cd test_apps/test_app/ && npm install && \"../../bin/embark\" test",
- "testdapp_2": "cd test_apps/contracts_app/ && npm install && \"../../bin/embark\" test",
+ "testdapp_1": "cd test_apps/test_app/ && npm install && node ../../bin/embark test",
+ "testdapp_2": "cd test_apps/contracts_app/ && npm install && node ../../bin/embark test",
"fulltest": "npm run lint && npm run test && npm run testdapp_1 && npm run testdapp_2"
},
"bin": {
| 4 |
diff --git a/js/pages/configuration/roles/role-details.js b/js/pages/configuration/roles/role-details.js @@ -4,6 +4,7 @@ define([
'appConfig',
'assets/ohdsi.util',
'services/User',
+ 'webapi/AuthAPI',
'databindings',
'components/ac-access-denied',
'less!./role-details.less',
@@ -12,7 +13,8 @@ define([
view,
config,
ohdsiUtils,
- userService
+ userService,
+ authApi,
) {
function roleDetails(params) {
var self = this;
| 1 |
diff --git a/test/e2e/beta/helpers.js b/test/e2e/beta/helpers.js @@ -122,12 +122,14 @@ async function closeAllWindowHandlesExcept (driver, exceptions, windowHandles) {
}
async function assertElementNotPresent (webdriver, driver, by) {
+ let dataTab
try {
- const dataTab = await findElement(driver, by, 4000)
+ dataTab = await findElement(driver, by, 4000)
+ } catch (err) {
+ console.log(err)
+ assert(err instanceof webdriver.error.NoSuchElementError || err instanceof webdriver.error.TimeoutError)
+ }
if (dataTab) {
assert(false, 'Data tab should not be present')
}
- } catch (err) {
- assert(err instanceof webdriver.error.NoSuchElementError)
- }
}
| 7 |
diff --git a/avatars/util.mjs b/avatars/util.mjs @@ -37,7 +37,7 @@ export const getEyePosition = (() => {
// const localVector2 = new THREE.Vector3();
return function(modelBones) {
// const vrmExtension = object?.parser?.json?.extensions?.VRM;
- return modelBones.Head.getWorldPosition(localVector)
+ return localVector.setFromMatrixPosition(modelBones.Head.matrixWorld);
// .add(localVector2.set(0, 0.06, 0));
}
})();
| 2 |
diff --git a/.travis.yml b/.travis.yml @@ -6,6 +6,13 @@ sudo: false
addons:
code_climate:
repo_token: $CODECLIMATE_REPO_TOKEN
+install:
+ - npm install
+ - npm run build
+script:
+ - npm run test:client -- --coverage
+ - npm run test:server -- --coverage
+ - npm run lint
after_success:
- npm install -g codeclimate-test-reporter
- codeclimate-test-reporter < coverage/lcov.info
| 1 |
diff --git a/tests/e2e/plugins/module-setup-analytics-no-account.php b/tests/e2e/plugins/module-setup-analytics-no-account.php namespace Google\Site_Kit\Tests\E2E\Modules\AnalyticsNoAccount;
use Google\Site_Kit\Core\REST_API\REST_Routes;
-use WP_Error;
add_action( 'rest_api_init', function () {
@@ -24,16 +23,10 @@ add_action( 'rest_api_init', function () {
'modules/analytics/data/get-accounts',
array(
'callback' => function () {
- /**
- * Returned by \Google\Site_Kit\Core\Modules\Module::exception_to_error
- */
- return new WP_Error(
- 403,
- 'User does not have any Google Analytics account.',
- array(
- 'status' => 500,
- 'reason' => 'insufficientPermissions',
- )
+ return array(
+ 'accounts' => array(),
+ 'properties' => array(),
+ 'profiles' => array(),
);
}
),
| 3 |
diff --git a/mocha_spec/unit/ferryman.spec.js b/mocha_spec/unit/ferryman.spec.js @@ -61,7 +61,12 @@ describe('Ferryman', () => {
nock(`https://localhost:2345/snapshots/flows/${flowId}/steps`)
.get(`/${stepId}`)
- .reply(200, { data: { snapshot: 'blubb' } });
+ .reply(200, { data: {
+ snapshot: {
+ id: '123456789',
+ value: 'abc'
+ }
+ } });
});
afterEach(() => {
@@ -428,6 +433,7 @@ describe('Ferryman', () => {
await ferryman.processMessage(psPayload, message);
expect(ferryman.apiClient.tasks.retrieveStep).to.have.callCount(1);
expect(fakeAMQPConnection.connect).to.have.been.calledOnce;
+
expect(fakeAMQPConnection.sendBackChannel).to.have.been.calledOnce.and.calledWith(
{
body: {
@@ -701,7 +707,8 @@ describe('Ferryman', () => {
expect(stepId).to.deep.equal('step_1');
return Promise.resolve({
snapshot: {
- someId: 'someData'
+ id: '123456789',
+ value: 'abc'
}
});
});
@@ -709,15 +716,15 @@ describe('Ferryman', () => {
await ferryman.prepare();
await ferryman.connect();
const payload = {
- updateSnapshot: { updated: 'value' }
+ updateSnapshot: { value: 'new value' }
};
await ferryman.processMessage(payload, message);
expect(ferryman.apiClient.tasks.retrieveStep).to.have.callCount(1);
- const expectedSnapshot = { someId: 'someData', updated: 'value' };
+ const expectedSnapshot = { id: '123456789', value: 'new value' };
expect(fakeAMQPConnection.connect).to.have.been.calledOnce;
expect(fakeAMQPConnection.sendSnapshot).to.have.been.calledOnce.and.calledWith(
- { updated: 'value' },
+ { value: 'new value' },
sinon.match({
'taskId': '5559edd38968ec0736000003',
'execId': 'some-exec-id',
| 9 |
diff --git a/src/scene/layer.js b/src/scene/layer.js @@ -158,6 +158,7 @@ Object.assign(pc, function () {
* Can be used in {@link pc.LayerComposition#getLayerById}.
*/
var Layer = function (options) {
+ options = options || {};
if (options.id !== undefined) {
this.id = options.id;
| 11 |
diff --git a/app/api/ada/adaTransactions/adaNewTransactions.js b/app/api/ada/adaTransactions/adaNewTransactions.js @@ -27,6 +27,7 @@ import type {
AdaAddresses,
AdaTransactionFee,
} from '../adaTypes';
+import { NotEnoughMoneyToSendError } from '../errors';
export const getAdaTransactionFee = (
receiver: string,
@@ -39,8 +40,10 @@ export const getAdaTransactionFee = (
const result = response[0];
// TODO: Improve Js-Wasm-cardano error handling
if (result.failed) {
- if (result.msg === 'FeeCalculationError(NotEnoughInput)') {
- throw new Error('not enough money');
+ const notEnoughFunds = result.msg === 'FeeCalculationError(NotEnoughInput)' ||
+ result.msg === 'FeeCalculationError(NoInputs)';
+ if (notEnoughFunds) {
+ throw new NotEnoughMoneyToSendError();
}
}
return {
| 7 |
diff --git a/src/trait_manager/model/Trait.js b/src/trait_manager/model/Trait.js @@ -62,6 +62,18 @@ module.exports = require('backbone').Model.extend({
},
+ setValueFromInput(value, final = 1, opts = {}) {
+ const toSet = { value };
+ this.set(toSet, { ...opts, avoidStore: 1});
+
+ // Have to trigger the change
+ if (final) {
+ this.set('value', '', opts);
+ this.set(toSet, opts);
+ }
+ },
+
+
/**
* Get the initial value of the trait
* @return {string}
| 1 |
diff --git a/1-getting-started-lessons/2-github-basics/README.md b/1-getting-started-lessons/2-github-basics/README.md @@ -6,7 +6,7 @@ This lesson covers the basics of GitHub, a platform to host and manage changes t
> Sketchnote by [Tomomi Imura](https://twitter.com/girlie_mac)
## Pre-Lecture Quiz
-[Pre-lecture quiz](1-getting-started-lessons/2-github-basics/.github/pre-lecture-quiz.md)
+[Pre-lecture quiz](.github/pre-lecture-quiz.md)
## Introduction
@@ -274,7 +274,7 @@ Projects might also have discussion in forums, mailing lists, or chat channels l
Pair with a friend to work on each other's code. Create a project collaboratively, fork code, create branches, and merge changes.
## Post-Lecture Quiz
-[Post-lecture quiz](1-getting-started-lessons/2-github-basics/.github/post-lecture-quiz.md)
+[Post-lecture quiz](.github/post-lecture-quiz.md)
## Review & Self Study
| 14 |
diff --git a/sample-apps/appsensor-ws-rest-server-with-websocket-mysql-boot/create.sql b/sample-apps/appsensor-ws-rest-server-with-websocket-mysql-boot/create.sql @@ -7,7 +7,7 @@ create table event_metadata (event_id integer not null, metadata_id integer not
create table geo_location (id integer not null auto_increment, latitude double precision not null, longitude double precision not null, primary key (id))
create table `interval` (id integer not null auto_increment, duration integer, unit varchar(255), primary key (id))
create table ipaddress (id integer not null auto_increment, address varchar(255), geo_location tinyblob, primary key (id))
-create table key_value_pair (id integer not null auto_increment, key varchar(255), value varchar(255), primary key (id))
+create table key_value_pair (id integer not null auto_increment, `key` varchar(255), value varchar(255), primary key (id))
create table resource (id integer not null auto_increment, location varchar(255), primary key (id))
create table response (id integer not null auto_increment, action varchar(255), active bit not null, timestamp varchar(255), detection_system_id integer, interval_id integer, user_id integer, primary key (id))
create table response_metadata (response_id integer not null, metadata_id integer not null)
| 1 |
diff --git a/articles/quickstart/spa/angularjs/_includes/_centralized_login.md b/articles/quickstart/spa/angularjs/_includes/_centralized_login.md +<!-- markdownlint-disable MD002 MD041 -->
-<%= include('../../_includes/_login_preamble', { library: 'AngularJS', embeddedLoginLink: 'https://github.com/auth0-samples/auth0-angularjs-samples/tree/embedded-login/01-Embedded-Login' }) %>
+<%= include('../../_includes/_login_preamble', { library: 'AngularJS' }) %>
### Configure angular-auth0
@@ -127,7 +128,6 @@ function authService($state, angularAuth0, $timeout) {
**Checkpoint:** Try to call the `login` method from somewhere in your application to see the login page.
:::
-

## Handle Authentication Tokens
| 2 |
diff --git a/appveyor.yml b/appveyor.yml environment:
matrix:
- nodejs_version: 0.10
+ npm_version: 3
- nodejs_version: 0.12
+ npm_version: 3
+ - nodejs_version: 4
+ npm_version: 'latest'
+ - nodejs_version: 6
+ npm_version: 'latest'
+ - nodejs_version: 8
+ npm_version: 'latest'
# Get the latest stable version of Node 0.STABLE.latest
install:
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- - npm install -g npm@latest
+ - npm install -g npm@%npm_version%
- set PATH=%APPDATA%\npm;%PATH%
- npm install
| 12 |
diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js @@ -190,7 +190,7 @@ class ReportActionCompose extends React.Component {
ReportActionComposeFocusManager.clear();
}
- isNewChat() {
+ isEmptyChat() {
return _.size(this.props.reportActions) === 1;
}
@@ -250,7 +250,7 @@ class ReportActionCompose extends React.Component {
return this.props.translate('reportActionCompose.blockedFromConcierge');
}
- if (this.isNewChat()) {
+ if (this.isEmptyChat()) {
return this.props.translate('reportActionCompose.sayHello');
}
@@ -596,7 +596,7 @@ class ReportActionCompose extends React.Component {
</AttachmentPicker>
<View style={styles.textInputComposeSpacing}>
<Composer
- autoFocus={!this.props.modal.isVisible && (this.shouldFocusInputOnScreenFocus || this.isNewChat())}
+ autoFocus={!this.props.modal.isVisible && (this.shouldFocusInputOnScreenFocus || this.isEmptyChat())}
multiline
ref={this.setTextInputRef}
textAlignVertical="top"
| 10 |
diff --git a/src/domain/navigation/index.js b/src/domain/navigation/index.js @@ -37,7 +37,7 @@ function allowsChild(parent, child) {
// downside of the approach: both of these will control which tile is selected
return type === "room" || type === "empty-grid-tile";
case "room":
- return type === "lightbox";
+ return type === "lightbox" || type === "details";
default:
return false;
}
| 11 |
diff --git a/articles/migrations/index.md b/articles/migrations/index.md ---
toc: true
-description: Occasionally, Auth0 engineers must make breaking changes to the Auth0 platform.
+title: Auth0 Migrations
+description: List of all the changes made on Auth0 platform that might affect customers.
---
+
# Migrations
Occasionally, Auth0 engineers must make breaking changes to the Auth0 platform, primarily for security reasons. If a vulnerability or other problem in the platform is not up to our high standards of security, we work to correct the issue.
@@ -10,7 +12,7 @@ Sometimes a correction will cause a breaking change to customer's applications.
For changes that do not require immediate changes, we often allow a grace period to allow you time to update your applications.
-## Migration Process
+## Migration process
The migration process is outlined below:
@@ -21,7 +23,7 @@ During the grace period, customers are informed via dashboard notifications and
If you need help with the migration, create a ticket in our [Support Center](${env.DOMAIN_URL_SUPPORT}).
-## Active Migrations
+## Active migrations
Current migrations are listed below, newest first.
@@ -43,13 +45,13 @@ If you are currently implementing login in your application with Lock v8, v9, or
If you have any questions, create a ticket in our [Support Center](${env.DOMAIN_URL_SUPPORT}).
-## Upcoming Endpoint Migrations
+## Upcoming migrations
Based on customer feedback, we have adjusted our plans and will continue to maintain and support the below listed endpoints and features.
We will publish guidance for each of the below scenarios on how to transition your applications to standards-based protocols. If we need to make security enhancements to any of these legacy endpoints which would require more urgency, we will promptly announce timeframes and guidelines for any required changes.
-### Resource Owner Support for oauth/token Endpoint
+### Resource Owner support for oauth/token endpoint
Support was introduced for [Resource Owner Password](/api/authentication#resource-owner-password) to the [/oauth/token](/api/authentication#authorization-code) endpoint earlier this year.
@@ -61,7 +63,7 @@ If you are currently implementing the [/oauth/ro](/api/authentication#resource-o
If you have any questions, create a ticket in our [Support Center](${env.DOMAIN_URL_SUPPORT}).
-### API Authorization with Third-Party Vendor APIs
+### API authorization with third-party vendor APIs
The mechanism by which you get tokens for third-party / vendor APIs (for example AWS, Firebase, and others) is being changed. It will work the same as any custom API, providing better consistency. This new architecture will be available in 2018 and once it becomes available, the [/delegation](/api/authentication#delegation) endpoint will be officially deprecated.
@@ -106,7 +108,7 @@ If you are currently using [ID Tokens](/tokens/id-token) to access any part of t
If you have any questions, create a ticket in our [Support Center](${env.DOMAIN_URL_SUPPORT}).
-### Improved OpenID Connect Interoperability in Auth0
+### Improved OpenID Connect interoperability in Auth0
The [userinfo](/api/authentication#get-user-info) endpoint is being updated to return [OIDC conformant user profile attributes](/user-profile/normalized/oidc). The most notable change is that `user_id` becomes `sub`. This will deprecate the [legacy Auth0 user profile](/user-profile/normalized/auth0) (in [userinfo](/api/authentication#get-user-info) and in [id tokens](/tokens/id-token)).
| 3 |
diff --git a/README.md b/README.md @@ -82,16 +82,8 @@ higher level API on top of Mineflayer.
## Installation
-### Linux / OSX
-
`npm install mineflayer`
-### Windows
-
-1. Follow the Windows instructions from
- [node-minecraft-protocol](https://github.com/PrismarineJS/node-minecraft-protocol#windows)
-2. `npm install mineflayer`
-
## Documentation
* See [doc/api.md](https://github.com/PrismarineJS/mineflayer/blob/master/doc/api.md).
| 2 |
diff --git a/website/js/components/designer/input.vue b/website/js/components/designer/input.vue v-btn.delete(icon @click.native='remove(index)'
:id="path+'-remove-'+index"
tabindex='-1')
- v-icon Delete
+ v-icon delete
v-btn.block(@click.native='add' tabindex='-1'
:id="path+'-add'"
) Add Item
| 1 |
diff --git a/token-metadata/0xBA11D00c5f74255f56a5E366F4F77f5A186d7f55/metadata.json b/token-metadata/0xBA11D00c5f74255f56a5E366F4F77f5A186d7f55/metadata.json "symbol": "BAND",
"address": "0xBA11D00c5f74255f56a5E366F4F77f5A186d7f55",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/components/carousel/index.jsx b/components/carousel/index.jsx @@ -143,13 +143,7 @@ class Carousel extends React.Component {
if (this.props.hasAutoplay) {
this.startAutoplay();
}
- if (
- this.stageItem &&
- this.stageItem.current &&
- this.stageItem.offsetWidth
- ) {
this.stageWidth = this.stageItem.current.offsetWidth;
- }
window.addEventListener('resize', this.setDimensions, false);
}
@@ -184,15 +178,10 @@ class Carousel extends React.Component {
};
setDimensions = () => {
- let stageWidth = 800;
- if (
- this.stageItem &&
- this.stageItem.current &&
- this.stageItem.current.offsetWidth
- ) {
- stageWidth = this.stageItem.current.offsetWidth;
- }
- this.setState({ stageWidth }, this.changeTranslationAutomatically);
+ this.setState(
+ { stageWidth: this.stageItem.current.offsetWidth },
+ this.changeTranslationAutomatically
+ );
};
setTranslationAmount = (amount, cb) => {
| 13 |
diff --git a/exampleSite/content/docs/installation/content.md b/exampleSite/content/docs/installation/content.md @@ -17,7 +17,7 @@ This way whenever you want to update the theme you can just pull the updates and
git submodule init # If you haven't initialized before
git submodule add https://git.okkur.org/syna themes/syna
cd themes/syna
-git checkout v0.15 # Latest release as of now is v0.15
+git checkout v0.16 # Latest release as of now is v0.16
```
*You can visit [Hugo's documentation](https://gohugo.io/themes/installing-and-using-themes/) on installing themes for more information.*
| 3 |
diff --git a/js/web-server.js b/js/web-server.js @@ -1050,7 +1050,8 @@ function loadModule(dir) {
lastmod("mod") && fs.readdirSync(currentDir + "/mod").forEach(dir => {
const fullpath = currentDir + "/mod/" + dir;
if (dir.charAt(0) === '.') return;
- if (!fs.lstatSync(fullpath).isDirectory()) return;
+ const stats = fs.lstatSync(fullpath);
+ if (!(stats.isDirectory() || stats.isSymbolicLink())) return;
loadModule(fullpath);
});
| 11 |
diff --git a/src/models/marker.js b/src/models/marker.js @@ -104,7 +104,9 @@ const Marker = Model.extend({
// just first dataModel, can lead to problems if first data source doesn't contain dim-concept
const firstDataModel = this._root.dataManager.getDataModels().values().next().value;
- dimensions.forEach(dim => data.push({
+ dimensions
+ .filter(dim => dim != null)
+ .forEach(dim => data.push({
key: [firstDataModel.getConceptprops(dim)],
value: firstDataModel.getConceptprops(dim),
dataSource: firstDataModel
| 8 |
diff --git a/lib/node_modules/@stdlib/strided/common/examples/addon/addon.cpp b/lib/node_modules/@stdlib/strided/common/examples/addon/addon.cpp #include <nan.h>
#include "stdlib/strided_binary.h"
-/**
-* Macro for determining the number of bytes per typed array element.
-*
-* @param x V8 value wrapper
-* @param ctor typed array constructor name
-*
-* @example
-* STDLIB_V8_TYPED_ARRAY_BYTES_PER_ELEMENT( info[ 1 ], Float64Array )
-*/
-#define STDLIB_V8_TYPED_ARRAY_BYTES_PER_ELEMENT( x, ctor ) \
- len = static_cast<int64_t>( (x).As<ctor>()->Length() ); \
- byteLength = static_cast<int64_t>( (x).As<ctor>()->ByteLength() ); \
- bytesPerElement = static_cast<uint8_t>( byteLength / len );
-
/**
* Add-on namespace.
*/
@@ -47,8 +33,22 @@ namespace addon_strided_add {
using Nan::ThrowTypeError;
using Nan::ThrowError;
using v8::Value;
+ using v8::Local;
using v8::Float64Array;
+ /**
+ * Determines the number of bytes per typed array element.
+ *
+ * @param x V8 value wrapper
+ * @return bytes per element
+ */
+ template<class T>
+ uint8_t v8_typed_array_bytes_per_element( T x ) {
+ int64_t len = static_cast<int64_t>( x->Length() );
+ int64_t byteLength = static_cast<int64_t>( x->ByteLength() );
+ return static_cast<uint8_t>( byteLength / len );
+ }
+
/**
* Adds two doubles.
*
@@ -78,8 +78,6 @@ namespace addon_strided_add {
*/
void node_add( const FunctionCallbackInfo<Value>& info ) {
uint8_t bytesPerElement;
- int64_t byteLength;
- int64_t len;
int64_t strides[ 3 ];
int64_t shape[ 1 ];
@@ -116,21 +114,21 @@ namespace addon_strided_add {
// Convert the strides from units of elements to units of bytes...
if ( info[ 1 ]->IsFloat64Array() ) {
- STDLIB_V8_TYPED_ARRAY_BYTES_PER_ELEMENT( info[ 1 ], Float64Array )
+ bytesPerElement = v8_typed_array_bytes_per_element<Local<Float64Array>>( info[ 1 ].As<Float64Array>() );
} else {
bytesPerElement = 0;
}
strides[ 0 ] *= bytesPerElement; // stride in units of bytes
if ( info[ 3 ]->IsFloat64Array() ) {
- STDLIB_V8_TYPED_ARRAY_BYTES_PER_ELEMENT( info[ 3 ], Float64Array )
+ bytesPerElement = v8_typed_array_bytes_per_element<Local<Float64Array>>( info[ 3 ].As<Float64Array>() );
} else {
bytesPerElement = 0;
}
strides[ 1 ] *= bytesPerElement;
if ( info[ 5 ]->IsFloat64Array() ) {
- STDLIB_V8_TYPED_ARRAY_BYTES_PER_ELEMENT( info[ 5 ], Float64Array )
+ bytesPerElement = v8_typed_array_bytes_per_element<Local<Float64Array>>( info[ 5 ].As<Float64Array>() );
} else {
bytesPerElement = 0;
}
| 14 |
diff --git a/packages/bitcore-node/test/integration/wallet-benchmark.integration.ts b/packages/bitcore-node/test/integration/wallet-benchmark.integration.ts @@ -84,7 +84,10 @@ async function checkWalletReceived(wallet: IWallet, txid: string, address: strin
const broadcastedTransaction = await TransactionStorage.collection.findOne({ chain, network, txid });
expect(broadcastedTransaction!.txid).to.eq(txid);
expect(broadcastedTransaction!.fee).gt(0);
- expect(broadcastedTransaction!.wallets[0].toHexString()).to.eq(wallet!._id!.toHexString());
+
+ const txWallets = broadcastedTransaction!.wallets.map(w => w.toHexString());
+ expect(txWallets).to.eq(2);
+ expect(txWallets).to.include(wallet!._id!.toHexString());
}
describe('Wallet Benchmark', function() {
| 3 |
diff --git a/app/shared/components/Producers/Table.js b/app/shared/components/Producers/Table.js @@ -102,7 +102,6 @@ export default class ProducersTable extends Component<Props> {
const isSelected = (selected.indexOf(producer.owner) !== -1);
return (
<ProducersTableRow
- key={idx}
addProducer={this.props.addProducer}
filter={filter}
isSelected={isSelected}
| 13 |
diff --git a/src/server/node_services/nodes_monitor.js b/src/server/node_services/nodes_monitor.js @@ -2078,9 +2078,11 @@ class NodesMonitor extends EventEmitter {
}
dbg.log1('_update_data_activity: reason', reason, item.node.name);
const now = Date.now();
- const act = item.data_activity || {};
- item.data_activity = act;
- act.reason = reason;
+ // if no data activity, or activity reason has changed then reset data_activity
+ if (!item.data_activity || item.data_activity.reason !== reason) {
+ dbg.log0(`data activity reason of ${item.node.name} was changed from ${_.get(item, 'data_activity.reason')} to ${reason}`);
+ item.data_activity = { reason };
+ }
this._update_data_activity_stage(item, now);
this._update_data_activity_progress(item, now);
this._update_data_activity_schedule(item);
@@ -3174,7 +3176,8 @@ class NodesMonitor extends EventEmitter {
if (info.os_info.last_update) {
info.os_info.last_update = new Date(info.os_info.last_update).getTime();
}
- info.os_info.cpu_usage = Math.max(host_item.cpu_usage, host_item.node.cpu_usage); //Total can't be lower then a single process, we also subtract one from another in the FE
+ //Total cpu_usage can't be lower then a single process, we also subtract one from another in the FE
+ info.os_info.cpu_usage = Math.max(host_item.cpu_usage, host_item.node.cpu_usage) || 0;
info.process_cpu_usage = host_item.node.cpu_usage;
info.process_mem_usage = host_item.node.mem_usage;
info.rpc_address = host_item.node.rpc_address;
| 3 |
diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml @@ -21,7 +21,8 @@ jobs:
- run: npm run build
- run: git config --global user.name "GitHub CD bot"
- run: git config --global user.email "[email protected]"
- - run: npm version ${{ github.event.release.tag_name }}
+ - run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
+ - run: git commit -m "[Release] ${{ github.event.release.tag_name }}"
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
| 9 |
diff --git a/guides/install.md b/guides/install.md @@ -7,15 +7,9 @@ heroImagePath: "https://cdn.astronomer.io/website/img/guides/TheAirflowUI_previe
tags: ["Astronomer Platform", "Airflow", "Getting Started"]
---
-For the purpose of this doc, our installation domain is
+*For the purpose of this doc, our application domain is
`mercury.astronomer.io`. You should set this value to your
-desired installation domain name.
-
-This is where we recommend getting started with the Astronomer Platform.
-
----
-
-For the purpose of this doc, our application domain is `mercury.astronomer.io`. You should set this value to your desired domain name.
+desired domain name.*
## 1. Prerequisites
| 7 |
diff --git a/src/MagicMenu.jsx b/src/MagicMenu.jsx @@ -13,19 +13,10 @@ function parseQueryString(queryString) {
}
return query;
}
-const openAiKey = (() => {
- const q = parseQueryString(window.location.search);
- if (q.openAiKey) {
- localStorage.setItem('openAiKey', q.openAiKey);
- window.location.search = '';
- }
- return localStorage.getItem('openAiKey') || null;
-})();
// window.metaversefile = metaversefile; // XXX
const makeAi = prompt => {
- if (openAiKey) {
- const es = new EventSource(`${aiHost}/code?p=${encodeURIComponent(prompt)}&a=${encodeURIComponent(openAiKey)}`);
+ const es = new EventSource(`${aiHost}/code?p=${encodeURIComponent(prompt)}`);
let fullS = '';
es.addEventListener('message', e => {
const s = e.data;
@@ -50,9 +41,6 @@ const makeAi = prompt => {
es.close();
};
return result;
- } else {
- throw new Error('no beta password found in query string');
- }
};
function MagicMenu({open, setOpen}) {
| 2 |
diff --git a/articles/quickstart/backend/ruby/01-authorization.md b/articles/quickstart/backend/ruby/01-authorization.md @@ -72,7 +72,7 @@ class JsonWebToken
end
```
-## Define an `authentincate!` method
+## Define an `authenticate!` method
Create an `authenticate!` method to run before each endpoint which looks for the `access_token` in the `Authorization` header of an incoming request. If the token is present, it should be passed to `JsonWebToken.verify`.
| 1 |
diff --git a/packages/cx/src/data/ops/removeTreeNodes.js b/packages/cx/src/data/ops/removeTreeNodes.js -import {updateTree} from './updateTree';
+import { updateTree } from "./updateTree";
-export function removeTreeNodes(array, criteria, childrenField) {
- return updateTree(array, null, item => false, childrenField, criteria);
+export function removeTreeNodes(array, criteria, childrenField = "$children") {
+ return updateTree(array, null, () => false, childrenField, criteria);
}
| 0 |
diff --git a/src/pages/ReimbursementAccount/Enable2FAPrompt.js b/src/pages/ReimbursementAccount/Enable2FAPrompt.js @@ -9,6 +9,7 @@ import Section from '../../components/Section';
import * as Link from '../../libs/actions/Link';
import CONFIG from '../../CONFIG';
import ROUTES from '../../ROUTES';
+import themeColors from '../../styles/themes/default';
const propTypes = {
...withLocalizePropTypes,
@@ -26,10 +27,12 @@ const Enable2FAPrompt = props => (
icon: Expensicons.Shield,
shouldShowRightIcon: true,
iconRight: Expensicons.NewWindow,
+ iconFill: themeColors.success,
+ wrapperStyle: [styles.cardMenuItem],
},
]}
>
- <View style={[styles.mv4]}>
+ <View style={[styles.mv3]}>
<Text>
{props.translate('validationStep.enable2FAText')}
</Text>
| 4 |
diff --git a/src/components/Hoverable/index.js b/src/components/Hoverable/index.js @@ -16,13 +16,9 @@ class Hoverable extends Component {
};
this.wrapperView = null;
-
- this.resetHoverStateOnOutsideClick = this.resetHoverStateOnOutsideClick.bind(this);
}
componentDidMount() {
- document.addEventListener('mousedown', this.resetHoverStateOnOutsideClick);
-
// we like to Block the hover on touch devices but we keep it for Hybrid devices so
// following logic blocks hover on touch devices.
this.disableHover = () => {
@@ -38,7 +34,6 @@ class Hoverable extends Component {
}
componentWillUnmount() {
- document.removeEventListener('mousedown', this.resetHoverStateOnOutsideClick);
document.removeEventListener('touchstart', this.disableHover);
document.removeEventListener('touchmove', this.enableHover);
}
@@ -59,24 +54,6 @@ class Hoverable extends Component {
}
}
- /**
- * If the user clicks outside this component, we want to make sure that the hover state is set to false.
- * There are some edge cases where the mouse can leave the component without the `onMouseLeave` event firing,
- * leaving this Hoverable in the incorrect state.
- * One such example is when a modal is opened while this component is hovered, and you click outside the component
- * to close the modal.
- *
- * @param {Object} event - A click event
- */
- resetHoverStateOnOutsideClick(event) {
- if (!this.state.isHovered) {
- return;
- }
- if (this.wrapperView && !this.wrapperView.contains(event.target)) {
- this.setIsHovered(false);
- }
- }
-
render() {
if (this.props.absolute && React.isValidElement(this.props.children)) {
return React.cloneElement(React.Children.only(this.props.children), {
@@ -107,6 +84,15 @@ class Hoverable extends Component {
onMouseLeave(el);
}
},
+ onBlur: (el) => {
+ this.setIsHovered(false);
+
+ // Call the original onBlur, if any
+ const {onBlur} = this.props.children;
+ if (_.isFunction(onBlur)) {
+ onBlur(el);
+ }
+ },
});
}
return (
@@ -115,6 +101,7 @@ class Hoverable extends Component {
ref={el => this.wrapperView = el}
onMouseEnter={() => this.setIsHovered(true)}
onMouseLeave={() => this.setIsHovered(false)}
+ onBlur={() => this.setIsHovered(false)}
>
{ // If this.props.children is a function, call it to provide the hover state to the children.
_.isFunction(this.props.children)
| 12 |
diff --git a/detox/ios/Detox/Next/Actions/UIView+DetoxActions.m b/detox/ios/Detox/Next/Actions/UIView+DetoxActions.m @@ -349,7 +349,7 @@ static void _DTXTypeText(NSString* text)
- (void)dtx_clearText
{
- [self dtx_assertHittable];
+// [self dtx_assertHittable];
UIView<UITextInput>* firstResponder = (id)_ensureFirstResponderIfNeeded(self);
@@ -377,7 +377,7 @@ static void _DTXTypeText(NSString* text)
- (void)dtx_typeText:(NSString*)text
{
- [self dtx_assertHittable];
+// [self dtx_assertHittable];
UIView<UITextInput>* firstResponder = (id)_ensureFirstResponderIfNeeded(self);
@@ -388,7 +388,7 @@ static void _DTXTypeText(NSString* text)
- (void)dtx_replaceText:(NSString*)text
{
- [self dtx_assertHittable];
+// [self dtx_assertHittable];
UIView<UITextInput>* firstResponder = (id)_ensureFirstResponderIfNeeded(self);
| 2 |
diff --git a/website/src/docs/dashboard.md b/website/src/docs/dashboard.md @@ -129,6 +129,8 @@ By default, when a file upload has completed, the file icon in the Dashboard tur
### `showProgressDetails: false`
+Passed to the Status Bar plugin used in the Dashboard.
+
By default, progress in Status Bar is shown as a simple percentage. If you would like to also display remaining upload size and time, set this to `true`.
`showProgressDetails: false`: Uploading: 45%
@@ -136,15 +138,27 @@ By default, progress in StatusBar is shown as a simple percentage. If you would
### `hideUploadButton: false`
+Passed to the Status Bar plugin used in the Dashboard.
+
Hide the upload button. Use this if you are providing a custom upload button somewhere, and using the `uppy.upload()` API.
### `hideRetryButton: false`
+Passed to the Status Bar plugin used in the Dashboard.
+
Hide the retry button. Use this if you are providing a custom retry button somewhere, and using the `uppy.retryAll()` or `uppy.retryUpload(fileID)` API.
-### `hidePauseResumeCancelButtons: false`
+### `hidePauseResumeButton: false`
+
+Passed to the Status Bar plugin used in the Dashboard.
+
+Hide pause/resume buttons (for resumable uploads, via [tus](http://tus.io), for example). Use this if you are providing custom cancel or pause/resume buttons somewhere, and using the `uppy.pauseResume(fileID)` or `uppy.removeFile(fileID)` API.
+
+### `hideCancelButton: false`
+
+Passed to the Status Bar plugin used in the Dashboard.
-Hide the cancel or pause/resume buttons (for resumable uploads, via [tus](http://tus.io), for example). Use this if you are providing custom cancel or pause/resume buttons somewhere, and using the `uppy.pauseResume(fileID)`, `uppy.cancelAll()` or `uppy.removeFile(fileID)` API.
+Hide the cancel button. Use this if you are providing a custom retry button somewhere, and using the `uppy.cancelAll()` API.
### `hideProgressAfterFinish: false`
| 3 |
diff --git a/src/scripts/browser/managers/auto-update-manager.js b/src/scripts/browser/managers/auto-update-manager.js @@ -129,7 +129,7 @@ class AutoUpdateManager extends EventEmitter {
}, function (response) {
if (response === 1) {
log('user clicked Download, opening url', downloadUrl);
- shell.openExternal(downloadUrl);
+ shell.openExternal(downloadUrl || global.manifest.homepage);
}
});
} else if (platform.isWindows && global.options.portable) {
@@ -141,7 +141,7 @@ class AutoUpdateManager extends EventEmitter {
}, function (response) {
if (response === 1) {
log('user clicked Download, opening url', downloadUrl);
- shell.openExternal(downloadUrl);
+ shell.openExternal(downloadUrl || global.manifest.homepage);
}
});
} else {
| 12 |
diff --git a/lib/less/source-map-output.js b/lib/less/source-map-output.js @@ -69,6 +69,12 @@ module.exports = function (environment) {
// adjust the source
inputSource = inputSource.slice(this._contentsIgnoredCharsMap[fileInfo.filename]);
}
+
+ // ignore empty content
+ if (inputSource === undefined) {
+ return;
+ }
+
inputSource = inputSource.substring(0, index);
sourceLines = inputSource.split('\n');
sourceColumns = sourceLines[sourceLines.length - 1];
| 8 |
diff --git a/config/vars.yml b/config/vars.yml -lock_url: 'https://cdn.auth0.com/js/lock/11.2.0/lock.min.js'
+lock_url: 'https://cdn.auth0.com/js/lock/11.2.2/lock.min.js'
lock_urlv10: 'https://cdn.auth0.com/js/lock/10.24.1/lock.min.js'
-lock_urlv11: 'https://cdn.auth0.com/js/lock/11.2.0/lock.min.js'
+lock_urlv11: 'https://cdn.auth0.com/js/lock/11.2.2/lock.min.js'
lock_passwordless_url: 'https://cdn.auth0.com/js/lock-passwordless-2.2.min.js'
-auth0js_url: 'https://cdn.auth0.com/js/auth0/9.0.1/auth0.min.js'
-auth0js_urlv9: 'https://cdn.auth0.com/js/auth0/9.0.1/auth0.min.js'
+auth0js_url: 'https://cdn.auth0.com/js/auth0/9.2.2/auth0.min.js'
+auth0js_urlv9: 'https://cdn.auth0.com/js/auth0/9.2.2/auth0.min.js'
auth0js_urlv8: 'https://cdn.auth0.com/js/auth0/8.12.1/auth0.min.js'
auth0js_urlv7: 'https://cdn.auth0.com/w2/auth0-7.6.1.min.js'
auth0_community: 'https://community.auth0.com/'
| 3 |
diff --git a/runtime.js b/runtime.js @@ -25,6 +25,8 @@ const localVector2 = new THREE.Vector3();
const localBox = new THREE.Box3();
const boxGeometry = new THREE.BoxBufferGeometry(1, 1, 1);
+const gcFiles = true;
+
const runtime = {};
let geometryManager = null;
@@ -191,7 +193,7 @@ const _loadGltf = async (file, {optimize = false, physics = false, physics_url =
console.warn(err);
} finally {
if (/^blob:/.test(srcUrl)) {
- URL.revokeObjectURL(srcUrl);
+ gcFiles && URL.revokeObjectURL(srcUrl);
}
}
const {parser, animations} = o;
@@ -496,7 +498,7 @@ const _loadVrm = async (file, {files = null, parentUrl = null, components = [],
console.warn(err);
} finally {
if (/^blob:/.test(srcUrl)) {
- URL.revokeObjectURL(srcUrl);
+ gcFiles && URL.revokeObjectURL(srcUrl);
}
}
o.scene.raw = o;
@@ -593,7 +595,7 @@ const _loadImg = async (file, {files = null, instanceId = null, monetizationPoin
_cleanup();
}
const _cleanup = () => {
- URL.revokeObjectURL(u);
+ gcFiles && URL.revokeObjectURL(u);
};
img.crossOrigin = '';
img.src = u;
@@ -794,7 +796,7 @@ const _loadScript = async (file, {files = null, parentUrl = null, instanceId = n
})
.finally(() => {
for (const u of cachedUrls) {
- URL.revokeObjectURL(u);
+ gcFiles && URL.revokeObjectURL(u);
}
});
};
| 0 |
diff --git a/src/web/index.jsx b/src/web/index.jsx @@ -10,6 +10,7 @@ import {
import i18next from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import XHR from 'i18next-xhr-backend';
+import { TRACE, DEBUG, INFO, WARN, ERROR } from 'universal-logger';
import settings from './config/settings';
import controller from './lib/controller';
import log from './lib/log';
@@ -25,25 +26,16 @@ import './styles/app.styl';
series([
(next) => {
const queryparams = toQueryObject(window.location.search);
- const level = queryparams.log_level || settings.log.level;
+ const level = {
+ trace: TRACE,
+ debug: DEBUG,
+ info: INFO,
+ warn: WARN,
+ error: ERROR
+ }[queryparams.log_level || settings.log.level];
log.setLevel(level);
next();
},
- (next) => {
- const token = store.get('session.token');
- user.signin({ token: token })
- .then(({ authenticated, token }) => {
- if (authenticated) {
- log.debug('Create and establish a WebSocket connection');
- controller.connect(() => {
- // @see "src/web/containers/Login/Login.jsx"
- next();
- });
- return;
- }
- next();
- });
- },
(next) => {
i18next
.use(XHR)
@@ -64,6 +56,21 @@ series([
moment().locale(locale);
next();
});
+ },
+ (next) => {
+ const token = store.get('session.token');
+ user.signin({ token: token })
+ .then(({ authenticated, token }) => {
+ if (authenticated) {
+ log.debug('Create and establish a WebSocket connection');
+ controller.connect(() => {
+ // @see "src/web/containers/Login/Login.jsx"
+ next();
+ });
+ return;
+ }
+ next();
+ });
}
], (err, results) => {
log.info(`${settings.name} v${settings.version}`);
| 1 |
diff --git a/PostBanDeletedPosts.user.js b/PostBanDeletedPosts.user.js // @description When user posts on SO Meta regarding a post ban, fetch and display deleted posts (must be mod) and provide easy way to copy the results into a comment
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 1.5.5
+// @version 1.5.6
//
// @include https://meta.stackoverflow.com/questions/*
//
// Is a deleted user, do nothing
if(postOwner.length === 0) return;
- const username = $('.user-details', post).last().children().first().text().trim();
const uid = postOwner.attr('href').match(/\d+/)[0];
+ const username = $('.user-details', post).last().children().first().text().trim();
+ const userRep = $('.user-details', post).last().find('.reputation-score').text().replace(',', '');
const hasDupeLink = $('.question-originals-of-duplicate a, .comments-list a', post).filter((i, el) => /(https:\/\/meta\.stackoverflow\.com)?\/q(uestions)?\/255583\/?.*/.test(el.href)).length > 0;
const hasTags = $('a.post-tag', post).filter((i, el) => ['post-ban', 'banning', 'deleted-'].some(v => el.innerText.contains(v))).length > 0;
const hasKeywords = ['unable', 'cannot', 'ban', 'block', 'well received'].some(v => postText.contains(v)) && ['question', 'answer', 'post'].some(v => postText.contains(v));
// Definitely not a post ban question, ignore post
- if(!hasDupeLink && !hasTags && !hasKeywords) return;
+ if((!hasDupeLink && !hasTags && !hasKeywords) || Number(userRep) >= 1000) return;
const qnsUrl = `https://${mainDomain}/search?q=user%3a${uid}%20is%3aquestion%20deleted%3a1%20score%3a..0&tab=newest`;
const ansUrl = `https://${mainDomain}/search?q=user%3a${uid}%20is%3aanswer%20deleted%3a1%20score%3a..0&tab=newest`;
| 8 |
diff --git a/src/Services/Air/AirParser.js b/src/Services/Air/AirParser.js @@ -448,6 +448,7 @@ function extractBookings(obj) {
const resKey = `common_${this.uapi_version}:ProviderReservationInfoRef`;
const providerInfo = reservationInfo[booking[resKey]];
const ticketingModifiers = booking['air:TicketingModifiers'];
+ const emails = [];
const passiveReservation = record['passive:PassiveReservation']
? record['passive:PassiveReservation'].find(res =>
@@ -466,6 +467,20 @@ function extractBookings(obj) {
throw new AirRuntimeError.TravelersListError();
}
const name = traveler[`common_${this.uapi_version}:BookingTravelerName`];
+ const travelerEmails = traveler[`common_${this.uapi_version}:Email`];
+ if (travelerEmails) {
+ Object.keys(travelerEmails).forEach(
+ (i) => {
+ const email = travelerEmails[i];
+ if (email[`common_${this.uapi_version}:ProviderReservationInfoRef`]) {
+ emails.push({
+ index: emails.length + 1,
+ email: email.EmailID.toLowerCase(),
+ });
+ }
+ }
+ );
+ }
// SSR DOC parsing of passport data http://gitlab.travel-swift.com/galileo/galileocommand/blob/master/lib/command/booking.js#L84
// TODO safety checks
@@ -635,6 +650,7 @@ function extractBookings(obj) {
segments,
serviceSegments,
passengers,
+ emails,
bookingPCC: providerInfo.OwningPCC,
tickets,
};
| 0 |
diff --git a/lib/base/connection-pool.js b/lib/base/connection-pool.js @@ -7,7 +7,7 @@ const tarn = require('tarn')
const { IDS } = require('../utils')
const ConnectionError = require('../error/connection-error')
const shared = require('../shared')
-const deepclone = require('rfdc/default')
+const clone = require('rfdc/default')
/**
* Class ConnectionPool.
@@ -52,7 +52,7 @@ class ConnectionPool extends EventEmitter {
throw ex
}
} else {
- this.config = deepclone(config)
+ this.config = clone(config)
}
// set defaults
| 10 |
diff --git a/app/models/label/LabelValidationTable.scala b/app/models/label/LabelValidationTable.scala @@ -138,18 +138,18 @@ object LabelValidationTable {
}
/**
- * Calculates and returns the user accuracy for the supplied userId. The accuracy calculation is performed
- * if and only if the users' labels have been validated 10 or more times. The simplest way to think about
- * the accuracy calculation is something like:
+ * Calculates and returns the user accuracy for the supplied userId. The accuracy calculation is performed if and only
+ * if the users' labels have been validated 10 or more times. The simplest way to think about the accuracy calculation
+ * is something like:
*
* number of labels validated correct / (number of labels validated - number of labels marked as unsure)
*
- * Which does not penalize users for labels that they supplied but were rated as unsure by other users
+ * Which does not penalize users for labels that they supplied but were rated as unsure by other users.
*
- * However, this calculation does not take into account that multiple users can validate a single label.
- * So, a slightly more complicated version of this uses majority vote where a label is counted as correct
- * if and only if the number of agreement ratings > number of disagreement ratings. If the num of
- * agreement ratings - num of disagreement ratings = 0, then it counts as unsure
+ * However, this calculation does not take into account that multiple users can validate a single label. So, a
+ * slightly more complicated version of this uses majority vote where a label is counted as correct if and only if the
+ * number of agreement ratings > number of disagreement ratings. If the num of agreement ratings - num of disagreement
+ * ratings = 0, then it counts as unsure
*
* This is the version implemented below.
*
@@ -283,7 +283,7 @@ object LabelValidationTable {
}
/**
- * Counts the number of validations performed by this user (given the supplied userId)
+ * Counts the number of validations performed by this user (given the supplied userId).
*
* @param userId
* @returns the number of validations performed by this user
| 1 |
diff --git a/packages/@snowpack/plugin-babel/plugin.js b/packages/@snowpack/plugin-babel/plugin.js @@ -25,6 +25,7 @@ module.exports = function plugin(_, options) {
cwd: process.cwd(),
ast: false,
compact: false,
+ ...(options.transformOptions || {}),
});
let code = result.code;
if (code) {
| 0 |
diff --git a/packages/app/src/components/Sidebar/PageTree/Item.tsx b/packages/app/src/components/Sidebar/PageTree/Item.tsx @@ -197,21 +197,27 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
}, []);
const onPressEnterForRenameHandler = async(inputText: string) => {
+ if (inputText == null || inputText === '' || inputText.trim() === '' || inputText.includes('/')) {
+ return;
+ }
+
const parentPath = nodePath.dirname(page.path as string);
const newPagePath = `${parentPath}/${inputText}`;
try {
- await apiv3Put('pages/rename', { newPagePath, pageId: page._id, revisionId: page.revision });
setPageTitle(inputText);
+ setRenameInputShown(false);
+ await apiv3Put('/pages/rename', { newPagePath, pageId: page._id, revisionId: page.revision });
}
catch (err) {
+ // open ClosableInput and set pageTitle back to the previous title
+ setPageTitle(nodePath.basename(pageTitle as string));
+ setRenameInputShown(true);
toastError(err);
}
- finally {
- setRenameInputShown(false);
- }
};
+
// TODO: go to create page page
const onPressEnterForCreateHandler = () => {
toastWarning(t('search_result.currently_not_implemented'));
| 7 |
diff --git a/src/plugins/Informer.js b/src/plugins/Informer.js @@ -48,12 +48,15 @@ module.exports = class Informer extends Plugin {
const {isHidden, type, message, details} = state.info
const style = `background-color: ${this.opts.typeColors[type].bg}; color: ${this.opts.typeColors[type].text};`
- // @TODO add aria-live for screen-readers
- // maybe details.length < N to set bubble size
- return html`<div class="Uppy UppyTheme--default UppyInformer" style="${style}" aria-hidden="${isHidden}">
- <p>
+ return html`<div class="Uppy UppyInformer"
+ style="${style}"
+ aria-hidden="${isHidden}" >
+ <p role="alert">
${message}
- ${details ? html`<span style="color: ${this.opts.typeColors[type].bg}" data-balloon="${details}" data-balloon-pos="up" data-balloon-length="large">?</span>` : null}
+ ${details ? html`<span style="color: ${this.opts.typeColors[type].bg}"
+ data-balloon="${details}"
+ data-balloon-pos="up"
+ data-balloon-length="large">?</span>` : null}
</p>
</div>`
}
| 0 |
diff --git a/packages/neutrine/src/core/jumbotron/index.js b/packages/neutrine/src/core/jumbotron/index.js @@ -32,16 +32,22 @@ Jumbotron.defaultProps = {
//Jumbotron title
export const JumbotronTitle = function (props) {
- return helpers.createMergedElement("div", props, "siimple-jumbotron-title");
+ return helpers.createMergedElement("div", props, {
+ "className": "siimple-jumbotron-title"
+ });
};
//Jumbotron subtitle
export const JumbotronSubtitle = function (props) {
- return helpers.createMergedElement("div", props, "siimple-jumbotron-subtitle");
+ return helpers.createMergedElement("div", props, {
+ "className": "siimple-jumbotron-subtitle"
+ });
};
//Jumbotron detail component
export const JumbotronDetail = function (props) {
- return helpers.createMergedElement("div", props, "siimple-jumbotron-detail");
+ return helpers.createMergedElement("div", props, {
+ "className": "siimple-jumbotron-detail"
+ });
};
| 1 |
diff --git a/packages/component-library/stories/index.js b/packages/component-library/stories/index.js @@ -26,8 +26,6 @@ import pullQuoteStory from './PullQuote.story';
import screenGridMapStory from './ScreenGridMap.story';
import pathMapStory from './PathMap.story';
import iconMapStory from './IconMap.story';
-import mapOverlayStory from './MapOverlay.story';
-import hexOverlayStory from './HexOverlay.story';
import { checkA11y } from '@storybook/addon-a11y';
import '../assets/global.styles.css';
@@ -64,4 +62,3 @@ pathMapStory();
iconMapStory();
mapOverlayStory();
hexOverlayStory();
-boundaryMapStory();
| 2 |
diff --git a/admin-base/materialize/custom/_component-explorer.scss b/admin-base/materialize/custom/_component-explorer.scss position: relative;
.toggle-content-explorer {
- width: 40px;
+ width: 2rem;
height: 40px;
position: absolute;
- left: -40px;
- top: 50px;
+ left: -2rem;
+ top: 1rem;
+ border: 1px solid #cfd8dc;
+ border-right: 0;
.material-icons {
+ position: relative;
+ left: -.25rem;
font-size: 40px;
}
}
| 7 |
diff --git a/src/api.js b/src/api.js @@ -79,17 +79,18 @@ module.exports = (app, db) => {
const petLevel = Object.assign({}, pet.level);
delete pet.level;
+ delete pet.tier;
for(const key in petLevel)
pet[key] = petLevel[key];
-
- delete pet.emoji;
- delete pet.tier;
- delete pet.stats;
}
if('html' in req.query)
- res.send(tableify(pets, { showHeaders: false }));
+ res.send(tableify(pets.map(a => [
+ a.type, a.exp, a.active, a.rarity,
+ a.texture_path, a.display_name, a.level.level,
+ a.level.xpCurrent, a.level.xpForNext, a.level.progress,
+ a.level.maxLevel]), { showHeaders: false }));
else
res.json(pets);
}catch(e){
| 12 |
diff --git a/tests/phpunit/integration/Modules/Thank_With_GoogleTest.php b/tests/phpunit/integration/Modules/Thank_With_GoogleTest.php @@ -18,7 +18,6 @@ use Google\Site_Kit\Tests\TestCase;
/**
* @group Modules
- * @group Thank_With_Google
*/
class Thank_With_GoogleTest extends TestCase {
@@ -144,6 +143,7 @@ class Thank_With_GoogleTest extends TestCase {
public function test_is_connected() {
$this->options->delete( Settings::OPTION );
+
$this->assertFalse( $this->thank_with_google->is_connected() );
$this->options->set(
| 2 |
diff --git a/assets/js/components/settings/settings-admin.js b/assets/js/components/settings/settings-admin.js @@ -91,7 +91,6 @@ class SettingsAdmin extends Component {
const {
clientID,
clientSecret,
- apikey,
projectId,
projectUrl,
} = googlesitekit.admin;
@@ -171,23 +170,6 @@ class SettingsAdmin extends Component {
</h5>
</div>
</div>
- { apikey &&
- <div className="googlesitekit-settings-module__meta-items">
- <div
- className={ 'googlesitekit-settings-module__meta-item' + ( projectId && projectUrl ? '' : 'googlesitekit-settings-module__meta-item--nomargin' ) }
- >
- <p className="googlesitekit-settings-module__meta-item-type">
- { __( 'API Key', 'google-site-kit' ) }
- </p>
- <h5 className="
- googlesitekit-settings-module__meta-item-data
- googlesitekit-settings-module__meta-item-data--wrap
- ">
- { apikey }
- </h5>
- </div>
- </div>
- }
{ ( projectId && projectUrl ) &&
<div className="googlesitekit-settings-module__meta-items">
<div className="
| 2 |
diff --git a/packages/inertia-vue/src/link.js b/packages/inertia-vue/src/link.js @@ -25,7 +25,7 @@ export default {
},
preserveState: {
type: Boolean,
- default: false,
+ default: null,
},
only: {
type: Array,
@@ -67,7 +67,7 @@ export default {
method: props.method,
replace: props.replace,
preserveScroll: props.preserveScroll,
- preserveState: props.preserveState,
+ preserveState: props.preserveState !== null ? props.preserveState : (props.method !== 'get'),
only: props.only,
headers: props.headers,
onCancelToken: data.on.cancelToken,
| 7 |
diff --git a/src/utils/staking.js b/src/utils/staking.js @@ -67,7 +67,7 @@ export class Staking {
const lockupState = await (new nearApiJs.Account(this.wallet.connection, account_id)).state()
// add 1 N to storage cost to always leave 1 N in lockup
- const lockupStorage = this.NEAR_PER_BYTE.mul(new BN(lockupState.storage_usage)).add(new BN(parseNearAmount(1), 10))
+ const lockupStorage = this.NEAR_PER_BYTE.mul(new BN(lockupState.storage_usage)).add(new BN(parseNearAmount('1'), 10))
const deposited = new BN(await contract.get_known_deposited_balance(), 10)
let totalUnstaked = new BN(await contract.get_owners_balance(), 10)
.add(new BN(await contract.get_locked_amount(), 10))
| 14 |
diff --git a/index.d.ts b/index.d.ts @@ -68,6 +68,12 @@ declare namespace nerdamer {
*/
export function convertToLaTeX(expression: string): string
+ /**
+ * Attempts to import a LaTeX string.
+ * @param TeX The expression being converted.
+ */
+ export function convertFromLaTeX(TeX: string): Expression
+
/**
* Each time an expression is parsed nerdamer stores the result. Use this method to get back stored expressions.
* @param asObject Pass in true to get expressions as numbered object with 1 as starting index
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.