code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/content/knowledge-base/import-variables-from-secret-manager.md b/content/knowledge-base/import-variables-from-secret-manager.md @@ -155,7 +155,7 @@ You will need to configure the environment variables `DOPPLER_TOKEN` in the Code
Environment variables can be added at application level, or if you are using a Team, they can be added in the **Global variables and secrets** section of you Team settings.
-Add these variables to a group called `doopler_credentials`.
+Add these variables to a group called `doppler_credentials`.
### Storing a secret in Doppler
To store a secret in Doppler, do the following:
@@ -180,30 +180,39 @@ You can create a new Doppler service token as follows:
### Install the Doppler CLI
The Codemagic base build image doesn't have the Doppler CLI by default, so we need to install it first.
-The following example shows how to install the Doppler CLI using brew.
+The following example shows how to install the Doppler CLI:
+`MacOS`:
```
-- name: Install the Doppler CLI
+ - name: Install doppler on Mac
script: |
brew install gnupg
brew install dopplerhq/cli/doppler
```
-
-After installing the CLI, you should export the `DOPPLER_TOKEN` so the other doppler commands will be authorized.
-
+`Linux`:
+```
+ - name: Install doppler on Linux
+ script: |
+ (curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh || wget -t 3 -qO- https://cli.doppler.com/install.sh) | sudo sh
```
-- name: Add the Doppler token to CM_ENV
+`Windows`:
+```
+ - name: Install doppler on Windows
script: |
- echo "DOPPLER_TOKEN=$DOPPLER_TOKEN" >> $CM_ENV
+ Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
+ iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
+ scoop bucket add doppler https://github.com/DopplerHQ/scoop-doppler.git
+ scoop install doppler
```
+See the official docs in [here](https://docs.doppler.com/docs/cli#installation).
### Retrieving secrets using the Doppler CLI
Secrets can be retrieved from Doppler using the Doppler CLI.
-The following example shows how to retrieve a secret called `APP_STORE_CONNECT_ISSUER_ID` as plain text.
+The following example shows how to retrieve a secret called `APP_STORE_CONNECT_ISSUER_ID` as plain text and add it to the System Environment directly.
```
-- name: Set vars from Doppler
+- name: Retrieve vars from Doppler
script: |
echo "APP_STORE_CONNECT_ISSUER_ID=$(doppler secrets get APP_STORE_CONNECT_ISSUER_ID --plain)" >> $CM_ENV
```
@@ -215,10 +224,30 @@ If you want to retrieve a secret with multiline variable, like the `GCLOUD_SERVI
echo "$(doppler secrets get GCLOUD_SERVICE_ACCOUNT_CREDENTIALS --plain)" >> $CM_ENV
echo "DELIMITER" >> $CM_ENV
```
-
+{{</notebox>}}
Notice that if you add the `GCLOUD_SERVICE_ACCOUNT_CREDENTIALS` make sure you choose **No** when it asks you to replace `\n` with new lines.
+{{</notebox>}}
+You can download all of your secrets and add them at once to your environment:
+```
+doppler secrets download --no-read-env --no-file --format env-no-quotes --config $DOPPLER_ENV --token $DOPPLER_TOKEN >> $CM_ENV
+```
+Make sure to set the `$DOPPLER_ENV` variable in the **vars** section.
+```
+environment:
+ groups:
+ - doppler_credentials # <-- (Includes the $DOPPLER_TOKEN)
+ vars:
+ DOPPLER_ENV: dev
+```
+{{</notebox>}}
+1. If you are using a `windows_x2` machine notice that you should add the doppler path to the system path at the beginning of each script like this:
+```
+$env:Path += ";C:\Users\builder\scoop\shims"
+```
+2. When accessing the environment variables on the windows you can do so like this: `$env:VAR_NAME`, see more [here](../troubleshooting/common-windows-issues/).
+{{</notebox>}}
## Hashicorp Vault
The following documentation shows how to use secrets stored in Hashicorp Vault.
| 3 |
diff --git a/src/index.js b/src/index.js @@ -25,7 +25,11 @@ function renderApp() {
function hydrateApp() {
ReactDOM.hydrateRoot(
document.getElementById("application"),
- <App appWrapperRef={Scrivito.updateContent} />
+ <App
+ appWrapperRef={(el) => {
+ if (el) Scrivito.updateContent();
+ }}
+ />
);
}
| 9 |
diff --git a/src/inertia.js b/src/inertia.js @@ -18,7 +18,7 @@ export default {
this.setPage(window.history.state)
} else {
this.setPage(page)
- this.setState(true, window.location.pathname + window.location.search, page)
+ this.setState(page)
}
window.addEventListener('popstate', this.restoreState.bind(this))
@@ -86,7 +86,7 @@ export default {
}).then(page => {
if (page) {
this.version = page.version
- this.setState(replace || page.url === window.location.pathname + window.location.search, page.url, page)
+ this.setState(page, replace)
this.setPage(page).then(() => {
this.setScroll(preserveScroll)
this.hideProgressBar()
@@ -109,8 +109,9 @@ export default {
}
},
- setState(replace = false, url, page) {
- window.history[replace ? 'replaceState' : 'pushState'](page, '', url)
+ setState(page, replace = false) {
+ replace = replace || page.url === window.location.pathname + window.location.search
+ window.history[replace ? 'replaceState' : 'pushState'](page, '', page.url)
},
restoreState(event) {
@@ -143,16 +144,13 @@ export default {
return this.visit(url, { ...options, method: 'delete' })
},
- cache(data) {
+ remember(data, key = 'default') {
WatchJS.watch(data, () => {
- this.setState(true, window.location.pathname + window.location.search, {
- ...window.history.state,
- cache: { ...data },
- })
+ this.setState({ ...window.history.state, cache: { [key]: { ...data } } })
})
- if (window.history.state.cache) {
- return _.merge(data, window.history.state.cache)
+ if (window.history.state.cache && window.history.state.cache[key]) {
+ return _.merge(data, window.history.state.cache[key])
}
return data
| 10 |
diff --git a/_data/conferences.yml b/_data/conferences.yml place: Las Vegas, USA
sub: RO
-- title: ICPR
- year: 2020
- id: icpr20
- link: https://www.micc.unifi.it/icpr2020
- deadline: '2020-03-02 23:59:59'
- timezone: UTC+1
- date: Sep 13-18, 2020
- place: Milan, Italy
- sub: CV
-
- title: ECCV
year: 2020
id: eccv20
sub: CV
note: '<b>NOTE</b>: Intent to submit deadline on Mar 03, 2020. More info <a href=''https://www.miccai2020.org/''>here</a>.'
+- title: ICPR
+ year: 2020
+ id: icpr20
+ link: https://www.micc.unifi.it/icpr2020
+ deadline: '2020-03-18 23:59:59'
+ timezone: UTC+1
+ date: Sep 13-18, 2020
+ place: Milan, Italy
+ sub: CV
+
- title: ECML-PKDD
year: 2020
id: ecmlpkdd2020
| 3 |
diff --git a/source/shaders/ibl_filtering.frag b/source/shaders/ibl_filtering.frag @@ -172,8 +172,8 @@ float PDF(vec3 H, vec3 N, float roughness)
return 0.f;
}
-// getSampleVector returns an importance sample direction with pdf in the .w component
-vec4 getSampleVector(int sampleIndex, vec3 N, float roughness)
+// getImportanceSample returns an importance sample direction with pdf in the .w component
+vec4 getImportanceSample(int sampleIndex, vec3 N, float roughness)
{
vec2 hammersleyPoint = hammersley2d(sampleIndex, u_sampleCount);
float u = hammersleyPoint.x;
@@ -231,7 +231,7 @@ vec3 filterColor(vec3 N)
for(int i = 0; i < u_sampleCount; ++i)
{
- vec4 importanceSample = getSampleVector(i, N, u_roughness);
+ vec4 importanceSample = getImportanceSample(i, N, u_roughness);
vec3 H = vec3(importanceSample.xyz);
float pdf = importanceSample.w;
@@ -310,7 +310,7 @@ vec3 LUT(float NdotV, float roughness)
for(int i = 0; i < u_sampleCount; ++i)
{
// Importance sampling, depending on the distribution.
- vec3 H = getSampleVector(i, N, roughness).xyz;
+ vec3 H = getImportanceSample(i, N, roughness).xyz;
vec3 L = normalize(reflect(-V, H));
float NdotL = saturate(L.z);
| 10 |
diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js @@ -28,8 +28,7 @@ function canUseChronos() {
* @returns {Boolean}
*/
function canUseIOU() {
- // return _.contains(betas, CONST.BETAS.IOU) || canUseAllBetas();
- return true;
+ return _.contains(betas, CONST.BETAS.IOU) || canUseAllBetas();
}
export default {
| 13 |
diff --git a/renderer/components/onboard/Sections.js b/renderer/components/onboard/Sections.js @@ -95,6 +95,11 @@ const ChangeLink = styled.a`
}
`
+const HeadsUpList = styled.li`
+ margin-top: 20px;
+ margin-bottom: 20px;
+`
+
const QuizActually = ({text, onBack, onContinue}) => (
<QuizModal width={400} bg={theme.colors.gray7}>
<Heading center h={3}>
@@ -229,10 +234,9 @@ const SectionThingsToKnow = ({onNext, quizActive, quizComplete, toggleQuiz, onQu
<Box width={1} p={4}>
<Container width={700}>
<ul>
- <li><FormattedMessage id="Onboarding.ThingsToKnow.Bullet.1" /></li>
- <li><FormattedMessage id="Onboarding.ThingsToKnow.Bullet.2" /></li>
- <li><FormattedMessage id="Onboarding.ThingsToKnow.Bullet.3" /></li>
- <li><FormattedMessage id="Onboarding.ThingsToKnow.Bullet.4" /></li>
+ <HeadsUpList><FormattedMessage id="Onboarding.ThingsToKnow.Bullet.1" /></HeadsUpList>
+ <HeadsUpList><FormattedMessage id="Onboarding.ThingsToKnow.Bullet.2" /></HeadsUpList>
+ <HeadsUpList><FormattedMessage id="Onboarding.ThingsToKnow.Bullet.3" /></HeadsUpList>
</ul>
</Container>
</Box>
| 7 |
diff --git a/cli/jdl.js b/cli/jdl.js @@ -46,11 +46,8 @@ const downloadFile = (url, filename) => {
logger.debug(`Creating file: ${path.join(filename)}`);
const fileStream = fs.createWriteStream(`${filename}`);
- fileStream.on('finish', () => {
- fileStream.close(() => {
- resolve(filename);
- });
- });
+ fileStream.on('finish', () => fileStream.close());
+ fileStream.on('close', () => resolve(filename));
response.pipe(fileStream);
return undefined;
})
| 2 |
diff --git a/public/live.html b/public/live.html cancel() {
this.stop();
}
- /* extra() {
- var AUDIO_RECORDER_WORKER = 'js/audioRecorderWorker.js';
- var AudioRecorder = function(source, cfg) {
- this.consumers = [];
- var config = cfg || {};
- var errorCallback = config.errorCallback || function() {};
- var inputBufferLength = config.inputBufferLength || 4096;
- var outputBufferLength = config.outputBufferLength || 4000;
- this.context = source.context;
- this.node = this.context.createScriptProcessor(inputBufferLength);
- var worker = new Worker(config.worker || AUDIO_RECORDER_WORKER);
- worker.postMessage({
- command: 'init',
- config: {
- sampleRate: this.context.sampleRate,
- outputBufferLength: outputBufferLength,
- outputSampleRate: (config.outputSampleRate || 16000)
- }
- });
- var recording = false;
- this.node.onaudioprocess = function(e) {
- // console.log('audio process');
- if (!recording) return;
- worker.postMessage({
- command: 'record',
- buffer: [
- e.inputBuffer.getChannelData(0),
- e.inputBuffer.getChannelData(1)
- ]
- });
- };
- this.start = function(data) {
- // console.log('start', data, source);
- this.consumers.forEach(function(consumer, y, z) {
- consumer.postMessage({ command: 'start', data: data });
- recording = true;
- return true;
- });
- recording = true;
- return (this.consumers.length > 0);
- };
- this.stop = function() {
- if (recording) {
- this.consumers.forEach(function(consumer, y, z) {
- consumer.postMessage({ command: 'stop' });
- });
- recording = false;
- }
- worker.postMessage({ command: 'clear' });
- };
- this.cancel = function() {
- this.stop();
- };
- myClosure = this;
- worker.onmessage = function(e) {
- if (e.data.error && (e.data.error == "silent")) errorCallback("silent");
- if ((e.data.command == 'newBuffer') && recording) {
- myClosure.consumers.forEach(function(consumer, y, z) {
- consumer.postMessage({ command: 'process', data: e.data.data });
- });
- }
- };
- source.connect(this.node);
- this.node.connect(this.context.destination);
- };
- window.AudioRecorder = AudioRecorder;
- } */
}
| 2 |
diff --git a/tests/kits/test/src/integration.test.js b/tests/kits/test/src/integration.test.js @@ -21,13 +21,13 @@ function runIntegrationTest({ kit }, action) {
run(`node ../../../packages/cli/lib/bin/oz-cli.js unpack ${kit}`);
});
- // have to replace zos with local version so we test current build
- it('replace zos with local version', function() {
+ // have to replace oz with local version so we test current build
+ it('replace oz with local version', function() {
run(`${findUp.sync('node_modules/.bin/lerna')} bootstrap --scope=tests-cli-kits --scope="@openzeppelin/*"`);
});
- it('init zos project', function() {
- run(`npx zos init ${kit} 1.0.0 --no-interactive`);
+ it('init oz project', function() {
+ run(`npx oz init ${kit} 1.0.0 --no-interactive`);
});
action();
@@ -39,27 +39,30 @@ function runIntegrationTest({ kit }, action) {
after('cleaning up project folder', cleanup);
}
-// TODO-v3: Remove legacy support
-describe(`Unpacks a ZepKit on ${network}`, function() {
- runIntegrationTest({ kit: 'zepkit' }, function() {});
-});
-
-describe(`Unpack a Starter kit on ${network}`, function() {
+describe(`Unpack a Starter Kit on the ${network}`, function() {
runIntegrationTest({ kit: 'starter' }, function() {});
});
-describe(`Unpack a Tutorial kit on ${network}`, function() {
+describe(`Unpack a Tutorial Kit on the ${network}`, function() {
runIntegrationTest({ kit: 'tutorial' }, function() {
it('Add Counter contract', function() {
- run(`npx zos add Counter`);
+ run(`npx oz add Counter`);
+ });
+
+ it(`Create a Counter proxy on the ${network}`, function() {
+ run(`npx oz create Counter --init initialize --args 2 --network ${network}`);
+ });
+ });
});
- it(`Push contracts on a ${network}`, function() {
- run(`npx zos push --network ${network}`);
+describe(`Unpack a GSN Kit on the ${network}`, function() {
+ runIntegrationTest({ kit: 'gsn' }, function() {
+ it('Add Counter contract', function() {
+ run(`npx oz add Counter`);
});
- it(`Create a Counter proxy on a ${network}`, function() {
- run(`npx zos create Counter --init initialize --args 2 --network ${network}`);
+ it(`Create a Counter proxy on the ${network}`, function() {
+ run(`npx oz create Counter --init initialize --args 2 --network ${network}`);
});
});
});
| 14 |
diff --git a/lib/Chunk.js b/lib/Chunk.js @@ -261,12 +261,12 @@ class Chunk {
this.modules.forEach(m => m.updateHash(hash));
}
- canBeIntegrated(other) {
- if(other.isInitial()) {
+ canBeIntegrated(otherChunk) {
+ if(otherChunk.isInitial()) {
return false;
}
if(this.isInitial()) {
- if(other.parents.length !== 1 || other.parents[0] !== this) {
+ if(otherChunk.parents.length !== 1 || otherChunk.parents[0] !== this) {
return false;
}
}
@@ -292,13 +292,13 @@ class Chunk {
return this.addMultiplierAndOverhead(this.modulesSize(), options);
}
- integratedSize(other, options) {
+ integratedSize(otherChunk, options) {
// Chunk if it's possible to integrate this chunk
- if(!this.canBeIntegrated(other)) {
+ if(!this.canBeIntegrated(otherChunk)) {
return false;
}
- const modulesSize = this.modulesSize() + other.modulesSize();
+ const modulesSize = this.modulesSize() + otherChunk.modulesSize();
return this.addMultiplierAndOverhead(modulesSize, options);
}
| 10 |
diff --git a/avatars/util.mjs b/avatars/util.mjs @@ -516,3 +516,37 @@ export const getModelBones = object => {
Right_toe,
};
};
+
+export const cloneModelBones = modelBones => {
+ const result = {};
+ const nameToDstBoneMap = {};
+ for (const k in modelBones) {
+ const srcBone = modelBones[k];
+ const dstBone = new THREE.Bone();
+ dstBone.name = srcBone.name;
+ dstBone.position.copy(srcBone.position);
+ dstBone.quaternion.copy(srcBone.quaternion);
+ result[k] = dstBone;
+ nameToDstBoneMap[dstBone.name] = dstBone;
+ }
+ modelBones.Root.traverse(srcBone => {
+ if (!nameToDstBoneMap[srcBone.name]) {
+ const dstBone = new THREE.Bone();
+ dstBone.position.copy(srcBone.position);
+ dstBone.quaternion.copy(srcBone.quaternion);
+ nameToDstBoneMap[srcBone.name] = dstBone;
+ }
+ });
+ const _recurse = srcBone => {
+ if (srcBone.children.length > 0) {
+ const dstBone = nameToDstBoneMap[srcBone.name];
+ for (const childSrcBone of srcBone.children) {
+ const childDstBone = nameToDstBoneMap[childSrcBone.name];
+ dstBone.add(childDstBone);
+ _recurse(childSrcBone);
+ }
+ }
+ };
+ _recurse(modelBones.Root);
+ return result;
+};
\ No newline at end of file
| 0 |
diff --git a/app/models/synchronization/adapter.rb b/app/models/synchronization/adapter.rb @@ -140,11 +140,7 @@ module CartoDB
table_statements = @table_setup.generate_table_statements(schema, table_name)
temporary_name = temporary_name_for(result.table_name)
- database.transaction do
- rename(table_name, temporary_name) if exists?(table_name)
- drop(temporary_name) if exists?(temporary_name)
- rename(result.table_name, table_name)
- end
+ swap_tables(table_name, temporary_name, result)
@table_setup.fix_oid(table_name)
@table_setup.update_cdb_tablemetadata(table_name)
@table_setup.run_table_statements(table_statements, @database)
@@ -389,6 +385,25 @@ module CartoDB
private
+ def swap_tables(table_name, temporary_name, result)
+ database.transaction do
+ rename(table_name, temporary_name) if exists?(table_name)
+ drop(temporary_name) if exists?(temporary_name)
+ rename(result.table_name, table_name)
+ end
+ rescue Exception => exception
+ if exception.message.include?('canceling statement due to statement timeout')
+ sleep(60) # wait 60 seconds and retry the swap
+ database.transaction do
+ rename(table_name, temporary_name) if exists?(table_name)
+ drop(temporary_name) if exists?(temporary_name)
+ rename(result.table_name, table_name)
+ end
+ else
+ raise exception
+ end
+ end
+
def valid_cartodb_id_candidate?(user, table_name, qualified_table_name, col_name)
return false unless column_names(user, table_name).include?(col_name)
user.transaction_with_timeout(statement_timeout: STATEMENT_TIMEOUT, as: :superuser) do |db|
| 9 |
diff --git a/docs/component/vector-layer.md b/docs/component/vector-layer.md > Renders vector data
-`vl-layer-vector` can render vector from verious backend services. It should be
+`vl-layer-vector` can render vector from various backend services. It should be
used with together with [`vl-source-vector`](/docs/component/vector-source.md) component.
## ES6 Module
@@ -16,7 +16,7 @@ Vue.use(VectorLayer)
## Usage
Example below shows how you can use `vl-layer-vector` and [`vl-source-vector`](/docs/component/vector-source.md) to render some
-vector vector features from remote backend.
+vector features from remote backend.
<vuep template="#usage-example"></vuep>
| 7 |
diff --git a/articles/policies/rate-limits.md b/articles/policies/rate-limits.md @@ -170,27 +170,8 @@ The following Auth0 Management API endpoints return rate limit-related headers.
The following Auth0 Authentication API endpoints return rate limit-related headers:
-<table class="table">
- <tr>
- <th><strong>Endpoint</strong></th>
- <th><strong>GET</strong></th>
- <th><strong>POST</strong></th>
- </tr>
- <tr>
- <td>User Profile</td>
- <td>/userinfo</td>
- <td>/tokeninfo</td>
- </tr>
- <tr>
- <td>Delegated Authentication<sup>*</sup></td>
- <td></td>
- <td>/delegation</td>
- </tr>
- <tr>
- <td>Database and Active Directory / LDAP Authentication</td>
- <td></td>
- <td>/dbconnections/change_password</td>
- </tr>
-</table>
-
-**The `/delegation` endpoint limits up to 10 requests per minute from the same IP address with the same user_id*
+| Endpoint | Scope | GET | POST |
+| - | - | - | - |
+| User Profile | Per User ID (GET), Per IP (POST) | /userinfo | /tokeninfo |
+| Delegated Authentication | Per User ID per IP | | /delegation |
+| Database and Active Directory / LDAP Authentication | Per User ID Per IP | | /dbconnections/change_password |
\ No newline at end of file
| 0 |
diff --git a/articles/tokens/preview/refresh-token.md b/articles/tokens/preview/refresh-token.md @@ -128,10 +128,6 @@ The response will include a new `access_token`, its type, its lifetime (in secon
You should only ask for a new token if the `access_token` has expired or you want to refresh the claims contained in the `id_token`. For example, it's a bad practice to call the endpoint to get a new `access_token` every time you call an API. There are rate limits in Auth0 that will throttle the amount of requests to this endpoint that can be executed using the same token from the same IP.
:::
-::: panel-warning Refresh tokens and Rules
-Refresh tokens do not run [rules](/rules) at the moment, but we will add support for this in the future.
-:::
-
## Revoke a Refresh Token
@@ -197,12 +193,12 @@ To revoke the user's access to an authorized application, and hence invalidate t
## Rules
-Rules will run for the Refresh Token Exchange. There are two key differences in the behavior of rules in this flow:
+Rules will run for the [Refresh Token Exchange](#use-a-refresh-token). There are two key differences in the behavior of rules in this flow:
-- If you try to do a redirect with context.redirect, the authentication flow will return an error.
-- If you try to do MFA by setting context.multifactor, the authentication flow will return an error.
+- If you try to do a [redirect](/rules/redirect) with `context.redirect`, the authentication flow will return an error.
+- If you try to do MFA by setting `context.multifactor`, the authentication flow will return an error.
-If you wish to execute special logic unique to the Refresh Token exchange, you can look at the `context.protocol` property in your rule. If the value is `oauth2-refresh-token`, then this is the indication that the rule is running during the Refresh Token exchange.
+If you wish to execute special logic unique to the [Refresh Token Exchange](#use-a-refresh-token), you can look at the `context.protocol` property in your rule. If the value is `oauth2-refresh-token`, then this is the indication that the rule is running during the Refresh Token exchange.
## SDK Support
| 2 |
diff --git a/contracts/Nomin.sol b/contracts/Nomin.sol @@ -175,27 +175,27 @@ contract Nomin is ExternStateFeeToken {
}
/* Allow havven to issue a certain number of
- * nomins from a target address */
- function issue(address target, uint amount)
+ * nomins from an account. */
+ function issue(address account, uint amount)
external
onlyHavven
{
- state.setBalanceOf(target, safeAdd(state.balanceOf(target), amount));
+ state.setBalanceOf(account, safeAdd(state.balanceOf(account), amount));
totalSupply = safeAdd(totalSupply, amount);
- emitTransfer(address(0), target, amount);
- emitIssued(target, amount);
+ emitTransfer(address(0), account, amount);
+ emitIssued(account, amount);
}
/* Allow havven to burn a certain number of
- * nomins from a target address */
- function burn(address target, uint amount)
+ * nomins from an account. */
+ function burn(address account, uint amount)
external
onlyHavven
{
- state.setBalanceOf(target, safeSub(state.balanceOf(target), amount));
+ state.setBalanceOf(account, safeSub(state.balanceOf(account), amount));
totalSupply = safeSub(totalSupply, amount);
- emitTransfer(target, address(0), amount);
- emitBurned(target, amount);
+ emitTransfer(account, address(0), amount);
+ emitBurned(account, amount);
}
/* ========== MODIFIERS ========== */
| 10 |
diff --git a/apps/wohrm/wohrm.js b/apps/wohrm/wohrm.js @@ -14,6 +14,8 @@ let limitSetter = Setter.NONE;
let currentHeartRate = 0;
let hrConfidence = -1;
+let setterHighlightTimeout;
+
function drawTrainingHeartRate() {
renderButtonIcons();
@@ -34,7 +36,6 @@ function renderUpperLimit() {
g.fillRect(180,70, 210, 200);
//Round top left corner
- g.setColor(255,0,0);
g.fillEllipse(115,40,135,70);
//Round top right corner
@@ -44,7 +45,6 @@ function renderUpperLimit() {
g.fillEllipse(190,40,210,50);
//Round inner corner
- g.setColor(255,0,0);
g.fillRect(174,71, 179, 76);
g.setColor(0,0,0);
g.fillEllipse(160,71,179,82);
@@ -53,12 +53,11 @@ function renderUpperLimit() {
g.setColor(255,0,0);
g.fillEllipse(180,190, 210, 210);
- // if(limitSetter === Setter.UPPER){
- // g.setColor(255,255, 255);
- // g.drawPoly([140,40,230,40,230,210,200,210,200,70,140,70], false);
- // }
-
+ if(limitSetter === Setter.UPPER){
+ g.setColor(255,255, 0);
+ } else {
g.setColor(255,255,255);
+ }
g.setFontVector(10);
g.drawString("Upper : " + upperLimit, 130,50);
}
@@ -68,7 +67,13 @@ function renderCurrentHeartRate() {
g.fillRect(45, 110, 165, 140);
g.setColor(0,0,0);
g.setFontVector(13);
- g.drawString("Current: " + currentHeartRate, 65,117);
+
+ g.drawString("Current:" , 65,117);
+ g.setFontAlign(1, -1, 0);
+ g.drawString(currentHeartRate, 155, 117);
+
+ //Reset alignment to defaults
+ g.setFontAlign(-1, -1, 0);
}
function renderLowerLimit() {
@@ -96,12 +101,11 @@ function renderLowerLimit() {
g.setColor(0,0,255);
g.fillEllipse(10,200,30,210);
- // if(limitSetter === Setter.LOWER){
- // g.setColor(255,255, 255);
- // g.drawPoly([10,40,40,40,40,180,100,180,100,210,10,210], true);
- // }
-
+ if(limitSetter === Setter.LOWER){
+ g.setColor(255,255, 0);
+ } else {
g.setColor(255,255,255);
+ }
g.setFontVector(10);
g.drawString("Lower : " + lowerLimit, 20,190);
}
@@ -161,6 +165,8 @@ function onHrm(hrm){
}
function setLimitSetterToLower() {
+ resetHighlightTimeout();
+
limitSetter = Setter.LOWER;
console.log("Limit setter is lower");
renderUpperLimit();
@@ -168,18 +174,29 @@ function setLimitSetterToLower() {
}
function setLimitSetterToUpper() {
+ resetHighlightTimeout();
+
limitSetter = Setter.UPPER;
console.log("Limit setter is upper");
renderLowerLimit();
renderUpperLimit();
}
+function setLimitSetterToNone() {
+ limitSetter = Setter.NONE;
+ console.log("Limit setter is none");
+ renderLowerLimit();
+ renderUpperLimit();
+}
+
function incrementLimit(){
+ resetHighlightTimeout();
+
if (limitSetter === Setter.UPPER) {
upperLimit++;
renderUpperLimit();
console.log("Upper limit: " + upperLimit);
- } else {
+ } else if(limitSetter === Setter.LOWER) {
lowerLimit++;
renderLowerLimit();
console.log("Lower limit: " + lowerLimit);
@@ -187,17 +204,25 @@ function incrementLimit(){
}
function decrementLimit(){
+ resetHighlightTimeout();
+
if (limitSetter === Setter.UPPER) {
upperLimit--;
renderUpperLimit();
console.log("Upper limit: " + upperLimit);
- } else {
+ } else if(limitSetter === Setter.LOWER) {
lowerLimit--;
renderLowerLimit();
console.log("Lower limit: " + lowerLimit);
}
}
+function resetHighlightTimeout() {
+ if(setterHiglightTimeout !== undefined)
+ clearTimeout(setterHighlightTimeout);
+ setterHighlightTimeout = setTimeout(setLimitSetterToNone, 5000);
+}
+
// Show launcher when middle button pressed
function switchOffApp(){
Bangle.setHRMPower(0);
| 7 |
diff --git a/assets/scss/_article.scss b/assets/scss/_article.scss }
}
.ctc {
- display: inline;
- font-size: 0.75em;
+ display: inline-block;
margin-left: 0.5em;
vertical-align: middle;
opacity: 0;
cursor: pointer;
- color: $blue;
transition: all 300ms ease-in-out;
+ @include icon(getAssetUrl('media/icons/link.svg'));
+ background-color: $blue;
}
.notebox {
background: $grey-xl;
| 3 |
diff --git a/src/templates/actors/parts/actor-traits.html b/src/templates/actors/parts/actor-traits.html {{#if (eq negatedBy "")}}
-
{{else}}
- {{console this}}
{{#if (lookup ../config.damageReductionTypes negatedBy)}}
{{lookup ../config.damageReductionTypes negatedBy}}
{{else}}
| 2 |
diff --git a/uppy-react-native/App.js b/uppy-react-native/App.js @@ -29,11 +29,6 @@ function urlToBlob (url) {
})
}
-// var blob = new Blob(
-// ['data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTIwIDEyMCI+CiAgPGNpcmNsZSBjeD0iNjAiIGN5PSI2MCIgcj0iNTAiLz4KPC9zdmc+Cg=='],
-// { type: 'image/svg+xml' }
-// )
-
export default class App extends React.Component {
constructor () {
super()
@@ -52,11 +47,7 @@ export default class App extends React.Component {
componentDidMount () {
this.uppy = Uppy({ autoProceed: false, debug: true })
this.uppy.use(XHRUpload, {
- endpoint: 'http://b519d44f.ngrok.io/upload.php',
- fieldName: 'my_file'
- // getResponseData: (responseText, response) => {
- // console.log(responseText)
- // }
+ endpoint: 'http://192.168.1.7:7000/',
})
// this.uppy.use(Tus, { endpoint: 'https://master.tus.io/files/' })
this.uppy.on('upload-progress', (file, progress) => {
@@ -72,43 +63,68 @@ export default class App extends React.Component {
console.log('tadada!')
console.log(this.uppy.state.files)
})
- // this.uppy.addFile({
- // source: 'ReactNative',
- // name: 'test-file.svg',
- // type: blob.type,
- // data: blob
- // })
}
addFileToUppy (file) {
console.log(file)
- urlToBlob(file.base64)
- .then(blob => {
- console.log(blob)
+ var photo = {
+ uri: file.uri,
+ type: file.type,
+ name: 'photo.jpg',
+ }
+
this.uppy.addFile({
source: 'React Native',
- name: 'fileName.jpg',
- type: blob.type,
- data: blob
- })
+ name: 'photo.jpg',
+ type: file.type,
+ data: photo
})
- // console.log('there is a file:', this.uppy.state.files)
}
+ // uploadFileDirecrly (file) {
+ // var photo = {
+ // uri: file.uri,
+ // type: file.type,
+ // name: 'photo.jpg',
+ // };
+
+ // var data = new FormData();
+ // data.append('photo', photo);
+
+ // // Create the config object for the POST
+ // // You typically have an OAuth2 token that you use for authentication
+ // const config = {
+ // method: 'POST',
+ // headers: {
+ // Accept: 'application/json',
+ // 'Content-Type': 'multipart/form-data;'
+ // },
+ // body: data
+ // };
+
+ // fetch('http://192.168.1.7:7000/', config)
+ // .then(responseData => {
+ // // Log the response form the server
+ // // Here we get what we sent to Postman back
+ // console.log(responseData);
+ // })
+ // .catch(err => {
+ // console.log(err);
+ // });
+ // }
+
selectPhotoTapped () {
console.log('SELECT PHOTO')
Permissions.askAsync(Permissions.CAMERA_ROLL).then((isAllowed) => {
if (!isAllowed) return
- ImagePicker.launchImageLibraryAsync({
- // allowsEditing: true,
- base64: true
- })
+ ImagePicker.launchImageLibraryAsync({})
.then((result) => {
console.log(result)
if (!result.cancelled) {
this.setState({ file: result })
+ // this.uploadFileDirecrly(result)
this.addFileToUppy(result)
}
})
| 1 |
diff --git a/reader/readerContent.css b/reader/readerContent.css @@ -130,6 +130,24 @@ blockquote {
margin: 1.5em 0;
}
+table {
+ border-collapse: collapse;
+}
+
+td, th {
+ padding: 0.25em;
+ border: 1px #ddd solid;
+ text-align: center;
+}
+
+.dark-mode td, .dark-mode th {
+ border-color: #444;
+}
+
+td li, th li {
+ text-align: left;
+}
+
/* dark theme */
body.dark-mode {
| 7 |
diff --git a/lib/update-fetch.js b/lib/update-fetch.js @@ -163,10 +163,15 @@ exportables.downloadTgz = function(tgzUrl, fileMap) {
return resolve(files);
});
-
remote.ifReachable(remote.BUILDS_HOSTNAME).then(() => {
+
var req = request.get(tgzUrl);
+ var startTimeout = () => setTimeout(() => {
+ reject(new Error('The attempt to download a build has timed out. Check your network connection and try again.'));
+ }, 10000);
+ var timeout = startTimeout();
+
// When we receive the response
req.on('response', (res) => {
@@ -185,6 +190,8 @@ exportables.downloadTgz = function(tgzUrl, fileMap) {
// When we get incoming data, update the progress bar
res.on('data', (chunk) => {
bar.tick(chunk.length);
+ clearTimeout(timeout);
+ timeout = startTimeout();
});
// unzip and extract the binary tarball
| 12 |
diff --git a/samples/javascript_nodejs/11.qnamaker/README.md b/samples/javascript_nodejs/11.qnamaker/README.md @@ -29,24 +29,32 @@ This bot uses [QnA Maker Service](https://www.qnamaker.ai), an AI based cognitiv
QnA knowledge base setup and application configuration steps can be found [here](https://aka.ms/qna-instructions).
-# To try this sample
+## To try this sample
+
- Clone the repository
+
```bash
git clone https://github.com/microsoft/botbuilder-samples.git
```
-- In a terminal, navigate to `experimental/qnamaker-multiturn-bot/javascript_nodejs`
+
+- In a terminal, navigate to `samples/javascript_nodejs/11.qnamaker`
+
```bash
- cd experimental/qnamaker-multiturn-bot/javascript_nodejs
+ cd samples/javascript_nodejs/11.qnamaker
```
+
- Install modules
+
```bash
npm install
```
+
- Setup QnAMaker
- The prerequisite outlined above contain the steps necessary to provision a QnA Knowledge Base on www.qnamaker.ai. QnA knowledge base setup and application configuration steps can be found [here](https://aka.ms/qna-instructions).
+ The prerequisite outlined above contain the steps necessary to provision a QnA Knowledge Base on www.qnamaker.ai. Refer to [Use QnA Maker to answer questions][41] for directions to setup and configure QnAMaker.
+
+- Run the sample
-- Start the bot
```bash
npm start
```
| 3 |
diff --git a/src/plots/cartesian/axes.js b/src/plots/cartesian/axes.js @@ -2298,13 +2298,13 @@ axes.draw = function(gd, arg, opts) {
if(plotinfo) {
var xa = plotinfo.xaxis;
var ya = plotinfo.yaxis;
- isSyncAxis(xa, arg[0]);
- isSyncAxis(ya, arg[0]);
+ addSyncAxis(xa, arg[0]);
+ addSyncAxis(ya, arg[0]);
}
});
}
- function isSyncAxis(ax, idToValidate) {
+ function addSyncAxis(ax, idToValidate) {
if(ax.tickmode === 'sync' && ax.overlaying === idToValidate) {
arg.push(ax._id);
}
| 10 |
diff --git a/packages/openneuro-server/libs/authentication/passport.js b/packages/openneuro-server/libs/authentication/passport.js @@ -132,7 +132,7 @@ export const verifyGoogleUser = async (
$or: [{ providerId: profile.id }, { providerId: profileUpdate.email }],
},
profileUpdate,
- { upsert: true, new: true },
+ { upsert: true, new: true, setDefaultsOnInsert: true },
)
.then(user => done(null, addJWT(config)(user)))
.catch(err => done(err, null))
@@ -155,7 +155,7 @@ export const verifyORCIDUser = (
User.findOneAndUpdate(
{ id: profile.orcid, provider: profile.provider },
profileUpdate,
- { upsert: true, new: true },
+ { upsert: true, new: true, setDefaultsOnInsert: true },
).then(user => done(null, addJWT(config)(user)))
})
.catch(err => done(err, null))
@@ -174,7 +174,7 @@ export const verifyGlobusUser = (
User.findOneAndUpdate(
{ id: decodedProfile.sub, provider: decodedProfile.provider },
profileUpdate,
- { upsert: true, new: true },
+ { upsert: true, new: true, setDefaultsOnInsert: true },
)
.then(user => done(null, addJWT(config)(user)))
.catch(err => done(err, null))
| 1 |
diff --git a/test/jasmine/tests/toimage_test.js b/test/jasmine/tests/toimage_test.js @@ -160,22 +160,22 @@ describe('Plotly.toImage', function() {
.then(function() { return Plotly.toImage(gd, {format: 'png', imageDataOnly: true}); })
.then(function(d) {
expect(d.indexOf('data:image/')).toBe(-1);
- expect(d.length).toBeWithin(53660, 1e3);
+ expect(d.length).toBeWithin(53660, 1e3, 'png image length');
})
.then(function() { return Plotly.toImage(gd, {format: 'jpeg', imageDataOnly: true}); })
.then(function(d) {
expect(d.indexOf('data:image/')).toBe(-1);
- expect(d.length).toBeWithin(43251, 1e3);
+ expect(d.length).toBeWithin(43251, 5e3, 'jpeg image length');
})
.then(function() { return Plotly.toImage(gd, {format: 'svg', imageDataOnly: true}); })
.then(function(d) {
expect(d.indexOf('data:image/')).toBe(-1);
- expect(d.length).toBeWithin(39485, 1e3);
+ expect(d.length).toBeWithin(39485, 1e3, 'svg image length');
})
.then(function() { return Plotly.toImage(gd, {format: 'webp', imageDataOnly: true}); })
.then(function(d) {
expect(d.indexOf('data:image/')).toBe(-1);
- expect(d.length).toBeWithin(15831, 1e3);
+ expect(d.length).toBeWithin(15831, 1e3, 'webp image length');
})
.catch(fail)
.then(done);
| 0 |
diff --git a/aws/cloudformation/util.go b/aws/cloudformation/util.go @@ -368,25 +368,36 @@ func stackCapabilities(template *gocf.Template) []*string {
// Public
////////////////////////////////////////////////////////////////////////////////
+// DynamicValueToStringExpr is a DRY function to type assert
+// a potentiall dynamic value into a gocf.Stringable
+// satisfying type
+func DynamicValueToStringExpr(dynamicValue interface{}) gocf.Stringable {
+ var stringExpr gocf.Stringable
+ switch typedValue := dynamicValue.(type) {
+ case string:
+ stringExpr = gocf.String(typedValue)
+ case gocf.Stringable:
+ stringExpr = typedValue.String()
+ case *gocf.StringExpr:
+ stringExpr = typedValue
+ case gocf.RefFunc:
+ stringExpr = typedValue.String()
+ default:
+ panic(fmt.Sprintf("Unsupported dynamic value type: %+v", typedValue))
+ }
+ return stringExpr
+}
+
// S3AllKeysArnForBucket returns a CloudFormation-compatible Arn expression
// (string or Ref) for all bucket keys (`/*`). The bucket
// parameter may be either a string or an interface{} ("Ref: "myResource")
// value
func S3AllKeysArnForBucket(bucket interface{}) *gocf.StringExpr {
- arnParts := []gocf.Stringable{gocf.String("arn:aws:s3:::")}
-
- switch bucket.(type) {
- case string:
- // Don't be smart if the Arn value is a user supplied literal
- arnParts = append(arnParts, gocf.String(bucket.(string)))
- case *gocf.StringExpr:
- arnParts = append(arnParts, bucket.(*gocf.StringExpr))
- case gocf.RefFunc:
- arnParts = append(arnParts, bucket.(gocf.RefFunc).String())
- default:
- panic(fmt.Sprintf("Unsupported SourceArn value type: %+v", bucket))
+ arnParts := []gocf.Stringable{
+ gocf.String("arn:aws:s3:::"),
+ DynamicValueToStringExpr(bucket),
+ gocf.String("/*"),
}
- arnParts = append(arnParts, gocf.String("/*"))
return gocf.Join("", arnParts...).String()
}
@@ -395,18 +406,9 @@ func S3AllKeysArnForBucket(bucket interface{}) *gocf.StringExpr {
// parameter may be either a string or an interface{} ("Ref: "myResource")
// value
func S3ArnForBucket(bucket interface{}) *gocf.StringExpr {
- arnParts := []gocf.Stringable{gocf.String("arn:aws:s3:::")}
-
- switch bucket.(type) {
- case string:
- // Don't be smart if the Arn value is a user supplied literal
- arnParts = append(arnParts, gocf.String(bucket.(string)))
- case *gocf.StringExpr:
- arnParts = append(arnParts, bucket.(*gocf.StringExpr))
- case gocf.RefFunc:
- arnParts = append(arnParts, bucket.(gocf.RefFunc).String())
- default:
- panic(fmt.Sprintf("Unsupported SourceArn value type: %+v", bucket))
+ arnParts := []gocf.Stringable{
+ gocf.String("arn:aws:s3:::"),
+ DynamicValueToStringExpr(bucket),
}
return gocf.Join("", arnParts...).String()
}
| 0 |
diff --git a/learn/getting_started/quick_start.md b/learn/getting_started/quick_start.md @@ -62,7 +62,7 @@ docker run -it --rm \
meilisearch --env="development"
```
-You can learn more about [using Meilisearch with Docker in our dedicated guide](https://docs.docker.com/get-docker/).
+You can learn more about [using Meilisearch with Docker in our dedicated guide](/learn/cookbooks/docker.md).
:::
::: tab APT
| 1 |
diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js @@ -74,7 +74,8 @@ function getMostRecentIOUReportActionID(reportActions) {
* @returns {Boolean}
*/
function isConsecutiveActionMadeByPreviousActor(reportActions, actionIndex) {
- const previousAction = reportActions[actionIndex + 1];
+ // Find the next non-pending deletion report action, as the pending delete action means that it is not displayed in the UI, but still is in the report actions list
+ const previousAction = _.find(_.drop(reportActions, actionIndex + 1), (action) => action.action.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE);
const currentAction = reportActions[actionIndex];
// It's OK for there to be no previous action, and in that case, false will be returned
| 4 |
diff --git a/assets/scss/_variables.scss b/assets/scss/_variables.scss @@ -110,8 +110,8 @@ $display4-size: 1.75rem !default;
// Space
$spacer: 1rem;
-$td-block-space-top-base: 4 * $spacer;
-$td-block-space-bottom-base: 4 * $spacer;
+$td-block-space-top-base: 4 * $spacer !default;
+$td-block-space-bottom-base: 4 * $spacer !default;
// Pagination
| 11 |
diff --git a/Projects/Bitcoin-Factory/TS/Bot-Modules/Test-Server/TestServer.js b/Projects/Bitcoin-Factory/TS/Bot-Modules/Test-Server/TestServer.js return
}
if (TS.projects.foundations.globals.taskConstants.P2P_NETWORK.p2pNetworkClient.machineLearningNetworkServiceClient === undefined) {
- console.log((new Date()).toISOString(), "Not connected to the Superalgos Network.")
- await SA.projects.foundations.utilities.asyncFunctions.sleep(5000)
+ console.log((new Date()).toISOString(), "Not connected to the Superalgos Network. Retrying in 10 seconds...")
+ await SA.projects.foundations.utilities.asyncFunctions.sleep(10000)
} else {
await TS.projects.foundations.globals.taskConstants.P2P_NETWORK.p2pNetworkClient.machineLearningNetworkServiceClient.sendMessage(messageHeader)
.then(onSuccess)
async function onError(err) {
console.log((new Date()).toISOString(), 'Error retrieving message from Network Node.')
console.log((new Date()).toISOString(), 'err: ' + err)
+ console.log((new Date()).toISOString(), 'Retrying in 10 seconds...')
getReadyForNewMessage()
+ await SA.projects.foundations.utilities.asyncFunctions.sleep(10000)
}
}
}
| 7 |
diff --git a/guide/english/html/index.md b/guide/english/html/index.md @@ -17,8 +17,7 @@ The internet was originally created to store and present static (unchanging) doc
HTML5 is the latest version, or specification, of HTML. The [World Wide Web Consortium (W3C)](https://www.w3.org/) is the organization responsible for developing standards for the World Wide Web, including those for HTML. As web pages and web applications grow more complex, W3C updates HTML's standards.
-HTML5 introduces a host of semantic elements. Though we discussed HTML helped to provide meaning to our document, it wasn't until HTML5s' introduction of [semantic elements](#) that its potential was realized.
-
+HTML5 introduced a host of semantic elements. Though we discussed HTML helped to provide meaning to our document, it wasn't until HTML5's introduction of [semantic elements](#) that its potential was realized.
## A simple example of HTML Document
| 14 |
diff --git a/packages/app/src/components/Common/Dropdown/PageItemControl.tsx b/packages/app/src/components/Common/Dropdown/PageItemControl.tsx @@ -247,9 +247,10 @@ const PageItemControlDropdownMenu = React.memo((props: DropdownMenuProps): JSX.E
return (
<DropdownMenu
data-testid="page-item-control-menu"
- positionFixed
modifiers={{ preventOverflow: { boundariesElement: 'viewport' } }}
right={alignRight}
+ container="body"
+ style={{ zIndex: 1050 }} /* make it larger than $zindex-modal of bootstrap */
>
{contents}
</DropdownMenu>
| 12 |
diff --git a/src/apps.json b/src/apps.json "script": "^https?://vmss\\.boldchat\\.com/aid/\\d{18}/bc\\.vms4/vms\\.js",
"website": "https://www.boldchat.com/"
},
- "BoldGrid Post and Page Builder": {
+ "BoldGrid": {
"cats": [
1,
11
],
"html": [
+ "<link rel=[\"']stylesheet[\"'] [^>]+boldgrid",
"<link rel=[\"']stylesheet[\"'] [^>]+post-and-page-builder",
"<link[^>]+s\\d+\\.boldgrid\\.com"
],
- "implies": "WordPress",
"script": "/wp-content/plugins/post-and-page-builder",
+ "implies": "WordPress",
"website": "https://boldgrid.com"
},
"Bolt": {
| 7 |
diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx @@ -62,6 +62,8 @@ export function CommentCreate(props: Props) {
location: { pathname },
} = useHistory();
const [isSubmitting, setIsSubmitting] = React.useState(false);
+ const [commentFailure, setCommentFailure] = React.useState(false);
+ const [successTip, setSuccessTip] = React.useState({ txid: undefined, tipAmount: undefined });
const { claim_id: claimId } = claim;
const [isSupportComment, setIsSupportComment] = React.useState();
const [isReviewingSupportComment, setIsReviewingSupportComment] = React.useState();
@@ -120,6 +122,13 @@ export function CommentCreate(props: Props) {
return;
}
+ if (commentFailure && tipAmount === successTip.tipAmount) {
+ handleCreateComment(successTip.txid);
+ return;
+ } else {
+ setSuccessTip({ txid: undefined, tipAmount: undefined });
+ }
+
const params = {
amount: tipAmount,
claim_id: claimId,
@@ -135,6 +144,7 @@ export function CommentCreate(props: Props) {
setTimeout(() => {
handleCreateComment(txid);
}, 1500);
+ setSuccessTip({ txid, tipAmount });
},
() => {
setIsSubmitting(false);
@@ -153,6 +163,7 @@ export function CommentCreate(props: Props) {
setLastCommentTime(Date.now());
setIsReviewingSupportComment(false);
setIsSupportComment(false);
+ setCommentFailure(false);
justCommented.push(res.comment_id);
if (onDoneReplying) {
@@ -162,6 +173,7 @@ export function CommentCreate(props: Props) {
})
.catch(() => {
setIsSubmitting(false);
+ setCommentFailure(true);
});
}
@@ -212,7 +224,7 @@ export function CommentCreate(props: Props) {
autoFocus
button="primary"
disabled={disabled}
- label={isSubmitting ? __('Sending...') : __('Send')}
+ label={isSubmitting ? __('Sending...') : (commentFailure && tipAmount === successTip.tipAmount) ? __('Re-submit') : __('Send')}
onClick={handleSupportComment}
/>
<Button button="link" label={__('Cancel')} onClick={() => setIsReviewingSupportComment(false)} />
| 9 |
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md @@ -27,7 +27,7 @@ Your package.json `package.json`:
-->
<!--
-If you want help on your bug, please also send us the github repository where your hexo code is stored. If it is not on github, please post if on github, it would greatly help.
+If you want help on your bug, please also send us the github repository where your hexo code is stored. If it is not on github, please post it on github, it would greatly help.
-->
## For question
| 3 |
diff --git a/packages/webpack-plugin/lib/helpers.js b/packages/webpack-plugin/lib/helpers.js @@ -299,6 +299,10 @@ module.exports = function createHelpers (loaderContext, options, moduleId, parts
// unknown lang, infer the loader to be used
switch (type) {
case 'template':
+ // do not deal lang="wxml", may used by vscode plugin
+ if (lang === 'wxml') {
+ return defaultLoaders.html + '!'
+ }
// allow passing options to the template preprocessor via `templateOption` option
const preprocessorOption = { engine: lang, templateOption: options.templateOption || {} }
return defaultLoaders.html + '!' + templatePreprocessorPath + '?' + JSON.stringify(preprocessorOption) + '!'
| 1 |
diff --git a/xrrtc.js b/xrrtc.js @@ -186,8 +186,10 @@ class XRChannelConnection extends EventTarget {
} */
send(s) {
+ if (this.dataChannel.readyState === 'open') {
this.dataChannel.send(s);
}
+ }
async setMicrophoneMediaStream(mediaStream) {
if (mediaStream) {
| 0 |
diff --git a/docs/framework-support-libraries.md b/docs/framework-support-libraries.md @@ -44,7 +44,8 @@ imports: [
These are the main features provided by the library:
* [LuigiContextService](#LuigiContextService)
* [LuigiAutoRoutingService](#LuigiAutoRoutingService)
- * [Preload component](#preload-component-example) - an empty Angular component that can be used to build a preload route. See also [preloadUrl](https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=viewgroupsettings).
+ * Preload component - an empty Angular component that can be used to build a preload route. See also [preloadUrl](https://docs.luigi-project.io/docs/navigation-parameters-reference/?section=viewgroupsettings).
+ * [Angular routing example](#angular-routing-example)
* [LuigiRouteStrategy](#LuigiRouteStrategy)
* [AutoRouting for modals](#autorouting-for-modals)
* [LuigiMockModule](#LuigiMockModule) - an Angular module that listens to Luigi Client calls and messages and sends a mocked response back. See also [LuigiMockUtil](https://docs.luigi-project.io/docs/framework-support-libraries/?section=luigi-testing-utilities).
@@ -83,7 +84,7 @@ This service cannot be used directly, but it will provide useful features on how
It can happen that in your micro frontend, user can navigate through different components/pages.
With this feature, we provide an easy way of synchronizing Angular route with Luigi navigation. In the Angular route configuration, you can now add in data these attributes:
-#### Preload component example
+### Angular routing example
```javascript
{path: 'luigi-client-support-preload',component: Sample1Component,data: { fromVirtualTreeRoot: true }}
| 7 |
diff --git a/components/Discussion/Comments.js b/components/Discussion/Comments.js @@ -96,7 +96,7 @@ const Comments = props => {
} = props
const router = useRouter()
- const discussionHref = getDiscussionUrlObject(discussion)
+ const discussionUrlObject = getDiscussionUrlObject(discussion)
/*
* Subscribe to GraphQL updates of the dicsussion query.
*/
@@ -387,26 +387,26 @@ const Comments = props => {
<div {...styles.orderByContainer}>
{board && (
<OrderByLink
- href={discussionHref}
+ href={discussionUrlObject}
t={t}
orderBy={resolvedOrderBy}
value='HOT'
/>
)}
<OrderByLink
- href={discussionHref}
+ href={discussionUrlObject}
t={t}
orderBy={resolvedOrderBy}
value='DATE'
/>
<OrderByLink
- href={discussionHref}
+ href={discussionUrlObject}
t={t}
orderBy={resolvedOrderBy}
value='VOTES'
/>
<OrderByLink
- href={discussionHref}
+ href={discussionUrlObject}
t={t}
orderBy={resolvedOrderBy}
value='REPLIES'
| 10 |
diff --git a/aura-impl/src/main/java/org/auraframework/impl/root/component/ModuleDefRefImpl.java b/aura-impl/src/main/java/org/auraframework/impl/root/component/ModuleDefRefImpl.java @@ -29,6 +29,7 @@ import org.auraframework.def.DefinitionReference;
import org.auraframework.def.module.ModuleDef;
import org.auraframework.def.module.ModuleDefRef;
import org.auraframework.impl.root.DefinitionReferenceImpl;
+import org.auraframework.throwable.AuraRuntimeException;
import org.auraframework.throwable.quickfix.DefinitionNotFoundException;
import org.auraframework.throwable.quickfix.QuickFixException;
import org.auraframework.util.json.Json;
@@ -43,7 +44,7 @@ import com.google.common.collect.Lists;
public class ModuleDefRefImpl extends DefinitionReferenceImpl<ModuleDef> implements ModuleDefRef {
private static final long serialVersionUID = 2121381558446216947L;
- private transient DefDescriptor<?> reference;
+ private transient volatile DefDescriptor<ModuleDef> reference;
protected ModuleDefRefImpl(Builder builder) {
super(builder);
@@ -51,24 +52,39 @@ public class ModuleDefRefImpl extends DefinitionReferenceImpl<ModuleDef> impleme
@Override
public void serialize(Json json) throws IOException {
+
+ if (this.reference == null) {
+ synchronized (this) {
+ if (this.reference == null) {
+ try {
+ // get correct cased descriptor from definition
+ ModuleDef def = this.descriptor.getDef();
+ this.reference = def.getDescriptor();
+ } catch (QuickFixException e) {
+ throw new AuraRuntimeException(e);
+ }
+ }
+ }
+ }
+
json.writeMapBegin();
json.writeMapKey("componentDef");
json.writeMapBegin();
- json.writeMapEntry("descriptor", reference);
+ json.writeMapEntry("descriptor", this.reference);
json.writeMapEntry("type", "module");
json.writeMapEnd();
- json.writeMapEntry("localId", localId);
+ json.writeMapEntry("localId", this.localId);
- if (!attributeValues.isEmpty()) {
+ if (!this.attributeValues.isEmpty()) {
json.writeMapKey("attributes");
json.writeMapBegin();
json.writeMapKey("values");
json.writeMapBegin();
- for (Map.Entry<DefDescriptor<AttributeDef>, AttributeDefRef> entry : attributeValues.entrySet()) {
+ for (Map.Entry<DefDescriptor<AttributeDef>, AttributeDefRef> entry : this.attributeValues.entrySet()) {
json.writeMapEntry(entry.getKey(), entry.getValue());
}
json.writeMapEnd();
@@ -86,10 +102,10 @@ public class ModuleDefRefImpl extends DefinitionReferenceImpl<ModuleDef> impleme
@Override
public void validateReferences(ReferenceValidationContext validationContext) throws QuickFixException {
- ModuleDef def = validationContext.getAccessibleDefinition(descriptor);
+ ModuleDef def = validationContext.getAccessibleDefinition(this.descriptor);
if (def == null) {
// not possible
- throw new DefinitionNotFoundException(descriptor);
+ throw new DefinitionNotFoundException(this.descriptor);
}
this.reference = def.getDescriptor();
}
@@ -98,7 +114,7 @@ public class ModuleDefRefImpl extends DefinitionReferenceImpl<ModuleDef> impleme
public boolean equals(Object obj) {
if (obj instanceof ModuleDefRefImpl) {
ModuleDefRefImpl other = (ModuleDefRefImpl) obj;
- return descriptor.equals(other.getDescriptor()) && location.equals(other.getLocation());
+ return this.descriptor.equals(other.getDescriptor()) && this.location.equals(other.getLocation());
}
return false;
}
| 12 |
diff --git a/src/components/translator.js b/src/components/translator.js @@ -89,22 +89,27 @@ module.exports = class Translator {
//================================================================
/**
* Loads a language file or throws Error.
- * NOTE: hash "protection" removed since the main distribution method will be webpack
- *
* @param {string} lang
*/
getLanguagePhrases(lang){
- //If its a default language
- if(typeof languages[lang] === 'object') return languages[lang];
+ //If its a known language
+ if(typeof languages[lang] === 'object'){
+ return languages[lang];
//If its a custom language
+ }else if(lang === 'custom'){
try {
return JSON.parse(fs.readFileSync(
- `${GlobalData.dataPath}/locale/${lang}.json`,
+ `${GlobalData.dataPath}/locale/custom.json`,
'utf8'
));
} catch (error) {
- throw new Error(`Failed to load 'locale/${lang}.json'. (${error.message})`);
+ throw new Error(`Failed to load '${GlobalData.dataPath}/locale/custom.json'. (${error.message})`);
+ }
+
+ //If its an invalid language
+ }else{
+ throw new Error(`Language not found.`);
}
}
| 1 |
diff --git a/app/zcommon.js b/app/zcommon.js @@ -315,7 +315,7 @@ function showSettingsDialog() {
domainFrontingUrl: inputDomainFrontingUrl.value,
domainFrontingHost: inputDomainFrontingHost.value,
autoLogOffEnable: inputAutoLogOffEnable.checked ? 1 : 0,
- autoLogOffTimeout: inputAutoLogOffTimeout.value
+ autoLogOffTimeout: inputAutoLogOffTimeout.value < 60 ? 60 : inputAutoLogOffTimeout.value
};
if (settings.lang !== newSettings.lang) {
| 12 |
diff --git a/samples/csharp_dotnetcore/adaptive-dialog/01.multi-turn-prompt/Startup.cs b/samples/csharp_dotnetcore/adaptive-dialog/01.multi-turn-prompt/Startup.cs @@ -47,11 +47,8 @@ public void ConfigureServices(IServiceCollection services)
// Create the Conversation state. (Used by the Dialog system itself.)
services.AddSingleton<ConversationState>();
- // The Dialog that will be run by the bot.
- services.AddSingleton<RootDialog>();
-
// Create the bot. the ASP Controller is expecting an IBot.
- services.AddSingleton<IBot, DialogBot<RootDialog>>();
+ services.AddSingleton<IBot, DialogBot>();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
| 2 |
diff --git a/assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/index.js b/assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/index.js @@ -52,12 +52,10 @@ import {
import { trackEvent } from '../../../../../util';
import whenActive from '../../../../../util/when-active';
import DashboardCTA from '../DashboardCTA';
-import EmptyIcon from '../../../../../../svg/zero-state-yellow.svg';
import Badge from '../../../../../components/Badge';
import NewIdeas from './NewIdeas';
import SavedIdeas from './SavedIdeas';
import DraftIdeas from './DraftIdeas';
-import Empty from './Empty';
import Footer from './Footer';
import useQueryArg from '../../../../../hooks/useQueryArg';
const { useSelect } = Data;
@@ -155,7 +153,7 @@ function DashboardIdeasWidget( props ) {
IDEA_HUB_GA_CATEGORY_WIDGET,
'widget_gathering_data_view'
);
- } else if ( hasManyIdeas ) {
+ } else {
setTrackedWidgetView( true );
trackEvent(
@@ -232,22 +230,6 @@ function DashboardIdeasWidget( props ) {
}
}, [ page ] );
- if ( hasNoIdeas ) {
- return (
- <Widget noPadding>
- <div className="googlesitekit-idea-hub">
- <Empty
- Icon={ <EmptyIcon /> }
- title={ __(
- 'Idea Hub is generating ideas',
- 'google-site-kit'
- ) }
- />
- </div>
- </Widget>
- );
- }
-
const tabIdeasMap = {
'new-ideas': newIdeas,
'saved-ideas': savedIdeas,
| 2 |
diff --git a/test/externalTests/rain.js b/test/externalTests/rain.js @@ -6,7 +6,7 @@ module.exports = () => (bot, done) => {
bot.test.sayEverywhere('/weather rain')
let raining = true
- bot.on('rain', () => {
+ function rainListener () {
if (raining) {
assert.strictEqual(bot.isRaining, true)
bot.test.sayEverywhere('/weather clear')
@@ -15,7 +15,10 @@ module.exports = () => (bot, done) => {
}
assert.strictEqual(bot.isRaining, false)
+ bot.removeListener('rain', rainListener)
done()
- })
+ }
+
+ bot.on('rain', rainListener)
}, 1000)
}
| 2 |
diff --git a/packages/cx/src/ui/Instance.js b/packages/cx/src/ui/Instance.js @@ -290,7 +290,6 @@ export class Instance {
this.cached.state = this.state;
this.cached.widgetVersion = this.widget.version;
this.cached.globalCacheIdentifier = GlobalCacheIdentifier.get();
- this.renderList = null;
this.childStateDirty = false;
if (this.instanceCache)
| 2 |
diff --git a/src/context/endpointTestCaseReducer.js b/src/context/endpointTestCaseReducer.js @@ -76,7 +76,18 @@ export const endpointTestCaseReducer = (state, action) => {
...state,
endpointStatements,
};
-
+ case actionTypes.UPDATE_SERVER_FILEPATH:
+ endpointStatements = endpointStatements.map(statement => {
+ if (statement.type === 'endpoint') {
+ statement.serverFileName = action.serverFileName;
+ statement.serverFilePath = action.serverFilePath;
+ }
+ return statement;
+ });
+ return {
+ ...state,
+ endpointStatements,
+ };
default:
return state;
}
| 3 |
diff --git a/test/kubernetes.spec.js b/test/kubernetes.spec.js @@ -33,7 +33,9 @@ const expectedFiles = {
jhconsole: [
'console/jhipster-console.yml',
'console/jhipster-elasticsearch.yml',
- 'console/jhipster-logstash.yml'
+ 'console/jhipster-logstash.yml',
+ 'console/jhipster-dashboard-console.yml',
+ 'console/jhipster-zipkin.yml'
],
msmysql: [
'msmysql/msmysql-deployment.yml',
@@ -140,7 +142,7 @@ describe('JHipster Kubernetes Sub Generator', () => {
});
});
- describe('mysql microservice with custom namespace and jhipster-console', () => {
+ describe('mysql microservice with custom namespace and jhipster-console (with zipkin)', () => {
beforeEach((done) => {
helpers
.run(require.resolve('../generators/kubernetes'))
| 3 |
diff --git a/package.json b/package.json "main": "index.js",
"repository": {
"type": "git",
- "url": "https://github.paypal.com/Checkout/smart-buttons"
+ "url": "https://github.com/paypal/paypal-smart-payment-buttons"
},
"jest": {
"coverageDirectory": "./server-coverage/"
| 3 |
diff --git a/css/components/dashboards/dashboards-subheader-block.scss b/css/components/dashboards/dashboards-subheader-block.scss .c-dashboards-subheader-block {
- padding-bottom: 45px;
- padding-top: 70px;
+ padding-bottom: $space * 9;
+ padding-top: $space * 14;
p {
max-width: 430px;
}
| 14 |
diff --git a/assets/js/modules/analytics/datastore/accounts.test.js b/assets/js/modules/analytics/datastore/accounts.test.js @@ -36,8 +36,15 @@ import * as fixtures from './__fixtures__';
describe( 'modules/analytics accounts', () => {
let apiFetchSpy;
+ let windowLocationSpy;
let registry;
let store;
+ let redirect;
+
+ const accountName = 'Test Account';
+ const propertyName = 'Test Property';
+ const profileName = 'Test Profile';
+ const timezone = 'Test Timezone.';
beforeAll( () => {
API.setUsingCache( false );
@@ -48,6 +55,15 @@ describe( 'modules/analytics accounts', () => {
store = registry.stores[ STORE_NAME ].store;
apiFetchSpy = jest.spyOn( { apiFetch }, 'apiFetch' );
+
+ /* eslint-disable no-restricted-globals */
+ windowLocationSpy = jest.spyOn( window.location, 'assign' );
+ /* eslint-enable no-restricted-globals */
+
+ windowLocationSpy.mockImplementation( ( location ) => {
+ redirect = location;
+ } );
+ redirect = '';
} );
afterAll( () => {
@@ -57,25 +73,23 @@ describe( 'modules/analytics accounts', () => {
afterEach( () => {
unsubscribeFromAll( registry );
apiFetchSpy.mockRestore();
+ windowLocationSpy.mockRestore();
} );
describe( 'actions', () => {
describe( 'createAccount', () => {
- it( 'creates an account and adds it to the store ', async () => {
- const accountName = fixtures.createAccount.accountName;
- const propertyName = fixtures.createAccount.propertyName;
- const profileName = fixtures.createAccount.profileName;
- const timezone = fixtures.createAccount.timezone;
-
+ it( 'creates an account ticket and redirects to the Terms of Service', async () => {
fetch
.doMockIf(
/^\/google-site-kit\/v1\/modules\/analytics\/data\/create-account-ticket/
)
.mockResponse(
- JSON.stringify( fixtures.createAccount ),
+ JSON.stringify( fixtures.accountTicket ),
{ status: 200 }
);
+ muteConsole( 'error' );
+
registry.dispatch( STORE_NAME ).createAccount( { accountName, propertyName, profileName, timezone } );
await subscribeUntil( registry,
() => (
@@ -87,20 +101,17 @@ describe( 'modules/analytics accounts', () => {
expect( JSON.parse( fetch.mock.calls[ 0 ][ 1 ].body ).data ).toMatchObject(
{ accountName, propertyName, profileName, timezone }
);
+
+ expect( redirect ).toEqual( 'https://analytics.google.com/analytics/web/?provisioningSignup=false#management/TermsOfService/?api.accountTicketId=abc123' );
} );
it( 'sets isDoingCreateAccount ', async () => {
- const accountName = fixtures.createAccount.accountName;
- const propertyName = fixtures.createAccount.propertyName;
- const profileName = fixtures.createAccount.profileName;
- const timezone = fixtures.createAccount.timezone;
-
fetch
.doMockIf(
/^\/google-site-kit\/v1\/modules\/analytics\/data\/create-account-ticket/
)
.mockResponse(
- JSON.stringify( fixtures.createAccount ),
+ JSON.stringify( fixtures.accountTicket ),
{ status: 200 }
);
@@ -109,11 +120,6 @@ describe( 'modules/analytics accounts', () => {
} );
it( 'dispatches an error if the request fails ', async () => {
- const accountName = fixtures.createAccount.accountName;
- const propertyName = fixtures.createAccount.propertyName;
- const profileName = fixtures.createAccount.profileName;
- const timezone = fixtures.createAccount.timezone;
-
const response = {
code: 'internal_server_error',
message: 'Internal server error',
@@ -130,22 +136,18 @@ describe( 'modules/analytics accounts', () => {
);
muteConsole( 'error' );
+
registry.dispatch( STORE_NAME ).createAccount( { accountName, propertyName, profileName, timezone } );
await subscribeUntil( registry,
() => (
- registry.select( STORE_NAME ).getError()
+ registry.select( STORE_NAME ).isDoingCreateAccount() === false
),
);
expect( registry.select( STORE_NAME ).getError() ).toMatchObject( response );
- // Ignore the request fired by the `getAccounts` selector.
- muteConsole( 'error' );
- const accounts = registry.select( STORE_NAME ).getAccounts();
- // No accounts should have been added yet, as the property creation
- // failed.
- expect( accounts ).toEqual( undefined );
+ expect( redirect ).toEqual( '' );
} );
} );
} );
| 7 |
diff --git a/templates/winter/util.js b/templates/winter/util.js @@ -175,8 +175,12 @@ const exchangeToken = async (code, options) => {
code: code
});
- const authReq = await authRequest();
- const authCode = qs.parse(authReq);
+ const authCode = await authRequest();
+
+ if (typeof authCode === "string") {
+ const authParsed = qs.parse(authCode);
+ return { accessToken: authParsed.access_token };
+ }
return { accessToken: authCode.access_token };
};
| 9 |
diff --git a/lib/assets/javascripts/builder/editor/style/style-form/style-form-dictionary/fill-size.js b/lib/assets/javascripts/builder/editor/style/style-form/style-form-dictionary/fill-size.js @@ -64,6 +64,8 @@ module.exports = {
if (_.contains([StyleConstants.Type.HEATMAP, StyleConstants.Type.ANIMATION], params.styleType)) {
size.editorAttrs.hidePanes = [FillConstants.Panes.BY_VALUE];
size.fieldClass = NO_PANES_CLASS;
+ } else {
+ size.editorAttrs.hidePanes = [];
}
}
};
| 1 |
diff --git a/src/renderer/page/discover/view.jsx b/src/renderer/page/discover/view.jsx @@ -10,10 +10,30 @@ type Props = {
};
class DiscoverPage extends React.PureComponent<Props> {
+ constructor() {
+ super();
+ this.continousFetch = undefined;
+ }
+
componentWillMount() {
- this.props.fetchFeaturedUris();
+ const { fetchFeaturedUris } = this.props;
+ fetchFeaturedUris();
+ this.continousFetch = setInterval(fetchFeaturedUris, 1000 * 60 * 60);
+ }
+
+ componentWillUnmount() {
+ this.clearContinuousFetch();
}
+ clearContinuousFetch() {
+ if (this.continousFetch) {
+ clearInterval(this.continousFetch);
+ this.continousFetch = null;
+ }
+ }
+
+ continousFetch: ?number;
+
render() {
const { featuredUris, fetchingFeaturedUris } = this.props;
const hasContent = typeof featuredUris === 'object' && Object.keys(featuredUris).length;
| 12 |
diff --git a/src/translations/index.js b/src/translations/index.js @@ -23,7 +23,7 @@ export const translations = {
};
export const getAvailableLocale = (appLocale) => {
- let locale = appLocale;
+ let locale = appLocale || 'auto';
if (typeof navigator !== 'undefined' && appLocale === 'auto') {
locale =
| 12 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,46 @@ 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.29.0] -- 2017-07-19
+
+### Added
+- Add touch interactions to cartesian, gl2d and ternary subplots including for
+ select and lasso drag modes [#1804, #1890]
+- Add support for contour line labels in `contour` and `contourcarpet` traces
+ [#1815]
+- Add support for select and lasso drag modes on `scattermapbox` traces [#1836]
+- Add double click interactions to mapbox subplots [#1883]
+- Add reset view and toggle hover mode bar buttons to mapbox subplots [#1883]
+- Add support for array `marker.opacity` settings in `scattermapbox` traces
+ [#1836]
+- Add `namelength` layout and trace attribute to control the trace name's
+ visible length in hover labels [#1822]
+- Add `cliponaxis` attribute to `scatter` and `scatterternary` traces to allow
+ markers and text nodes to be displayed above their subplot's axes [#1861]
+- Add axis `layer` attribute with `'above traces'` and `'below traces'` values
+ [#1871]
+- Add granular `editable` configuration options [#1895]
+- Expanded traces generated by transforms now have unique colors [#1830]
+
+### Fixed
+- Fix axis line width, length, and positioning for coupled subplots [#1854]
+- Fix alignment of cartesian tick labels [#1854]
+- Fix rendering and updates of overlaying axis lines [#1855]
+- Fix hover for 2D traces with custom colorbar `tickvals` [#1891]
+- Fix hover and event data for `heatmapgl` and `contourgl` traces [#1884]
+- Fix event data for `pie` and `sankey` traces [#1896]
+- Fix drag mode `'pan'`in IE and Edge [#1871]
+- Fix bar, error bar and box point scaling on scroll zoom [#1897]
+- Fix shading issue in `surface` trace in iOS [#1868]
+- Fix lasso and select drag modes for `scatterternary` traces [#1831]
+- Fix cases of intersecting `contour` lines on log axes [#1856]
+- Safer construction of `popup` click handler [#1888]
+- Fix animation of annotations, shapes and images [#1315]
+- Fix histogram bin computation when more than 5000 bins are needed [#1887]
+- Fix tick label rendering when more than 1000 labels are present [#1898]
+- Fix handling of empty `transforms` item [#1829]
+
+
## [1.28.3] -- 2017-06-26
### Fixed
| 3 |
diff --git a/packages/@uppy/core/src/index.js b/packages/@uppy/core/src/index.js @@ -510,7 +510,10 @@ class Uppy {
}
pauseResume (fileID) {
- if (this.getFile(fileID).uploadComplete) return
+ if (!this.getState().capabilities.resumableUploads ||
+ this.getFile(fileID).uploadComplete) {
+ return
+ }
const wasPaused = this.getFile(fileID).isPaused || false
const isPaused = !wasPaused
@@ -859,14 +862,13 @@ class Uppy {
/**
* Find one Plugin by name.
*
- * @param {string} name description
+ * @param {string} id plugin id
* @return {object | boolean}
*/
- getPlugin (name) {
+ getPlugin (id) {
let foundPlugin = null
this.iteratePlugins((plugin) => {
- const pluginName = plugin.id
- if (pluginName === name) {
+ if (plugin.id === id) {
foundPlugin = plugin
return false
}
| 0 |
diff --git a/packages/build/src/utils/list.js b/packages/build/src/utils/list.js -// Turn [1, 2, 3] into "1", "2", "3"
+// Turn [1, 2, 3] into:
+// - 1
+// - 2
+// - 3
const serializeList = function(array) {
- return array.map(quote).join(', ')
+ return array.map(addDash).join('\n')
}
-const quote = function(string) {
- return `"${string}"`
+const addDash = function(string) {
+ return ` - ${string}`
}
module.exports = { serializeList }
| 7 |
diff --git a/CHANGELOG.md b/CHANGELOG.md All notable changes to this project are documented in this file.
-## Head
+## 14.5.1
- Fixed: `function-no-unknown` ENOENT and TypeErrors ([#5916](https://github.com/stylelint/stylelint/pull/5916)).
- Fixed: `function-no-unknown` false positives for interpolation ([#5914](https://github.com/stylelint/stylelint/pull/5914)).
| 6 |
diff --git a/src/userscript.ts b/src/userscript.ts @@ -94562,12 +94562,20 @@ var $$IMU_EXPORT$$;
return src.replace(/(\/photo\/+bkn-[0-9]{10,}-[0-9]+_[0-9]+_[0-9]+_[0-9]+)[sp](\.[^/.]+(?:[?#].*)?)$/, "$1b$2");
}
- if (domain === "thumb.pr0gramm.com") {
+ if (domain === "thumb.pr0gramm.com" ||
+ // thanks to Lumbago1337 on github: https://github.com/qsniyg/maxurl/issues/924
+ // https://img.pr0gramm.com/2021/10/29/490200ed6617876e.jpg -- 1052x1402
+ // https://full.pr0gramm.com/2021/10/29/490200ed6617876e.jpg -- 2976x3968
+ domain === "img.pr0gramm.com") {
// https://thumb.pr0gramm.com/2020/11/13/57c423d54cd89e20.jpg
// https://img.pr0gramm.com/2020/11/13/57c423d54cd89e20.png
newsrc = src.replace(/^[a-z]+:\/\/thumb(\.[^/]+\/+[0-9]{4}\/+(?:[0-9]{2}\/+){2}[0-9a-f]{10,}\.[^/.]+)(?:[?#].*)?$/, "https://img$1");
if (newsrc !== src)
return add_extensions(newsrc);
+
+ newsrc = src.replace(/^[a-z]+:\/\/img(\.[^/]+\/+[0-9]{4}\/+(?:[0-9]{2}\/+){2}[0-9a-f]{10,}\.[^/.]+)(?:[?#].*)?$/, "https://full$1");
+ if (newsrc !== src)
+ return add_extensions(newsrc);
}
if (domain_nowww === "pr0gramm.com") {
| 7 |
diff --git a/tests/phpunit/integration/Core/Authentication/ProfileTest.php b/tests/phpunit/integration/Core/Authentication/ProfileTest.php @@ -14,7 +14,10 @@ use Google\Site_Kit\Context;
use Google\Site_Kit\Core\Authentication\Clients\OAuth_Client;
use Google\Site_Kit\Core\Authentication\Profile;
use Google\Site_Kit\Core\Storage\User_Options;
+use Google\Site_Kit\Tests\FakeHttpClient;
use Google\Site_Kit\Tests\TestCase;
+use Google\Site_Kit_Dependencies\GuzzleHttp\Message\Response;
+use Google\Site_Kit_Dependencies\GuzzleHttp\Stream\Stream;
/**
* @group Authentication
@@ -28,12 +31,51 @@ class ProfileTest extends TestCase {
$client = new OAuth_Client( new Context( GOOGLESITEKIT_PLUGIN_MAIN_FILE ) );
$profile = new Profile( $user_options, $client );
+ // Profile data is always an array with email, photo, and a timestamp otherwise false.
$this->assertFalse( $profile->get() );
- // get() is a simple wrapper for fetching the option value.
- $user_options->set( Profile::OPTION, 'test-profile' );
+ $valid_profile_data = array(
+ 'email' => '[email protected]',
+ 'photo' => 'https://example.com/me.jpg',
+ 'timestamp' => current_time( 'timestamp' ) - DAY_IN_SECONDS,
+ );
+ $user_options->set( Profile::OPTION, $valid_profile_data );
+
+ $this->assertEquals( $valid_profile_data, $profile->get() );
+
+ // If there is no data, or the timestamp is older than 1 week it attempts to fetch new data.
+ $stale_profile_data = $valid_profile_data;
+ $stale_profile_data['timestamp'] = current_time( 'timestamp' ) - WEEK_IN_SECONDS - MINUTE_IN_SECONDS;
+ update_user_option( $user_id, Profile::OPTION, $stale_profile_data );
+
+ // Stub the response to return fresh profile data from the API.
+ $fake_http = new FakeHttpClient();
+ $fake_http->set_request_handler( function () {
+ return new Response(
+ 200,
+ array(),
+ Stream::factory(json_encode(array(
+ // ['emailAddresses'][0]['value']
+ 'emailAddresses' => array(
+ array( 'value' => '[email protected]' ),
+ ),
+ // ['photos'][0]['url']
+ 'photos' => array(
+ array( 'url' => 'https://example.com/fresh.jpg' ),
+ ),
+ )))
+ );
+ });
+ $client->get_client()->setHttpClient( $fake_http );
+
+ $fresh_profile_data = $profile->get();
- $this->assertEquals( 'test-profile', $profile->get() );
+ $this->assertEquals( '[email protected]', $fresh_profile_data['email'] );
+ $this->assertEquals( 'https://example.com/fresh.jpg', $fresh_profile_data['photo'] );
+ $this->assertGreaterThan(
+ $valid_profile_data['timestamp'],
+ $fresh_profile_data['timestamp']
+ );
}
public function test_has() {
@@ -58,6 +100,8 @@ class ProfileTest extends TestCase {
$user_options->set( Profile::OPTION, array( 'email' => '', 'photo' => 'test-photo.jpg' ) );
$this->assertFalse( $profile->has() );
$user_options->set( Profile::OPTION, array( 'email' => '[email protected]', 'photo' => 'test-photo.jpg' ) );
+ $this->assertFalse( $profile->has() );
+ $user_options->set( Profile::OPTION, array( 'email' => '[email protected]', 'photo' => 'test-photo.jpg', 'timestamp' => current_time( 'timestamp' ) ) );
$this->assertTrue( $profile->has() );
}
| 3 |
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -1393,13 +1393,13 @@ final class Analytics extends Module
$request->setIncludeEmptyRows( true );
$request->setViewId( $profile_id );
- $dimension_filters_clauses = array();
+ $dimension_filter_clauses = array();
if ( ! empty( $args['dimension_filters'] ) ) {
$dimension_filters = $args['dimension_filters'];
$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;
+ $dimension_filter_clauses[] = $dimension_filter_clause;
}
if ( ! empty( $args['dimensions'] ) ) {
@@ -1422,11 +1422,11 @@ final class Analytics extends Module
$dimension_filter_clause = new Google_Service_AnalyticsReporting_DimensionFilterClause();
$dimension_filter_clause->setFilters( array( $dimension_filter ) );
$dimension_filter_clause->setOperator( 'AND' );
- $dimension_filters_clauses[] = $dimension_filter_clause;
+ $dimension_filter_clauses[] = $dimension_filter_clause;
}
- if ( ! empty( $dimension_filters_clauses ) ) {
- $request->setDimensionFilterClauses( $dimension_filters_clauses );
+ if ( ! empty( $dimension_filter_clauses ) ) {
+ $request->setDimensionFilterClauses( $dimension_filter_clauses );
}
if ( ! empty( $args['row_limit'] ) ) {
| 10 |
diff --git a/package.json b/package.json "preliminaries-parser-toml": "1.1.0",
"preliminaries-parser-yaml": "1.1.0",
"prismjs": "^1.5.1",
- "prosemirror-commands": "^0.17.0",
- "prosemirror-history": "^0.17.0",
- "prosemirror-inputrules": "^0.17.0",
- "prosemirror-keymap": "^0.17.0",
- "prosemirror-markdown": "^0.17.0",
- "prosemirror-model": "^0.17.0",
- "prosemirror-schema-basic": "^0.17.0",
- "prosemirror-schema-list": "^0.17.0",
- "prosemirror-schema-table": "^0.17.0",
- "prosemirror-state": "^0.17.0",
- "prosemirror-transform": "^0.17.0",
- "prosemirror-view": "^0.17.0",
"react": "^15.1.0",
"react-addons-css-transition-group": "^15.3.1",
"react-autosuggest": "^7.0.1",
| 2 |
diff --git a/lib/Unexpected.js b/lib/Unexpected.js @@ -852,9 +852,9 @@ function installExpectMethods(unexpected) {
expect.equal = unexpected.equal.bind(unexpected);
expect.inspect = unexpected.inspect.bind(unexpected);
expect.findTypeOf = unexpected.findTypeOf; // Already bound
- expect.fail = function () {
+ expect.fail = function (...args) {
try {
- unexpected.fail.apply(unexpected, arguments);
+ unexpected.fail(...args);
} catch (e) {
if (e && e._isUnexpected) {
unexpected.setErrorMessage(e);
| 4 |
diff --git a/src/userscript.ts b/src/userscript.ts @@ -37242,11 +37242,18 @@ var $$IMU_EXPORT$$;
// https://tse1.mm.bing.net/th?id=Ad9e81485410912702a018d5f48ec0f5c&w=136&h=183&c=8&rs=1&qlt=90&pid=3.1&rm=2
// https://www.bing.com/th?id=OPN.RTNews_jJZmvGD6PzvUt22LbHHUUg&w=186&h=88&c=7&rs=2&qlt=80&cdv=1&pid=News
- // other:
- // https://th.bing.com/th/id/OIP.D4C-i8dfc0T_eveS9Mz2nAHaHg?pid=Api&w=210&h=213
newsrc = src.replace(/(:\/\/[^/]*)\/th[^/]*[?&]id=([^&]*)&[^/]*$/, "$1/th?id=$2");
if (newsrc !== src)
return newsrc;
+
+ // thanks to DevWannabe-dot on github for reporting: https://github.com/qsniyg/maxurl/issues/916
+ // https://th.bing.com/th/id/OIP.kef7amvOdjQCragyEGUiHAHaHa?pid=ImgDet&w=100&h=100&c=7
+ // https://th.bing.com/th/id/OIP.kef7amvOdjQCragyEGUiHAHaHa?pid=ImgDet&c=7
+ // https://th.bing.com/th/id/OIP.D4C-i8dfc0T_eveS9Mz2nAHaHg?pid=Api&w=210&h=213
+ // https://th.bing.com/th/id/OIP.D4C-i8dfc0T_eveS9Mz2nAHaHg?pid=Api
+ if (/\/th\/+id\//.test(src)) {
+ return remove_queries(src, [ "w", "h", "rs", "qlt" ]);
+ }
}
if (domain === "cdn.4archive.org") {
| 7 |
diff --git a/src/consumer/fetchManager.js b/src/consumer/fetchManager.js @@ -74,14 +74,14 @@ const fetchManager = ({
const queue = queues[runnerId]
- let message = queue.shift()
- if (!message) {
+ let fetchResult = queue.shift()
+ if (!fetchResult) {
await fetchPromise
- message = queue.shift()
+ fetchResult = queue.shift()
}
- if (!message) return callback()
- const { nodeId, batch } = message
+ if (!fetchResult) return callback()
+ const { nodeId, batch } = fetchResult
if (!(nodeId in inProgress)) inProgress[nodeId] = 0
| 10 |
diff --git a/character-controller.js b/character-controller.js @@ -1274,10 +1274,45 @@ class RemotePlayer extends InterpolatedPlayer {
console.warn('binding to nonexistent player object', this.playersArray.toJSON());
}
- const observePlayerFn = e => {
- this.position.fromArray(this.playerMap.get('position'));
- this.quaternion.fromArray(this.playerMap.get('quaternion'));
- };
+
+ let lastTimestamp = performance.now();
+ let lastPosition = new THREE.Vector3();
+ const observePlayerFn = (e) => {
+ if (e.changes.keys.has('position')) {
+ const position = e.changes.keys.get('position');
+ console.log("position is", position);
+ const timestamp = performance.now();
+ const timeDiff = timestamp - lastTimestamp;
+ lastTimestamp = timestamp;
+
+ this.position.fromArray(position);
+
+ this.positionInterpolant.snapshot(timeDiff);
+ this.quaternionInterpolant.snapshot(timeDiff);
+
+ this.characterPhysics.setPosition(this.position);
+
+ for (const actionBinaryInterpolant of this
+ .actionBinaryInterpolantsArray) {
+ actionBinaryInterpolant.snapshot(timeDiff);
+ }
+
+ this.characterPhysics.applyAvatarPhysicsDetail(true, true, performance.now(), timeDiff / 1000);
+
+ lastPosition.copy(this.position);
+
+ this.avatar.setVelocity(
+ timeDiff / 1000,
+ lastPosition,
+ this.position,
+ this.quaternion
+ );
+ }
+ if (e.changes.keys.has('quaternion')) {
+ const quaternion = e.changes.keys.get('quaternion');
+ this.quaternion.fromArray(quaternion);
+ }
+ }
this.playerMap.observe(observePlayerFn);
this.unbindFns.push(this.playerMap.unobserve.bind(this.playerMap, observePlayerFn));
| 0 |
diff --git a/lib/helper/WebDriverIO.js b/lib/helper/WebDriverIO.js @@ -48,7 +48,7 @@ let withinStore = {};
* * `keepBrowserState`: (optional, default: false) - keep browser state between tests when `restart` is set to false.
* * `keepCookies`: (optional, default: false) - keep cookies between tests when `restart` set to false.
* * `windowSize`: (optional) default window size. Set to `maximize` or a dimension in the format `640x480`.
- * * `waitForTimeout`: (option) sets default wait time in *ms* for all `wait*` functions. 1000 by default.
+ * * `waitForTimeout`: (optional, default: 1000) sets default wait time in *ms* for all `wait*` functions.
* * `desiredCapabilities`: Selenium's [desired
* capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities).
* * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper
| 7 |
diff --git a/scripts/menu/server/sv_menu.lua b/scripts/menu/server/sv_menu.lua @@ -47,9 +47,10 @@ AddEventHandler('txAdmin:events:adminsUpdated', function(onlineAdminIDs)
for id, _ in pairs(adminPermissions) do
refreshAdminIds[id] = id
end
- for newId, _ in pairs(adminPermissions) do
+ for _, newId in pairs(onlineAdminIDs) do
refreshAdminIds[newId] = newId
end
+ debugPrint('^3Forcing ' .. #refreshAdminIds .. ' clients to re-auth')
-- Resetting all admin permissions
adminPermissions = {}
| 1 |
diff --git a/README.md b/README.md @@ -97,6 +97,10 @@ Check out the [Envato Tuts+ Startup Series on its codebase](https://code.tutsplu
[Brokermate](https://www.brokermate.com/) uses Shepherd to guide users through initial setup steps.
+### [Snapsure](https://snapsure.app)
+
+[Snapsure](https://snapsure.app) uses Shepherd to help photographers learn how to set up alerts for their desired picture-perfect weather conditions.
+
### Your Project Here
If you have a cool open-source library built on Shepherd, PR this doc.
| 0 |
diff --git a/core/server/api/canary/slugs.js b/core/server/api/canary/slugs.js const models = require('../../models');
-const i18n = require('../../../shared/i18n');
+const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
+const messages = {
+ couldNotGenerateSlug: 'Could not generate slug.'
+};
+
const allowedTypes = {
post: models.Post,
tag: models.Tag,
@@ -40,7 +44,7 @@ module.exports = {
.then((slug) => {
if (!slug) {
return Promise.reject(new errors.GhostError({
- message: i18n.t('errors.api.slugs.couldNotGenerateSlug')
+ message: tpl(messages.couldNotGenerateSlug)
}));
}
return slug;
| 14 |
diff --git a/examples/viper/building_map.php b/examples/viper/building_map.php @@ -107,7 +107,7 @@ include 'config.php';
$(".waiting-title").html('Creating an overview for <span class="project_name">' + window.dataParamsForOpening.acronymtitle + '</span> failed.');
$("#progress").html(
`Sorry! We could not create your map, most likely because the project does not have enough resources linked to it. \n\
- You can link further resources to this project on the OpenAIRE website. Use the button indicated in the exemplary screenshot to do so. <br><br>If you think that there is something wrong with our site, please let us know at <a href="mailto:[email protected]">[email protected]</a>. \n\
+ You can link further resources to this project on the OpenAIRE website. Use the button indicated in the exemplary screenshot to do so. <br><br>If you think that there is something wrong with our site, please let us know at <a href="mailto:[email protected]" style="color:white; text-decoration:underline;">[email protected]</a>. \n\
<p><a href="https://www.openaire.eu/search/project?projectId=` + window.dataParamsForOpening.obj_id + `" target="_blank"><img src="viper-project-screenshot.png" class="error-building-map-image"></a>\n\
<p class="error-building-map-button"><a class="newsletter2" href="https://www.openaire.eu/search/project?projectId=` + window.dataParamsForOpening.obj_id + `" target="_blank">Go to the OpenAIRE project website</a></p>`
);
@@ -119,7 +119,7 @@ include 'config.php';
$(".waiting-description").hide();
$(".waiting-title").html('Creating an overview for <span class="project_name">' + window.dataParamsForOpening.acronymtitle + '</span> failed.');
$("#progress").html(
- 'Sorry! Something went wrong. Please <a href=\"index.php\">try again</a> in a few minutes. If you think that there is something wrong with our site, please let us know at <a href="mailto:[email protected]">[email protected]</a>.'
+ 'Sorry! Something went wrong. Please <a href=\"index.php\">try again</a> in a few minutes. If you think that there is something wrong with our site, please let us know at <a href="mailto:[email protected]" style="color:white; text-decoration:underline;">[email protected]</a>.'
)
console.log(error)
}
| 7 |
diff --git a/.github/workflows/contributor_greet.yaml b/.github/workflows/contributor_greet.yaml @@ -11,4 +11,4 @@ jobs:
Thanks for contributing to `developer-community-stats`!. We are happy to have you as a contributor. Your PR will be reviewed and merged to master. sOnce it is merged you can see your stats in https://developer-community-stats.netlify.app/
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
- allow-repeats: true
+ allow-repeats: false
| 2 |
diff --git a/src/modules/tooltip/Labels.js b/src/modules/tooltip/Labels.js @@ -19,7 +19,11 @@ export default class Labels {
let w = this.w
if (w.config.tooltip.custom !== undefined) {
- this.handleCustomTooltip({ i, j })
+ if (Array.isArray(w.config.tooltip.custom)) {
+ this.handleCustomTooltip({ i, j, isArray: true })
+ } else {
+ this.handleCustomTooltip({ i, j, isArray: false })
+ }
} else {
this.toggleActiveInactiveSeries(shared)
}
@@ -365,12 +369,17 @@ export default class Labels {
}
}
- handleCustomTooltip({ i, j }) {
+ handleCustomTooltip({ i, j, isArray }) {
const w = this.w
const tooltipEl = this.ttCtx.getElTooltip()
+ let fn = w.config.tooltip.custom
+
+ if (isArray && fn[i]) {
+ fn = w.config.tooltip.custom[i]
+ }
// override everything with a custom html tooltip and replace it
- tooltipEl.innerHTML = w.config.tooltip.custom({
+ tooltipEl.innerHTML = fn({
ctx: this.ctx,
series: w.globals.series,
seriesIndex: i,
| 11 |
diff --git a/includes/Core/Assets/Assets.php b/includes/Core/Assets/Assets.php @@ -373,7 +373,7 @@ final class Assets {
'googlesitekit_admin',
array(
'src' => $base_url . 'js/googlesitekit-admin.js',
- 'dependencies' => array( 'wp-i18n' ),
+ 'dependencies' => array(),
'execution' => 'defer',
'before_print' => function( $handle ) {
wp_add_inline_script(
| 2 |
diff --git a/userscript.user.js b/userscript.user.js @@ -51308,7 +51308,11 @@ var $$IMU_EXPORT$$;
if (domain === "d2pqhom6oey9wx.cloudfront.net") {
// https://d2pqhom6oey9wx.cloudfront.net/img_resize/5997041145b3926972f0d8.jpg
// https://d2pqhom6oey9wx.cloudfront.net/img_original/5997041145b3926972f0d8.jpg
- return src.replace(/\/img_resize\//, "/img_original/");
+ // thanks to fireattack on discord:
+ // https://privatter.net/friends_image
+ // https://d2pqhom6oey9wx.cloudfront.net/img_thumb/17529669766072bd083e962.jpeg
+ // https://d2pqhom6oey9wx.cloudfront.net/img_original/17529669766072bd083e962.jpeg
+ return src.replace(/\/img_(?:thumb|resize)\//, "/img_original/");
}
if (domain === "i.gyazo.com") {
| 7 |
diff --git a/webaverse.js b/webaverse.js @@ -622,20 +622,6 @@ const _startHacks = () => {
});
})();
}
- } else if (e.which === 221) { // ]
- const localPlayer = metaversefileApi.useLocalPlayer();
- if (localPlayer.avatar) {
- if (!playerDiorama) {
- playerDiorama = dioramaManager.createPlayerDiorama(localPlayer, {
- label: true,
- outline: true,
- lightningBackground: true,
- });
- } else {
- playerDiorama.destroy();
- playerDiorama = null;
- }
- }
} else if (e.which === 46) { // .
emoteIndex = -1;
_updateEmote();
| 2 |
diff --git a/src/lib/file-uploader.js b/src/lib/file-uploader.js @@ -144,11 +144,15 @@ const costumeUpload = function (fileData, fileType, costumeName, storage, handle
const soundUpload = function (fileData, fileType, soundName, storage, handleSound) {
let soundFormat;
switch (fileType) {
- case 'audio/mp3': {
+ case 'audio/mp3':
+ case 'audio/mpeg': {
soundFormat = storage.DataFormat.MP3;
break;
}
- case 'audio/wav': { // TODO support audio/x-wav? Do we see this in the wild?
+ case 'audio/wav':
+ case 'audio/wave':
+ case 'audio/x-wav':
+ case 'audio/x-pn-wav': {
soundFormat = storage.DataFormat.WAV;
break;
}
| 11 |
diff --git a/bl-themes/blogx/php/home.php b/bl-themes/blogx/php/home.php <ul class="pagination flex-wrap">
<!-- Previous button -->
- <li class="page-item mr-2 <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
+ <?php if (Paginator::showPrev()): ?>
+ <li class="page-item mr-2">
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">◀ <?php echo $L->get('Previous'); ?></a>
</li>
+ <?php endif; ?>
<!-- Home button -->
<li class="page-item <?php if (Paginator::currentPage()==1) echo 'disabled' ?>">
</li>
<!-- Next button -->
- <li class="page-item ml-2 <?php if (!Paginator::showNext()) echo 'disabled' ?>">
+ <?php if (Paginator::showNext()): ?>
+ <li class="page-item ml-2">
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?> ►</a>
</li>
+ <?php endif; ?>
</ul>
</nav>
| 2 |
diff --git a/src/js/services/buy-bitcoin-com.service.js b/src/js/services/buy-bitcoin-com.service.js .module('bitcoincom.services')
.factory('buyBitcoinComService', buyBitcoinComService);
- function buyBitcoinComService($http, $log, $window, $filter, platformInfo, storageService, buyAndSellService, gettextCatalog) {
- var service = {};
+ function buyBitcoinComService(buyAndSellService, gettextCatalog) {
+ var service = {
- service.register = function() {
+ // Functions
+ register: register
+ };
+
+ return service;
+
+ function register() {
buyAndSellService.register({
name: 'buydotbitcoindotcom',
logo: 'img/bitcoin-com-logo-grey.png',
sref: 'tabs.buyandsell.bitcoindotcom'
});
};
-
- service.register();
-
- return service;
}
})();
| 1 |
diff --git a/assets/js/modules/adsense/components/module/ModuleOverviewWidget/index.js b/assets/js/modules/adsense/components/module/ModuleOverviewWidget/index.js @@ -69,20 +69,45 @@ const ModuleOverviewWidget = ( { Widget, WidgetReportZero, WidgetReportError } )
dimensions: [ 'DATE' ],
};
- const currentRangeData = useSelect( ( select ) => select( STORE_NAME ).getReport( currentRangeArgs ) );
- const previousRangeData = useSelect( ( select ) => select( STORE_NAME ).getReport( previousRangeArgs ) );
- const currentRangeChartData = useSelect( ( select ) => select( STORE_NAME ).getReport( currentRangeChartArgs ) );
- const previousRangeChartData = useSelect( ( select ) => select( STORE_NAME ).getReport( previousRangeChartArgs ) );
-
- const currentRangeLoading = useSelect( ( select ) => ! select( STORE_NAME ).hasFinishedResolution( 'getReport', [ currentRangeArgs ] ) );
- const previousRangeLoading = useSelect( ( select ) => ! select( STORE_NAME ).hasFinishedResolution( 'getReport', [ previousRangeArgs ] ) );
- const currentRangeChartLoading = useSelect( ( select ) => ! select( STORE_NAME ).hasFinishedResolution( 'getReport', [ currentRangeChartArgs ] ) );
- const previousRangeChartLoading = useSelect( ( select ) => ! select( STORE_NAME ).hasFinishedResolution( 'getReport', [ previousRangeChartArgs ] ) );
-
- const currentRangeError = useSelect( ( select ) => select( STORE_NAME ).getErrorForSelector( 'getReport', [ currentRangeArgs ] ) );
- const previousRangeError = useSelect( ( select ) => select( STORE_NAME ).getErrorForSelector( 'getReport', [ previousRangeArgs ] ) );
- const currentRangeChartError = useSelect( ( select ) => select( STORE_NAME ).getErrorForSelector( 'getReport', [ currentRangeChartArgs ] ) );
- const previousRangeChartError = useSelect( ( select ) => select( STORE_NAME ).getErrorForSelector( 'getReport', [ previousRangeChartArgs ] ) );
+ const {
+ currentRangeData,
+ previousRangeData,
+ currentRangeLoading,
+ previousRangeLoading,
+ currentRangeError,
+ previousRangeError,
+ } = useSelect( ( select ) => {
+ const store = select( STORE_NAME );
+
+ return {
+ currentRangeData: store.getReport( currentRangeArgs ),
+ previousRangeData: store.getReport( previousRangeArgs ),
+ currentRangeLoading: ! store.hasFinishedResolution( 'getReport', [ currentRangeArgs ] ),
+ previousRangeLoading: ! store.hasFinishedResolution( 'getReport', [ previousRangeArgs ] ),
+ currentRangeError: store.getErrorForSelector( 'getReport', [ currentRangeArgs ] ),
+ previousRangeError: store.getErrorForSelector( 'getReport', [ previousRangeArgs ] ),
+ };
+ } );
+
+ const {
+ currentRangeChartData,
+ previousRangeChartData,
+ currentRangeChartLoading,
+ previousRangeChartLoading,
+ currentRangeChartError,
+ previousRangeChartError,
+ } = useSelect( ( select ) => {
+ const store = select( STORE_NAME );
+
+ return {
+ currentRangeChartData: store.getReport( currentRangeChartArgs ),
+ previousRangeChartData: store.getReport( previousRangeChartArgs ),
+ currentRangeChartLoading: ! store.hasFinishedResolution( 'getReport', [ currentRangeChartArgs ] ),
+ previousRangeChartLoading: ! store.hasFinishedResolution( 'getReport', [ previousRangeChartArgs ] ),
+ currentRangeChartError: store.getErrorForSelector( 'getReport', [ currentRangeChartArgs ] ),
+ previousRangeChartError: store.getErrorForSelector( 'getReport', [ previousRangeChartArgs ] ),
+ };
+ } );
if ( currentRangeLoading || previousRangeLoading || currentRangeChartLoading || previousRangeChartLoading ) {
return <ProgressBar />;
| 4 |
diff --git a/src/core/config/OperationConfig.js b/src/core/config/OperationConfig.js @@ -2304,7 +2304,7 @@ const OperationConfig = {
},
"Regular expression": {
module: "Regex",
- description: "Define your own regular expression (regex) to search the input data with, optionally choosing from a list of pre-defined patterns.",
+ description: "Define your own regular expression (regex) to search the input data with, optionally choosing from a list of pre-defined patterns.<br><br>Supports extended regex syntax including the 'dot matches all' flag, named capture groups, full unicode coverage (including <code>\\p{}</code> categories and scripts as well as astral codes) and recursive matching.",
inputType: "string",
outputType: "html",
args: [
| 0 |
diff --git a/utilities/key-callbacks.js b/utilities/key-callbacks.js @@ -5,15 +5,23 @@ import EventUtil from './event';
/*
* Helper function that has callbacks passed into it with the key being the keycode of the event
*/
-const mapKeyEventCallbacks = (event, { callbacks = {}, shiftCallbacks = {} }) => {
+const mapKeyEventCallbacks = (event, {
+ callbacks = {},
+ shiftCallbacks = {},
+ stopPropagation = true
+ }) => {
if (event.shiftKey
&& event.keyCode
&& shiftCallbacks[event.keyCode]) {
+ if (stopPropagation) {
EventUtil.trapEvent(event);
+ }
shiftCallbacks[event.keyCode].callback(event, shiftCallbacks[event.keyCode].data);
} else if (event.keyCode
&& callbacks[event.keyCode]) {
+ if (stopPropagation) {
EventUtil.trapEvent(event);
+ }
callbacks[event.keyCode].callback(event, callbacks[event.keyCode].data);
}
};
| 11 |
diff --git a/CHANGELOG.md b/CHANGELOG.md ## 8.7.1 (unreleased)
-### Breaking
-
-### Feature
-
-- added loading icon when doing actions in folder-contents @giuliaghisini
-
### Bugfix
+- Added loading icon when doing actions in folder-contents @giuliaghisini
- Fix German translation "from" -> "E-Mail" in contact form @tisto
-### Internal
-
## 8.7.0 (2020-10-27)
### Feature
| 6 |
diff --git a/factory-ai-vision/EdgeSolution/modules/WebModule/ui/src/components/LabelingPage/Scene.tsx b/factory-ai-vision/EdgeSolution/modules/WebModule/ui/src/components/LabelingPage/Scene.tsx @@ -78,6 +78,7 @@ const Scene: FC<SceneProps> = ({
dispatch(removeAnnotation(selectedAnnotationIndex));
setWorkState(WorkState.None);
setShowOuterRemoveButton(false);
+ setSelectedAnnotationIndex(null);
}, [dispatch, selectedAnnotationIndex, setWorkState, setShowOuterRemoveButton]);
const onMouseDown = (e: KonvaEventObject<MouseEvent>): void => {
// * Single bounding box labeling type condition
| 12 |
diff --git a/includes/Modules/Analytics.php b/includes/Modules/Analytics.php @@ -555,34 +555,34 @@ final class Analytics extends Module implements Module_With_Screen, Module_With_
$service = $this->get_service( 'analytics' );
return $service->management_goals->listManagementGoals( $connection['accountId'], $connection['propertyId'], $connection['profileId'] );
case 'accounts-properties-profiles':
- if ( ! empty( $data['existingAccountId'] ) && ! empty( $data['existingPropertyId'] ) ) {
- $this->_existing_tag_account = array(
- 'accountId' => $data['existingAccountId'],
- 'propertyId' => $data['existingPropertyId'],
- );
- }
return $this->get_service( 'analytics' )->management_accounts->listManagementAccounts();
case 'properties-profiles':
if ( ! isset( $data['accountId'] ) ) {
+ return new WP_Error(
+ 'missing_required_param',
/* translators: %s: Missing parameter name */
- return new WP_Error( 'missing_required_param', sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'accountId' ), array( 'status' => 400 ) );
- }
- if ( ! empty( $data['existingAccountId'] ) && ! empty( $data['existingPropertyId'] ) ) {
- $this->_existing_tag_account = array(
- 'accountId' => $data['existingAccountId'],
- 'propertyId' => $data['existingPropertyId'],
+ sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'accountId' ),
+ array( 'status' => 400 )
);
}
return $this->get_service( 'analytics' )->management_webproperties->listManagementWebproperties( $data['accountId'] );
case 'profiles':
if ( ! isset( $data['accountId'] ) ) {
+ return new WP_Error(
+ 'missing_required_param',
/* translators: %s: Missing parameter name */
- return new WP_Error( 'missing_required_param', sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'accountId' ), array( 'status' => 400 ) );
+ sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'accountId' ),
+ array( 'status' => 400 )
+ );
}
if ( ! isset( $data['propertyId'] ) ) {
+ return new WP_Error(
+ 'missing_required_param',
/* translators: %s: Missing parameter name */
- return new WP_Error( 'missing_required_param', sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'propertyId' ), array( 'status' => 400 ) );
+ sprintf( __( 'Request parameter is empty: %s.', 'google-site-kit' ), 'propertyId' ),
+ array( 'status' => 400 )
+ );
}
return $this->get_service( 'analytics' )->management_profiles->listManagementProfiles( $data['accountId'], $data['propertyId'] );
| 2 |
diff --git a/types/index.d.ts b/types/index.d.ts @@ -2755,8 +2755,8 @@ export interface TooltipOptions<TType extends ChartType = ChartType> extends Cor
*/
textDirection: Scriptable<string, ScriptableTooltipContext<TType>>;
- animation: AnimationSpec<TType>;
- animations: AnimationsSpec<TType>;
+ animation: AnimationSpec<TType> | false;
+ animations: AnimationsSpec<TType> | false;
callbacks: TooltipCallbacks<TType>;
}
| 11 |
diff --git a/src/libs/Navigation/AppNavigator/AppNavigator.js b/src/libs/Navigation/AppNavigator/AppNavigator.js @@ -137,7 +137,7 @@ const AppNavigator = (props) => {
};
if (props.isSmallScreenWidth) {
- screenOptions.cardStyleInterpolator = CardStyleInterpolators.forHorizontalIOS;
+ screenOptions.cardStyleInterpolator = CardStyleInterpolators.forScaleFromCenterAndroid;
}
return (
| 4 |
diff --git a/FunctionalTests/Generated/SputnikTests.tt b/FunctionalTests/Generated/SputnikTests.tt @@ -42,14 +42,11 @@ namespace NiL.JS.Test.Generated
testName = originalName + "_" + (index++);
tests.Add(testName);
-#>
-<#
var code = File.ReadAllText(file);
var descStart = code.IndexOf("/*");
var desc = code.Substring(descStart, code.IndexOf("*/") - descStart);
if (desc.Contains("* @ignore"))
{#>
-
[Ignore]<#
}
#>
| 2 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -9,6 +9,20 @@ To see all merged commits on the master branch that will be part of the next plo
where X.Y.Z is the semver of most recent plotly.js release.
+## [1.58.2] -- 2020-12-08
+
+### Fixed
+ - Fix `root.color` error for `treemap` and `sunburst` traces
+ (regression introduced in 1.58.0) [#5330]
+ - Avoid infinite redraws to compute autorange for "inside" tick labels
+ on the axes linked with `scaleanchor` and/or `matches` [#5329]
+ - Provide padding for "inside" tick labels of various cartesian traces
+ e.g. `heatmap`, `bar` and `line` plots [#5325]
+ - Adjust position of multi-line dates for tick labels in respect to
+ `side` and `ticklabelposition` on x-axis [#5326]
+ - Move `tape` to dev-dependencies [#5323]
+
+
## [1.58.1] -- 2020-12-04
### Fixed
| 3 |
diff --git a/articles/compliance/definitions.md b/articles/compliance/definitions.md @@ -11,7 +11,7 @@ description: Definitions used for Auth0's documentation on GDPR
| Data Processor | The entity (which is Auth0) that processes data on behalf of a data controller (see GDPR for exact definition) |
| Personal Data | Data that can be used to identify (directly or indirectly) a subject, particularly via reference to an identifier (such as a name, identification number, location data, or online identifier), or to the physical, physiological, genetic, mental, economic, cultural, or social identity of that person |
| Sensitive Personal Data | Personal data that reveals racial or ethnic origin, political opinions, religious or philosophical beliefs, or trade-union membership; genetic data or biometric data |
-| Auth0 Subprocessors | Third party systems to which Auth0 provides personal data |
+| Auth0 [Subprocessors](/compliance/subprocessors) | Third party systems to which Auth0 provides personal data |
<%= include('./_stepnav', {
prev: ["Go back", "/compliance"]
| 0 |
diff --git a/js/webcomponents/bisweb_filetreepanel.js b/js/webcomponents/bisweb_filetreepanel.js @@ -274,6 +274,11 @@ class FileTreePanel extends HTMLElement {
fileTree = files;
}
+ console.log('file tree', fileTree);
+ //alpabetize tree entries
+ sortEntries(fileTree);
+
+
let listElement = this.panel.getWidget();
listElement.find('.file-container').remove();
@@ -340,10 +345,6 @@ class FileTreePanel extends HTMLElement {
});
}
- console.log('file tree', fileTree);
- //alpabetize tree entries
- sortEntries(fileTree);
-
tree.jstree(true).settings.contextmenu.items = newSettings;
tree.jstree(true).redraw(true);
@@ -395,7 +396,6 @@ class FileTreePanel extends HTMLElement {
//sort the tree into alphabetical order, with directories and labeled items first
function sortEntries(children) {
- console.log('children', children);
if (children) {
children.sort((a, b) => {
if (a.type === 'directory') {
| 1 |
diff --git a/lib/datapacksjob.js b/lib/datapacksjob.js @@ -814,6 +814,8 @@ DataPacksJob.prototype.exportJob = async function(jobInfo) {
await this.updateSettings(JSON.parse(JSON.stringify(jobInfo)));
}
+ VlocityUtils.milestone('Retrieving Vlocity');
+
await this.buildManifestFromQueries(jobInfo);
if (jobInfo.deltaCheck) {
@@ -850,8 +852,11 @@ DataPacksJob.prototype.exportJob = async function(jobInfo) {
await this.exportFromManifest(jobInfo);
if (jobInfo.includeSalesforceMetadata) {
+ VlocityUtils.milestone('Retrieving Salesforce');
await this.retrieveSalesforce(jobInfo);
}
+
+ VlocityUtils.milestone('Finishing Retrieve');
};
DataPacksJob.prototype.getAllAvailableExports = async function(jobInfo) {
| 7 |
diff --git a/books/views.py b/books/views.py @@ -17,6 +17,7 @@ from rest_framework.views import APIView
from books.google import BookFinder
from books.serializers import *
from .forms import IsbnForm
+from .models import Book as BookModel
class IsbnFormView(View):
@@ -33,8 +34,13 @@ class IsbnFormView(View):
form = IsbnForm(request.POST)
if form.is_valid():
isbn = form.cleaned_data["isbn"]
+ book_from_db = BookModel.objects.filter(isbn=isbn).distinct()
book = BookFinder.fetch(isbn)
+ if book_from_db:
+ messages.warning(request, 'The requested book is already on the database.')
+ return self.get(request)
+
if book == {}:
messages.warning(request, 'Sorry! We could not find the book with the ISBN provided.')
else:
| 0 |
diff --git a/generators/client/templates/vue/package.json.ejs b/generators/client/templates/vue/package.json.ejs "sockjs-client": "1.1.4",
"webstomp-client": "1.2.0",
<%_ } _%>
- "vue": "2.5.17",
+ "vue": "2.5.21",
"vue-class-component": "6.3.2",
"vue-cookie": "1.1.4",
- "vue-i18n": "8.5.0",
+ "vue-i18n": "8.6.0",
"vue-property-decorator": "7.2.0",
"vue-router": "3.0.2",
"vue2-filters": "0.3.0",
| 3 |
diff --git a/examples/collection-only/collection.json b/examples/collection-only/collection.json "stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
- "https://stac-extensions.github.io/scientific/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json"
],
"id": "sentinel-2",
"minimum": 6.78,
"maximum": 89.9
},
- "sci:citation": {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "type": "string",
- "pattern": "Copernicus Sentinel data \\d{4}"
- },
"gsd": [
10,
30,
| 2 |
diff --git a/js/queries/sparseData.xq b/js/queries/sparseData.xq ; sparseData
-(fn [dataset samples gene]
+(fn [dataset samples genes]
(let [getfield (fn [field]
(:id (car (query {:select [:field.id]
:from [:dataset]
:where [:and [:in :value samples][:= :field_id sampleID]]}))
:rows (xena-query {:select ["ref" "alt" "altGene" "effect" "dna-vaf" "rna-vaf" "amino-acid" "genes" "sampleID" "position"]
:from [dataset]
- :where [:and [:in :any "genes" [gene]] [:in "sampleID" samples]]})}))
+ :where [:and [:in :any "genes" genes] [:in "sampleID" samples]]})}))
| 11 |
diff --git a/src/ArrowDirectionMixin.js b/src/ArrowDirectionMixin.js @@ -34,8 +34,6 @@ function ArrowDirectionMixin(Base) {
}
this[symbols.raiseChangeEvents] = false;
});
- assumeButtonFocus(this, this.$.arrowButtonLeft);
- assumeButtonFocus(this, this.$.arrowButtonRight);
}
get defaultState() {
@@ -176,19 +174,4 @@ function ArrowDirectionMixin(Base) {
ArrowDirectionMixin.inject = inject;
-/*
- * By default, a button will always take focus on mousedown. For this component,
- * we want to override that behavior, such that a mousedown on a button keeps
- * the focus on the outer component.
- */
-function assumeButtonFocus(element, button) {
- button.addEventListener('mousedown', event => {
- // Given the main element the focus if it doesn't already have it.
- element.focus();
- // Prevent the default focus-on-mousedown behavior.
- event.preventDefault();
- });
-}
-
-
export default ArrowDirectionMixin;
| 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.