code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/packages/components/src/Slider/Slider.js b/packages/components/src/Slider/Slider.js import { connect } from '@wp-g2/context';
+import { contextConnect, useContextSystem } from '@wp-g2/context';
import { cx } from '@wp-g2/styles';
import { interpolate, noop, useControlledState } from '@wp-g2/utils';
-import React from 'react';
+import React, { useCallback } from 'react';
import { useFormGroupContext } from '../FormGroup';
import * as styles from './Slider.styles';
const { SliderView } = styles;
-function Slider({
+function Slider(props, forwardedRef) {
+ const {
onChange = noop,
id: idProp,
max = 100,
@@ -16,17 +18,21 @@ function Slider({
size = 'medium',
style,
value: valueProp,
- ...props
-}) {
+ ...otherProps
+ } = useContextSystem(props, 'Slider');
+
const [value, setValue] = useControlledState(valueProp, { initial: 50 });
const { id: contextId } = useFormGroupContext();
const id = idProp || contextId;
- const handleOnChange = (event) => {
+ const handleOnChange = useCallback(
+ (event) => {
const next = parseFloat(event.target.value);
setValue(next);
onChange(next, { event });
- };
+ },
+ [onChange, setValue],
+ );
const currentValue = interpolate(value, [min, max], [0, 100]);
const componentStyles = {
@@ -38,12 +44,13 @@ function Slider({
return (
<SliderView
- {...props}
+ {...otherProps}
cx={__css}
id={id}
max={max}
min={min}
onChange={handleOnChange}
+ ref={forwardedRef}
style={componentStyles}
type="range"
value={value}
@@ -51,4 +58,4 @@ function Slider({
);
}
-export default connect(Slider, 'Slider');
+export default contextConnect(Slider, 'Slider');
| 7 |
diff --git a/app/lib/zap/controller.js b/app/lib/zap/controller.js @@ -205,8 +205,11 @@ class ZapController {
// There was a problem accessing the macaroon file.
else if (
e.code === 'LND_GRPC_MACAROON_ERROR' ||
- e.message.includes('cannot determine data format of binary-encoded macaroon') ||
- e.message.includes('verification failed: signature mismatch after caveat verification')
+ [
+ 'cannot determine data format of binary-encoded macaroon',
+ 'verification failed: signature mismatch after caveat verification',
+ 'unmarshal v2: section extends past end of buffer'
+ ].includes(e.message)
) {
errors.macaroon = e.message
}
| 1 |
diff --git a/lib/cartodb/controllers/map.js b/lib/cartodb/controllers/map.js @@ -329,7 +329,7 @@ function getTilejson(tiles, grids) {
}
MapController.prototype.setTilejsonMetadataToLayergroup = function () {
- return function augmentLayergroupDataMiddleware (req, res, next) {
+ return function augmentLayergroupTilejsonMiddleware (req, res, next) {
const { layergroup, user, mapconfig } = res.locals;
const isVectorOnlyMapConfig = mapconfig.isVectorOnlyMapConfig();
| 10 |
diff --git a/src/reducers/sign.js b/src/reducers/sign.js @@ -2,6 +2,7 @@ import { utils, transactions as transaction } from 'near-api-js'
import { handleActions } from 'redux-actions'
import BN from 'bn.js'
+import { parseTransactionsToSign, signAndSendTransactions, setSignTransactionStatus, selectAccount } from '../actions/account'
const initialState = {
status: 'needs-confirmation'
@@ -61,6 +62,9 @@ const sign = handleActions({
...state,
status: payload.status
}
+ },
+ [selectAccount]: () => {
+ return initialState
}
}, initialState)
| 9 |
diff --git a/server/util/wordembeddings.py b/server/util/wordembeddings.py @@ -10,7 +10,10 @@ def _server_url():
def google_news_2d(words):
+ try:
response = requests.post("{}/embeddings/2d.json".format(_server_url()),
data={'words[]': words,
'model': GOOGLE_NEWS_MODEL_NAME})
return response.json()['results']
+ except Exception:
+ return []
| 9 |
diff --git a/packages/budget/package.json b/packages/budget/package.json "react-router-redux": "^4.0.8",
"react-select": "^1.0.0-rc.3",
"react-sticky": "^5.0.8",
- "recharts": "^0.22.1",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0",
"reselect": "^3.0.0",
| 2 |
diff --git a/versioned_docs/version-5.x/redux-integration.md b/versioned_docs/version-5.x/redux-integration.md @@ -11,7 +11,7 @@ import { Provider } from 'react-redux';
import { NavigationContainer } from '@react-navigation/native';
// Render the app container component with the provider around it
-export default class App() {
+export default function App() {
return (
<Provider store={store}>
<NavigationContainer>
| 1 |
diff --git a/lib/components/dropdown-item.vue b/lib/components/dropdown-item.vue <template>
<a :is="itemType"
- :class="[dropdown-item,{ disabled: disabled }]"
+ :class="['dropdown-item',{ disabled }]"
:to="to"
:href="hrefString"
:disabled="disabled"
tabindex="-1"
role="menuitem"
@click="click"
- ><slot></slot></a>
+ >
+ <slot></slot>
+ </a>
</template>
<script>
| 1 |
diff --git a/src/components/FormEdit.jsx b/src/components/FormEdit.jsx @@ -9,7 +9,13 @@ const reducer = (form, {type, value}) => {
const formCopy = _cloneDeep(form);
switch (type) {
case 'formChange':
- return {...form, ...value};
+ for (let prop in value) {
+ // eslint-disable-next-line no-prototype-builtins
+ if (value.hasOwnProperty(prop)) {
+ form[prop] = value[prop];
+ }
+ }
+ return form;
case 'replaceForm':
return _cloneDeep(value);
case 'title':
| 1 |
diff --git a/runtime.js b/runtime.js @@ -828,6 +828,12 @@ runtime.loadFile = async (file, opts) => {
case 'iframe': {
return await _loadIframe(file, opts);
}
+ case 'mp3': {
+ throw new Error('audio not implemented');
+ }
+ case 'video': {
+ throw new Error('video not implemented');
+ }
}
};
| 0 |
diff --git a/src/pages/acquia.js b/src/pages/acquia.js @@ -53,7 +53,7 @@ export default () => {
p {
font-weight: ${weights.light};
}
- span {
+ div {
${mediaQueries.phoneLarge} {
display: flex;
}
@@ -80,7 +80,7 @@ export default () => {
Fewer conversations about development and more about how to improve
visitor engagement.
</p>
- <span>
+ <div>
<ul>
<li>Migration</li>
<li>Personalization</li>
@@ -91,7 +91,7 @@ export default () => {
<li>Resource Augmentation</li>
<li>Training</li>
</ul>
- </span>
+ </div>
</FullWidthSection>
<ProjectsSlider />
<LogoGrid logoset='acquia' title='Some of Our Acquia Clients' />
| 14 |
diff --git a/src/page/courier/TasksPage.js b/src/page/courier/TasksPage.js @@ -288,6 +288,7 @@ class TasksPage extends Component {
zoomEnabled={true}
zoomControlEnabled={true}
showsUserLocation
+ showsMyLocationButton={ false }
loadingEnabled
loadingIndicatorColor={"#666666"}
loadingBackgroundColor={"#eeeeee"}
| 12 |
diff --git a/index.d.ts b/index.d.ts @@ -1246,8 +1246,8 @@ declare module 'mongoose' {
type ExtractQueryHelpers<M> = M extends Model<any, infer TQueryHelpers> ? TQueryHelpers : {};
type ExtractMethods<M> = M extends Model<any, any, infer TMethods> ? TMethods : {};
- type IndexDirection = 1 | -1;
- type IndexDefinition<T> = { [K in keyof T]: IndexDirection; };
+ type IndexDirection = 1 | -1 | '2d' | '2dsphere' | 'geoHaystack' | 'hashed' | 'text';
+ type IndexDefinition = Record<string, IndexDirection>;
type PreMiddlewareFunction<T> = (this: T, next: (err?: CallbackError) => void) => void | Promise<void>;
type PreSaveMiddlewareFunction<T> = (this: T, next: (err?: CallbackError) => void, opts: SaveOptions) => void | Promise<void>;
@@ -1280,13 +1280,13 @@ declare module 'mongoose' {
eachPath(fn: (path: string, type: SchemaType) => void): this;
/** Defines an index (most likely compound) for this schema. */
- index(fields: IndexDefinition<SchemaDefinition<DocumentDefinition<SchemaDefinitionType>>>, options?: IndexOptions): this;
+ index(fields: IndexDefinition, options?: IndexOptions): this;
/**
* Returns a list of indexes that this schema declares, via `schema.index()`
* or by `index: true` in a path's options.
*/
- indexes(): Array<IndexDefinition<SchemaDefinition<DocumentDefinition<SchemaDefinitionType>>>>;
+ indexes(): Array<IndexDefinition>;
/** Gets a schema option. */
get<K extends keyof SchemaOptions>(key: K): SchemaOptions[K];
| 11 |
diff --git a/src/components/ApplicationGovernance/index.js b/src/components/ApplicationGovernance/index.js +/* eslint-disable jsx-a11y/label-has-for */
/* eslint-disable prettier/prettier */
import {
Alert,
@@ -77,7 +78,6 @@ export default class ApplicationGovernance extends PureComponent {
form.validateFields((err, value) => {
if (!err) {
if (step) {
- // this.checkK8sServiceName({ k8s_service_name: 'graca965_80' });
this.setK8sServiceNames(value);
} else {
this.handleGovernancemode(value);
@@ -113,7 +113,7 @@ export default class ApplicationGovernance extends PureComponent {
});
};
fetchServiceNameList = () => {
- const { dispatch, appID } = this.props;
+ const { dispatch, appID, onCancel } = this.props;
dispatch({
type: 'application/fetchServiceNameList',
payload: {
@@ -122,10 +122,15 @@ export default class ApplicationGovernance extends PureComponent {
},
callback: res => {
if (res && res.bean) {
+ if (res.list && res.list.length > 0) {
this.setState({
step: true,
ServiceNameList: res.list
});
+ } else {
+ this.handleNotification();
+ onCancel();
+ }
}
}
});
| 1 |
diff --git a/packages/learn/src/introductions/front-end-libraries/redux/index.md b/packages/learn/src/introductions/front-end-libraries/redux/index.md @@ -5,6 +5,6 @@ superBlock: Front End Libraries
---
## Introduction to the Redux Challenges
-This introduction is a stub
+[Redux](https://redux.js.org/) is a predictable state container for JavaScript apps. It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. While you can use Redux with any view library, it's introduced here before being combined with React.
-Help us make it real on [GitHub](https://github.com/freeCodeCamp/learn/tree/master/src/introductions).
\ No newline at end of file
+Improve this intro on [GitHub](https://github.com/freeCodeCamp/learn/tree/master/src/introductions/front-end-libraries/redux).
| 7 |
diff --git a/docs/source/guides/core-concepts/cypress-in-a-nutshell.md b/docs/source/guides/core-concepts/cypress-in-a-nutshell.md @@ -76,6 +76,21 @@ In Cypress, the query is the same:
cy.get('.my-selector')
```
+In fact, Cypress wraps jQuery and exposes all of its DOM selection and traversal methods to you so you can work with complex HTML structures with ease.
+
+```js
+// Each method is equivalent to its jQuery counterpart. Use what you know!
+cy.get('#main-content')
+ .find('.article')
+ .children('img[src^="/static"]')
+ .first()
+```
+
+{% note success Core Concept %}
+Cypress leverages jQuery's powerful query engine to make tests familiar and readable for modern web developers.
+
+{% endnote %}
+
Accessing the DOM elements from the query works differently, however:
```js
| 0 |
diff --git a/messagestream.js b/messagestream.js @@ -30,7 +30,7 @@ class MessageStream extends Stream {
this.fd = null;
this.open_pending = false;
this.spool_dir = cfg.main.spool_dir || '/tmp';
- this.filename = this.spool_dir + '/' + id + '.eml';
+ this.filename = `${this.spool_dir}/${id}.eml`;
this.write_pending = false;
this.readable = true;
@@ -303,7 +303,7 @@ class MessageStream extends Stream {
const self = this;
// End dot required?
if (this.ending_dot) {
- this.read_ce.fill('.' + this.line_endings);
+ this.read_ce.fill(`.${this.line_endings}`);
}
// Tell the chunk emitter to send whatever is left
// We don't close the fd here so we can re-use it later.
| 14 |
diff --git a/lib/assets/javascripts/dashboard/views/api-keys/api-keys-list-item.tpl b/lib/assets/javascripts/dashboard/views/api-keys/api-keys-list-item.tpl </button>
</p>
</section>
-<section>
+<ul class="u-flex">
+ <li>
<button class="CDB-Text CDB-Size-medium u-actionTextColor u-rSpace--m js-regenerate">Regenerate</button>
+ </li>
+ <li>
<button class="CDB-Text CDB-Size-medium u-errorTextColor js-delete">Delete</button>
-</section>
+ </li>
+</ul>
| 4 |
diff --git a/assets/js/components/data.js b/assets/js/components/data.js @@ -63,13 +63,13 @@ const lazilySetupLocalCache = () => {
* Respects the current dateRange value, if set.
*
* @param {Object} originalRequest Data request object.
- * @param {string} dateRange Date range slug.
+ * @param {string} dateRange Default date range slug to use if not specified in the request.
* @return {Object} New data request object.
*/
const requestWithDateRange = ( originalRequest, dateRange ) => {
// Make copies for reference safety, ensuring data exists.
const request = { data: {}, ...originalRequest };
- // Use the dateRange in request.data if passed, fallback to filter-provided value.
+ // Use the dateRange in request.data if passed, fallback to provided default value.
request.data = { dateRange, ...request.data };
return request;
| 3 |
diff --git a/README.md b/README.md @@ -40,7 +40,7 @@ If you'd rather stay with **Browserify**, check out **[LiveReactload](https://gi
## Known limitations
-- React Router v3 is not fully supported (e.g. async routes). If you want to get most of React Hot Loader, consider switching to [React Router v4](https://reacttraining.com/react-router/). If you want to understand the reasoning, it's good to start in [React Router v4 FAQ](https://github.com/ReactTraining/react-router/blob/v4/README.md#v4-faq)
+- React Router v3 is not fully supported (e.g. async routes). If you want to get most of React Hot Loader, consider switching to [React Router v4](https://reacttraining.com/react-router/). If you want to understand the reasoning, it's good to start in [React Router v4 FAQ](https://github.com/ReactTraining/react-router/tree/v4.0.0-beta.8#v4-faq)
## The Talk
| 1 |
diff --git a/token-metadata/0x2e071D2966Aa7D8dECB1005885bA1977D6038A65/metadata.json b/token-metadata/0x2e071D2966Aa7D8dECB1005885bA1977D6038A65/metadata.json "symbol": "DICE",
"address": "0x2e071D2966Aa7D8dECB1005885bA1977D6038A65",
"decimals": 16,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/source/plugins/lines/index.mjs b/source/plugins/lines/index.mjs if (!Array.isArray(repository))
return
//Extract author
- const [contributor] = repository.filter(({author}) => context.mode === "repository" ? true : author.login === login)
+ const [contributor] = repository.filter(({author}) => context.mode === "repository" ? true : author?.login === login)
//Compute editions
if (contributor)
contributor.weeks.forEach(({a, d}) => (lines.added += a, lines.deleted += d))
| 9 |
diff --git a/activities/EbookReader.activity/js/library.js b/activities/EbookReader.activity/js/library.js @@ -10,6 +10,7 @@ var LibraryItem = {
<h5 class="mt-0">{{title}}</h5>
{{author}}
</div>
+ <img v-if="image" v-bind:src="image" v-on:error="onImageError()" style="visibility:hidden;width:0px;height:0px;"/>
</div>
</div>
`,
@@ -19,7 +20,7 @@ var LibraryItem = {
this.$emit('clicked');
},
onImageError: function() {
- console.log("Error");
+ this.$emit('imageerror');
}
}
}
@@ -33,7 +34,8 @@ var LibraryViewer = {
v-bind:title="item.title"
v-bind:author="item.author"
v-bind:image="item.image"
- v-bind:url="item.file">
+ v-bind:url="item.file"
+ v-on:imageerror="item.image=''">
</library-item>
</div>
`,
| 9 |
diff --git a/src/components/VaccinationsMap/VaccinationsMap.js b/src/components/VaccinationsMap/VaccinationsMap.js @@ -25,6 +25,7 @@ import { MapComponent } from "./MapComponent";
import type { ComponentType } from "react";
import * as constants from "./constants";
import { LocalAuthorityCard, SoaCard } from "./InfoCard";
+import deepEqual from "deep-equal";
@@ -215,16 +216,23 @@ const Map: ComponentType<*> = ({ data, geoKey, isRate = true, scaleColours, geoJ
});
- mapInstance.on('drag', () =>
- otherMap.setCenter(mapInstance.getCenter())
- );
+ mapInstance.on('move', () => {
+ const centre = mapInstance.getCenter();
+ const otherCentre = otherMap.getCenter();
- mapInstance.on('zoom', function () {
+ if ( !deepEqual(centre, otherCentre) ) {
+ otherMap.setCenter(centre);
+ }
+ });
+
+ mapInstance.on('zoom', () => {
const zoomLevel = mapInstance.getZoom();
+ const otherZoomLevel = otherMap.getZoom();
+ if ( !deepEqual(zoomLevel, otherZoomLevel) ) {
otherMap.setZoom(zoomLevel);
- otherMap.setCenter(mapInstance.getCenter());
+ }
if ( zoomLevel < 7 ) {
setZoomLayerIndex(0);
| 7 |
diff --git a/src/util/__tests__/__snapshots__/scrapUrls.js.snap b/src/util/__tests__/__snapshots__/scrapUrls.js.snap @@ -26,7 +26,7 @@ Array [
"id": "someUrl-2nd-fetch",
"summary": "Changed summary",
"title": "Changed title",
- "url": "http://example.com/article/1111-aaaaa-bbb-ccc",
+ "url": "http://example.com/article/1111",
},
]
`;
| 3 |
diff --git a/src/docs/spec/prop-string.js b/src/docs/spec/prop-string.js @@ -30,8 +30,19 @@ const getPropString = propData => {
}
/*
- Case 3: Numbers
- Numbers are wrapped in in {}
+ Case 3: Array
+ Arrays should be wrapped in {}
+ Example: <Switch accessibleLabels={['ON', 'OFF']}>
+ */
+
+ if (propData[name].type.name === 'arrayOf') {
+ propString += ` ${name}={${propData[name].value}}`
+ return true
+ }
+
+ /*
+ Case 4: Numbers
+ Numbers are wrapped in {}
Example: <Icon size={20}>
*/
@@ -41,16 +52,34 @@ const getPropString = propData => {
}
/*
- Case 4: Strings
+ Case 5: Strings
They should be printed wrapped in double quotes "string"
Example: <Button icon="copy">
*/
- if (typeof propData[name].value === 'string') {
+ if (propData[name].type.name === 'string') {
propString += ` ${name}="${propData[name].value}"`
return true
}
+ /*
+ Case 6: Enum
+ The value for enum should be printed depending on their value
+ Currently supports number and string
+ Example: <From layout="label-on-left">, <Header size={2}>
+ */
+
+ if (propData[name].type.name === 'enum') {
+ /* !isNaN === number */
+ if (!isNaN(propData[name].value)) {
+ propString += ` ${name}={${propData[name].value}}`
+ return true
+ } else if (typeof propData[name].value === 'string') {
+ propString += ` ${name}="${propData[name].value}"`
+ return true
+ }
+ }
+
/*
Default case:
If something reaches here, we probably don't know what to do with yet.
| 9 |
diff --git a/index.js b/index.js @@ -45,7 +45,7 @@ function Option(flags, description) {
this.flags = flags;
this.required = flags.indexOf('<') >= 0;
this.optional = flags.indexOf('[') >= 0;
- this.bool = flags.indexOf('-no-') === -1;
+ this.negate = flags.indexOf('-no-') !== -1;
flags = flags.split(/[ ,|]+/);
if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
this.long = flags.shift();
@@ -403,9 +403,9 @@ Command.prototype.option = function(flags, description, fn, defaultValue) {
}
// preassign default value only for --no-*, [optional], or <required>
- if (!option.bool || option.optional || option.required) {
+ if (option.negate || option.optional || option.required) {
// when --no-foo we make sure default is true, unless a --foo option is already defined
- if (!option.bool) {
+ if (option.negate) {
var opts = self.opts();
defaultValue = Object.prototype.hasOwnProperty.call(opts, name) ? opts[name] : true;
}
@@ -429,17 +429,17 @@ Command.prototype.option = function(flags, description, fn, defaultValue) {
// unassigned or bool
if (typeof self[name] === 'boolean' || typeof self[name] === 'undefined') {
- // if no value, bool true, and we have a default, then use it!
+ // if no value, negate false, and we have a default, then use it!
if (val == null) {
- self[name] = option.bool
- ? defaultValue || true
- : false;
+ self[name] = option.negate
+ ? false
+ : defaultValue || true;
} else {
self[name] = val;
}
} else if (val !== null) {
// reassign
- self[name] = option.bool ? val : false;
+ self[name] = option.negate ? false : val;
}
});
@@ -767,7 +767,7 @@ Command.prototype.parseOptions = function(argv) {
++i;
}
this.emit('option:' + option.name(), arg);
- // bool
+ // flag
} else {
this.emit('option:' + option.name());
}
@@ -1077,7 +1077,7 @@ Command.prototype.optionHelp = function() {
// Append the help information
return this.options.map(function(option) {
return pad(option.flags, width) + ' ' + option.description +
- ((option.bool && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : '');
+ ((!option.negate && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : '');
}).concat([pad(this._helpFlags, width) + ' ' + this._helpDescription])
.join('\n');
};
| 10 |
diff --git a/src/selectors/data.test.js b/src/selectors/data.test.js @@ -152,7 +152,6 @@ describe("resolveEvents", () => {
[eventC.id]: eventC
};
const references = [{ sys: { id: "missing" } }];
- // eventMap: Events references: FieldRef[]
const resolved = resolveEvents(eventMap, references);
expect(resolved).toEqual([]);
});
| 2 |
diff --git a/packages/mjml-core/src/helpers/mjmlconfig.js b/packages/mjml-core/src/helpers/mjmlconfig.js @@ -3,15 +3,6 @@ import fs from 'fs'
import { registerComponent } from '../components'
-export function resolveComponentPath(compPath, componentRootPath) {
- if (!compPath) {
- return null
- } else if (compPath.startsWith('.') || path.isAbsolute(compPath)) {
- return path.resolve(componentRootPath, compPath)
- }
- return require.resolve(compPath)
-}
-
export function readMjmlConfig(configPathOrDir = process.cwd()) {
let componentRootPath = process.cwd()
let mjmlConfigPath = configPathOrDir
@@ -30,6 +21,37 @@ export function readMjmlConfig(configPathOrDir = process.cwd()) {
}
}
+
+export function resolveComponentPath(compPath, componentRootPath) {
+ if (!compPath) {
+ return null
+ }
+ if (!compPath.startsWith('.') && !path.isAbsolute(compPath)) {
+ try {
+ return require.resolve(compPath)
+ } catch (e) {
+ if (e.code !== 'MODULE_NOT_FOUND') {
+ console.log('Error resolving custom component path : ', e) // eslint-disable-line no-console
+ return null
+ }
+ // if we get a 'MODULE_NOT_FOUND' error try again with relative path:
+ return resolveComponentPath(`./${compPath}`, componentRootPath)
+ }
+ }
+ return require.resolve(path.resolve(componentRootPath, compPath))
+}
+
+export function registerCustomComponent(comp, registerCompFn = registerComponent) {
+ if (comp instanceof Function) {
+ registerCompFn(comp)
+ } else {
+ const compNames = Object.keys(comp) // this approach handles both an array and an object (like the mjml-accordion default export)
+ compNames.forEach(compName => {
+ registerCustomComponent(comp[compName], registerCompFn)
+ })
+ }
+}
+
export default function registerCustomComponents(configPathOrDir = process.cwd(), registerCompFn = registerComponent) {
const { mjmlConfig: { packages }, componentRootPath } = readMjmlConfig(configPathOrDir)
packages.forEach(compPath => {
@@ -37,7 +59,7 @@ export default function registerCustomComponents(configPathOrDir = process.cwd()
if (resolvedPath) {
try {
const requiredComp = require(resolvedPath) // eslint-disable-line global-require, import/no-dynamic-require
- registerCompFn(requiredComp.default || requiredComp)
+ registerCustomComponent(requiredComp.default || requiredComp, registerCompFn)
} catch (e) {
if (e.code !== 'ENOENT') {
console.log('Error when registering custom component : ', resolvedPath, e) // eslint-disable-line no-console
| 9 |
diff --git a/wwwroot/config.json b/wwwroot/config.json {
"initializationUrls": [
- "https://raw.githubusercontent.com/TerriaJS/saas-catalogs-public/main/nationalmap/dev.json"
+ "https://terria-catalogs-public.storage.googleapis.com/nationalmap/prod.json"
],
"parameters": {
"appName": "NationalMap",
"<a target=\"_blank\" href=\"http://www.gov.au/\"><img src=\"https://nationalmap.gov.au/images/AG-Rvsd-Stacked-Press.png\" height=\"45\" alt=\"Australian Government\" /></a>"
],
"displayOneBrand": 1,
- "catalogIndexUrl": "http://static.nationalmap.nicta.com.au/init/2021-10-01-index.json",
+ "catalogIndexUrl": "https://terria-catalogs-public.storage.googleapis.com/nationalmap/catalog-index/prod.json",
"cesiumIonAccessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2NzYxZjdkNi1mZmUyLTQ3YjMtOTdiMC00N2Y0ZTg0NWM3Y2EiLCJpZCI6Mjk5MiwiaWF0IjoxNjIyNTA0ODY0fQ.yOdPU8vWbX_dVDbofVpjMMCP59ZA1MKZInIuHV59bRo",
"developerAttribution": {
"link": "https://terria.io",
}
],
"mobileDefaultViewerMode": "2d",
- "regionMappingDefinitionsUrl": "https://raw.githubusercontent.com/TerriaJS/saas-catalogs-public/main/nationalmap/regionMapping-2021-06-02.json",
+ "regionMappingDefinitionsUrl": "https://terria-catalogs-public.storage.googleapis.com/nationalmap/regionMapping-2021-06-02.json",
"showWelcomeMessage": true,
"supportEmail": "[email protected]",
"theme": {
| 14 |
diff --git a/src/samples/conference/README.md b/src/samples/conference/README.md @@ -5,5 +5,5 @@ How to run conference sample
2. Edit basicServer.js. Find `N.API.init`, replace service ID, service key and nuve URL with the correct values.
3. Copy your SSL server certificate to cert/certificate.pfx.
4. Run `initcert.js` to generate a keystore file which contains encrypted SSL server's passphase.
-5. Run `node basicServer.js` to start conference sample. By default, it license on port 3001(insecure) and 3004(secure).
+5. Run `node basicServer.js` to start conference sample. By default, it listens on port 3001(insecure) and 3004(secure).
6. Open a browser and navigate to http://\<hostname\>:3001/ or https://\<hostname\>:3004/.
| 1 |
diff --git a/autoform-api.js b/autoform-api.js @@ -306,7 +306,8 @@ AutoForm.getFormValues = function autoFormGetFormValues(
template,
ss,
getModifier,
- clean = true
+ clean = true,
+ disabled = false
) {
var insertDoc, updateDoc, transforms;
@@ -368,7 +369,7 @@ AutoForm.getFormValues = function autoFormGetFormValues(
if (template.view._domrange) {
// Build a flat document from field values
- doc = getFlatDocOfFieldValues(getAllFieldsInForm(template, true), ss);
+ doc = getFlatDocOfFieldValues(getAllFieldsInForm(template, disabled), ss);
// Expand the flat document
doc = AutoForm.Utility.expandObj(doc);
@@ -546,7 +547,7 @@ AutoForm.getFieldValue = function autoFormGetFieldValue(
if (isMarkedChanged === false) return cachedValue;
- var doc = AutoForm.getFormValues(formId, template, null, false, clean);
+ var doc = AutoForm.getFormValues(formId, template, null, false, clean, true);
if (!doc) return;
var mDoc = new MongoObject(doc);
| 11 |
diff --git a/cli/commands.js b/cli/commands.js @@ -68,11 +68,6 @@ This will compose jhipster:client, jhipster:server and jhipster:languages to sca
argument: ['jdlFiles...'],
cliOnly: true,
options: [
- {
- option: '--skip-install',
- desc: 'Do not automatically install dependencies',
- default: false,
- },
{
option: '--fork',
desc: 'Run generators using fork',
| 2 |
diff --git a/gameplay/avalonRoom.js b/gameplay/avalonRoom.js @@ -633,6 +633,7 @@ module.exports = function(host_, roomId_, io_){
}
this.hostTryStartGame = function(options){
+ if(this.canJoin === false){
//check before starting
if(this.sockets.length < minPlayers){
//NEED AT LEAST FIVE PLAYERS, SHOW ERROR MESSAGE BACK
@@ -658,6 +659,8 @@ module.exports = function(host_, roomId_, io_){
}
}
+ }
+
//start game
this.startGame = function(options){
//make game started after the checks for game already started
| 1 |
diff --git a/ccxt.js b/ccxt.js @@ -11853,9 +11853,9 @@ var poloniex = {
async createOrder (market, type, side, amount, price = undefined, params = {}) {
await this.loadMarkets ();
let method = 'privatePost' + this.capitalize (side);
- let currencyPair = this.marketId (market);
+ let symbol = this.marketId (market);
let response = await this[method] (this.extend ({
- 'currencyPair': currencyPair,
+ 'currencyPair': symbol,
'rate': price,
'amount': amount,
}, params));
@@ -11865,9 +11865,9 @@ var poloniex = {
'type': side,
'startingAmount': amount,
'rate': price,
- 'currencyPair': currencyPair
+ 'symbol': symbol
};
- orderCache[orderId] = order;
+ this.orderCache[orderId] = order;
let result = {
'info': response,
'id': orderId,
@@ -11884,11 +11884,11 @@ var poloniex = {
async fetchOrder (id) {
await this.loadMarkets ();
- let cachedOrder = orderCache[id];
+ let cachedOrder = this.orderCache[id];
if(!cachedOrder)
throw new ExchangeError('Order not found: '+id);
let openOrders = await this.privatePostReturnTradeHistory (this.extend ({
- 'currencyPair': chachedOrder.currencyPair,
+ 'currencyPair': cachedOrder.symbol,
}));
let orderIsOpen = false;
for(let i = 0; i < openOrders.length && !orderIsOpen; i++)
@@ -11907,7 +11907,8 @@ var poloniex = {
}
} catch (error) {
// Unfortunately, poloniex throws an error if you try to get trades where there is none instead of returning an empty array
- // TODO Think how to check if error is the specific one for when the order has no trades
+ if(!(error instanceof ExchangeError) || error.message.indexOf('Order not found, or you are not the person who placed it.') == -1)
+ throw error;
}
let result = {
'info': openOrders,
| 1 |
diff --git a/assets/js/components/wp-dashboard/WPDashboardImpressions.js b/assets/js/components/wp-dashboard/WPDashboardImpressions.js /**
* WordPress dependencies
*/
-import { useEffect } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
/**
@@ -35,7 +34,7 @@ import { isZeroReport } from '../../modules/search-console/util';
import DataBlock from '../DataBlock';
import PreviewBlock from '../PreviewBlock';
import { NOTICE_STYLE } from '../GatheringDataNotice';
-import { calculateChange, trackEvent } from '../../util';
+import { calculateChange } from '../../util';
import sumObjectListValue from '../../util/sum-object-list-value';
import { partitionReport } from '../../util/partition-report';
import { useFeature } from '../../hooks/useFeature';
@@ -78,12 +77,6 @@ const WPDashboardImpressions = ( { WidgetReportZero, WidgetReportError } ) => {
).hasFinishedResolution( 'getReport', [ reportArgs ] )
);
- useEffect( () => {
- if ( error ) {
- trackEvent( 'plugin_setup', 'search_console_error', error.message );
- }
- }, [ error ] );
-
if ( loading || isGatheringData === undefined ) {
return <PreviewBlock width="48%" height="92px" />;
}
| 2 |
diff --git a/app/models/formats/ogr/shp.js b/app/models/formats/ogr/shp.js @@ -34,6 +34,7 @@ ShpFormat.prototype.toSHP = function (options, callback) {
var fmtObj = this;
var zip = global.settings.zipCommand || 'zip';
+ var zipOptions = '-qrj';
var tmpdir = global.settings.tmpDir || '/tmp';
var reqKey = [ 'shp', dbname, user_id, gcol, this.generateMD5(sql) ].concat(skipfields).join(':');
var outdirpath = tmpdir + '/sqlapi-' + process.pid + '-' + reqKey;
@@ -57,10 +58,10 @@ ShpFormat.prototype.toSHP = function (options, callback) {
var next = this;
- var child = spawn(zip, ['-qrj', zipfile, outdirpath ]);
+ var child = spawn(zip, [zipOptions, zipfile, outdirpath ]);
child.on('error', function (err) {
- next(err);
+ next(new Error('Error executing zip command: ' + err));
});
var stderrData = [];
| 7 |
diff --git a/components/landing/stats.js b/components/landing/stats.js @@ -45,16 +45,12 @@ class CoverageChart extends React.Component {
async fetchCoverageStats () {
const client = axios.create({baseURL: process.env.MEASUREMENTS_URL}) // eslint-disable-line
- const [countryCoverage, networkCoverage, runsByMonth] = await Promise.all([
- client.get('/api/_/countries_by_month'),
- client.get('/api/_/asn_by_month'),
- client.get('/api/_/runs_by_month')
- ])
+ const result = await client.get('/api/_/global_overview_by_month')
this.setState({
- countryCoverage: countryCoverage.data,
- networkCoverage: networkCoverage.data,
- runsByMonth: runsByMonth.data,
+ countryCoverage: result.data.countries_by_month,
+ networkCoverage: result.data.networks_by_month,
+ runsByMonth: result.data.measurements_by_month,
fetching: false
})
}
| 4 |
diff --git a/test/jasmine/tests/transform_sort_test.js b/test/jasmine/tests/transform_sort_test.js @@ -6,6 +6,7 @@ var d3 = require('d3');
var createGraphDiv = require('../assets/create_graph_div');
var destroyGraphDiv = require('../assets/destroy_graph_div');
var fail = require('../assets/fail_test');
+var mouseEvent = require('../assets/mouse_event');
describe('Test sort transform defaults:', function() {
function _supply(trace, layout) {
@@ -241,4 +242,102 @@ describe('Test sort transform interactions:', function() {
.catch(fail)
.then(done);
});
+
+ it('does not preserve hover/click `pointNumber` value', function(done) {
+ var gd = createGraphDiv();
+
+ function getPxPos(gd, id) {
+ var trace = gd.data[0];
+ var fullLayout = gd._fullLayout;
+ var index = trace.ids.indexOf(id);
+
+ return [
+ fullLayout.xaxis.d2p(trace.x[index]),
+ fullLayout.yaxis.d2p(trace.y[index])
+ ];
+ }
+
+ function hover(gd, id) {
+ return new Promise(function(resolve) {
+ gd.once('plotly_hover', function(eventData) {
+ resolve(eventData);
+ });
+
+ var pos = getPxPos(gd, id);
+ mouseEvent('mousemove', pos[0], pos[1]);
+ });
+ }
+
+ function click(gd, id) {
+ return new Promise(function(resolve) {
+ gd.once('plotly_click', function(eventData) {
+ resolve(eventData);
+ });
+
+ var pos = getPxPos(gd, id);
+ mouseEvent('mousemove', pos[0], pos[1]);
+ mouseEvent('mousedown', pos[0], pos[1]);
+ mouseEvent('mouseup', pos[0], pos[1]);
+ });
+ }
+
+ function wait() {
+ return new Promise(function(resolve) {
+ setTimeout(resolve, 60);
+ });
+ }
+
+ function assertPt(eventData, x, y, pointNumber, id) {
+ var pt = eventData.points[0];
+
+ expect(pt.x).toEqual(x, 'x');
+ expect(pt.y).toEqual(y, 'y');
+ expect(pt.pointNumber).toEqual(pointNumber, 'pointNumber');
+ expect(pt.fullData.ids[pt.pointNumber]).toEqual(id, 'id');
+ }
+
+ Plotly.plot(gd, [{
+ mode: 'markers',
+ x: [-2, -1, -2, 0, 1, 3, 1],
+ y: [1, 2, 3, 1, 2, 3, 1],
+ ids: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
+ marker: {
+ size: [10, 20, 5, 1, 6, 0, 10]
+ },
+ transforms: [{
+ enabled: false,
+ type: 'sort',
+ target: 'marker.size',
+ }]
+ }], {
+ width: 500,
+ height: 500,
+ margin: {l: 0, t: 0, r: 0, b: 0},
+ hovermode: 'closest'
+ })
+ .then(function() { return hover(gd, 'D'); })
+ .then(function(eventData) {
+ assertPt(eventData, 0, 1, 3, 'D');
+ })
+ .then(wait)
+ .then(function() { return click(gd, 'G'); })
+ .then(function(eventData) {
+ assertPt(eventData, 1, 1, 6, 'G');
+ })
+ .then(wait)
+ .then(function() {
+ return Plotly.restyle(gd, 'transforms[0].enabled', true);
+ })
+ .then(function() { return hover(gd, 'D'); })
+ .then(function(eventData) {
+ assertPt(eventData, 0, 1, 1, 'D');
+ })
+ .then(wait)
+ .then(function() { return click(gd, 'G'); })
+ .then(function(eventData) {
+ assertPt(eventData, 1, 1, 5, 'G');
+ })
+ .catch(fail)
+ .then(done);
+ });
});
| 0 |
diff --git a/src/core/Core.js b/src/core/Core.js @@ -190,7 +190,11 @@ class Uppy {
}
if (this.opts.autoProceed) {
- this.bus.emit('core:upload')
+ this.upload()
+ .catch((err) => {
+ console.error(err.stack || err.message)
+ })
+ // this.bus.emit('core:upload')
}
}
| 1 |
diff --git a/server/game/cards/01 - Core/ShinjoOutrider.js b/server/game/cards/01 - Core/ShinjoOutrider.js +const DrawCard = require('../../drawcard.js');
+
+class ShinjoOutrider extends DrawCard {
+ setupCardAbilities() {
+ this.action({
+ title: 'Move this character to conflict',
+ condition: () => this.game.currentConflict && this.allowGameAction('moveToConflict'),
+ handler: () => {
+ this.game.addMessage('{0} moves {1} to the conflict by using its ability', this.controller, this);
+ this.game.currentConflict.moveToConflict(this);
+ }
+ });
+ }
+}
+
+ShinjoOutrider.id = 'shinjo-outider';
+
+module.exports = ShinjoOutrider;
| 2 |
diff --git a/packages/rekit-core/core/create.js b/packages/rekit-core/core/create.js @@ -24,7 +24,7 @@ function create(options) {
};
if (!options.type) options.type = 'rekit-react';
- const prjDir = path.join(process.cwd(), options.name);
+ const prjDir = path.join(options.position || process.cwd(), options.name);
return new Promise(async (resolve, reject) => {
try {
if (fs.existsSync(prjDir)) {
@@ -114,7 +114,7 @@ function postCreate(prjDir, options) {
if (fs.existsSync(postCreateScript)) {
options.status('EXEC_POST_CREATE', 'Post creation...');
require(postCreateScript)(options);
- fs.remove(postCreateScript);
+ fs.removeSync(postCreateScript);
}
}
| 11 |
diff --git a/helm/raspberrymatic/templates/deployment.yaml b/helm/raspberrymatic/templates/deployment.yaml @@ -46,7 +46,14 @@ spec:
name: ccu-volume
- mountPath: /sys
name: sys
+ - mountPath: /lib/modules
+ name: modules
volumes:
+ - name: modules
+ hostPath:
+ path: /lib/modules
+ type: Directory
+ - name: ccu-volume
- name: sys
hostPath:
path: /sys
| 1 |
diff --git a/lib/defaults/index.js b/lib/defaults/index.js @@ -4,7 +4,7 @@ var utils = require('../utils');
var normalizeHeaderName = require('../helpers/normalizeHeaderName');
var AxiosError = require('../core/AxiosError');
var transitionalDefaults = require('./transitional');
-var toFormData = require('./helpers/toFormData');
+var toFormData = require('../helpers/toFormData');
var DEFAULT_CONTENT_TYPE = {
'Content-Type': 'application/x-www-form-urlencoded'
@@ -121,7 +121,7 @@ var defaults = {
maxBodyLength: -1,
env: {
- FormData: require('./defaults/env/FormData')
+ FormData: require('./env/FormData')
},
validateStatus: function validateStatus(status) {
| 1 |
diff --git a/lib/assets/core/test/spec/cartodb3/dataset/dataset-content-view.spec.js b/lib/assets/core/test/spec/cartodb3/dataset/dataset-content-view.spec.js @@ -89,12 +89,6 @@ describe('dataset/dataset-content-view', function () {
expect(this.view.$('.Table').hasClass('is-disabled')).toBeTruthy();
expect(this.view.$('.SyncInfo').length).toBe(0);
});
-
- it('should render again when sync is destroyed', function () {
- DatasetContentView.prototype.render.calls.reset();
- this.syncModel.destroy();
- expect(DatasetContentView.prototype.render).toHaveBeenCalled();
- });
});
it('should not have leaks', function () {
| 2 |
diff --git a/test/blockchain.js b/test/blockchain.js @@ -30,7 +30,11 @@ describe('embark.Blockchain', function () {
vmdebug: false,
whisper: true,
account: {},
- bootnodes: ""
+ bootnodes: "",
+ wsApi: [ "eth", "web3", "net", "shh" ],
+ wsHost: "localhost",
+ wsOrigins: false,
+ wsPort: 8546
};
let blockchain = new Blockchain(config, 'geth');
@@ -59,7 +63,11 @@ describe('embark.Blockchain', function () {
vmdebug: false,
whisper: false,
account: {},
- bootnodes: ""
+ bootnodes: "",
+ wsApi: [ "eth", "web3", "net", "shh" ],
+ wsHost: "localhost",
+ wsOrigins: false,
+ wsPort: 8546
};
let blockchain = new Blockchain(config, 'geth');
| 3 |
diff --git a/test/validation_contracts.test.js b/test/validation_contracts.test.js @@ -2,6 +2,8 @@ var test = require('ava');
var definition = require("../definition");
var evalFormulaBB = require("../formula/index");
+var constants = require('../constants.js');
+constants.formulaUpgradeMci = 0;
var objValidationState = {
last_ball_mci: 0,
| 12 |
diff --git a/src/components/modebar/buttons.js b/src/components/modebar/buttons.js @@ -641,7 +641,7 @@ function handleMapboxZoom(gd, ev) {
var val = button.getAttribute('data-val');
var fullLayout = gd._fullLayout;
var subplotIds = fullLayout._subplots.mapbox || [];
- var scalar = 1.3;
+ var scalar = 1.05;
var aObj = {};
for(var i = 0; i < subplotIds.length; i++) {
| 12 |
diff --git a/Sortable.js b/Sortable.js }
- function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvt, insertAfter) {
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvt, willInsertAfter) {
var evt,
sortable = fromEl[expando],
onMoveFn = sortable.options.onMove,
evt.draggedRect = dragRect;
evt.related = targetEl || toEl;
evt.relatedRect = targetRect || toEl.getBoundingClientRect();
- evt.insertAfter = insertAfter;
+ evt.willInsertAfter = willInsertAfter;
fromEl.dispatchEvent(evt);
| 10 |
diff --git a/js/huobi.js b/js/huobi.js @@ -2243,8 +2243,12 @@ module.exports = class huobi extends Exchange {
* @returns {[object]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure}
*/
await this.loadMarkets ();
+ let market = undefined;
+ if (symbol !== undefined) {
+ market = this.market (symbol);
+ }
let marketType = undefined;
- [ marketType, params ] = this.handleMarketTypeAndParams ('fetchMyTrades', undefined, params);
+ [ marketType, params ] = this.handleMarketTypeAndParams ('fetchMyTrades', market, params);
const request = {
// spot -----------------------------------------------------------
// 'symbol': market['id'],
@@ -2265,7 +2269,6 @@ module.exports = class huobi extends Exchange {
// 'size': limit, // default 20, max 50
};
let method = undefined;
- let market = undefined;
if (marketType === 'spot') {
if (symbol !== undefined) {
market = this.market (symbol);
@@ -2283,7 +2286,6 @@ module.exports = class huobi extends Exchange {
if (symbol === undefined) {
throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol for ' + marketType + ' orders');
}
- const market = this.market (symbol);
request['contract_code'] = market['id'];
request['trade_type'] = 0; // 0 all, 1 open long, 2 open short, 3 close short, 4 close long, 5 liquidate long positions, 6 liquidate short positions
if (market['linear']) {
| 7 |
diff --git a/source/Overture/views/controls/RichTextView.js b/source/Overture/views/controls/RichTextView.js @@ -63,6 +63,7 @@ var RichTextView = NS.Class({
isFocussed: false,
isDisabled: false,
+ tabIndex: undefined,
allowTextSelection: true,
@@ -191,6 +192,7 @@ var RichTextView = NS.Class({
draw: function ( layer, Element, el ) {
var editorClassName = this.get( 'editorClassName' );
var editingLayer = this._editingLayer = el( 'div', {
+ tabIndex: this.get( 'tabIndex' ),
className: 'v-RichText-input' +
( editorClassName ? ' ' + editorClassName : '' )
});
@@ -225,9 +227,9 @@ var RichTextView = NS.Class({
];
},
- disabledNeedsRedraw: function ( self, property, oldValue ) {
+ viewNeedsRedraw: function ( self, property, oldValue ) {
this.propertyNeedsRedraw( self, property, oldValue );
- }.observes( 'isDisabled' ),
+ }.observes( 'isDisabled', 'tabIndex' ),
redrawIsDisabled: function () {
this._editingLayer.setAttribute( 'contenteditable',
@@ -235,6 +237,10 @@ var RichTextView = NS.Class({
);
},
+ redrawTabIndex: function () {
+ this._editingLayer.set( 'tabIndex', this.get( 'tabIndex' ) );
+ },
+
// ---
redrawIOSCursor: function () {
| 0 |
diff --git a/app.rb b/app.rb @@ -71,7 +71,7 @@ end
get '/launches/upcoming' do
content_type :json
year = "upcoming"
- statement = DB.prepare("SELECT * FROM launch WHERE launch_year = ?", :cast_booleans => true)
+ statement = DB.prepare("SELECT * FROM launch WHERE launch_year = ?")
results = statement.execute(year)
hash = results.each do |row|
end
| 13 |
diff --git a/packages/node_modules/@node-red/nodes/core/storage/10-file.js b/packages/node_modules/@node-red/nodes/core/storage/10-file.js @@ -58,11 +58,6 @@ module.exports = function(RED) {
if(filename == "") { //was using empty value to denote msg.filename
node.filename = "filename";
node.filenameType = "msg";
- } else if(/^\${[^}]+}$/.test(filename)) { //was using an ${ENV_VAR}
- node.filenameType = "env";
- node.filename = filename.replace(/\${([^}]+)}/g, function(match, name) {
- return (name === undefined)?"":name;
- });
} else { //was using a static filename - set typedInput type to str
node.filenameType = "str";
}
@@ -305,11 +300,6 @@ module.exports = function(RED) {
if(filename == "") { //was using empty value to denote msg.filename
node.filename = "filename";
node.filenameType = "msg";
- } else if(/^\${[^}]+}$/.test(filename)) { //was using an ${ENV_VAR}
- node.filenameType = "env";
- node.filename = filename.replace(/\${([^}]+)}/g, function(match, name) {
- return (name === undefined)?"":name;
- });
} else { //was using a static filename - set typedInput type to str
node.filenameType = "str";
}
| 2 |
diff --git a/src/encoded/static/components/filegallery.js b/src/encoded/static/components/filegallery.js @@ -1807,8 +1807,9 @@ class FileGalleryRendererComponent extends React.Component {
availableAssembliesAnnotations: collectAssembliesAnnotations(datasetFiles),
};
- /** used to see if related_files has been updated */
- this.prevRelatedFileAtIds = [];
+ /** Used to see if related_files has been updated */
+ this.prevRelatedFiles = [];
+ this.relatedFilesRequested = false;
// Bind `this` to non-React methods.
this.setInfoNodeId = this.setInfoNodeId.bind(this);
@@ -1834,8 +1835,8 @@ class FileGalleryRendererComponent extends React.Component {
}
}
- componentDidUpdate() {
- this.updateFiles();
+ componentDidUpdate(prevProps, prevState, prevContext) {
+ this.updateFiles(!!(prevContext.session && prevContext.session['auth.userid']));
}
// Called from child components when the selected node changes.
@@ -1883,29 +1884,28 @@ class FileGalleryRendererComponent extends React.Component {
* content changes. In addition, collect all the assemblies/annotations associated with the
* combined files so we can choose a visualization browser.
*/
- updateFiles() {
+ updateFiles(prevLoggedIn) {
const { context, data } = this.props;
- let relatedPromise;
+ const { session } = this.context;
+ const loggedIn = !!(session && session['auth.userid']);
const relatedFileAtIds = context.related_files && context.related_files.length > 0 ? context.related_files : [];
const datasetFiles = data ? data['@graph'] : [];
// The number of related_files has changed (or we have related_files for the first time).
// Request them and add them to the files from the original file request.
- if (relatedFileAtIds.length !== this.prevRelatedFileAtIds.length) {
- this.prevRelatedFileAtIds = relatedFileAtIds;
- if (relatedFileAtIds.length > 0) {
- relatedPromise = requestFiles(relatedFileAtIds, datasetFiles).then(relatedFiles => datasetFiles.concat(relatedFiles));
- } else {
- // No related_files, so just use files directly in the dataset.files.
- relatedPromise = Promise.resolve(this.state.files);
- }
+ let relatedPromise;
+ if (loggedIn !== prevLoggedIn || !this.relatedFilesRequested) {
+ relatedPromise = requestFiles(relatedFileAtIds, datasetFiles);
+ this.relatedFilesRequested = true;
} else {
- relatedPromise = Promise.resolve(this.state.files);
+ relatedPromise = Promise.resolve(this.prevRelatedFiles);
}
// Whether we have related_files or not, get all files' assemblies and annotations, and
// the first genome browser for them.
- relatedPromise.then((allFiles) => {
+ relatedPromise.then((relatedFiles) => {
+ this.prevRelatedFiles = relatedFiles;
+ const allFiles = datasetFiles.concat(relatedFiles);
if (allFiles.length !== this.state.files.length) {
this.setState({ files: allFiles });
| 9 |
diff --git a/.eslintrc.js b/.eslintrc.js @@ -14,12 +14,7 @@ module.exports = {
},
rules: {
- 'guard-for-in': 'off',
- 'import/no-dynamic-require': 'off',
- 'key-spacing': 'off',
'no-restricted-syntax': 'off',
- 'one-var-declaration-per-line': ['error', 'always'],
- semi: ['error', 'always'],
strict: 'off',
// workaround for git + eslint line ending issue on Travis for Windows OS:
// https://travis-ci.community/t/files-in-checkout-have-eol-changed-from-lf-to-crlf/349/2
| 2 |
diff --git a/token-metadata/0xa689DCEA8f7ad59fb213be4bc624ba5500458dC6/metadata.json b/token-metadata/0xa689DCEA8f7ad59fb213be4bc624ba5500458dC6/metadata.json "symbol": "EBASE",
"address": "0xa689DCEA8f7ad59fb213be4bc624ba5500458dC6",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/js/pages/incidence-rates/ir-manager.js b/js/pages/incidence-rates/ir-manager.js @@ -287,7 +287,7 @@ define([
onExecuteClick(sourceItem) {
IRAnalysisService.execute(this.selectedAnalysisId(), sourceItem.source.sourceKey)
.then(({data}) => {
- jobDetailsService.createJob(data);
+ JobDetailsService.createJob(data);
this.pollForInfo();
});
}
@@ -346,7 +346,7 @@ define([
this.isRunning(true);
IRAnalysisService.execute(this.selectedAnalysisId(), sourceItem.source.sourceKey)
.then(({data}) => {
- jobDetailsService.createJob(data);
+ JobDetailsService.createJob(data);
this.pollForInfo();
});
}
| 1 |
diff --git a/app/zwallet.js b/app/zwallet.js @@ -53,7 +53,7 @@ const withdrawButton = document.getElementById('withdrawButton');
const withdrawStatusTitleNode = document.getElementById('withdrawStatusTitle');
const withdrawStatusBodyNode = document.getElementById('withdrawStatusBody');
-const refreshTimeout = 60;
+const refreshTimeout = 150;
let refreshTimer;
let showZeroBalances = false;
let depositQrcodeTimer;
| 12 |
diff --git a/src/FormController.js b/src/FormController.js @@ -637,6 +637,28 @@ class FormController extends EventEmitter {
const { field: name, state } = field;
debug('Register ID:', id, 'Name:', name, state, 'Initial', initialRender);
+ // Example foo.bar.baz[3].baz >>>> foo.bar.baz[3]
+ const magicValue = name.slice(
+ 0,
+ name.lastIndexOf('[') != -1 ? name.lastIndexOf(']') + 1 : name.length
+ );
+
+ // Field might be coming back after render remove old field
+ let alreadyRegistered;
+ this.fieldsById.forEach((value, key) => {
+ if (value && value.field === name) {
+ alreadyRegistered = key;
+ }
+ });
+
+ if (!this.expectedRemovals[magicValue] && alreadyRegistered) {
+ debug('Already Registered', name);
+ this.fieldsById.delete(alreadyRegistered);
+ this.fieldsByName.delete(name);
+ }
+
+ debug('Fields Registered', this.fieldsById.size);
+
// The field is on the screen
this.onScreen[id] = field;
@@ -644,12 +666,6 @@ class FormController extends EventEmitter {
this.fieldsById.set(id, field);
this.fieldsByName.set(name, field);
- // Example foo.bar.baz[3].baz >>>> foo.bar.baz[3]
- const magicValue = name.slice(
- 0,
- name.lastIndexOf('[') != -1 ? name.lastIndexOf(']') + 1 : name.length
- );
-
// Always clear out expected removals when a reregistering array field comes in
debug('clearing expected removal', magicValue);
delete this.expectedRemovals[magicValue];
| 1 |
diff --git a/docs/content/widgets/TreeGrid.js b/docs/content/widgets/TreeGrid.js import { Controller, KeySelection, TreeAdapter } from 'cx/ui';
-import { Grid, TreeNode } from 'cx/widgets';
+import { Content, Grid, Tab, TreeNode } from 'cx/widgets';
import { ConfigTable } from '../../components/ConfigTable';
import { CodeSnippet } from '../../components/CodeSnippet';
import { CodeSplit } from '../../components/CodeSplit';
@@ -68,8 +68,13 @@ export const TreeGrid = <cx>
]}
/>
- <CodeSnippet putInto="code" fiddle="riuObfzq">{`
+ <Content name="code">
+ <div>
+ <Tab value-bind="$page.code.tab" tab="controller" mod="code"><code>Controller</code></Tab>
+ <Tab value-bind="$page.code.tab" tab="grid" mod="code" default><code>Grid</code></Tab>
+ </div>
+ <CodeSnippet visible-expr="{$page.code.tab}=='controller'" fiddle="riuObfzq">{`
class PageController extends Controller {
onInit() {
this.idSeq = 0;
@@ -89,8 +94,8 @@ export const TreeGrid = <cx>
}));
}
}
- ...
-
+ `}</CodeSnippet>
+ <CodeSnippet visible-expr="{$page.code.tab}=='grid'" fiddle="riuObfzq">{`
<Grid
buffered
records:bind='$page.data'
@@ -126,6 +131,7 @@ export const TreeGrid = <cx>
/>
`}</CodeSnippet>
+ </Content>
</CodeSplit>
## `TreeNode` Configuration
| 0 |
diff --git a/test/jasmine/tests/gl3dlayout_test.js b/test/jasmine/tests/gl3dlayout_test.js @@ -26,7 +26,9 @@ describe('Test gl3d axes defaults', function() {
};
beforeEach(function() {
- layoutOut = {};
+ layoutOut = {
+ axesconvertnumeric: true
+ };
});
it('should define specific default set with empty initial layout', function() {
@@ -128,6 +130,7 @@ describe('Test Gl3d layout defaults', function() {
beforeEach(function() {
layoutOut = {
+ axesconvertnumeric: true,
_basePlotModules: ['gl3d'],
_dfltTitle: {x: 'xxx', y: 'yyy', colorbar: 'cbbb'},
_subplots: {gl3d: ['scene']}
@@ -380,6 +383,66 @@ describe('Test Gl3d layout defaults', function() {
expect(layoutOut.scene.zaxis.gridcolor)
.toEqual(tinycolor.mix('#444', bgColor, frac).toRgbString());
});
+
+ it('should disable converting numeric strings using axis.convertnumeric', function() {
+ supplyLayoutDefaults({
+ scene: {
+ xaxis: {
+ convertnumeric: false
+ },
+ yaxis: {
+ convertnumeric: false
+ },
+ zaxis: {
+ convertnumeric: false
+ }
+ }
+ }, layoutOut, [{
+ type: 'scatter3d',
+ x: ['0', '1', '1970', '2000'],
+ y: ['0', '1', '1970', '2000'],
+ z: ['0', '1', '1970', '2000'],
+ scene: 'scene'
+ }]);
+
+ expect(layoutOut.scene.xaxis.convertnumeric).toBe(false);
+ expect(layoutOut.scene.yaxis.convertnumeric).toBe(false);
+ expect(layoutOut.scene.zaxis.convertnumeric).toBe(false);
+ expect(layoutOut.scene.xaxis.type).toBe('category');
+ expect(layoutOut.scene.yaxis.type).toBe('category');
+ expect(layoutOut.scene.zaxis.type).toBe('category');
+ });
+
+ it('should enable converting numeric strings using axis.convertnumeric and inherit defaults from layout.axesconvertnumeric', function() {
+ layoutOut.axesconvertnumeric = false;
+
+ supplyLayoutDefaults({
+ scene: {
+ xaxis: {
+ convertnumeric: true
+ },
+ yaxis: {
+ convertnumeric: true
+ },
+ zaxis: {
+ convertnumeric: true
+ }
+ }
+ }, layoutOut, [{
+ type: 'scatter3d',
+ x: ['0', '1', '1970', '2000'],
+ y: ['0', '1', '1970', '2000'],
+ z: ['0', '1', '1970', '2000'],
+ scene: 'scene'
+ }]);
+
+ expect(layoutOut.scene.xaxis.convertnumeric).toBe(true);
+ expect(layoutOut.scene.yaxis.convertnumeric).toBe(true);
+ expect(layoutOut.scene.zaxis.convertnumeric).toBe(true);
+ expect(layoutOut.scene.xaxis.type).toBe('linear');
+ expect(layoutOut.scene.yaxis.type).toBe('linear');
+ expect(layoutOut.scene.zaxis.type).toBe('linear');
+ });
});
});
| 0 |
diff --git a/index.d.ts b/index.d.ts @@ -62,8 +62,8 @@ export interface AxiosRequestConfig {
onUploadProgress?: (progressEvent: ProgressEvent) => void;
onDownloadProgress?: (progressEvent: ProgressEvent) => void;
maxContentLength?: number;
+ validateStatus?: ((status: number) => boolean | null);
maxBodyLength?: number;
- validateStatus?: (status: number) => boolean;
maxRedirects?: number;
socketPath?: string | null;
httpAgent?: any;
| 1 |
diff --git a/token-metadata/0xaa7FB1c8cE6F18d4fD4Aabb61A2193d4D441c54F/metadata.json b/token-metadata/0xaa7FB1c8cE6F18d4fD4Aabb61A2193d4D441c54F/metadata.json "symbol": "SHIT",
"address": "0xaa7FB1c8cE6F18d4fD4Aabb61A2193d4D441c54F",
"decimals": 6,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/encoded/audit/experiment.py b/src/encoded/audit/experiment.py @@ -2163,24 +2163,6 @@ def audit_experiment_documents(value, system, excluded_types):
return
-def audit_experiment_assay(value, system, excluded_types):
- '''
- Experiments should have assays with valid ontologies term ids and names that
- are a valid synonym.
- '''
- if value['status'] == 'deleted':
- return
-
- term_id = value.get('assay_term_id')
- term_name = value.get('assay_term_name')
-
- if term_id.startswith('NTR:'):
- detail = 'Assay_term_id is a New Term Request ({} - {})'.format(
- term_id, term_name)
- yield AuditFailure('NTR assay', detail, level='INTERNAL_ACTION')
- return
-
-
def audit_experiment_target(value, system, excluded_types):
'''
Certain assay types (ChIP-seq, ...) require valid targets and the replicate's
@@ -3382,7 +3364,6 @@ function_dispatcher_without_files = {
'audit_replication': audit_experiment_replicated,
'audit_RNA_size': audit_library_RNA_size_range,
'audit_missing_modifiction': audit_missing_modification,
- 'audit_NTR': audit_experiment_assay,
'audit_AB_characterization': audit_experiment_antibody_characterized,
'audit_control': audit_experiment_control,
'audit_spikeins': audit_experiment_spikeins
| 2 |
diff --git a/lib/assertions.js b/lib/assertions.js @@ -375,9 +375,7 @@ module.exports = expect => {
},
() => {
expect.fail({
- diff:
- !expect.flags.not &&
- ((output, diff, inspect, equal) => {
+ diff: (output, diff, inspect, equal) => {
output.inline = true;
const keyInValue = {};
@@ -431,7 +429,7 @@ module.exports = expect => {
subjectType.suffix(output, subject);
return output;
- })
+ }
});
}
);
| 2 |
diff --git a/packages/webpacker/src/plugins.js b/packages/webpacker/src/plugins.js import webpack from 'webpack';
-// import IsomorphicLoaderPlugin from 'isomorphic-loader/lib/webpack-plugin';
import AssetsPlugin from 'assets-webpack-plugin';
import autoprefixer from 'autoprefixer';
@@ -7,14 +6,11 @@ import { removeEmpty, isProd } from './utils';
import { BUNDLE_PATH } from './paths';
const assetFileName = 'webpack-assets.json';
-// const isomorphicAssetsFile = 'isomorphic-assets.json';
+
export default {
plugins: removeEmpty([
- // new IsomorphicLoaderPlugin({
- // keepExistingConfig: false,
- // assetsFile: isomorphicAssetsFile,
- // }),
+
new webpack.LoaderOptionsPlugin({ options: { postcss: [autoprefixer] } }),
isProd && (
new webpack.LoaderOptionsPlugin({
| 2 |
diff --git a/js/monogatari.js b/js/monogatari.js /* global particles */
/* global require */
/* global particlesJS */
+/* global pJSDom */
/* global Typed */
/* global scenes */
/* global script */
@@ -1581,6 +1582,26 @@ $_ready(function () {
analyseStatement(label[engine.Step]);
}
+ function stopParticles () {
+ try {
+ if (typeof pJSDom === "object") {
+ if (pJSDom.length > 0) {
+ for (let i = 0; i < pJSDom.length; i++) {
+ if (typeof pJSDom[i].pJS !== "undefined") {
+ cancelAnimationFrame(pJSDom[i].pJS.fn.drawAnimFrame);
+ pJSDom.shift ();
+ }
+ }
+ }
+ }
+ } catch (e) {
+ console.error ("An error ocurred while trying to stop particle system.");
+ }
+
+ engine.Particles = "";
+ $_("#particles-js").html("");
+ }
+
// Function to execute the previous statement in the script.
function previous () {
@@ -1744,8 +1765,7 @@ $_ready(function () {
break;
case "particles":
- engine.Particles = "";
- $_("#particles-js").html("");
+ stopParticles ();
break;
default:
flag = false;
@@ -2037,8 +2057,7 @@ $_ready(function () {
soundPlayer.pause();
soundPlayer.currentTime = 0;
} else if (parts[1] == "particles") {
- engine.Particles = "";
- $_("#particles-js").html("");
+ stopParticles ();
}
next();
break;
| 7 |
diff --git a/README.md b/README.md @@ -87,9 +87,9 @@ See the [Contribution](https://github.com/r-spacex/SpaceX-API/blob/master/CONTRI
## Technical Details
* API is using [Sinatra](http://www.sinatrarb.com/) web framework
* Uses [Travis CI](https://travis-ci.org/) for testing + deployment
-* All data stored as [MongoDB](https://www.mongodb.com/) documents
-* API is deployed on a [Heroku](https://www.heroku.com/) pipeline with staging and production servers
-* A [Docker](https://hub.docker.com/r/jakewmeyer/spacex-api/) image is avaiable for local development
+* All data stored in a [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) 3 node replica set cluster
+* API is deployed on a [Heroku](https://www.heroku.com/) pipeline with pull request, staging and production servers
+* A [Docker](https://hub.docker.com/r/jakewmeyer/spacex-api/) image is avaiable for local development/deployment
```bash
docker pull jakewmeyer/spacex-api
```
| 3 |
diff --git a/src/components/datatable/HeaderCell.js b/src/components/datatable/HeaderCell.js @@ -111,10 +111,15 @@ export class HeaderCell extends Component {
componentDidUpdate(prevProps) {
const prevColumnProps = prevProps.columnProps;
const columnProps = this.props.columnProps;
+ const filterField = columnProps.filterField || columnProps.field;
if (prevColumnProps.sortableDisabled !== columnProps.sortableDisabled || prevColumnProps.sortable !== columnProps.sortable) {
this.props.onSortableChange();
}
+
+ if (this.state.filterValue && prevProps.filters && prevProps.filters[filterField] && (!this.props.filters || !this.props.filters[filterField])) {
+ this.setState({ filterValue: '' });
+ }
}
getAriaSort(sorted, sortOrder) {
| 7 |
diff --git a/src/components/minigraph.js b/src/components/minigraph.js @@ -12,7 +12,7 @@ function Minigraph(props) {
useEffect(()=>{
if (props.timeseries.length>1) {
- setTimeseries(props.timeseries.slice(props.timeseries.length-10, props.timeseries.length-1));
+ setTimeseries(props.timeseries.slice(props.timeseries.length-10));
}
}, [props.timeseries]);
| 3 |
diff --git a/app/models/table.rb b/app/models/table.rb @@ -474,22 +474,6 @@ class Table
raise e
end
- def default_baselayer_for_user(user=nil)
- user ||= self.owner
- basemap = user.default_basemap
- if basemap['className'] === 'googlemaps'
- {
- kind: 'gmapsbase',
- options: basemap
- }
- else
- {
- kind: 'tiled',
- options: basemap.merge({ 'urlTemplate' => basemap['url'] })
- }
- end
- end
-
def before_destroy
@table_visualization = table_visualization
@fully_dependent_visualizations_cache = fully_dependent_visualizations.to_a
| 2 |
diff --git a/packages/component-library/src/BaseMap/BaseMap.js b/packages/component-library/src/BaseMap/BaseMap.js @@ -57,8 +57,7 @@ class BaseMap extends Component {
tooltipInfo: null,
x: null,
y: null,
- mounted: false,
- mapboxRef: null
+ mounted: false
};
this.mapRef = createRef();
}
@@ -86,11 +85,6 @@ class BaseMap extends Component {
);
this.onViewportChange(bboxViewport);
}
-
- const map = this.mapRef.current.getMap();
- map.on("load", () => {
- this.setState({ mapboxRef: map });
- });
}
componentWillReceiveProps(props) {
@@ -207,7 +201,7 @@ class BaseMap extends Component {
};
render() {
- const { viewport, tooltipInfo, x, y, mounted, mapboxRef } = this.state;
+ const { viewport, tooltipInfo, x, y, mounted } = this.state;
const {
height,
containerHeight,
@@ -250,8 +244,7 @@ class BaseMap extends Component {
tooltipInfo,
x,
y,
- onHover: info => this.onHover(info),
- mapboxMap: mapboxRef
+ onHover: info => this.onHover(info)
});
});
@@ -356,7 +349,7 @@ class BaseMap extends Component {
options={{ ...geocoderOptions }}
/>
)}
- {mapboxRef && childrenLayers}
+ {childrenLayers}
</MapGL>
</div>
);
@@ -415,8 +408,7 @@ BaseMap.propTypes = {
useFitBounds: PropTypes.bool,
bboxData: PropTypes.arrayOf(PropTypes.shape({})),
bboxPadding: PropTypes.number,
- useScrollZoom: PropTypes.bool,
- mapboxRef: PropTypes.shape({})
+ useScrollZoom: PropTypes.bool
};
BaseMap.defaultProps = {
@@ -442,8 +434,7 @@ BaseMap.defaultProps = {
useFitBounds: false,
bboxData: [],
bboxPadding: 10,
- useScrollZoom: false,
- mapboxRef: null
+ useScrollZoom: false
};
export default Dimensions()(BaseMap);
| 2 |
diff --git a/server/JsDbg.Core/WebServer.cs b/server/JsDbg.Core/WebServer.cs @@ -1301,7 +1301,13 @@ namespace JsDbg.Core {
}
private async void ServeAttachedProcesses(NameValueCollection query, Action<string> respond, Action fail) {
- uint[] processes = await this.debugger.GetAttachedProcesses();
+ uint[] processes;
+ try {
+ processes = await this.debugger.GetAttachedProcesses();
+ } catch (DebuggerException ex) {
+ respond(ex.JSONError);
+ return;
+ }
if (processes == null) {
respond(this.JSONError("Unable to access the debugger."));
@@ -1346,7 +1352,13 @@ namespace JsDbg.Core {
}
private async void ServeCurrentProcessThreads(NameValueCollection query, Action<string> respond, Action fail) {
- uint[] threads = await this.debugger.GetCurrentProcessThreads();
+ uint[] threads;
+ try {
+ threads = await this.debugger.GetCurrentProcessThreads();
+ } catch (DebuggerException ex) {
+ respond(ex.JSONError);
+ return;
+ }
if (threads == null) {
respond(this.JSONError("Unable to access the debugger."));
| 9 |
diff --git a/src/DevChatter.Bot.Core/Events/CommandHandler.cs b/src/DevChatter.Bot.Core/Events/CommandHandler.cs @@ -15,16 +15,16 @@ public class CommandHandler : ICommandHandler
{
private readonly IRepository _repository;
private readonly ICommandUsageTracker _usageTracker;
- private readonly CommandList _commandMessages;
+ private readonly CommandList _commandList;
private readonly ILoggerAdapter<CommandHandler> _logger;
public CommandHandler(IRepository repository, ICommandUsageTracker usageTracker,
- IEnumerable<IChatClient> chatClients, CommandList commandMessages,
+ IEnumerable<IChatClient> chatClients, CommandList commandList,
ILoggerAdapter<CommandHandler> logger)
{
_repository = repository;
_usageTracker = usageTracker;
- _commandMessages = commandMessages;
+ _commandList = commandList;
_logger = logger;
foreach (var chatClient in chatClients)
@@ -40,7 +40,7 @@ public void CommandReceivedHandler(object sender, CommandReceivedEventArgs e)
return;
}
- IBotCommand botCommand = _commandMessages.FirstOrDefault(c => c.ShouldExecute(e.CommandWord));
+ IBotCommand botCommand = _commandList.FirstOrDefault(c => c.ShouldExecute(e.CommandWord));
if (botCommand == null)
{
return;
| 1 |
diff --git a/mods/appmanager/src/appmanager.js b/mods/appmanager/src/appmanager.js * @author Pedro Sanders
* @since v1
*/
-const { appManagerService } = require('@yaps/core').client
+const { AbstractService } = require('@yaps/core')
+const { AppManager, grpc } = require('@yaps/core').client
+// const grpc = require('grpc') Using this causes issues
+// for now I'm just hacking this by exporting/import grpc
const promisifyAll = require('grpc-promise').promisifyAll
+const {
+ getClientCredentials
+} = require('@yaps/core').trust_util
-module.exports = function() {
- promisifyAll(appManagerService)
- this.listApps = async () => appManagerService.listApps().sendMessage()
- this.getApp = async (ref) => appManagerService.getApp().sendMessage({ref})
- this.createApp = async (request) => appManagerService.createApp().sendMessage(request)
- this.updateApp = async (request) => appManagerService.updateApp().sendMessage(request)
- this.deleteApp = async (ref) => appManagerService.deleteApp().sendMessage({ref})
- return this
+class AppManagerSrv extends AbstractService {
+
+ constructor(options) {
+ super(options)
+
+ const metadata = new grpc.Metadata()
+ metadata.add('access_key_id', super.getOptions().accessKeyId)
+ metadata.add('access_key_secret', super.getOptions().accessKeySecret)
+
+ const client = new AppManager(super.getOptions().endpoint,
+ getClientCredentials())
+
+ promisifyAll(client, {metadata})
+
+ this.listApps = () => client.listApps().sendMessage()
+ this.getApp = ref => client.getApp().sendMessage({ref})
+ this.createApp = request => client.createApp().sendMessage(request)
+ this.updateApp = request => client.updateApp().sendMessage(request)
+ this.deleteApp = ref => client.deleteApp().sendMessage({ref})
+ }
}
+
+module.exports = AppManagerSrv
| 7 |
diff --git a/src/apps.json b/src/apps.json "cats": [
16
],
- "html": "(?:<div[^>]+id=\"recaptcha_image|<link[^>]+recaptcha|document\\.getElementById\\('recaptcha')",
+ "html": [
+ "<div[^>]+id=\"recaptcha_image",
+ "<link[^>]+recaptcha",
+ "<div[^>]+class=\"g-recaptcha\""
+ ],
"icon": "reCAPTCHA.png",
"js": {
+ "Recaptcha": "",
"recaptcha": ""
},
- "script": "(?:api-secure\\.recaptcha\\.net|recaptcha_ajax\\.js)",
+ "script": [
+ "api-secure\\.recaptcha\\.net",
+ "recaptcha_ajax\\.js",
+ "/recaptcha/api\\.js"
+ ],
"website": "https://www.google.com/recaptcha/"
},
"sIFR": {
| 7 |
diff --git a/articles/node-firebase/index.md b/articles/node-firebase/index.md @@ -8,6 +8,8 @@ description: This is a short tutorial that shows how to use the firebase real-ti
author: linus-muema
date: 2020-08-13T00:00:00-13:00
topics: [Node.js]
+aliases:
+- "/engineering-education/articles/node-firebase/"
excerpt_separator: <!--more-->
images:
| 12 |
diff --git a/travis/scripts/05-run.sh b/travis/scripts/05-run.sh @@ -65,6 +65,15 @@ if [[ "$JHIPSTER" == *"uaa"* ]]; then
./mvnw verify -DskipTests -P"$PROFILE"
fi
+#-------------------------------------------------------------------------------
+# Decrease Angular timeout for Protractor tests
+#-------------------------------------------------------------------------------
+if [ "$PROTRACTOR" == 1 ] && [ -e "src/main/webapp/app/shared/shared-libs.module.ts" ]; then
+ sed -e 's/alertAsToast: false,/alertAsToast: false, alertTimeout: 1,/1;' src/main/webapp/app/shared/shared-libs.module.ts > src/main/webapp/app/shared/shared-libs.module.ts.sed
+ mv -f src/main/webapp/app/shared/shared-libs.module.ts.sed src/main/webapp/app/shared/shared-libs.module.ts
+ cat src/main/webapp/app/shared/shared-libs.module.ts | grep alertTimeout
+fi
+
#-------------------------------------------------------------------------------
# Package the application
#-------------------------------------------------------------------------------
| 12 |
diff --git a/blocks/variables_dynamic.js b/blocks/variables_dynamic.js @@ -102,11 +102,14 @@ Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MI
}
var opposite_type;
var contextMenuMsg;
+ var varType;
if (this.type == 'variables_get_dynamic') {
opposite_type = 'variables_set_dynamic';
+ varType = this.outputConnection.check_ ? this.outputConnection.check_[0] : "";
contextMenuMsg = Blockly.Msg['VARIABLES_GET_CREATE_SET'];
} else {
opposite_type = 'variables_get_dynamic';
+ varType = this.inputList[0].connection.check_ ? this.inputList[0].connection.check_[0] : "";
contextMenuMsg = Blockly.Msg['VARIABLES_SET_CREATE_GET'];
}
@@ -115,6 +118,7 @@ Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MI
option.text = contextMenuMsg.replace('%1', name);
var xmlField = document.createElement('field');
xmlField.setAttribute('name', 'VAR');
+ xmlField.setAttribute('variabletype', varType);
xmlField.appendChild(document.createTextNode(name));
var xmlBlock = document.createElement('block');
xmlBlock.setAttribute('type', opposite_type);
| 1 |
diff --git a/packages/insomnia-app/app/ui/components/wrapper-home.js b/packages/insomnia-app/app/ui/components/wrapper-home.js @@ -363,7 +363,18 @@ class WrapperHome extends React.PureComponent<Props, State> {
? apiSpec.modified
: workspaceModified;
- let log = <TimeFromNow timestamp={modifiedLocally} />;
+ // Span spec, workspace and sync related timestamps for card last modified label and sort order
+ const lastModifiedFrom = [
+ workspace?.modified,
+ workspaceMeta?.modified,
+ apiSpec?.modified,
+ workspaceMeta?.cachedGitLastCommitTime,
+ ];
+ const lastModifiedTimestamp = lastModifiedFrom
+ .filter(isNotNullOrUndefined)
+ .sort(descendingNumberSort)[0];
+
+ let log = <TimeFromNow timestamp={lastModifiedTimestamp} />;
let branch = lastActiveBranch;
if (
workspace.scope === WorkspaceScopeKeys.design &&
@@ -429,16 +440,6 @@ class WrapperHome extends React.PureComponent<Props, State> {
return null;
}
- const lastModifiedFrom = [
- workspace?.modified,
- workspaceMeta?.modified,
- apiSpec?.modified,
- workspaceMeta?.cachedGitLastCommitTime,
- ];
- const lastModifiedTimestamp = lastModifiedFrom
- .filter(isNotNullOrUndefined)
- .sort(descendingNumberSort)[0];
-
const card = (
<Card
key={apiSpec._id}
| 3 |
diff --git a/src/resources/sprite.js b/src/resources/sprite.js @@ -38,9 +38,9 @@ pc.extend(pc, function () {
// copy it into asset.data and delete
asset.data.pixelsPerUnit = sprite.__data.pixelsPerUnit;
- asset.data.frames = sprite.__data.frames;
+ asset.data.frameKeys = sprite.__data.frameKeys;
- var atlas = assets.getByUrl(sprite.__data.textureAtlasAsset)
+ var atlas = assets.getByUrl(sprite.__data.textureAtlasAsset);
if (atlas) {
asset.data.textureAtlasAsset = atlas.id;
}
@@ -50,14 +50,14 @@ pc.extend(pc, function () {
}
sprite.pixelsPerUnit = asset.data.pixelsPerUnit;
- sprite.frameKeys = asset.data.frames;
+ sprite.frameKeys = asset.data.frameKeys;
this._updateAtlas(asset);
asset.on('change', function (asset, attribute, value) {
if (attribute === 'data') {
sprite.pixelsPerUnit = value.pixelsPerUnit;
- sprite.frameKeys = value.frames;
+ sprite.frameKeys = value.frameKeys;
this._updateAtlas(asset);
}
}, this);
| 10 |
diff --git a/src/lib/geo_location_utils.js b/src/lib/geo_location_utils.js @@ -326,18 +326,39 @@ function fetchTraceGeoData(calcData) {
}
PlotlyGeoAssets[url] = d;
- resolve(d);
+ return resolve(d);
});
});
}
+ function wait(url) {
+ return new Promise(function(resolve, reject) {
+ var cnt = 0;
+ var interval = setInterval(function() {
+ if(PlotlyGeoAssets[url] && PlotlyGeoAssets[url] !== 'pending') {
+ clearInterval(interval);
+ return resolve(PlotlyGeoAssets[url]);
+ }
+ if(cnt > 100) {
+ clearInterval(interval);
+ return reject('Unexpected error while fetching from ' + url);
+ }
+ cnt++;
+ }, 50);
+ });
+ }
+
for(var i = 0; i < calcData.length; i++) {
var trace = calcData[i][0].trace;
var url = trace.geojson;
- if(typeof url === 'string' && !PlotlyGeoAssets[url]) {
+ if(typeof url === 'string') {
+ if(!PlotlyGeoAssets[url]) {
PlotlyGeoAssets[url] = 'pending';
promises.push(fetch(url));
+ } else if(PlotlyGeoAssets[url] === 'pending') {
+ promises.push(wait(url));
+ }
}
}
| 1 |
diff --git a/components/app/pulse/layer-card/component.js b/components/app/pulse/layer-card/component.js @@ -11,7 +11,7 @@ import { LAYERS_PLANET_PULSE } from 'utils/layers/pulse_layers';
import Legend from 'components/app/pulse/Legend';
import DatasetWidgetChart from 'components/app/explore/DatasetWidgetChart';
import SubscribeToDatasetModal from 'components/modal/SubscribeToDatasetModal';
-import LoginModal from 'components/modal/login-modal';
+import LoginRequired from 'components/ui/login-required';
class LayerCardComponent extends PureComponent {
constructor(props) {
@@ -153,12 +153,14 @@ class LayerCardComponent extends PureComponent {
</Link>
}
{ subscribable &&
+ <LoginRequired text="Log in or sign up to subscribe to alerts from this dataset">
<button
className="link_button"
onClick={this.handleSubscribeToAlerts}
>
Subscribe to alerts
</button>
+ </LoginRequired>
}
</div>
</div>
| 4 |
diff --git a/package.json b/package.json "name": "find-and-replace",
"main": "./lib/find",
"description": "Find and replace within buffers and across the project.",
- "version": "0.215.14",
+ "version": "0.215.15",
"license": "MIT",
"activationCommands": {
"atom-workspace": [
| 6 |
diff --git a/src/scss/_dragdrop.scss b/src/scss/_dragdrop.scss .uppy-DragDrop-inner {
margin: 0;
text-align: center;
- padding: 80px 0;
+ padding: 80px 15px;
+ line-height: 1.4;
}
.uppy-DragDrop-arrow {
width: 60px;
height: 60px;
fill: lighten($color-gray, 30%);
- margin-bottom: 20px;
+ margin-bottom: 17px;
}
.uppy-DragDrop-container.is-dragdrop-supported {
display: block;
cursor: pointer;
font-size: 1.15em;
- margin-bottom: 10px;
+ margin-bottom: 5px;
}
.uppy-DragDrop-note {
| 0 |
diff --git a/articles/tutorials/removing-auth0-exporting-data.md b/articles/tutorials/removing-auth0-exporting-data.md @@ -6,7 +6,7 @@ description: How to export data out of Auth0.
All data in your Auth0 account is always under your control and is [available through the management API](/api/v2) at any time.
The only information which is not available through the API are the password hashes of your [Auth0-hosted database users](/connections/database) and private keys, for security reasons.
-You can still request this information by opening a [support ticket](${env.DOMAIN_URL_SUPPORT}).
+You can still request this information by opening a [support ticket](${env.DOMAIN_URL_SUPPORT}). Please note that in order to make this request you must be signed in to the Developer plan for one month.
## Keeping user credentials on your infrastructure
| 0 |
diff --git a/website_code/php/import/import.php b/website_code/php/import/import.php @@ -454,11 +454,28 @@ if (substr($_FILES['filenameuploaded']['name'], strlen($_FILES['filenameuploaded
foreach ($zip->compressedList as $x) {
- foreach ($x as $y) {
+ $y = $x['file_name'];
if (!(strpos($y, "media/") === false)) {
$string = $zip->unzip($y, false, 0777);
- $temp_array = array($y, $string, "media");
- array_push($file_data, $temp_array);
+ $file_to_create = array($y, $string, "media");
+ if ($file_to_create[0] != "") {
+ $pos = strrpos($xerte_toolkits_site->import_path . $this_dir . $file_to_create[0], '/');
+ if ($pos > 0) {
+ $dir = substr($xerte_toolkits_site->import_path . $this_dir . $file_to_create[0], 0, $pos);
+
+ if (!file_exists($dir)) {
+ mkdir($dir, 0777, true);
+ }
+ }
+
+ $fp = fopen($xerte_toolkits_site->import_path . $this_dir . $file_to_create[0], "w");
+
+ fwrite($fp, $file_to_create[1]);
+
+ fclose($fp);
+
+ chmod($xerte_toolkits_site->import_path . $this_dir . $file_to_create[0], 0777);
+ }
}
if ((strpos($y, ".rlt") !== false)) {
@@ -473,7 +490,6 @@ if (substr($_FILES['filenameuploaded']['name'], strlen($_FILES['filenameuploaded
}
}
}
- }
/*
* Look for an xml file linked to the RLO
@@ -483,7 +499,7 @@ if (substr($_FILES['filenameuploaded']['name'], strlen($_FILES['filenameuploaded
$preview_xml = '';
foreach ($zip->compressedList as $x) {
- foreach ($x as $y) {
+ $y = $x['file_name'];
if ($y === $template_data_equivalent || $y === "template.xml") {
$data_xml = $zip->unzip($y, false, 0777);
$temp_array = array("data.xml", $data_xml, null);
@@ -494,7 +510,6 @@ if (substr($_FILES['filenameuploaded']['name'], strlen($_FILES['filenameuploaded
array_push($file_data, $temp_array);
}
}
- }
if (!$data_xml || count($file_data) == 0) {
delete_loop($xerte_toolkits_site->import_path . $this_dir);
| 7 |
diff --git a/src/kiri-mode/cam/ops.js b/src/kiri-mode/cam/ops.js @@ -1160,7 +1160,7 @@ class OpPocket extends CamOp {
let vert = widget.getGeoVertices({ unroll: true, translate: true }).map(v => v.round(4));
// let vert = widget.getVertices().array.map(v => v.round(4));
let outline = [];
- let faces = CAM.surface_find(widget, surfaces);
+ let faces = CAM.surface_find(widget, surfaces, 0.1);
let zmin = Infinity;
let j=0, k=faces.length;
for (let face of faces) {
| 3 |
diff --git a/src/components/upvote/view/upvoteView.tsx b/src/components/upvote/view/upvoteView.tsx @@ -407,6 +407,8 @@ const UpvoteView = ({
trackStyle={styles.track}
thumbStyle={styles.thumb}
thumbTintColor="#007ee5"
+ minimumValue={0.01}
+ maximumValue={1}
value={sliderValue}
onValueChange={(value) => {
setSliderValue(value);
| 12 |
diff --git a/components/mapbox/ban-map/index.js b/components/mapbox/ban-map/index.js @@ -67,7 +67,7 @@ function BanMap({map, isSourceLoaded, popup, address, setSources, setLayers, onS
}
}, [address, isCenterControlDisabled, map])
- const hasVisibleRenderedFeatures = useCallback(() => {
+ const isAddressVisible = useCallback(() => {
const featuresQuery = map.queryRenderedFeatures({layers: [
adresseCircleLayer.id,
adresseLabelLayer.id,
@@ -76,15 +76,7 @@ function BanMap({map, isSourceLoaded, popup, address, setSources, setLayers, onS
toponymeLayer.id
]})
- const hasFeatures = featuresQuery.some(({id}) => {
- if (address) {
- return id === address.id
- }
-
- return false
- })
-
- setIsCenterControlDisabled(address ? hasFeatures : true)
+ return featuresQuery.some(({id}) => id === address.id)
}, [map, address])
useEffect(() => {
| 10 |
diff --git a/react/src/components/toggle/SprkToggle.js b/react/src/components/toggle/SprkToggle.js @@ -10,11 +10,8 @@ class SprkToggle extends Component {
constructor(props) {
super(props);
// TODO: Remove isDefaultOpen in issue #1296
- const { isDefaultOpen } = this.props;
- let { isOpen } = this.props;
- if (isDefaultOpen !== undefined && isOpen === undefined) {
- isOpen = isDefaultOpen;
- }
+ const { isDefaultOpen, isOpen = isDefaultOpen } = this.props;
+
this.state = {
isOpen: isOpen || false,
height: isOpen ? 'auto' : 0,
@@ -39,11 +36,11 @@ class SprkToggle extends Component {
additionalClasses,
analyticsString,
title,
- triggerText,
+ triggerText = title,
titleAddClasses,
- titleAdditionalClasses,
+ titleAdditionalClasses = titleAddClasses,
iconAddClasses,
- iconAdditionalClasses,
+ iconAdditionalClasses = iconAddClasses,
toggleIconName,
contentId,
contentAdditionalClasses,
@@ -56,16 +53,14 @@ class SprkToggle extends Component {
const containerClasses = classnames('sprk-c-Toggle', additionalClasses);
- // TODO: Remove titleAddClasses in issue #1296
const titleClasses = classnames(
'sprk-c-Toggle__trigger sprk-b-TypeBodyThree sprk-u-TextCrop--none',
- titleAdditionalClasses || titleAddClasses,
+ titleAdditionalClasses,
);
- // TODO: Remove iconAddClasses in issue #1296
const iconClasses = classnames(
'sprk-c-Icon--xl sprk-c-Icon--toggle sprk-u-mrs',
{ 'sprk-c-Icon--open': isOpen },
- iconAdditionalClasses || iconAddClasses,
+ iconAdditionalClasses,
);
const contentClasses = classnames(
@@ -88,8 +83,7 @@ class SprkToggle extends Component {
type="button"
>
<SprkIcon iconName={toggleIconName} additionalClasses={iconClasses} />
- {/* TODO: Remove title in issue #1296 */}
- {triggerText || title}
+ {triggerText}
</button>
<AnimateHeight
duration={300}
| 3 |
diff --git a/app/models/carto/user.rb b/app/models/carto/user.rb @@ -44,8 +44,7 @@ class Carto::User < ActiveRecord::Base
"users.viewer, users.quota_in_bytes, users.database_host, users.crypted_password, " \
"users.builder_enabled, users.private_tables_enabled, users.private_maps_enabled, " \
"users.org_admin, users.last_name, users.google_maps_private_key, users.website, " \
- "users.description, users.available_for_hire, users.frontend_version, " \
- "users.asset_host, users.company, users.phone, users.job_role, users.industry".freeze
+ "users.description, users.available_for_hire, users.frontend_version, users.asset_host".freeze
has_many :tables, class_name: Carto::UserTable, inverse_of: :user
has_many :visualizations, inverse_of: :user
| 2 |
diff --git a/src/og/Globe.js b/src/og/Globe.js @@ -82,8 +82,13 @@ class Globe {
* @public
* @type {Element}
*/
+ if (options.target instanceof HTMLElement) {
+ this.div = options.target;
+ } else {
this.div =
document.getElementById(options.target) || document.querySelector(options.target);
+ }
+
this.div.appendChild(this._canvas);
this.div.classList.add("ogViewport");
| 0 |
diff --git a/src/sdk/conference/conference.js b/src/sdk/conference/conference.js }
};
if (options.resolution) {
- mediaOptions.video.parameters = {};
+ mediaOptions.video.parameters = mediaOptions.video.parameters || {};
if (typeof options.resolution === 'string') {
mediaOptions.video.parameters.resolution = resolutionName2Value[options.resolution];
} else {
mediaOptions.video.parameters.resolution = options.resolution;
}
}
+ if (options.frameRate) {
+ mediaOptions.video.parameters = mediaOptions.video.parameters || {};
+ mediaOptions.video.parameters.framerate = options.frameRate;
+ }
+ if (options.keyFrameInterval) {
+ mediaOptions.video.parameters = mediaOptions.video.parameters || {};
+ mediaOptions.video.parameters.keyFrameInterval = options.keyFrameInterval;
+ }
+ if (options.bitrateMultipiler) {
+ mediaOptions.video.parameters = mediaOptions.video.parameters || {};
+ mediaOptions.video.parameters.bitrate = 'x' + options.bitrateMultipiler
+ .toString();
+ }
self.signaling.sendMessage('subscribe', {
type: 'streaming',
connection: {
| 11 |
diff --git a/src/html.js b/src/html.js import React from "react"
import { TypographyStyle } from "react-typography"
-import Helmet from "react-helmet"
import typography from "./utils/typography"
@@ -15,7 +14,6 @@ if (process.env.NODE_ENV === `production`) {
export default class HTML extends React.Component {
render() {
- const head = Helmet.rewind()
let css
if (process.env.NODE_ENV === `production`) {
css = (
| 2 |
diff --git a/js/kucoinfutures.js b/js/kucoinfutures.js @@ -242,12 +242,12 @@ module.exports = class kucoinfutures extends kucoin {
},
},
'networks': {
- 'ETH': 'eth',
+ // 'ETH': 'eth',
'ERC20': 'eth',
- 'TRX': 'trx',
- 'TRC20': 'trx',
- 'KCC': 'kcc',
- 'TERRA': 'luna',
+ // 'TRX': 'trx',
+ // 'TRC20': 'trx',
+ // 'KCC': 'kcc',
+ // 'TERRA': 'luna',
},
},
});
@@ -401,7 +401,7 @@ module.exports = class kucoinfutures extends kucoin {
'linear': inverse !== true,
'inverse': inverse,
'expiry': this.safeValue (market, 'expireDate'),
- 'contractSize': undefined,
+ 'contractSize': undefined, // TODO
'limits': limits,
'info': market,
// Fee is in %, so divide by 100
@@ -413,6 +413,7 @@ module.exports = class kucoinfutures extends kucoin {
async fetchCurrencies (params = {}) {
// TODO: Emulate?
+ return undefined;
}
async fetchTime (params = {}) {
@@ -563,7 +564,7 @@ module.exports = class kucoinfutures extends kucoin {
}
async fetchL3OrderBook (symbol, limit = undefined, params = {}) {
- throw new BadRequest (this.id + ' only can only fetch the L2 order book')
+ throw new BadRequest (this.id + ' only can only fetch the L2 order book');
}
async fetchTicker (symbol, params = {}) {
@@ -1166,7 +1167,7 @@ module.exports = class kucoinfutures extends kucoin {
}
async transfer (code, amount, fromAccount, toAccount, params = {}) {
- if ((fromAccount !== 'spot' && fromAccount !== 'trade' && fromAccount !== 'trading') || (toAccount !== 'futures' && toAccount !== 'contract')) {
+ if ((toAccount !== 'spot' && toAccount !== 'trade' && toAccount !== 'trading') || (fromAccount !== 'futures' && fromAccount !== 'contract')) {
throw new BadRequest (this.id + ' only supports transfers from contract(futures) account to trade(spot) account');
}
this.transferOut (code, amount, params);
@@ -1175,12 +1176,12 @@ module.exports = class kucoinfutures extends kucoin {
async transferOut (code, amount, params = {}) {
await this.loadMarkets ();
const currency = this.currency (code);
- const currencyId = currency['id'];
const request = {
- 'currency': currencyId, // Currency,including XBT,USDT
+ 'currency': this.safeString (currency, 'id'), // Currency,including XBT,USDT
+ 'amount': amount,
};
// transfer from usdm futures wallet to spot wallet
- const response = await this.privateFuturesTransferOut (this.extend (request, params));
+ const response = await this.futuresPrivatePostTransferOut (this.extend (request, params));
//
// {
// "code": "200000",
@@ -1192,7 +1193,7 @@ module.exports = class kucoinfutures extends kucoin {
const data = this.safeValue (response, 'data');
return {
'info': response,
- 'id': data['applyId'],
+ 'id': this.safeString (data, 'applyId'),
'timestamp': undefined,
'datetime': undefined,
'currency': code,
@@ -1293,5 +1294,4 @@ module.exports = class kucoinfutures extends kucoin {
async fetchLedger (code = undefined, since = undefined, limit = undefined, params = {}) {
throw new BadRequest (this.id + ' has no method fetchLedger');
}
- // inherited methods from class Kucoin include: fetchClosedOrders, fetchOpenOrders, nonce, loadTimeDifference, sign, handleErrors, fetchDeposits, withdraw, fetchWithdrawals, parseTransaction, parseTransactionStatus, fetchTicker, fetchStatus, parseTrade,
};
| 1 |
diff --git a/microraiden/microraiden/channel_manager.py b/microraiden/microraiden/channel_manager.py @@ -352,6 +352,7 @@ class ChannelManager(gevent.Greenlet):
sender, open_block_number)
c.settle_timeout = settle_timeout
c.is_closed = True
+ c.mtime = time.time()
self.state.store()
def event_channel_settled(self, sender, open_block_number):
@@ -387,9 +388,9 @@ class ChannelManager(gevent.Greenlet):
self.log.warn("Topup of an already closed channel (sender=%s open_block=%d)" %
(sender, open_block_number))
return None
- assert c.deposit + added_deposit == deposit
c.deposit = deposit
c.unconfirmed_event_channel_topups.pop(txhash, None)
+ c.mtime = time.time()
self.state.store()
# end events ####
@@ -413,6 +414,7 @@ class ChannelManager(gevent.Greenlet):
sender, open_block_number, txid)
# update local state
c.is_closed = True
+ c.mtime = time.time()
self.state.store()
def force_close_channel(self, sender, open_block_number):
@@ -438,7 +440,7 @@ class ChannelManager(gevent.Greenlet):
raise NoBalanceProofReceived('Payment has not been registered.')
if balance != c.balance:
raise InvalidBalanceProof('Requested closing balance does not match latest one.')
- c.is_closed = True # FIXME block number
+ c.is_closed = True
c.mtime = time.time()
receiver_sig = sign_balance_proof(
self.private_key, self.receiver, open_block_number, balance
| 12 |
diff --git a/userscript.user.js b/userscript.user.js @@ -9900,7 +9900,9 @@ var $$IMU_EXPORT$$;
if (domain_nosub === "daumcdn.net" && /^t[0-9]*\./.test(domain)) {
// http://t1.daumcdn.net/cafe_image/fancafe/2018/fancafe-cheer-color-bg.png
- if (/\/cafe_image\/+fancafe\/+[0-9]+\/+fancafe-cheer-color-bg\./.test(src)) {
+ // https://t1.daumcdn.net/kakaotv/2016/pw/new/slider_mask_v2.png
+ if (/\/cafe_image\/+fancafe\/+[0-9]+\/+fancafe-cheer-color-bg\./.test(src) ||
+ /\/kakaotv\/+[0-9]+\/+pw\/+new\/+slider_mask/.test(src)) {
return {
url: src,
bad: "mask"
@@ -30387,6 +30389,7 @@ var $$IMU_EXPORT$$;
// https://tv.kakao.com/channel/3527229/cliplink/411915208
// https://tv.kakao.com/embed/player/cliplink/411915208?service=kakao_tv§ion=channel&autoplay=1&profile=HIGH&wmode=transparent
// https://tv.kakao.com/channel/2669634/livelink/8629498
+ // https://tv.kakao.com/channel/3629101/cliplink/411920988 -- requires ABR (video urls are provided, but return 404)
newsrc = website_query({
website_regex: /^[a-z]+:\/\/[^/]+\/+(?:channel\/+[0-9]+|embed\/+player)\/+cliplink\/+([0-9]+)(?:[?#].*)?$/,
run: function(cb, match) {
@@ -30419,27 +30422,73 @@ var $$IMU_EXPORT$$;
},
json: true
}, cb, function(done, resp, cache_key) {
- //console_log(resp);
+ console_log(resp);
if (!resp.videoLocation || !resp.videoLocation.url) {
console_error(cache_key, "Unable to find video URL for", resp);
return done(null, false);
}
- var contenttype = resp.videoLocation.contentType;
- if (contenttype && contenttype !== "HLS") {
- console_error(cache_key, "Unknown contentType:", {contenttype: contenttype, json: resp});
- return done(null, false);
+ var baseobj = {
+ headers: {
+ Referer: "https://tv.kakao.com/",
+ Origin: "https://tv.kakao.com"
+ }
+ };
+
+ var urls = [];
+
+ var abr_urls = resp.abrVideoLocationList;
+ if (abr_urls) {
+ for (var i = 0; i < abr_urls.length; i++) {
+ var url = abr_urls[i].url;
+ if (abr_urls[i].params) {
+ url += "?" + abr_urls[i].params;
}
+ var videotype = null;
+ if (abr_urls[i].type === "DASH") {
+ videotype = "dash";
+ } else if (abr_urls[i].type === "HLS") {
+ videotype = "hls";
+ }
+
+ if (!videotype) {
+ console_warn(cache_key, "Unknown ABR content type", abr_urls[i].type, "for", abr_urls[i], resp);
+ continue;
+ }
+
+ urls.push({
+ url: url,
+ video: videotype
+ });
+ }
+ }
+
+ var contenttype = resp.videoLocation.contentType;
var video = true;
+
+ if (contenttype) {
if (contenttype === "HLS") {
video = "hls";
+ } else if (contenttype === "DASH") {
+ video = "dash";
+ } else {
+ console_warn(cache_key, "Unknown contentType:", {contenttype: contenttype, json: resp});
+ video = null;
+ }
}
- return done({
+ if (video) {
+ urls.push({
url: resp.videoLocation.url,
video: video
- }, 60*60);
+ });
+ }
+
+ if (urls.length === 0)
+ return done(null, false);
+
+ return done(fillobj_urls(urls, baseobj), 60*60);
});
}
});
| 7 |
diff --git a/server/game/cards/09.5-aCF/DaidojiKageyu.js b/server/game/cards/09.5-aCF/DaidojiKageyu.js @@ -4,7 +4,7 @@ const AbilityDsl = require('../../abilitydsl.js');
class DaidojiKageyu extends DrawCard {
setupCardAbilities() {
this.action({
- title: 'Bow and send a character home',
+ title: 'Draw cards',
condition: context => this.game.isDuringConflict('political') &&
context.source.isParticipating() &&
this.game.currentConflict.getNumberOfCardsPlayed(context.player.opponent) > 0,
| 1 |
diff --git a/publish/deployed/mainnet/deployment.json b/publish/deployed/mainnet/deployment.json },
"StakingRewardsiBTC": {
"name": "StakingRewardsiBTC",
- "address": "0x32C9F03490A9F560EccC9f107e71560C1b0A2535",
+ "address": "0xDcdD9e45FA94cf50eCd3251dd8f8157B2D492DD9",
"source": "StakingRewardsiBTC",
"link": "https://etherscan.io/address/0xDcdD9e45FA94cf50eCd3251dd8f8157B2D492DD9",
"timestamp": "2020-12-27",
| 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.