code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/.eslintrc.json b/.eslintrc.json "l": "readonly",
"b64_to_utf8": "readonly",
"utf8_to_b64": "readonly",
- "BeautifyAll": "readonly",
- "PlaySound": "readonly"
+ "BeautifyAll": "readonly"
},
"extends": ["airbnb-base", "prettier"],
"parserOptions": {
| 2 |
diff --git a/magda-web-client/src/config.ts b/magda-web-client/src/config.ts @@ -40,7 +40,7 @@ const fallbackApiHost = "https://dev.magda.io/";
const DEV_FEATURE_FLAGS = {
cataloguing: true,
publishToDga: true,
- previewAddDataset: true
+ previewAddDataset: false
};
const homePageConfig: {
| 12 |
diff --git a/.github/stale.yml b/.github/stale.yml @@ -13,7 +13,7 @@ exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
-staleLabel: wontfix
+staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
| 4 |
diff --git a/token-metadata/0x53Db6b7fee89383435e424764A8478ACDA4DD2cD/metadata.json b/token-metadata/0x53Db6b7fee89383435e424764A8478ACDA4DD2cD/metadata.json "symbol": "VIBS",
"address": "0x53Db6b7fee89383435e424764A8478ACDA4DD2cD",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/tests/metrics.test.js b/tests/metrics.test.js const axios = require("axios")
//Github action
- const action = yaml.safeLoad(fs.readFileSync(path.join(__dirname, "../action.yml"), "utf8"))
+ const action = yaml.load(fs.readFileSync(path.join(__dirname, "../action.yml"), "utf8"))
action.defaults = Object.fromEntries(Object.entries(action.inputs).map(([key, {default:value}]) => [key, /^(yes|no)$/.test(value) ? value === "yes" : value]))
action.input = vars => Object.fromEntries([...Object.entries(action.defaults), ...Object.entries(vars)].map(([key, value]) => [`INPUT_${key.toLocaleUpperCase()}`, value]))
action.run = async (vars) => await new Promise((solve, reject) => {
| 1 |
diff --git a/scripts/identify_dependencies.py b/scripts/identify_dependencies.py @@ -4,14 +4,8 @@ import json
import sys
class bcolors:
- HEADER = '\033[95m'
- OKBLUE = '\033[94m'
- OKGREEN = '\033[92m'
- WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
- BOLD = '\033[1m'
- UNDERLINE = '\033[4m'
pp = pprint.PrettyPrinter(indent=2)
DEV_DEP = "devDependencies"
| 2 |
diff --git a/bl-kernel/pages.class.php b/bl-kernel/pages.class.php @@ -606,6 +606,8 @@ class Pages extends dbJSON {
// Returns string without HTML tags and truncated
private function generateSlug($text, $truncateLength=60) {
$tmpslug = Text::removeHTMLTags($text);
+ // Remove break lines
+ $tmpslug = str_replace(array("\r", "\n"), '', $tmpslug);
return Text::truncate($tmpslug, $truncateLength, '');
}
| 2 |
diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js @@ -55,36 +55,31 @@ const VIDEO_CONSTRAINS =
{
'low' :
{
- width : { ideal: 320 },
- aspectRatio : videoAspectRatio
+ width : 320
},
'medium' :
{
- width : { ideal: 640 },
- aspectRatio : videoAspectRatio
+ width : 640
},
'high' :
{
- width : { ideal: 1280 },
- aspectRatio : videoAspectRatio
+ width : 1280
},
'veryhigh' :
{
- width : { ideal: 1920 },
- aspectRatio : videoAspectRatio
+ width : 1920
},
'ultra' :
{
- width : { ideal: 3840 },
- aspectRatio : videoAspectRatio
+ width : 3840
}
};
function getVideoConstrains(resolution, aspectRatio)
{
return {
- width : VIDEO_CONSTRAINS[resolution].width,
- aspectRatio
+ width : { ideal: VIDEO_CONSTRAINS[resolution].width },
+ height : { ideal: VIDEO_CONSTRAINS[resolution].width / aspectRatio }
};
}
| 12 |
diff --git a/README.md b/README.md @@ -143,7 +143,10 @@ Element `hello-kitty`
get greeting () // "automagic" token binding
{ return `Kitty Carousel ${ this.icon }` }
- onclick () { // event handler
+
+// EVENT HANDLERS
+
+ onclick (e) { // event handler
// "automagic" event registration
alert (`You clicked on ${e.target.tagName} ${ this.icon }`)
}
| 3 |
diff --git a/configs/cloudinary.json b/configs/cloudinary.json {
"index_name": "cloudinary",
"start_urls": [
- "https://cloudinary.com/documentation"
+ "https://cloudinary.com/documentation",
+ {
+ "url": "https://cloudinary.com/documentation/image_transformations",
+ "page_rank": 3
+ },
+ {
+ "url": "https://cloudinary.com/documentation/video_manipulation_and_delivery",
+ "page_rank": 3
+ },
+ {
+ "url": "https://cloudinary.com/documentation/upload_images",
+ "page_rank": 3
+ },
+ {
+ "url": "https://cloudinary.com/documentation/upload_videos",
+ "page_rank": 3
+ },
+ {
+ "url": "https://cloudinary.com/documentation/image_upload_api_reference",
+ "page_rank": 3
+ },
+ {
+ "url": "https://cloudinary.com/documentation/image_transformation_reference",
+ "page_rank": 3
+ },
+ {
+ "url": "https://cloudinary.com/documentation/video_transformation_reference",
+ "page_rank": 3
+ },
+ {
+ "url": "https://cloudinary.com/documentation/admin_api",
+ "page_rank": 2
+ },
+ {
+ "url": "https://cloudinary.com/documentation/search_api",
+ "page_rank": 2
+ },
+ {
+ "url": "https://cloudinary.com/documentation/image_optimization",
+ "page_rank": 2
+ },
+ {
+ "url": "https://cloudinary.com/documentation/responsive_images",
+ "page_rank": 2
+ },
+ {
+ "url": "https://cloudinary.com/documentation/upload_widget",
+ "page_rank": 1
+ },
+ {
+ "url": "https://cloudinary.com/documentation/product_gallery",
+ "page_rank": 1
+ },
+ {
+ "url": "https://cloudinary.com/documentation/cloudinary_video_player",
+ "page_rank": 1
+ },
+ {
+ "url": "https://cloudinary.com/documentation/how_to_integrate_cloudinary",
+ "page_rank": 1
+ },
+ {
+ "url": "https://cloudinary.com/documentation/dam_advanced_search",
+ "page_rank": 1
+ },
+ {
+ "url": "https://cloudinary.com/documentation/dam_manage_individual_assets",
+ "page_rank": 1
+ },
+ {
+ "url": "https://cloudinary.com/documentation/video_player_api_reference",
+ "page_rank": 1
+ },
+ {
+ "url": "https://cloudinary.com/documentation/product_gallery_reference",
+ "page_rank": 1
+ },
],
"sitemap_urls": [
"https://cloudinary.com/sitemap.xml"
| 12 |
diff --git a/iris/mutations/communityMember/blockCommunityMember.js b/iris/mutations/communityMember/blockCommunityMember.js @@ -61,12 +61,14 @@ export default async (_: any, { input }: Input, { user }: GraphQLContext) => {
return new UserError('This person is already blocked in your community.');
}
- if (!currentUserPermission.isOwner) {
- return new UserError('You must own this community to manage members.');
+ if (!currentUserPermission.isOwner && !currentUserPermission.isModerator) {
+ return new UserError(
+ 'You must own or moderate this community to manage members.'
+ );
}
// all checks pass
- if (currentUserPermission.isOwner) {
+ if (currentUserPermission.isOwner || currentUserPermission.isModerator) {
const channels = await getChannelsByCommunity(community.id);
const channelIds = channels.map(c => c.id);
const blockInChannelPromises = channelIds.map(
| 11 |
diff --git a/bundles/ranvier-commands/commands/waypoint.js b/bundles/ranvier-commands/commands/waypoint.js @@ -38,6 +38,10 @@ module.exports = srcPath => {
home: null
};
+ if (waypoints.saved.includes(player.room.entityReference)) {
+ return B.sayAt(player, 'You already saved this waypoint.');
+ }
+
waypoints.saved.push(player.room.entityReference);
player.setMeta('waypoints', waypoints);
B.sayAt(player, `${player.room.title} saved to your waypoints. Use '<b>waypoint home</b>' to set as your home waypoint.`);
| 1 |
diff --git a/token-metadata/0x593114f03A0A575aece9ED675e52Ed68D2172B8c/metadata.json b/token-metadata/0x593114f03A0A575aece9ED675e52Ed68D2172B8c/metadata.json "symbol": "BDP",
"address": "0x593114f03A0A575aece9ED675e52Ed68D2172B8c",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/inertia.js b/src/inertia.js @@ -82,13 +82,15 @@ export default {
return Promise.reject(error)
}
}).then(page => {
- this.hideProgressBar()
if (page) {
this.version = page.version
this.setState(page, replace)
return this.setPage(page).then(() => {
this.setScroll(preserveScroll)
+ this.hideProgressBar()
})
+ } else {
+ this.hideProgressBar()
}
})
},
| 12 |
diff --git a/src/components/SettingsWindow.jsx b/src/components/SettingsWindow.jsx @@ -1017,14 +1017,6 @@ export default class SettingsWindow extends PureComponent {
<p>{T.h("SETTINGS_GENERAL_DIS_OVERLAY_DESC")}</p>
{ this.renderToggle("disableOverlay") }
<br />
- <label>Disable Auto Apply</label>
- <p>Prevent last known brightness from re-applying after certain hardware/user events.</p>
- { this.renderToggle("disableAutoApply") }
- <br />
- <label>Disable Auto Refresh</label>
- <p>Prevent last known brightness from read after certain hardware/user events.</p>
- { this.renderToggle("disableAutoRefresh") }
- <br />
<label>{T.t("SETTINGS_GENERAL_RESET_TITLE")}</label>
<p>{T.t("SETTINGS_GENERAL_RESET_DESC")}</p>
@@ -1233,7 +1225,15 @@ export default class SettingsWindow extends PureComponent {
<p>Dev Mode</p>
{ this.renderToggle("isDev") }
<br />
- <p>Use Native Animation</p>
+ <label>Disable Auto Apply</label>
+ <p>Prevent last known brightness from re-applying after certain hardware/user events.</p>
+ { this.renderToggle("disableAutoApply") }
+ <br />
+ <label>Disable Auto Refresh</label>
+ <p>Prevent last known brightness from read after certain hardware/user events.</p>
+ { this.renderToggle("disableAutoRefresh") }
+ <br />
+ <p>Use Native Animation (depricated)</p>
{ this.renderToggle("useNativeAnimation") }
<br />
<p>Use Taskbar Registry</p>
| 5 |
diff --git a/.storybook/preview.js b/.storybook/preview.js @@ -63,7 +63,7 @@ export const decorators = [
},
// Features must be set up before test registry is initialized.
( Story, { parameters } ) => {
- const { features = [] } = parameters;
+ const { features = [], route } = parameters;
const isFirstMount = useFirstMountState();
useUnmount( () => enabledFeatures.clear() );
@@ -73,7 +73,7 @@ export const decorators = [
}
return (
- <WithTestRegistry features={ features }>
+ <WithTestRegistry features={ features } route={ route }>
<Story />
</WithTestRegistry>
);
| 11 |
diff --git a/lib/Parser.js b/lib/Parser.js @@ -1047,6 +1047,14 @@ class Parser extends Tapable {
}
walkNewExpression(expression) {
+ const callee = this.evaluateExpression(expression.callee);
+ if(callee.isIdentifier()) {
+ const result = this.applyPluginsBailResult("new " + callee.identifier, expression);
+ if(result === true) {
+ return;
+ }
+ }
+
this.walkExpression(expression.callee);
if(expression.arguments)
this.walkExpressions(expression.arguments);
| 7 |
diff --git a/vis/js/bubbles.js b/vis/js/bubbles.js @@ -826,9 +826,8 @@ BubblesFSM.prototype = {
this.bringPapersToFront(d);
hideSibling(circle);
- if (papers.is("behindbubble") || papers.is("behindbigbubble")) {
papers.mouseover();
- }
+
d3.selectAll("#region").style("fill-opacity", 1);
}
| 2 |
diff --git a/articles/support/matrix.md b/articles/support/matrix.md @@ -283,14 +283,9 @@ Auth0 support is limited to the most recent version of the OS listed (unless oth
<tbody>
<tr>
<td><a href="https://github.com/auth0/lock">Lock.js</a></td>
- <td>v10</td>
+ <td>v11</td>
<td><div class="label label-primary">Supported</div></td>
</tr>
- <tr class="light-top-border">
- <td></td>
- <td>v9</td>
- <td><div class="label label-warning">Bug fixes</div></td>
- </tr>
<tr>
<td><a href="https://github.com/auth0/Lock.Android">Lock.Android</a></td>
<td>v2</td>
| 3 |
diff --git a/src/configureRoutes.js b/src/configureRoutes.js @@ -5,20 +5,17 @@ import warning from './utils/warning';
import requireModuleDefault from './utils/requireModuleDefault';
import CatalogContext from './components/CatalogContext';
import PageContent from './components/Page/PageContent';
-
-const fetchText = (url) =>
- fetch(url, {credentials: 'same-origin'})
- .then((response) => response.text());
+import {fetchMarkdown, reactComponent} from './content';
const pageComponent = (page) => {
if (page.content) {
return (props) => <PageContent {...props} contentPromiseFn={page.content} />;
}
if (page.src) {
- return (props) => <PageContent {...props} contentPromiseFn={() => fetchText(page.src)} />;
+ return (props) => <PageContent {...props} contentPromiseFn={fetchMarkdown(page.src)} />;
}
if (page.component) {
- return (props) => <PageContent {...props} contentPromiseFn={() => Promise.resolve(requireModuleDefault(page.component))} />;
+ return (props) => <PageContent {...props} contentPromiseFn={reactComponent(requireModuleDefault(page.component))} />;
}
return () => (
| 4 |
diff --git a/spec/requests/admin/visualizations_spec.rb b/spec/requests/admin/visualizations_spec.rb @@ -172,17 +172,6 @@ describe Admin::VisualizationsController do
last_response.status.should eq 200
end
- it 'never for maps with google basemaps' do
- @user.stubs(:builder_enabled).returns(true)
- @user.stubs(:builder_enabled?).returns(true)
-
- Carto::Visualization.find(@id).layers.create(kind: 'gmapsbase')
-
- login_as(@user, scope: @user.username)
- get public_visualizations_show_path(id: @id), {}, @headers
- last_response.status.should eq 200
- end
-
it 'embed redirects to builder for v3 when needed' do
# These two tests are in the same testcase to test proper embed cache invalidation
@user.stubs(:builder_enabled).returns(false)
| 2 |
diff --git a/js/webcomponents/bisweb_filetreepipeline.js b/js/webcomponents/bisweb_filetreepipeline.js @@ -623,7 +623,7 @@ class FileTreePipeline extends HTMLElement {
let offset = parsedData['offset'];
let promiseArray = [], tsvData = {};
for (let runName of Object.keys(orderedRuns)) {
- let tsvFile = "ONSET\tDURATION\tEVENT_TYPE\n\r", tsvFilename = '';
+ let tsvFile = "ONSET\tDURATION\tEVENT_TYPE\n\r";
for (let task of orderedRuns[runName]) {
let lowRange = (task.value[0] - offset) * tr, highRange = (task.value[1] - offset) * tr;
let duration = (highRange - lowRange);
@@ -631,11 +631,7 @@ class FileTreePipeline extends HTMLElement {
tsvFile = tsvFile + '' + lowRange + '\t' + duration + '\t' + task.task + '\n\r';
}
- tsvFilename = baseDirectory + '/' + runName + '.tsv';
- console.log('filename', tsvFilename, 'contents', tsvFile);
-
tsvData[runName] = tsvFile;
- //promiseArray.push( bis_genericio.write(tsvFilename, tsvFile));
}
//find tasks scans to associate with each run (e.g. a scan named 'sub-01_task_unnamed_run-01' would be associated with 'run1' in the .json file)
@@ -650,7 +646,6 @@ class FileTreePipeline extends HTMLElement {
console.log('An error occured while parsing JSON', e);
}
- console.log('job info', jobInfo);
let filteredFiles = jobInfo.files.filter( (file) => { return file.filename.includes('func'); });
for (let file of filteredFiles) {
@@ -661,12 +656,11 @@ class FileTreePipeline extends HTMLElement {
bidsTsvFilename = bidsTsvFilename.join('/');
//get rid of the other tsv files associated with this file given that a new one is being uploaded
- file.supportingfiles = file.supportingfiles.filter( (supportingfile) => { let splitsupp = supportingfile.split('.'); return splitsupp[splitsupp.lengtg] !== 'tsv'; })
+ file.supportingfiles = file.supportingfiles.filter( (supportingfile) => { let splitsupp = supportingfile.split('.'); return splitsupp[splitsupp.length - 1] !== 'tsv'; });
file.supportingfiles.push(bidsTsvFilename);
let runNumRegex = /run-0*(\d+)/g;
let runNumber = runNumRegex.exec(file.name);
- console.log('run key', runNumber, file.name);
let runKey = 'run' + runNumber[1]; //key in the tsvData dictionary
let fullTsvFilename = baseDirectory + '/' + bidsTsvFilename;
@@ -674,8 +668,7 @@ class FileTreePipeline extends HTMLElement {
}
//since jobInfo has had supporting files updated for all func keys, write it too
- console.log('job info', jobInfo.files);
- let stringifiedJobInfo = JSON.stringify(jobInfo);
+ let stringifiedJobInfo = JSON.stringify(jobInfo, null, 2);
promiseArray.push(bis_genericio.write(jobInfoFilename, stringifiedJobInfo));
Promise.all(promiseArray).then( () => {
| 1 |
diff --git a/content/articles/react-drf-shortener/index.md b/content/articles/react-drf-shortener/index.md @@ -4,7 +4,7 @@ This article covers creating a custom URL(Uniform Resource Locator) shortener se
The user will copy a link in the input field provided and click the `shorten` button. The link will be sent to the backend using the `Fetch API`, and the backend will apply a procedure to provide an equivalent short 6-digit URL. Equivalent means that the short URL will redirect the user to the same page as the long URL.
-#### Prerequisites
+### Prerequisites
To follow along, the reader should have:
@@ -16,7 +16,7 @@ To follow along, the reader should have:
- A browser, preferably Google Chrome.
- A code editor, preferably VS Code.
-#### Goals
+### Goals
By the end of this article, the reader should be able to:
@@ -24,7 +24,7 @@ By the end of this article, the reader should be able to:
- Work with React and Django.
- Fetch data from a database using Django and display it on React webpage.
-#### Setting up the Backend and Exposing the API Routes.
+### Setting up the Backend and Exposing the API Routes.
Create a folder named `react-drf-shortener` and `cd` into it. First, create a virtual environment for the Django backend. More information about Django virtual environments can be found [here](https://docs.python.org/3/tutorial/venv.html).
@@ -86,7 +86,7 @@ python -m pip install django-cors-headers
`python -m pip install django-cors-headers` - This will install CORS to allow the Django backend to communicate with the React front-end.
-#### Registering the api app and the installed packages
+### Registering the api app and the installed packages
Open the `settings.py` file and modify its contents as shown below:
@@ -149,9 +149,9 @@ urlpatterns = [
]
```
-#### Working on the api app
+### Working on the api app
-##### Creating the model
+#### Creating the model
Open the `models.py` file in the api folder and modify it as shown below:
@@ -179,7 +179,7 @@ python manage.py makemigrations
python manage.py migrate
```
-##### Creating the Serializer
+#### Creating the Serializer
In the `app` folder, create a `serializers.py` file and modify it as shown below:
@@ -197,7 +197,7 @@ The above code will serialize all fields in the `urlShortener` model.
More information about Serializers can be found [here](https://www.django-rest-framework.org/api-guide/serializers/).
-##### Working on the views
+#### Working on the views
Open the `views.py` file and modify it as shown below:
@@ -238,7 +238,7 @@ In the `makeshorturl` view, we use the `@api_view` decorator provided by the Dja
The `redirectUrl` view takes in the `request` and `shorturl`. The `shorturl` parameter will be specified in the `urls.py` file. This view uses a `try except` statement to retrieve an object from the database where the `shorturl` provided is equal to the shorturl in the database. The user is redirected to the `longurl` in the object retrieved from the database if the object is found.
-##### Working on the urls
+#### Working on the urls
Open the `urls.py` file and modify it as shown below:
@@ -260,7 +260,7 @@ To run the server, run the following command:
python manage.py runserver
```
-#### Setting up the Frontend
+### Setting up the Frontend
`cd` into the `react-drf-shortener` folder using the command prompt and run the following commands:
@@ -350,11 +350,11 @@ npm start
The above command will open a local development server on `127.0.0.1:3000`
-#### Testing the Shortener Service.
+### Testing the Shortener Service.
To test the service, open the browser and navigate to the following URL, `127.0.0.1:3000`. Make sure that server is running. Input the long URL on the input field provided and click on the `shorten` button. A short URL will be rendered, and after clicking on it, it redirects to the same webpage as the long URL. This means that our shortener service is working.
-#### Conclusion
+### Conclusion
We have how to implement a simple shortener service using React and Django. However, this project can be taken to the next level by styling the user interface and adding more features. One of the features that may be added is counting the number of times a link has been created.
| 1 |
diff --git a/test/jasmine/tests/lib_test.js b/test/jasmine/tests/lib_test.js @@ -798,6 +798,74 @@ describe('Test lib.js:', function() {
expect(sizeOut).toBe(outObj.testMarker.testSize);
});
+ it('should set the user input', function() {
+ var colVal = 'red';
+ var sizeVal = '1e2';
+ var attrs = {
+ testMarker: {
+ testColor: {valType: 'color', dflt: 'rgba(0, 0, 0, 0)'},
+ testSize: {valType: 'number', dflt: 20}
+ }
+ };
+ var obj = {testMarker: {testColor: colVal, testSize: sizeVal}};
+ var outObj = {};
+ var colOut = coerce2(obj, outObj, attrs, 'testMarker.testColor');
+ var sizeOut = coerce2(obj, outObj, attrs, 'testMarker.testSize');
+
+ expect(colOut).toBe('red');
+ expect(colOut).toBe(outObj.testMarker.testColor);
+ expect(sizeOut).toBe(100);
+ expect(sizeOut).toBe(outObj.testMarker.testSize);
+ });
+
+ it('should set to template if the container input is not valid', function() {
+ var attrs = {
+ testMarker: {
+ testColor: {valType: 'color', dflt: 'rgba(0, 0, 0, 0)'},
+ testSize: {valType: 'number', dflt: 20}
+ }
+ };
+ var obj = {
+ testMarker: {testColor: 'invalid', testSize: 'invalid'}
+ };
+ var outObj = {
+ _template: {
+ testMarker: {testColor: 'red', testSize: '1e2'}
+ }
+ };
+ var colOut = coerce2(obj, outObj, attrs, 'testMarker.testColor');
+ var sizeOut = coerce2(obj, outObj, attrs, 'testMarker.testSize');
+
+ expect(colOut).toBe('red');
+ expect(colOut).toBe(outObj.testMarker.testColor);
+ expect(sizeOut).toBe(100);
+ expect(sizeOut).toBe(outObj.testMarker.testSize);
+ });
+
+ it('should set to default if the both container and template inputs are not valid', function() {
+ var attrs = {
+ testMarker: {
+ testColor: {valType: 'color', dflt: 'rgba(0, 0, 0, 0)'},
+ testSize: {valType: 'number', dflt: 20}
+ }
+ };
+ var obj = {
+ testMarker: {testColor: 'invalid', testSize: 'invalid'}
+ };
+ var outObj = {
+ _template: {
+ testMarker: {testColor: 'invalid', testSize: 'invalid'}
+ }
+ };
+ var colOut = coerce2(obj, outObj, attrs, 'testMarker.testColor');
+ var sizeOut = coerce2(obj, outObj, attrs, 'testMarker.testSize');
+
+ expect(colOut).toBe('rgba(0, 0, 0, 0)');
+ expect(colOut).toBe(outObj.testMarker.testColor);
+ expect(sizeOut).toBe(20);
+ expect(sizeOut).toBe(outObj.testMarker.testSize);
+ });
+
it('should return false if there is no user input', function() {
var colVal = null;
var sizeVal; // undefined
| 0 |
diff --git a/app/models/year_statistic.rb b/app/models/year_statistic.rb @@ -54,6 +54,16 @@ class YearStatistic < ActiveRecord::Base
@year_statistic.update_attributes( data: json )
end
+ def self.regenerate_existing
+ YearStatistic.find_each do |ys|
+ if ys.user
+ YearStatistic.generate_for_user_year( ys.user, ys.year )
+ else
+ YearStatistic.generate_for_year( ys.year )
+ end
+ end
+ end
+
def self.tree_taxa( year, options = {} )
options[:year] = year
if user = options.delete(:user)
@@ -173,10 +183,10 @@ class YearStatistic < ActiveRecord::Base
}
)
r = Observation.elastic_search( es_params_with_sort ).per_page( 200 ).response
- # r.hits.hits.map{|h| { id: h._source.id, photos: h._source.photos } }.as_json
- # r.hits.hits.map(&:_source).as_json
ids = r.hits.hits.map{|h| h._source.id }
- JSON.parse( INatAPIService.get_json( "/observations", id: ids, per_page: 200 ) )["results"]
+ JSON.
+ parse( INatAPIService.get_json( "/observations", id: ids, per_page: 200 ) )["results"].
+ sort_by{|o| (o["comments_count"].to_i + o["cached_votes_total"].to_i ) * -1 }
end
end
| 1 |
diff --git a/version.json b/version.json "^refs/heads/release.*/v\\d+\\.\\d+",
"^refs/tags/v\\d+\\.\\d+"
],
+ "cloudBuild": {
+ "setVersionVariables": true,
+ "buildNumber": {
+ "enabled": true
+ }
+ },
"inherit": false
}
| 12 |
diff --git a/test/TemplateWriterTest.js b/test/TemplateWriterTest.js @@ -652,11 +652,45 @@ test("Passthrough file output", async t => {
"./test/stubs/template-passthrough/_site/test.js"
];
output.forEach(path => {
- if (!fs.existsSync(path)) {
- console.log({ path });
- }
t.true(fs.existsSync(path));
});
rimraf.sync("./test/stubs/template-passthrough/_site/");
});
+
+test("Naughty Passthrough paths", async t => {
+ let tw = new TemplateWriter(
+ "./test/stubs/template-passthrough/",
+ "./test/stubs/template-passthrough/_site",
+ ["njk", "md"]
+ );
+
+ const mgr = tw.getFileManager().getPassthroughManager();
+ mgr.setConfig({
+ passthroughFileCopy: true,
+ passthroughCopies: {
+ "../": true,
+ "../": "./",
+ "../*": "./",
+ "./test/stubs/template-passthrough/static/*.css": "./",
+ "./test/stubs/template-passthrough/static/*.js": "../../",
+ "./test/stubs/template-passthrough/img.jpg": "../../"
+ }
+ });
+
+ tw.setVerboseOutput(false);
+
+ await t.throwsAsync(async () => {
+ await tw.write();
+ });
+
+ const output = [
+ "./test/stubs/template-passthrough/_site/nope.txt",
+ "./test/stubs/template-passthrough/_site/nope/",
+ "./test/stubs/test.js",
+ "./test/stubs/img.jpg"
+ ];
+ output.forEach(path => {
+ t.false(fs.existsSync(path));
+ });
+});
| 3 |
diff --git a/docs/css/design-tools-style.css b/docs/css/design-tools-style.css @@ -35,9 +35,9 @@ div::selection {
background-color: var(--light-blue);
}
-html {
+/* html {
scroll-behavior: smooth;
-}
+} */
body, a, input, button {
font-family: 'Montserrat',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
@@ -200,6 +200,7 @@ article > header {
.banner--flex {
display: flex;
+ flex-wrap: wrap;
flex-direction: row;
align-items: center;
justify-content: flex-start;
@@ -214,6 +215,21 @@ article > header {
color: #ffffff !important;
}
+.banner-contribute > p:first-child {
+ margin-right: 1rem;
+}
+
+@media(max-width: 584px) {
+ .banner-contribute > p:first-child {
+ margin-bottom: 1rem;
+ }
+
+ .banner-contribute .btn-contribute {
+ text-align: center;
+ }
+
+}
+
.banner--yellow a {
color: inherit;
text-decoration: underline;
@@ -294,6 +310,7 @@ article h3 {
article h3 a {
color: var(--blue);
font-weight: 700;
+ line-height: 1.625rem;
}
article p {
@@ -317,6 +334,7 @@ article li:last-child {
font-size: 1.375rem;
font-weight: 700;
color: inherit;
+ line-height: 24px;
}
article ul {
@@ -500,6 +518,9 @@ article ul {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
+ width: 90%;
+ max-width: 768px;
+ min-width: 320px;
}
.nav li > a {
@@ -570,9 +591,6 @@ article ul {
text-align: left;
}
-}
-
-@media(max-width: 960px) {
.promo-banner--flawless-feedback {
flex-direction: column;
align-items: flex-start;
@@ -581,4 +599,13 @@ article ul {
.promo-banner--flawless-feedback__description {
margin: 3rem 0;
}
+
+ .tags {
+ margin-top: 0.5rem;
+ }
+
+ .tag {
+ margin-bottom: 0.5rem;
+ }
+
}
| 2 |
diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -10,6 +10,39 @@ 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.38.0] -- 2018-05-23
+
+### Added
+
+- Add 3D `cone` traces to visualize vector fields [#2641, #2647]
+- Add ability to interactively change length and rotate line shapes [#2594]
+- Add `toImageButtonOptions` config object to override to-image mode bar button
+ options [#2607]
+- Add Brazilian Portuguese (`pt-br`) locale [#2622]
+- Add Italian (`it`) locale [#2632]
+
+### Changed
+- Improve cartesian scroll and pan (mostly) performance for graphs with
+ many marker or/and text nodes [#2623]
+- Improve `splom` first render and axis-range relayout performance [#2628]
+- Improve multi-axis axis-range relayout performance by updating minimal set of
+ axes instead of all axes [#2628]
+- Use "grab" cursor to denote when annotations and shapes are draggable [#2594]
+- Ignore zero and negative link values in `sankey` traces [#2629]
+- Ignore unused and malformed links `sankey` traces without logging [#2629]
+
+### Fixed
+- Fix `scattergl` error bar computations when input value are numeric strings [#2620]
+- Fix `scattergl` error bar computations for `x0`/`dx` and `y0`/`dy` coordinates [#2620]
+- Fix `violin` kde span edge cases [#2650]
+- Make `sankey` traces accept numeric strings [#2629]
+- Fix axis range edits under axis constraints [#2620]
+- Fix "sloppy click" event emission during cartesian zoom [#2649]
+- Fix layout `grid` validation which lead to exceptions [#2638]
+- Fix `parcoords` rendering in old Safari version [#2612]
+- Link to https://get.webgl.org instead of http version in no WebGL message [#2617]
+
+
## [1.37.1] -- 2018-05-02
### Fixed
| 3 |
diff --git a/lib/waterline/utils/query/private/normalize-criteria.js b/lib/waterline/utils/query/private/normalize-criteria.js @@ -445,7 +445,7 @@ module.exports = function normalizeCriteria(criteria, modelIdentity, orm) {
// It's at least highly irregular, that's for sure.
// But there are two different error messages we might want to show:
//
- // 1. The `where` clause WAS NOT explicitly included in the original criteria.
+ // 1. The `where` clause WAS explicitly included in the original criteria.
if (!wasWhereClauseExplicitlyDefined) {
throw flaverr('E_HIGHLY_IRREGULAR', new Error(
'The provided criteria contains an unrecognized property: '+
@@ -460,7 +460,7 @@ module.exports = function normalizeCriteria(criteria, modelIdentity, orm) {
'* * *'
));
}
- // 2. A `where` clause WAS explicitly defined in the original criteria,
+ // 2. A `where` clause WAS NOT explicitly defined in the original criteria,
else {
throw flaverr('E_HIGHLY_IRREGULAR', new Error(
'The provided criteria contains an unrecognized property (`'+clauseName+'`): '+
| 7 |
diff --git a/emu/common.js b/emu/common.js @@ -46,6 +46,8 @@ function jsHandleIO() {
l += String.fromCharCode(ch);
var ll = l.split("\n");
if (ll.length>1) {
+ if ("undefined" != typeof onConsoleOutput)
+ onConsoleOutput(ll[0]);
console.log("EMSCRIPTEN:",ll[0]);
l = ll[1];
}
| 11 |
diff --git a/src/components/Card/Card.js b/src/components/Card/Card.js @@ -416,7 +416,8 @@ const CardContent = ({ tabs: singleOptionTabs=null, cardType, download=[], param
</Card>;
default:
- return <p>Invalid chart type</p>;
+ console.warn(`Invalid card type: "${cardType}"`)
+ return null;
}
| 14 |
diff --git a/components/graph/git-node.js b/components/graph/git-node.js @@ -173,7 +173,7 @@ class GitNodeViewModel extends Animateable {
$(textBox).autocomplete({
source: this.refs().filter(ref => !ref.isHEAD),
minLength: 0,
- select(event, ui) {
+ select: (event, ui) => {
const ref = ui.item;
const ray = ref.isTag ? this.tagsToDisplay : this.branchesToDisplay;
| 1 |
diff --git a/src/encoded/tests/data/inserts/file.json b/src/encoded/tests/data/inserts/file.json "md5sum": "4a7283c78f5c553a72174f850468b688",
"replicate": "/replicates/0f427e79-556e-4125-8102-f6723471807e/",
"output_type": "reporter code counts"
+ },
+ {
+ "dbxrefs": [],
+ "file_format": "csqual",
+ "file_size": 4706779893,
+ "status": "released",
+ "submitted_file_name": "hg19/wgEncodeGisDnaPet/wgEncodeGisDnaPetK56210kQual5p.csqual.gz",
+ "uuid": "237e5b0f-0bb0-4e18-8ac9-9ab89a68680f",
+ "paired_end": "1",
+ "accession": "ENCFF000LBC",
+ "replicate": "952fc6c6-f155-47e8-ab0f-d44d48880d11",
+ "md5sum": "233fb8f21fc7c975ab742ca38caeaad5",
+ "submitted_by": "/users/0d48e8c4-5954-4bf5-8c75-1e386eb27e31/",
+ "alternate_accessions": [],
+ "superseded_by": [],
+ "output_type": "reads",
+ "award": "/awards/U54HG006996/",
+ "lab": "/labs/michael-snyder/",
+ "dataset": "ENCSR751YPU"
+ },
+ {
+ "dataset": "ENCSR751YPU",
+ "lab": "/labs/michael-snyder/",
+ "submitted_by": "/users/f5b7857d-208e-4acc-ac4d-4c2520814fe1/",
+ "uuid": "42ade053-d7b6-4fe1-b58e-9504b9a2a8d5",
+ "file_format": "csqual",
+ "status": "released",
+ "fastq_signature": [],
+ "superseded_by": [],
+ "alternate_accessions": [],
+ "md5sum": "fd942e78195f509cf0454ec7621eaa7a",
+ "paired_end": "2",
+ "submitted_file_name": "hg19/wgEncodeGisDnaPet/wgEncodeGisDnaPetK56210kQual3p.csqual.gz",
+ "replicate": "952fc6c6-f155-47e8-ab0f-d44d48880d11",
+ "date_created": "2009-11-17",
+ "paired_with": "/files/ENCFF000LBC/",
+ "file_size": 4763145717,
+ "accession": "ENCFF000LBB",
+ "award": "/awards/U54HG006996/",
+ "output_type": "reads"
+ },
+ {
+ "content_md5sum": "4840832d88a1dc7ecb01d56e75104c66",
+ "md5sum": "51046aaf12d18c9c314d524f4599c98f",
+ "run_type": "paired-ended",
+ "submitted_by": "/users/f5b7857d-208e-4acc-ac4d-4c2520814fe1/",
+ "file_format": "csfasta",
+ "award": "/awards/U54HG006996/",
+ "lab": "/labs/michael-snyder/",
+ "fastq_signature": [],
+ "replicate": "952fc6c6-f155-47e8-ab0f-d44d48880d11",
+ "uuid": "f91de412-e397-44f5-ae2b-8195db8b2a8f",
+ "accession": "ENCFF000LBA",
+ "output_type": "reads",
+ "schema_version": "9",
+ "submitted_file_name": "hg19/wgEncodeGisDnaPet/wgEncodeGisDnaPetK56210kFasta5p.csfasta.gz",
+ "file_size": 2307361344,
+ "read_length": 25,
+ "status": "released",
+ "dataset": "ENCSR751YPU",
+ "paired_end": "1"
+ },
+ {
+ "output_type": "reads",
+ "paired_end": "2",
+ "read_length": 25,
+ "content_md5sum": "69de5eb9cb7d09c799fa958f0dc3edfa",
+ "file_size": 2314662239,
+ "submitted_file_name": "hg19/wgEncodeGisDnaPet/wgEncodeGisDnaPetK56210kFasta3p.csfasta.gz",
+ "uuid": "e3f3eedd-3bf7-48a8-a54f-d5019f157794",
+ "status": "released",
+ "accession": "ENCFF000LAZ",
+ "platform": "/platforms/OBI%3A0000696/",
+ "award": "/awards/U54HG006996/",
+ "paired_with": "/files/ENCFF000LBA/",
+ "dataset": "ENCSR751YPU",
+ "file_format": "csfasta",
+ "md5sum": "20125f316dafa4daed390afae59e7bb2",
+ "lab": "/labs/michael-snyder/",
+ "replicate": "952fc6c6-f155-47e8-ab0f-d44d48880d11",
+ "submitted_by": "/users/f5b7857d-208e-4acc-ac4d-4c2520814fe1/",
+ "run_type": "paired-ended"
}
]
| 12 |
diff --git a/js/background.js b/js/background.js @@ -151,7 +151,7 @@ chrome.webRequest.onBeforeRequest.addListener(
// upgrade to https if the site isn't whitelisted or in our list
// of known broken https sites
- if (!(thisTab.site.whiteListed || httpsWhitelist[thisTab.site.domain] || thisTab.site.httpsWhitelisted)) {
+ if (!(thisTab.site.whiteListed || httpsWhitelist[thisTab.site.domain])) {
let upgradeStatus = onBeforeRequest(requestData);
// check for an upgraded main_frame request to use
@@ -160,9 +160,6 @@ chrome.webRequest.onBeforeRequest.addListener(
thisTab.upgradedHttps = true;
}
- if (upgradeStatus.redirectUrl)
- thisTab.httpsRequests.push(upgradeStatus.redirectUrl);
-
return upgradeStatus;
}
| 2 |
diff --git a/INSTALL.md b/INSTALL.md @@ -187,20 +187,20 @@ If you include a Youtube video URL as a class resource, nb will not be able to r
* Log in as someone who has postgres create role and create database privileges, such as postgres (one way is to do 'su' and then 'su postgres', or sudo -i -u postgres)
```
- createuser nbadmin -P #important to setup as superuser since only superusers can create a language (used for plpythonu)
+ createuser <YOUR_POSTGRES_USER> -P # replace <YOUR_POSTGRES_USER> by the user name you wish to create. Note that it's important to set it up as superuser since only superusers can create a language (used for plpythonu)
```
* Then, filling in <YOUR_POSTGRES_USER> with the superuser from before:
```
- createdb -U <YOUR_POSTGRES_USER> -h localhost <dbname>
+ createdb -U <YOUR_POSTGRES_USER> -h localhost <YOUR_DB_NAME>
```
* Alternatively, in psql (while logged in to the postgres user), do:
```
- CREATE DATABASE <dbname>;
- GRANT ALL PRIVILEGES ON DATABASE <dbname> to nbadmin;
+ CREATE DATABASE <YOUR_DB_NAME>;
+ GRANT ALL PRIVILEGES ON DATABASE <YOUR_DB_NAME> to <YOUR_POSTGRES_USER>;
```
* Exit from the database
@@ -228,8 +228,8 @@ Follow any instructions in the terminal for other migrations that may need to be
* if you make a mistake:
```
- dropdb -U nbadmin -h localhost notabene
- createdb -U nbadmin -h localhost notabene
+ dropdb -U <YOUR_POSTGRES_USER> -h localhost <YOUR_DB_NAME>
+ createdb -U <YOUR_POSTGRES_USER> -h localhost <YOUR_DB_NAME>
```
At this point you can try your installation using the Django debug server (but never use this in production...):
* From the apps directory: ```./manage.py runserver```
@@ -242,16 +242,16 @@ Follow any instructions in the terminal for other migrations that may need to be
A sample crontab generated as part of the 'make django'. You just need to add it to your crontab for it to take effect
### 6 - Backup
- - **Database:** use the pg_dump command, for instance, if NB was installed on host example.com, that the DB belonged to postgres used nbuser, and that the DB was called notabene, you'd use the following:
- -pg_dump -U nbuser -h example.com -Fc notabene > nb.backup.YYYYMMDD
+ - **Database:** use the pg_dump command:
+ -pg_dump -U <YOUR_POSTGRES_USER> -h <YOUR_DB_HOST> -Fc -f <YOUR_NB_BACKUP_FILENAME> <YOUR_DB_NAME>
- **Uploaded PDF files:** Use your favorite file backup technique (tar, rdiff-backup, unison etc...) to backup the directory:
"%s%s" % (settings.HTTPD_MEDIA,settings.REPOSITORY_DIR) (cf your settings.py files for actual values).
-### 7 - Restore (change localhost to your server name if it's not on loacalhost)
- dropdb -U nbadmin -h localhost notabene
- createdb -U nbadmin -h localhost notabene
- pg_restore -U nbadmin -h localhost -d nb3 YOUR_NB_BACKUP_FILE
+### 7 - Restore
+ dropdb -U <YOUR_POSTGRES_USER> -h <YOUR_DB_HOST> <YOUR_DB_NAME>
+ createdb -U <YOUR_POSTGRES_USER> -h <YOUR_DB_HOST> <YOUR_DB_NAME>
+ pg_restore -U <YOUR_POSTGRES_USER> -h <YOUR_DB_HOST> -d <YOUR_DB_NAME> <YOUR_NB_BACKUP_FILENAME>
## Questions
For questions (including how to install NB on other linux distributions), use our forum at https://groups.google.com/d/forum/nbusers or email [email protected]
| 14 |
diff --git a/package.json b/package.json "name": "find-and-replace",
"main": "./lib/find",
"description": "Find and replace within buffers and across the project.",
- "version": "0.215.1",
+ "version": "0.215.2",
"license": "MIT",
"activationCommands": {
"atom-workspace": [
| 6 |
diff --git a/bin/backstop b/bin/backstop @@ -25,7 +25,7 @@ docker image inspect $IMAGE -f "{{.Id}}" >/dev/null 2>&1 ||
docker build -t $IMAGE --build-arg BACKSTOPJS_VERSION=$VERSION $ROOT_DIR/docker/backstopjs
# Run the backstopjs command.
-docker run --rm -it --mount type=bind,source="$ROOT_DIR",target="/src" $IMAGE $1 --config=/src/tests/backstop/config.js
+docker run --rm -t --mount type=bind,source="$ROOT_DIR",target="/src" $IMAGE $1 --config=/src/tests/backstop/config.js
# Display a link to the report only after the "test" command.
if [ $1 == "test" ]; then
| 2 |
diff --git a/server/views/topics/foci/focalsets.py b/server/views/topics/foci/focalsets.py @@ -38,6 +38,7 @@ def topic_focal_set_definition_delete(topics_id, focal_set_definitions_id):
definitions = user_mc.topicFocalSetDefinitionList(topics_id)
for focal_set_def in definitions:
if focal_set_def['focal_set_definitions_id'] == int(focal_set_definitions_id):
+ if 'focus_definitions' in focal_set_def: # be careful - the set could be empty!
for focus_def in focal_set_def['focus_definitions']:
user_mc.topicFocalSetDefinitionDelete(topics_id, str(focus_def['focus_definitions_id']))
# now delete the set def itself
| 11 |
diff --git a/config.yml.example b/config.yml.example @@ -267,7 +267,8 @@ persistStatus: true
############################
# REST API settings:
# - rest.host
-# The IP address the server will listen. By default is localhost
+# The IP address the server will listen. The default value is localhost, this means the API will not be reachable
+# from another host. To make it public use null or 0.0.0.0.
# - rest.port
# The port the server will listen
| 7 |
diff --git a/framer/SVGLayer.coffee b/framer/SVGLayer.coffee {Color} = require "./Color"
{Layer, layerProperty} = require "./Layer"
+validFill = (value) ->
+ Color.validColorValue(value) or _.startsWith(value, "url(")
+
+toFill = (value) ->
+ if _.startsWith(value, "url(")
+ return value
+ else
+ return Color.toColor(value)
class exports.SVGLayer extends Layer
constructor: (options={}) ->
options.backgroundColor ?= null
- options.fill ?= "black"
super options
- @define "backgroundColor", layerProperty(@, "fill", "fill", null, Color.validColorValue, Color.toColor)
+ @define "fill", layerProperty(@, "fill", "fill", null, validFill, toFill)
+ @define "stroke", layerProperty(@, "stroke", "stroke", null, validFill, toFill)
+ @define "color", layerProperty(@, "color", "color", null, Color.validColorValue, Color.toColor, null, ((layer, value) -> layer.fill = value), "_elementHTML", true)
@define "gradient",
get: ->
@@ -26,14 +35,14 @@ class exports.SVGLayer extends Layer
@updateGradientSVG()
updateGradientSVG: =>
+ if not Gradient.isGradient(@_gradient)
+ @_elementGradientSVG.innerHTML = ""
+ return
- isGradient = Gradient.isGradient @_gradient
-
- if not @_elementGradientSVG and isGradient
+ if not @_elementGradientSVG
@_elementGradientSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg")
@_element.appendChild @_elementGradientSVG
- if isGradient
id = "#{@id}-gradient"
@_elementGradientSVG.innerHTML = """
<linearGradient id='#{id}' gradientTransform='rotate(#{@gradient.angle - 90}, 0.5, 0.5)' >
@@ -41,7 +50,4 @@ class exports.SVGLayer extends Layer
<stop offset="1" stop-color='##{@gradient.end.toHex()}' stop-opacity='#{@gradient.end.a}' />
</linearGradient>
"""
- @style.fill = "url(##{id})"
- else
- @_elementGradientSVG.innerHTML = ""
- @fill = @fill
+ @fill = "url(##{id})"
| 7 |
diff --git a/events/door.js b/events/door.js import { main_char_list } from '../chars/main_chars.js';
import { maps } from '../maps/maps.js';
import { config_physics_for_npcs, config_physics_for_map, config_collisions, set_speed_factors, config_physics_for_psynergy_items } from '../physics/physics.js';
+import * as numbers from '../magic_numbers.js';
export function set_door_event(data) {
data.on_event = true;
@@ -72,6 +73,13 @@ export function door_event_phases(data) {
data.npc_group
).then(() => {
game.camera.setBoundsToWorld();
+ if (game.camera.bounds.width < numbers.GAME_WIDTH) {
+ game.camera.bounds.width = numbers.GAME_WIDTH;
+ }
+ if (game.camera.bounds.height < numbers.GAME_HEIGHT) {
+ game.camera.bounds.height = numbers.GAME_HEIGHT;
+ }
+
data.hero.body.x = data.current_event.x_target * maps[data.map_name].sprite.tileWidth;
data.hero.body.y = data.current_event.y_target * maps[data.map_name].sprite.tileHeight;
| 1 |
diff --git a/package.json b/package.json "name": "find-and-replace",
"main": "./lib/find",
"description": "Find and replace within buffers and across the project.",
- "version": "0.215.8",
+ "version": "0.215.9",
"license": "MIT",
"activationCommands": {
"atom-workspace": [
| 6 |
diff --git a/src/globals/scss/helpers/_typography.scss b/src/globals/scss/helpers/_typography.scss // );
//
// @param {Map} $font-map - Font map
+// @param {Number} $override-line-height - Non responsive custom line height.
+// Omit to use the line height from the font map.
// @param {Boolean} $important - Whether to mark declarations as important.
// Generally Used to create override classes.
-@mixin govuk-typography-responsive($font-map, $important: false) {
+@mixin govuk-typography-responsive($font-map, $override-line-height: false, $important: false) {
@each $breakpoint, $breakpoint-map in $font-map {
$font-size: map-get($breakpoint-map, "font-size") iff($important, !important);
$line-height: map-get($breakpoint-map, "line-height") iff($important, !important);
+ // Sometimes we need to use a custom non-responsive line height for
+ // a component.
+ @if $override-line-height {
+ $line-height: $override-line-height iff($important, !important);
+ }
+
@if $breakpoint == null {
font-size: $font-size;
line-height: $line-height;
| 11 |
diff --git a/app/views/users/recent.html.haml b/app/views/users/recent.html.haml .col-xs-6
#controls.pull-right
%form.form-inline
- - [:spammer, :obs, :ids, :description].each do |fp|
+ .form-group
+ %label{ for: "controls-spammer" }=t :spammer
+ = select_tag :spammer, options_for_select( %w(yes no unknown).map{|o| [t( "#{o}_", default: t(o) ), o]}, params[:spammer] || "unknown" ), class: "form-control", id: "controls-spammer", data: { autosubmit: true }
+ - [:obs, :ids, :description].each do |fp|
.form-group
%label{ for: "controls-#{fp}" }=t fp
= select_tag fp, options_for_select( %w(yes no any).map{|o| [t( "#{o}_", default: t(o) ), o]}, params[fp] || "any" ), class: "form-control", id: "controls-#{fp}", data: { autosubmit: true }
| 1 |
diff --git a/README.md b/README.md @@ -69,7 +69,6 @@ within webpack itself use this plugin interface. This makes webpack very
|:--:|:----:|:----------|
|[common-chunks-webpack-plugin][common]|![common-npm]|Generates chunks of common modules shared between entry points and splits them into separate bundles (e.g vendor.bundle.js && app.bundle.js)|
|[extract-text-webpack-plugin][extract]|![extract-npm]|Extracts Text (CSS) from your bundles into a separate file (app.bundle.css)|
-|[component-webpack-plugin][component]|![component-npm]|Use components with webpack|
|[compression-webpack-plugin][compression]|![compression-npm]|Prepare compressed versions of assets to serve them with Content-Encoding|
|[i18n-webpack-plugin][i18n]|![i18n-npm]|Adds i18n support to your bundles|
|[html-webpack-plugin][html-plugin]|![html-plugin-npm]| Simplifies creation of HTML files (`index.html`) to serve your bundles|
| 2 |
diff --git a/README.md b/README.md @@ -105,7 +105,7 @@ JSON, as well as ArrayBuffers, Blobs, and TypedArrays. Check the
All types are supported in every storage backend, though storage limits in
localStorage make storing many large Blobs impossible.
-[api]: https://localforage.github.io/localForage/#setitem
+[api]: https://localforage.github.io/localForage/#data-api-setitem
## Configuration
@@ -211,7 +211,7 @@ added to this list.
## Custom Drivers
You can create your own driver if you want; see the
-[`defineDriver`](https://localforage.github.io/localForage/#definedriver) API docs.
+[`defineDriver`](https://localforage.github.io/localForage/#driver-api-definedriver) API docs.
There is a [list of custom drivers on the wiki][custom drivers].
| 1 |
diff --git a/src/commands/link.js b/src/commands/link.js @@ -3,6 +3,7 @@ const { flags } = require('@oclif/command')
const renderShortDesc = require('../utils/renderShortDescription')
const inquirer = require('inquirer')
const path = require('path')
+const chalk = require('chalk')
const getRepoData = require('../utils/getRepoData')
const isEmpty = require('lodash.isempty')
@@ -117,7 +118,11 @@ class LinkCommand extends Command {
// If no remote matches. Throw error
if (isEmpty(matchingSites)) {
- this.error(new Error(`No site found with the remote ${repoInfo.repo_path}.`))
+ this.error(new Error(`No site found with the remote ${repoInfo.repo_path}.
+
+Double check you are in the correct working directory & a remote git repo is configured.
+
+Run ${chalk.cyanBright('`git remote -v`')} to see a list of your git remotes.`))
}
// Matches a single site hooray!
@@ -204,8 +209,11 @@ class LinkCommand extends Command {
try {
site = await this.netlify.getSite({ siteId })
} catch (e) {
- if (e.status === 404) this.error(new Error(`Site id ${siteId} not found`))
- else this.error(e)
+ if (e.status === 404) {
+ this.error(new Error(`Site id ${siteId} not found`))
+ } else {
+ this.error(e)
+ }
}
linkSite(site, this)
break
@@ -219,9 +227,10 @@ function linkSite(site, context) {
context.error(new Error(`No site found`))
}
context.site.set('siteId', site.id)
- context.log(`Linked to ${site.name} in ${path.relative(path.join(process.cwd(), '..'), context.site.path)}`)
+ context.log(`This directory is now linked to site "${site.name}"`)
+ console.log(`Site ID ${site.id} saved to ${path.relative(path.join(process.cwd(), '..'), context.site.path)}`)
context.log()
- context.log(`You can now run other \`netlify\` commands in this directory`)
+ context.log(`You can now run other \`netlify\` cli commands in this directory`)
context.exit()
}
| 3 |
diff --git a/README.md b/README.md @@ -50,6 +50,10 @@ It also features smart test actions and assertions that wait for page elements t
You can change the maximum wait time.
If elements load faster, tests skip the timeout and continue.
+**Rapid test development tool**<br/>
+Changes in test code immediately restart the test, and you see the results instantly.<br/>
+See how it works in the [TestCafe Live repository](https://github.com/DevExpress/testcafe-live).
+
**Latest JS and TypeScript support**<br/>
TestCafe supports the latest JavaScript features, including ES2017 (for example, async/await).
You can also [use TypeScript](https://devexpress.github.io/testcafe/documentation/test-api/typescript-support.html)
| 0 |
diff --git a/lib/manifest.js b/lib/manifest.js @@ -32,10 +32,10 @@ const CARTRIDGE_NAME_REGEX = /cartridges\/([a-z_]+)\/cartridge/;
* @type {Array}
*/
const DEFAULT_IGNORE_PATTERNS = [
- 'test/**/*',
- 'coverage/**/*',
- 'documentation/**/*',
- 'docs/**/*',
+ `test${path.sep}**${path.sep}*`,
+ `coverage${path.sep}**${path.sep}*`,
+ `documentation${path.sep}**${path.sep}*`,
+ `docs${path.sep}**${path.sep}*`,
'*.md'
];
@@ -360,7 +360,8 @@ function generate(directories, ignorePatterns, targetDirectory, fileName) {
return acc.concat(ignore.map(ignorePattern => path.join(directory, ignorePattern)));
}, []);
- const files = await globby(directories.map(directory => path.join(directory, 'cartridges/**/*')), {
+ const files = await globby(directories.map(directory =>
+ path.join(directory, `cartridges${path.sep}**${path.sep}*`)), {
ignore: ignoreAcrossDirectories
});
| 14 |
diff --git a/src/utils/staking.js b/src/utils/staking.js @@ -346,9 +346,14 @@ export class Staking {
/********************************
Lockup
********************************/
-
async lockupWithdraw(lockupId, amount) {
let result
+ result = await this.signAndSendTransaction(lockupId, [
+ functionCall('refresh_staking_pool_balance', {}, STAKING_GAS_BASE * 3, '0')
+ ])
+ if (result === false) {
+ throw new WalletError('Unable to refresh staking pool balance', 'staking.errors.noWithdraw')
+ }
if (amount) {
result = await this.signAndSendTransaction(lockupId, [
functionCall('withdraw_from_staking_pool', { amount }, STAKING_GAS_BASE * 5, '0')
| 3 |
diff --git a/src/encoded/audit/file.py b/src/encoded/audit/file.py @@ -467,7 +467,7 @@ def audit_file_matching_md5sum(value, system):
)
)
yield AuditFailure('Incorrect matching_md5sum', detail, level='ERROR')
- else:
+ elif file.get('status') in checked_statuses:
matching_files.append(file['@id'])
matching_files_links = [audit_link(path_to_text(file), file) for file in matching_files]
| 0 |
diff --git a/articles/libraries/lock/v10/customization.md b/articles/libraries/lock/v10/customization.md @@ -835,7 +835,7 @@ Using OIDC Conformant mode in Lock necessitates a cross-origin authentication fl
For more information, please see the [OIDC adoption guide](/api-auth/tutorials/adoption) and the [cross-origin authentication documentation](/cross-origin-authentication).
::: note
-Although this flag was present before in previous versions, official support was added only in version 10.22.0
+Although this flag was present in previous versions, official support was added only in version 10.22.0.
:::
### clientBaseUrl {String}
| 2 |
diff --git a/network.js b/network.js @@ -1781,8 +1781,12 @@ function handleJustsaying(ws, subject, body){
return sendError(ws, 'only requested joint can contain a ball');
if (conf.bLight && !ws.bLightVendor)
return sendError(ws, "I'm a light client and you are not my vendor");
+ db.query("SELECT 1 FROM archived_joints WHERE unit=? AND reason='uncovered'", [objJoint.unit.unit], function(rows){
+ if (rows.length > 0) // ignore it as long is it was unsolicited
+ return sendError(ws, "this unit is already known and archived");
// light clients accept the joint without proof, it'll be saved as unconfirmed (non-stable)
return conf.bLight ? handleLightOnlineJoint(ws, objJoint) : handleOnlineJoint(ws, objJoint);
+ });
case 'free_joints_end':
case 'result':
| 8 |
diff --git a/app/assets/stylesheets/components/_forms.scss b/app/assets/stylesheets/components/_forms.scss @@ -175,7 +175,7 @@ div.transfer-input {
> div:first-of-type {
font-size: 0.9rem;
- font-weight: bold;
+ @include RobotoMedium;
> span.hidden {
visibility: hidden;
@@ -224,7 +224,7 @@ div.transfer-input {
> span {
font-size: 0.9rem;
- font-weight: bold;
+ @include RobotoMedium;
display: block;
text-decoration: none;
color: #333;
| 12 |
diff --git a/README.md b/README.md 
+https://img.shields.io/github/issues/nas5w/typeofnan-javascript-quizzes https://img.shields.io/github/forks/nas5w/typeofnan-javascript-quizzes https://img.shields.io/github/stars/nas5w/typeofnan-javascript-quizzes https://img.shields.io/github/license/nas5w/typeofnan-javascript-quizzes
+
Learn JavaScript fundamentals through fun and challenging quizzes! :smiley:
View the app online here: :point_right: [https://quiz.typeofnan.dev](https://quiz.typeofnan.dev)
| 0 |
diff --git a/edit.js b/edit.js @@ -9,11 +9,13 @@ import {XRPackage, pe, renderer, scene, camera, floorMesh, proxySession, getReal
import {downloadFile, readFile, bindUploadFileButton} from 'https://static.xrpackage.org/xrpackage/util.js';
import {wireframeMaterial, getWireframeMesh, meshIdToArray, decorateRaycastMesh, VolumeRaycaster} from './volume.js';
import './gif.js';
+import {makeCredentials} from 'https://flow.webaverse.com/flow.js';
const apiHost = 'https://ipfs.exokit.org/ipfs';
const presenceEndpoint = 'wss://presence.exokit.org';
const worldsEndpoint = 'https://worlds.exokit.org';
const packagesEndpoint = 'https://packages.exokit.org';
+const contractsHost = 'http://contracts.exokit.org:3001';
// const scenesEndpoint = 'https://scenes.exokit.org';
const network = 'rinkeby';
const infuraApiKey = '4fb939301ec543a0969f3019d74f80c2';
@@ -1570,6 +1572,32 @@ const _addPackage = async (p, matrix) => {
p.setMatrix(matrix);
}
await pe.add(p);
+ if (p.type === '[email protected]' && p.hash) {
+ const [res, res2] = await Promise.all([
+ fetch(`${contractsHost}/${p.hash}`),
+ fetch(`${contractsHost}/${p.hash}/${pe.getEnv('username')}`, {
+ method: 'PUT',
+ }),
+ ]);
+ if (res.ok && res2.ok) {
+ const [packageResponse, userResponse] = await Promise.all([
+ res.json(),
+ res2.json(),
+ ]);
+ if (packageResponse !== null && userResponse !== null) {
+ const credentials = makeCredentials(userResponse.address, userResponse.keys.privateKey);
+ p.context.iframe && p.context.iframe.contentWindow && p.context.iframe.contentWindow.xrpackage &&
+ p.context.iframe.contentWindow.navigator.xr.dispatchEvent(new MessageEvent('secure', {
+ data: {
+ packageAddress: packageResponse.address,
+ credentials,
+ },
+ }));
+ }
+ } else {
+ console.warn('contract requests failed', res, res2);
+ }
+ }
};
const _startPackageDrag = (e, j) => {
e.dataTransfer.setData('application/json+package', JSON.stringify(j));
| 0 |
diff --git a/views/about.pug b/views/about.pug @@ -75,6 +75,8 @@ block content
Every Pull Request requires our whole test suite to pass. This includes checking every
file we deliver, making #[strong ~21K tests] in total, to make sure all of the HTTP headers
are correct and the SRI hashes match.
+ li.
+ If for some reason you are experiencing issues, please fill out our #[a(href='https://docs.google.com/forms/d/e/1FAIpQLSdZu2dX68oApkjzPgSWBdIvDbiCYk5KhAL5rSNTn2YlImP-SQ/viewform', rel='noopener', target='_blank') debug form].
h3.h4.my-3
strong 3. Accessibility
| 0 |
diff --git a/bundles/core-combat/player-events.js b/bundles/core-combat/player-events.js @@ -198,6 +198,7 @@ module.exports = (srcPath) => {
* @param {Character} killer
*/
killed: state => function (killer) {
+ this.setAttributeToMax('health');
Broadcast.sayAt(this, "Whoops, that sucked!");
Broadcast.prompt(this);
},
| 12 |
diff --git a/src/components/comments/container/commentsContainer.js b/src/components/comments/container/commentsContainer.js @@ -52,7 +52,7 @@ const CommentsContainer = ({
const cachedComments = useAppSelector((state) => state.cache.comments);
const [lcomments, setLComments] = useState([]);
- const [replies, setReplies] = useState(comments);
+ const [propComments, setPropComments] = useState(comments);
const [selectedPermlink, setSelectedPermlink] = useState('');
useEffect(() => {
@@ -65,6 +65,10 @@ const CommentsContainer = ({
setLComments(shortedComments);
}, [commentCount, selectedFilter]);
+ useEffect(() => {
+ setPropComments(comments);
+ }, [comments]);
+
useEffect(() => {
const postPath = `${author || ''}/${permlink || ''}`;
//this conditional makes sure on targetted already fetched post is updated
@@ -162,7 +166,7 @@ const CommentsContainer = ({
const _getComments = async () => {
if (isOwnProfile) {
fetchPost();
- } else if (author && permlink && !replies) {
+ } else if (author && permlink && !propComments) {
await getComments(author, permlink, name)
.then((__comments) => {
//TODO: favourable place for merging comment cache
@@ -181,7 +185,7 @@ const CommentsContainer = ({
};
const _handleCachedComment = (passedComments = null) => {
- const _comments = passedComments || replies || lcomments;
+ const _comments = passedComments || propComments || lcomments;
const postPath = `${author || ''}/${permlink || ''}`;
if (cachedComments.has(postPath)) {
@@ -215,8 +219,8 @@ const CommentsContainer = ({
console.log('updated comments with cached comment');
if (passedComments) {
return newComments;
- } else if (replies) {
- setReplies(newComments);
+ } else if (propComments) {
+ setPropComments(newComments);
} else {
setLComments(newComments);
}
@@ -278,8 +282,8 @@ const CommentsContainer = ({
filteredComments = lcomments.filter(_applyFilter);
setLComments(filteredComments);
} else {
- filteredComments = replies.filter(_applyFilter);
- setReplies(filteredComments);
+ filteredComments = propComments.filter(_applyFilter);
+ setPropComments(filteredComments);
}
// remove cached entry based on parent
@@ -331,7 +335,7 @@ const CommentsContainer = ({
mainAuthor={mainAuthor}
commentNumber={commentNumber || 1}
commentCount={commentCount}
- comments={lcomments.length > 0 ? lcomments : replies}
+ comments={lcomments.length > 0 ? lcomments : propComments}
currentAccountUsername={currentAccount.name}
handleOnEditPress={_handleOnEditPress}
handleOnReplyPress={_handleOnReplyPress}
| 10 |
diff --git a/blocks/datatypes.js b/blocks/datatypes.js @@ -22,10 +22,10 @@ Blockly.Blocks['defined_recordtype_typed'] = {
.appendField(typename_field, 'VAR')
.appendField('= {');
- this.constructId_ = Blockly.utils.genUid();
+ this.recordId_ = Blockly.utils.genUid();
this.itemCount_ = 0;
- this.appendCtorInput();
- this.appendCtorInput();
+ this.appendRecordFieldInput();
+ this.appendRecordFieldInput();
this.appendDummyInput('RBRACE')
.appendField('}')
.setAlign(Blockly.ALIGN_RIGHT);
@@ -42,11 +42,11 @@ Blockly.Blocks['defined_recordtype_typed'] = {
throw 'Not allowed to replace type expression for value construct.';
},
- getCtorId: function() {
- return this.constructId_;
+ getRecordId: function() {
+ return this.recordId_;
},
- getTypeCtorDef: function(fieldName) {
+ getRecordDef: function(fieldName) {
goog.asserts.fail('Not implemented yet.');
},
@@ -54,8 +54,8 @@ Blockly.Blocks['defined_recordtype_typed'] = {
goog.asserts.fail('Not implemented yet.');
},
- appendCtorInput: function() {
- var ctrType = new Blockly.TypeExpr.CONSTRUCT(this.constructId_);
+ appendRecordFieldInput: function() {
+ var ctrType = new Blockly.TypeExpr.CONSTRUCT(this.recordId_);
var variableField =
Blockly.FieldBoundVariable.newValueConstructor(ctrType);
var index = this.itemCount_++;
@@ -66,7 +66,7 @@ Blockly.Blocks['defined_recordtype_typed'] = {
.setAlign(Blockly.ALIGN_RIGHT);
},
- resizeCtorInputs: function(expectedCount) {
+ resizeRecordFieldInputs: function(expectedCount) {
while (expectedCount < this.itemCount_) {
var index = this.itemCount_ - 1;
// Decrement the size of items first. The function this.removeInput()
@@ -80,7 +80,7 @@ Blockly.Blocks['defined_recordtype_typed'] = {
if (this.itemCount_ < expectedCount) {
this.removeInput('RBRACE');
while (this.itemCount_ < expectedCount) {
- this.appendCtorInput();
+ this.appendRecordFieldInput();
}
this.appendDummyInput('RBRACE')
.appendField('}')
@@ -105,7 +105,7 @@ Blockly.Blocks['defined_recordtype_typed'] = {
*/
domToMutation: function(xmlElement) {
var newItemCount = parseInt(xmlElement.getAttribute('items')) || 2;
- this.resizeCtorInputs(newItemCount);
+ this.resizeRecordFieldInputs(newItemCount);
},
/**
* Populate the mutator's dialog with this block's components.
@@ -133,7 +133,7 @@ Blockly.Blocks['defined_recordtype_typed'] = {
*/
compose: function(containerBlock) {
var itemCount = containerBlock.getItemCount();
- this.resizeCtorInputs(itemCount);
+ this.resizeRecordFieldInputs(itemCount);
}
};
| 10 |
diff --git a/renderer/components/onboard/Sections.js b/renderer/components/onboard/Sections.js @@ -49,6 +49,9 @@ const HeadsUpList = styled.li`
`
const TopBar = styled(Box)`
+ position: absolute;
+ top: 0;
+ width: 100%;
height: 50px;
background-color: transparent;
color: ${props => props.theme.colors.white};
| 1 |
diff --git a/src/technologies/a.json b/src/technologies/a.json "description": "AccessTrade is an affiliate marketing platform based on the CPA model developed by Interspace Co.",
"dom": "img[src*='.accesstrade.net'],img[data-src*='.accesstrade.net']",
"icon": "AccessTrade.png",
+ "scriptSrc": ["accesstrade\\.net/js/", "click\\.accesstra\\.de/js/nct/lp\\.js"],
"website": "https://accesstrade.global/"
},
"AccessiBe": {
| 7 |
diff --git a/lib/assets/core/javascripts/cartodb3/editor/export-image-pane/export-image-pane.js b/lib/assets/core/javascripts/cartodb3/editor/export-image-pane/export-image-pane.js @@ -418,7 +418,6 @@ module.exports = CoreView.extend({
$.ajax({
url: apiUrl,
- method: 'GET',
data: {
center: this._getCenterString(),
size: this._getDimensionString(),
| 2 |
diff --git a/app/views/mailer_modules/_header.html.erb b/app/views/mailer_modules/_header.html.erb <td style="padding: 20px 0px 65px 0px;" class="logo">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
- <td bgcolor="#ffffff" width="40" align="left"><img alt="Logo" src="<%= Cartodb.get_config(:mailer, 'template', 'header_logo_url') || 'http://carto-email-assets.s3.amazonaws.com/carto-logo.png' %>" width="82" height="32" style="display: block;" border="0"></td>
+ <td bgcolor="#ffffff" width="40" align="left"><img alt="Logo" src="<%= Cartodb.get_config(:mailer, 'template', 'header_logo_url') || 'http://carto-email-assets.s3.amazonaws.com/carto-logo.png' %>" width="82" style="display: block;" border="0"></td>
<td bgcolor="#ffffff" width="560" align="right">
</td>
</tr>
| 2 |
diff --git a/index.d.ts b/index.d.ts @@ -170,10 +170,10 @@ declare namespace Moleculer {
wrapMethod(method: string, handler: ActionHandler, bindTo: any): typeof handler;
}
- interface ServiceSchema {
+ interface ServiceSchema<S = ServiceSettingSchema> {
name: string;
version?: string | number;
- settings?: ServiceSettingSchema;
+ settings?: S;
dependencies?: string | GenericObject | Array<string> | Array<GenericObject>;
metadata?: GenericObject;
actions?: ServiceActions;
@@ -187,17 +187,17 @@ declare namespace Moleculer {
[name: string]: any;
}
- class Service implements ServiceSchema {
- constructor(broker: ServiceBroker, schema?: ServiceSchema);
+ class Service<S = ServiceSettingSchema> implements ServiceSchema {
+ constructor(broker: ServiceBroker, schema?: ServiceSchema<S>);
- protected parseServiceSchema(schema: ServiceSchema): void;
+ protected parseServiceSchema(schema: ServiceSchema<S>): void;
name: string;
version?: string | number;
- settings: ServiceSettingSchema;
+ settings: S;
metadata: GenericObject;
dependencies: string | GenericObject | Array<string> | Array<GenericObject>;
- schema: ServiceSchema;
+ schema: ServiceSchema<S>;
broker: ServiceBroker;
logger: LoggerInstance;
actions?: ServiceActions;
| 11 |
diff --git a/config/webpack.test.js b/config/webpack.test.js @@ -125,7 +125,7 @@ module.exports = function (options) {
*/
{
test: /\.css$/,
- loader: ['to-string-loader', 'css-loader'],
+ loader: ['to-string-loader', { loader: 'css-loader', options: { url: false } }],
exclude: [helpers.root('src/index.html')]
},
| 1 |
diff --git a/lib/build/tasks/jst.js b/lib/build/tasks/jst.js @@ -18,12 +18,6 @@ exports.task = function () {
{
src: jsFiles._templates,
dest: '<%= editor_assets_dir %>/javascripts/templates.js'
- }, {
- src: jsFiles._dashboard_templates,
- dest: '<%= editor_assets_dir %>/javascripts/dashboard_templates.js'
- }, {
- src: jsFiles._dashboard_templates_static,
- dest: '<%= editor_assets_dir %>/javascripts/dashboard_templates_static.js'
}, {
src: jsFiles._keys_templates,
dest: '<%= editor_assets_dir %>/javascripts/keys_templates.js'
| 2 |
diff --git a/assets/js/modules/adsense/components/common/AutoAdExclusionSwitches.stories.js b/assets/js/modules/adsense/components/common/AutoAdExclusionSwitches.stories.js */
import AutoAdExclusionSwitches from './AutoAdExclusionSwitches';
import { MODULES_ADSENSE } from '../../datastore/constants';
-import { createTestRegistry, WithTestRegistry, provideModules } from '../../../../../../tests/js/utils';
+import {
+ createTestRegistry,
+ WithTestRegistry,
+ provideModules,
+} from '../../../../../../tests/js/utils';
import WithRegistrySetup from '../../../../../../tests/js/WithRegistrySetup';
const Template = ( { setupRegistry, ...args } ) => (
@@ -48,15 +52,20 @@ export const AdExclusionLoggedInUsers = Template.bind( {} );
AdExclusionLoggedInUsers.storyName = 'Ad exclusions (including loggedinUsers)';
AdExclusionLoggedInUsers.args = {
setupRegistry: ( registry ) => {
- registry.dispatch( MODULES_ADSENSE ).setAutoAdsDisabled( [ 'loggedinUsers' ] );
+ registry
+ .dispatch( MODULES_ADSENSE )
+ .setAutoAdsDisabled( [ 'loggedinUsers' ] );
},
};
export const AdExclusionContentCreators = Template.bind( {} );
-AdExclusionContentCreators.storyName = 'Ad exclusions (including contentCreators)';
+AdExclusionContentCreators.storyName =
+ 'Ad exclusions (including contentCreators)';
AdExclusionContentCreators.args = {
setupRegistry: ( registry ) => {
- registry.dispatch( MODULES_ADSENSE ).setAutoAdsDisabled( [ 'contentCreators' ] );
+ registry
+ .dispatch( MODULES_ADSENSE )
+ .setAutoAdsDisabled( [ 'contentCreators' ] );
},
};
@@ -66,11 +75,13 @@ export default {
decorators: [
( Story ) => {
const registry = createTestRegistry();
- provideModules( registry, [ {
+ provideModules( registry, [
+ {
slug: 'adsense',
active: true,
connected: true,
- } ] );
+ },
+ ] );
return (
<WithTestRegistry registry={ registry }>
| 1 |
diff --git a/src/components/layouts/LayoutOdyssey/layout.scss b/src/components/layouts/LayoutOdyssey/layout.scss #layout-odyssey {
background-color: black;
color: white;
+ h1, h2, h3, h4, h5, h6 {
+ color: white;
+ }
font-family: "Bank Gothic";
perspective: 900px;
.perspectiveContainer {
| 1 |
diff --git a/articles/connections/social/linkedin.md b/articles/connections/social/linkedin.md @@ -86,6 +86,10 @@ If you have configured everything correctly, you will see the **It works!!!** pa

-<%= include('../_quickstart-links.md') %>
+## 9. Access LinkedIn API
+<%= include('../_call-api', {
+ "idp": "LinkedIn"
+}) %>
+<%= include('../_quickstart-links.md') %>
\ No newline at end of file
| 0 |
diff --git a/vis/js/default-config.js b/vis/js/default-config.js @@ -214,8 +214,8 @@ var config = {
, linkedcat: "LinkedCat+"
, linkedcat_authorview: "LinkedCat+"
, linkedcat_browseview: "LinkedCat+"
- , triple_km: "TRIPLE"
- , triple_sg: "TRIPLE"
+ , triple_km: "GoTriple"
+ , triple_sg: "GoTriple"
},
localization: {
| 10 |
diff --git a/packages/spark/settings/_settings.scss b/packages/spark/settings/_settings.scss @@ -219,7 +219,7 @@ $sprk-font-weight-display-seven: 500 !default;
// Body One
$sprk-font-family-body-one: RocketSans, Helvetica, 'Helvetica Neue', Arial,
sans-serif !default;
-$sprk-font-size-body-one: 0.9375rem !default;
+$sprk-font-size-body-one: 1rem !default;
$sprk-color-body-one: $sprk-black !default;
$sprk-line-height-body-one: 1.6 !default;
$sprk-font-weight-body-one: 500 !default;
@@ -227,7 +227,7 @@ $sprk-font-weight-body-one: 500 !default;
// Body Two
$sprk-font-family-body-two: RocketSans, Helvetica, 'Helvetica Neue', Arial,
sans-serif !default;
-$sprk-font-size-body-two: 0.9375rem !default;
+$sprk-font-size-body-two: 1rem !default;
$sprk-color-body-two: $sprk-black !default;
$sprk-line-height-body-two: 1.6 !default;
$sprk-font-weight-body-two: 300 !default;
@@ -235,7 +235,7 @@ $sprk-font-weight-body-two: 300 !default;
// Body Three
$sprk-font-family-body-three: RocketSans, Helvetica, 'Helvetica Neue', Arial,
sans-serif !default;
-$sprk-font-size-body-three: 0.9375rem !default;
+$sprk-font-size-body-three: 1rem !default;
$sprk-color-body-three: $sprk-black !default;
$sprk-line-height-body-three: 2 !default;
$sprk-font-weight-body-three: 300 !default;
| 3 |
diff --git a/README.md b/README.md @@ -40,7 +40,7 @@ GET https://api.spacexdata.com/v1/launches/latest
"rocket_type": "FT"
},
"telemetry": {
- "flight_club": null
+ "flight_club": "https://www.flightclub.io/results/?id=c277137b-55ca-42c4-b7de-555394cbcf50&code=CR12"
},
"core_serial": "B1039",
"cap_serial": "C113",
@@ -72,7 +72,7 @@ GET https://api.spacexdata.com/v1/launches/latest
"reddit_recovery": null,
"reddit_media": "https://www.reddit.com/r/spacex/comments/6th2nf/rspacex_crs12_media_thread_videos_images_gifs/",
"presskit": "http://www.spacex.com/sites/spacex/files/crs12presskit.pdf",
- "article_link": null,
+ "article_link": "https://spaceflightnow.com/2017/08/17/photos-falcon-9-rocket-soars-into-space-lands-back-at-cape-canaveral/",
"video_link": "https://www.youtube.com/watch?v=vLxWsYx8dbo"
},
"details": "Dragon is expected to carry 2,349 kg (5,179 lb) of pressurized mass and 961 kg (2,119 lb) unpressurized. The external payload manifested for this flight is the CREAM cosmic-ray detector. First flight of the Falcon 9 Block 4 upgrade. Last flight of a newly-built Dragon capsule; further missions will use refurbished spacecraft."
| 3 |
diff --git a/src/utils/spec-parser.js b/src/utils/spec-parser.js @@ -210,26 +210,12 @@ function groupByTags(openApiSpec, sortTags = false, sortEndpointsBy) {
}
// Generate Path summary and Description if it is missing for a method
- let summary = fullPath.summary ? fullPath.summary : '';
- const description = fullPath.description ? fullPath.description : '';
- if (!summary && description) {
- if (description.length > 100) {
- let charIndex = -1;
- charIndex = description.indexOf('\n');
- if (charIndex === -1 || charIndex > 100) {
- charIndex = description.indexOf('. ');
- }
- if (charIndex === -1 || charIndex > 100) {
- charIndex = description.indexOf('.');
- }
- if (charIndex === -1 || charIndex > 100) {
- summary = description;
- } else {
- summary = description.substr(0, charIndex);
- }
- } else {
- summary = description;
+ let summary = (fullPath.summary || '').trim() ? fullPath.summary.trim() : (fullPath.description || '-').trim().split('/n')[0];
+ if (summary.length > 100) {
+ summary = summary.split('.')[0];
}
+ if (!(fullPath.description || '').trim()) {
+ fullPath.description = ((fullPath.summary || '-').trim());
}
// Merge Common Parameters with This methods parameters
| 7 |
diff --git a/collection-spec/collection-spec.md b/collection-spec/collection-spec.md @@ -89,18 +89,6 @@ Each inner array consists of exactly two dates and times. Each date and time MUS
Open date ranges are supported by setting either the start or the end time to `null`. Example for data from the beginning of 2019 until now: `[["2009-01-01T00:00:00Z", null]]`.
-### Stats Object
-
-For a good understanding of the summarized field, statistics can be added. By default, only ranges with a minimum and a maximum value can be specified.
-Ranges can be specified for [ordinal](https://en.wikipedia.org/wiki/Level_of_measurement#Ordinal_scale) values only, which means they need to have a rank order.
-Therefore, ranges can only be specified for numbers and some special types of strings. Examples: grades (A to F), dates or times.
-Implementors are free to add other derived statistical values to the object, for example `mean` or `stddev`.
-
-| Field Name | Type | Description |
-| ---------- | -------------- | ----------- |
-| min | number\|string | **REQUIRED.** Minimum value. |
-| max | number\|string | **REQUIRED.** Maximum value. |
-
### Provider Object
The object provides information about a provider. A provider is any of the organizations that captures or processes the content of the collection and therefore influences the data offered by this collection. May also include information about the final storage provider hosting the data.
@@ -150,6 +138,18 @@ The following types are commonly used as `rel` types in the Link Object of a Col
**Note:** The [STAC Catalog specification](../catalog-spec/catalog-spec.md) requires a link to at least one `item` or `child` catalog. This is *not* a requirement for collections, but *recommended*. In contrast to catalogs, it is **REQUIRED** that items linked from a Collection MUST refer back to its Collection with the [`collection` relation type](../item-spec/item-spec.md#relation-types).
+### Stats Object
+
+For a good understanding of the summarized field, statistics can be added. By default, only ranges with a minimum and a maximum value can be specified.
+Ranges can be specified for [ordinal](https://en.wikipedia.org/wiki/Level_of_measurement#Ordinal_scale) values only, which means they need to have a rank order.
+Therefore, ranges can only be specified for numbers and some special types of strings. Examples: grades (A to F), dates or times.
+Implementors are free to add other derived statistical values to the object, for example `mean` or `stddev`.
+
+| Field Name | Type | Description |
+| ---------- | -------------- | ----------- |
+| min | number\|string | **REQUIRED.** Minimum value. |
+| max | number\|string | **REQUIRED.** Maximum value. |
+
## Standalone Collections
STAC Collections which don't link to any Item are called **standalone Collections**.
| 5 |
diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js @@ -10,10 +10,12 @@ import Performance from '../Performance';
import Timing from './Timing';
let currentUserAccountID;
+let currentUserEmail;
Onyx.connect({
key: ONYXKEYS.SESSION,
callback: (val) => {
currentUserAccountID = lodashGet(val, 'accountID', '');
+ currentUserEmail = lodashGet(val, 'email', '');
},
});
@@ -49,7 +51,9 @@ function setLocale(locale) {
*/
function openSignedInLink(url = '') {
API.GetShortLivedAuthToken().then((response) => {
- Linking.openURL(`${CONFIG.EXPENSIFY.URL_EXPENSIFY_COM}${url}${url.indexOf('?') === -1 ? '?' : '&'}authToken=${response.authToken}&email=${encodeURIComponent(response.email)}`);
+ Linking.openURL(
+ `${CONFIG.EXPENSIFY.URL_EXPENSIFY_COM}${url}${url.indexOf('?') === -1 ? '?' : '&'}authToken=${response.shortLivedAuthToken}&email=${encodeURIComponent(currentUserEmail)}`,
+ );
});
}
| 4 |
diff --git a/src/components/nodes/boundaryTimerEvent/boundaryTimerEvent.vue b/src/components/nodes/boundaryTimerEvent/boundaryTimerEvent.vue @@ -17,7 +17,7 @@ function getPointFromGroup(view, group) {
}
function getPortPoints(view) {
- return portGroups.map(group => getPointFromGroup(view, group));
+ return portGroups.filter(group => group !== 'absolute').map(group => getPointFromGroup(view, group));
}
function closestPort(endView, anchorReference) {
| 2 |
diff --git a/scenes/treehouse.scn b/scenes/treehouse.scn "start_url": "/avatars/gear.vrm",
"dynamic": true
},
- {
- "position": [
- 4,
- 0,
- 2
- ],
- "quaternion": [
- 0,
- 0.7071067811865475,
- 0,
- 0.7071067811865475
- ],
- "physics": false,
- "start_url": "/avatars/meebit.vrm",
- "dynamic": true
- },
{
"position": [
-13,
| 2 |
diff --git a/articles/protocols/saml/saml-configuration/design-considerations.md b/articles/protocols/saml/saml-configuration/design-considerations.md ---
# SAML Design Considerations
+
+Regardless of how you implement SAML SSO, it's important to consider:
+
+* Which system(s) will serve as the authoritative source for user profile information if there's ever a conflict between two or more sources;
+* What user profile attributes each application needs;
+* How user profile information will be distributed to the systems that need it.
+
+## Considerations for Using Auth0 as Service Provider
+
+* If Auth0 serves as the Service Provider in a SAML federation, Auth0 can [route authentication requests to an Identity Provider](/hrd) without already having an account pre-created for a specific user. Using the assertion returned by the identity provider, Auth0 can capture information needed to create a user profile for the user (this process is sometimes called just-in-time provisioning).
+
+* Even though Auth0 doesn't require pre-created user accounts prior to the authentication process, the application integrated with Auth0 might. If this is the case, you have several options when it comes to handling this:
+
+ * After the identity provider creates the user, you can use an out-of-band process can create the accompanying user in the application (or Auth0) and add any user profile attributes required by the application. If, after authentication, any attributes are missing in the profile, the application can obtain them from the appropriate source and store them in the Auth0 user profile. The additonal attributes are then sent to the application (in addition to any added by the identity provider) the next time the user logs in.
+
+ * You can use an Auth0 [rule](/rule) to call an API to retrieve any missing information and dynamically add it to the Auth0 profile (which is then returned to the application). Rules execute after successful authentication, and your application can retrieve profile attributes each time *or* you can save the attributes to the Auth0 profile.
+
+ * Auth0 can pass the basic profile information from the identity provider to the application, which then retreives any missing information from another source. With the two sets of information, the application creates a local user profile.
+
+* You can specify email domains as part of the IDP configuration to control the IDP that handles a select group of users. For example, if you add email domain `example.com` to the IDP configuration for Company X, all users with emails with the `example.com` domain get handled by the specific IDP for Company X.
+
+## Considerations for Using Auth0 as Identity Provider
+
+If Auth0 is serving as the Identity Provider in a SAML federation, user accounts may be created multiple ways:
+
+* Using a back-end authentication system, such as an LDAP directory, a database, or another SAML identity provider;
+* Using the [Auth0 Management Dashboard](${manage_url}/#/users);
+* Calling the [Auth0 Management API](/api/management/v2#!/Users/post_users);
+* Implementing self-service user signup.
+
+If your application is written to retrieve user profile information from a local store, you'll need to create the local profile after the accounts have been created in Auth0. Some of the ways you might do this include:
+
+ * An out-of-band process creating user profiles in the application;
+ * An Auth0 [rule](/rule) that executes on first login that calls an application API to create the user profile in the application;
+ * Modifying the application to create user profiles dynamically, based on information in the SAML assertion.
| 0 |
diff --git a/server/game/cards/22-BtB/SerRollyDuckfield.js b/server/game/cards/22-BtB/SerRollyDuckfield.js @@ -9,7 +9,7 @@ class SerRollyDuckfield extends DrawCard {
this.interrupt({
canCancel: true,
when: {
- onCharacterKilled: event => event.allowSave && event.card.canBeSaved() && event.card !== this && (event.card.hasTrait('Lord') || event.card.hasTrait('King'))
+ onCharacterKilled: event => event.allowSave && event.card.canBeSaved() && (event.card.hasTrait('Lord') || event.card.hasTrait('King'))
},
cost: ability.costs.discardFromHand(),
limit: ability.limit.perRound(1),
| 11 |
diff --git a/src/functions.js b/src/functions.js @@ -271,7 +271,7 @@ var _ = Mavo.Functions = {
return Math.round(num);
}
- return +num.toLocaleString("en-US", {
+ return +(+num).toLocaleString("en-US", {
useGrouping: false,
maximumFractionDigits: decimals
});
| 1 |
diff --git a/package.json b/package.json "scripts": {
"build": "node packages/react-scripts/scripts/build.js",
"changelog": "lerna-changelog",
- "create-react-app": "tasks/cra.sh",
+ "create-react-kotlin-app": "tasks/cra.sh",
"e2e": "tasks/e2e-simple.sh",
"postinstall": "lerna bootstrap",
"publish": "tasks/release.sh",
| 10 |
diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js @@ -178,7 +178,7 @@ class InitialSettingsPage extends React.Component {
{
translationKey: 'initialSettingsPage.signOut',
icon: Expensicons.Exit,
- action: () => { signout(false); },
+ action: () => { this.signout(false); },
}
]);
}
@@ -276,6 +276,7 @@ class InitialSettingsPage extends React.Component {
cancelText={this.props.translate('common.cancel')}
isVisible={this.state.shouldShowSignoutConfirmModal}
onConfirm={this.signout}
+ onCancel={() => this.toggleSignoutConfirmModal(false)}
/>
</View>
| 11 |
diff --git a/docs/sphinx_greenlight_instructions.md b/docs/sphinx_greenlight_instructions.md ## Getting Started
-1. Grab our installer zip file from [here](https://drive.google.com/file/d/1fhS1M0gY8Xn15G7v5Yb_D4n-m7Fjpxo9/view?usp=sharing). See the file integrity section below if you'd like to cross check this file.
+1. Grab our installer zip file from [here](https://drive.google.com/file/d/18IADHiNg7Ach3h0O3y5WPfbL5KEgocKE/view?usp=sharing). See the file integrity section below if you'd like to cross check this file.
2. Flash our installer onto your raspberry pi using your preferred method. We like to use balena etcher, which you can download [here](https://www.balena.io/etcher/).
3. Follow the instructions [here](https://www.raspberrypi.org/documentation/computers/configuration.html#setting-up-a-headless-raspberry-pi) to set up your raspberry pi's connection if you are connecting to a wireless network.
4. Place your sd card into the raspberry pi, and plug the pi into a power source.
@@ -18,7 +18,7 @@ When you can, SSH into your raspberry pi using the username `pi` and the passwor
The sha256 of the zip file you will download from us is the following:
```
-393f380476c09fc74261e1b8ade1424e913a287ba926b8a1c0de79c1bf241d0a
+7c49c484b2a0e7f8ffe3b6076d2ba5f941b6a665096b984ad9899c7d1d59e491
```
On macOS, you can check it by running this command in the directory where you have the file:
| 3 |
diff --git a/src/StoryTime.jsx b/src/StoryTime.jsx @@ -167,16 +167,16 @@ export const StoryTime = () => {
conversation.addEventListener('close', e => {
setMessage(null);
- if (state.openedPanel === 'StoryTime') {
+ /* if (state.openedPanel === 'StoryTime') {
setState({
openedPanel: null,
});
- }
+ } */
});
- setState({
+ /* setState({
openedPanel: 'StoryTime',
- });
+ }); */
}
storyManager.addEventListener('conversationstart', conversationstart);
| 2 |
diff --git a/menu.js b/menu.js @@ -310,11 +310,12 @@ module.exports.setApplicationMenu = (win) => {
};
const iconPath = path.join(__dirname, "assets", "youtube-music-tray.png");
+const example = `Example: "socks5://127.0.0.1:9999"`;
function setProxy(item) {
prompt({
title: 'Set Proxy',
- label: 'Enter Proxy Adress:',
- value: config.get("options.proxy") || `Example - "socks5://127.0.0.1:9999"`,
+ label: 'Enter Proxy Adress (or leave empty to disable)',
+ value: config.get("options.proxy") || example,
inputAttrs: {
type: 'text'
},
@@ -323,7 +324,7 @@ function setProxy(item) {
icon: iconPath
})
.then((input) => {
- if(input !== null) {
+ if(input !== null && input !== example) {
config.set("options.proxy", input);
item.checked = (input === "") ? false : true;
} else { //user pressed cancel
| 8 |
diff --git a/test/jasmine/tests/svg_text_utils_test.js b/test/jasmine/tests/svg_text_utils_test.js @@ -11,7 +11,7 @@ describe('svg+text utils', function() {
function mockTextSVGElement(txt) {
return d3.select('body')
.append('svg')
- .attr('id', 'text')
+ .classed('text-tester', true)
.append('text')
.text(txt)
.call(util.convertToTspans)
@@ -74,7 +74,7 @@ describe('svg+text utils', function() {
}
afterEach(function() {
- d3.select('#text').remove();
+ d3.selectAll('.text-tester').remove();
});
it('checks for XSS attack in href', function() {
| 2 |
diff --git a/src/components/fab/QFab.js b/src/components/fab/QFab.js @@ -68,7 +68,7 @@ export default {
h('div', {
staticClass: 'q-fab-actions flex no-wrap inline items-center',
'class': `q-fab-${this.direction}`
- }, this.showing ? this.$slots.default : null)
+ }, this.$slots.default)
])
}
}
| 1 |
diff --git a/core/webpack.config.js b/core/webpack.config.js @@ -64,7 +64,7 @@ module.exports = {
path: __dirname + '/public',
filename: '[name].js',
chunkFilename: '[name].[id].js',
- sourceMapFilename: '[name].svelte.map.js'
+ sourceMapFilename: '[name].svelte.map'
},
module: {
rules: [commonRules.svelte, commonRules.css, commonRules.urls]
| 10 |
diff --git a/src/platforms/browser/WebPlatform.mjs b/src/platforms/browser/WebPlatform.mjs @@ -156,26 +156,27 @@ export default class WebPlatform {
}
var littleEndian = (view.getUint32(12) === 16909060) ? true : false;
- var data = {};
- data.glType = view.getUint32(16, littleEndian);
- data.glTypeSize = view.getUint32(20, littleEndian);
- data.glFormat = view.getUint32(24, littleEndian);
- data.glInternalFormat = view.getUint32(28, littleEndian);
- data.glBaseInternalFormat = view.getUint32(32, littleEndian);
- data.pixelWidth = view.getUint32(36, littleEndian);
- data.pixelHeight = view.getUint32(40, littleEndian);
- data.pixelDepth = view.getUint32(44, littleEndian);
- data.numberOfArrayElements = view.getUint32(48, littleEndian);
- data.numberOfFaces = view.getUint32(52, littleEndian);
- data.numberOfMipmapLevels = view.getUint32(56, littleEndian);
- data.bytesOfKeyValueData = view.getUint32(60, littleEndian);
- data.kvps = [];
- data.mipmaps = [];
- var offset = 60
- if (data.bytesOfKeyValueData > 0) {
- // TODO: read kvps and insert in data.
- }
- offset += data.bytesOfKeyValueData + 4;
+ var data = {
+ glType: view.getUint32(16, littleEndian),
+ glTypeSize: view.getUint32(20, littleEndian),
+ glFormat: view.getUint32(24, littleEndian),
+ glInternalFormat: view.getUint32(28, littleEndian),
+ glBaseInternalFormat: view.getUint32(32, littleEndian),
+ pixelWidth: view.getUint32(36, littleEndian),
+ pixelHeight: view.getUint32(40, littleEndian),
+ pixelDepth: view.getUint32(44, littleEndian),
+ numberOfArrayElements: view.getUint32(48, littleEndian),
+ numberOfFaces: view.getUint32(52, littleEndian),
+ numberOfMipmapLevels: view.getUint32(56, littleEndian),
+ bytesOfKeyValueData: view.getUint32(60, littleEndian),
+ kvps: [],
+ mipmaps: [],
+ };
+
+ var offset = 64
+ // Key Value Pairs of data start at byte offset 64
+ // But the only known kvp is the API version, so skipping parsing.
+ offset += data.bytesOfKeyValueData;
for (var i = 0; i < data.numberOfMipmapLevels; i++) {
var imageSize = view.getUint32(offset);
| 2 |
diff --git a/assets/js/googlesitekit/datastore/site/registry-key.js b/assets/js/googlesitekit/datastore/site/registry-key.js @@ -46,15 +46,6 @@ export const actions = {
},
};
-/**
- * Registry reducer.
- *
- * @since n.e.x.t
- *
- * @param {Object} state Data store's state.
- * @param {Object} action Redux-style action.
- * @return {Object} Data store's state
- */
export const reducer = ( state, { payload, type } ) => {
switch ( type ) {
case SET_REGISTRY_KEY: {
| 2 |
diff --git a/lib/assets/javascripts/new-dashboard/components/Dataset/DatasetListHeader.vue b/lib/assets/javascripts/new-dashboard/components/Dataset/DatasetListHeader.vue {{ $t(`datasetListHeader.size`) }}
</span>
</div>
- <div class="dataset-list-cell cell--small" @click="changeOrder('usage')">
+ <div class="dataset-list-cell cell--small" @click="changeOrder('dependent_visualizations')">
<span class="text element-sort is-small is-txtSoftGrey"
- :class="{ 'is-active': isOrderApplied('usage'), 'is-reversed': isReverseOrderApplied('usage') }">
+ :class="{ 'is-active': isOrderApplied('dependent_visualizations'), 'is-reversed': isReverseOrderApplied('dependent_visualizations') }">
{{ $t(`datasetListHeader.usage`) }}
</span>
</div>
| 12 |
diff --git a/src/DevChatter.Bot.Web/wwwroot/js/sprite.js b/src/DevChatter.Bot.Web/wwwroot/js/sprite.js function Sprite(imageSrc, x, y, direction) {
this.image = new Image();
- this.image.src = '/images/DevchaHypeEmote.png';
+ this.image.src = imageSrc;
this.x = x || Math.floor((Math.random() * 200) + (1920 / 2 - 100));
this.y = y || Math.floor((Math.random() * 200) + (1080 / 2 - 100));
this.direction = direction || this.getRandomDirection();
| 1 |
diff --git a/apps/metronome/metronome.js b/apps/metronome/metronome.js @@ -9,15 +9,16 @@ Bangle.setLCDTimeout(undefined); //do not deaktivate display while running this
function changecolor() {
const maxColors = 2;
const colors = {
- 0: { value: 0xFFFF, name: "White" },
- // 1: { value: 0x000F, name: "Navy" },
- // 2: { value: 0x03E0, name: "DarkGreen" },
- // 3: { value: 0x03EF, name: "DarkCyan" },
- // 4: { value: 0x7800, name: "Maroon" },
- // 5: { value: 0x780F, name: "Purple" },
- // 6: { value: 0x7BE0, name: "Olive" },
- // 7: { value: 0xC618, name: "LightGray" },
- // 8: { value: 0x7BEF, name: "DarkGrey" },
+ 0: { value: 0xF800, name: "Red" },
+ 1: { value: 0xFFFF, name: "White" },
+ 2: { value: 0x03E0, name: "DarkGreen" },
+ 3: { value: 0xFFFF, name: "White" },
+ 4: { value: 0x03E0, name: "DarkGreen" },
+ 5: { value: 0xFFFF, name: "White" },
+ 6: { value: 0x03E0, name: "DarkGreen" },
+ 7: { value: 0xFFFF, name: "White" },
+ 8: { value: 0x7BEF, name: "DarkGrey" },
+ // 9: { value: 0x001F, name: "Blue" },
// 9: { value: 0x001F, name: "Blue" },
// 10: { value: 0x07E0, name: "Green" },
// 11: { value: 0x07FF, name: "Cyan" },
@@ -42,7 +43,11 @@ function changecolor() {
function updateScreen() {
g.clearRect(0, 50, 250, 150);
changecolor();
+ try {
Bangle.buzz(50, 0.75);
+ }
+ catch(err) {
+ }
g.setFont("Vector",48);
g.drawString(Math.floor(bpm)+"bpm", 5, 60);
}
| 9 |
diff --git a/app-manager.js b/app-manager.js @@ -10,6 +10,7 @@ import {scene, sceneHighPriority, sceneLowPriority} from './renderer.js';
import {makePromise, getRandomString} from './util.js';
import physicsManager from './physics-manager.js';
import metaversefile from './metaversefile-api.js';
+import * as metaverseModules from './metaverse-modules.js';
const appsMapName = 'apps';
| 0 |
diff --git a/renderer.js b/renderer.js @@ -33,7 +33,7 @@ function bindCanvas(c) {
renderer.sortObjects = false;
renderer.physicallyCorrectLights = true;
// renderer.outputEncoding = THREE.sRGBEncoding;
- renderer.gammaFactor = 2.2;
+ // renderer.gammaFactor = 2.2;
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;
if (!canvas) {
| 2 |
diff --git a/layouts/partials/help-footer.html b/layouts/partials/help-footer.html </p>
<p>Customers who have enabled billing can use the in-app chat widget to get support.</p>
<p>
- You can also get help in our Slack community
- <a href="https://slack.codemagic.io/" target="_blank" rel="noopener noreferrer">here</a>.
+ You can also get help in our community
+ <a href="https://github.com/orgs/codemagic-ci-cd/discussions" target="_blank" rel="noopener noreferrer">here</a>.
</p>
</div>
<aside class="illustration">
| 3 |
diff --git a/src/modules/dex/controllers/DexCtrl.js b/src/modules/dex/controllers/DexCtrl.js * @param {$rootScope.Scope} $scope
* @param {IPollCreate} createPoll
* @param {Waves} waves
+ * // TODO: delete after contest
+ * @param {PermissionManager} permissionManager
+ * // TODO: delete after contest
* @return {DexCtrl}
*/
- const controller = function (Base, $element, $state, $location, user, $scope, createPoll, waves) {
+ const controller = function (Base, $element, $state, $location, user, $scope, createPoll, waves,
+ permissionManager) {
const analytics = require('@waves/event-sender');
}))
.then((pair) => {
const activeTab = user.getSetting('dex.watchlist.activeTab');
+ const activeTabIsTrading = activeTab === 'trading';
+ const activeTabIsTradingAndContestEnd = activeTabIsTrading &&
+ !permissionManager.isPermitted('CONTEST_TIME');
if (activeTab !== 'all' &&
activeTab !== pair.amountAsset.id &&
- activeTab !== pair.priceAsset.id) {
+ activeTab !== pair.priceAsset.id &&
+ !activeTabIsTrading ||
+ activeTabIsTradingAndContestEnd
+ ) {
user.setSetting('dex.watchlist.activeTab', 'all');
}
};
- controller.$inject = ['Base', '$element', '$state', '$location', 'user', '$scope', 'createPoll', 'waves'];
+ controller.$inject = ['Base', '$element', '$state', '$location', 'user', '$scope', 'createPoll', 'waves',
+ 'permissionManager'];
angular.module('app.dex')
.controller('DexCtrl', controller);
| 12 |
diff --git a/closure/goog/debug/errorreporter.js b/closure/goog/debug/errorreporter.js @@ -80,7 +80,8 @@ goog.debug.ErrorReporter = function(
/**
* XHR sender.
- * @type {function(string, string, string, (Object|goog.structs.Map)=)}
+ * @type {function(string, string, string,
+ * (Object|goog.structs.Map|!Map<string, string>)=)}
* @private
*/
this.xhrSender_ = goog.debug.ErrorReporter.defaultXhrSender;
@@ -164,7 +165,7 @@ goog.debug.ErrorReporter.ExceptionEvent.TYPE =
/**
* Extra headers for the error-reporting XHR.
- * @type {Object|goog.structs.Map|undefined}
+ * @type {Object|goog.structs.Map|!Map<string, string>|undefined}
* @private
*/
goog.debug.ErrorReporter.prototype.extraHeaders_;
@@ -210,13 +211,22 @@ goog.debug.ErrorReporter.install = function(
* @param {string} uri URI to make request to.
* @param {string} method Send method.
* @param {string} content Post data.
- * @param {Object|goog.structs.Map=} opt_headers Map of headers to add to the
- * request.
+ * @param {Object|goog.structs.Map|!Map<string, string>=} opt_headers Map of
+ * headers to add to the request.
*/
goog.debug.ErrorReporter.defaultXhrSender = function(
uri, method, content, opt_headers) {
'use strict';
- goog.net.XhrIo.send(uri, null, method, content, opt_headers);
+ let headersObj;
+ if (opt_headers instanceof Map) {
+ headersObj = {};
+ for (const [key, value] of opt_headers) {
+ headersObj[key] = value;
+ }
+ } else {
+ headersObj = opt_headers;
+ }
+ goog.net.XhrIo.send(uri, null, method, content, headersObj);
};
@@ -277,8 +287,8 @@ if (goog.debug.ErrorReporter.ALLOW_AUTO_PROTECT) {
/**
* Add headers to the logging url.
- * @param {Object|goog.structs.Map} loggingHeaders Extra headers to send
- * to the logging URL.
+ * @param {Object|goog.structs.Map|!Map<string, string>} loggingHeaders Extra
+ * headers to send to the logging URL.
*/
goog.debug.ErrorReporter.prototype.setLoggingHeaders = function(
loggingHeaders) {
@@ -289,11 +299,11 @@ goog.debug.ErrorReporter.prototype.setLoggingHeaders = function(
/**
* Set the function used to send error reports to the server.
- * @param {function(string, string, string, (Object|goog.structs.Map)=)}
- * xhrSender If provided, this will be used to send a report to the
- * server instead of the default method. The function will be given the URI,
- * HTTP method request content, and (optionally) request headers to be
- * added.
+ * @param {function(string, string, string,
+ * (Object|goog.structs.Map|!Map<string, string>)=)} xhrSender If provided,
+ * this will be used to send a report to the server instead of the default
+ * method. The function will be given the URI, HTTP method request content,
+ * and (optionally) request headers to be added.
*/
goog.debug.ErrorReporter.prototype.setXhrSender = function(xhrSender) {
'use strict';
| 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.