code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/articles/api/management/v2/tokens.md b/articles/api/management/v2/tokens.md @@ -231,6 +231,9 @@ You cannot change the default validity period, which is set to 24 hours. However
__Can I refresh my token?__</br>
You cannot renew a Management APIv2 token. A [new token](#2-get-the-token) should be created when the old one expires.
+__My token was compromised! Can I revoke it?__</br>
+You cannot directly revoke a Management APIv2 token, but you can achieve a similar effect by deleting the client grant. You can do this either by [using our API](/api/management/v2#!/Client_Grants/delete_client_grants_by_id), or manually [deauthorize the APIv2 client using the dashboard](${manage_url}/#/apis/management/authorized-clients).
+
__I need to invalidate all my tokens. How can I do that?__</br>
All your tenant's Management APIv2 tokens are signed using the Client Secret of your non interactive client, hence if you change that, all your tokens will be invalidated. To do this, go to your [Client's Settings](${manage_url}/#/clients/${account.clientId}/settings) and click the __Rotate__ icon <i class="notification-icon icon-budicon-171"></i>, or use the [Rotate a client secret](/api/management/v2#!/Clients/post_rotate_secret) endpoint.
| 0 |
diff --git a/lime/graphics/utils/ImageDataUtil.hx b/lime/graphics/utils/ImageDataUtil.hx @@ -510,11 +510,25 @@ class ImageDataUtil {
// TODO: Support sourceRect better, do not modify sourceImage, create C++ implementation for native
- var fromPreMult = function (col:Float, alpha:Float):Int {
+ // TODO: Better handling of premultiplied alpha
+ var fromPreMult;
+
+ if (image.buffer.premultiplied || sourceImage.buffer.premultiplied) {
+
+ fromPreMult = function (col:Float, alpha:Float):Int {
+ var col = Std.int (col);
+ return col < 0 ? 0 : (col > 255 ? 255 : col);
+ }
+
+ } else {
+
+ fromPreMult = function (col:Float, alpha:Float):Int {
var col = Std.int (col / alpha * 255) ;
return col < 0 ? 0 : (col > 255 ? 255 : col);
}
+ }
+
var boxesForGauss = function (sigma:Float, n:Int):Array<Float> {
var wIdeal = Math.sqrt((12*sigma*sigma/n)+1); // Ideal averaging filter width
var wl = Math.floor(wIdeal);
| 7 |
diff --git a/packages/rekit-studio/middleware/api/runTest.js b/packages/rekit-studio/middleware/api/runTest.js const rekitCore = require('rekit-core');
const spawn = require('child_process').spawn;
-function runBuild(io, testFile) {
+function runTest(io, testFile) {
const prjRoot = rekitCore.utils.getProjectRoot();
return new Promise((resolve) => {
console.log('test file: ', testFile);
@@ -39,4 +39,4 @@ function runBuild(io, testFile) {
});
}
-module.exports = runBuild;
+module.exports = runTest;
| 10 |
diff --git a/app/models/street/StreetEdgePriorityTable.scala b/app/models/street/StreetEdgePriorityTable.scala @@ -2,6 +2,7 @@ package models.street
import models.audit.{AuditTaskEnvironmentTable, AuditTaskTable}
import models.daos.UserDAOImpl
+import models.daos.slick.DBTableDefinitions.UserTable
import models.label.LabelTable
import models.utils.MyPostgresDriver.simple._
import play.api.Play.current
@@ -38,6 +39,7 @@ class StreetEdgePriorityTable(tag: Tag) extends Table[StreetEdgePriority](tag, S
object StreetEdgePriorityTable {
val db = play.api.db.slick.DB
val streetEdgePriorities = TableQuery[StreetEdgePriorityTable]
+ val userTable = TableQuery[UserTable]
val LABEL_PER_METER_THRESHOLD: Float = 0.0375.toFloat
@@ -232,14 +234,14 @@ object StreetEdgePriorityTable {
/********** Registered Users **********/
// Gets all tasks completed by registered users, groups by user_id, and sums over the distances of the street edges.
val regAuditedDists = (for {
- _user <- StreetEdgeTable.userTable if _user.username =!= "anonymous"
+ _user <- userTable if _user.username =!= "anonymous"
_task <- AuditTaskTable.completedTasks if _task.userId === _user.userId
_dist <- streetDist if _task.streetEdgeId === _dist._1
} yield (_user.userId, _dist._2)).groupBy(_._1).map(x => (x._1, x._2.map(_._2).sum))
// Gets all registered user tasks, groups by user_id, and counts number of labels places (incl. incomplete tasks).
val regLabelCounts = (for {
- _user <- StreetEdgeTable.userTable if _user.username =!= "anonymous"
+ _user <- userTable if _user.username =!= "anonymous"
_task <- AuditTaskTable.auditTasks if _task.userId === _user.userId
_lab <- LabelTable.labelsWithoutDeletedOrOnboarding if _task.auditTaskId === _lab.auditTaskId
} yield (_user.userId, _lab.labelId)).groupBy(_._1).map(x => (x._1, x._2.length)) // SELECT user_id, COUNT(*)
@@ -263,7 +265,7 @@ object StreetEdgePriorityTable {
// Gets the tasks performed by anonymous users, along with ip address; need to select distinct b/c there can be
// multiple audit_task_environment entries for a single task
val anonTasks = (for {
- _user <- StreetEdgeTable.userTable if _user.username === "anonymous"
+ _user <- userTable if _user.username === "anonymous"
_task <- AuditTaskTable.completedTasks if _user.userId === _task.userId
_env <- AuditTaskEnvironmentTable.auditTaskEnvironments if _task.auditTaskId === _env.auditTaskId
if !_env.ipAddress.isEmpty
@@ -277,7 +279,7 @@ object StreetEdgePriorityTable {
// Gets all anon user tasks, groups by ip_address, and counts number of labels places (incl. incomplete tasks).
val anonLabelCounts = (for {
- _user <- StreetEdgeTable.userTable if _user.username === "anonymous"
+ _user <- userTable if _user.username === "anonymous"
_task <- AuditTaskTable.auditTasks if _user.userId === _task.userId
_env <- AuditTaskEnvironmentTable.auditTaskEnvironments if _task.auditTaskId === _env.auditTaskId
if !_env.ipAddress.isEmpty
| 14 |
diff --git a/token-metadata/0x1FCdcE58959f536621d76f5b7FfB955baa5A672F/metadata.json b/token-metadata/0x1FCdcE58959f536621d76f5b7FfB955baa5A672F/metadata.json "symbol": "FOR",
"address": "0x1FCdcE58959f536621d76f5b7FfB955baa5A672F",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/node/lib/util/open.js b/node/lib/util/open.js @@ -120,7 +120,6 @@ class Opener {
this.d_repo = repo;
this.d_commit = commit;
this.d_initialized = false;
- this.d_shas = {};
}
}
@@ -164,12 +163,8 @@ Opener.prototype.getSubrepo = co.wrap(function *(subName) {
subRepo = yield SubmoduleUtil.getRepo(this.d_repo, subName);
}
else {
- let sha = this.d_shas[subName];
- if (undefined === sha) {
const entry = yield this.d_tree.entryByPath(subName);
- sha = entry.sha();
- this.d_shas[subName] = sha;
- }
+ const sha = entry.sha();
console.log(`\
Opening ${colors.blue(subName)} on ${colors.green(sha)}.`);
subRepo = yield exports.openOnCommit(this.d_fetcher,
| 2 |
diff --git a/token-metadata/0xbe5b336eF62D1626940363Cf34bE079e0AB89F20/metadata.json b/token-metadata/0xbe5b336eF62D1626940363Cf34bE079e0AB89F20/metadata.json "symbol": "BNC",
"address": "0xbe5b336eF62D1626940363Cf34bE079e0AB89F20",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/app/builtin-pages/views/library-view.js b/app/builtin-pages/views/library-view.js @@ -80,7 +80,7 @@ async function setup () {
window.OS_CAN_IMPORT_FOLDERS_AND_FILES = browserInfo.platform !== 'linux'
// load data
- let url = window.location.pathname.slice(1)
+ let url = await parseLibraryUrl()
archive = new LibraryDatArchive(url)
await archive.setup()
@@ -296,6 +296,18 @@ async function loadReadme () {
// =
function render () {
+ if (!archive) {
+ yo.update(
+ document.querySelector('.library-wrapper'), yo`
+ <div class="library-wrapper library-view builtin-wrapper">
+ <div class="builtin-main" style="margin-left: 0; width: 100%">
+ <div class="view-wrapper">
+ ${renderView()}
+ </div>
+ </div>
+ </div>`
+ )
+ } else {
yo.update(
document.querySelector('.library-wrapper'), yo`
<div class="library-wrapper library-view builtin-wrapper">
@@ -329,6 +341,7 @@ function render () {
`
)
}
+}
function renderHeader () {
const isOwner = _get(archive, 'info.isOwner')
@@ -1989,7 +2002,8 @@ async function readViewStateFromUrl () {
try {
var node
- var urlp = parseDatURL(window.location.pathname.slice(1))
+ var datUrl = await parseLibraryUrl()
+ var urlp = parseDatURL(datUrl)
var pathParts = urlp.pathname.split('/').filter(Boolean)
// select the archive
@@ -2044,6 +2058,25 @@ function getSafeDesc () {
return _get(archive, 'info.description', '').trim() || yo`<em>No description</em>`
}
+async function parseLibraryUrl () {
+ var url
+ if (window.location.pathname.slice(1).startsWith('workspace:')) {
+ const wsName = window.location.pathname.slice('/workspace://'.length).split('/')[0]
+
+ const wsInfo = await beaker.workspaces.get(0, wsName)
+ if (wsInfo) {
+ url = wsInfo.publishTargetUrl
+ window.location.pathname = url + window.location.pathname.slice(`/workspace://${wsInfo.name}`.length)
+ } else {
+ toplevelError = createToplevelError('Invalid workspace name')
+ render()
+ }
+ } else {
+ url = window.location.pathname.slice(1)
+ }
+ return url
+}
+
function createToplevelError (err) {
switch (err.name) {
case 'TimeoutError':
| 9 |
diff --git a/packages/app/src/server/service/page.ts b/packages/app/src/server/service/page.ts @@ -3523,7 +3523,7 @@ class PageService {
}
else {
const parentId = parentPathOrId;
- queryBuilder = new PageQueryBuilder(Page.find({ parent: parentId } as any), true); // TODO: improve type
+ queryBuilder = new PageQueryBuilder(Page.find({ parent: { $eq: parentId } } as any), true); // TODO: improve type
}
await queryBuilder.addViewerCondition(user, userGroups);
| 4 |
diff --git a/packages/config/src/validate/example.js b/packages/config/src/validate/example.js @@ -3,7 +3,8 @@ const indentString = require('indent-string')
const { red, green } = require('chalk')
// Print invalid value and example netlify.yml
-const getExample = function({ value, prevPath, example }) {
+const getExample = function({ value, key, prevPath, example }) {
+ const exampleA = typeof example === 'function' ? example(value, key) : example
return `
${red.bold('Invalid syntax')}
@@ -11,7 +12,7 @@ ${indentString(getInvalidValue(value, prevPath), 2)}
${green.bold('Valid syntax')}
-${indentString(serializeValue(example), 2)}`
+${indentString(serializeValue(exampleA), 2)}`
}
const getInvalidValue = function(value, prevPath) {
| 11 |
diff --git a/app/modules/handler/components/Header.js b/app/modules/handler/components/Header.js @@ -65,6 +65,8 @@ class PromptHeader extends Component<Props> {
</Header>
</Grid.Column>
<Grid.Column width={6} textAlign="right">
+ {(prompt && blockchain)
+ ? (
<Step.Group>
<Step>
{(loading)
@@ -126,6 +128,9 @@ class PromptHeader extends Component<Props> {
</Step.Content>
</Step>
</Step.Group>
+ )
+ : false
+ }
</Grid.Column>
</Grid>
</Segment>
| 11 |
diff --git a/packages/vulcan-lib/lib/modules/settings.js b/packages/vulcan-lib/lib/modules/settings.js @@ -81,7 +81,15 @@ export const getSetting = (settingName, settingDefault) => {
...publicSetting,
}
} else {
- setting = rootSetting || privateSetting || publicSetting || defaultValue;
+ if (typeof rootSetting !== 'undefined') {
+ setting = rootSetting;
+ } else if (typeof privateSetting !== 'undefined') {
+ setting = privateSetting;
+ } else if (typeof publicSetting !== 'undefined') {
+ setting = publicSetting;
+ } else {
+ setting = defaultValue;
+ }
}
} else {
| 9 |
diff --git a/aa_composer.js b/aa_composer.js @@ -870,7 +870,7 @@ function handleTrigger(conn, batch, trigger, params, stateVars, arrDefinition, a
return;
var asset = message.payload.asset || 'base';
message.payload.outputs.forEach(output => {
- if (arrOutputAddresses.indexOf(output.address) === -1)
+ if (output.amount !== 0 && arrOutputAddresses.indexOf(output.address) === -1)
arrOutputAddresses.push(output.address);
if (!trigger_opts.assocBalances[address][asset])
trigger_opts.assocBalances[address][asset] = 0;
| 8 |
diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml @@ -25,7 +25,7 @@ jobs:
- run: sudo npm install --global better-npm-audit npm
- run: npm install --package-lock
- run: |
- node /usr/local/lib/node_modules/better-npm-audit audit \
+ node /usr/local/lib/node_modules/better-npm-audit audit --level moderate \
--ignore=$(cat npm-cve-ignore 2> /dev/null || true) || (
npm audit fix --force
git diff
| 8 |
diff --git a/blocks/init/src/Blocks/components/lists/components/lists-options.js b/blocks/init/src/Blocks/components/lists/components/lists-options.js import React from 'react';
import { __ } from '@wordpress/i18n';
-import { ColorPaletteCustom, icons, getOption, checkAttr, getAttrKey, ComponentUseToggle, IconLabel, CustomSelect, IconToggle, BlockIcon, SimpleVerticalSingleSelect } from '@eightshift/frontend-libs/scripts';
+import { ColorPaletteCustom, icons, getOption, checkAttr, getAttrKey, ComponentUseToggle, IconLabel, CustomSelect, IconToggle, BlockIcon, SimpleHorizontalSingleSelect } from '@eightshift/frontend-libs/scripts';
import manifest from '../manifest.json';
export const ListsOptions = (attributes) => {
@@ -65,14 +65,11 @@ export const ListsOptions = (attributes) => {
}
{showListsOrdered &&
- <SimpleVerticalSingleSelect
+ <SimpleHorizontalSingleSelect
label={__('List type', 'eightshift-frontend-libs')}
value={listsOrdered}
options={getOption('listsOrdered', attributes, manifest)}
onChange={(value) => setAttributes({ [getAttrKey('listsOrdered', attributes, manifest)]: value })}
- isClearable={false}
- isSearchable={false}
- simpleValue
/>
}
| 14 |
diff --git a/articles/api/authentication/_passwordless.md b/articles/api/authentication/_passwordless.md @@ -90,7 +90,7 @@ You have three options for [passwordless authentication](/connections/passwordle
| Parameter | Description |
|:-----------------|:------------|
| `client_id` <br/><span class="label label-danger">Required</span> | The `client_id` of your application. |
-| `client_secret` <br/><span class="label label-danger">Required</span> | The `client_secret` of your application, required for Regular Web Applications. |
+| `client_secret` <br/><span class="label label-danger">Required for web apps only</span> | The `client_secret` of your application, required for Regular Web Applications. |
| `connection` <br/><span class="label label-danger">Required</span> | How to send the code/link to the user. Use `email` to send the code/link using email, or `sms` to use SMS. |
| `email` | Set this to the user's email address, when `connection=email`. |
| `phone_number` | Set this to the user's phone number, when `connection=sms`. |
@@ -104,7 +104,7 @@ You have three options for [passwordless authentication](/connections/passwordle
### Remarks
- If you sent a verification code, using either email or SMS, after you get the code, you have to authenticate the user using the [/passwordless/verify endpoint](#authenticate-user), using `email` or `phone_number` as the `username`, and the verification code as the `password`.
-- This endpoint is designed to be called from the client-side, and has a [rate limit](/policies/rate-limits#authentication-api) of 50 requests per hour per IP.
+- This endpoint is designed to be called from the client-side, and is subject to [rate limits](/policies/rate-limit-policy/authentication-api-endpoint-rate-limits).
- The sample auth0.js script uses the library version 8. If you are using auth0.js version 7, please see this [reference guide](/libraries/auth0js/v7).
### Error Codes
| 3 |
diff --git a/website_code/php/management/site.php b/website_code/php/management/site.php @@ -74,7 +74,7 @@ if(is_user_admin()){
echo "<p>" . MANAGEMENT_SITE_POD_TWO . "<form><textarea id=\"pod_two\">" . base64_decode($row['pod_two']) . "</textarea></form></p>";
- echo "<p>" . MANAGEMENT_SITE_COPYRIGHT . "<form><textarea id=\"copyright\">" . $row['copyright'] . "</textarea></form></p>";
+ echo "<p>" . MANAGEMENT_SITE_COPYRIGHT . "<form><textarea id=\"copyright\">" . htmlspecialchars($row['copyright']) . "</textarea></form></p>";
echo "<p>" . MANAGEMENT_SITE_DEMONSTRATION . "<form><textarea id=\"demonstration_page\">" . $row['demonstration_page'] . "</textarea></form></p>";
| 11 |
diff --git a/src/encoded/static/components/filegallery.js b/src/encoded/static/components/filegallery.js @@ -2151,7 +2151,7 @@ const FileDetailView = function (node, qcClick, loggedIn, adminUser) {
const dateString = !!selectedFile.date_created && moment.utc(selectedFile.date_created).format('YYYY-MM-DD');
header = (
<div className="details-view-info">
- <h4>{selectedFile.file_type} {selectedFile.title}</h4>
+ <h4>{selectedFile.file_type} <a href={selectedFile['@id']}>{selectedFile.title}</a></h4>
</div>
);
| 0 |
diff --git a/lib/assets/javascripts/new-dashboard/components/FilterDropdown.vue b/lib/assets/javascripts/new-dashboard/components/FilterDropdown.vue @@ -137,7 +137,7 @@ export default {
.dropdown {
visibility: hidden;
position: absolute;
- z-index: 1;
+ z-index: 2;
right: 0;
width: 310px;
margin-top: 8px;
| 12 |
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-flag/sprk-flag.component.ts b/angular/projects/spark-angular/src/lib/components/sprk-flag/sprk-flag.component.ts @@ -110,11 +110,11 @@ export class SprkFlagComponent {
classArray.push(verticalAlignmentClasses[this.verticalAlignment]);
}
- if (this.isReversed === true) {
+ if (this.isReversed !== false) {
classArray.push('sprk-o-Flag--rev');
}
- if (this.isStacked === true) {
+ if (this.isStacked !== false) {
classArray.push('sprk-o-Flag--stacked');
}
| 3 |
diff --git a/articles/connections/database/mysql.md b/articles/connections/database/mysql.md @@ -29,9 +29,9 @@ Click **Custom Database** and turn on the **Use my own database** switch.
You have to provide a login script to authenticate the user that will execute each time a user attempts to log in. Optionally, you can create scripts for sign-up, email verification, password reset and delete user functionality.
-::: panel-info Note
-When creating users, Auth0 calls the `get_user` script before the `create` script. Be sure that you have implemented both.
-:::
+<div class="alert alert-info">
+ When creating users, Auth0 calls the <code>get_user</code> script before the <code>create</code> script. Be sure that you have implemented both.
+</div>
These custom scripts are *Node.js* code that run in the tenant's sandbox. Auth0 provides templates for most common databases, such as: **ASP.NET Membership Provider**, **MongoDB**, **MySQL**, **PostgreSQL**, **SQLServer**, **Windows Azure SQL Database**, and for a web service accessed by **Basic Auth**. Essentially, you can connect to any kind of database or web service with a custom script.
@@ -79,9 +79,9 @@ This script connects to a **MySQL** database and executes a query to retrieve th
If you are using [IBM's DB2](https://www.ibm.com/analytics/us/en/technology/db2/) product, [click here](/connections/database/db2-script) for a sample login script.
-::: panel-info
-You can use the `auth0-custom-db-testharness` [library](https://www.npmjs.com/package/auth0-custom-db-testharness) to deploy, execute, and test the output of Custom DB Scripts using a Webtask sandbox environment.
-:::
+<div class="alert alert-info">
+You can use the <a href="https://www.npmjs.com/package/auth0-custom-db-testharness">auth0-custom-db-testharness library</a> to deploy, execute, and test the output of Custom DB Scripts using a Webtask sandbox environment.
+</div>
### Database Field Requirements
| 14 |
diff --git a/planet.js b/planet.js @@ -810,11 +810,12 @@ const _connectRoom = async (roomName, worldURL) => {
const objects = [];
const grabbedObjects = [null, null];
-planet.addObject = (contentId, position, quaternion) => {
+planet.addObject = (contentId, parentId, position, quaternion) => {
state.transact(() => {
const instanceId = getRandomString();
const trackedObject = planet.getTrackedObject(instanceId);
trackedObject.set('instanceId', instanceId);
+ trackedObject.set('parentId', parentId);
trackedObject.set('contentId', contentId);
trackedObject.set('position', position.toArray());
trackedObject.set('quaternion', quaternion.toArray());
@@ -840,7 +841,7 @@ planet.removeObject = object => {
planet.addEventListener('trackedobjectadd', async e => {
const trackedObject = e.data;
const trackedObjectJson = trackedObject.toJSON();
- const {instanceId, contentId, position, quaternion} = trackedObjectJson;
+ const {instanceId, parentId, contentId, position, quaternion} = trackedObjectJson;
const file = await (async () => {
if (typeof contentId === 'number') {
| 0 |
diff --git a/src/commands/codepush/lib/environment.ts b/src/commands/codepush/lib/environment.ts -export interface EnvironmentInfo {
+export interface CodePushEnvironmentInfo {
acquisitionEndpoint: string;
managementEndpoint: string;
description?: string;
@@ -8,7 +8,7 @@ export interface EnvironmentInfo {
interface EnvironmentsFile {
defaultEnvironment: string;
environments: {
- [environmentName: string]: EnvironmentInfo
+ [environmentName: string]: CodePushEnvironmentInfo
};
}
@@ -39,6 +39,6 @@ const codePushEnvironmentsData: EnvironmentsFile = {
}
};
-export function environments(environmentName: string = codePushEnvironmentsData.defaultEnvironment): EnvironmentInfo {
+export function environments(environmentName: string = codePushEnvironmentsData.defaultEnvironment): CodePushEnvironmentInfo {
return codePushEnvironmentsData.environments[environmentName];
}
| 10 |
diff --git a/generators/entity-client/templates/angular/src/test/javascript/spec/app/entities/entity-management.service.spec.ts.ejs b/generators/entity-client/templates/angular/src/test/javascript/spec/app/entities/entity-management.service.spec.ts.ejs @@ -67,7 +67,7 @@ describe('Service Tests', () => {
<%_ } _%>
elemDefault = new <%= entityAngularName %>(
- <%_ if (pkType === 'String' || pkType === 'UUID') { _%>
+ <%_ if (primaryKeyType === 'String' || primaryKeyType === 'UUID') { _%>
'ID',
<%_ } else { _%>
0,
| 4 |
diff --git a/metaverse_modules/land/index.js b/metaverse_modules/land/index.js @@ -25,11 +25,11 @@ export default e => {
"key": "appUrls",
"value": [
"https://webaverse.github.io/ghost/",
- "https://webaverse.github.io/silkworm-biter",
- "https://webaverse.github.io/silkworm-bloater",
- "https://webaverse.github.io/silkworm-queen",
- "https://webaverse.github.io/silkworm-runner",
- "https://webaverse.github.io/silkworm-slasher"
+ "https://webaverse.github.io/silkworm-biter/",
+ "https://webaverse.github.io/silkworm-bloater/",
+ "https://webaverse.github.io/silkworm-queen/",
+ "https://webaverse.github.io/silkworm-runner/",
+ "https://webaverse.github.io/silkworm-slasher/"
],
},
],
| 0 |
diff --git a/src/util/util.js b/src/util/util.js @@ -52,8 +52,9 @@ var createElement = function(type, val, props, children) {
*/
var createVirtualDOM = function(node) {
var tag = node.nodeName;
- var content = node.textContent;
+ var content = compileTemplate(node.textContent);
var attrs = extractAttrs(node);
+
var children = [];
for(var i = 0; i < node.childNodes.length; i++) {
children.push(createVirtualDOM(node.childNodes[i]));
| 12 |
diff --git a/src/utils/innerSliderUtils.js b/src/utils/innerSliderUtils.js @@ -15,10 +15,20 @@ export const getOnDemandLazySlides = spec => {
onDemandSlides.push(slideIndex)
}
}
- // console.log('onDemandSlides:', onDemandSlides, 'spec:', spec)
return onDemandSlides
}
+export const getRequiredLazySlides = spec => {
+ let requiredSlides = []
+ let startIndex = lazyStartIndex(spec)
+ let endIndex = lazyEndIndex(spec)
+ for (let slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
+ requiredSlides.push(slideIndex)
+ }
+ return requiredSlides
+
+}
+
export const lazyStartIndex = spec => spec.currentSlide - slidesOnLeft(spec)
export const lazyEndIndex = spec => spec.currentSlide + slidesOnRight(spec) // endIndex is exclusive
| 0 |
diff --git a/packages/netlify-plugin-404-no-more/index.js b/packages/netlify-plugin-404-no-more/index.js @@ -24,9 +24,9 @@ function netlify404nomore(conf) {
/* index html files preDeploy */
preDeploy: async opts => {
// console.log({ opts })
- const { BASE_DIR } = opts.constants // where we start from
+ const { BASE_DIR, BUILD_DIR } = opts.constants // where we start from
- let BUILD_DIR = opts.config.build.publish // build folder from netlify config.. there ought to be a nicer way to get this if set elsewhere
+ // let BUILD_DIR = opts.config.build.publish // build folder from netlify config.. there ought to be a nicer way to get this if set elsewhere
if (typeof BUILD_DIR === 'undefined') {
throw new Error('must specify publish dir in netlify config [build] section')
}
| 4 |
diff --git a/userscript.user.js b/userscript.user.js @@ -8629,6 +8629,9 @@ var $$IMU_EXPORT$$;
url: src.replace(/\/((?:v[0-9]*-)?[0-9a-f]+)(?:_[^/._]*)?(\.[^/.]*)$/, "/$1_r$2"),
headers: {
Referer: ""
+ },
+ referer_ok: {
+ same_domain: true
}
};
}
@@ -8649,7 +8652,7 @@ var $$IMU_EXPORT$$;
return {
url: src.replace(/_[^/_]*$/, ""),
headers: {
- "Referer": ""
+ Referer: ""
}
};
// return src.replace(/_fw[0-9]*$/, "");
@@ -9185,13 +9188,11 @@ var $$IMU_EXPORT$$;
// https://cdn.worldcosplay.net/553279/ydllsnlmqigtzjdeycnoucmbtreadgeplevutcww-740.jpg
// https://cdn.worldcosplay.net/553279/ydllsnlmqigtzjdeycnoucmbtreadgeplevutcww-3000.jpg
domain === "cdn.worldcosplay.net") {
+ newsrc = src;
if (src.indexOf("/max-1200/") >= 0) {
// https://wc-ahba9see.c.sakurastorage.jp/max-1200/59530/e929c45f84ace23cf416c2b6fc1c1eacb34f20bf-350x600.jpg
// https://wc-ahba9see.c.sakurastorage.jp/max-1200/59530/e929c45f84ace23cf416c2b6fc1c1eacb34f20bf-1200.jpg
- return {
- url: src.replace(/-[0-9a-z]+(\.[^/.]*)$/, "-1200$1"),
- can_head: false
- };
+ newsrc = src.replace(/-[0-9a-z]+(\.[^/.]*)$/, "-1200$1");
} else {
// https://wc-ahba9see.c.sakurastorage.jp/533191/ebqzwxdflpsovyghbvfmpvzowripdfdorrlkwogi-350x600.jpg
// https://wc-ahba9see.c.sakurastorage.jp/533191/ebqzwxdflpsovyghbvfmpvzowripdfdorrlkwogi-3000.jpg
@@ -9200,15 +9201,20 @@ var $$IMU_EXPORT$$;
// doesn't work:
// https://wc-ahba9see.c.sakurastorage.jp/40021/5a4bd340b2c95e674a1816f9adece947d06b1df2-100.jpg
// https://wc-ahba9see.c.sakurastorage.jp/40021/5a4bd340b2c95e674a1816f9adece947d06b1df2-3000.jpg -- 404
+ newsrc = src.replace(/-[0-9a-z]+(\.[^/.]*)$/, "-3000$1");
+ }
+
return {
- url: src.replace(/-[0-9a-z]+(\.[^/.]*)$/, "-3000$1"),
+ url: newsrc,
can_head: false,
headers: {
Referer: ""
+ },
+ referer_ok: {
+ same_domain: true
}
};
}
- }
if (domain_nowww === "nautiljon.com" && src.match(/\/images[a-z]*\//)) {
// nowww redirects to www
@@ -17099,6 +17105,9 @@ var $$IMU_EXPORT$$;
url: newsrc,
headers: {
Referer: "https://www.pichunter.com/"
+ },
+ referer_ok: {
+ same_domain: true
}
};
}
| 12 |
diff --git a/changelog.md b/changelog.md @@ -5,6 +5,7 @@ If you can't access the Google doc, here is a [PDF](https://github.com/crnormand
Release 0.13.8
- Fixed GCA5-12 export for unmodified damage
+- Updated Brazilian Portuguese language file.
Release 0.13.7 3/2/2022
| 3 |
diff --git a/js/extensions/bindings/alphaNumericExtender.js b/js/extensions/bindings/alphaNumericExtender.js @@ -8,7 +8,7 @@ define(['knockout'], function (ko) {
let current = target();
//only write if it changed
- if (isAlphaNumeric.test(newValue)) {
+ if (isAlphaNumeric.test(newValue) || newValue === "") {
target(newValue);
} else {
target.notifySubscribers(current);
| 9 |
diff --git a/extensions/README.md b/extensions/README.md - [Overview](#overview)
- [General Conventions](#general-conventions)
-- [Core STAC Extensions](#core-stac-extensions)
+- [Stable STAC Extensions](#stable-stac-extensions)
- [Community Extensions](#community-extensions)
- [Extension Maturity](#extension-maturity)
- [Proposed extensions](#proposed-extensions)
@@ -42,17 +42,17 @@ For example, the `eo:bands` attribute may be used in Item Properties to describe
the Item Asset objects contained in the Item, but may also be used in an individual Item Asset to describe only the bands available in that asset.
3. Additional attributes relating to a [Catalog](../catalog-spec/catalog-spec.md) or [Collection](../collection-spec/collection-spec.md) should be added to the root of the object.
-## Core STAC Extensions
+## Stable STAC Extensions
These extensions are considered stable and are widely used in many production implementations. As additional extensions advance
through the [Extension Maturity](#extension-maturity) classification they, will be added here.
-| Extension Title | Identifier | Field Name Prefix | Scope | Description |
-|---------------------------------------------|------------|-------------------|------------------|-------------|
-| [Electro-Optical](https://github.com/stac-extensions/eo/) | eo | eo | Item | Covers electro-optical data that represents a snapshot of the Earth for a single date and time. It could consist of multiple spectral bands, for example visible bands, infrared bands, red edge bands and panchromatic bands. The extension provides common fields like bands, cloud cover, gsd and more. |
-| [Projection](https://github.com/stac-extensions/projection/) | projection | proj | Item | Provides a way to describe Items whose assets are in a geospatial projection. |
-| [Scientific Citation](https://github.com/stac-extensions/scientific/) | scientific | sci | Item, Collection | Metadata that indicate from which publication data originates and how the data itself should be cited or referenced. |
-| [View Geometry](https://github.com/stac-extensions/view/) | view | view | Item | View Geometry adds metadata related to angles of sensors and other radiance angles that affect the view of resulting data |
+| Extension Title | Description |
+|-----------------------------------------------------------------------|--------------------------------|
+| [Electro-Optical](https://github.com/stac-extensions/eo/) | Covers electro-optical data that represents a snapshot of the Earth for a single date and time. It could consist of multiple spectral bands, for example visible bands, infrared bands, red edge bands and panchromatic bands. The extension provides common fields like bands, cloud cover, gsd and more. |
+| [Projection](https://github.com/stac-extensions/projection/) | Provides a way to describe Items whose assets are in a geospatial projection. |
+| [Scientific Citation](https://github.com/stac-extensions/scientific/) | Metadata that indicate from which publication data originates and how the data itself should be cited or referenced. |
+| [View Geometry](https://github.com/stac-extensions/view/) | View Geometry adds metadata related to angles of sensors and other radiance angles that affect the view of resulting data |
## Community Extensions
@@ -171,17 +171,3 @@ For example, if one would like to define an extension to contain a start and a e
3. Define two separate fields, e.g. `"date_range_start": "2018-01-01", "date_range_end": "2018-01-31"`. This is **recommended** as it avoids the conflicts above and is usually better displayed in software that only understands GeoJSON but has no clue about STAC. This is due to the fact that most legacy software can not display arrays or objects GeoJSON `properties` properly.
This rules only applies to the fields defined directly for the Item's `properties`. For fields and structures defined on other levels (e.g. in the root of an Item or in an array), extension authors can freely define the structure. So an array of objects such as the `eo:bands` are fine to use, but keep in mind that the drawbacks mentioned above usually still apply.
-
-### Directory Structure
-
-A STAC extension can have references to additional schemas within the extension schema.
-These files should be kept together in order to preserve relative `$ref` links.
-
-See the [EO](https://github.com/stac-extensions/eo/) extension file structure as an example.
-* Specification examples should be stored in an `examples` directory.
-* The specification schema file(s) should be stored in a `json-schema` directory.
-
-Make sure to choose a meaningful identifier for the extension and use this value as the extension's directory name.
-The extension's identifier should be used in the `stac_extensions` field. Also, make sure to add the identifier to the
-enum defined for the `stac_extensions` field in the
-[JSON schema of the STAC catalog specification](../catalog-spec/json-schema/catalog.json).
| 2 |
diff --git a/src/plots/gl3d/scene.js b/src/plots/gl3d/scene.js @@ -62,6 +62,21 @@ function render(scene) {
return Axes.tickText(axis, axis.d2l(val), 'hover').text;
}
+ function castHoverOption(attr, ptNumber) {
+ var labelOpts = trace.hoverlabel || {};
+ var val = Lib.nestedProperty(labelOpts, attr).get();
+
+ if(Array.isArray(val)) {
+ if(Array.isArray(ptNumber) && Array.isArray(val[ptNumber[0]])) {
+ return val[ptNumber[0]][ptNumber[1]];
+ } else {
+ return val[ptNumber];
+ }
+ } else {
+ return val;
+ }
+ }
+
var oldEventData;
if(lastPicked !== null) {
@@ -92,7 +107,11 @@ function render(scene) {
zLabel: zVal,
text: selection.textLabel,
name: lastPicked.name,
- color: lastPicked.color
+ color: castHoverOption('bgcolor', ptNumber) || lastPicked.color,
+ borderColor: castHoverOption('bordercolor', ptNumber),
+ fontFamily: castHoverOption('font.family', ptNumber),
+ fontSize: castHoverOption('font.size', ptNumber),
+ fontColor: castHoverOption('font.color', ptNumber)
}, {
container: svgContainer
});
| 0 |
diff --git a/scss/components/_list.scss b/scss/components/_list.scss @@ -28,6 +28,8 @@ $siimple-list-item-padding: 10px;
padding: $siimple-list-item-padding;
background-color: siimple-default-color("light", "light");
transition: all 0.3s ease;
+ text-decoration: none;
+ color: $siimple-default-text-color;
//position: relative;
}
&-item:first-child {
@@ -51,6 +53,8 @@ $siimple-list-item-padding: 10px;
font-size: 16px;
font-weight: bold;
line-height: 24px;
+ text-decoration: none;
+ color: $siimple-default-text-color;
//margin-bottom: 5px;
}
}
| 1 |
diff --git a/package.json b/package.json "pretest:e2e": "./bin/local-env/env-check.sh",
"test:e2e": "WP_BASE_URL=http://localhost:9002 wp-scripts test-e2e --config=tests/e2e/jest.config.js",
"test:e2e:interactive": "npm run test:e2e -- --puppeteer-interactive",
- "test:e2e:ci": "npm run test:e2e -- --runInBand",
"test:e2e:watch": "npm run test:e2e -- --watch",
"test:e2e:watch:interactive": "npm run test:e2e -- --watch --puppeteer-interactive",
"prestorybook": "npm run imagemin",
| 2 |
diff --git a/examples/BagOfJobs/workflow.json b/examples/BagOfJobs/workflow.json "name": "BojExecutor",
"type": "dataflow",
"firingLimit": 1,
- "function": "BojK8sCommand",
+ "function": "k8sCommand",
+ "config": {
+ "executor": {
+ "image": "hyperflowwms/montage-workflow-worker",
+ "executable": "echo",
+ "args": ["Hello", "World"]
+ }
+ },
"ins": [ "jobSetsFile" ],
"outs": [ ]
} ],
| 7 |
diff --git a/app/models/carto/api_key.rb b/app/models/carto/api_key.rb @@ -53,7 +53,7 @@ module Carto
belongs_to :user
- before_create :create_token, if: ->(k) { k.regular? || k.master? }
+ before_create :create_token, if: :regular?
before_create :create_db_config, if: :regular?
serialize :grants, Carto::CartoJsonSymbolizerSerializer
@@ -82,6 +82,7 @@ module Carto
user: user,
type: TYPE_MASTER,
name: NAME_MASTER,
+ token: user.api_key,
grants: GRANTS_ALL_APIS,
db_role: user.database_username,
db_password: user.database_password
| 12 |
diff --git a/php/huobipro.php b/php/huobipro.php @@ -324,12 +324,12 @@ class huobipro extends Exchange {
);
}
- public function fetch_trades ($symbol, $since = null, $limit = null, $params = array ()) {
+ public function fetch_trades ($symbol, $since = null, $limit = 2000, $params = array ()) {
$this->load_markets();
$market = $this->market ($symbol);
$response = $this->marketGetHistoryTrade (array_merge (array (
'symbol' => $market['id'],
- 'size' => 2000,
+ 'size' => $limit,
), $params));
$data = $response['data'];
$result = array ();
@@ -355,13 +355,13 @@ class huobipro extends Exchange {
];
}
- public function fetch_ohlcv ($symbol, $timeframe = '1m', $since = null, $limit = null, $params = array ()) {
+ public function fetch_ohlcv ($symbol, $timeframe = '1m', $since = null, $limit = 2000, $params = array ()) {
$this->load_markets();
$market = $this->market ($symbol);
$response = $this->marketGetHistoryKline (array_merge (array (
'symbol' => $market['id'],
'period' => $this->timeframes[$timeframe],
- 'size' => 2000, // max = 2000
+ 'size' => $limit, // max = 2000
), $params));
return $this->parse_ohlcvs($response['data'], $market, $timeframe, $since, $limit);
}
| 1 |
diff --git a/app/models/carto/account_type.rb b/app/models/carto/account_type.rb @@ -5,8 +5,8 @@ module Carto
PERSONAL30 = 'PERSONAL30'.freeze
INDIVIDUAL = 'Individual'.freeze
- TRIAL_PLANS = [PERSONAL30, INDIVIDUAL].freeze
- TRIAL_DAYS = { PERSONAL30 => 30, INDIVIDUAL => 14 }.freeze
+ TRIAL_PLANS = [INDIVIDUAL].freeze
+ TRIAL_DAYS = { INDIVIDUAL => 14 }.freeze
FULLSTORY_SUPPORTED_PLANS = [FREE, PERSONAL30, INDIVIDUAL].freeze
| 2 |
diff --git a/services/dataservices-metrics/spec/unit/service_usage_metrics_spec.rb b/services/dataservices-metrics/spec/unit/service_usage_metrics_spec.rb @@ -18,17 +18,6 @@ describe CartoDB::ServiceUsageMetrics do
@usage_metrics.get('here_isolines', 'isolines_generated', Date.new(2016, 6, 1)).should eq 1543
end
- it 'reads as well wrongly stored non-padded keys' do
- @redis_mock.zincrby('org:team:here_isolines:isolines_generated:201606', 1543, '1')
- @usage_metrics.get('here_isolines', 'isolines_generated', Date.new(2016, 6, 1)).should eq 1543
- end
-
- it "sums the amounts from both keys" do
- @redis_mock.zincrby('org:team:here_isolines:isolines_generated:201606', 10, '01')
- @redis_mock.zincrby('org:team:here_isolines:isolines_generated:201606', 20, '1')
- @usage_metrics.get('here_isolines', 'isolines_generated', Date.new(2016, 6, 1)).should eq 30
- end
-
it "does not request redis twice when there's no need" do
@redis_mock.expects(:zscore).once.with('org:team:here_isolines:isolines_generated:201606', '20').returns(3141592)
@usage_metrics.get('here_isolines', 'isolines_generated', Date.new(2016, 6, 20)).should eq 3141592
| 2 |
diff --git a/src/core/operations/Subsection.mjs b/src/core/operations/Subsection.mjs @@ -22,7 +22,7 @@ class Subsection extends Operation {
this.name = "Subsection";
this.flowControl = true;
this.module = "Default";
- this.description = "Select a part of the input data using a regular expression (regex), and run all subsequent operations on each match separately.<br><br>You can use up to one capture group, where the recipe will only be run on the data in the capture group. If there's more than one capture group, only the first one will be operated on.";
+ this.description = "Select a part of the input data using a regular expression (regex), and run all subsequent operations on each match separately.<br><br>You can use up to one capture group, where the recipe will only be run on the data in the capture group. If there's more than one capture group, only the first one will be operated on.<br><br>Use the Merge operation to reset the effects of subsection.";
this.infoURL = "";
this.inputType = "string";
this.outputType = "string";
| 7 |
diff --git a/src/v2-routes/v2-home.js b/src/v2-routes/v2-home.js -// Home Info Endpoint
+// API Info Endpoint
const express = require("express")
const v2 = express.Router()
+const asyncHandle = require("express-async-handler")
-// Returns API Info
-v2.get("/", (req, res, next) => {
- global.db.collection("home").find({},{"_id": 0 }).toArray((err, doc) => {
- if (err) {
- return next(err)
- }
- res.json(doc[0])
- })
-})
+// Returns API info
+v2.get("/", asyncHandle(async (req, res) => {
+ const data = await global.db
+ .collection("home")
+ .find({},{"_id": 0 })
+ .toArray()
+ res.json(data[0])
+}))
module.exports = v2
| 3 |
diff --git a/docs/_guides/sorting-filtering.md b/docs/_guides/sorting-filtering.md @@ -3,34 +3,66 @@ title: Sorting and filtering
layout: guide
---
-## Using firestore
+## Using the realtime database
+
+All three read methods ([`database.read`](/redux-saga-firebase/reference/database#read), [`database.channel`](/redux-saga-firebase/reference/database#channel) and [`database.sync`](/redux-saga-firebase/reference/database#sync)) accepts references as strings, [`Reference`](https://firebase.google.com/docs/reference/js/firebase.database.Reference) objects or [`Query`](https://firebase.google.com/docs/reference/js/firebase.database.Query) objects.
+
+Using the last two options we can filter, sort and limit the results using the Firebase API methods ([`orderByChild`](https://firebase.google.com/docs/reference/js/firebase.database.Reference#orderByChild), [`equalTo`](https://firebase.google.com/docs/reference/js/firebase.database.Reference#equalTo), [`limitToLast`](https://firebase.google.com/docs/reference/js/firebase.database.Reference#limitToLast), etc).
-Most of the functions accepting a [firebase.firestore.CollectionReference](https://firebase.google.com/docs/reference/js/firebase.firestore.CollectionReference) argument also accept a [firebase.firestore.Query](https://firebase.google.com/docs/reference/js/firebase.firestore.Query) argument.
+### Filtering
+
+```js
+// Will only get users for which the `isAdmin` key is `true`:
+const admins = yield call(
+ rsf.database.read,
+ firebase.database().reference('users').orderByChild('isAdmin').equalTo(true)
+)
+```
-This means that it is possible to call these methods with filtered queries instead of "full" collection references:
+### Sorting
```js
-// Will synchronise ALL users:
-yield fork(rsf.firestore.sync, 'users', action)
+// Will get all users ordered by age:
+const usersOrderedByAge = yield call(
+ rsf.database.read,
+ firebase.database().reference('users').orderByChild('age')
+)
```
-can become:
+### Limiting
+
+```js
+// Will synchronize the five youngest users:
+yield fork(
+ rsf.database.sync,
+ firebase.database().reference('users').orderByChild('age').limitToFirst(5),
+ action
+)
+```
+
+## Using firestore
+
+A similar approch works for firestore methods: [`getCollection`](https://n6g7.github.io/redux-saga-firebase/reference/firestore#getCollection), [`syncCollection`](https://n6g7.github.io/redux-saga-firebase/reference/firestore#syncCollection) and [`channel`](https://n6g7.github.io/redux-saga-firebase/reference/firestore#channel).
+
+They also accept [firebase.firestore.CollectionReference](https://firebase.google.com/docs/reference/js/firebase.firestore.CollectionReference) and [firebase.firestore.Query](https://firebase.google.com/docs/reference/js/firebase.firestore.Query) as argument.
+
+### Filtering
```js
// Will only synchronise users for which the `isAdmin` key is `true`:
yield fork(
- rsf.firestore.sync,
+ rsf.firestore.syncCollection,
firestore.collection('users').where('isAdmin', '==', true),
action
)
```
-Similarly it is possible to order and limit queries:
+### Sorting, limiting
```js
// Get the 10 youngest users:
const users = yield call(
- rsf.firestore.get,
+ rsf.firestore.getCollection,
firestore.collection('users').orderBy('age').limit(10)
)
```
| 7 |
diff --git a/src/parsers/linter/GmlLinter.hx b/src/parsers/linter/GmlLinter.hx @@ -265,7 +265,7 @@ class GmlLinter {
var templateTypes:Array<GmlType> = null;
if (doc != null) {
argTypes = doc.argTypes;
- argTypeLast = doc.rest ? argTypes.length - 1 : 0x7fffffff;
+ argTypeLast = doc.rest && argTypes != null ? argTypes.length - 1 : 0x7fffffff;
if (doc.templateNames != null) {
templateTypes = NativeArray.create(doc.templateNames.length);
}
| 1 |
diff --git a/index.html b/index.html </section>
<section class=inventory-slots>
<div class=row>
- <div class=slot></div>
+ <div class=slot>
+ <img src="https://preview.exokit.org/QmWgij93j5oU9SHGtGcKATJVsQ5ZEarqjg3bZDZMxXLdjF.vrm/preview.png" class=item>
+ </div>
<div class=slot></div>
<div class=slot></div>
<div class=slot></div>
| 0 |
diff --git a/src/styles/_input.scss b/src/styles/_input.scss &-menu {
border: none;
padding: 2px 0;
- position: fixed;
+ margin-right: 10px;
+ position: absolute;
overflow: auto;
max-height: 50%;
background: $color-gray;
| 7 |
diff --git a/src/collection/dimensions.js b/src/collection/dimensions.js @@ -862,11 +862,19 @@ elesfn.boundingBox = function( options ){
this.recalculateRenderedStyle( opts.useCache );
}
+ var updatedEdge = {}; // use to avoid duplicated edge updates
+
for( var i = 0; i < eles.length; i++ ){
var ele = eles[i];
- if( styleEnabled && ele.isEdge() && ele.pstyle('curve-style').strValue === 'bezier' ){
- ele.parallelEdges().recalculateRenderedStyle( opts.useCache ); // n.b. ele.parallelEdges() single is cached
+ if( styleEnabled && ele.isEdge() && ele.pstyle('curve-style').strValue === 'bezier' && !updatedEdge[ ele.id() ] ){
+ var edges = ele.parallelEdges();
+
+ for( var j = 0; j < edges.length; j++ ){ // make all as updated
+ updatedEdge[ edges[j].id() ] = true;
+ }
+
+ edges.recalculateRenderedStyle( opts.useCache ); // n.b. ele.parallelEdges() single is cached
}
updateBoundsFromBox( bounds, cachedBoundingBoxImpl( ele, opts ) );
| 7 |
diff --git a/lib/assets/javascripts/new-dashboard/store/actions/direct-db-connection.js b/lib/assets/javascripts/new-dashboard/store/actions/direct-db-connection.js @@ -2,7 +2,6 @@ export function fetchIPs (context) {
context.commit('setFetchingState');
context.rootState.client.directDBConnection().getIPs(function (err, _, data) {
- debugger;
if (err) {
const error = data.responseJSON && data.responseJSON.errors ||
{ message: data.responseText || data.statusText };
@@ -11,21 +10,27 @@ export function fetchIPs (context) {
}
if (data.ips) {
- context.commit('setIPs', data.ips.split(','));
+ context.commit('setIPs', data.ips || []);
}
});
}
export function setIPs (context, ips) {
+ return new Promise((resolve, reject) => {
context.rootState.client.directDBConnection().setIPs(ips,
function (err, _, data) {
if (err) {
- // TODO: Errors
+ return reject({
+ errorType: err,
+ errors: data.responseJSON.errors
+ });
}
- // context.commit('setIPs', data.ips);
+ context.commit('setIPs', data.ips);
+ resolve();
}
);
+ });
}
export function fetchCertificates (context) {
| 9 |
diff --git a/package.json b/package.json "Paul Pasmanik (https://github.com/ppasmanik)",
"Piotr Gasiorowski (https://github.com/WooDzu)",
"polaris340 (https://github.com/polaris340)",
+ "Ramon Emilio Savinon (https://github.com/vaberay)",
"Rob Brazier (https://github.com/robbrazier)",
"Russell Schick (https://github.com/rschick)",
"Ryan Zhang (https://github.com/ryanzyy)",
| 0 |
diff --git a/test/webserver.js b/test/webserver.js @@ -85,6 +85,10 @@ WebServer.prototype = {
// `/../../../../../../../etc/passwd`, which let you make GET requests
// for files outside of `this.root`.
var pathPart = path.normalize(decodeURI(urlParts[1]));
+ // path.normalize returns a path on the basis of the current platform.
+ // Windows paths cause issues in statFile and serverDirectoryIndex.
+ // Converting to unix path would avoid platform checks in said functions.
+ pathPart = pathPart.replace(/\\/g, '/');
} catch (ex) {
// If the URI cannot be decoded, a `URIError` is thrown. This happens for
// malformed URIs such as `http://localhost:8888/%s%s` and should be
| 1 |
diff --git a/docker/parsr-base/Dockerfile b/docker/parsr-base/Dockerfile -FROM debian:10 as builder
-
-RUN apt-get update && \
- apt-get install -y git build-essential
-
-RUN git clone https://github.com/AXATechLab/pdf2json /src/pdf2json && \
- cd /src/pdf2json && \
- ./configure --prefix=/opt/pdf2json && \
- make -j && \
- make install && \
- cd /src && \
- rm -rf pdf2json
-
-
FROM debian:10 as engine
RUN apt-get update && \
@@ -22,8 +8,6 @@ RUN apt-get update && \
WORKDIR /opt/app-root/src
RUN chown 1001:0 /opt/app-root/src
-COPY --from=builder /opt/pdf2json /opt/pdf2json
-
ENV PATH $PATH:/opt/app-root/src/node_modules/.bin:/opt/pdf2json/bin
ENV HOME /opt/app-root/src
| 2 |
diff --git a/vis/js/templates/listentry/Abstract.jsx b/vis/js/templates/listentry/Abstract.jsx @@ -3,10 +3,12 @@ import React from "react";
import Highlight from "../../components/Highlight";
const Abstract = ({ text }) => {
+ let sanitizedText = $("<textarea />").html(text).text();
+
return (
// html template starts here
<p id="list_abstract">
- <Highlight queryHighlight>{text}</Highlight>
+ <Highlight queryHighlight>{sanitizedText}</Highlight>
</p>
// html template ends here
);
| 1 |
diff --git a/src/SelectedItemTextValueMixin.js b/src/SelectedItemTextValueMixin.js @@ -22,6 +22,18 @@ export default function SelectedItemTextValueMixin(Base) {
// The class prototype added by the mixin.
class SelectedItemTextValue extends Base {
+ componentDidUpdate() {
+ if (super.componentDidUpdate) { super.componentDidUpdate(); }
+ const items = this.items;
+ if (this.state.pendingValue && items) {
+ const index = indexOfItemWithText(items, this.state.pendingValue);
+ this.setState({
+ selectedIndex: index,
+ pendingValue: null
+ });
+ }
+ }
+
/**
* The text content of the selected item.
*
@@ -37,27 +49,29 @@ export default function SelectedItemTextValueMixin(Base) {
this.selectedItem.textContent;
}
set value(text) {
-
- const currentIndex = this.selectedIndex;
- let newIndex = -1; // Assume we won't find the text.
-
- // Find the item with the indicated text.
const items = this.items;
- if (items == null) {
- return;
+ if (items === null) {
+ // No items yet, save and try again later.
+ this.setState({
+ pendingValue: text
+ });
+ } else {
+ // Select the index of the indicate text, if found.
+ const index = indexOfItemWithText(items, text);
+ this.updateSelectedIndex(index);
}
- for (let i = 0, length = items.length; i < length; i++) {
- if (items[i].textContent === text) {
- newIndex = i;
- break;
}
}
- if (newIndex !== currentIndex) {
- this.selectedIndex = newIndex;
+ return SelectedItemTextValue;
}
+
+
+function indexOfItemWithText(items, text) {
+ for (let i = 0, length = items.length; i < length; i++) {
+ if (items[i].textContent === text) {
+ return i
}
}
-
- return SelectedItemTextValue;
+ return -1;
}
| 11 |
diff --git a/spec/models/visualization/presenter_spec.rb b/spec/models/visualization/presenter_spec.rb @@ -60,8 +60,7 @@ describe Visualization::Member do
describe 'to_poro fields' do
it 'basic fields expected at the to_poro method' do
- perm_mock = mock
- perm_mock.stubs(:to_poro).returns({ wadus: 'wadus'})
+ perm_mock = FactoryGirl.build(:carto_permission)
vis_mock = mock
vis_mock.stubs(:id).returns(UUIDTools::UUID.timestamp_create.to_s)
| 2 |
diff --git a/lib/helpers/query/castUpdate.js b/lib/helpers/query/castUpdate.js @@ -43,13 +43,6 @@ module.exports = function castUpdate(schema, obj, options, context, filter) {
return obj;
}
- if (schema.options.strict === 'throw' && obj.hasOwnProperty(schema.options.discriminatorKey)) {
- if (!options.overwriteDiscriminatorKey) {
- throw new StrictModeError(schema.options.discriminatorKey);
- }
- } else if (!options.overwriteDiscriminatorKey) {
- delete obj[schema.options.discriminatorKey];
- }
if (options.upsert && !options.overwrite) {
moveImmutableProperties(schema, obj, context);
}
@@ -92,14 +85,6 @@ module.exports = function castUpdate(schema, obj, options, context, filter) {
val = ret[op];
hasDollarKey = hasDollarKey || op.startsWith('$');
- if (schema.options.strict === 'throw' && typeof val === 'object' && val != null && val.hasOwnProperty(schema.options.discriminatorKey)) {
- if (!options.overwriteDiscriminatorKey) {
- throw new StrictModeError(schema.options.discriminatorKey);
- }
- } else if (typeof val === 'object' && val != null && !options.overwriteDiscriminatorKey) {
- delete obj[schema.options.discriminatorKey];
- }
-
if (val &&
typeof val === 'object' &&
!Buffer.isBuffer(val) &&
| 1 |
diff --git a/public/app/index.pug b/public/app/index.pug @@ -100,7 +100,7 @@ html
button.material.settings_button--update-feed-artworks Update podcast cover art
.settings_label
.settings_label_left
- button.material.settings_button--manage-downloaded-episodes Manage downloaded episodes
+ button.material.settings_button--manage-downloaded-episodes View offline episodes directory
.settings_section.settings_about
p.
Cumulonimbus version #[span.settings_version-string] #[br]
| 10 |
diff --git a/BUILD.gn b/BUILD.gn @@ -5,7 +5,7 @@ if (is_mac) {
#chrome_framework_name = chrome_product_full_name + " Framework"
frameworks = ["AutomaticAssessmentConfiguration.framework"]
}
-import("//build/util/version.gni")
+import("//chrome/version.gni")
import("//components/nacl/features.gni")
group("nwjs") {
| 4 |
diff --git a/js/bitstamp.js b/js/bitstamp.js @@ -99,6 +99,10 @@ module.exports = class bitstamp extends Exchange {
'sell/{pair}/',
'sell/market/{pair}/',
'sell/instant/{pair}/',
+ 'btc_withdrawal/',
+ 'btc_address/',
+ 'ripple_withdrawal/',
+ 'ripple_address/',
'ltc_withdrawal/',
'ltc_address/',
'eth_withdrawal/',
@@ -155,11 +159,7 @@ module.exports = class bitstamp extends Exchange {
},
'v1': {
'post': [
- 'bitcoin_deposit_address/',
'unconfirmed_btc/',
- 'bitcoin_withdrawal/',
- 'ripple_withdrawal/',
- 'ripple_address/',
],
},
},
@@ -1420,9 +1420,6 @@ module.exports = class bitstamp extends Exchange {
}
getCurrencyName (code) {
- if (code === 'BTC') {
- return 'bitcoin';
- }
return code.toLowerCase ();
}
@@ -1435,17 +1432,10 @@ module.exports = class bitstamp extends Exchange {
throw new NotSupported (this.id + ' fiat fetchDepositAddress() for ' + code + ' is not supported!');
}
const name = this.getCurrencyName (code);
- const v1 = (code === 'BTC');
- let method = v1 ? 'v1' : 'private'; // v1 or v2
- method += 'Post' + this.capitalize (name);
- method += v1 ? 'Deposit' : '';
- method += 'Address';
- let response = await this[method] (params);
- if (v1) {
- response = JSON.parse (response);
- }
- const address = v1 ? response : this.safeString (response, 'address');
- const tag = v1 ? undefined : this.safeString2 (response, 'memo_id', 'destination_tag');
+ const method = 'private' + 'Post' + this.capitalize (name) + 'Address';
+ const response = await this[method] (params);
+ const address = this.safeString (response, 'address');
+ const tag = this.safeString2 (response, 'memo_id', 'destination_tag');
this.checkAddress (address);
return {
'currency': code,
@@ -1466,9 +1456,7 @@ module.exports = class bitstamp extends Exchange {
let method = undefined;
if (!this.isFiat (code)) {
const name = this.getCurrencyName (code);
- const v1 = (code === 'BTC');
- method = v1 ? 'v1' : 'private'; // v1 or v2
- method += 'Post' + this.capitalize (name) + 'Withdrawal';
+ method = 'private' + 'Post' + this.capitalize (name) + 'Withdrawal';
if (code === 'XRP') {
if (tag !== undefined) {
request['destination_tag'] = tag;
| 14 |
diff --git a/Apps/Sandcastle/gallery/AtmospherePostProcessing.html b/Apps/Sandcastle/gallery/AtmospherePostProcessing.html "use strict";
//Sandcastle_Begin
- var worldTerrain = Cesium.createWorldTerrain({
+ let worldTerrain = Cesium.createWorldTerrain({
requestWaterMask: true,
requestVertexNormals: true,
});
- var viewer = new Cesium.Viewer("cesiumContainer", {
+ let viewer = new Cesium.Viewer("cesiumContainer", {
terrainProvider: worldTerrain,
});
// compute and set sun color and intensity based on sun angle from horizon
// this could be part of Cesium if it were made in a more physicaly accurate way
- var daySunColor = Cesium.Color.fromCssColorString("#ffffffff");
- var sunsetColor = Cesium.Color.fromCssColorString("#9e6241ff");
- var nightSunColor = Cesium.Color.fromCssColorString("#222222ff");
- var sunColor = new Cesium.Color();
+ let daySunColor = Cesium.Color.fromCssColorString("#ffffffff");
+ let sunsetColor = Cesium.Color.fromCssColorString("#9e6241ff");
+ let nightSunColor = Cesium.Color.fromCssColorString("#222222ff");
+ let sunColor = new Cesium.Color();
viewer.scene.preRender.addEventListener(function () {
if (
)
return; // wait for sun to be ready
- var sunLightDirection = Cesium.Cartesian3.normalize(
+ let sunLightDirection = Cesium.Cartesian3.normalize(
viewer.scene.sun._boundingVolume.center,
new Cesium.Cartesian3()
);
- var surfaceNormal = Cesium.Cartesian3.normalize(
+ let surfaceNormal = Cesium.Cartesian3.normalize(
viewer.camera.position,
new Cesium.Cartesian3()
);
- var sunDotNormal = parseFloat(
+ let sunDotNormal = parseFloat(
Cesium.Cartesian3.dot(surfaceNormal, sunLightDirection).toPrecision(
2
)
| 14 |
diff --git a/source/setup/components/VaultPage.js b/source/setup/components/VaultPage.js import React, { Component } from "react";
import PropTypes from "prop-types";
-import BUI, { VaultProvider, VaultUI } from "@buttercup/ui";
+import { VaultProvider, VaultUI } from "@buttercup/ui";
class VaultPage extends Component {
static propTypes = {
@@ -17,7 +17,6 @@ class VaultPage extends Component {
}
render() {
- console.log("COMPS", BUI);
return (
<div>
<Choose>
| 2 |
diff --git a/services/src/services/update/update.hooks.js b/services/src/services/update/update.hooks.js @@ -20,10 +20,7 @@ class UpdateHooks {
}
checkUpdateFormat(hook) {
- if (!hook) {
- throw new errors.BadRequest('No hook at all?');
- }
- if (!(hook.data)) {
+ if (!(hook.data) || !Object.keys(hook.data).length) {
throw new errors.BadRequest('Missing data');
}
if (!(hook.data.commit)) {
| 2 |
diff --git a/userscript.user.js b/userscript.user.js @@ -1210,7 +1210,7 @@ var $$IMU_EXPORT$$;
done(data);
for (var i = 0; i < this.fetches[key].length; i++) {
- this.fetches[key](data);
+ this.fetches[key][i](data);
}
delete this.fetches[key];
| 1 |
diff --git a/server/game/effects.js b/server/game/effects.js @@ -358,7 +358,7 @@ const Effects = {
unapply: function(card, context) {
context.game.resolveGameAction(
GameActions.simultaneously(
- context.dynamicIcons[card.uuid].map(icon => GameActions.removeIcon({ card, icon, applying: false }))
+ context.dynamicIcons[card.uuid].map(icon => GameActions.loseIcon({ card, icon, applying: false }))
)
);
delete context.dynamicIcons[card.uuid];
| 1 |
diff --git a/plugins/identity/config/policy.json b/plugins/identity/config/policy.json "identity:project_delete": "rule:cloud_admin or rule:admin_and_matching_target_project_domain_id or rule:admin_and_matching_target_project_id",
"identity:project_create": "rule:cloud_admin or rule:admin_and_matching_project_domain_id",
- "identity:project_request": "not(domain_id:nil)",
+ "identity:project_request": "not(project_id:nil and role:admin)",
"identity:project_api_endpoints": "not(project_id:nil)",
"identity:project_download_openrc": "not(project_id:nil)",
| 13 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/contentview/template.vue v-on:scroll = "onScrollOverlay"
v-on:mousemove = "mouseMove"
v-on:dragover = "onDragOver"
- v-on:drop = "onDrop"
- v-bind:style = "`right: ${scrollbarWidth}px;`">
+ v-on:drop = "onDrop">
<div class="editview-container" ref="editviewContainer">
<div
v-bind:class = "editableClass"
@@ -97,8 +96,8 @@ export default {
editableClass: null,
selectedComponent: null,
clipboard: null,
- scrollbarWidth: 0,
- ctrlDown: false
+ ctrlDown: false,
+ scrollTop: 0
}
},
@@ -165,6 +164,7 @@ export default {
}
},
+
/* Iframe (editview) methods ===============
============================================ */
onIframeLoaded(ev){
@@ -208,7 +208,11 @@ export default {
this.$nextTick(function () {
var scrollAmount = ev.target.scrollTop
var editview = this.$refs.editview
- editview.contentWindow.scrollTo(0, scrollAmount)
+ this.scrollTop = scrollAmount
+ console.log('onScrollOverlay scrollAmount: ', scrollAmount)
+ // editview.contentWindow.scrollTo(0, scrollAmount)
+ editview.contentWindow.document.body.style.transform = `translateY(-${this.scrollTop}px)`
+ //editview.contentWindow.document.body.style.top = `-${this.scrollTop}px`
})
},
@@ -405,9 +409,10 @@ export default {
var editable = this.$refs.editable
var editview = this.$refs.editview
var scrollY = editview ? editview.contentWindow.scrollY : 0
+ console.log('scrollY: ', scrollY)
var scrollX = editview ? editview.contentWindow.scrollX : 0
if(editable) {
- editable.style.top = (targetBox.top + scrollY) + 'px'
+ editable.style.top = (targetBox.top + scrollY + this.scrollTop) + 'px'
editable.style.left = (targetBox.left + scrollX) + 'px'
editable.style.width = targetBox.width + 'px'
editable.style.height = targetBox.height + 'px'
| 11 |
diff --git a/src/lib/services/PhysicalKeyboard.ts b/src/lib/services/PhysicalKeyboard.ts @@ -34,7 +34,7 @@ class PhysicalKeyboard {
`{${buttonPressed}}`
);
let buttonDOM;
- let buttonName;
+ let buttonName: string;
if (standardButtonPressed) {
buttonDOM = standardButtonPressed;
@@ -46,11 +46,29 @@ class PhysicalKeyboard {
return;
}
- if (buttonDOM) {
- buttonDOM.style.background =
+ const applyButtonStyle = (buttonElement: HTMLElement) => {
+ buttonElement.style.background =
options.physicalKeyboardHighlightBgColor || "#dadce4";
- buttonDOM.style.color =
+ buttonElement.style.color =
options.physicalKeyboardHighlightTextColor || "black";
+ }
+
+ if (buttonDOM) {
+ if(Array.isArray(buttonDOM)){
+ buttonDOM.forEach(buttonElement => applyButtonStyle(buttonElement));
+
+ // Even though we have an array of buttons, we just want to press one of them
+ if (options.physicalKeyboardHighlightPress) {
+ if (options.physicalKeyboardHighlightPressUsePointerEvents) {
+ buttonDOM[0]?.onpointerdown();
+ } else if (options.physicalKeyboardHighlightPressUseClick) {
+ buttonDOM[0]?.click();
+ } else {
+ instance.handleButtonClicked(buttonName, event);
+ }
+ }
+ } else {
+ applyButtonStyle(buttonDOM);
if (options.physicalKeyboardHighlightPress) {
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
@@ -62,6 +80,7 @@ class PhysicalKeyboard {
}
}
}
+ }
});
}
@@ -74,12 +93,28 @@ class PhysicalKeyboard {
instance.getButtonElement(buttonPressed) ||
instance.getButtonElement(`{${buttonPressed}}`);
- if (buttonDOM && buttonDOM.removeAttribute) {
- buttonDOM.removeAttribute("style");
+ const applyButtonStyle = (buttonElement: HTMLElement) => {
+ if(buttonElement.removeAttribute){
+ buttonElement.removeAttribute("style");
+ }
+ };
+
+ if (buttonDOM) {
+ if(Array.isArray(buttonDOM)){
+ buttonDOM.forEach(buttonElement => applyButtonStyle(buttonElement));
+
+ // Even though we have an array of buttons, we just want to press one of them
+ if (options.physicalKeyboardHighlightPressUsePointerEvents) {
+ buttonDOM[0]?.onpointerup();
+ }
+ } else {
+ applyButtonStyle(buttonDOM);
+
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
buttonDOM.onpointerup();
}
}
+ }
});
}
| 9 |
diff --git a/Makefile b/Makefile @@ -353,7 +353,7 @@ check-gears: $(addprefix check-gear/, $(wildcard gears/*))
check-external: prepare-test-db check-integrations
-check-prepared: check-1 check-2 check-4 check-5 check-7 check-9 check-spec-helper-min check-carto-db-class check-carto-gears-api
+check-prepared: check-1 check-2 check-4 check-5 check-7 check-9 check-spec-helper-min check-carto-db-class
check: prepare-test-db check-prepared check-gears
check-frontend:
| 2 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/iconaction/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/iconaction/template.vue <template>
<div class="col s12 m6 l4 icon-action">
<div class="card blue-grey darken-3">
- <div class="card-content white-text">
+ <div class="card-content white-text action" @click="onCardContentClick">
<span class="card-title">{{$exp(model, 'title')}}</span>
<p>{{$exp(model,'description')}}</p>
</div>
methods: {
internal(action, target) {
return !action.startsWith('http') && (target === undefined || target === null)
+ },
+ onCardContentClick() {
+ $perAdminApp.action(this, 'selectPath', this.model.action)
}
}
}
.card .card-content p {
height: 100px;
}
+ .card-content.action:hover {
+ background-color: rgba(255, 255, 255, 0.05);
+ cursor: pointer;
+ }
</style>
| 7 |
diff --git a/test/jasmine/tests/gl2d_plot_interact_test.js b/test/jasmine/tests/gl2d_plot_interact_test.js @@ -4,6 +4,7 @@ var Plotly = require('@lib/index');
var Plots = require('@src/plots/plots');
var Lib = require('@src/lib');
var Drawing = require('@src/components/drawing');
+var ScatterGl = require('@src/traces/scattergl');
var createGraphDiv = require('../assets/create_graph_div');
var destroyGraphDiv = require('../assets/destroy_graph_div');
@@ -14,6 +15,7 @@ var selectButton = require('../assets/modebar_button');
var delay = require('../assets/delay');
var readPixel = require('../assets/read_pixel');
+
function countCanvases() {
return d3.selectAll('canvas').size();
}
@@ -406,7 +408,6 @@ describe('Test gl2d plots', function() {
.then(done);
});
-
it('@noCI should display selection of big number of miscellaneous points', function(done) {
var colorList = [
'#006385', '#F06E75', '#90ed7d', '#f7a35c', '#8085e9',
@@ -645,4 +646,28 @@ describe('Test gl2d plots', function() {
.catch(fail)
.then(done);
});
+
+ it('should restyle opacity', function(done) {
+ // #2299
+ spyOn(ScatterGl, 'calc');
+
+ var dat = [{
+ 'x': [1, 2, 3],
+ 'y': [1, 2, 3],
+ 'type': 'scattergl',
+ 'mode': 'markers'
+ }];
+
+ Plotly.plot(gd, dat, {width: 500, height: 500})
+ .then(function() {
+ expect(ScatterGl.calc).toHaveBeenCalledTimes(1);
+
+ return Plotly.restyle(gd, {'opacity': 0.1});
+ })
+ .then(function() {
+ expect(ScatterGl.calc).toHaveBeenCalledTimes(2);
+ })
+ .catch(fail)
+ .then(done);
+ });
});
| 0 |
diff --git a/package.json b/package.json "eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^5.1.0",
- "eslint-plugin-standard": "^5.0.0",
"evaldown": "^1.3.0",
"find-node-modules": "^2.0.0",
"fugl": "^1.0.0",
| 2 |
diff --git a/source/offline/Database.js b/source/offline/Database.js @@ -53,10 +53,11 @@ class Database {
return _db;
}
- async transaction(storeNames, type, fn) {
+ // Mode = readwrite or readonly
+ async transaction(storeNames, mode, fn) {
const db = await this.open();
return new Promise((resolve, reject) => {
- const transaction = db.transaction(storeNames, type);
+ const transaction = db.transaction(storeNames, mode);
transaction.onabort = () => reject(transaction.error);
transaction.oncomplete = () => resolve();
fn(transaction);
| 10 |
diff --git a/lib/assets/javascripts/new-dashboard/assets/icons/common/filter.svg b/lib/assets/javascripts/new-dashboard/assets/icons/common/filter.svg <svg width="20" height="18" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<path d="M-2-3h24v24H-2z"/>
- <g class="svgicon" fill="#036FE2" fill-rule="nonzero">
- <path d="M17 5.999c1.654 0 3-1.346 3-3s-1.346-3-3-3a2.993 2.993 0 0 0-2.815 2H0v2h14.185a2.993 2.993 0 0 0 2.815 2zm0-4a1 1 0 1 1 0 2 1 1 0 0 1 0-2zM7 5.999a2.993 2.993 0 0 0-2.815 2H0v2h4.185a2.994 2.994 0 0 0 2.815 2 2.994 2.994 0 0 0 2.815-2H20v-2H9.815a2.993 2.993 0 0 0-2.815-2zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM17 11.999a2.993 2.993 0 0 0-2.815 2H0v2h14.185a2.994 2.994 0 0 0 2.815 2c1.654 0 3-1.346 3-3s-1.346-3-3-3zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/>
- </g>
+ <path class="svgicon" fill="#036FE2" fill-rule="nonzero" d="M17 5.999c1.654 0 3-1.346 3-3s-1.346-3-3-3a2.993 2.993 0 0 0-2.815 2H0v2h14.185a2.993 2.993 0 0 0 2.815 2zm0-4a1 1 0 1 1 0 2 1 1 0 0 1 0-2zM7 5.999a2.993 2.993 0 0 0-2.815 2H0v2h4.185a2.994 2.994 0 0 0 2.815 2 2.994 2.994 0 0 0 2.815-2H20v-2H9.815a2.993 2.993 0 0 0-2.815-2zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM17 11.999a2.993 2.993 0 0 0-2.815 2H0v2h14.185a2.994 2.994 0 0 0 2.815 2c1.654 0 3-1.346 3-3s-1.346-3-3-3zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/>
</g>
</svg>
| 7 |
diff --git a/scenes/treehouse.scn b/scenes/treehouse.scn 0.5
],
"start_url": "https://webaverse.github.io/potion/"
+ },
+ {
+ "position": [
+ -6,
+ 0.5,
+ 12
+ ],
+ "quaternion": [
+ 0,
+ 0,
+ 0,
+ 1
+ ],
+ "scale": [
+ 1,
+ 1,
+ 1
+ ],
+ "start_url": "https://webaverse.github.io/pistol/"
+ },
+ {
+ "position": [
+ -6,
+ 0.5,
+ 11
+ ],
+ "quaternion": [
+ 0,
+ 0,
+ 0,
+ 1
+ ],
+ "scale": [
+ 1,
+ 1,
+ 1
+ ],
+ "start_url": "https://webaverse.github.io/silsword/"
}
]
}
| 0 |
diff --git a/test/jasmine/tests/cartesian_interact_test.js b/test/jasmine/tests/cartesian_interact_test.js @@ -371,6 +371,19 @@ describe('axis zoom/pan and main plot zoom', function() {
};
}
+ function doScroll(subplot, directions, deltaY, opts) {
+ return function() {
+ opts = opts || {};
+ var edge = opts.edge || '';
+ var dx = opts.dx || 0;
+ var dy = opts.dy || 0;
+ var dragger = getDragger(subplot, directions);
+ var coords = getNodeCoords(dragger, edge);
+ mouseEvent('scroll', coords.x + dx, coords.y + dy, {deltaY: deltaY, element: dragger});
+ return delay(constants.REDRAWDELAY + 10)();
+ };
+ }
+
function checkRanges(newRanges, msg) {
msg = msg || '';
if(msg) msg = ' - ' + msg;
@@ -459,26 +472,11 @@ describe('axis zoom/pan and main plot zoom', function() {
.then(doDblClick('x3y3', 'nsew'))
.then(checkRanges({}, 'reset x3y3'))
// scroll wheel
- .then(function() {
- var mainDrag = getDragger('xy', 'nsew');
- var mainDragCoords = getNodeCoords(mainDrag, 'se');
- mouseEvent('scroll', mainDragCoords.x, mainDragCoords.y, {deltaY: 20, element: mainDrag});
- })
- .then(delay(constants.REDRAWDELAY + 10))
+ .then(doScroll('xy', 'nsew', 20, {edge: 'se'}))
.then(checkRanges({xaxis: [-0.2103, 2], yaxis: [0, 2.2103]}, 'xy main scroll'))
- .then(function() {
- var ewDrag = getDragger('xy', 'ew');
- var ewDragCoords = getNodeCoords(ewDrag);
- mouseEvent('scroll', ewDragCoords.x - 50, ewDragCoords.y, {deltaY: -20, element: ewDrag});
- })
- .then(delay(constants.REDRAWDELAY + 10))
+ .then(doScroll('xy', 'ew', -20, {dx: -50}))
.then(checkRanges({xaxis: [-0.1578, 1.8422], yaxis: [0, 2.2103]}, 'x scroll'))
- .then(function() {
- var nsDrag = getDragger('xy', 'ns');
- var nsDragCoords = getNodeCoords(nsDrag);
- mouseEvent('scroll', nsDragCoords.x, nsDragCoords.y - 50, {deltaY: -20, element: nsDrag});
- })
- .then(delay(constants.REDRAWDELAY + 10))
+ .then(doScroll('xy', 'ns', -20, {dy: -50}))
.then(checkRanges({xaxis: [-0.1578, 1.8422], yaxis: [0.1578, 2.1578]}, 'y scroll'))
.catch(failTest)
.then(done);
@@ -512,20 +510,9 @@ describe('axis zoom/pan and main plot zoom', function() {
.then(doDblClick('xy', 'nsew'))
.then(checkRanges({}, 'dblclick xy #3'))
// scroll wheel
- .then(function() {
- var mainDrag = getDragger('xy', 'nsew');
- var mainDragCoords = getNodeCoords(mainDrag, 'se');
- mouseEvent('scroll', mainDragCoords.x, mainDragCoords.y, {deltaY: 20, element: mainDrag});
- })
- .then(delay(constants.REDRAWDELAY + 10))
- .then(checkRanges({xaxis: [-0.2103, 2], yaxis: [0, 2.2103], xaxis2: [-0.1052, 2.1052], yaxis2: [-0.1052, 2.1052]},
- 'scroll xy'))
- .then(function() {
- var ewDrag = getDragger('xy', 'ew');
- var ewDragCoords = getNodeCoords(ewDrag);
- mouseEvent('scroll', ewDragCoords.x - 50, ewDragCoords.y, {deltaY: -20, element: ewDrag});
- })
- .then(delay(constants.REDRAWDELAY + 10))
+ .then(doScroll('xy', 'nsew', 20, {edge: 'se'}))
+ .then(checkRanges({xaxis: [-0.2103, 2], yaxis: [0, 2.2103], xaxis2: [-0.1052, 2.1052], yaxis2: [-0.1052, 2.1052]}, 'scroll xy'))
+ .then(doScroll('xy', 'ew', -20, {dx: -50}))
.then(checkRanges({xaxis: [-0.1578, 1.8422], yaxis: [0.1052, 2.1052]}, 'scroll x'))
.catch(failTest)
.then(done);
| 0 |
diff --git a/chronos/index.js b/chronos/index.js // @flow
const debug = require('debug')('chronos');
-const createWorker = require('../shared/bull/create-worker');
+const createWorker = require('./jobs/bull/create-worker');
import processDataForDigest from './queues/digests';
import processSingleDigestEmail from './queues/digests/processDigestEmail';
import processDailyCoreMetrics from './queues/coreMetrics';
| 4 |
diff --git a/src/ui.bar.js b/src/ui.bar.js @@ -76,9 +76,10 @@ var _ = Mavo.UI.Bar = $.Class({
}
if (o.action) {
- $.delegate(this.mavo.element, "click", ".mv-" + id, () => {
+ $.delegate(this.mavo.element, "click", ".mv-" + id, evt => {
if (!o.permission || this.permissions.is(o.permission)) {
o.action.call(this.mavo);
+ evt.preventDefault();
}
});
}
| 11 |
diff --git a/test/jasmine/tests/bar_test.js b/test/jasmine/tests/bar_test.js @@ -2600,6 +2600,26 @@ describe('bar hover', function() {
});
});
});
+
+ describe('gantt chart using milliseconds from base', function() {
+ beforeAll(function(done) {
+ gd = createGraphDiv();
+
+ var mock = Lib.extendDeep({}, require('@mocks/bar-with-milliseconds.json'));
+
+ Plotly.newPlot(gd, mock.data, mock.layout)
+ .catch(failTest)
+ .then(done);
+ });
+
+ it('should display the correct bar length passed in milliseconds from base', function() {
+ var out = _hover(gd, 0.5, 0.75, 'y');
+
+ var xEnd = out.style[2];
+ expect(xEnd).not.toBe(1580670000000);
+ expect(xEnd).toBe(1580688000000);
+ });
+ });
});
describe('Text templates on bar traces:', function() {
| 0 |
diff --git a/src/external/lively4-serviceworker/src/cache.js b/src/external/lively4-serviceworker/src/cache.js @@ -170,6 +170,13 @@ export class Cache {
* @return String key
*/
_buildKey(request) {
+ // Ignore params when loading start.html
+ // The file always has the same content, and we want to boot offline whenever possible
+ let requestUrl = new URL(request.url);
+ if(requestUrl.origin == self.location.origin && requestUrl.pathname.endsWith('start.html')) {
+ return `${request.method} ${requestUrl.origin}/${requestUrl.pathname}`;
+ }
+
return `${request.method} ${request.url}`;
}
| 8 |
diff --git a/pages/tutorials/React & Webpack.md b/pages/tutorials/React & Webpack.md @@ -77,7 +77,7 @@ npm install --save-dev typescript awesome-typescript-loader source-map-loader
Both of these dependencies will let TypeScript and webpack play well together.
awesome-typescript-loader helps Webpack compile your TypeScript code using the TypeScript's standard configuration file named `tsconfig.json`.
-source-map-loader uses any sourcemap outputs from TypeScript to inform webpack when generating _its own_ sourcemaps.
+source-map-loader uses any sourcemap outputs from TypeScript to inform webpack when generating *its own* sourcemaps.
This will allow you to debug your final output file as if you were debugging your original TypeScript source code.
Please note that awesome-typescript-loader is not the only loader for typescript.
@@ -104,7 +104,9 @@ Simply create a new file in your project root named `tsconfig.json` and fill it
"target": "es5",
"jsx": "react"
},
- "include": ["./src/**/*"]
+ "include": [
+ "./src/**/*"
+ ]
}
```
@@ -118,37 +120,23 @@ First, create a file named `Hello.tsx` in `src/components` and write the followi
```ts
import * as React from "react";
-export interface HelloProps {
- compiler: string;
- framework: string;
-}
+export interface HelloProps { compiler: string; framework: string; }
-export const Hello = (props: HelloProps) => (
- <h1>
- Hello from {props.compiler} and {props.framework}!
- </h1>
-);
+export const Hello = (props: HelloProps) => <h1>Hello from {props.compiler} and {props.framework}!</h1>;
```
-Note that while this example uses [stateless functional components](https://reactjs.org/docs/components-and-props.html#functional-and-class-components), we could also make our example a little _classier_ as well.
+Note that while this example uses [stateless functional components](https://reactjs.org/docs/components-and-props.html#functional-and-class-components), we could also make our example a little *classier* as well.
```ts
import * as React from "react";
-export interface HelloProps {
- compiler: string;
- framework: string;
-}
+export interface HelloProps { compiler: string; framework: string; }
// 'HelloProps' describes the shape of props.
// State is never set so we use the '{}' type.
export class Hello extends React.Component<HelloProps, {}> {
render() {
- return (
- <h1>
- Hello from {this.props.compiler} and {this.props.framework}!
- </h1>
- );
+ return <h1>Hello from {this.props.compiler} and {this.props.framework}!</h1>;
}
}
```
@@ -168,7 +156,7 @@ ReactDOM.render(
```
We just imported our `Hello` component into `index.tsx`.
-Notice that unlike with `"react"` or `"react-dom"`, we used a _relative path_ to `Hello.tsx` - this is important.
+Notice that unlike with `"react"` or `"react-dom"`, we used a *relative path* to `Hello.tsx` - this is important.
If we hadn't, TypeScript would've instead tried looking in our `node_modules` folder.
We'll also need a page to display our `Hello` component.
@@ -234,7 +222,7 @@ module.exports = {
// This is important because it allows us to avoid bundling all of our
// dependencies, which allows browsers to cache those libraries between builds.
externals: {
- react: "React",
+ "react": "React",
"react-dom": "ReactDOM"
}
};
| 13 |
diff --git a/src/events/http/http-routes/invoke/invokeRoute.js b/src/events/http/http-routes/invoke/invokeRoute.js @@ -28,7 +28,9 @@ export default function invokeRoute(lambda) {
} = request
const _headers = new Headers(headers)
+
const clientContextHeader = _headers.get('x-amz-client-context')
+ const invocationType = _headers.get('x-amz-invocation-type')
// default is undefined
let clientContext
@@ -42,7 +44,12 @@ export default function invokeRoute(lambda) {
// check if payload was set, if not, default event is an empty object
const event = payload.length > 0 ? parse(payload.toString('utf-8')) : {}
- return invokeController.invoke(functionName, event, clientContext)
+ return invokeController.invoke(
+ functionName,
+ invocationType,
+ event,
+ clientContext,
+ )
},
}
}
| 0 |
diff --git a/package.json b/package.json "test:visualapprove": "npm run backstopjs -- approve",
"test:analyze": "npm run build:production -- --env.ANALYZE",
"test:js": "cross-env BABEL_ENV=test NODE_ENV=test jest --config=tests/js/jest.config.js --passWithNoTests",
- "test:jstz": "TZ=America/New_York cross-env BABEL_ENV=test NODE_ENV=test jest --config=tests/js/jest.config.js --passWithNoTests",
"test:js:watch": "npm run test:js -- --watch",
"test:storybook": "npm run test:js -- --testMatch '<rootDir>/.storybook/*.test.js'",
"pretest:e2e": "./bin/local-env/env-check.sh",
| 2 |
diff --git a/src/plugins/XHRUpload.js b/src/plugins/XHRUpload.js @@ -49,6 +49,7 @@ module.exports = class XHRUpload extends Plugin {
locale: defaultLocale,
timeout: 30 * 1000,
limit: 0,
+ withCredentials: false,
/**
* @typedef respObj
* @property {string} responseText
@@ -202,6 +203,8 @@ module.exports = class XHRUpload extends Plugin {
const xhr = new XMLHttpRequest()
const id = cuid()
+ xhr.withCredentials = this.opts.withCredentials
+
xhr.upload.addEventListener('loadstart', (ev) => {
this.uppy.log(`[XHRUpload] ${id} started`)
// Begin checking for timeouts when loading starts.
| 0 |
diff --git a/test/lib/reporter/flat.js b/test/lib/reporter/flat.js @@ -243,6 +243,15 @@ describe('Flat reporter', () => {
assert.include(stdout, 'relative/path-to-test');
});
+ it('should not throw if path to file is not specified on failed hook', () => {
+ test = mkTestStub_({
+ file: null,
+ parent: {}
+ });
+
+ assert.doesNotThrow(() => emit(RunnerEvents.TEST_FAIL, test));
+ });
+
it('should log browser of failed suite', () => {
test = mkTestStub_({
browserId: 'bro1'
| 1 |
diff --git a/docs/redraw.md b/docs/redraw.md @@ -14,7 +14,7 @@ You DON'T need to call it if data is modified within the execution context of an
You DO need to call it in `setTimeout`/`setInterval`/`requestAnimationFrame` callbacks, or callbacks from 3rd party libraries.
-Typically, `m.redraw` triggers an asynchronous redraws, but it may trigger synchronously if Mithril detects it's possible to improves performance by doing so. You should write code assuming that it always redraws asynchronously.
+Typically, `m.redraw` triggers an asynchronous redraws, but it may trigger synchronously if Mithril detects it's possible to improves performance by doing so (i.e. if no redraw was requested within the last animation frame). You should write code assuming that it always redraws asynchronously.
---
| 7 |
diff --git a/README.md b/README.md @@ -47,7 +47,9 @@ GET https://api.spacexdata.com/v1/launches/latest
"payloads": [
{
"payload_id": "Intelsat 35e",
- "customer": "Intelsat",
+ "customers": [
+ "Intelsat"
+ ],
"payload_type": "Satelite",
"payload_mass_kg": 6000.0,
"payload_mass_lbs": 13227.0,
| 3 |
diff --git a/views/services/workers/avatar-worker.js b/views/services/workers/avatar-worker.js @@ -5,10 +5,9 @@ const {
writeJsonSync,
readJsonSync,
accessSync,
- write,
- open,
- close,
+ writeFile,
} = require('fs-extra')
+
let fetchLocks
let APPDATA_PATH
@@ -18,6 +17,34 @@ const getCacheDirPath = () => {
return path
}
+class FileWriter {
+ constructor() {
+ this.writing = false
+ this._queue = []
+ }
+
+ write(path, data, callback) {
+ this._queue.push([path, data, callback])
+ this._continueWriting()
+ }
+
+ async _continueWriting() {
+ if (this.writing)
+ return
+ this.writing = true
+ while (this._queue.length) {
+ const [path, data, callback] = this._queue.shift()
+ const err = await writeFile(path, data)
+ if (callback)
+ callback(err)
+ }
+ this.writing = false
+ }
+
+}
+
+const fw = new FileWriter()
+
const getVersionMap = () => {
try {
return readJsonSync(join(getCacheDirPath(), '..', 'version.json'))
@@ -59,6 +86,13 @@ const mayExtractWithLock = async ({ serverIp, path, mstId }) => {
throw new Error('fetch failed.')
const ab = await fetched.arrayBuffer()
const swfData = await readFromBufferP(new Buffer(ab))
+ const status = {}
+ const reportStatus = type => () => {
+ status[type] = true
+ if (status.normal && status.damaged) {
+ postMessage([ 'Ready', mstId ])
+ }
+ }
await Promise.all(
extractImages(swfData.tags).map(async p => {
const data = await p
@@ -70,15 +104,11 @@ const mayExtractWithLock = async ({ serverIp, path, mstId }) => {
getCacheDirPath()
switch (characterId) {
case 21: {
- const fd = await open(normalPath, 'w+')
- write(fd, imgData)
- await close(fd)
+ fw.write(normalPath, imgData, reportStatus('normal'))
break
}
case 23: {
- const fd = await open(damagedPath, 'w+')
- write(fd, imgData)
- await close(fd)
+ fw.write(damagedPath, imgData, reportStatus('damaged'))
break
}
}
| 4 |
diff --git a/index.mjs b/index.mjs @@ -87,7 +87,7 @@ const _proxyUrl = (req, res, u) => {
next();
}
} else if (o.query['noimport'] !== undefined) {
- const p = path.join(cwd, o.pathname);
+ const p = path.join(cwd, path.resolve(o.pathname));
const rs = fs.createReadStream(p);
rs.on('error', err => {
if (err.code === 'ENOENT') {
| 0 |
diff --git a/app/components/DepositWithdraw/blocktrades/BlockTradesBridgeDepositRequest.jsx b/app/components/DepositWithdraw/blocktrades/BlockTradesBridgeDepositRequest.jsx @@ -1040,8 +1040,21 @@ class BlockTradesBridgeDepositRequest extends React.Component {
})
.then(r => r.json())
.then(body => {
- if (body["access_token"]) {
- oauthBlocktrades.set("access_token", body.access_token);
+ if (body["id_token"]) {
+ var base64Url = body["id_token"].split(".")[1];
+ if (base64Url) {
+ var base64 = base64Url
+ .replace("-", "+")
+ .replace("_", "/");
+ var rawParsed = JSON.parse(window.atob(base64));
+ oauthBlocktrades.set(
+ "access_token",
+ body.access_token
+ );
+ oauthBlocktrades.set(
+ "exp_time",
+ Date.now() + rawParsed["exp"] * 1000
+ );
this.setState({
isUserAuthorized: true,
retrievingDataFromOauthApi: false
@@ -1052,6 +1065,12 @@ class BlockTradesBridgeDepositRequest extends React.Component {
retrievingDataFromOauthApi: false
});
}
+ } else {
+ this.setState({
+ isUserAuthorized: false,
+ retrievingDataFromOauthApi: false
+ });
+ }
})
.catch(() => {
this.setState({
@@ -1060,23 +1079,8 @@ class BlockTradesBridgeDepositRequest extends React.Component {
});
});
} else if (oauthBlocktrades.get("access_token", "") !== "") {
- var data = new URLSearchParams();
- data.append("token", oauthBlocktrades.get("access_token"));
- data.append("scope", "");
-
- const headers = {
- "Content-Type": "application/x-www-form-urlencoded"
- };
-
- fetch("https://devel-4.syncad.com/oauth2/introspect", {
- method: "POST",
- body: data.toString(),
- headers
- })
- .then(r => r.json())
- .then(body => {
- if (body["active"]) {
- if (body.active === true) {
+ const currentTime = Date.now();
+ if (currentTime < oauthBlocktrades.get("exp_time")) {
this.setState({
isUserAuthorized: true,
retrievingDataFromOauthApi: false
@@ -1087,20 +1091,8 @@ class BlockTradesBridgeDepositRequest extends React.Component {
retrievingDataFromOauthApi: false
});
oauthBlocktrades.set("access_token", "");
+ oauthBlocktrades.set("exp_time", "");
}
- } else {
- this.setState({
- isUserAuthorized: false,
- retrievingDataFromOauthApi: false
- });
- }
- })
- .catch(() => {
- this.setState({
- isUserAuthorized: false,
- retrievingDataFromOauthApi: false
- });
- });
} else {
this.setState({
retrievingDataFromOauthApi: false
| 14 |
diff --git a/addon/server.js b/addon/server.js @@ -15,6 +15,7 @@ import _pick from 'lodash/pick';
import _assign from 'lodash/assign';
import _find from 'lodash/find';
import _isPlainObject from 'lodash/isPlainObject';
+import _isInteger from 'lodash/isInteger';
const { RSVP: { Promise } } = Ember;
@@ -342,7 +343,7 @@ export default class Server {
}
buildList(type, amount, ...traitsAndOverrides) {
- assert(Number.isInteger(amount), `second argument has to be an integer, you passed: ${typeof amount}`);
+ assert(_isInteger(amount), `second argument has to be an integer, you passed: ${typeof amount}`);
let list = [];
@@ -393,7 +394,7 @@ export default class Server {
}
createList(type, amount, ...traitsAndOverrides) {
- assert(Number.isInteger(amount), `second argument has to be an integer, you passed: ${typeof amount}`);
+ assert(_isInteger(amount), `second argument has to be an integer, you passed: ${typeof amount}`);
let list = [];
let collectionName = this.schema ? toCollectionName(type) : pluralize(type);
| 14 |
diff --git a/src/server/routes/apiv3/bookmarks.js b/src/server/routes/apiv3/bookmarks.js @@ -98,9 +98,9 @@ module.exports = (crowi) => {
const { pageId } = req.query;
try {
- const isBookmark = await Bookmark.findByPageIdAndUserId(pageId, req.user);
+ const isBookmarked = await Bookmark.findByPageIdAndUserId(pageId, req.user);
const sumOfBookmarks = await Bookmark.countByPageId(pageId);
- return res.apiv3({ isBookmark, sumOfBookmarks });
+ return res.apiv3({ isBookmarked, sumOfBookmarks });
}
catch (err) {
logger.error('get-bookmark-failed', err);
| 10 |
diff --git a/webdriver-ts/src/isKeyed.ts b/webdriver-ts/src/isKeyed.ts @@ -98,7 +98,7 @@ window.nonKeyedDetector_reset();
`;
function isKeyedRun(result: any): boolean {
- return (result.tradded>0 && result.trremoved>0 && result.removedStoredTr>0);
+ return (result.tradded>=1000 && result.trremoved>0 && result.removedStoredTr>0);
}
function isKeyedRemove(result: any): boolean {
return (result.removedStoredTr>0);
| 7 |
diff --git a/README.md b/README.md @@ -54,6 +54,8 @@ For starter apps and templates, see [create-snowpack-app](./packages/create-snow
- [@prefresh/snowpack](https://github.com/JoviDeCroock/prefresh)
- [snowpack-plugin-import-map](https://github.com/zhoukekestar/snowpack-plugin-import-map) A more easy way to map your imports to Pika CDN instead of [import-maps.json](https://github.com/WICG/import-maps).
- [snowpack-plugin-less](https://github.com/fansenze/snowpack-plugin-less) Use the [Less](https://github.com/less/less.js) compiler to build `.less` files from source.
+- [snowpack-plugin-mdx](https://github.com/jaredLunde/snowpack-plugin-mdx) Use the [MDX](https://github.com/mdx-js/mdx/tree/master/packages/mdx) compiler to build `.mdx` and `.md` files from source.
- [snowpack-plugin-sass](https://github.com/fansenze/snowpack-plugin-sass) Use the [node-sass](https://github.com/sass/node-sass) to build `.sass/.scss` files from source.
+- [snowpack-plugin-svgr](https://github.com/jaredLunde/snowpack-plugin-svgr) Use [SVGR](https://github.com/gregberge/svgr) to transform `.svg` files into React components.
- [snowpack-plugin-stylus](https://github.com/fansenze/snowpack-plugin-stylus) Use the [Stylus](https://github.com/stylus/stylus) compiler to build `.styl` files from source.
- PRs that add a link to this list are welcome!
| 0 |
diff --git a/src/agent/index.js b/src/agent/index.js @@ -1174,10 +1174,11 @@ function lookupSymbolJson (args) {
} else {
let [symbolName] = args;
const res = getPtr(symbolName);
+ const moduleName = getModuleAt(res);
if (res) {
return [{
- library: 'objc', // CLASS NAME HERE
- name: symbolName, // METHOD NAME HERE
+ library: mod? mod.name: 'unknown',
+ name: symbolName,
address: res
}];
}
@@ -2299,7 +2300,7 @@ function getPtr (p) {
if (dot === -1) {
dot = p.indexOf(':');
if (dot === -1) {
- throw new Error('r2fridas ObjC class syntax is: objc:CLASSNAME.METHOD');
+ throw new Error('r2frida\'s ObjC class syntax is: objc:CLASSNAME.METHOD');
}
}
const kv0 = p.substring(0, dot);
@@ -3778,6 +3779,16 @@ function performOnJavaVM (fn) {
});
}
+function getModuleAt (addr) {
+ const modules = Process.enumerateModules()
+ .filter((m) => {
+ const a = m.base;
+ const b = m.base.add(m.size);
+ return addr.compare(a) >= 0 && addr.compare(b) < 0;
+ });
+ return modules.length > 0? modules[0]: null;
+}
+
function onStanza (stanza, data) {
const handler = requestHandlers[stanza.type];
if (handler !== undefined) {
| 1 |
diff --git a/js/utilities/bis_parcellation.js b/js/utilities/bis_parcellation.js @@ -92,9 +92,7 @@ const comparerois=function(a,b) {
class BisParcellation {
- constructor(basename='humanmni') {
-
- // console.log('Creating parcellation',basename);
+ constructor(atlasspec = { }) {
this.initialized=false;
this.regions=null;
@@ -107,12 +105,13 @@ class BisParcellation {
this.thickness=20.0;
this.points = [];
- this.basename=basename;
- if (basename==='humanmni')
- this.midlobe=11;
- else
- this.midlobe=17;
- //console.log('Midlobe=',this.midlobe,this.basename);
+ this.atlasspec = {
+ 'midlobe' : atlasspec.midlobe || 11,
+ 'origin' : atlasspec.origin || [ 90, 126, 72 ],
+ };
+
+ // this.midlobe=this.atlasspec['midlobe'];
+
this.maxlobe=-1;
this.midpoint=-1;
this.maxpoint=-1;
@@ -337,7 +336,7 @@ class BisParcellation {
return 0;
}
- //console.log('Midlobe=',this.midlobe);
+ //console.log('Midlobe=',this.atlasspec['midlobe']);
var i;
var numpoints=this.rois.length;
@@ -384,10 +383,10 @@ class BisParcellation {
// This has to do with the number of lobes
//console.log('Lobestats=',this.lobeStats);
- this.midpoint=this.lobeStats[this.midlobe-1][1];
+ this.midpoint=this.lobeStats[this.atlasspec['midlobe']-1][1];
var count=2;
- while (this.midpoint==-1 && (this.midlobe-count)>0) {
- this.midpoint=this.lobeStats[this.midlobe-count][1];
+ while (this.midpoint==-1 && (this.atlasspec['midlobe']-count)>0) {
+ this.midpoint=this.lobeStats[this.atlasspec['midlobe']-count][1];
count++;
}
this.maxpoint=this.lobeStats[this.lobeStats.length-1][1];
@@ -455,15 +454,15 @@ class BisParcellation {
* @returns {string} color
*/
getNonSidedLobeColor(lobe) {
- if (lobe>=this.midlobe)
- lobe=lobe-this.midlobe+1;
+ if (lobe>=this.atlasspec['midlobe'])
+ lobe=lobe-this.atlasspec['midlobe']+1;
var c=util.objectmapcolormap[lobe];
return 'rgb(' + Math.floor(c[0])+ ',' + Math.floor(c[1])+ ',' + Math.floor(c[2])+")";
}
getInverseNonSidedLobeColor(lobe) {
- if (lobe>=this.midlobe)
- lobe=lobe-this.midlobe+1;
+ if (lobe>=this.atlasspec['midlobe'])
+ lobe=lobe-this.atlasspec['midlobe']+1;
if (lobe===1 || lobe===5 || lobe===8 || lobe===10)
return "#ffffff";
return "#000000";
@@ -952,12 +951,7 @@ class BisParcellation {
obj.description=description;
obj.rois=[];
- var MNI = [ 90, 126, 72 ];
- if (this.basename!=='humanmni') {
- MNI=[0,0,0];
- }
-
- console.log("MNI=",MNI);
+ let MNI = this.atlasspec['origin'];
for (i=1;i<=maxvoi;i++) {
if (Nv[i]>0) {
@@ -971,7 +965,7 @@ class BisParcellation {
obj.rois.push(elem);
}
}
- //console.log('Midlobe=',this.midlobe);
+ //console.log('Midlobe=',this.atlasspec['midlobe']);
return JSON.stringify(obj);
}
| 2 |
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/group.js b/packages/node_modules/@node-red/editor-client/src/js/ui/group.js @@ -323,9 +323,6 @@ RED.group = (function() {
groups: [ ],
dirty: RED.nodes.dirty()
}
- RED.history.push(historyEvent);
-
-
groups.forEach(function(g) {
newSelection = newSelection.concat(ungroup(g))
historyEvent.groups.push(g);
| 2 |
diff --git a/src/pages/item/index.css b/src/pages/item/index.css }
.icon-and-link-wrapper img {
- max-height: 200px;
+ max-height: 50px;
}
.icon-and-link-wrapper a {
.information-grid {
display: flex;
+ flex-flow: wrap;
+ justify-content: space-between;
}
.information-grid h1,
}
.text-and-image-information-wrapper {
- margin: 10px;
+ margin-top: 10px;
}
.text-and-image-information-wrapper:first-child {
margin-left: 0;
+ flex-basis: 20%;
}
.text-and-image-information-wrapper img {
align-items: center;
display: flex;
text-align: left;
+ flex-basis: 80%;
}
.text-and-image-information-wrapper.first-trader-price {
- margin-left: auto;
+ /* margin-left: auto; */
}
@media screen and (min-width: 900px) {
- /* .icon-and-link-wrapper {
- position: absolute;
- } */
+ .text-and-image-information-wrapper.price-info-wrapper {
+ flex-basis: auto;
+ flex-grow: 1;
+ }
+
+ .text-and-image-information-wrapper {
+ margin: 10px;
+ }
+
+ .icon-and-link-wrapper img {
+ max-height: 200px;
+ }
}
\ No newline at end of file
| 7 |
diff --git a/brands/shop/fashion_accessories.json b/brands/shop/fashion_accessories.json "shop": "fashion_accessories"
}
},
- "shop/fashion_accessories|Jimmy Choo": {
- "tags": {
- "brand": "Jimmy Choo",
- "brand:wikidata": "Q5213855",
- "brand:wikipedia": "en:Jimmy Choo Ltd",
- "name": "Jimmy Choo",
- "shop": "fashion_accessories"
- }
- },
"shop/fashion_accessories|Radley London": {
"countryCodes": ["gb"],
"tags": {
"short_name": "Radley"
}
},
- "shop/fashion_accessories|Salvatore Ferragamo": {
- "tags": {
- "brand": "Salvatore Ferragamo",
- "brand:wikidata": "Q3946053",
- "brand:wikipedia": "en:Salvatore Ferragamo S.p.A.",
- "name": "Salvatore Ferragamo",
- "shop": "fashion_accessories"
- }
- },
"shop/fashion_accessories|Van Cleef & Arpels": {
"matchNames": ["van cleef & arples"],
"tags": {
| 5 |
diff --git a/Source/Scene/Cesium3DTileset.js b/Source/Scene/Cesium3DTileset.js @@ -1164,13 +1164,6 @@ define([
return diff;
}
- var ancestorA = a._ancestorWithLoadedContent;
- var ancestorB = b._ancestorWithLoadedContent;
-
- if (ancestorA === ancestorB) {
- return diff;
- }
-
var screenSpaceErrorDiff = b._screenSpaceError - a._screenSpaceError;
return screenSpaceErrorDiff === 0 ? diff : screenSpaceErrorDiff;
}
| 3 |
diff --git a/app/models/project.rb b/app/models/project.rb @@ -432,7 +432,7 @@ class Project < ActiveRecord::Base
def event_started?
return nil if start_time.blank?
if prefers_range_by_date?
- start_time.to_date < Date.today
+ start_time.to_date <= Date.today
else
start_time < Time.now
end
| 1 |
diff --git a/packages/simplebar/src/simplebar.js b/packages/simplebar/src/simplebar.js @@ -16,6 +16,7 @@ export default class SimpleBar {
this.sizeAttr = { x: 'offsetWidth', y: 'offsetHeight' };
this.scrollSizeAttr = { x: 'scrollWidth', y: 'scrollHeight' };
this.offsetAttr = { x: 'left', y: 'top' };
+ this.handleSize = { x: 0, y: 0 };
this.globalObserver;
this.mutationObserver;
this.resizeObserver;
@@ -320,22 +321,22 @@ export default class SimpleBar {
let scrollbarRatio = trackSize / contentSize;
// Calculate new height/position of drag handle.
- this.handleSize = Math.max(
+ this.handleSize[axis] = Math.max(
~~(scrollbarRatio * trackSize),
this.options.scrollbarMinSize
);
if (this.options.scrollbarMaxSize) {
- this.handleSize = Math.min(
- this.handleSize,
+ this.handleSize[axis] = Math.min(
+ this.handleSize[axis],
this.options.scrollbarMaxSize
);
}
if (axis === 'x') {
- scrollbar.style.width = `${this.handleSize}px`;
+ scrollbar.style.width = `${this.handleSize[axis]}px`;
} else {
- scrollbar.style.height = `${this.handleSize}px`;
+ scrollbar.style.height = `${this.handleSize[axis]}px`;
}
}
@@ -359,7 +360,7 @@ export default class SimpleBar {
}
let scrollPourcent = scrollOffset / (contentSize - trackSize);
- let handleOffset = ~~((trackSize - this.handleSize) * scrollPourcent);
+ let handleOffset = ~~((trackSize - this.handleSize[axis]) * scrollPourcent);
if (this.isEnabled[axis] || this.options.forceVisible) {
if (axis === 'x') {
| 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.