code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/sparta.go b/sparta.go @@ -273,6 +273,8 @@ type LambdaFunctionOptions struct {
Environment map[string]*gocf.StringExpr
// KMS Key Arn used to encrypt environment variables
KmsKeyArn string
+ // Tags to associate with the Lambda function
+ Tags map[string]string
// Additional params
SpartaOptions *SpartaOptions
}
@@ -805,6 +807,9 @@ func (info *LambdaAWSInfo) export(serviceName string,
if "" != info.Options.KmsKeyArn {
lambdaResource.KmsKeyArn = gocf.String(info.Options.KmsKeyArn)
}
+ if nil != info.Options.Tags {
+ // TODO: Add TAGS
+ }
if nil != info.Options.Environment {
lambdaResource.Environment = &gocf.LambdaFunctionEnvironment{
Variables: info.Options.Environment,
| 0 |
diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js @@ -1738,4 +1738,95 @@ describe('Test axes', function() {
]);
});
});
+
+ describe('autoBin', function() {
+
+ function _autoBin(x, ax, nbins) {
+ ax._categories = [];
+ Axes.setConvert(ax);
+
+ var d = ax.makeCalcdata({ x: x }, 'x');
+
+ return Axes.autoBin(d, ax, nbins, false, 'gregorian');
+ }
+
+ it('should auto bin categories', function() {
+ var out = _autoBin(
+ ['apples', 'oranges', 'bananas'],
+ { type: 'category' }
+ );
+
+ expect(out).toEqual({
+ start: -0.5,
+ end: 2.5,
+ size: 1
+ });
+ });
+
+ it('should not error out for categories on linear axis', function() {
+ var out = _autoBin(
+ ['apples', 'oranges', 'bananas'],
+ { type: 'linear' }
+ );
+
+ expect(out).toEqual({
+ start: undefined,
+ end: undefined,
+ size: 2
+ });
+ });
+
+ it('should not error out for categories on log axis', function() {
+ var out = _autoBin(
+ ['apples', 'oranges', 'bananas'],
+ { type: 'log' }
+ );
+
+ expect(out).toEqual({
+ start: undefined,
+ end: undefined,
+ size: 2
+ });
+ });
+
+ it('should not error out for categories on date axis', function() {
+ var out = _autoBin(
+ ['apples', 'oranges', 'bananas'],
+ { type: 'date' }
+ );
+
+ expect(out).toEqual({
+ start: undefined,
+ end: undefined,
+ size: 2
+ });
+ });
+
+ it('should auto bin linear data', function() {
+ var out = _autoBin(
+ [1, 1, 2, 2, 3, 3, 4, 4],
+ { type: 'linear' }
+ );
+
+ expect(out).toEqual({
+ start: -0.5,
+ end: 4.5,
+ size: 1
+ });
+ });
+
+ it('should auto bin linear data with nbins constraint', function() {
+ var out = _autoBin(
+ [1, 1, 2, 2, 3, 3, 4, 4],
+ { type: 'linear' },
+ 2
+ );
+
+ expect(out).toEqual({
+ start: -0.5,
+ end: 5.5,
+ size: 2
+ });
+ });
+ });
});
| 0 |
diff --git a/README.md b/README.md # GoodDollar DApp
-
[](https://travis-ci.com/GoodDollar/GoodDAPP) [](https://coveralls.io/github/GoodDollar/GoodDAPP?branch=master)
This project is intended to work aside with [GoodServer](https://github.com/GoodDollar/GoodServer) project
| 13 |
diff --git a/lib/context/MeContext.tsx b/lib/context/MeContext.tsx @@ -13,7 +13,7 @@ import { css } from 'glamor'
import { getInitials } from '../../components/Frame/User'
const HAS_ACTIVE_MEMBERSHIP_ATTRIBUTE = 'data-has-active-membership'
-const HAS_ACTIVE_MEMBERSHIP_STORAGE_KEY = 'has-active-membership'
+const HAS_ACTIVE_MEMBERSHIP_STORAGE_KEY = 'me.hasActiveMembership'
const MEMBER_PORTRAIT_ATTRIBUTE = 'data-member-portrait'
const MEMBER_PORTRAIT_STORAGE_KEY = 'me.portraitOrInitials'
| 10 |
diff --git a/packages/app/cypress/e2e/runs.cy.ts b/packages/app/cypress/e2e/runs.cy.ts @@ -344,7 +344,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
})
})
- context('Runs - Unauthorized Project Requested', () => {
+ context('Runs - Pending authorization to project', () => {
beforeEach(() => {
cy.scaffoldProject('component-tests')
cy.openProject('component-tests')
| 10 |
diff --git a/src/core/operations/OpticalCharacterRecognition.mjs b/src/core/operations/OpticalCharacterRecognition.mjs @@ -62,9 +62,9 @@ class OpticalCharacterRecognition extends Operation {
try {
const image = `data:${type};base64,${toBase64(input)}`;
const worker = new TesseractWorker({
- workerPath: `${assetDir}/tesseract/worker.min.js`,
- langPath: `${assetDir}/tesseract/lang-data/`,
- corePath: `${assetDir}/tesseract/tesseract-core.wasm.js`,
+ workerPath: `${assetDir}tesseract/worker.min.js`,
+ langPath: `${assetDir}tesseract/lang-data`,
+ corePath: `${assetDir}tesseract/tesseract-core.wasm.js`,
});
const result = await worker.recognize(image)
.progress(progress => {
| 2 |
diff --git a/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/tenants/template.vue b/admin-base/ui.apps/src/main/content/jcr_root/apps/admin/components/tenants/template.vue {{ item }}
</div>
</div>
+ <div class="tenant-collection">
+ <template v-if="children && children.length > 0">
<div class="col s12 m6 l6 icon-action" v-for="child in children" v-bind:key="child.name">
<div class="card blue-grey darken-3">
<div class="card-content white-text tenant-link" @click="onCardContentClick(child.name)">
</div>
</div>
</div>
-
- <div class="col s12 m6 l6 icon-action">
- <div class="card blue-grey darken-3">
- <div class="card-content white-text tenant-link" @click="onCreateNewSiteClick">
- <span class="card-title">{{`${$i18n('create new site')}`}}</span>
- <p>Click to create your own website</p>
- </div>
- <div class="card-action">
- <admin-components-action
- v-bind:model="{
- target: '/content/admin/pages/pages/createsite',
- command: 'selectPath',
- tooltipTitle: $i18n('create tenant'),
- }">
- <i class="material-icons">note_add</i>
- </admin-components-action>
- </div>
- </div>
+ </template>
+ <template v-else>
+ <div class="no-websites-found">
+ <p>No websites found</p>
+ Start by creating a new one!
</div>
-
- <!-- older variation
- <p>
- <admin-components-action
- v-bind:model="{
- target: '/content/admin/pages/pages/createsite',
- command: 'selectPath',
- tooltipTitle: $i18n('create tenant'),
- }"><button>{{$i18n('create website')}}</button>
- </admin-components-action>
- </p>
- <fieldset class="vue-form-generator" v-if="children.length > 0">
- <div class="form-group required">
- <div class="row">
- <div class="col m12">
- <label>Select Tenant</label>
- <ul class="collection">
- <li class="collection-item" v-for="child in children" v-bind:key="child.name">
- <admin-components-action
- v-bind:model="{
- target: child.name,
- command: 'selectTenant',
- tooltipTitle: `${$i18n('edit')} '${child.title || child.name}'`
- }">{{child.title ? child.title : child.name}}
- </admin-components-action>
-
- <admin-components-action
- v-bind:model="{
- target: { path: '/content', name: child.name },
- command: 'deleteSite',
- tooltipTitle: `${$i18n('delete')} '${child.title || child.name}'`
- }">
- <i class="material-icons">delete</i>
- </admin-components-action>
- </li>
- </ul>
+ </template>
</div>
+ <div class="tenant-actions">
+ <div class="create-tenant action" @click="onCreateNewSiteClick">
+ <i class="material-icons">note_add</i>
+ Create new website
</div>
</div>
- </fieldset> -->
</div>
</template>
uploadProgress: 0,
tab: {
active: 0,
- items: ['Tenants', 'Template Tenants', 'Internal Tenants']
+ items: ['Websites', 'Website Templates', 'Internal Websites']
}
}
},
const tenants = $perAdminApp.getNodeFrom($perAdminApp.getView(), '/admin/tenants')
if(tenants) {
if (this.tab.active === 1) {
- return tenants.filter( (t) => !t.internal)
+ return tenants.filter( (t) => t.template)
} else if (this.tab.active === 2) {
- return tenants.filter( (t) => !t.template );
+ return tenants.filter( (t) => t.internal );
} else {
return tenants.filter( (t) => !t.template && !t.internal)
}
justify-content: space-between;
}
- .tenant-tabs {
+ .tenant-tabs,
+ .tenant-actions{
+ width: 100%;
display: flex;
justify-content: flex-start;
align-items: center;
height: 50px;
background-color: #eeeeee;
+ }
+
+ .tenant-tabs {
border-bottom: 2px solid silver;
}
.tenant-tabs .tab.active {
background-color: rgba(0, 0, 0, .1);
}
+
+ .tenant-actions {
+ border-top: 2px solid silver;
+ display: flex;
+ justify-content: center;
+ }
+
+ .tenant-actions .action {
+ width: 250px;
+ height: 90%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: #ffff;
+ background-color: rgba(55, 71, 79, 1);
+ cursor: pointer;
+ border-radius: 3px;
+ }
+
+ .tenant-actions .action:hover {
+ background-color: rgba(55, 71, 79, .92);
+ }
+
+ .tenant-actions .action i.material-icons {
+ color: #ffab40;
+ margin-right: 10px;
+ }
+
+ .tenant-collection {
+ min-height: 272px;
+ display: flex;
+ flex-wrap: wrap;
+ }
+
+ .tenant-collection .card {
+ min-height: 250px;
+ }
+
+ .tenant-collection .no-websites-found {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ color: #b4b4b4;
+ font-size: 12px;
+ font-weight: 400;
+ }
+
+ .no-websites-found p {
+ font-size: 20px;
+ }
</style>
\ No newline at end of file
| 10 |
diff --git a/src/renderer/layer/tilelayer/TileLayerCanvasRenderer.js b/src/renderer/layer/tilelayer/TileLayerCanvasRenderer.js @@ -162,6 +162,13 @@ class TileLayerCanvasRenderer extends CanvasRenderer {
return true;
}
+ clear() {
+ this._clearCaches();
+ this._tileRended = {};
+ this._tileLoading = {};
+ super.clear();
+ }
+
_isLoadingTile(tileId) {
return !!this._tileLoading[tileId];
}
@@ -345,6 +352,10 @@ class TileLayerCanvasRenderer extends CanvasRenderer {
}
onRemove() {
+ this._clearCaches();
+ }
+
+ _clearCaches() {
delete this._tileRended;
delete this._tileZoom;
delete this._tileLoading;
| 3 |
diff --git a/karma.conf.js b/karma.conf.js @@ -119,6 +119,7 @@ module.exports = (config) => {
username: process.env.BROWSERSTACK_USERNAME,
accessKey: process.env.BROWSERSTACK_ACCESS_KEY,
video: false,
+ console: 'verbose',
},
captureTimeout: 120000,
customLaunchers: customLaunchers,
| 0 |
diff --git a/src/components/appNavigation/TabsView.js b/src/components/appNavigation/TabsView.js @@ -126,7 +126,7 @@ const EmptySpaceComponent = ({ style }) => (
</>
)
-const TabsView = React.memo(({ navigation }) => {
+const TabsView = ({ navigation }) => {
const { slideToggle } = useSideMenu()
const [token, setToken] = useState(isIOS ? undefined : true)
const [marketToken, setMarketToken] = useState(isIOS ? undefined : true)
@@ -216,11 +216,12 @@ const TabsView = React.memo(({ navigation }) => {
</>
)}
{/*{!showSupportFirst && <SupportButton onPress={goToSupport} style={supportButtonStyles} />}*/}
+ {!market && !showInviteFlag && !showRewardsFlag && <EmptySpaceComponent style={styles.iconWidth} />}
<TouchableOpacity onPress={slideToggle} style={styles.iconWidth}>
<Icon name="settings" size={20} color="white" style={styles.marginRight10} testID="burger_button" />
</TouchableOpacity>
</Appbar.Header>
)
-})
+}
export default TabsView
| 0 |
diff --git a/packages/iov-cosmoshub/src/cosmosconnection.spec.ts b/packages/iov-cosmoshub/src/cosmosconnection.spec.ts @@ -19,13 +19,13 @@ import { CosmosConnection } from "./cosmosconnection";
const { fromBase64, toHex } = Encoding;
-function pendingWithoutCosmos(): void {
+function pendingWithoutCosmosHub(): void {
if (!process.env.COSMOSHUB_ENABLED) {
return pending("Set COSMOSHUB_ENABLED to enable Cosmos node-based tests");
}
}
-describe("CosmosConnection", () => {
+describe("CosmosHubConnection", () => {
const atom = "ATOM" as TokenTicker;
const httpUrl = "http://localhost:1317";
const defaultChainId = "cosmos:testing" as ChainId;
@@ -41,8 +41,8 @@ describe("CosmosConnection", () => {
const defaultRecipient = "cosmos1t70qnpr0az8tf7py83m4ue5y89w58lkjmx0yq2" as Address;
describe("establish", () => {
- it("can connect to Cosmos via http", async () => {
- pendingWithoutCosmos();
+ it("can connect to cosmoshub via http", async () => {
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
expect(connection).toBeTruthy();
connection.disconnect();
@@ -51,7 +51,7 @@ describe("CosmosConnection", () => {
describe("chainId", () => {
it("displays the chain ID", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
expect(connection.chainId).toEqual(defaultChainId);
connection.disconnect();
@@ -60,7 +60,7 @@ describe("CosmosConnection", () => {
describe("height", () => {
it("displays the current height", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
const height = await connection.height();
expect(height).toBeGreaterThan(0);
@@ -70,7 +70,7 @@ describe("CosmosConnection", () => {
describe("getToken", () => {
it("displays a given token", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
const token = await connection.getToken("ATOM" as TokenTicker);
expect(token).toEqual({
@@ -82,7 +82,7 @@ describe("CosmosConnection", () => {
});
it("resolves to undefined if the token is not supported", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
const token = await connection.getToken("whatever" as TokenTicker);
expect(token).toBeUndefined();
@@ -92,7 +92,7 @@ describe("CosmosConnection", () => {
describe("getAllTokens", () => {
it("resolves to a list of all supported tokens", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
const tokens = await connection.getAllTokens();
expect(tokens).toEqual([
@@ -108,7 +108,7 @@ describe("CosmosConnection", () => {
describe("getAccount", () => {
it("gets an empty account by address", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
const account = await connection.getAccount({ address: defaultEmptyAddress });
expect(account).toBeUndefined();
@@ -116,7 +116,7 @@ describe("CosmosConnection", () => {
});
it("gets an account by address", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
const account = await connection.getAccount({ address: defaultAddress });
if (account === undefined) {
@@ -130,7 +130,7 @@ describe("CosmosConnection", () => {
});
it("gets an account by pubkey", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
const account = await connection.getAccount({ pubkey: defaultPubkey });
if (account === undefined) {
@@ -149,7 +149,7 @@ describe("CosmosConnection", () => {
describe("integration tests", () => {
it("can post and get a transaction", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
const profile = new UserProfile();
const wallet = profile.addWallet(Secp256k1HdWallet.fromMnemonic(faucetMnemonic));
@@ -208,7 +208,7 @@ describe("CosmosConnection", () => {
});
it("can post and search for a transaction", async () => {
- pendingWithoutCosmos();
+ pendingWithoutCosmosHub();
const connection = await CosmosConnection.establish(httpUrl);
const profile = new UserProfile();
const wallet = profile.addWallet(Secp256k1HdWallet.fromMnemonic(faucetMnemonic));
| 10 |
diff --git a/src/public/assets/script.js b/src/public/assets/script.js -$(window).load(function() {
+document.addEventListener( "DOMContentLoaded", function() {
var theme = document.getElementById("meta-theme");
if (theme) {
theme.style.display = "none";
@@ -122,7 +122,7 @@ $(window).load(function() {
window.close();
})
}
-});
+}, false);
function onHover()
{
| 4 |
diff --git a/kitty-items-js/README.md b/kitty-items-js/README.md @@ -70,6 +70,62 @@ steps:
- When the account is approved, you will receive an e-mail with your newly created Flow account ID. This account ID will
be used as the environment variable for `MINTER_FLOW_ADDRESS`.
+
+### Sample endpoints
+
+For a list of endpoints available on the API, look into the `routes` folder. Here are a few examples to get started:
+
+- **POST /v1/kibbles/mint** - mints Kibbles (fungible token) to the specified Flow Address.
+
+ Payload:
+ ```
+ {
+ "recipient": "0xafad45913fb07dba",
+ "amount": 2.0
+ }
+ ```
+ - Example:
+```
+curl --request POST \
+--url http://localhost:3000/v1/kibbles/mint \
+--header 'Content-Type: application/json' \
+--data '{
+"recipient": "0xafad45913fb07dba",
+"amount": 2.0
+}'
+```
+
+- **POST /v1/kitty-items/mint** : Mints a Kitty Item (NFT) to the `recipient` account.
+
+ - Example:
+
+```
+curl --request POST \
+ --url http://localhost:3000/v1/kitty-items/mint \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "recipient": "0xba1132bc08f82fe2",
+ "typeId": 1
+}'
+```
+
+- **POST /v1/market/sell** : Puts a Kitty Item for sale
+ - Example:
+
+```
+curl --request POST \
+--url http://localhost:3000/v1/market/sell \
+--header 'Content-Type: application/json' \
+--data '{
+"itemId": 5,
+"price": 7.9
+}
+'
+```
+
+
+## Etc
+
### Creating a new database migration:
```shell
| 0 |
diff --git a/assets/js/googlesitekit/modules/datastore/modules.test.js b/assets/js/googlesitekit/modules/datastore/modules.test.js @@ -24,7 +24,6 @@ import {
createTestRegistry,
muteFetch,
provideModules,
- provideUserInfo,
unsubscribeFromAll,
untilResolved,
} from '../../../../../tests/js/utils';
@@ -35,7 +34,6 @@ import {
ERROR_CODE_INSUFFICIENT_MODULE_DEPENDENCIES,
} from './constants';
import FIXTURES, { withActive } from './__fixtures__';
-import { MODULES_ANALYTICS } from '../../../modules/analytics/datastore/constants';
describe( 'core/modules modules', () => {
const dashboardSharingDataBaseVar = '_googlesitekitDashboardSharingData';
@@ -1617,27 +1615,6 @@ describe( 'core/modules modules', () => {
} );
} );
- describe( 'userHasModuleAccess', () => {
- it( 'should not make a network request if logged in user is the module owner', async () => {
- provideModules( registry, [
- {
- slug: 'analytics',
- storeName: MODULES_ANALYTICS,
- },
- ] );
- provideUserInfo( registry ); // Sets current logged in user_id to 1.
- registry
- .dispatch( MODULES_ANALYTICS )
- .receiveGetSettings( { ownerID: 1 } );
- const moduleAccess = registry
- .select( CORE_MODULES )
- .userHasModuleAccess( 'analytics' );
-
- expect( fetchMock ).toHaveFetchedTimes( 0 );
- expect( moduleAccess.hasModuleAccess ).toBe( true );
- } );
- } );
-
describe( 'getRecoverableModules', () => {
it( 'should return undefined if the call to retrieve modules fails', async () => {
fetchMock.getOnce(
| 2 |
diff --git a/js/browser.js b/js/browser.js @@ -968,66 +968,6 @@ var igv = (function (igv) {
return this.config.minimumBases;
};
- igv.Browser.prototype.goto = function (chrName, start, end) {
-
- var genomicState,
- viewportWidth,
- referenceFrame,
- width,
- maxBpPerPixel;
-
- // Translate chr to official name
- if (undefined === this.genome) {
- console.log('Missing genome - bailing ...');
- return;
- }
-
- genomicState = this.genomicStateList[0];
- genomicState.chromosome = this.genome.getChromosome(chrName);
- viewportWidth = igv.browser.viewportContainerWidth() / this.genomicStateList.length;
-
- referenceFrame = genomicState.referenceFrame;
- referenceFrame.chrName = genomicState.chromosome.name;
-
- // If end is undefined, interpret start as the new center, otherwise compute scale.
- if (undefined === end) {
- width = Math.round(viewportWidth * referenceFrame.bpPerPixel / 2);
- start = Math.max(0, start - width);
- } else {
- referenceFrame.bpPerPixel = (end - start) / viewportWidth;
- referenceFrame.end = end; // Remember in case bpPerPixel needs re-computed.
- }
-
- if (!genomicState.chromosome) {
-
- if (console && console.log) {
- console.log("Could not find chromsome " + referenceFrame.chrName);
- }
- } else {
-
- if (!genomicState.chromosome.bpLength) {
- genomicState.chromosome.bpLength = 1;
- }
-
- maxBpPerPixel = genomicState.chromosome.bpLength / viewportWidth;
- if (referenceFrame.bpPerPixel > maxBpPerPixel) {
- referenceFrame.bpPerPixel = maxBpPerPixel;
- }
-
- if (undefined === end) {
- end = start + viewportWidth * referenceFrame.bpPerPixel;
- }
-
- if (genomicState.chromosome && end > genomicState.chromosome.bpLength) {
- start -= (end - genomicState.chromosome.bpLength);
- }
- }
-
- referenceFrame.start = start;
-
- this.updateViews();
-
- };
// Zoom in by a factor of 2, keeping the same center location
igv.Browser.prototype.zoomIn = function () {
@@ -1339,6 +1279,10 @@ var igv = (function (igv) {
};
+ igv.Browser.prototype.goto = function (chrName, start, end) {
+ return this.search(chrName + ":" + start + "-" + end);
+ };
+
igv.Browser.prototype.search = function (string, init) {
var self = this,
@@ -1348,7 +1292,7 @@ var igv = (function (igv) {
loci = string.split(' ');
- return createGenomicStateList.call(this, loci)
+ return createGenomicStateList(loci)
.then(function (genomicStateList) {
@@ -1399,7 +1343,7 @@ var igv = (function (igv) {
*/
function createGenomicStateList(loci) {
- var self = this, searchConfig, geneNameLoci, genomicState, result, unique, promises, ordered, dictionary;
+ var searchConfig, geneNameLoci, genomicState, result, unique, promises, ordered, dictionary;
searchConfig = igv.browser.searchConfig,
ordered = {};
@@ -1420,6 +1364,7 @@ var igv = (function (igv) {
// Try locus string first (e.g. chr1:100-200)
unique.forEach(function (locus) {
genomicState = isLocusChrNameStartEnd(locus, self.genome);
+
if (genomicState) {
genomicState.locusSearchString = locus;
result.push(genomicState);
@@ -1440,13 +1385,19 @@ var igv = (function (igv) {
// Try local feature cache first. This is created from feature tracks tagged "searchable"
promises = [];
geneNameLoci.forEach(function (locus) {
- var feature,
- genomicState;
+ var feature, genomicState, chromosome;
feature = self.featureDB[locus.toLowerCase()];
if (feature) {
- genomicState = processSearchResult(feature, locus);
- if (genomicState) {
+ chromosome = self.genome.getChromosome(feature.chr);
+ if(chromosome) {
+ genomicState = {
+ chromosome: chromosome,
+ start: feature.start,
+ end: feature.end,
+ locusSearchString: locus
+ }
+ igv.Browser.validateLocusExtent(genomicState.chromosome, genomicState);
result.push(genomicState);
dictionary[locus] = genomicState;
}
@@ -1605,12 +1556,7 @@ var igv = (function (igv) {
function isLocusChrNameStartEnd(locus, genome) {
- var a,
- b,
- numeric,
- chr,
- chromosome,
- locusObject;
+ var a, b, numeric, chr, chromosome, locusObject;
locusObject = {};
a = locus.split(':');
@@ -1618,7 +1564,7 @@ var igv = (function (igv) {
chr = a[0];
chromosome = genome.getChromosome(chr); // Map chr to official name from (possible) alias
if (!chromosome) {
- return false; // Unknown chromosome
+ return undefined; // Unknown chromosome
}
locusObject.chromosome = chromosome; // Map chr to offical name from possible alias
locusObject.start = 0;
@@ -1629,17 +1575,17 @@ var igv = (function (igv) {
return locusObject;
} else {
- b = _.last(a).split('-');
+ b = a[1].split('-');
if (b.length > 2) {
- return false; // Not a locus string
+ return undefined; // Not a locus string
} else {
locusObject.start = locusObject.end = undefined;
numeric = b[0].replace(/\,/g, '');
if (isNaN(numeric)) {
- return false;
+ return undefined;
}
locusObject.start = parseInt(numeric, 10) - 1;
| 9 |
diff --git a/packages/gatsby/src/utils/webpack-modify-validate.js b/packages/gatsby/src/utils/webpack-modify-validate.js @@ -14,6 +14,7 @@ const validationWhitelist = Joi.object({
stylus: Joi.any(),
sassLoader: Joi.any(),
sassResources: [Joi.string(), Joi.array().items(Joi.string())],
+ responsiveLoader: Joi.any(),
})
export default (async function ValidateWebpackConfig(config, stage) {
| 11 |
diff --git a/client/components/activities/comments.js b/client/components/activities/comments.js @@ -26,6 +26,8 @@ BlazeComponent.extendComponent({
if (card.isLinkedCard()) {
boardId = Cards.findOne(card.linkedId).boardId;
cardId = card.linkedId;
+ } else if (card.isLinkedBoard()) {
+ boardId = card.linkedId;
}
if (text) {
CardComments.insert({
| 1 |
diff --git a/generators/server/templates/_README.md b/generators/server/templates/_README.md @@ -103,7 +103,7 @@ Service workers are commented by default, to enable them please uncomment the fo
<%_ if (clientFramework !== 'angular1') { _%>
* The copy file option in webpack-common.js
```js
-{ from: './<%= MAIN_SRC_DIR %>sw.js', to: 'sw.js' },
+{ from: './src/main/webapp/sw.js', to: 'sw.js' },
```
<%_ } else { _%>
* The copy file option in gulp/copy.js
| 2 |
diff --git a/src/components/seo.js b/src/components/seo.js * See: https://www.gatsbyjs.org/docs/use-static-query/
*/
-import React from "react"
-import PropTypes from "prop-types"
-import Helmet from "react-helmet"
-import { useStaticQuery, graphql } from "gatsby"
+import React from 'react';
+import PropTypes from 'prop-types';
+import Helmet from 'react-helmet';
+import { useStaticQuery, graphql } from 'gatsby';
function SEO({ description, lang, meta, title }) {
const { site } = useStaticQuery(
@@ -23,66 +23,72 @@ function SEO({ description, lang, meta, title }) {
}
}
`
- )
+ );
- const metaDescription = description || site.siteMetadata.description
+ const metaDescription =
+ description || site.siteMetadata.description;
return (
<Helmet
htmlAttributes={{
- lang,
+ lang
}}
title={title}
titleTemplate={`%s | ${site.siteMetadata.title}`}
meta={[
{
name: `description`,
- content: metaDescription,
+ content: metaDescription
},
{
property: `og:title`,
- content: title,
+ content: title
},
{
property: `og:description`,
- content: metaDescription,
+ content: metaDescription
},
{
property: `og:type`,
- content: `website`,
+ content: `website`
},
{
name: `twitter:card`,
- content: `summary`,
+ content: `summary`
},
{
name: `twitter:creator`,
- content: site.siteMetadata.author,
+ content: site.siteMetadata.author
},
{
name: `twitter:title`,
- content: title,
+ content: title
},
{
name: `twitter:description`,
- content: metaDescription,
+ content: metaDescription
},
+ {
+ name: 'google-site-verification',
+ content:
+ 'VCy1Y8yVFGa1tWbn6pmSaoKp8xohoLZUfcIJWZ8-DS4'
+ }
].concat(meta)}
/>
- )
+ );
}
SEO.defaultProps = {
lang: `en`,
meta: [],
- description: ``,
-}
+ description: ``
+};
SEO.propTypes = {
description: PropTypes.string,
lang: PropTypes.string,
meta: PropTypes.arrayOf(PropTypes.object),
- title: PropTypes.string.isRequired,
-}
+ title: PropTypes.string.isRequired
+};
-export default SEO
+export default SEO;
| 0 |
diff --git a/ghost/admin/tests/acceptance/members-test.js b/ghost/admin/tests/acceptance/members-test.js @@ -119,7 +119,7 @@ describe('Acceptance: Members', function () {
expect(currentURL(), 'new member URL').to.equal('/members/new');
// it displays the new member form
expect(find('.gh-canvas-header h2').textContent, 'settings pane title')
- .to.contain('New member');
+ .to.contain('New');
// all fields start blank
findAll('.gh-member-settings-primary .gh-input').forEach(function (elem) {
| 1 |
diff --git a/core/xml.js b/core/xml.js @@ -882,8 +882,6 @@ Blockly.Xml.domToFieldBoundVariable_ = function(block, xml, text, field) {
if (!workspace) {
throw 'Variable refers to an undefined workspace.';
}
- field.initData();
- return;
if (workspace.isFlyout) {
// Ignore the variable that refers to a flyout workspace, and create a
// new variable.
| 2 |
diff --git a/CHANGELOG.md b/CHANGELOG.md ## [Unreleased](https://github.com/akiran/react-slick/tree/HEAD)
+## 0.19.0
+
+**Release Changes**
+
+Following are the changes to be mentioned:
+
+- fixed slideWidth calculation approximation
+- fixed unusual scrolls in focusOnSelect mode
+- added appendDots method for customization of dots
+- modified logic for handling odd/even cases where there were unusual scrolls in opposite direction
+- implemented unslick feature properly
+- fixed variableWidth issues like blank spaces at edges, improper alignment
+- handling focus loss in case of fade=true
+- responsive lazyloading bug fixed
+- increased verticalswiping resistance from 4 to 10
+
+
+## 0.18.0
+
+**Major Changes:**
+
+- `centerPadding` prop now accepts % value as well
+- Fixed dots count in certain cases, where it was wrong
+- Fixed fade property mess-up on click
+- Fixed invisibility issue when fade & vertical are true
+- Modified logic for updating lazyLoadedList, earlier there were some whitespaces at ends, now they're gone
+- Fixed getTrackLeft issue for slideCount=1
+
+
## 0.17.1
**Major Changes**
| 0 |
diff --git a/test/unit/app/account-import-strategies.spec.js b/test/unit/app/account-import-strategies.spec.js @@ -7,11 +7,35 @@ describe('Account Import Strategies', function () {
const privkey = '0x4cfd3e90fc78b0f86bf7524722150bb8da9c60cd532564d7ff43f5716514f553'
const json = '{"version":3,"id":"dbb54385-0a99-437f-83c0-647de9f244c3","address":"a7f92ce3fba24196cf6f4bd2e1eb3db282ba998c","Crypto":{"ciphertext":"bde13d9ade5c82df80281ca363320ce254a8a3a06535bbf6ffdeaf0726b1312c","cipherparams":{"iv":"fbf93718a57f26051b292f072f2e5b41"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"7ffe00488319dec48e4c49a120ca49c6afbde9272854c64d9541c83fc6acdffe","n":8192,"r":8,"p":1},"mac":"2adfd9c4bc1cdac4c85bddfb31d9e21a684e0e050247a70c5698facf6b7d4681"}}'
- describe('private key import', function () {
+ describe.only('private key import', function () {
it('imports a private key and strips 0x prefix', async function () {
const importPrivKey = await accountImporter.importAccount('Private Key', [ privkey ])
assert.equal(importPrivKey, ethUtil.stripHexPrefix(privkey))
})
+
+ it('throws an error for empty string private key', async () => {
+ assert.throws(async () => {
+ const privKey = await accountImporter.importAccount('Private Key', [ '' ])
+ })
+ })
+
+ it('throws an error for undefined string private key', async () => {
+ assert.throws(async () => {
+ const privKey = await accountImporter.importAccount('Private Key', [ undefined ])
+ })
+ })
+
+ it('throws an error for undefined string private key', async () => {
+ assert.throws(async () => {
+ const privKey = await accountImporter.importAccount('Private Key', [])
+ })
+ })
+
+ it('throws an error for invalid private key', async () => {
+ assert.throws(async () => {
+ const privKey = await accountImporter.importAccount('Private Key', [ 'popcorn' ])
+ })
+ })
})
describe('JSON keystore import', function () {
| 7 |
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -1396,10 +1396,10 @@ final class Analytics extends Module
$dimension_filters_clauses = array();
if ( ! empty( $args['dimension_filters'] ) ) {
$dimension_filters = $args['dimension_filters'];
- $dimension_filters_clause = new Google_Service_AnalyticsReporting_DimensionFilterClause();
- $dimension_filters_clause->setFilters( array( $dimension_filters ) );
- $dimension_filters_clause->setOperator( 'AND' );
- $dimension_filters_clauses[] = $dimension_filters_clause;
+ $dimension_filter_clause = new Google_Service_AnalyticsReporting_DimensionFilterClause();
+ $dimension_filter_clause->setFilters( array( $dimension_filters ) );
+ $dimension_filter_clause->setOperator( 'AND' );
+ $dimension_filters_clauses[] = $dimension_filter_clause;
}
if ( ! empty( $args['dimensions'] ) ) {
| 10 |
diff --git a/src/pages/item/index.css b/src/pages/item/index.css }
.item-page-wrapper h2 {
- margin-top: 70px;
+ margin-top: 40px;
}
.icon-and-link-wrapper {
margin-left: auto;
}
+.text-and-image-information-wrapper {
+ align-items: center;
+ display: flex;
+ gap: 10px;
+}
+
.text-and-image-information-wrapper:first-child {
margin-left: 0;
flex-basis: 0%;
}
.text-and-image-information-wrapper img {
- height: 86px;
- width: 86px;
+ height: 32px;
+ width: 32px;
}
.text-and-image-information-wrapper .warning-icon {
}
.text-and-image-information-wrapper .price-wrapper {
- text-align: center;
width: 100%;
}
color: #c7c5b3;
}
+.best-profit {
+ display: block;
+}
+
+.best-profit img {
+ height: 86px;
+ width: 86px;
+}
+
+.best-profit .price-wrapper {
+ text-align: center;
+}
+
.text-and-image-information-wrapper.price-info-wrapper {
align-items: center;
display: flex;
padding-top: 20px;
}
+ .item-page-wrapper h2 {
+ margin-top: 70px;
+ }
+
+ .text-and-image-information-wrapper {
+ display: block;
+ }
+
.text-and-image-information-wrapper.price-info-wrapper {
flex-basis: auto;
flex-grow: 1;
}
+ .text-and-image-information-wrapper img {
+ height: 86px;
+ width: 86px;
+ }
+
+ .text-and-image-information-wrapper .price-wrapper {
+ text-align: center;
+ }
+
.icon-and-link-wrapper img {
max-height: 200px;
}
| 7 |
diff --git a/test/jasmine/tests/finance_test.js b/test/jasmine/tests/finance_test.js @@ -475,10 +475,10 @@ describe('finance charts calc transforms:', function() {
expect(out[0].hoverinfo).toEqual('x+text+name');
expect(out[0].text[0])
- .toEqual('Open: 33.01<br>High: 34.2<br>Low: 31.7<br>Close: 34.1<br>A');
+ .toEqual('open: 33.01<br>high: 34.2<br>low: 31.7<br>close: 34.1<br>A');
expect(out[0].hoverinfo).toEqual('x+text+name');
expect(out[1].text[0])
- .toEqual('Open: 33.31<br>High: 34.37<br>Low: 30.75<br>Close: 31.93<br>B');
+ .toEqual('open: 33.31<br>high: 34.37<br>low: 30.75<br>close: 31.93<br>B');
expect(out[2].hoverinfo).toEqual('x+text');
expect(out[2].text[0]).toEqual('IMPORTANT');
@@ -488,10 +488,10 @@ describe('finance charts calc transforms:', function() {
expect(out[4].hoverinfo).toEqual('text');
expect(out[4].text[0])
- .toEqual('Open: 33.01<br>High: 34.2<br>Low: 31.7<br>Close: 34.1');
+ .toEqual('open: 33.01<br>high: 34.2<br>low: 31.7<br>close: 34.1');
expect(out[5].hoverinfo).toEqual('text');
expect(out[5].text[0])
- .toEqual('Open: 33.31<br>High: 34.37<br>Low: 30.75<br>Close: 31.93');
+ .toEqual('open: 33.31<br>high: 34.37<br>low: 30.75<br>close: 31.93');
expect(out[6].hoverinfo).toEqual('x');
expect(out[6].text[0]).toEqual('');
| 3 |
diff --git a/core/task-executor/lib/templates/worker.js b/core/task-executor/lib/templates/worker.js @@ -90,6 +90,15 @@ const workerTemplate = {
}
}
},
+ {
+ name: 'ALGORITHM_DISCONNECTED_TIMEOUT_MS',
+ valueFrom: {
+ configMapKeyRef: {
+ name: 'task-executor-configmap',
+ key: 'ALGORITHM_DISCONNECTED_TIMEOUT_MS'
+ }
+ }
+ },
{
name: 'STORAGE_ENCODING',
valueFrom: {
| 0 |
diff --git a/src/Services/Air/AirParser.js b/src/Services/Air/AirParser.js @@ -543,35 +543,35 @@ function extractBookings(obj) {
? []
: Object.keys(booking['air:AirPricingInfo']).map(
(key) => {
- const fareQuote = booking['air:AirPricingInfo'][key];
+ const pricingInfo = booking['air:AirPricingInfo'][key];
- const uapiSegmentRefs = fareQuote['air:BookingInfo'].map(
+ const uapiSegmentRefs = pricingInfo['air:BookingInfo'].map(
segment => segment.SegmentRef
);
- const uapiPassengerRefs = fareQuote[`common_${this.uapi_version}:BookingTravelerRef`];
+ const uapiPassengerRefs = pricingInfo[`common_${this.uapi_version}:BookingTravelerRef`];
- const fareInfo = fareQuote['air:FareInfo'];
+ const fareInfo = pricingInfo['air:FareInfo'];
const baggage = Object.keys(fareInfo).map(
fareLegKey => format.getBaggage(fareInfo[fareLegKey]['air:BaggageAllowance'])
);
- const passengersCount = fareQuote['air:PassengerType']
+ const passengersCount = pricingInfo['air:PassengerType']
.reduce((acc, data) => Object.assign(acc, {
[data.Code]: (acc[data.Code] || 0) + 1,
}), {});
- const taxesInfo = fareQuote['air:TaxInfo']
- ? Object.keys(fareQuote['air:TaxInfo']).map(
+ const taxesInfo = pricingInfo['air:TaxInfo']
+ ? Object.keys(pricingInfo['air:TaxInfo']).map(
taxKey => Object.assign(
{
- value: fareQuote['air:TaxInfo'][taxKey].Amount,
- type: fareQuote['air:TaxInfo'][taxKey].Category,
+ value: pricingInfo['air:TaxInfo'][taxKey].Amount,
+ type: pricingInfo['air:TaxInfo'][taxKey].Category,
},
- fareQuote['air:TaxInfo'][taxKey][`common_${this.uapi_version}:TaxDetail`]
+ pricingInfo['air:TaxInfo'][taxKey][`common_${this.uapi_version}:TaxDetail`]
? {
- details: fareQuote['air:TaxInfo'][taxKey][`common_${this.uapi_version}:TaxDetail`].map(
+ details: pricingInfo['air:TaxInfo'][taxKey][`common_${this.uapi_version}:TaxDetail`].map(
taxDetail => ({
airport: taxDetail.OriginAirport,
value: taxDetail.Amount,
@@ -583,8 +583,8 @@ function extractBookings(obj) {
)
: [];
- const modifierKey = fareQuote['air:TicketingModifiersRef']
- ? Object.keys(fareQuote['air:TicketingModifiersRef'])[0]
+ const modifierKey = pricingInfo['air:TicketingModifiersRef']
+ ? Object.keys(pricingInfo['air:TicketingModifiersRef'])[0]
: null;
const modifiers = modifierKey && ticketingModifiers[modifierKey];
@@ -597,10 +597,10 @@ function extractBookings(obj) {
? modifiers['air:TicketEndorsement'].Value
: null;
- fareQuotesCommon[fareQuote.AirPricingInfoGroup] = Object.assign(
+ fareQuotesCommon[pricingInfo.AirPricingInfoGroup] = Object.assign(
{
uapi_segment_refs: uapiSegmentRefs,
- status: fareQuote.Ticketed
+ status: pricingInfo.Ticketed
? 'Ticketed'
: 'Reserved',
endorsement,
@@ -613,18 +613,18 @@ function extractBookings(obj) {
return {
uapi_pricing_info_ref: key,
uapi_passenger_refs: uapiPassengerRefs,
- uapi_pricing_info_group: fareQuote.AirPricingInfoGroup,
- fareCalculation: fareQuote['air:FareCalc'],
- farePricingMethod: fareQuote.PricingMethod,
- farePricingType: fareQuote.PricingType,
- totalPrice: fareQuote.TotalPrice,
- basePrice: fareQuote.BasePrice,
- equivalentBasePrice: fareQuote.EquivalentBasePrice,
- taxes: fareQuote.Taxes,
+ uapi_pricing_info_group: pricingInfo.AirPricingInfoGroup,
+ fareCalculation: pricingInfo['air:FareCalc'],
+ farePricingMethod: pricingInfo.PricingMethod,
+ farePricingType: pricingInfo.PricingType,
+ totalPrice: pricingInfo.TotalPrice,
+ basePrice: pricingInfo.BasePrice,
+ equivalentBasePrice: pricingInfo.EquivalentBasePrice,
+ taxes: pricingInfo.Taxes,
passengersCount,
taxesInfo,
baggage,
- timeToReprice: fareQuote.LatestTicketingTime,
+ timeToReprice: pricingInfo.LatestTicketingTime,
};
}
);
| 10 |
diff --git a/src/Traits/Attachments.php b/src/Traits/Attachments.php @@ -267,8 +267,11 @@ trait Attachments
}
$attachment->original_filename = $original_filename;
+ // Mimes validation rule
+ $file_rules = (preg_match('/:/', Setting::grab('attachments_mimes')) ? '' : 'mimes:') . Setting::grab('attachments_mimes');
+
// Mimetype
- $validator = Validator::make(['file' => $uploadedFile], ['file' => 'mimes:'.Setting::grab('attachments_mimes')]);
+ $validator = Validator::make(['file' => $uploadedFile], ['file' => $file_rules]);
if ($validator->fails()) {
$a_errors[$attachment_block_name.($block + $index)] = trans('panichd::lang.attachment-update-not-valid-mime', ['file' => $original_filename]);
| 11 |
diff --git a/iris/mutations/communityMember/unblockCommunityMember.js b/iris/mutations/communityMember/unblockCommunityMember.js @@ -57,8 +57,10 @@ export default async (_: any, { input }: Input, { user }: GraphQLContext) => {
return new UserError('This person is not blocked in your community.');
}
- if (!currentUserPermission.isOwner) {
- return new UserError('You must own this community to manage members.');
+ if (!currentUserPermission.isOwner && !currentUserPermission.isModerator) {
+ return new UserError(
+ 'You must own or moderate this community to manage members.'
+ );
}
// all checks passed
| 11 |
diff --git a/plugins/loadbalancing/app/controllers/loadbalancing/loadbalancers_controller.rb b/plugins/loadbalancing/app/controllers/loadbalancing/loadbalancers_controller.rb @@ -123,27 +123,17 @@ module Loadbalancing
end
def attach_floatingip
-
enforce_permissions("loadbalancing:loadbalancer_assign_ip")
-
+ # get loadbalancer
@loadbalancer = services.loadbalancing.find_loadbalancer(params[:id])
vip_port_id = @loadbalancer.vip_port_id
- @floating_ip = Networking::FloatingIp.new(nil, params[:floating_ip])
+ # update floating ip with the new assigned interface ip
+ @floating_ip = services_ng.networking.new_floating_ip(params[:floating_ip])
+ @floating_ip.id = params[:floating_ip][:ip_id]
+ @floating_ip.port_id = vip_port_id
- success = begin
- @floating_ip = services_ng.networking.attach_floatingip(params[:floating_ip][:ip_id], vip_port_id)
- if @floating_ip.port_id
- true
- else
- false
- end
- rescue => e
- @floating_ip.errors.add('message', e.message)
- false
- end
-
- if success
+ if @floating_ip.save
audit_logger.info(current_user, "has attached", @floating_ip, "to loadbalancer", params[:id])
respond_to do |format|
| 1 |
diff --git a/rss/request.js b/rss/request.js @@ -2,7 +2,9 @@ const request = require('request'); // for fetching the feed
const sqlCmds = require('./sql/commands.js')
module.exports = function (link, feedparser, con, callback) {
+ var attempts = 0;
+ (function requestStream() {
const req = request(link, function (error, response) {
if (error || response.statusCode !== 200)
console.log(`RSS Request Error: Problem occured while requesting from "${link}"`);
@@ -10,19 +12,27 @@ module.exports = function (link, feedparser, con, callback) {
req.on('error', function (error) {
console.log('RSS Request Error: ' + error)
- callback()
});
req.on('response', function (res) {
var stream = this;
if (res.statusCode !== 200) {
- this.emit('error', new Error(`Bad status code`));
+ this.emit('error', new Error(`Bad status code, attempting to reconnect, attempt #${attempts+1}`));
+ if (attempts < 10) {
+ attempts++;
+ setTimeout(requestStream,1500);
}
else {
+ console.log(`RSS Request Error: Unable to reconnect. Skipping ${link}.`);
+ callback();
+ }
+ }
+ else {
+ console.log("success");
stream.pipe(feedparser);
}
});
-
+ })()
}
| 9 |
diff --git a/components/tree/__examples__/default.jsx b/components/tree/__examples__/default.jsx @@ -397,7 +397,6 @@ const Example = createReactClass({
getDefaultProps () {
return {
exampleNodesIndex: 'sampleNodesDefault',
- id: 'example-tree',
};
},
@@ -465,6 +464,7 @@ const Example = createReactClass({
<IconSettings iconPath="/assets/icons">
<div>
<Tree
+ id="example-tree"
heading="Miscellaneous Foods"
nodes={this.state.nodes}
onExpandClick={this.handleExpandClick}
| 5 |
diff --git a/react/src/components/dictionary/SprkDictionary.js b/react/src/components/dictionary/SprkDictionary.js @@ -43,20 +43,19 @@ SprkDictionary.defaultProps = {
SprkDictionary.propTypes = {
/**
- * The collection of key-value pairs to be rendered
- * into the component.
+ * The collection of key-value pairs
+ * to render.
*/
keyValuePairs: PropTypes.PropTypes.shape({
'': '',
}).isRequired,
/**
- * Determines the variant of the dictionary component to render.
- * The only available option is `striped`.
- * Supplying no value will cause the base variant to be used.
+ * Determines the style of dictionary component.
+ * Supplying no value will cause the base styles to be used.
*/
- variant: PropTypes.oneOf(['striped', '']),
+ variant: PropTypes.oneOf(['striped']),
/**
- * The value supplied will be assigned
+ * Value assigned
* to the `data-id` attribute on the
* component. This is intended to be
* used as a selector for automated
@@ -67,7 +66,7 @@ SprkDictionary.propTypes = {
/**
* Expects a space separated string
* of classes to be added to the
- * component.
+ * Dictionary Component.
*/
additionalClasses: PropTypes.string,
};
| 7 |
diff --git a/configs/mainnet.json b/configs/mainnet.json "privacyPolicy": "https://wavesplatform.com/files/docs/Privacy%20Policy_SW.pdf",
"nodeList": "https://forum.wavesplatform.com/c/pools",
"scamListUrl": "https://raw.githubusercontent.com/wavesplatform/waves-community/master/Scam%20tokens%20according%20to%20the%20opinion%20of%20Waves%20Community.csv",
- "origin": "https://dex.wavesplatform.com",
+ "origin": "https://client.wavesplatform.com",
"featuresConfigUrl": "https://raw.githubusercontent.com/wavesplatform/waves-client-config/master/config.json",
"feeConfigUrl": "https://raw.githubusercontent.com/wavesplatform/waves-client-config/master/fee.json",
"assets": {
| 12 |
diff --git a/sirepo/package_data/static/js/warpvnd.js b/sirepo/package_data/static/js/warpvnd.js @@ -349,7 +349,7 @@ SIREPO.app.directive('conductorGrid', function(appState, panelState, plotting) {
function alignShapeOnGrid(shape) {
var numX = appState.models.simulationGrid.num_x;
- var n = toMicron(appState.models.simulationGrid.channel_width / (numX + 1));
+ var n = toMicron(appState.models.simulationGrid.channel_width / (numX * 2));
var yCenter = shape.y - shape.height / 2;
shape.y = alignValue(yCenter, n, numX) + shape.height / 2;
// iterate shapes (and anode)
@@ -384,17 +384,9 @@ SIREPO.app.directive('conductorGrid', function(appState, panelState, plotting) {
function alignValue(p, n, numX) {
var pn = fmod(p, n);
- var v;
- if (numX % 2) {
- v = pn < 0
- ? p - pn - n /2
- : p + n / 2 - pn;
- }
- else {
- v = pn < n / 2
+ var v = pn < n / 2
? p - pn
: p + n - pn;
- }
if (Math.abs(v) < 1e-16) {
return 0;
}
@@ -593,9 +585,9 @@ SIREPO.app.directive('conductorGrid', function(appState, panelState, plotting) {
var grid = appState.models.simulationGrid;
var channel = toMicron(grid.channel_width);
- var half_cell_height = channel / (grid.num_x + 1) / 2;
- yAxisGrid.tickValues(plotting.linspace(
- -channel / 2 + half_cell_height, channel / 2 - half_cell_height, grid.num_x + 1));
+ yAxisGrid.tickValues(plotting.linspace(-channel / 2, channel / 2, grid.num_x + 1));
+ // var plate = toMicron(grid.plate_spacing);
+ // xAxisGrid.tickValues(plotting.linspace(0, plate, grid.num_z + 1));
resetZoom();
select('.plot-viewport').call(zoom);
select('.x.axis').call(xAxis);
| 7 |
diff --git a/docs/components.md b/docs/components.md @@ -44,7 +44,7 @@ export default () => (
#### Custom Router
-Out of the box, React Static ships with a very unopinionated configuation of `@reach/router`, but you can also use your own router if you'd like. To do this, you'll need to utilize the [browser plugin API](/docs/plugins/browser-api.md) An example of this can be found in the [react-static-plugin-react-router](/packages/react-static-plugin-react-router) plugin.
+Out of the box, React Static ships with a very unopinionated configuration of `@reach/router`, but you can also use your own router if you'd like. To do this, you'll need to utilize the [browser plugin API](/docs/plugins/browser-api.md). An example of this can be found in the [react-static-plugin-react-router](/packages/react-static-plugin-react-router) plugin.
## `Routes`
@@ -87,7 +87,7 @@ export default () => (
)
```
-**Render Props** - These special props are sent to your rendered component or render function
+**Render Props** - These special props are sent to your rendered component or render function:
- `getComponentForPath(pathname) => Component` - Takes a pathname and returns the component (if it exists) to render that path. Returns `false` if no component is found.
@@ -95,18 +95,19 @@ export default () => (
`RouteData` and its companion HOC `withRouteData` are what provide a component with the results of the currently matched route's `getData` function as defined in your `static.config.js`.
-Props
+**Props**
- `component: ReactComponent`
- `render: Function`
- `children: Function`
-Render Props
+**Render Props**
- Any props that you passed in its corresponding route's `getData` method.
- `is404: boolean` - Will be set to `true` if the page requests results in a 404. This is useful for runtime 404s where the url of the page may remain what the user requested, but the route is not found.
-Here is a an example show all of the different syntaxes you can use:
+#### Examples
+These examples show all of the different syntaxes you can use.
**static.config.js**
@@ -208,7 +209,7 @@ export default withSiteData(({ siteTitle, metaDescription }) => (
- It can be used in multiple places at the same time.
- For more information, see the [React-Helmet library](https://github.com/nfl/react-helmet) that React Static uses to accomplish this.
-Example:
+#### Example
```javascript
import { Head } from 'react-static'
@@ -230,19 +231,19 @@ export () => (
Prefetch is a react component that can prefetch the assets for a given route when visibly rendered in the viewport. When its content or element are visible in the viewport, the template and data required to render the path in the `path` prop will be prefetched. This increases the chance that if the user then navigates to that route, they will not have to wait for the required data to load. You can also force the prefetch to happen even if the element is outside the viewport via the `force` prop.
-Props:
+**Props**
- `path: String` **Required** - The path you want to prefetch.
- `force: Boolean` - Force the prefetch even if the element is not visible in the viewport
-Notes:
+**Notes**
- If the path doesn't match a valid static route, nothing will happen.
- If the route has already been loaded in the session, nothing will happen.
- If multiple instances of the same `path` are prefetched at the same time, only a single request will be made for all instances.
- If abused, this component could result in fetching a lot of unused data. Be smart about what you prefetch.
-Example:
+#### Example
```javascript
import { Prefetch } from 'react-static'
| 7 |
diff --git a/tests/phpunit/includes/Modules/SettingsTestCase.php b/tests/phpunit/includes/Modules/SettingsTestCase.php @@ -20,12 +20,15 @@ abstract class SettingsTestCase extends TestCase {
abstract protected function get_option_name();
public function setUp() {
+ global $new_whitelist_options;
parent::setUp();
$option_name = $this->get_option_name();
// Unregister setup that occurred during bootstrap.
+ if ( array_key_exists( $option_name, $new_whitelist_options ) ) {
unregister_setting( $option_name, $option_name );
+ }
remove_all_filters( "option_$option_name" );
remove_all_filters( "site_option_$option_name" );
| 1 |
diff --git a/docs/layout/navbar.html b/docs/layout/navbar.html @@ -21,12 +21,12 @@ prev: "layout-jumbotron"
</div>
</pre>
<div class="siimple-paragraph">
- A <code class="siimple-code">navbar</code> can contain two groups: one on the right and one on the left. This is great to separate the title of your app from the navigation links. You can create the right group inside your <strong>navbar</strong> by adding a <code class="siimple-code">div</code> with the class <code class="siimple-code">siimple--right</code> (see float helpers section). Let's add two navbar items to the right side of the navbar using the class <code class="siimple-code">siimple-navbar-item</code> and see how it looks:
+ A <code class="siimple-code">navbar</code> can contain two groups: one on the right and one on the left. This is great to separate the title of your app from the navigation links. You can create the right group inside your <strong>navbar</strong> by adding a <code class="siimple-code">div</code> with the class <code class="siimple-code">siimple--float-right</code> (see float helpers section). Let's add two navbar items to the right side of the navbar using the class <code class="siimple-code">siimple-navbar-item</code> and see how it looks:
</div>
<div class="sd-snippet-demo">
<div class="siimple-navbar">
<a class="siimple-navbar-title">Title</a>
- <div class="siimple--right">
+ <div class="siimple--float-right">
<a class="siimple-navbar-item">Link 1</a>
<a class="siimple-navbar-item">Link 2</a>
</div>
@@ -35,7 +35,7 @@ prev: "layout-jumbotron"
<pre class="sd-snippet-code">
<div class="siimple-navbar">
<a class="siimple-navbar-title">Title</a>
- <div class="siimple--right">
+ <div class="siimple--float-right">
<a class="siimple-navbar-item">Link 1</a>
<a class="siimple-navbar-item">Link 2</a>
</div>
@@ -57,7 +57,7 @@ prev: "layout-jumbotron"
<div class="siimple-navbar">
<a class="siimple-navbar-title">Title</a>
<div class="siimple-navbar-subtitle">Subtitle</div>
- <div class="siimple--right">
+ <div class="siimple--float-right">
<a class="siimple-navbar-item">Link 1</a>
<a class="siimple-navbar-item">Link 2</a>
</div>
@@ -67,7 +67,7 @@ prev: "layout-jumbotron"
<div class="siimple-navbar">
<a class="siimple-navbar-title">Title</a>
<div class="siimple-navbar-subtitle">Subtitle</div>
- <div class="siimple--right">
+ <div class="siimple--float-right">
<a class="siimple-navbar-item">Link 1</a>
<a class="siimple-navbar-item">Link 2</a>
</div>
@@ -82,7 +82,7 @@ prev: "layout-jumbotron"
<div class="siimple-navbar siimple-navbar--fluid">
<a class="siimple-navbar-title">Title</a>
<a class="siimple-navbar-subtitle">Subtitle</a>
- <div class="siimple--right">
+ <div class="siimple--float-right">
<a class="siimple-navbar-item">Item</a>
</div>
</div>
@@ -91,7 +91,7 @@ prev: "layout-jumbotron"
<div class="siimple-navbar siimple-navbar--fluid">
<a class="siimple-navbar-title">Title</a>
<a class="siimple-navbar-subtitle">Subtitle</a>
- <div class="siimple--right">
+ <div class="siimple--float-right">
<a class="siimple-navbar-item">Item</a>
</div>
</div>
@@ -106,7 +106,7 @@ prev: "layout-jumbotron"
<div class="siimple-navbar siimple-navbar--primary siimple-navbar--fluid">
<a class="siimple-navbar-title">Title</a>
<a class="siimple-navbar-subtitle">Subtitle</a>
- <div class="siimple--right">
+ <div class="siimple--float-right">
<a class="siimple-navbar-item">Item</a>
</div>
</div>
@@ -115,7 +115,7 @@ prev: "layout-jumbotron"
<div class="siimple-navbar siimple-navbar--primary siimple-navbar--fluid">
<a class="siimple-navbar-title">Title</a>
<a class="siimple-navbar-subtitle">Subtitle</a>
- <div class="siimple--right">
+ <div class="siimple--float-right">
<a class="siimple-navbar-item">Item</a>
</div>
</div>
| 1 |
diff --git a/src/apps.json b/src/apps.json "AngularDart",
"AngularJS"
],
+ "js": {
+ "ng.probe": "",
+ "ng.coreTokens": ""
+ },
"html": "<[^>]+ ng-version=\"([\\d.]+)\"\\;version:\\1",
"icon": "Angular.svg",
"website": "https://angular.io"
| 7 |
diff --git a/packages/neutrine/src/core/btn/index.js b/packages/neutrine/src/core/btn/index.js @@ -43,6 +43,8 @@ Btn.defaultProps = {
//Button groups
export const BtnGroup = function (props) {
- return helpers.createMergedElement("div", props, "siimple-btn-group");
+ return helpers.createMergedElement("div", props, {
+ "className": "siimple-btn-group"
+ });
};
| 1 |
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml @@ -67,6 +67,7 @@ jobs:
working-directory: rule-server/dist
- run: npm install
+ postinstall: sed -i " "s/[\"|']use strict[\"|']/;/g" exceljs.js
working-directory: accessibility-checker-engine
- run: npm install
working-directory: accessibility-checker
| 3 |
diff --git a/esm/place.js b/esm/place.js @@ -15,11 +15,13 @@ export class Place {
this.visible = false;
this.view = null;
this._placeholder = this.el;
+
if (View instanceof Node) {
this._el = View;
} else {
this._View = View;
}
+
this._initData = initData;
}
update (visible, data) {
@@ -31,8 +33,10 @@ export class Place {
if (this._el) {
mount(parentNode, this._el, placeholder);
unmount(parentNode, placeholder);
+
this.el = this._el;
this.visible = visible;
+
return;
}
const View = this._View;
@@ -50,8 +54,10 @@ export class Place {
if (this._el) {
mount(parentNode, placeholder, this._el);
unmount(parentNode, this._el);
+
this.el = placeholder;
this.visible = visible;
+
return;
}
mount(parentNode, placeholder, this.view);
| 0 |
diff --git a/src/components/app/App.jsx b/src/components/app/App.jsx import React, { useState, useEffect, useRef, createContext } from 'react';
-import { defaultAvatarUrl } from '../../../constants';
+import { defaultAvatarUrl, defaultPlayerSpec } from '../../../constants';
import game from '../../../game';
import sceneNames from '../../../scenes/scenes.json';
@@ -47,7 +47,8 @@ const _startApp = async ( weba, canvas ) => {
await weba.startLoop();
const localPlayer = metaversefileApi.useLocalPlayer();
- await localPlayer.setAvatarUrl( defaultAvatarUrl );
+ await localPlayer.setPlayerSpec(defaultAvatarUrl, defaultPlayerSpec);
+ // await localPlayer.setAvatarUrl( defaultAvatarUrl );
};
| 4 |
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml @@ -23,8 +23,8 @@ jobs:
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
- java-version: '8'
- distribution: 'temurin'
+ java-version: 8
+ distribution: adopt
cache: maven
- name: Build & Install
run: mvn --batch-mode -DskipITs package install
| 4 |
diff --git a/components/core/marketing/Issue.js b/components/core/marketing/Issue.js @@ -77,7 +77,7 @@ export default class Issue extends React.Component {
target="_blank"
>
<div css={STYLES_ISSUE_CARD_TEXT}>
- <div css={STYLES_ISSUE_CARD_TITLE}>{this.props / title}</div>
+ <div css={STYLES_ISSUE_CARD_TITLE}>{this.props.title}</div>
<div css={STYLES_ISSUE_CARD_EXPLAINER}>
<div>View Issue</div>
<div>-></div>
| 2 |
diff --git a/package.json b/package.json "typecheck": "lerna exec --scope @semcore/* -- tsc --noEmit",
"prebuild": "rm -rf semcore/**/lib && find semcore/icon/. -type d -maxdepth 1 | egrep -v \"__tests__|src|svg|svg-new\" | xargs rm -rf || true",
"test": "jest --projects semcore/* --no-cache",
- "playground": "yarn workspace playground start",
+ "playground": "yarn workspace @semcore/playground start",
"analyze": "yarn workspace analyzer start",
"pub": "super-publisher --root ./semcore",
"lint:dts": "tsc --project tsconfig.dts.json",
| 1 |
diff --git a/src/js/easymde.js b/src/js/easymde.js @@ -791,7 +791,10 @@ function toggleSideBySide(editor) {
}
var sideBySideRenderingFunction = function () {
- preview.innerHTML = editor.options.previewRender(editor.value(), preview);
+ var newValue = editor.options.previewRender(editor.value(), preview);
+ if (newValue != null) {
+ preview.innerHTML = newValue;
+ }
};
if (!cm.sideBySideRenderingFunction) {
@@ -799,7 +802,10 @@ function toggleSideBySide(editor) {
}
if (useSideBySideListener) {
- preview.innerHTML = editor.options.previewRender(editor.value(), preview);
+ var newValue = editor.options.previewRender(editor.value(), preview);
+ if (newValue != null) {
+ preview.innerHTML = newValue;
+ }
cm.on('update', cm.sideBySideRenderingFunction);
} else {
cm.off('update', cm.sideBySideRenderingFunction);
| 11 |
diff --git a/react/.storybook/config.js b/react/.storybook/config.js import React from 'react';
import { configure, addDecorator, addParameters } from '@storybook/react';
import { action } from "@storybook/addon-actions"
-import '@sparkdesignsystem/spark/_spark.scss';
+import '../../spark/manifests/spark/_spark.scss';
import { withA11y } from '@storybook/addon-a11y';
import { withInfo } from '@storybook/addon-info';
import { themes } from '@storybook/theming';
| 3 |
diff --git a/src/createAuthScheme.js b/src/createAuthScheme.js @@ -78,7 +78,23 @@ module.exports = function createAuthScheme(authFun, authorizerOptions, funName,
authorizationToken: authorization,
};
}
- event.methodArn = `arn:aws:execute-api:${options.region}:random-account-id:random-api-id/${options.stage}/${request.method.toUpperCase()}${request.path.replace(new RegExp(`^/${options.stage}`), '')}`;
+
+ const httpMethod = request.method.toUpperCase();
+ const apiId = 'random-api-id';
+ const accountId = 'random-account-id';
+ const resourcePath = request.path.replace(new RegExp(`^/${options.stage}`), '');
+
+ event.methodArn = `arn:aws:execute-api:${options.region}:${accountId}:${apiId}/${options.stage}/${httpMethod}${resourcePath}`;
+
+ event.requestContext = {
+ accountId,
+ resourceId: 'random-resource-id',
+ stage: options.stage,
+ requestId: 'random-request-id',
+ resourcePath,
+ httpMethod,
+ apiId
+ };
// Create the Authorization function handler
try {
| 0 |
diff --git a/src/Navigation.js b/src/Navigation.js @@ -300,8 +300,6 @@ const TabNav = createBottomTabNavigator(
{
tabBarComponent: NavigationTabBar,
tabBarPosition: "bottom",
- swipeEnabled: false,
- animationEnabled: false,
initialRouteName: HOME,
cardStyle: {
backgroundColor: "blue"
| 2 |
diff --git a/src/components/Modeler.vue b/src/components/Modeler.vue import Vue from 'vue';
import BpmnModdle from "bpmn-moddle";
import controls from "./controls";
-import throttle from 'lodash/throttle';
// Our renderer for our inspector
import { Drag, Drop } from 'vue-drag-drop';
@@ -383,7 +382,6 @@ export default {
},
created() {
this.moddle = new BpmnModdle(this.extensions);
- this.validateDropTarget = throttle(this.validateDropTarget, 100, { leading: true });
},
mounted() {
// Handle window resize
| 1 |
diff --git a/src/platform/web/ui/avatar.js b/src/platform/web/ui/avatar.js @@ -44,6 +44,11 @@ export class AvatarView extends BaseUpdateView {
return false;
}
+ setAvatarError() {
+ this._avatarError = true;
+ this.update(this.value);
+ }
+
_avatarTitleChanged() {
if (this.value.avatarTitle !== this._avatarTitle) {
this._avatarTitle = this.value.avatarTitle;
@@ -65,6 +70,8 @@ export class AvatarView extends BaseUpdateView {
this._avatarLetterChanged();
this._avatarTitleChanged();
this._root = renderStaticAvatar(this.value, this._size);
+ const image = this._root.firstChild;
+ image?.addEventListener("error", () => this.setAvatarError());
// takes care of update being called when needed
super.mount(options);
return this._root;
@@ -76,10 +83,10 @@ export class AvatarView extends BaseUpdateView {
update(vm) {
// important to always call _...changed for every prop
- if (this._avatarUrlChanged()) {
+ if (this._avatarUrlChanged() || this._avatarError) {
// avatarColorNumber won't change, it's based on room/user id
const bgColorClass = `usercolor${vm.avatarColorNumber}`;
- if (vm.avatarUrl(this._size)) {
+ if (vm.avatarUrl(this._size) && !this._avatarError) {
this._root.replaceChild(renderImg(vm, this._size), this._root.firstChild);
this._root.classList.remove(bgColorClass);
} else {
@@ -87,7 +94,7 @@ export class AvatarView extends BaseUpdateView {
this._root.classList.add(bgColorClass);
}
}
- const hasAvatar = !!vm.avatarUrl(this._size);
+ const hasAvatar = !!(vm.avatarUrl(this._size) && !vm._avatarError);
if (this._avatarTitleChanged() && hasAvatar) {
const img = this._root.firstChild;
img.setAttribute("title", vm.avatarTitle);
@@ -95,6 +102,7 @@ export class AvatarView extends BaseUpdateView {
if (this._avatarLetterChanged() && !hasAvatar) {
this._root.firstChild.textContent = vm.avatarLetter;
}
+ if (this._avatarError) { this._avatarError = false;}
}
}
@@ -104,7 +112,7 @@ export class AvatarView extends BaseUpdateView {
* @return {Element}
*/
export function renderStaticAvatar(vm, size, extraClasses = undefined) {
- const hasAvatar = !!vm.avatarUrl(size);
+ const hasAvatar = !!(vm.avatarUrl(size) && !vm.avatarError);
let avatarClasses = classNames({
avatar: true,
[`size-${size}`]: true,
| 9 |
diff --git a/articles/tutorials/using-auth0-with-multi-tenant-apps.md b/articles/tutorials/using-auth0-with-multi-tenant-apps.md @@ -10,112 +10,7 @@ Multi-tenancy refers to the software architecture principle where a single insta
By using a single Auth0 account for all of your applications, you maintain simplicity in your architecture and are able to manage all of your authentication flows in one place. Only if you need to share access to the Management Dashboard with individual applications would you need to create multiple Auth0 accounts (see this [GitHub repo](https://github.com/auth0/auth0-multitenant-spa-api-sample) for a sample application using this architecture scheme).
-In Auth0, there are many ways you can handle multi-tenancy. While this article will cover several of the options available, it is by no means comprehensive. For additional assistance on how you can customize Auth0, please contact [Sales](https://auth0.com/?contact=true).
-
-## Use App Metadata
-
-For many users, we find that creating a single [Connection](/identityproviders) is sufficient. You can then control user access to one or more [Clients](/clients) by assigning the appropriate `metadata` value(s) to the user.
-
-[Metadata](/metadata) in Auth0's user profile is a generic way of associating information to any authenticated user. **Permissions**, **Groups**, and **Roles** are all special cases of these attributes.
-
-### Sample Implementations Using Metadata
-
-The following examples describe architecture scenarios, followed by one possible implementation using Auth0's metadata fields.
-
-#### Example 1
-
-You have an app that allows a user to join one or more team(s). Each team is a tenant, and users can switch between teams using the app. Within that team, each user has differing levels of access.
-
-##### Auth0 User Profile
-
-Here's a sample user profile that captures the requirements described above.
-
-```json
-{
- "email": "[email protected]",
- "app_metadata": {
- "permissions": {
- "team-1": {
- "role": "admin",
- "channels": ["*"]
- },
- "team-2": {
- "role": "employee",
- "channels": [ "channel-1", "channel-2" ]
- }
- }
- }
-}
-```
-
-#### Example 2
-
-Your app asks the user to provide their email.
-
-**If the email domain matches one associated with a previously-registered organization**, the app hides the password box and displays a message indicating that they can use Single Sign On. When the use clicks **Continue**, they're redirected to the appropriate identity provider.
-
-**If the email domain does not match an organization that allows Single Sign On**, the user must enter their password before clicking **Continue**.
-
-Once authenticated, the user has access to files that they own, as well as any that were shared with them. Account-wise, the user has access to their personal account and the accounts of any organizations to which they belong.
-
-::: note
-Storing explicit details regarding a user's permissions levels in the `user_profile` may be unwieldy due to its large size. As such, you might consider doing this at the `company` level, rather than at the `user` level.
-:::
-
-##### Auth0 User Profile
-
-Here's a sample user profile that captures the requirements described above.
-
-```json
-{
- "email": "[email protected]",
- "app_metadata": {
- "permissions": {
- "personal": {
- "role": "full",
- },
- "company1": {
- "role": "user",
- },
- "company2": {
- "role": "admin",
- }
- }
- }
-}
-```
-
-#### Example 3
-
-The overall architecture includes the following features:
-
-* A single [Auth0 Dashboard](${manage_url}) that manages all apps;
-* Support for the following Social providers: Google, GitHub, and Microsoft Live;
-* Support for Username/Password Authentication;
-* Support for Enterprise connections;
-* Home realm discovery using email domains.
-
-Because a user can have access to multiple apps, each with its own permissions level (for example, the user can be an admin for App A, but just a regular user on App B), we show this by assigning a `user_id` property to an **account-level** entity (for administrative permissions) or an **app-level** entity (for user-level permissions).
-
-##### Auth0 User Profile
-
-```json
-{
- "email": "[email protected]",
- "app_metadata": {
- "permissions": {
- "company1": {
- "role": "full",
- "clients": [ "*" ]
- },
- "company2": {
- "role": "app-owner",
- "clients": [ "iae..." ]
- }
- }
- }
-}
-```
+One way to handle multi-tenancy is with multiple connections. For additional assistance on how you can customize Auth0, please contact [Sales](https://auth0.com/?contact=true).
## Use Multiple Connections
| 2 |
diff --git a/scripts/configureApplication.js b/scripts/configureApplication.js @@ -13,6 +13,7 @@ const vault = {
AUTH_IOS_GOOGLE_CLIENTID: 'null',
AUTH_KIWI_BACKEND: 'null',
SENTRY_DSN: 'null',
+ API_KEY_GOOGLE_MAPS: 'null',
};
const envTemplate = `
@@ -44,6 +45,8 @@ AUTH_KIWI_BACKEND=${vault.AUTH_KIWI_BACKEND}
# accordingly and fix all production issues.
#
SENTRY_DSN=${vault.SENTRY_DSN}
+
+API_KEY_GOOGLE_MAPS=${vault.API_KEY_GOOGLE_MAPS}
`;
log('Setting up ENV variables...');
| 0 |
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -10810,6 +10810,9 @@ function rankcal() {
var input = document.getElementById("rankcal-input").value;
let result = document.getElementById("rankcal-result");
+ if(input == ""){
+ result.innerHTML = "Enter a word to get its rank in dictionary";
+ }
input = input.toUpperCase();
var s = input.length;
var m = fa(s);
@@ -10827,7 +10830,6 @@ function rankcal() {
}
else
result.innerHTML = "Invalid input use alphabet only";
-
}
| 1 |
diff --git a/src/screens/ParadeMapScreen/StageMarkers.js b/src/screens/ParadeMapScreen/StageMarkers.js // @flow
import React, { Fragment } from "react";
+import { StyleSheet } from "react-native";
import { Marker } from "react-native-maps";
import { uniqWith, eqBy } from "ramda";
import type { Event } from "../../data/event";
@@ -30,7 +31,6 @@ const StageMarkers = ({
<Fragment>
{uniqueStages.map(stage => (
<Marker
- zIndex={1}
coordinate={{
longitude: stage.fields.location.lon,
latitude: stage.fields.location.lat
@@ -42,10 +42,26 @@ const StageMarkers = ({
activeMarker === stage.id ? stageIconActive : stageIconInactive
}
onSelect={markerSelect}
+ style={
+ activeMarker === stage.id
+ ? styles.stageMarkerActiveStyle
+ : styles.stageMarkerInactiveStyle
+ }
/>
))}
</Fragment>
);
};
+const styles = StyleSheet.create({
+ stageMarkerInactiveStyle: {
+ zIndex: 1
+ },
+ stageMarkerActiveStyle: {
+ // React Native Maps adds a constant to the currently open callout, but if the stage marker is active we want to move it above this
+ // https://github.com/react-community/react-native-maps/blob/080678b24f886c3b8104206f2f80452ee723243a/lib/ios/AirMaps/AIRMapMarker.m#L316
+ zIndex: 1001
+ }
+});
+
export default StageMarkers;
| 0 |
diff --git a/blocks/init/src/Blocks/manifest.json b/blocks/init/src/Blocks/manifest.json "background": "#FBF9FF",
"foreground": "#9973E3",
"config": {
- "outputCssVariablesGlobally": true,
- "outputCssVariablesGloballyOptimize": true,
+ "outputCssVariablesGlobally": false,
+ "outputCssVariablesGloballyOptimize": false,
"outputCssVariablesSelectorName": "esCssVariables"
},
"globalVariables": {
| 12 |
diff --git a/token-metadata/0xaD5Fe5B0B8eC8fF4565204990E4405B2Da117d8e/metadata.json b/token-metadata/0xaD5Fe5B0B8eC8fF4565204990E4405B2Da117d8e/metadata.json "symbol": "TRXC",
"address": "0xaD5Fe5B0B8eC8fF4565204990E4405B2Da117d8e",
"decimals": 0,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/server/game/cardaction.js b/server/game/cardaction.js @@ -83,7 +83,7 @@ class CardAction extends BaseAbility {
}
allowMenu() {
- return this.card.type === 'character';
+ return this.card.type === 'character' || this.card.type === 'attachment';
}
createContext(player, arg) {
| 11 |
diff --git a/appjs/logicjavascript.js b/appjs/logicjavascript.js @@ -2664,9 +2664,9 @@ function orderas() {
var len = parseInt(val.length);
for (i = 0; i <= len - 1; i++) {
for (j = 0; j <= len - 1 - i; j++) {
- if (parseInt(val[j]) > parseInt(val[j + 1])) {
- temp = parseInt(val[j]);
- val[j] = parseInt(val[j + 1]);
+ if (parseFloat(val[j]) > parseFloat(val[j + 1])) {
+ temp = parseFloat(val[j]);
+ val[j] = parseFloat(val[j + 1]);
val[j + 1] = temp;
}
}
@@ -2695,9 +2695,9 @@ function orderde() {
var len = parseInt(val.length);
for (i = 0; i <= len - 1; i++) {
for (j = 0; j <= len - 1 - i; j++) {
- if (parseInt(val[j]) < parseInt(val[j + 1])) {
- temp = parseInt(val[j]);
- val[j] = parseInt(val[j + 1]);
+ if (parseFloat(val[j]) < parseFloat(val[j + 1])) {
+ temp = parseFloat(val[j]);
+ val[j] = parseFloat(val[j + 1]);
val[j + 1] = temp;
}
}
| 1 |
diff --git a/src/encoded/types/antibody_lot.py b/src/encoded/types/antibody_lot.py @@ -129,7 +129,6 @@ class AntibodyLot(SharedItem):
"default": "awaiting characterization",
"enum": [
"awaiting characterization",
- "pending dcc review",
"characterized to standards",
"characterized to standards with exemption",
"not characterized to standards",
@@ -218,16 +217,16 @@ def lot_reviews(characterizations, targets, request):
# Go through the secondary characterizations first
status_ranking = {
- 'characterized to standards': 9,
- 'characterized to standards with exemption': 8,
- 'compliant': 7,
- 'exempt from standards': 6,
- 'pending dcc review': 5,
- 'partially characterized': 4,
- 'awaiting characterization': 3,
- 'not characterized to standards': 2,
- 'not pursued': 1,
- 'not compliant': 0,
+ 'characterized to standards': 10,
+ 'characterized to standards with exemption': 9,
+ 'compliant': 8,
+ 'exempt from standards': 7,
+ 'pending dcc review': 6,
+ 'partially characterized': 5,
+ 'awaiting characterization': 4,
+ 'not characterized to standards': 3,
+ 'not pursued': 2,
+ 'not compliant': 1,
'not reviewed': 0,
'not submitted for review by lab': 0,
'deleted': 0,
@@ -275,16 +274,15 @@ def build_lot_reviews(primary_chars,
'compliant secondary characterization.'
if secondary_status == 'not submitted for review by lab':
base_review['status'] = 'not pursued'
- elif secondary_status == 'pending dcc review':
- base_review['status'] = 'pending dcc review'
elif secondary_status in ['compliant', 'exempt from standards']:
base_review['status'] = 'partially characterized'
base_review['detail'] = 'Awaiting submission of primary characterization(s).'
elif secondary_status == 'not compliant':
base_review['status'] = 'not characterized to standards'
else:
- # Only no secondary or secondary_status in in progress, not reviewed or deleted
- # should be left. The status should already be awaiting characterization by default.
+ # Only no secondary or secondary_status in pending dcc review, in progress,
+ # not reviewed or deleted should be left. The status should already be
+ # awaiting characterization by default.
pass
return [base_review]
else:
| 2 |
diff --git a/layouts/partials/fragments/faq.html b/layouts/partials/fragments/faq.html {{- $items := where (.page.Resources.Match (printf "%s/*.md" .Name)) ".Name" "ne" .self.Name -}}
{{- partial "helpers/container.html" (dict "start" true "in_slot" .in_slot "bg" $bg "Name" .Name "Params" .Params) -}}
- {{- with .Params.title }}
- <div class="row">
- <div class="col text-center
- {{- if or (eq $bg "secondary") (eq $bg "white") (eq $bg "primary") -}}
- {{- printf " text-%s" "dark" -}}
- {{- else -}}
- {{- printf " text-%s" "white" -}}
- {{- end -}}
- ">
- <h4>
- {{- . | markdownify -}}
- </h4>
- </div>
- </div>
- {{- end -}}
- {{- with .Params.subtitle }}
- <div class="row">
- <div class="col text-center
- {{- if or (eq $bg "secondary") (eq $bg "primary") -}}
- {{- printf " text-%s" "dark" -}}
- {{- else -}}
- {{- printf " text-muted text-%s" "secondary" -}}
- {{- end -}}
- ">
- <h5>
- {{- . | markdownify -}}
- </h5>
- </div>
- </div>
- {{- end }}
+ {{- partial "helpers/section-header.html" (dict "bg" $bg "params" .Params) }}
<div class="row text-center justify-content-center">
<div class="faq">
{{- if eq (len $items) 0 -}}
| 0 |
diff --git a/src/components/CheckboxWithLabel.js b/src/components/CheckboxWithLabel.js @@ -57,9 +57,11 @@ const CheckboxWithLabel = React.forwardRef((props, ref) => {
const LabelComponent = props.LabelComponent;
const defaultStyles = [styles.flexRow, styles.alignItemsCenter];
const wrapperStyles = _.isArray(props.style) ? [...defaultStyles, ...props.style] : [...defaultStyles, props.style];
+ let isChecked = props.defaultValue ? props.defaultValue : props.isChecked;
function toggleCheckbox() {
- props.onInputChange(!props.isChecked);
+ props.onInputChange(!isChecked);
+ isChecked = !isChecked;
}
if (!props.label && !LabelComponent) {
@@ -69,7 +71,7 @@ const CheckboxWithLabel = React.forwardRef((props, ref) => {
<>
<View style={wrapperStyles}>
<Checkbox
- isChecked={props.isChecked}
+ isChecked={isChecked}
onPress={toggleCheckbox}
label={props.label}
hasError={Boolean(props.errorText)}
| 4 |
diff --git a/vis/stylesheets/components/_buttons.scss b/vis/stylesheets/components/_buttons.scss @@ -125,10 +125,14 @@ img#close-button {
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
- max-width: 200px;
+ max-width: 179px;
font-family: 'Lato', sans-serif;
-moz-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
+
+ &.small-reload {
+ max-width: 44px;
+ }
}
@media screen and (max-width: 1150px) {
| 1 |
diff --git a/components/evenement/event-banner.js b/components/evenement/event-banner.js @@ -40,6 +40,7 @@ function EventBanner() {
return (
<li className={idx === index ? 'slide' : 'hidden'} key={`${event.title}-${sanitizedDate}`}>
<div className='event-link' onClick={() => setSelectedEvent(event)}>{event.title}</div>
+ <div>{event.subtitle}</div>
<div className='date'>le {sanitizedDate}</div>
</li>
)
@@ -71,6 +72,10 @@ function EventBanner() {
padding: 5px;
text-align: center;
overflow: hidden;
+ display: grid;
+ grid-template-rows: auto 60px auto;
+ height: 165px;
+ align-items: center;
}
.banner-title {
@@ -97,10 +102,11 @@ function EventBanner() {
.event-link {
font-size: 16px;
font-weight: bold;
+ text-align: center;
}
.date {
- font-style: italic
+ font-style: italic;
}
@keyframes fadeIn {
| 9 |
diff --git a/server/lib/promExporter.js b/server/lib/promExporter.js @@ -260,7 +260,7 @@ module.exports = async function(rooms, peers, config)
const app = express();
- app.get('/', async (req, res) =>
+ app.get('/metrics', async (req, res) =>
{
logger.debug(`GET ${req.originalUrl}`);
const registry = new prom.Registry();
| 4 |
diff --git a/apps/banglerun/interface.html b/apps/banglerun/interface.html @@ -111,6 +111,7 @@ function trackLineToObject(l, hasFileName) {
var t = l.trim().split(",");
var n = hasFileName ? 1 : 0;
var o = {
+ invalid : t.length < 8,
date : new Date(parseInt(t[n+0])),
lat : parseFloat(t[n+1]),
lon : parseFloat(t[n+2]),
@@ -149,9 +150,9 @@ function getTrackList() {
<div class="column col-12">
<div class="card-header">
<div class="card-title h5">Track ${track.filename}</div>
- <div class="card-subtitle text-gray">${track.date.toString().substr(0,24)}</div>
+ <div class="card-subtitle text-gray">${track.invalid ? "No Data":track.date.toString().substr(0,24)}</div>
</div>
- <div class="card-image">
+ ${track.invalid?``:`<div class="card-image">
<iframe
width="100%"
height="250"
@@ -159,10 +160,10 @@ function getTrackList() {
src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBxTcwrrVOh2piz7EmIs1Xn4FsRxJWeVH4&q=${track.lat},${track.lon}&zoom=10" allowfullscreen>
</iframe>
</div>
- <div class="card-body"></div>
- <div class="card-footer">
+ <div class="card-body"></div>`}
+ <div class="card-footer">${track.invalid?``:`
<button class="btn btn-primary" trackid="${track.filename}" task="downloadkml">Download KML</button>
- <button class="btn btn-primary" trackid="${track.filename}" task="downloadgpx">Download GPX</button>
+ <button class="btn btn-primary" trackid="${track.filename}" task="downloadgpx">Download GPX</button>`}
<button class="btn btn-default" trackid="${track.filename}" task="delete">Delete</button>
</div>
</div>
| 9 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,52 @@ https://github.com/plotly/plotly.js/compare/vX.Y.Z...master
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.36.0] -- 2018-04-17
+
+### Added
+- Add `splom` (aka scatter plot matrix) traces [#2505]
+- Add multi-selection and click-to-select on `parcoords` axes [#2415]
+- Add selection and improve legend items for `ohlc` and `candlestick` [#2561]
+- Add 'fixed size' layout shapes through new shape attributes
+ `xsizemode`, `ysizemode`, `xanchor` and `yanchor` [#2532]
+- Add layout attribute `selectdirection` to restrict select-box direction [#2506]
+- Add support for selections on graphs with range sliders [#2561]
+- Add support for ragged `table` inputs [#2511]
+- Add Czech (`cs`) locale [#2483]
+- Add Japanese (`ja`) locale [#2558]
+
+### Changed
+- Multiple performance improvements for cartesian subplots, most noticeable
+ on graphs with many cartesian subplots [#2474, #2487, #2527]
+- Use new `gl-mesh3d` version that attempts to make lighting results less
+ hardware-dependent [#2365]
+- New and improved point-clustering algorithm for `scattergl` [#2499]
+- Improved `regl-line2d` component [#2556]
+
+### Fixed
+- Fix memory leak in `parcoords` traces [#2415]
+- Fix `scattergl` `selectedpoints` clearance under select/lasso drag modes [#2492]
+- Fix `scattergl` horizontal lines rendering [#2564]
+- Fix `scattergl` unselected marker opacity for array marker opacity traces [#2503]
+- Fix `scattergl` hover over data gaps [#2499]
+- Fix `ohlc` on category axes [#2561]
+- Fix inconsistencies in `ohlc` and `candlestick` event data [#2561]
+- Fix hover `text` for `candlestick` traces [#2561]
+- Fix `scattermapbox` selections for traces with data gaps [#2513]
+- Fix `table` border cases that got previously cut off [#2511]
+- Fix `box` traces with one jittered outlier [#2530]
+- Fix `cliponfalse: false` on reversed axes [#2533]
+- Fix buggy `plot_bgcolor` rendering when updating axis `overlaying` attribute [#2516]
+- Fix buggy `Plotly.react` behavior for `carpet`, `contourcarpet`, `scattercarpet`,
+ `table` and x/y/z column `heatmap` traces [#2525]
+- Fix buggy `Plotly.react` behavior for `ohlc` and `candlestick` traces [#2561]
+- Fix ordered categories on graphs with `visible: false` traces [#2489]
+- Fix ordered categories in multi-subplot graphs [#2489]
+- Fix inconsistencies when ordering number and numeric string categories [#2489]
+- Fix format `days` in English locale [#2490]
+- Handle HTML links with encoded URIs correctly in svg text labels [#2471]
+
+
## [1.35.2] -- 2018-03-09
### Fixed
| 3 |
diff --git a/scss/layout/_navbar.scss b/scss/layout/_navbar.scss @@ -85,7 +85,7 @@ $siimple-navbar-title-padding: 15px;
text-decoration: none;
text-align: center;
font-weight: bold;
- font-size: $siimple-default-text-weight;
+ font-size: $siimple-default-text-size;
transition: all 0.3s;
cursor: pointer;
opacity: 0.8;
| 1 |
diff --git a/core/type_expr.js b/core/type_expr.js @@ -178,8 +178,6 @@ Blockly.TypeExpr.TVAR = function(name, val, opt_color) {
this.name = name;
/** @type {Blockly.TypeExpr} */
this.val = val;
- /** @type {Type} */
- this.type = type;
/** @type {string} */
this.color = opt_color ? opt_color : Blockly.TypeExpr.generateColor();
Blockly.TypeExpr.call(this, Blockly.TypeExpr.prototype.TVAR_);
| 2 |
diff --git a/articles/api/authorization-extension/_roles.md b/articles/api/authorization-extension/_roles.md @@ -184,13 +184,10 @@ curl --request PUT \
}
```
-<% var path = '/roles/{role_id}'; %>
-<%=
-include('../../_includes/_http-method', {
- "http_method": "PUT",
- "path": path,
- "link": "#update-role"
-}) %>
+<h5 class="http-method-box">
+ <span class="badge badge-warning" href="#update-role">PUT</span>
+ <span class="path" href="#update-role">/roles/{role_id}</span>
+</h5>
Use this endpoint to update the details of a role.
| 0 |
diff --git a/src/components/ProductGrid/ProductGrid.js b/src/components/ProductGrid/ProductGrid.js import React, { Component } from "react";
import PropTypes from "prop-types";
import Grid from "material-ui/Grid";
-import Helmet from "react-helmet";
-import { inject, observer } from "mobx-react";
import ProductItem from "components/ProductItem";
-// TODO: get real products from server
-import { tempProducts } from "./tempProducts";
-
-@inject("shop")
-@observer
class ProductGrid extends Component {
static propTypes = {
catalogItems: PropTypes.arrayOf(PropTypes.object)
};
- renderHelmet() {
- const { shop } = this.props;
-
- // If we are on the default Product Grid, use default shop info
- return (
- <Helmet>
- <title>{shop.name}</title>
- <meta name="description" content={shop.description} />
- </Helmet>
- );
- }
-
renderProduct(edge) {
const { node: { product, positions } } = edge;
const weight = (positions.length) ? positions[0].displayWeight : 0;
const { _id } = product;
-
const gridItemSize = {
0: {
xs: 12,
@@ -66,7 +46,6 @@ class ProductGrid extends Component {
return (
<section>
- {this.renderHelmet()}
<Grid container spacing={24}>
{(catalogItems && catalogItems.length) ? catalogItems.map(this.renderProduct) : null}
</Grid>
| 13 |
diff --git a/network.js b/network.js @@ -1909,7 +1909,7 @@ function handleJustsaying(ws, subject, body){
case 'bugreport':
if (!body)
return;
- if (conf.ignoreBugreportRegexp && new RegExp(conf.ignoreBugreportRegexp).test(body.message))
+ if (conf.ignoreBugreportRegexp && new RegExp(conf.ignoreBugreportRegexp).test(body.exception.toString()))
return console.log('ignoring bugreport');
mail.sendBugEmail(body.message, body.exception);
break;
| 8 |
diff --git a/src/components/minigraph.js b/src/components/minigraph.js @@ -78,11 +78,11 @@ function Minigraph(props) {
})
.y(function(d, i) {
if (i===0) {
- {/* console.log(data[data.length-9]['dailyconfirmed']-data[data.length-10]['dailyconfirmed']);*/}
- return y1(data[data.length-9]['dailyconfirmed']-data[data.length-10]['dailyconfirmed']);
+ console.log(data[data.length-9]['dailyconfirmed']-data[data.length-10]['dailyconfirmed']);
+ return y1(d['dailyconfirmed']);
} else {
- {/* console.log(data[data.length-9+i]['dailyconfirmed']-data[data.length-10+i]['dailyconfirmed']);*/}
- return y1(data[data.length-9+i]['dailyconfirmed']-data[data.length-10+i]['dailyconfirmed']);
+ console.log(data[data.length-9+i]['dailyconfirmed']-data[data.length-10+i]['dailyconfirmed']);
+ return y1(d['dailyconfirmed']);
}
})
.curve(d3.curveCardinal),
@@ -107,7 +107,7 @@ function Minigraph(props) {
return x(new Date(d['date']+'2020'));
})
.attr('cy', function(d) {
- return y1(data[data.length-1]['dailyconfirmed']-data[data.length-2]['dailyconfirmed']);
+ return y1(d['dailyconfirmed']);
})
.on('mouseover', (d) => {
d3.select(d3.event.target).attr('r', '5');
@@ -138,11 +138,11 @@ function Minigraph(props) {
if (i===0) {
const today = data[data.length-9]['dailyconfirmed']-data[data.length-9]['dailyrecovered']-data[data.length-9]['dailydeceased'];
const yesterday = data[data.length-10]['dailyconfirmed']-data[data.length-10]['dailyrecovered']-data[data.length-10]['dailydeceased'];
- return y1(today - yesterday);
+ return y1(d['dailyconfirmed']-d['dailyrecovered']-d['dailydeceased']);
} else {
const today = data[data.length-9+i]['dailyconfirmed']-data[data.length-9+i]['dailyrecovered']-data[data.length-9+i]['dailydeceased'];
const yesterday = data[data.length-10+i]['dailyconfirmed']-data[data.length-10+i]['dailyrecovered']-data[data.length-10+i]['dailydeceased'];
- return y1(today-yesterday);
+ return y1(d['dailyconfirmed']-d['dailyrecovered']-d['dailydeceased']);
}
})
.curve(d3.curveCardinal),
@@ -169,7 +169,7 @@ function Minigraph(props) {
.attr('cy', function(d) {
const today = data[data.length-1]['dailyconfirmed']-data[data.length-1]['dailyrecovered']-data[data.length-1]['dailydeceased'];
const yesterday = data[data.length-2]['dailyconfirmed']-data[data.length-2]['dailyrecovered']-data[data.length-2]['dailydeceased'];
- return y1(today-yesterday);
+ return y1(d['dailyconfirmed']-d['dailyrecovered']-d['dailydeceased']);
})
.on('mouseover', (d) => {
d3.select(d3.event.target).attr('r', '5');
@@ -196,9 +196,9 @@ function Minigraph(props) {
})
.y(function(d, i) {
if (i===0) {
- return y1(data[data.length-9]['dailyrecovered']-data[data.length-10]['dailyrecovered']);
+ return y1(d['dailyrecovered']);
} else {
- return y1(data[data.length-9+i]['dailyrecovered']-data[data.length-10+i]['dailyrecovered']);
+ return y1(d['dailyrecovered']);
}
})
.curve(d3.curveCardinal),
@@ -223,7 +223,7 @@ function Minigraph(props) {
return x(new Date(d['date']+'2020'));
})
.attr('cy', function(d) {
- return y1(data[data.length-1]['dailyrecovered']-data[data.length-2]['dailyrecovered']);
+ return y1(d['dailyrecovered']);
})
.on('mouseover', (d) => {
d3.select(d3.event.target).attr('r', '5');
@@ -252,9 +252,9 @@ function Minigraph(props) {
})
.y(function(d, i) {
if (i===0) {
- return y1(data[data.length-9]['dailydeceased']-data[data.length-10]['dailydeceased']);
+ return y1(d['dailydeceased']);
} else {
- return y1(data[data.length-9+i]['dailydeceased']-data[data.length-10+i]['dailydeceased']);
+ return y1(d['dailydeceased']);
}
})
.curve(d3.curveCardinal),
@@ -279,7 +279,7 @@ function Minigraph(props) {
return x(new Date(d['date']+'2020'));
})
.attr('cy', function(d) {
- return y1(data[data.length-1]['dailydeceased']-data[data.length-2]['dailydeceased']);
+ return y1(d['dailydeceased']);
})
.on('mouseover', (d) => {
d3.select(d3.event.target).attr('r', '5');
| 3 |
diff --git a/PostHeadersQuestionToc.user.js b/PostHeadersQuestionToc.user.js // @description Sticky post headers while you view each post (helps for long posts). Question ToC of Answers in sidebar.
// @homepage https://github.com/samliew/SO-mod-userscripts
// @author @samliew
-// @version 2.8.1
+// @version 2.8.2
//
// @include https://*stackoverflow.com/questions/*
// @include https://*serverfault.com/questions/*
@@ -405,11 +405,6 @@ ${isElectionPage ? 'Nomination' : isQuestion ? 'Question' : 'Answer'} by ${postu
position: sticky;
top: 10px;
padding-bottom: 20px;
- background-color: rgba(255,255,255,0.5);
-}
-.deleted-answer .votecell .vote,
-.deleted-answer .votecell .js-voting-container {
- background-color: rgba(253, 243, 244, 0.6);
}
.votecell .vote .message,
.votecell .js-voting-container .message {
| 2 |
diff --git a/app/backendAPI/fileAPI.js b/app/backendAPI/fileAPI.js @@ -3,10 +3,10 @@ import { request, qs } from '../utils'
import config from '../config'
import axios from 'axios'
-export function fetchPath (path, other, group) {
+export function fetchPath (path, order, group) {
return request.get(`/workspaces/${config.spaceKey}/files`, {
path: path,
- other: true,
+ order: true,
group: true
})
}
| 1 |
diff --git a/articles/clients/client-grant-types.md b/articles/clients/client-grant-types.md @@ -46,7 +46,7 @@ Begin by navigating to the [Clients page](${manage_url}/#/clients) of the Manage

-Click on the cog icon <i class="icon icon-budicon-329"> next to the Client you're interested in to launch its settings page.
+Click on the cog icon <i class="icon icon-budicon-329"></i> next to the Client you're interested in to launch its settings page.

@@ -124,38 +124,11 @@ Trusted first-party clients can additionally use the following `grant_types`:
| Legacy Grant Type | Alternative |
|:-----|:----|
-|Resource Owner Password Credentials flow (http://auth0.com/oauth/legacy/grant-type/ro) | https://${account.namespace}/api/connections | Use the [/oauth/token](/api/authentication#authorization-code) endpoint with a grant type of `password`. See [Resource Owner Password Credentials Exchange](/api-auth/tutorials/adoption/password) and [Executing the Resource Owner Password Grant](/api-auth/tutorials/password-grant) for additional information. |
-
-<!-- markdownlint-disable MD033 -->
-
-<table class="table">
- <tr>
- <th>Legacy Grant Type</th>
- <th>Alternative</th>
- </tr>
- <tr>
- <td>Resource Owner Password Credentials flow (http://auth0.com/oauth/legacy/grant-type/ro)</td>
- <td>Use the <a href="/api/authentication#authorization-code">`/oauth/token` endpoint</a> with a grant type of `password`. See <a href="/api-auth/tutorials/adoption/password">Resource Owner Password Credentials Exchange</a> and <a href="/api-auth/tutorials/password-grant">Executing the Resource Owner Password Grant</a> for additional information.</td>
- </tr>
- <tr>
- <td>http://auth0.com/oauth/legacy/grant-type/ro/jwt-bearer</td>
- <td>This feature is disabled by default. If you would like this feature enabled, please contact support to discuss your use case and prevent the possibility of introducing security vulnerabilities.</td>
- </tr>
- <tr>
- <td>http://auth0.com/oauth/legacy/grant-type/delegation/refresh_token</td>
- <td>Use the `oauth/token` endpoint to <a href="/api-auth/tutorials/adoption/refresh-tokens">obtain refresh tokens</a>. See <a href="/api-auth/tutorials/adoption/refresh-tokens">OIDC-conformant refresh tokens</a> for additional information.</td>
- </tr>
- <tr>
- <td>http://auth0.com/oauth/legacy/grant-type/delegation/id_token</td>
- <td>This feature is disabled by default. If you would like this feature enabled, please contact support to discuss your use case and prevent the possibility of introducing security vulnerabilities.</td>
- </tr>
- <tr>
- <td>http://auth0.com/oauth/legacy/grant-type/access_token</td>
- <td>Use browser-based social authentication.</td>
- </tr>
-</table>
-
-<!-- markdownlint-enable MD033 -->
+|Resource Owner Password Credentials flow (http://auth0.com/oauth/legacy/grant-type/ro) | Use the [/oauth/token](/api/authentication#authorization-code) endpoint with a grant type of `password`. See [Resource Owner Password Credentials Exchange](/api-auth/tutorials/adoption/password) and [Executing the Resource Owner Password Grant](/api-auth/tutorials/password-grant) for additional information. |
+| `http://auth0.com/oauth/legacy/grant-type/ro/jwt-bearer` | This feature is disabled by default. If you would like this feature enabled, please [contact support](https://support.auth0.com/) to discuss your use case and prevent the possibility of introducing security vulnerabilities. |
+| `http://auth0.com/oauth/legacy/grant-type/delegation/refresh_token` | Use the `oauth/token` endpoint to obtain refresh tokens. See [OIDC-conformant refresh tokens](/api-auth/tutorials/adoption/refresh-tokens) for more info. |
+| `http://auth0.com/oauth/legacy/grant-type/delegation/id_token` | This feature is disabled by default. If you would like this feature enabled, please [contact support](https://support.auth0.com/) to discuss your use case and prevent the possibility of introducing security vulnerabilities. |
+| `http://auth0.com/oauth/legacy/grant-type/access_token` | Use browser-based social authentication. |
::: note
Those implementing Passwordless Authentication should use hosted login pages instead of the `oauth/ro` endpoint.
| 14 |
diff --git a/assets/css/maptalks-control.css b/assets/css/maptalks-control.css .maptalks-msgBox { background: #fff; border: 1px solid #b4b3b3; border-radius: 3px; /*box-shadow: 3px 5px 5px #dbdada;*/}
.maptalks-msgBox em.maptalks-ico { display: block; width: 17px; height: 10px; background: url(images/control/5_1.png) no-repeat; position: absolute; left: 50%; margin-left: -5px; bottom: -10px;}
-.maptalks-msgBox h2 { display: block; height: 30px; line-height: 30px; font-weight: bold; font-size: 14px; padding: 0 10px; margin: 0;}
+.maptalks-msgBox h2 { display: block; height: auto; line-height: 30px; font-weight: bold; font-size: 14px; padding: 0 10px; margin: 0; white-space: nowrap;padding-right: 30px;}
.maptalks-msgBox a.maptalks-close { display: block; width: 13px; height: 13px; background: url(images/control/infownd-close.png) no-repeat; position: absolute; top: 8px; right: 10px;}
.maptalks-msgBox a.maptalks-close:hover { background: url(images/control/infownd-close-hover.png) no-repeat;}
.maptalks-msgBox .maptalks-msgContent { font-size: 12px;padding: 10px; min-width: 200px;}
| 3 |
diff --git a/README.md b/README.md @@ -7,10 +7,10 @@ This Git repository hosts tools that are part of the [IBM Equal Access Toolkit](
## Overview
This README covers topics for developers. For non-developer usage, see the following instruction for individual tools:
-* [accessibility-checker-extension for Chrome]() : web browser extensions that adds automated accessibility checking capabilities to Chrome and other browser that support the Chromium web-extension API
-* [accessibility-checker-extension for Firefox]() : web browser extensions that adds automated accessibility checking capabilities to Firefox
-* [accessibility-checker]([accessibility-checker/README.md](https://www.npmjs.com/package/accessibility-checker)): automated accessibility testing for Node-based test environments
-* [karma-accessibility-checker](https://www.npmjs.com/package/karma-accessibility-checker): automated accessibility testing for the Karma environment
+* [accessibility-checker-extension for Chrome](accessibility-checker-extension/README.md) and [extension](): web browser extensions that adds automated accessibility checking capabilities to Chrome and other browser that support the Chromium web-extension API
+* [accessibility-checker-extension for Firefox](accessibility-checker-extension/README.md) and [extension]() : web browser extensions that adds automated accessibility checking capabilities to Firefox
+* [accessibility-checker](accessibility-checker/README.md) and [npm](https://www.npmjs.com/package/accessibility-checker): automated accessibility testing for Node-based test environments
+* [karma-accessibility-checker](karma-accessibility-checker/README.md) and [npm](https://www.npmjs.com/package/karma-accessibility-checker): automated accessibility testing for the Karma environment
### What's in this repository?
| 3 |
diff --git a/token-metadata/0x910Dfc18D6EA3D6a7124A6F8B5458F281060fa4c/metadata.json b/token-metadata/0x910Dfc18D6EA3D6a7124A6F8B5458F281060fa4c/metadata.json "symbol": "X8X",
"address": "0x910Dfc18D6EA3D6a7124A6F8B5458F281060fa4c",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/main/scala/core/interceptor/Interceptor.scala b/src/main/scala/core/interceptor/Interceptor.scala @@ -2,6 +2,6 @@ package core.interceptor
import scala.concurrent.Future
-trait Interceptor[A, B] {
- def handle(ctx: A): Future[Either[B, Option[A]]]
+trait Interceptor[Arg, Result] {
+ def handle(argument: Arg): Future[Either[Result, Option[Arg]]]
}
\ No newline at end of file
| 10 |
diff --git a/src/common/blockchain/interface-blockchain/mining/transactions-selector/Mining-Transactions-Selector.js b/src/common/blockchain/interface-blockchain/mining/transactions-selector/Mining-Transactions-Selector.js @@ -51,8 +51,6 @@ class MiningTransactionsSelector{
if(!this.validateTransactionId(transaction.txId))
throw {message: "This transaction was already inserted by txId"};
- if ( !this.blockchain.agent.light ){
-
if (transaction.nonce < this.blockchain.accountantTree.getAccountNonce(transaction.from.addresses[0].unencodedAddress))
throw {message: "This transaction was already inserted"};
@@ -62,16 +60,6 @@ class MiningTransactionsSelector{
if( transaction.timeLock - consts.BLOCKCHAIN.FORKS.IMMUTABILITY_LENGTH > this.blockchain.blocks.length )
throw {message: "transaction is in future"};
- }else{
-
- if( transaction.timeLock + 1 < this.blockchain.blocks.length )
- throw {message: "transaction is too old"};
-
- if( transaction.timeLock - 1 > this.blockchain.blocks.length )
- throw {message: "transaction is in future"};
-
- }
-
//validating its own transaction
if (transaction.from.addresses[0].unencodedAddress.equals( this.blockchain.mining.unencodedMinerAddress ) )
return true;
| 13 |
diff --git a/policykit/policyengine/models.py b/policykit/policyengine/models.py @@ -531,6 +531,7 @@ class ConstitutionAction(BaseAction, PolymorphicModel):
govern_action(self, is_first_evaluation=True)
else:
self.proposal = Proposal.objects.create(status=Proposal.FAILED, author=self.initiator)
+ super(ConstitutionAction, self).save(*args, **kwargs)
else:
if not self.pk: # Runs only when object is new
self.proposal = Proposal.objects.create(status=Proposal.FAILED, author=self.initiator)
| 0 |
diff --git a/src/base/component.js b/src/base/component.js @@ -160,15 +160,18 @@ const Component = Events.extend({
utils.removeClass(this.placeholder, class_loading_data);
utils.addClass(this.placeholder, class_error);
+ let errorLog = JSON.stringify(error, null, 2);
+ if (errorLog == "{}") errorLog = error.stack;
+
const translator = this.model._root.locale.getTFunction();
const mailto = `mailto:[email protected]?subject=Gapminder Vizabi error report&body=Hi Angie! Please have a look at this! %0D%0A %0D%0A %0D%0A
These are the steps to reproduce the error: %0D%0A
1. Go to ` + window.location.origin + ` %0D%0A
2. %5Bplease write here what you did%5D %0D%0A %0D%0A %0D%0A`
- + encodeURIComponent(JSON.stringify(error, null, 4));
+ + encodeURIComponent(errorLog);
this.errorMessageEl.classed("vzb-hidden", false);
- const technical = this.errorMessageEl.select(".vzb-error-message-technical").html(JSON.stringify(error, null, 2));
+ const technical = this.errorMessageEl.select(".vzb-error-message-technical").html(errorLog);
this.errorMessageEl.select(".vzb-error-message-expand")
.on("click", () => technical.classed("vzb-hidden", !technical.classed("vzb-hidden")))
.html(translator("crash/expand"));
@@ -192,7 +195,7 @@ const Component = Events.extend({
this.errorMessageEl.select(".vzb-error-message-intro").html(translator(crashIntro, template).replace("mailto", mailto));
this.errorMessageEl.select(".vzb-error-message-outro").html(translator(crashOutro, template).replace("mailto", mailto));
- utils.error(JSON.stringify(error, null, 2));
+ utils.error(errorLog);
},
| 7 |
diff --git a/assets/js/modules/subscribe-with-google/components/common/AccountCreate.js b/assets/js/modules/subscribe-with-google/components/common/AccountCreate.js @@ -64,7 +64,7 @@ export default function AccountCreate( { finishSetup } ) {
setProducts( products.trim() );
setPublicationID( publicationID.trim() );
submitChanges();
- finishSetup();
+ finishSetup?.();
}, [ products, publicationID ] );
return (
| 11 |
diff --git a/.github/workflows/js-css-lint.yml b/.github/workflows/js-css-lint.yml @@ -46,4 +46,4 @@ jobs:
pattern: "./dist/assets/**/*.{css,js}"
# The sub-match below will be replaced by asterisks.
# The length of 20 corresponds to webpack's `output.hashDigestLength`.
- strip-hash: "\\.\\([a-f0-9]{20})\\.{css,js}$"
+ strip-hash: "\\.([a-f0-9]{20})\\.{css,js}$"
| 2 |
diff --git a/packages/web/src/components/shared/Dropdown.js b/packages/web/src/components/shared/Dropdown.js @@ -109,7 +109,7 @@ class Dropdown extends Component {
Dropdown.propTypes = {
items: types.data,
- selectedItem: types.any,
+ selectedItem: types.selectedValue,
onChange: types.func,
placeholder: types.placeholder,
multi: types.multiSelect
| 3 |
diff --git a/packages/insomnia/src/ui/components/settings/account.tsx b/packages/insomnia/src/ui/components/settings/account.tsx @@ -162,7 +162,7 @@ export const Account: FC = () => {
) : (
<Fragment>
<div className="notice pad surprise">
- <h1 className="no-margin-top">Try Insomnia Plus!</h1>
+ <h1 className="no-margin-top">Try Insomnia Sync!</h1>
<p>
Sync your data across devices or with a team
<br />
| 2 |
diff --git a/avatars/avatars.js b/avatars/avatars.js @@ -341,6 +341,71 @@ const emoteFragmentShader2 = `\
mainImage(gl_FragColor, tex_coords);
}
`;
+const labelVertexShader = `\
+ attribute vec3 color;
+ varying vec2 tex_coords;
+ varying vec3 vColor;
+
+ void main() {
+ tex_coords = uv;
+ vColor = color;
+ gl_Position = vec4(position, 1.);
+ }
+`;
+const labelFragmentShader = `\
+ varying vec2 tex_coords;
+ varying vec3 vColor;
+
+ vec2 rotateCCW(vec2 pos, float angle) {
+ float ca = cos(angle), sa = sin(angle);
+ return pos * mat2(ca, sa, -sa, ca);
+ }
+
+ vec2 rotateCCW(vec2 pos, vec2 around, float angle) {
+ pos -= around;
+ pos = rotateCCW(pos, angle);
+ pos += around;
+ return pos;
+ }
+
+ // return 1 if v inside the box, return 0 otherwise
+ bool insideAABB(vec2 v, vec2 bottomLeft, vec2 topRight) {
+ vec2 s = step(bottomLeft, v) - step(topRight, v);
+ return s.x * s.y > 0.;
+ }
+
+ bool isPointInTriangle(vec2 point, vec2 a, vec2 b, vec2 c) {
+ vec2 v0 = c - a;
+ vec2 v1 = b - a;
+ vec2 v2 = point - a;
+
+ float dot00 = dot(v0, v0);
+ float dot01 = dot(v0, v1);
+ float dot02 = dot(v0, v2);
+ float dot11 = dot(v1, v1);
+ float dot12 = dot(v1, v2);
+
+ float invDenom = 1. / (dot00 * dot11 - dot01 * dot01);
+ float u = (dot11 * dot02 - dot01 * dot12) * invDenom;
+ float v = (dot00 * dot12 - dot01 * dot02) * invDenom;
+
+ return (u >= 0.) && (v >= 0.) && (u + v < 1.);
+ }
+
+ void main() {
+ vec3 c;
+ if (vColor.r > 0.) {
+ /* if (tex_coords.x <= 0.025 || tex_coords.x >= 0.975 || tex_coords.y <= 0.05 || tex_coords.y >= 0.95) {
+ c = vec3(0.2);
+ } else { */
+ c = vec3(0.1 + tex_coords.y * 0.1);
+ // }
+ } else {
+ c = vec3(0.);
+ }
+ gl_FragColor = vec4(c, 1.0);
+ }
+`;
const bgMesh1 = (() => {
const textureLoader = new THREE.TextureLoader();
const quad = new THREE.Mesh(
@@ -455,6 +520,85 @@ const bgMesh3 = (() => {
quad.frustumCulled = false;
return quad;
})();
+const bgMesh4 = (() => {
+ const planeGeometry = new THREE.PlaneGeometry(2, 2);
+ const s1 = 0.3;
+ const aspectRatio1 = 0.25;
+ const s2 = 0.4;
+ const aspectRatio2 = 0.1;
+ const _colorGeometry = (g, color) => {
+ const colors = new Float32Array(g.attributes.position.count * 3);
+ for (let i = 0; i < colors.length; i += 3) {
+ color.toArray(colors, i);
+ }
+ g.setAttribute('color', new THREE.BufferAttribute(colors, 3));
+ };
+ const g1 = planeGeometry.clone()
+ .applyMatrix4(
+ new THREE.Matrix4()
+ .makeShear(0, 0, s1, 0, 0, 0)
+ )
+ .applyMatrix4(
+ new THREE.Matrix4()
+ .makeScale(s1, s1 * aspectRatio1, 1)
+ )
+ .applyMatrix4(
+ new THREE.Matrix4()
+ .makeTranslation(-0.05, -0.4, 0)
+ );
+ _colorGeometry(g1, new THREE.Color(0xFFFFFF));
+ const g2 = planeGeometry.clone()
+ .applyMatrix4(
+ new THREE.Matrix4()
+ .makeShear(0, 0, s2 / 3, 0, 0, 0)
+ )
+ .applyMatrix4(
+ new THREE.Matrix4()
+ .makeScale(s2, s2 * aspectRatio2, 1)
+ )
+ .applyMatrix4(
+ new THREE.Matrix4()
+ .makeTranslation(-0.2, -0.5, 0)
+ );
+ _colorGeometry(g2, new THREE.Color(0x000000));
+ const geometry = BufferGeometryUtils.mergeBufferGeometries([
+ g2,
+ g1,
+ ]);
+ const quad = new THREE.Mesh(
+ geometry,
+ new THREE.ShaderMaterial({
+ uniforms: {
+ /* t0: {
+ value: null,
+ needsUpdate: false,
+ },
+ outline_thickness: {
+ value: 0.02,
+ needsUpdate: true,
+ },
+ outline_colour: {
+ value: new THREE.Color(0, 0, 1),
+ needsUpdate: true,
+ },
+ outline_threshold: {
+ value: .5,
+ needsUpdate: true,
+ }, */
+ },
+ vertexShader: labelVertexShader,
+ fragmentShader: labelFragmentShader,
+ // depthWrite: false,
+ // depthTest: false,
+ // alphaToCoverage: true,
+ })
+ );
+ /* quad.material.onBeforeCompile = shader => {
+ console.log('got full screen shader', shader);
+ }; */
+ quad.frustumCulled = false;
+ return quad;
+})();
const outlineMaterial = (() => {
var wVertex = THREE.ShaderLib["standard"].vertexShader;
var wFragment = THREE.ShaderLib["standard"].fragmentShader;
@@ -3357,6 +3501,7 @@ class Avatar {
sideScene.add(bgMesh1);
sideScene.add(bgMesh2);
sideScene.add(bgMesh3);
+ sideScene.add(bgMesh4);
const sideCamera = new THREE.PerspectiveCamera();
sideCamera.position.y = 1.2;
| 0 |
diff --git a/lib/assets/core/javascripts/cartodb3/components/form-components/editors/fill/column-list-view.js b/lib/assets/core/javascripts/cartodb3/components/form-components/editors/fill/column-list-view.js @@ -23,23 +23,20 @@ module.exports = CoreView.extend({
this._itemTemplate = opts.itemTemplate;
this.collection = new CustomListCollection(this._columns);
-
- this._initBinds();
-
- this._listView = new CustomListView({
- collection: this.collection,
- showSearch: this._showSearch,
- typeLabel: this._typeLabel,
- itemTemplate: this._itemTemplate
- });
+ this.listenTo(this.collection, 'change:selected', this._onSelectItem);
},
render: function () {
- this.$el.append(template({
+ this.clearSubViews();
+ this.$el.empty();
+
+ this.$el.append(
+ template({
headerTitle: this.options.headerTitle
- }));
+ })
+ );
- this.$('.js-content').append(this._listView.render().$el);
+ this._initViews();
return this;
},
@@ -49,8 +46,15 @@ module.exports = CoreView.extend({
this.trigger('back', this);
},
- _initBinds: function () {
- this.collection.bind('change:selected', this._onSelectItem, this);
+ _initViews: function () {
+ this._listView = new CustomListView({
+ collection: this.collection,
+ showSearch: this._showSearch,
+ typeLabel: this._typeLabel,
+ itemTemplate: this._itemTemplate
+ });
+ this.$('.js-content').append(this._listView.render().$el);
+ this.addView(this._listView);
},
_onSelectItem: function (item) {
| 2 |
diff --git a/bin/schema/index.js b/bin/schema/index.js @@ -364,7 +364,6 @@ function Schema(version, enforcer, exception, definition, map) {
console.log(exception.toString());
skipDefaultValidations = true;
} else {
- if (isDateFormat && options.freeze) util.deepFreeze(data.value);
this.default = data.value;
}
}
@@ -378,7 +377,6 @@ function Schema(version, enforcer, exception, definition, map) {
if (data.error) {
enumErrors[i] = child;
} else {
- if (isDateFormat && options.freeze) util.deepFreeze(data.value);
this.enum[i] = data.value;
}
}
@@ -425,7 +423,7 @@ function Schema(version, enforcer, exception, definition, map) {
// if an example is provided then validate the example and deserialize it
if (definition.hasOwnProperty('example')) {
- const error = this.validate(schema.example);
+ const error = this.validate(this.example);
if (error) {
error.header = 'Example does not match the schema';
exception(error);
| 2 |
diff --git a/src/technologies/b.json b/src/technologies/b.json 106
],
"cookies": {
- "bfx.apiKey:": "^[\\w\\d-]+$\\;confidence:25",
- "bfx.country:": "^\\w+$\\;confidence:25",
- "bfx.language": "^\\w+$\\;confidence:25",
- "bfx.logLevel": "^\\w+$\\;confidence:25"
+ "bfx.apiKey:": "^[\\w\\d-]+$",
+ "bfx.country:": "^\\w+$",
+ "bfx.language": "^\\w+$",
+ "bfx.logLevel": "^\\w+$"
},
"description": "Borderfree is an cross-border ecommerce solutions provider.",
"icon": "Borderfree.png",
"js": {
- "bfx._apiKey": "\\;confidence:50",
- "bfx._brand": "\\;confidence:50"
+ "bfx._apiKey": "",
+ "bfx._brand": ""
},
"pricing": [
"poa"
"scriptSrc": [
"global\\.prd\\.borderfree\\.com",
"wm\\.prd\\.borderfree\\.com",
- "bfx\\.js",
- "cbt\\.js"
+ "bfx-objects\\.prd\\.borderfree\\.com"
],
"website": "https://www.borderfree.com"
},
| 7 |
diff --git a/aleph/index/collections.py b/aleph/index/collections.py @@ -118,11 +118,11 @@ def get_collection_stats(collection_id):
}
result = search_safe(index=entities_read_index(), body=query)
aggregations = result.get('aggregations', {})
- data = {'count': result['hits']['total']}
+ data = {'count': result.get('hits', {}).get('total', 0)}
for facet in ['schemata', 'countries', 'languages']:
data[facet] = {}
- for bucket in aggregations[facet]['buckets']:
+ for bucket in aggregations.get(facet, {}).get('buckets', []):
data[facet][bucket['key']] = bucket['doc_count']
cache.set_complex(key, data, expire=cache.EXPIRE)
return data
| 9 |
diff --git a/web/app/components/Account/Identicon.jsx b/web/app/components/Account/Identicon.jsx @@ -29,7 +29,7 @@ class Identicon extends Component {
if(this.props.account) jdenticon.updateById(this.canvas_id);
else {
let ctx = this.refs.canvas.getContext('2d');
- ctx.fillStyle = "rgba(255, 255, 255, 0.2)";
+ ctx.fillStyle = "rgba(100, 100, 100, 0.5)";
let size = ctx.canvas.width;
ctx.clearRect(0, 0, size, size);
ctx.fillRect(0, 0, size, size);
| 7 |
diff --git a/lib/ferryman.js b/lib/ferryman.js @@ -74,7 +74,7 @@ class Ferryman {
let stepData;
if (skipInit) {
- stepData = await this.getSnapShot(flowId, stepId);
+ stepData = Object.assign(this.stepData || {}, await this.getSnapShot(flowId, stepId));
} else {
stepData = await apiClient.tasks.retrieveStep(flowId, stepId);
}
@@ -317,6 +317,8 @@ class Ferryman {
// Prepare depending on message
this.flowId = message.properties.headers.taskId;
this.stepId = message.properties.headers.stepId;
+
+ // todo: Find a way to do this without overwriting this.stepData
await this.prepare(true);
const settings = this.settings;
@@ -350,7 +352,6 @@ class Ferryman {
const cfg = _.cloneDeep(stepData.config) || {};
const snapshot = _.cloneDeep(this.snapshot);
-
if (secret) {
_.assign(cfg, secret);
}
| 1 |
diff --git a/src/renderer/lib/torrent-poster.js b/src/renderer/lib/torrent-poster.js @@ -3,6 +3,13 @@ module.exports = torrentPoster
const captureFrame = require('capture-frame')
const path = require('path')
+const mediaExtensions = {
+ audio: ['.aac', '.asf', '.flac', '.m2a', '.m4a', '.mp2', '.mp4', '.mp3', '.oga', '.ogg', '.opus',
+ '.wma', '.wav', '.wv', '.wvp'],
+ video: ['.mp4', '.m4v', '.webm', '.mov', '.mkv'],
+ image: ['.gif', '.jpg', '.jpeg', '.png']
+}
+
function torrentPoster (torrent, cb) {
// First, try to use a poster image if available
const posterFile = torrent.files.filter(function (file) {
@@ -10,32 +17,95 @@ function torrentPoster (torrent, cb) {
})[0]
if (posterFile) return torrentPosterFromImage(posterFile, torrent, cb)
- // Second, try to use the largest video file
- // Filter out file formats that the <video> tag definitely can't play
- const videoFile = getLargestFileByExtension(torrent, ['.mp4', '.m4v', '.webm', '.mov', '.mkv'])
- if (videoFile) return torrentPosterFromVideo(videoFile, torrent, cb)
-
- // Third, try to use the largest image file
- const imgFile = getLargestFileByExtension(torrent, ['.gif', '.jpg', '.jpeg', '.png'])
- if (imgFile) return torrentPosterFromImage(imgFile, torrent, cb)
+ // 'score' each media type based on total size present in torrent
+ const bestScore = ['audio', 'video', 'image'].map(mediaType => {
+ return {
+ type: mediaType,
+ size: calculateDataLengthByExtension(torrent, mediaExtensions[mediaType])}
+ }).sort((a, b) => { // sort descending on size
+ return b.size - a.size
+ })[0]
- // TODO: generate a waveform from the largest sound file
- // Finally, admit defeat
+ if (bestScore.size === 0) {
+ // Admit defeat, no video, audio or image had a significant presence
return cb(new Error('Cannot generate a poster from any files in the torrent'))
}
+ // Based on which media type is dominant we select the corresponding poster function
+ switch (bestScore.type) {
+ case 'audio':
+ return torrentPosterFromAudio(torrent, cb)
+ case 'image':
+ return torrentPosterFromImage(torrent, cb)
+ case 'video':
+ return torrentPosterFromVideo(torrent, cb)
+ }
+}
+
+/**
+ * Calculate the total data size of file matching one of the provided extensions
+ * @param torrent
+ * @param extensions List of extension to match
+ * @returns {number} total size, of matches found (>= 0)
+ */
+function calculateDataLengthByExtension (torrent, extensions) {
+ const files = filterOnExtension(torrent, extensions)
+ if (files.length === 0) return 0
+ return files
+ .map(file => file.length)
+ .reduce((a, b) => {
+ return a + b
+ })
+}
+
function getLargestFileByExtension (torrent, extensions) {
- const files = torrent.files.filter(function (file) {
+ const files = filterOnExtension(torrent, extensions)
+ if (files.length === 0) return undefined
+ return files.reduce((a, b) => {
+ return a.length > b.length ? a : b
+ })
+}
+
+function filterOnExtension (torrent, extensions) {
+ return torrent.files.filter(file => {
const extname = path.extname(file.name).toLowerCase()
return extensions.indexOf(extname) !== -1
})
- if (files.length === 0) return undefined
- return files.reduce(function (a, b) {
- return a.length > b.length ? a : b
+}
+
+function scoreCoverFile (file) {
+ const name = path.basename(file.name, path.extname(file.name)).toLowerCase()
+ switch (name) {
+ case 'cover': return 100
+ case 'folder': return 95
+ case 'front': return 85
+ case 'front-cover': return 90
+ case 'back': return 40
+ default: return 0
+ }
+}
+
+function torrentPosterFromAudio (torrent, cb) {
+ const imageFiles = filterOnExtension(torrent, mediaExtensions.image)
+
+ const bestCover = imageFiles.map(file => {
+ return {
+ file: file,
+ score: scoreCoverFile(file)
+ }
+ }).sort((a, b) => {
+ return b.score - a.score
})
+
+ if (bestCover.length < 1) return cb(new Error('Generated poster contains no data'))
+
+ const extname = path.extname(bestCover[0].file.name)
+ bestCover[0].file.getBuffer((err, buf) => cb(err, buf, extname))
}
-function torrentPosterFromVideo (file, torrent, cb) {
+function torrentPosterFromVideo (torrent, cb) {
+ const file = getLargestFileByExtension(torrent, mediaExtensions.video)
+
const index = torrent.files.indexOf(file)
const server = torrent.createServer(0)
@@ -77,7 +147,9 @@ function torrentPosterFromVideo (file, torrent, cb) {
}
}
-function torrentPosterFromImage (file, torrent, cb) {
+function torrentPosterFromImage (torrent, cb) {
+ const file = getLargestFileByExtension(torrent, mediaExtensions.image)
+
const extname = path.extname(file.name)
file.getBuffer((err, buf) => cb(err, buf, extname))
}
| 7 |
diff --git a/contracts/Synthetix.sol b/contracts/Synthetix.sol @@ -146,7 +146,7 @@ contract Synthetix is ExternStateToken {
SynthetixState public synthetixState;
uint constant SYNTHETIX_SUPPLY = 1e8 * SafeDecimalMath.unit();
- string constant TOKEN_NAME = "Synthetix";
+ string constant TOKEN_NAME = "Synthetix Network Token";
string constant TOKEN_SYMBOL = "SNX";
uint8 constant DECIMALS = 18;
| 10 |
diff --git a/README.md b/README.md -<div align="center">
+<p align="center"><img src="https://i.imgur.com/KOyCJ9y.jpg"></p>
-
+<h1 align="center">SpaceX REST API</h1>
-# SpaceX REST API
+<p align="center">
+<a href="https://travis-ci.org/r-spacex/SpaceX-API"><img src="https://img.shields.io/travis/r-spacex/SpaceX-API.svg?style=flat-square"></a>
+<a href="https://hub.docker.com/r/jakewmeyer/spacex-api/"><img src="https://img.shields.io/docker/build/jakewmeyer/spacex-api.svg?style=flat-square"></a>
+<a href="https://github.com/r-spacex/SpaceX-API/releases"><img src="https://img.shields.io/github/release/r-spacex/SpaceX-API.svg?style=flat-square"></a>
+<a href="https://en.wikipedia.org/wiki/Representational_state_transfer"><img src="https://img.shields.io/badge/interface-REST-brightgreen.svg?style=flat-square"></a>
+</p>
-[](https://travis-ci.org/r-spacex/SpaceX-API)
-[](https://hub.docker.com/r/jakewmeyer/spacex-api/)
-[]()
-[]()
-
-### Open Source REST API for rocket, core, capsule, pad, and launch data
-<br></br>
-
-</div>
+<h3 align="center">Open Source REST API for rocket, core, capsule, pad, and launch data</h3>
## Documentation
See the [Wiki](https://github.com/r-spacex/SpaceX-API/wiki) for full API Documentation
| 3 |
diff --git a/app/assets/src/components/ProjectSelection.jsx b/app/assets/src/components/ProjectSelection.jsx @@ -200,12 +200,13 @@ import Samples from './Samples';
return 0;
};
- const fav_section = (
- <div className="row fav-row">
+ const favProjLen = this.state.formattedFavProjectList.length;
+ var fav_section = (<div></div>)
+ if (favProjLen) {
+ fav_section = (<div className="row fav-row">
<div className="title">Favorite Projects</div>
<div className="fav-projects-wrapper projects-wrapper">
- {!this.state.formattedFavProjectList.length ?
- <div className='title'>None</div> :
+ {
this.state.showLessFavorites ?
this.state.formattedFavProjectList
.sort(sortLogic)
@@ -249,8 +250,8 @@ import Samples from './Samples';
: null
}
</div>
- </div>
- )
+ </div>);
+ }
const all_projects_section = (
<div className="projects">
| 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.