text:
pomander-wordpress - Wordpress tasks for Pomander
=================================================

This is a plugin to help fully manage your Wordpress projects
with the help of Pomander.

Install
-------

Requirements:

- [pomander](https://github.com/tamagokun/pomander)

Usage
-----

* `pom init` if no configuration found.
* Include plugin in environment config `$env->load('Wordpress');`
* `pom -T` to see the stuff.

Getting Started
---------------

```bash
$ pom init
```

Modify your development.yml or development.php

```bash
$ pom setup
```

Done!

Tasks
-----

```
db:backup           Perform a backup of environment's database for use in merging
db:create           Create database in environment if it doesn't already exist
db:full             Store a full database backup
db:merge            Merge a backed up database into environment
deploy:plugins      Deploy plugins in environment.
deploy:wordpress    Deploy Wordpress in environment.
htaccess            Create and deploy .htaccess for environments
setup               Alias of wpify
uploads:pull        Download uploads from environment
uploads:push        Place all local uploads into environment
wp_config           Create and deploy wp-config.php for environment
wpify               Wordpress task stack for local machine (1 and done)
```

Configuration
------------

This plugin introduces a __wordpress__ option, and a __plugins__ option. These are both array structures that you can configure either in a PHP based config, or a YAML based config.

An example of what a .php config for a Wordpress might look like:

```php
$env->database(array(
	'name' => 'my_wordpress',
	'user' => 'root',
	'password' => '',
	'host' => '<IP_ADDRESS>',
	'charset' => 'utf8'
));

$env->wordpress(array(
	'version' => '3.5.2',
	'db_prefix' => 'wp_',
	'base_uri' => ''
));

$env->plugins(array(
	'advanced-custom-fields' => array('version' => 'latest'),
	'gravityforms' => array('dir' => 'lib/gravityforms')
));
```

And an example of a YAML based config:

```yaml
database:
	name: my_wordpress
	user: root
	password:
	host: <IP_ADDRESS>
	charset: utf8

wordpress:
	version: 3.5.2
	db_prefix: wp_
	base_uri: /wordpress # Base uri for Wordpress installation (example: dev.local/wordpress)

plugins:
	more-types: {version: latest}
	more-fields: {version: 2.1, svn: http://plugins.svn.wordpress.org/more-fields}
	gravityforms: {dir: some_other_dir/gravityforms}
	my-plugin: {branch: origin/master, git: https://github.com/dude/my-plugin.git}
```

Plugins can be provided with:

 * __version__ - defaults to "latest"
 * __location__ (git/svn/dir) - defaults to Wordpress plugin repository
 * __branch__ - Specify which branch of a repository to use

Structure
---------

You can certainly use this plugin however you please, but some tasks are
expecting a certain Wordpress structure that I feel is much better than
the typical Wordpress folder structure. Here we go:

```
deploy/             This is where your Pomander configs go (nothing weird about that)
public/             Welcome to your new wp-content folder.
--- themes/
--- uploads/
vendor/             Plugins go in here.
--- plugins/
wordpress/          Your Wordpress installation goes here. You should never really have to go into this folder
wp-config.php       See that? We keep wp-config outside of your wordpress installation for added security
```

Examples
--------

### Moving Uploads

Grab uploads from production to ease development:

```bash
$ pom production uploads:pull
```

You can chain commands to move uploads between environments:

```bash
$ pom production uploads:pull staging uploads:push
```

### Moving Databases

Merge production into development:

```bash
$ pom production db:backup development db:merge
```

If your environment has `backup: true`, Pomander will create a backup of the db prior to any merge procedure.


text:
---
title : "Ajax requests in a loop and other scoping problems with JavaScript"
date: 2016-08-30 12:00:00
tags: [javascript]
---

In the current code I'm working on, I had to iterate over an array and execute an Ajax request for each of these elements.

Then, I had to do an action on that element once the Ajax request resolved.

Let me show you what it looked like at first.

#### The code

```javascript
function Sample() {
    var products = [{name: "first product"}, {name: "second product"}, {name: "third product"}];

    for(var i = 0; i < products.length; i++) {
        var product = products[i];
        $.get("https://api.github.com").then(function(){
            console.log(product.name);
        });
    }
}
```
**NOTE:** I'm targeting a GitHub API for demo purposes only. Nothing to do with the actual project.

So nothing is especially bad. Nothing is flagged in JSHint and I'm expecting to have the product names displayed sequentially.

#### Expected output
```none
first product
second product
third product
```

Commit and deploy, right? Well, no.

Here's what I got instead.

#### Actual output
```none
third product
third product
third product
```

What the hell is going here?

### Explanation of the issue

First, everything has to do with [scope](http://stackoverflow.com/a/500459/24975). `var` are scoped to the closest `function` definition or the global scope depending on where the code is being executed. In our example, var is scoped to a function above the `for` loop.

Then, we have the fact that variables can be declared multiple times and only the last value is taken into account. So every time we loop, we redefine `product` to be the current instance of `products[i]`.

By the time an Http request comes back, `product` has already been (re-)defined 3 times and it only takes into account the last value.

Here's a quick timeline:

0. Start loop
0. Declare `product` and initialize with `products[0]`
0. Start http request 1.
0. Declare `product` and initialize with `products[1]`
0. Start http request 2.
0. Declare `product` and initialize with `products[2]`
0. Start http request 3.
0. Resolve HTTP Request 1
0. Resolve HTTP Request 2
0. Resolve HTTP Request 3

HTTP requests are asynchronous slow operations and will only resolve after the local code is finished executing. The side-effect is that our `product` has been redefined by the time the first request comes back.

Ouch. We need to fix that.

### Fixing the issue the old way

If you are coding for the browser in 2016, you want to use closures. Basically, passing the current value in a function that is executed when defined. That function will return the appropriate function to execute. That solves your scope issue.

```javascript
function Sample() {
    var products = [{name: "first product"}, {name: "second product"}, {name: "third product"}];

    for(var i = 0; i < products.length; i++) {
        var product = products[i];
        $.get("https://api.github.com").then(function(product){
                return function(){
                console.log(product.name);
            }
        }(product));
    }
}
```

### Fixing the issue the new way

If you are using a transpiler like [BabelJS](https://babeljs.io/), you might want to use ES6 with `let` variable instead.

Their scoping is different and way more sane than their `var` equivalent.

You can see on [BabelJS][1] and [TypeScript][2] that the actual problem was resolved in a similar way.

```javascript
function Sample() {
    var products = [{name: "first product"}, {name: "second product"}, {name: "third product"}];

    for(var i = 0; i < products.length; i++) {
        let product = products[i];
        $.get("https://api.github.com").then(function(){
            console.log(product.name);
        });
    }
}
```

### Time for me to use a transpiler?

I don't know if, for me, it's the straw that will break the camel's back. I'm really starting to consider using a transpiler that will make our code more readable and less buggy.

This is definitely going on my TODO list.

What about you guys? Have you encountered bugs that would not have happened with a transpiler? Leave a comment!

[1]: https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015%2Creact%2Cstage-2&code=function%20Sample()%20%7B%0D%0A%20%20%20%20var%20products%20%3D%20%5B%7Bname%3A%20%22first%20product%22%7D%2C%20%7Bname%3A%20%22second%20product%22%7D%2C%20%7Bname%3A%20%22third%20product%22%7D%5D%3B%0D%0A%0D%0A%20%20%20%20for(var%20i%20%3D%200%3B%20i%20%3C%20products.length%3B%20i%2B%2B)%20%7B%0D%0A%20%20%20%20%20%20%20%20let%20product%20%3D%20products%5Bi%5D%3B%0D%0A%20%20%20%20%20%20%20%20%24.get(%22https%3A%2F%2Fapi.github.com%22).then(function()%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20console.log(product.name)%3B%0D%0A%20%20%20%20%20%20%20%20%7D)%3B%0D%0A%20%20%20%20%7D%0D%0A%7D
[2]: http://www.typescriptlang.org/play/index.html#src=function%20Sample()%20%7B%0D%0A%20%20%20%20var%20products%20%3D%20%5B%7Bname%3A%20%22first%20product%22%7D%2C%20%7Bname%3A%20%22second%20product%22%7D%2C%20%7Bname%3A%20%22third%20product%22%7D%5D%3B%0D%0A%0D%0A%20%20%20%20for(var%20i%20%3D%200%3B%20i%20%3C%20products.length%3B%20i%2B%2B)%20%7B%0D%0A%20%20%20%20%20%20%20%20let%20product%20%3D%20products%5Bi%5D%3B%0D%0A%20%20%20%20%20%20%20%20%24.get(%22https%3A%2F%2Fapi.github.com%22).then(function()%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20console.log(product.name)%3B%0D%0A%20%20%20%20%20%20%20%20%7D)%3B%0D%0A%20%20%20%20%7D%0D%0A%7D

branch_name: refs/heads/master

extension: md

gha_language: Stylus

license_type: permissive


text:
# Example 1

Example of a SIP, AIP and DIP of the following scenario:

TODO scenario description

## Submission (SIP)
The producer wishes to submit a text document accompanied by metadata in Dublin Core format.

The text document was originally created in Microsoft Word 97-2004 format (.doc)
and was later converted by the producer to the Microsoft Word Open XML format (.docx).

Both formats are to be sent to the archive.

The SIP comes with no PREMIS information and no schemas.

TODO link to SIP and explain its content

## Ingest: SIP to AIP process

On the SIP to AIP process the SIP was copied under the submission folder of the AIP.
Also, PREMIS was generated for files and schemas were added.

On ingest a preservation event was created to document the action performed on the ingest.

Also, after ingest, a file format migration was performed on the object,
converting the Word file into a PDF.

But, as users required a version of the documents that would be easier to reuse,
another representation was created, migrating the original Word document into a
OpenOffice text document (.odt).

## Archival (AIP)

TODO link to the AIP and explain its content

## Dissemination (DIP)

A user requests access to the information on this AIP. The formats it requests are
PDF for presentation reliability and OpenOffice for ease to reuse.

TODO describe the dissemination use case
TODO link to the DIP and explain its content

repository: eark-project/information-package

repo_name: eark-project/information-package


text:
#Introduction

I wanted to add a new set of directive to dashboard dealing with a paging controller. I selected angular-paging directive [see](https://www.npmjs.com/package/angular-paging).

The result is that ![alt tag](https://raw.githubusercontent.com/brantwills/Angular-Paging/gh-pages/basicSample.png)

Or that ![alt tag](https://raw.githubusercontent.com/brantwills/Angular-Paging/gh-pages/advancedSample.png)

And the directive can be as simple as that

```html
<div paging
  page="35"
  page-size="10"
  total="1000"
  paging-action="foo('bar', page)">
</div>
```

This widget is very pleasent to browse big data spaces like we enconter browsing database for example. You can see this [gist](https://github.com/gbrault/gistfiles/blob/master/knex/sql.md)

#File changes

* README.md: warn that there are some changes compared to main stream
* architecture.md: describe what the changes are about
* package.json: name of the package, +	"angular-paging": "^2.2.2", +	"bootstrap":"^3.3.7"
* src/index.html: added the exact links to angular-paging and bootstrap js and css resources
* src/main.js: adding 'bw.paging' angular directive to 'ui' application

#What do we need to change?

* The 'ui' application list of module => main.js adding the 'bw.paging' directive
```javascript
var app = angular.module('ui', ['ngMaterial', 'ngMdIcons', 'ngSanitize', 'sprintf', 'chart.js', 'bw.paging']);
```
As you can see, by default, node-red dashboard use 'ngMaterial', 'ngMdIcons', 'ngSanitize', 'sprintf' directives and 'chart.js' is new with this release (2.2.0-beta)
For more information about the bw.paging directive, please, [see](https://github.com/brantwills/Angular-Paging)

* Add resources needed by bw.paging: adding them to package.json: in the development section I have added two npm package

```json
"angular-paging": "^2.2.2",
"bootstrap":"^3.3.7"
```
angular paging is doing the paging script
bootstrap is providing the widget (js and css) side

* We need then to add the resources in the index.html file

 * bootstrap css
```html
<link rel="stylesheet" href="vendor/bootstrap/dist/css/bootstrap.min.css">
     <!-- endbuild -->  <== This was existant
```
 * bw.paging angular directives and boostrap javascript

```html
<!-- for paging -->
<script src="vendor/angular-paging/dist/paging.min.js"></script>
<script src="vendor/bootstrap/dist/js/bootstrap.min.js"></script>
```

# Building

* in node-red-dashboard directory
  * ```npm install``` to get all the necessary resources uploaded (node_modules directory)
  * ```gulp``` to 'compile' all the resources into the dist directory

And beleive it or not: it works with no apparent side-effect: magic!

repository: gbrault/node-red-dashboard

repo_name: gbrault/node-red-dashboard


text:
---
published: true
date: '2019-08-20 11:17 -0700'
title: 'Docker Applications on IOS-XR: Useful Tips and Hints'
position: hidden
author: Akshat Sharma
excerpt: >-
  Planning to deploy custom and open-source tools on IOS-XR routers ? Prefer
  Docker as a deployment technique? Network devices are constrained devices with
  limited resources (disk, cpu, mem) and require some extra care in operations
  to ensure the system remains stable. Read this blog to know more and up-level
  your docker on XR skills with some new tips and hints
tags:
  - iosxr
  - cisco
  - linux
  - docker
  - xr-toolbox
  - xr toolbox
  - operations
  - vrf
  - logs
---
{% include toc %}

# Before we Begin

If you're interested in hosting Linux applications on IOS-XR, it would be useful to run through the various blogs in the ["xr-toolbox"](https://xrdocs.io/application-hosting/tags/#xr-toolbox) series. This series guides a user through the application-hosting and packet-io infrastructure on IOS-XR along with hands-on tutorials to run native, LXC or Docker applications on IOS-XR.

Over the course of the last few years, we have seen most application-friendly Network operators look at Docker as a preferred method of application deployment owing to its highly automatable image-build techniques that integrate well into exising or evolving CI/CD workflows.
Further, the [application-hosting and packet-io infrastructure](https://xrdocs.io/application-hosting/blogs/2019-08-19-application-hosting-and-packet-io-on-ios-xr-a-deep-dive/) in IOS-XR enables Docker containers to have complete access to the IOS-XR networking stack for routing and APIs while allowing Linux processes to run unhindered and unmodified on top of the XR Linux kernel.

With a growing focus on Docker apps in the networking industry, this blog looks to highlight some quick and useful tips to run your favorite Dockerized applications on IOS-XR, keeping in mind the resource constraints (disk, mem, cpu) on network devices as well as the peculiarities of network deployments such as High-Availability (Dual-RP) switchover events, vrf-based isolation and more.

Bear in mind that most of the topics below are equally relevant to Native and LXC applications, but we will tackle these types of applications individually in future blogs.

For the sake of this blog we will run through an NCS55xx setup running IOS-XR 6.5.2 on each router. The topology is shown below:

Router-1 (rtr1) and Router-2 (rtr2) are NCS5501 devices and therefore not HA capable. However, Router-3 (rtr3) is NCS5508 and contains two Route-Processors (RPs) enabling us to play around with some HA-capable Docker application deployment.

Since the app-hosting infrastructure is platform independent functionally, the same workflow can be attempted on a virtual setup (using xrv9000) or other IOS-XR family platforms like ASR9000 or NCS540/560.

## Choosing the distribution

There is no restriction on choosing the

## Pulling Docker images

## Routing through mgmt port

## Routing through data ports

## Opening up TCP/UDP sockets

## Exposing XR vrfs to Docker containers

## Managing CPU and Memory limits

## Mounting config files

## Managing On-Box Application logs

## Handling Router Reloads

## Handling RP Switchover (HA)

## Reducing the size of Docker images

## Demo: Open/R as a Docker App on IOS-XR

license: MIT

repository: xrdocs/application-hosting

branch_name: refs/heads/gh-pages

gha_language: SCSS

gha_license_id: MIT

repo_name: xrdocs/application-hosting


text:
---
title: "Deploying and configuring the WOPI Server with Collabora Code"
linkTitle: "WOPI Server"
weight: 17
description: >
  Enable the deployment of the WOPI Server as part of the IOP.
---

## Prerequisites

- This tutorial focuses on enabling the [`WOPI Server`](https://github.com/cs3org/wopiserver) as part of an **existing IOP deployment**. For detailed instructions on how to achieve the latter, [refer to the Kubernetes section of this documentation](https://developer.sciencemesh.io/docs/iop/deployment/kubernetes).

> **Note:** Verify you have the `sciencemesh/iop` chart sources on version `0.0.3` or greater:

```bash
helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "sciencemesh" chart repository
Update Complete. ⎈ Happy Helming!⎈

helm search repo sciencemesh/iop
NAME                    	CHART VERSION	APP VERSION	DESCRIPTION
sciencemesh/iop         	0.0.3        	0.0.1      	ScienceMesh IOP is the reference Federated Scie...
```

- If you expose your cluster behind a reverse proxy, make sure it's configured to **accept websocket connections** as they're required to run Collabora Code. Detailed instructions for different proxies can be found on the project documentation for [**nginx**](https://www.collaboraoffice.com/code/nginx-reverse-proxy) and [**Apache**](https://www.collaboraoffice.com/code/apache-reverse-proxy).

## (Optional) Deploying a Collabora Code instance on your cluster

To demonstrate how an office-online application provider can integrate with the IOP through the WOPI protocol, we need an actual provider we can connect to. If you don't have such application at hand, don't worry. You can use a self-contained [Collabora Code](https://www.collaboraoffice.com/code/) installation on Kubernetes instead.

This is provided by the `sciencemesh/meshapps` chart - which relies on the official Helm chart for [`stable/collabora-code`](https://hub.helm.sh/charts/stable/collabora-code) and can be used to deploy everything on our cluster in a very simple way.

First, we need to update our helm sources and look for the latest version of the `sciencemesh/meshapps` Helm chart:

```bash
helm search repo sciencemesh/meshapps
NAME                 	CHART VERSION	APP VERSION	DESCRIPTION
sciencemesh/meshapps  0.0.1        	0.0.1    	  Umbrella-repository of apps supported by the IOP and its adapters
```

Next, we need to create a minimal YAML file holding the custom `collabora-code` deployment values:

- `collabora.domain` which points to the `wopiserver` url. Since we're running it all on the same cluster, we can use the service [DNS record](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#services) for this.
- `collabora.server_name` will be used to generate the public URLs to be passed to the users.

> **Note:** notice we need to slash-escape periods for this value: `<hostname\.domain\.tld>`.

- The `collabora-code.ingress.paths` need to be configured according to the [Collabora Code reverse-proxy documentation](https://www.collaboraoffice.com/code/apache-reverse-proxy/).

Putting it all together, we will end up with something similar to:

```bash
cat << EOF > collabora.yaml
collabora-code:
  enabled: true
  image:
    tag: latest
  collabora:
    domain: iop-wopiserver\|hostname\\.domain\\.tld
    server_name: <hostname\.domain\.tld>
  ingress:
    enabled: true
    annotations:
      kubernetes.io/ingress.class: nginx
      nginx.ingress.kubernetes.io/ssl-redirect: "true"
    hosts:
    - <hostname.domain.tld>
    paths:
    - /loleaflet
    - /hosting/discovery
    - /hosting/capabilities
    - /lool
    - /lool/adminws
    - /lool/(.*)/ws$
EOF
```

And now, to deploy it on the cluster, we just need to install the chart as follows:

```bash
helm upgrade -i meshapps sciencemesh/meshapps -f collabora.yaml
```

## Configure REVA to integrate with the WOPI Server

For the WOPI Server to be able to work together with Reva, two additional services need to be configured in the gRPC gateway:

- [`appprovider`](https://reva.link/docs/config/grpc/services/appprovider/).
- [`appregistry`](https://reva.link/docs/config/grpc/services/appregistry/).

Here is an example on some parameters that need to be set in the reva daemon. They include the WOPI Server location inside the cluster as well as some static rules to match different MIME types to be opened with it:

```toml
[grpc.services.gateway]
appprovidersvc = "iop-gateway:19000"
appregistry = "iop-gateway:19000"

[grpc.services.appprovider]
driver = "demo"
wopiurl = "https://<hostname>/"

[grpc.services.appregistry]
driver = "static"

[grpc.services.appregistry.static.rules]
"text/plain" = "iop-gateway:19000"
"application/vnd.oasis.opendocument.text" = "iop-gateway:19000"
"application/vnd.oasis.opendocument.spreadsheet" = "iop-gateway:19000"
"application/vnd.oasis.opendocument.presentation" = "iop-gateway:19000"
```

Lastly, a shared secret must also be provided in Reva with one of the available options:

| Environment variable         | Config file                           | Value                                                          |
|------------------------------|---------------------------------------|----------------------------------------------------------------|
| `REVA_APPPROVIDER_IOPSECRET` | `grpc.services.appprovider.iopsecret` | Shared secret used to connect REVA with the WOPI Server.       |

This setting can be shared amongst the two deployments by either:

- Defining one and passing it as value for the `--set wopiserver.config.iopsecret` and `--set gateway.env.REVA_APPPROVIDER_IOPSECRET` flags.
- Or provisioned by the WOPI Server chart as a Secret and consumed by REVA by passing:

```yaml
extraEnv:
   - name: REVA_APPPROVIDER_IOPSECRET
     valueFrom:
       secretKeyRef:
         name: iop-wopiserver-secrets
         key: iopsecret
```

## Enabling wopiserver on the IOP deployment

For convenience, wopiserver ships as a separate chart from Reva but it comes bundled on the IOP. It can be explicitly enabled via feature flag.

> **Note:** the wopiserver chart has been developed with a simplified ingress configuration (i.e. single `host` and `path`) to ease the deployment. If you need to expose multiple hosts/paths, please open a [feature request on cs3org/charts](https://github.com/cs3org/charts/issues/new) to support this feature.

The most important settings you'll need to provide are the `wopiserver.config.appProviders.codeurl` and `wopiserver.config.cs3.revahost`: the endpoints for Collabora Code and Reva, respectively. [Additional values](https://github.com/cs3org/wopiserver/blob/master/wopiserver.conf) can also be configured.

If Code was deployed inside the cluster following the steps on the previous section, this configuration will connect all the required services together:

```bash
cat << EOF > wopiserver.yaml
wopiserver:
  config:
    appProviders:
      codeurl: http://meshapps-collabora-code:9980
    cs3:
      revahost: iop-revad:19000
  ingress:
    enabled: true
    annotations:
      kubernetes.io/ingress.class: nginx
      nginx.ingress.kubernetes.io/ssl-redirect: "true"
    hostname: <hostname>
    path: /wopi
EOF
```

Last, we just need to install/upgrade the IOP stack by passing this custom configuration as well as the `wopiserver.enable` flag.

> **Note:** If it is the first time deploying the IOP, you should also provide [the custom configuration for Reva](https://developer.sciencemesh.io/docs/iop/deployment/kubernetes/#configuring-an-iop-deployment) in addition to the one for the WOPI Server. Otherwise, you will need to use helm's `--reuse-values` to keep your previous config.

```bash
helm upgrade -i iop sciencemesh/iop \
  --set wopiserver.enabled=true \
  -f wopiserver.yaml \
  --reuse-values
```

## Testing the integration with the `open-file-in-app-provider` sub-command

Reva's `open-file-in-app-provider` subcomand allows an authenticated user to generate a URL pointing to the application provider that will open the file for viewing/editing (depending on the `-viewmode` flag).

Behind the scenes, Reva will ask the WOPI server to generate a unique token and URI to access the file through the CS3 APIs. The WOPI Server will determine what is the right application to open such file (based on the available `wopiserver.config.appProviders` config) and abstract all the implementation details from the user (e.g. save operations, file locking, etc.).

The upload-open workflow can be all carried out from the `reva` cli:

```bash
reva upload sciencemesh.odt /home/sciencemesh.odt
Local file size: 11176 bytes
Data server: https://<hostname.domain.tld>/iop/datagateway
Allowed checksums: [type:RESOURCE_CHECKSUM_TYPE_MD5 priority:100  type:RESOURCE_CHECKSUM_TYPE_UNSET priority:1000 ]
Checksum selected: RESOURCE_CHECKSUM_TYPE_MD5
Local XS: RESOURCE_CHECKSUM_TYPE_MD5:21751696b491472501ffa1ec6cc3021d
 10.91 KiB / 10.91 KiB [======================================================================================================================] 100.00% 0s
File uploaded: 123e4567-e89b-12d3-a456-426655440000:fileid-<user>%2Fsciencemesh.odt 11176 /home/sciencemesh.odt

reva open-file-in-app-provider -viewmode write /home/sciencemesh.odt
App provider url: https://<hostname.domain.tld>/loleaflet/ed4f732/loleaflet.html?permission=edit&WOPISrc=https%3A%2F%2F<hostname.domain.tld>%2Fwopi%2Ffiles%2F123e4567-e89b-12d3-a456-426655440000-3380161333240892090&access_token=<token>
```

### Collaborative editing workflows

Effectively, a site running the WOPI Server configured and enabled together with the IOP as described above, can share files (via the [OCM Share](https://reva.link/docs/tutorials/share-tutorial/) mechanism) with a second user. Even if the recipient site does not have a WOPI Server deployed. This mechanism relies on Reva's capacity to forward the requests to `open-file-in-app-provider` from the receiving site to the original grantor's.

If the originating site is also connected to a WOPI-compatible application, that supports the file's MIME type and **has also collaborative-editing capabilities** (like e.g. Collabora Code), the document can be opened by both users at the same time. In this session, users are able to see each other's contributions and changes and save their progress on the original document,  living on the original storage backend - no matter what it is.

repository: nsimbi/sciencemesh

repo_name: nsimbi/sciencemesh


text:
---
layout: post
title: Let's talk a bit about SEO
date:       2016-01-08 15:31:19
summary:    Because this blog is also an experience :)
categories: seo tips
---

First of all, this is the first blog of the year 2016!

Happy new year everyone! I hope you had a good break for xmas and new year.

Now, let's get back to work and talk a bit about SEO.
I have another big thanks for all of you who are visiting my blog. Recently I reached the milestone of 500 visitors on the last month. I must say it's good for motivation!

Noticing an increase in my audience, I've been checking quite often my most popular articles and the keywords used to access to them.

Here are few easy and very general tips about SEO.

### Mobile version

As you might know, Google pays now a lot of attention to see if your website is responsive or not. By responsive, they mean nicely display on mobile.

If your website isn't, it's more likely that you end up being deindexed or at least not showing up in the top results (let's call it "deranked").

### Keywords

Well another one which is probably the hardest one. Keywords.
My top 2 articles are [this one about how to prevent a form submit with AngularJS] [1] and [this one about why am I getting an empty value in my select tag, still with AngularJS] [2]

These two articles are fairly simple but generate a lot of traffic with searches like "angular prevent form submit" or "angularjs select default value". I'm actually on the first page for these searches.

So based on these pages, I would say that it's important to always specify what you are talking about inside your article. Like for this article, it's all about SEO (Search Engine Optimisation). And then don't hesitate to use other keywords like "Search Engines" or "Google Robots" which might be used by some users but still relate to your topic.
I know it sounds stupid, but sometimes you can write lines and lines of text without mentionning the main purpose of this text.

### External links

If you can, try to always add [some external links] [5]. The web is made of connections between websites. Don't keep your sources for you, share them.

I have read a long time ago that Google would be more inclined to top result a page with external links than one with no links or only internal links.

### Tools

Last but not least, check your SEO tools everyday or so. Of course there is the world famous [Google Analytics] [3] to check your traffic, etc., but I highly recommend to use the ["Google webmaster tools"] [4] in completion of it. So you can get to know which keywords/articles are a success. How often/Where do you show up in Google results, etc.

### Host on a famous domain

I've read a few months ago that Google might "boost" you if your blog is hosted on a famous domain. As I said earlier, it takes time to get Google trust and it might be easier if your blog is using a subdomain of [wordpress.com] [7] or like mine, [github.io] [8]

### Keep your blog active

Also I noticed, it's important to keep some activity on your blog. And the more popular you get, the more Google trusts you and is likely to "top result" you.

At the beginning of your blog, I would suggest to post at least every two weeks. Then once, you start to get few visitors, you can like I do, switch to a more relaxed pace. I try to post every month. It's good to keep the Google bots visiting your site.

Don't hesitate to post your [sitemap.xml] [6] on Google webmaster tools after you just updated it.
Yes, sitemaps are really important. But nowadays, most of the blogging systems populate one automatically.

Good luck with your blog/website. SEO is hard work and it takes quite a long time to take effect.


text:
node-custom-error
===================
[![Build Status](https://travis-ci.org/jproulx/node-custom-error.svg?branch=master)](https://travis-ci.org/jproulx/node-custom-error)[![devDependency Status](https://david-dm.org/jproulx/node-custom-error/dev-status.svg)](https://david-dm.org/jproulx/node-custom-error#info=devDependencies)[![Code Climate](https://codeclimate.com/github/jproulx/node-custom-error.png)](https://codeclimate.com/github/jproulx/node-custom-error)[![CodeClimate](https://codeclimate.com/github/jproulx/node-custom-error/coverage.png)](https://codeclimate.com/github/jproulx/node-custom-error)[![Coverage Status](https://coveralls.io/repos/jproulx/node-custom-error/badge.png?branch=master)](https://coveralls.io/r/jproulx/node-custom-error?branch=master)

[![NPM](https://nodei.co/npm/custom-error-generator.png)](https://nodei.co/npm/custom-error-generator/)

Custom errors and exceptions in Node.js

## Install

```bash
$ npm install custom-error-generator --save
```

## Usage

```javascript
var createCustomError = require('custom-error-generator');
var ValidationError = createCustomError('ValidationError', { 'required', 'Missing parameter x' }, TypeError);
var HTTPError = createCustomError('HTTPError', { 'code' : 500, 'status' : 'Server Error' });

throw new ValidationError('Required');
```

The generator function supports the following parameters:

* `name` {String} (required) - A custom name for this error type, which is printed when logging and in stack traces

* `data` {Object} (optional) - Additional properties to attach to the error, in key=value pairs or as object descriptors

* `Constructor` {Function} (optional) - A function to inherit from. Allows for additional methods and properties to be defined on your custom errors

The errors created by the generated functions are identical to built-in Error objects, with additional features such as:

Custom properties can be attached and accessed at run time:
```javascript
var error = new HTTPError('Uh oh');
console.log(error.code, error.status); // prints 500 Server Error
```

## Formatting

Similar to `console.log`, the custom error message will be formatted from all available string and number arguments, using `util.format`:
```javascript
var error = new ValidationError('%s: %s', 'Missing Field', 'name');
console.log(error); // prints ValidationError: Missing Field: name
```

## Wrapped errors

Other error objects can be passed in as arguments, which augment the original error stack trace with their own stack traces:
```javascript
var error = new ValidationError('Missing field');
var serverError = new HTTPError('Something went wrong', error);
console.log(serverError.stack);
```
outputs:
```bash
HTTPError: Something went wrong
    at Context.<anonymous> (/Projects/node-custom-error/test.js:19:24)
    at callFn (/Projects/node-custom-error/node_modules/mocha/lib/runnable.js:223:21)
    at Hook.Runnable.run (/Projects/node-custom-error/node_modules/mocha/lib/runnable.js:216:7)
    at next (/Projects/node-custom-error/node_modules/mocha/lib/runner.js:259:10)
    at Object._onImmediate (/Projects/node-custom-error/node_modules/mocha/lib/runner.js:276:5)
    at processImmediate [as _immediateCallback] (timers.js:330:15)
ValidationError: Missing field
    at Context.<anonymous> (/Projects/node-custom-error/test.js:18:24)
    at callFn (/Projects/node-custom-error/node_modules/mocha/lib/runnable.js:223:21)
    at Hook.Runnable.run (/Projects/node-custom-error/node_modules/mocha/lib/runnable.js:216:7)
    at next (/Projects/node-custom-error/node_modules/mocha/lib/runner.js:259:10)
    at Object._onImmediate (/Projects/node-custom-error/node_modules/mocha/lib/runner.js:276:5)
    at processImmediate [as _immediateCallback] (timers.js:330:15)
```
Multiple error objects are allowed to be passed, and are processed in order.

## JSON support
Errors can also be serialized into JSON format by using `error#toJSON();`. This will enumerate all of the hidden and custom properties, and also format the stack trace into an array of individual lines:

```javascript
console.log(error.toJSON()); // or console.log(JSON.stringify(error));
```
outputs
```bash
{ stack:
   [ 'ValidationError: Missing field',
     '    at Context.<anonymous> (/Projects/node-custom-error/test.js:17:24)',
     '    at callFn (/Projects/node-custom-error/node_modules/mocha/lib/runnable.js:223:21)',
     '    at Hook.Runnable.run (/Projects/node-custom-error/node_modules/mocha/lib/runnable.js:216:7)',
     '    at next (/Projects/node-custom-error/node_modules/mocha/lib/runner.js:259:10)',
     '    at Object._onImmediate (/Projects/node-custom-error/node_modules/mocha/lib/runner.js:276:5)',
     '    at processImmediate [as _immediateCallback] (timers.js:330:15)' ],
  arguments: undefined,
  type: undefined,
  required: 'Missing parameter x',
  message: 'Missing Field' }
```

## Custom Constructor
Finally, a custom function can be passed in as a 3rd argument. This will allow you to modify the custom error prototype without having to modify the original native Error prototype:

```javascript
var HTTPError = createCustomError('HTTPError', null, function (message, code) {
    var http = require('http');
    // Set custom properties when thrown based on additional arguments
    this.code = code;
    this.status = http.STATUS_CODES[code];
    // We can override the default message logic if desired:
    this.message = message;
});
var error = new HTTPError('You do not have permission', 403);
console.log(error, [error.code, error.status]);
// result: HTTPError: You do not have permission [ 403, "Forbidden" ]
```

## Notes
Care is taken to preserve the built-in error handling behavior as much as possible, supporting:

* `custom instanceOf Error`

* `Error.prototype.isPrototypeOf(custom)`

* `util.isError(custom)`

* `custom = generator('message')`

* `custom = new generator('message');`

In other words, you shouldn't have to worry about these errors affecting your syntax or existing code. Simply drop in place for any existing errors you're throwing and it should work just the same.

repository: lsgier/BMP-Visualization

branch_name: refs/heads/main

repo_name: lsgier/BMP-Visualization


text:
# Going: The Facebook Calendar for iCal

[![Build Status](https://travis-ci.org/tubbo/going.svg?branch=master)][ci]

Going is a Facebook Calendar reader that converts Facebook Events to
iCal format, so you can subscribe in your calendar. It automatically
filters out events you haven't explicitly said you are "Going" to, or
have ignored/removed from your events list.

## Why?

Facebook has an iCal subscription option, but its calendar includes
events you are "Interested" in, and even "Ignore". Some events give you
no other option except to "Remove from Guest List", which makes managing
an active events calendar painful. Going solves this problem, and
provides a slightly more manageable Facebook events calendar
for iCalendar-compatible calendaring users.

## How?

Going is available at https://going.psychedeli.ca/. Log in with Facebook
and click the next button to subscribe to your calendar in iCal
automatically. It's hosted on Heroku, and open-sourced under the MIT
License, so you can be sure that we're not doing anything tricky with
your data. We specifically store the most basic user information,
as your Facebook ID and access token given to the application when you
logged in for the first time. We persist this information to
authenticate you and grab events, we do not store events or track any
kind of user movement throughout the application.

## Help!

Please file an issue on our [issue tracker][issues] if you're having
problems with Going.

## Contributing

Going is an open-source project released under the [MIT License][license].
You can contribute to Going by [submitting a pull request][prs] through
GitHub. We run tests on all pull requests when they're submitted, and
will not merge PRs that fail the build.

### Installation

To install this application, make sure you have **Ruby 2.5** and
**Bundler** installed, then run the following script from the root of
this repo:

    ./bin/setup

Once that's complete, run the following command to start the server if
you're not using `puma-dev` (if you are, you can browse to
http://going.test to start the server instead):

    ./bin/rails server

Then go to <http://localhost:3000>.

[ci]: https://travis-ci.org/tubbo/going
[issues]: https://github.com/tubbo/going/issues
[license]: https://github.com/tubbo/going/blob/master/LICENSE.txt
[prs]: https://github.com/tubbo/going/pulls

repository: tubbo/going

gha_language: Ruby

repo_name: tubbo/going


text:
### [CVE-2022-2650](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-2650)
![](https://img.shields.io/static/v1?label=Product&message=wger-project%2Fwger&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3C%202.2%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-307%20Improper%20Restriction%20of%20Excessive%20Authentication%20Attempts&color=brighgreen)

### Description

Improper Restriction of Excessive Authentication Attempts in GitHub repository wger-project/wger prior to 2.2.

### POC

#### Reference
- https://huntr.dev/bounties/f0d85efa-4e78-4b1d-848f-edea115af64b

#### Github
- https://github.com/HackinKraken/CVE-2022-2650
- https://github.com/StevenAmador/CVE-2022-2650
- https://github.com/manas3c/CVE-POC
- https://github.com/nomi-sec/PoC-in-GitHub

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
---
id: contribute
title: Contributing
---

## Suggest features, gateways, or extensions
Please join [our Discord server](https://discord.gg/GQ5EWQz6MQ) and give your suggestions in the `#suggest-features`, `#suggest-gateways`, or `#suggest-extensions` channels.


text:
---
layout: post
title:  "Group Meeting 04/24/2022"
date:   2022-04-24
author: Chang
categories: activities
---

## Literature Reading

#### Jinping Zhu: From the death of stars to the coalescence of compact binaries

Refs:

 [[The spins of compact objects born from helium stars in binary systems](https://ui.adsabs.harvard.edu/abs/2022MNRAS.511.3951F/abstract)]

 [[Kilonovae](https://ui.adsabs.harvard.edu/abs/2019LRR....23....1M/abstract)]


text:
# InfluxdbSetup

For configuring the influxdb database, and continuous queries.

## Installation

Add these lines to your application's Gemfile:

```ruby
gem 'influxdb_setup'
```

And then execute:

    $ bundle

## Capistrano Integration

To have the task run on deploy, add `require "influxdb_setup/capistrano"` to
your `config/deploy.rb`.

This will run the setup on deploy (creating database, user, and
continuous queries). It will also mark the deploy in the "deploys" table in
your influxdb. See the example `influxdb_queries.yml` for the archive queries.

## Usage

This library expects your influxdb config to be located in the
`config/influxdb.yml` file. You can also specify a config file
by using the INFLUXDB_CONFIG_FILE environment variable. For example (change
*myapp* to your application
name):

```yaml
default: &default
  hosts: <%= ENV.fetch('INFLUXDB_HOSTS', '').split(',') %>
  port: <%= ENV.fetch('INFLUXDB_PORT', '8086') %>
  db_name: <%= ENV.fetch('INFLUXDB_DB_NAME', 'myapp') %>
  username: <%= ENV.fetch('INFLUXDB_USER', 'myapp') %>
  password: <%= ENV.fetch('INFLUXDB_PASS', 'myapp') %>
  async: <%= ENV.fetch('INFLUXDB_ASYNC', 'true') == "true" %>       # default true
  retry: <%= ENV.fetch('INFLUXDB_RETRY', 'true') == "true" %>       # default true
  use_ssl: <%= ENV.fetch('INFLUXDB_USE_SSL', 'false') == "true" %>  # default false
  enabled: <%= ENV.fetch('INFLUXDB_ENABLED', 'false') == "true" %>  # default false
  retention_policies:
    - name: 'default'
      duration: '4w'
      replication: 1
    - name: 'archive'
      duration: 'INF'
      replication: 1

development:
  <<: *default
  hosts: ["<IP_ADDRESS>"]
  async: false
  enabled: true
  retry: false
  retention_policies:
   - name: 'default'
     duration: '4w'
     replication: 1
   - name: 'archive'
     duration: 'INF'
     replication: 1

ec2:
  <<: *default

test:
  <<: *default

stag:
  <<: *default
  hosts: ["your-local-influx-host"]
  enabled: true

production:
  <<: *default
  hosts: ["your-local-influx-host"]
  enabled: true

docker:
  <<: *default
```

To add continuous queries, just add them to the `db/influxdb_queries.yml`, for
example:

```yaml
---
stag_times:
  select median(value) as median,mean(value) as mean,count(value) as count into one_hour_stag_response_times from "response_times" where rails_env='stag' group by time(1h)
prod_times:
  select median(value) as median,mean(value) as mean,count(value) as count into one_hour_prod_response_times from "response_times" where rails_env='production' group by time(1h)
prod_deploys:
  select count(commit) as deploys into prod_deploys_per_hour from "deploys" where rails_env='production' group by time(1h)
stag_deploys:
  select count(commit) as deploys into stag_deploys_per_hour from "deploys" where rails_env='stag' group by time(1h)
```

Make sure your queries match what the server coerces them into (no spaces
after commas) by running the `rake influxdb:load_queries` task multiple times.
If there's queries to update the task will not do anything.

### ERB enabled continuous queries

The `db/influxdb_queries.yml` file is ERB-enabled, so you can de-duplicate some
metrics:

```yaml
---
prod_perc_95:
  SELECT count(value) as count, percentile("value", 95) AS overall, <%= %w[cache db].map {|name| "percentile(\"#{name}\", 95) AS #{name}" } %> INTO prod_perc_95 FROM "response_times" WHERE "rails_env"='production' GROUP BY time(30m)
```

## Rake tasks

`rake influxdb:create_db`
Creates the database for the service if it doesn't already exist.

`rake influxdb:create_user`
Creates the user for the service if it doesn't already exist.

`rake influxdb:create_retention_policy`
Creates retention policies if they don't exist and alters retention policies if they already exist.

`rake influxdb:load_queries`
Creates any continuous queries that are missing. Removes queries that are not
in the `db/influxdb_queries.yml` file.

`rake influxdb:setup`
Runs all the above rake tasks.

`INFLUXDB_CONFIG_FILE=/your/config/file/path rake influxdb:setup`
Use specified config file. Here ```setup``` could be any other tasks supported.

## Tests

To run the tests, you need an influxdb host setup. If you're not running it on
`localhost:8086`, you can specify where it's running with the `INFLUXDB_HOSTS`
and `INFLUXDB_PORT` environmental variables.

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run
`rake spec` to run the tests. You can also run `bin/console` for an interactive
prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`.

## Contributing

Bug reports and pull requests are welcome on GitHub at
https://github.com/avvo/influxdb_setup. Please update the CHANGELOG
**unreleased** section with your changes. Please do not update version file in
pull request.

## Release Process

1. The version.rb file should only ever be updated in master, don't update it in your branch.
2. Once changes have been merged to master:
3. Update CHANGELOG.md and version.rb file with new version. Commit as "Bump version".
4. Run `rake release`, which will create a git tag for the version, push git commits and tags.

## License

The gem is available as open source under the terms of the
[MIT License](http://opensource.org/licenses/MIT).


text:
Ready to run Images for virtual machines and Raspberry PI

IONian is a collection of different Linux Distribution media with Ioncore software ready installed. It is broken down into 4 different sets of images available at https://github.com/ioncoincore/ionian/releases

Ionian ISO -- this is an install-to computer iso image that will install Ubuntu Ionian to a local computer.
- Available in both i386 and amd64 versions
- updated automatically from the master ioncore snap https://github.com/ioncoincore/ionian/releases/tag/Ionian-Iso

Ionian USB -- this is meant as a complete copy-and-run solution. With this image you can run directly from the usb medium, also available in i386 and amd64 versions - updated automatically from the master ioncore snap https://github.com/ioncoincore/ionian/releases/tag/Ionian-usb

Ionian VDI -- These images are meant for use in Oracle VIrtualBox environments. Again, i386 and amd64 versions are available
- updated automatically from the master ioncore snap https://github.com/ioncoincore/ionian/releases/tag/Ionian-vdi

Ionian RaspiOS -- Ready-to-run disk image for Raspberry Pi 3/4 https://github.com/ioncoincore/ionian/releases/tag/Ionian-rpi

repository: ioncoincore/ionian

repo_name: ioncoincore/ionian


text:
# Commands for Meteor

[![Build Status](https://travis-ci.org/CapsuleCat/MeteorCommands.svg?branch=master)](https://travis-ci.org/CapsuleCat/MeteorCommands) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)

Dispatch reusable commands synchronously or asynchronously.

## Installation

```sh
meteor add capsulecat:commands
```

## The Command Pattern

The command pattern is a great way to encapsulate actions into an object. When working with Meteor (or almost any programming framework), you will find that you will want to do the same action over and over, but with some minor changes in the request or response. The Command Pattern is a nice way of encapsulating all the data and logic necessary for an action.

## Documentation

All commands should have a handle function:

```js
class MyCommand {
    constructor(arg1, arg2) {}
    handle() {}
}
```

You can dispatch any command syncronously or asyncronously:

```js
var result = dispatch(MyCommand, arg1, arg2);

var callback = function (result) {}
dispatchAsync(MyCommand, arg1, arg2, callback);
```

## Example Code

```js
class EmailNotificationCommand {
  constructor(email) {
    this.email = email;
  },
  handle() {
    // Do something with this.email
    console.log(this.email);
  }
}

dispatchAsync(EmailNotificationCommand, 'test@test.com');
```

## Running Tests

Tests use Jasmine. You can run tests completely from the command line using:

```sh
VELOCITY_TEST_PACKAGES=1 meteor test-packages --driver-package velocity:html-reporter --velocity ./
```

repository: CapsuleCat/CommandsMeteorPackage

repo_name: CapsuleCat/CommandsMeteorPackage


text:
# Result

![Swift](https://img.shields.io/badge/swift-5.0-brightgreen.svg)
[![Build Status](https://travis-ci.org/asensei/Result.svg?branch=master)](https://travis-ci.org/asensei/Result)
[![CocoaPods](https://img.shields.io/cocoapods/v/ResultCocoapods.svg)](https://cocoapods.org/)

## Overview

Swift type modelling the success/failure of arbitrary operations.

`Result<Value>` values are either successful (wrapping `Value`) or not (wrapping `Error`).
This is similar to Swift’s native `Optional` type.

## License

Copyright © 2017 [Asensei](https://www.asensei.com). All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: asensei/Result

gha_language: Swift

repo_name: asensei/Result


text:
---
title: Creating an Image Set
seo-title: Creating an Image Set
description: null
seo-description: Learn how to create an Image Set.
uuid: 689fdc14-4f51-4c94-8515-cd8551e101d8
contentOwner: admin
content-type: reference
products: SG_EXPERIENCEMANAGER/Dynamic-Media-Classic
geptopics: SG_SCENESEVENONDEMAND_PK/categories/image_sets
discoiquuid: 3f356410-b30e-4870-ad95-6e5a9dc126c8

---

# Creating an Image Set{#creating-an-image-set}

To create a multiple-view Image Set, you need images that show an item from different points of view or show different aspects of the same item. The goal is to present viewers with images of an item so they get a solid idea of what an item looks like or does.

## Creating an Image Set {#create}

When you create a set, the **Publish after save** option affects the set and set members in the following ways:

|“Publish after save” option selected before saving?|State of set after saving|State of set members after saving|
|:--- |:--- |:--- |
|Yes|Published|Published|
|No|Unpublished|Set members retain their published or unpublished state.|

See also [Manually publishing assets](publishing-files.md#manually_publishing_assets) and [Manually unpublishing assets](publishing-files.md#manually_unpublishing_assets).

**To create an Image Set**

1. Do one of the following:

   **Select the
images first** In the Browse Panel, select the images you want for your Image Set, click Build > Image Sets.

   **Start from the Image Set screen** Click Build > Image Sets. The Image Set screen opens. Select a folder in the Asset Library and drag the images you want for your Image Set onto the Image Set screen.

1. To change the order of images, drag the images to new locations.
1. Near the lower-right corner of the page, ensure that **Publish after save** is selected (default).
1. Click **Save**, select a folder for storing your Image Set, enter a name for the set, and then click **Save**.
1. To see your Image Set in the Image Set Viewer, click **Preview** on the Image Set screen. You can click swatch thumbnails in the Image Set Viewer to see how they behave.

## Editing an Image Set {#editing-an-image-set}

Depending on whether you edit a published or an unpublished set, the **Publish after save** option affects the set and set members in the following ways:

|Set already published?|“Publish after save” option selected before saving your edit?|State of set after saving|State of set members after saving|
|--- |--- |--- |--- |
|Yes|Yes|Published|Published|
|Yes|No|Published|Existing set members retain their published state.Any new set members that you added during your edit retain their published or unpublished state.|
|No|Yes|Published|Published|
|No|No|Unpublished|Existing set members and any new set members that you added during your edit retain their published or unpublished state.|

See also [Manually publishing assets](publishing-files.md#manually_publishing_assets) and [Manually unpublishing assets](publishing-files.md#manually_unpublishing_assets).

**To edit an Image Set**

1. In the Grid view, browse to an ImageSet, and then below the image, click **Edit**.
1. Do any of the following:

    * To add an image (published or unpublished), drag it from a folder in Add Assets onto the Image Set’s **Views** page.
    * To remove an image, select it, and then click **Delete** on the toolbar.
    * To reorder images, drag an image to a new position.

1. When you are finished editing the set, near the lower-right corner of the page, ensure that **Publish after save** is selected (default).
1. Click **Save**, select a storage folder for your set, enter a name for the set, and then click **Save**.

## Deleting an Image Set {#deleting-an-image-set}

When you delete a set, the set itself is moved to the Trash. However, the members (or “children”) within that set are not affected; instead, they each retain their existing published or unpublished state.

See also [Manually publishing assets](publishing-files.md#manually_publishing_assets) and [Manually unpublishing assets](publishing-files.md#manually_unpublishing_assets).

**To delete an Image Set**

1. In the Grid View, List View, or Details View, select one or more Image Sets.
1. On the Global Navigation Bar, click **File** > **Delete** > **Delete**.


text:
## Troubleshooting

### Enabling Debug Logging

To enable debug level logging, add the following code in your application:

```
/*
 * Set the log level of the Voice Android SDK
 */
Voice.setLogLevel(LogLevel.DEBUG);

/*
 * If your application is experiencing an issue related to a specific
 * module, you can set the log level of each of the following modules.
 */
Voice.setModuleLogLevel(LogModule.CORE, LogLevel.DEBUG);
Voice.setModuleLogLevel(LogModule.PLATFORM, LogLevel.DEBUG);
Voice.setModuleLogLevel(LogModule.SIGNALING, LogLevel.DEBUG);
Voice.setModuleLogLevel(LogModule.WEBRTC, LogLevel.DEBUG);

```

### Troubleshooting Audio
The following sections provide guidance on how to ensure optimal audio quality in your applications.

### Managing Audio Devices with AudioSwitch
The quickstart uses [AudioSwitch](https://github.com/twilio/audioswitch) to control [audio focus](https://developer.android.com/guide/topics/media-apps/audio-focus) and manage audio devices within the application. If you have an issue or question related to audio management, please open an issue in the [AudioSwitch](https://github.com/twilio/audioswitch) project.

### Configuring Hardware Audio Effects

#### Voice Android SDK Version 5.2.x+
Our library performs acoustic echo cancellation (AEC) and noise suppression (NS) using device hardware by default. Using device hardware is more efficient, but some devices do not implement these audio effects well. If you are experiencing echo or background noise on certain devices reference the following snippet for enabling software implementations of AEC and NS.

    /*
     * Execute any time before invoking `Voice.connect(...)` or `CallInvite.accept(...)`.
     */

    // Use software AEC
    DefaultAudioDevice defaultAudioDevice = new DefaultAudioDevice();
    defaultAudioDevice.setUseHardwareAcousticEchoCanceler(false);
    Voice.setAudioDevice(defaultAudioDevice);

    // Use sofware NS
    DefaultAudioDevice defaultAudioDevice = new DefaultAudioDevice();
    defaultAudioDevice.setUseHardwareNoiseSuppressor(false);
    Voice.setAudioDevice(defaultAudioDevice);

#### Voice Android SDK Version below 5.1.x
Our library performs acoustic echo cancellation (AEC), noise suppression (NS), and auto gain
control (AGC) using device hardware by default. Using device hardware is more efficient, but some
devices do not implement these audio effects well. If you are experiencing echo, background noise,
or unexpected volume levels on certain devices reference the following snippet for enabling
software implementations of AEC, NS, and AGC.

    /*
     * Execute any time before invoking `Voice.connect(...)` or `CallInvite.accept(...)`.
     */
    // Use software AEC
    tvo.webrtc.voiceengine.WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true);

    // Use sofware NS
    tvo.webrtc.voiceengine.WebRtcAudioUtils.setWebRtcBasedNoiseSuppressor(true);

    // Use software AGC
    tvo.webrtc.voiceengine.WebRtcAudioUtils.setWebRtcBasedAutomaticGainControl(true);

### Configuring OpenSL ES
Starting with Voice SDK 4.3.0, our library does not use [OpenSL ES](https://developer.android.com/ndk/guides/audio/opensl/index.html)
for audio playback by default. Prior versions starting with Voice SDK 3.0.0 did use OpenSL ES by default. Using OpenSL ES is more efficient, but can cause
problems with other audio effects. For example, we found on the Nexus 6P that OpenSL ES affected
the device's hardware echo canceller so we blacklisted the Nexus 6P from using OpenSL ES. If you
are experiencing audio problems with a device that cannot be resolved using software audio effects,
reference the following snippet for enabling OpenSL ES:

    /*
     * Execute any time before invoking `Voice.connect(...)` or `CallInvite.accept(...)`.
     */

    // Enable OpenSL ES
    tvo.webrtc.voiceengine.WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(false);

    // Check if OpenSL ES is disabled
    tvo.webrtc.voiceengine.WebRtcAudioUtils.deviceIsBlacklistedForOpenSLESUsage();

### Managing Device Specific Configurations
The Voice Android SDK does not maintain a list of devices for which hardware effects or OpenSL ES are disabled. We recommend maintaining a list in your own application and disabling these effects as needed. The [Signal App provides a great example](https://github.com/signalapp/Signal-Android/blob/master/src/org/thoughtcrime/securesms/ApplicationContext.java#L250) of how to maintain a list and disable the effects as needed.

### Handling Low Headset Volume
If your application experiences low playback volume, we recommend the following snippets:

#### Android N and Below
```
int focusRequestResult = audioManager.requestAudioFocus(new AudioManager.OnAudioFocusChangeListener() {

                                   @Override
                                   public void onAudioFocusChange(int focusChange) {
                                   }
                               }, AudioManager.STREAM_VOICE_CALL,
        AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
```

#### Android O and Up :
```
AudioAttributes playbackAttributes = new AudioAttributes.Builder()
        .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
        .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
        .build();
AudioFocusRequest focusRequest = new AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT)
        .setAudioAttributes(playbackAttributes)
        .setAcceptsDelayedFocusGain(true)
        .setOnAudioFocusChangeListener(new AudioManager.OnAudioFocusChangeListener() {
            @Override
            public void onAudioFocusChange(int i) {
            }
        })
        .build();
```

repository: twilio/voice-quickstart-android

gha_language: Java

repo_name: twilio/voice-quickstart-android


text:
# Overview
TimeSeriesDataStore is a Java API to store and iterate over time-series data retrieved from a data feed and stored in a database. Data from a data feed is fetched if data within a requested time range is not in a database. This data is then stored in a database for future requests. Data from a database is fetched if data within a requested time range is in a database, thus serving data much quicker than the data feed.

# Gradle and Maven Integration
If you are using Gradle as your build tool, add the following dependency to your `build.gradle` file:

```
dependencies {
    implementation group: 'net.jacobpeterson', name: 'timeseriesdatastore', version: '1.0'
}
```

If you are using Maven as your build tool, add the following dependency to your `pom.xml` file:

```
<dependency>
    <groupId>net.jacobpeterson</groupId>
    <artifactId>timeseriesdatastore</artifactId>
    <version>1.0</version>
</dependency>
```

# Logger
For logging, this library uses [SLF4j](http://www.slf4j.org/) which serves as an interface for various logging frameworks. This enables you to use whatever logging framework you would like. However, if you do not add a logging framework as a dependency in your project, the console will output a message stating that SLF4j is defaulting to a no-operation (NOP) logger implementation. To enable logging, add a logging framework of your choice as a dependency to your project such as [Log4j 2](http://logging.apache.org/log4j/2.x/index.html), [SLF4j-simple](http://www.slf4j.org/manual.html), or [Apache Commons Logging](https://commons.apache.org/proper/commons-logging/).

# Contributing
Contributions are welcome!

If you are creating a Pull Request, be sure to create a new branch in your forked repository for your feature or bug fix instead of committing directly to the `main` branch in your fork.

repository: Petersoj/TimeSeriesDataStore

repo_name: Petersoj/TimeSeriesDataStore


text:
# To do

As a user I can

## Title
 - [ ] give my board a title
 - [ ] amend the title

## Sections
- [ ] create sections
- [ ] modify section titles
- [ ] delete a section
- [ ] move the sections around

## Notes
- [ ] create a note (Text string) in a section
- [ ] modify a note
- [ ] delete a note
- [ ] like a note
- [ ] option to allocate a note to someone (e.g. would be useful for Actions)
- [ ] ability to turn on/ off display of who created the note/ last updated by. Date/ time
- [ ] ability to add giphy to notes

## Board
- [ ] save a board and/ or any changes I made
- [ ] view a board I made earlier
- [ ] ability to choose a Giphy for the board

## General
- [ ] I can log in so only I can see/ share my boards (oAuth integration with gmail/ fb ?)
- [ ] save my board as a csv
- [ ] save my board as a pdf
- [ ] add google analytics

## Design
- [ ] create basic bootstrap design
- [ ] create/ choose a logo and a name

## Menu
- [ ] create navigation/ header with an 'About' page

repository: twinser/retro-board

gha_language: JavaScript

repo_name: twinser/retro-board


text:
---
title: boundaries.yesterday() function
description: >
  `boundaries.yesterday()` returns a record with `start` and `stop` boundary timestamps for yesterday.
menu:
  flux_0_x_ref:
    name: boundaries.yesterday
    parent: experimental/date/boundaries
    identifier: experimental/date/boundaries/yesterday
weight: 301
flux/v0.x/tags: [date/time]
introduced: 0.177.1
---

<!------------------------------------------------------------------------------

IMPORTANT: This page was generated from comments in the Flux source code. Any
edits made directly to this page will be overwritten the next time the
documentation is generated.

To make updates to this documentation, update the function comments above the
function definition in the Flux source code:

https://github.com/influxdata/flux/blob/master/stdlib/experimental/date/boundaries/boundaries.flux#L44-L46

Contributing to Flux: https://github.com/influxdata/flux#contributing
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md

------------------------------------------------------------------------------->

`boundaries.yesterday()` returns a record with `start` and `stop` boundary timestamps for yesterday.

Yesterday is relative to `now()`.

##### Function type signature

```js
() => {stop: time, start: time}
```

{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}}

## Examples

- [Return start and stop timestamps of yesterday](#return-start-and-stop-timestamps-of-yesterday)
- [Query data from yesterday](#query-data-from-yesterday)

### Return start and stop timestamps of yesterday

```js
import "experimental/date/boundaries"

option now = () => 2022-01-02T13:45:28Z

boundaries.yesterday(

)// Returns {start: 2022-01-01T00:00:00.000000000Z, stop: 2022-01-02T00:00:00.000000000Z}

```

### Query data from yesterday

```js
import "experimental/date/boundaries"

day = boundaries.yesterday()

from(bucket: "example-bucket")
    |> range(start: day.start, stop: day.stop)

```


text:
# Polar Scanning Algorithm

Polar Scanning Algorithm is the an advanced version of the Elliptical Scanning algorithm specified in Espinosa's paper ([link](https://rua.ua.es/dspace/bitstream/10045/25887/1/espinosa_et_al.pdf)). This is not only more robust and handles more distorted ring images well, it is also computationally more efficient.

This algorithm detects the labels of the rings in a placido ring image which can be extremely helpful for corneal topography.

Run the file **example.m** to see the result of the algorithm. Unfortunately, this has not been compensated for broken rings. The compensated algorithm can be found in the full code folder for the corneal topographer. [link](https://github.com/psurya1994/corneal-topography-using-placido-rings)

Demo can be found [here](https://youtu.be/mW5EmIb5KCI).


text:
[![Build Status](https://travis-ci.org/phated/gulp-toc.png?branch=master)](https://travis-ci.org/phated/gulp-toc)

## Information

Package	gulp-toc

Description
Generate a Table of Contents for HTML files

Node Version
≥ 0.10

## Usage

Generate a Table of Contents

```javascript
var toc = require('gulp-toc');

gulp.task('toc', function() {
  gulp.src('./*.html')
    .pipe(toc())
    .pipe(gulp.dest('./dist/'))
});
```

## Options

All options supported by [node-toc](https://github.com/cowboy/node-toc) are supported.

## Header

By default, node-toc uses `<!-- toc -->` as the placeholder for the generated table of contents.

You can use `gulp-header` to insert the placeholder into all your files.

```javascript
var toc = require('gulp-toc');
var header = require('gulp-header');

gulp.task('toc', function() {
  gulp.src('./*.html')
    .pipe(header('<!-- toc -->\n'))
    .pipe(toc())
    .pipe(gulp.dest('./dist/'))
});
```

## LICENSE

(MIT License)

Copyright (c) 2014 Blaine Bublitz

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: phated/gulp-toc

repo_name: phated/gulp-toc


text:
# CodeSnippetsAndTemplates
This repository includes mainly custom shortcut code snippets and some templates for the Telerik and Kendo UI controls/widgets.

To check all Telerik AJAX controls that have custom shortcuts available, check [Create Sample markup snippets for all Telerik controls](https://github.com/telerik/CodeSnippetsAndTemplates/issues/3) issue.

## What are the "snippets" and how to use them

They are shortcuts that you can write in your editor, press Tab and some code will be automatically generated.

![sampleshortcut](https://code.visualstudio.com/assets/docs/editor/userdefinedsnippets/ajax-snippet.gif)

## How to install them

- Copy the `Code Snippets` folder to `C:\Users\<Username>\Documents\<VS Folder>` folder where `Username` is your PC login and `VS Folder` could be `Visual Studio 2013`, `Visual Studio 2015` or `Visual Studio 2017` depending on the version you have installed.
- Start using the snippets by typing their shortcut name and press `TAB` key.

**Demos**
1. [Generate dummy DataSources](needsource-demo.md)
2. [RadGrid Excel-Like Filtering](radgrid-excel-like-demo.md)

OR

- Use the Code snippets from the `Telerik UI for ASP.NET AJAX` folder and follow the instructions below:

tl;dr

**In Visual Studio, place the \*.snippet file in the folder given in the "default destination" in the README file of the control**

For more information please visit:
- [Visual Studio](https://msdn.microsoft.com/en-us/library/ms165394.aspx)
- [Visual Studio Code](https://code.visualstudio.com/docs/editor/userdefinedsnippets)

repository: telerik/CodeSnippetsAndTemplates

repo_name: telerik/CodeSnippetsAndTemplates


text:
Query-Runner Component
======================

This is a resilient-circuits component providing a query execution framework.

This component itself doesn't execute any queries.  Instead, it installs a base set of functionality for other query integrations to use.
Any query-runner action, triggered by a Resilient rule, can be defined by a "query definition file" that tells Query Runner:
- How to construct a query, using a template file named by the action,
- How to map the query results onto Resilient incident fields, data tables, artifacts and other objects.

To implement your own query component,
* Create a Python class that inherits from QueryRunner,
* Give it a callback function - this will be called when a query runs.
* The result of your callback is then mapped onto Resilient data using the query definition file.

Query components provided in this repository can query a variety of systems including LDAP, Splunk, and QRadar.

Refer to the [Query Runner Integration Guide](https://github.com/ibmresilient/resilient-community-apps/blob/master/rc-query-runner/docs/Query%20Runner%20Integration%20Guide.pdf)
for additional details.

repository: neetinkandhare/resilient-community-apps

gha_language: Python

repo_name: neetinkandhare/resilient-community-apps


text:
---
layout: page
title: Vector
permalink: /configure/layers/vector
parent: Layers
grand_parent: Configure
---

# Vector Layer

A [geojson](https://geojson.org/) layer.

#### Layer Name

_type:_ string
The unique display name and identifier of the layer. It must be unique and contain no special characters.

#### Kind of Layer

_type:_ enum
A special kind of interaction for the layer. Please see the Kinds page for more.

#### URL

_type:_ string
A file path that points to a geojson. If the path is relative, it will be relative to the mission's directory. The URL must contain a proper placeholder ending such as: `{z}/{x}/{y}.png`. Alternatively vectors can be served with Geodatasets. Simply go to "Manage Geodatasets" at the bottom left, upload a geojson and link to it in this URL field with "geodatasets:{geodataset\*name}"

#### Controlled

_type:_ bool
Whether the layer can be dynamically updated or not. If true, the layer can be dynamically updated and the URL is not required.

#### Legend

_type:_ string
An absolute or relative file path pointing to a `legend.csv` that describes the symbology of the layer. Please see the Legend Tool to see how to form a `legend.csv`.

#### Initial Visibility

_type:_ bool
Whether the layer is on initially.

#### Visibility Cutoff

_type:_ integer _optional_
If set, this vector layer will be hidden if the current zoom level is less than or equal to that of the visibility cutoff. `Visibility Cutoff * -1` will invert its visibility condition. This is useful when the dataset is dense, local to a one region, or irrelevant when far away and the desired range of zoom levels is large.

#### Initial Opacity

_type:_ float
A value from 0 to 1 of the layer's initial opacity. 1 is fully opaque.

#### Time Enabled

_type:_ bool
True if the layer is time enabled. URLs that contain `{starttime}` or `{endtime}` will be dynamically replaced by their set values when the layer is fetched.

#### Time Type

_type:_ enum [Global, Individual]
Whether the layer should use global time values or function independently with its own time values.

#### Time Format

_type:_ string _optional_
The string format to be used in the URL for `{starttime}` and `{endtime}`. Defaults to `YYYY-MM-DDTHH:mm:ssZ`.

#### Stroke Color

_type:_ CSS color string or a prop _optional_
The border color of each feature. If the feature is a line, this field is the color of the line. See the Vector Styling page for more. Colors can be as follows:

- A named color
  - crimson, blue, rebeccapurple
- A hex color
  - #FFF
  - #A58101
- An rgb color
  - rgb(255,89,45)
- An hsl color
  - hsl(130, 26%, 34%)
- Based on a feature's color property
  - `prop:geojson_property_key` will set the feature's color to the values of `features[i].properties.geojson_property_key`
  - If that property is not a valid CSS color and is a string, it will use a random and consistent color based on its hash.

#### Fill Color

_type:_ CSS color string or a prop _optional_
The fill color of each feature. See Stroke Color for color options. See the Vector Styling page for more.

#### Stroke Weight

_type:_ positive integer _optional_
The thickness of the stroke/border in pixels. See the Vector Styling page for more.

#### Fill Opacity

_type:_ float _optional_
A value from 0 to 1 of Fill Color's opacity. 1 is fully opaque. See the Vector Styling page for more.
_Note: It's also possible to set the opacities of colors directly with #CCDDEEFF, rgba() and hsla()._

#### Radius

_type:_ positive integer _optional_
When a point feature is encountered, this value will be it's radius in pixels.

#### Raw Variables

Clicking "Set Default Variables" will add a template of all possible raw variables (without overwriting ones that are already set). All raw variables are optional.

Example:

```javascript
{
    "useKeyAsName": "name",
    "hideMainFeature": false,
    "datasetLinks": [
        {
            "prop": "{prop}",
            "dataset": "{dataset}",
            "column": "{column}",
            "type": "{none || images}"
        }
    ],
    "links": [
        {
            "name": "example",
            "link": "url/?param={prop}"
        }
    ],
    "info": [
        {
            "which": "last",
            "icon": "material design icon",
            "value": "Prop: {prop}"
        }
    ],
    "layerAttachments": {
        "labels": {
          "initialVisibility": false,
          "theme": "default || solid",
          "size": "default || large"
        }
    },
    "coordinateAttachments": {
        "marker": {
          "initialVisibility": true,
          "opacity": 1,
          "color": "stroke css color (or prop:...)",
          "weight": 2,
          "fillColor": "fill css color (or prop:...)",
          "fillOpacity": 1,
          "radius": 8,
        }
    },
    "markerAttachments": {
        "bearing": {
          "angleProp": "path.to.angle.prop",
          "angleUnit": "deg || rad",
          "color": "#FFFFFF",
        },
        "uncertainty": {
          "initialVisibility": true,
          "xAxisProp": "path.to.x.prop",
          "yAxisProp": "path.to.y.prop",
          "axisUnit": "meters || kilometers",
          "angleProp": "path.to.angle.prop",
          "angleUnit": "deg || rad",
          "color": "#888888",
          "color3d": "#FFFF00",
          "depth3d": 8
        },
        "image": {
          "initialVisibility": true,
          "path": "url to top-down ortho image. ex. public/images/rovers/PerseveranceTopDown.png",
          "pathProp": "path to image. take priority over path",
          "widthMeters": 2.6924,
          "widthPixels": 420,
          "heightPixels": 600,
          "angleProp": "path.to.angle.prop",
          "angleUnit": "deg || rad",
          "show": "click || always",
        },
        "model": {
          "path": "path to model (.dae, .glb, .gltf, .obj)",
          "pathProp": "path to model in feature properties. take priority over path",
          "mtlPath": "if .obj, path to material file (.mtl)",
          "mtlProp": "path to mtl in feature props",
          "yawProp": "path.to.yaw.prop",
          "yawUnit": "deg || rad",
          "invertYaw": false,
          "pitchProp": "path.to.pitch.prop",
          "pitchUnit": "deg || rad",
          "invertPitch": true,
          "rollProp": "path.to.roll.prop",
          "rollUnit": "deg || rad",
          "invertRoll": false,
          "elevationProp": "path.to.elev.prop",
          "scaleProp": "path.to.scale.prop",
          "show": "click || always",
          "onlyLastN": false
        },
    },
    "pathAttachments": {
        "gradient": {
          "colorWithProp": "path.to.prop",
          "dropdownColorWithProp": ["prop3", "path.to.prop3"],
          "colorRamp": ["cssColor1", "cssColor2"],
          "weight": 4,
        },
    },
    "markerIcon": { //See: https://leafletjs.com/reference-1.7.1.html#icon-l-icon
        "iconUrl": "pathToMainIconImage.png",
        "shadowUrl": "(opt)pathToShadowImage.png",
        "iconSize":     [38, 95], // size of the icon
        "shadowSize":   [50, 64], // size of the shadow
        "iconAnchor":   [22, 94], // point of the icon which will correspond to marker's location
        "shadowAnchor": [4, 62],  // the same for the shadow
    }.
    "search": "(prop1) round(prop2.1) rmunder(prop_3)"
}
```

- `useNameAsKey`: The property key whose value should be the hover text of each feature. If left unset, the hover key and value will be the first one listed in the feature's properties.
- `hideMainFeature`: If true, hides all typically rendered features. This is useful if showing only `*Attachments` sublayers is desired. Default false
- `datasetLinks`: Datasets are csvs uploaded from the "Manage Datasets" page accessible on the lower left. Every time a feature from this layer is clicked with datasetLinks configured, it will request the data from the server and include it with it's regular geojson properties. This is especially useful when single features need a lot of metadata to perform a task as it loads it only as needed.
  - `prop`: This is a property key already within the features properties. It's value will be searched for in the specified dataset column.
  - `dataset`: The name of a dataset to link to. A list of datasets can be found in the "Manage Datasets" page.
  - `column`: This is a column/csv header name within the dataset. If the value of the prop key matches the value in this column, the entire row will be return. All rows that match are returned.
  - `type`: Unused.
- `links`: Configure deep links to other sites based on the properties on a selected feature. This requires the "Minimalist" option in the Look Tab to be unchecked. Upon clicking a feature, a list of deep links are put into the top bar and can be clicked on to navigate to any other page.
  - `name`: The name of the deep link. It should be unique.
  - `link`: A url template. Curly brackets are included. On feature click, all `{prop}` are replaced with the corresponding `features[i].properties.prop` value. Multiple `{prop}` are supported as are access to nested props using dot notation `{stores.food.candy}`.
- `info`: Creates an informational record at the top of the page. The first use case was showing the value of the latest sol. Clicking this record pans to the feature specified by `which`. This requires the "Minimalist" option in the Look Tab to be unchecked. This is used on startup and not when a user selects a feature in this layer.
  - `which`: This only supports the value `last` at this point.
  - `icon`: Any [Material Design Icon](http://materialdesignicons.com/) name
  - `value`: A name to display. All `{prop}`s will be replaced by their corresponding `features[which].properties[prop]` value.
- `layerAttachments`: Attachments that may apply to the entire layer.
  - `labels`: Place a label beside each feature. Also applies to `coordinateAttachments.marker` features.
    - `initialVisibility`: Whether the label sublayer is initially on. Users can toggle sublayers on and off in the layer settings in the LayersTool.
    - `theme`: Label theme. Either `default` or `solid`.  Solid is white text with a dark-grey background box.
    - `size`: Label size. Either `default` or `large`. Default is 14px, large is 16px.
- `coordinateAttachments`: Attachment layers for each coordinate of every feature.
  - `marker`: Place a marker at every coordinate of every feature.
    - `initialVisibility`: Whether the coordinate marker sublayer is initially on. Users can toggle sublayers on and off in the layer settings in the LayersTool.
    - `opacity`: Opacity of markers. Default 1
    - `color`: A stroke css color (or prop:...)
    - `weight`: Integer for stroke thickness in pixels.
    - `fillColor`: A fill css color (or prop:...)
    - `fillOpacity`: Opacity of marker fill. Default 1
    - `radius`: Integer for radius of marker.
- `markerAttachments`: An object for attaching dynamic items to point features.
  - `bearing`: Sets the bearing direction of this layer's point markers (or markerIcons if set). Overrides the layer's shape dropdown value.
    - `angleProp`: The dot notated path to the feature properties that contains the desired rotation angle. Ex. `headings.yaw`.
    - `angleUnit`: Unit of the value of `angleProp`. Either `deg` or `rad`.
    - `color`: A css color for the directional arrow for non-markerIcon bearings.
  - `uncertainty`: A sublayer feature that places ellipses about point features to indicate positional uncertainty
    - `initialVisibility`: Whether the uncertainty sublayer is initially on. Users can toggle sublayers on and off in the layer settings in the LayersTool.
    - `xAxisProp`: Prop path to the x axis radius value of the ellipse.
    - `yAxisProp`: Prop path to the y axis radius value of the ellipse.
    - `axisUnit`: "meters OR kilometers",
    - `angleProp`: Prop path to the rotation of the ellipse.
    - `angleUnit`: "deg OR rad"
    - `color`: A css fill color. Will be made more transparent than set. Default 'white'
    - `fillOpacity`: Map and clamped ellipse fill opacity. 0 to 1. Default 0.25
    - `strokeColor`: Map and clamped ellipse stroke/border color. Default 'black'
    - `weight`: Map and clamped ellipse stroke/border weight/thickness. Default 1
    - `opacity`: Overall Map and clamped ellipse opacity. Default 0.8
    - `color3d`: 3d curtain ellipse color. Can be an array for a vertical gradient: ["rgba(0,0,0,0)", "#26A8FF"]
    - `depth3d`: Depth in meters for 3d ellipse curve. Default 2
    - `opacity3d`: 3d curtain ellipse opacity
  - `image`: Places a scaled and orientated image under each marker. A sublayer.
    - `initialVisibility`: Whether the image sublayer is initially on. Users can toggle sublayers on and off in the layer settings in the LayersTool.
    - `path`: A url to a (preferably) top-down north-facing orthographic image.
    - `pathProp`: A prop path to an image url. Take priority over path. Useful if the path is feature specific.
    - `widthMeters`: Width of image in meters in order to calculate scale.
    - `widthPixels`: Image width in pixels.
    - `heightPixels`: Image height in pixel.
    - `angleProp`: Prop path to the rotation of the image.
    - `angleUnit`: "deg OR rad"
    - `show`: "click OR always". If set to "always", overrides the Waypoints Kind (if set) and always renders the image under the marker. "click" just shows the image on click and requires the layer to have the Waypoints Kind.
  - `model`:
    - `path`: Path to model (.dae, .glb, .gltf, .obj)
    - `pathProp`: A prop path to a model. Takes priority over path. Useful if model is feature specific.
    - `mtlPath`: If .obj, the path to its material file (.mtl)
    - `yawProp`: Prop path to the model's yaw. If this value is a number, uses it directly.
    - `yawUnit`: "deg OR rad"
    - `invertYaw`: Boolean that, if true, multiplies yaw by -1.
    - `pitchProp`: Prop path to the model's pitch. If this value is a number, uses it directly.
    - `pitchUnit`: "deg OR rad"
    - `invertPitch`: Boolean that, if true, multiplies pitch by -1.
    - `rollProp`: Prop path to the model's roll. If this value is a number, uses it directly.
    - `rollUnit`: "deg OR rad"
    - `invertRoll`: Boolean that, if true, multiplies roll by -1.
    - `elevationProp`: Prop path to the model's elevation (in meters). If this value is a number, uses it directly. Default 0.
    - `scaleProp`: Prop path to the model's scale. If this value is a number, uses it directly. Default 1.
    - `show`: "click OR always"
    - `onlyLastN`: If false, shows models at all points. If a number, only shows models for the last n points.
- `pathAttachments`: Attach specialized paths to LineStrings and Polygons. Useful with `hideMainFeature: true`.
  - `gradient`: Renders a "hotline" gradient for visualizing value changes along a path.
    - `colorWithProp`: Prop path to the value's key to visualize.
    - `dropdownColorWithProp`: Array of additional prop paths. Users can toggle between value properties in the LayersTool. `colorWithProp`'s path is automatically added here if not already included.
    - `colorRamp`: Array of css colors indicating the color ramp. The first color represents the min value and the last color represents the max value in the layer.
    - `weight`: Integer for path thickness in pixels.
- `markerIcon`: Uses an icon image instead of an svg for all of the layer's point markers. If you're using this as a bearing marker, make sure the base icon is pointing north.
- `search`: This requires the "Minimalist" option in the Look Tab to be unchecked. When set, this layer will become searchable through the search bar at the top. The search will look for and autocomplete on the properties specified. All properties are enclosed by parentheses and space-separated. `round` can be used like a function to round the property beforehand. `rmunder` works similarly but removes all underscores instead.

repository: NASA-AMMOS/MMGIS

repo_name: NASA-AMMOS/MMGIS


text:
# Float Math Functions

All math functions operate on `float64` values.

## addf

Sum numbers with `addf`

This will return `5.5`:

```
addf 1.5 2 2
```

## add1f

To increment by 1, use `add1f`

## subf

To subtract, use `subf`

This is equivalent to `7.5 - 2 - 3` and will return `2.5`:

```
subf 7.5 2 3
```

## divf

Perform integer division with `divf`

This is equivalent to `10 / 2 / 4` and will return `1.25`:

```
divf 10 2 4
```

## mulf

Multiply with `mulf`

This will return `6`:

```
mulf 1.5 2 2
```

## maxf

Return the largest of a series of floats:

This will return `3`:

```
maxf 1 2.5 3
```

## minf

Return the smallest of a series of floats.

This will return `1.5`:

```
minf 1.5 2 3
```

## floor

Returns the greatest float value less than or equal to input value

`floor 123.9999` will return `123.0`

## ceil

Returns the greatest float value greater than or equal to input value

`ceil 123.001` will return `124.0`

## round

Returns a float value with the remainder rounded to the given number to digits after the decimal point.

`round 123.555555` will return `123.556`

repository: Masterminds/sprig

gha_language: Go

repo_name: Masterminds/sprig


text:
# Update 04.10.2020:
Need to create Migrations.
Need to change the file structure according to the changes from the last lecture.

# PetsLostAndFoundSystem-DDD
Domain-Driven Design with ASP.NET Core Microservices - August 2020

A project for the 'Domain-Driven Design with ASP.NET Core Microservices - August 2020' course in SoftUni.
https://softuni.bg/trainings/3103/domain-driven-design-with-asp-dot-net-core-microservices-august-2020#lesson-17496

Problems for exercises and homework:
1.	Domain Model
Choose a business problem. It can be anything you like – a blog, an online shop, an ad system, a social network, a pet clinic, etc.
•	Create a class library to hold the domain models
•	Define your domain models as you see fit by using the best practices and following the DDD principles
•	Make sure you use entities, value objects, and enumerations in the correct way
2.	Aggregates
Group your domain layer into aggregates making sure they are as cohesive as possible.
3.	Factories & Repositories
Add factories and repositories for all your aggregate roots.
4.	Bounded Contexts
Introduce a second bounded context to your domain (or split the existing one).
5.	BONUS: Domain Events
Add domain events to your domain logic if you think they will be useful

repository: BionStt/PetsLostAndFoundSystem-DDD

repo_name: BionStt/PetsLostAndFoundSystem-DDD


text:
---
# Documentation: https://wowchemy.com/docs/managing-content/

title: 'Cognitive mechanisms predicting resilient functioning in adolescence: Evidence
  from the CogBIAS longitudinal study'
subtitle: ''
summary: ''
authors:
- Charlotte Booth
- Annabel Songco
- Sam Parsons
- Elaine Fox
tags: []
categories: []
date: '2020-07-01'
lastmod: 2020-11-07T09:49:29Z
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-11-07T09:49:27.976250Z'
publication_types:
- '2'
abstract: Abstract  Resilience is a dynamic process depicted by better than expected
  levels of functioning in response to significant adversity. This can be assessed
  statistically, by taking the residuals from a model of psychological functioning
  regressed onto negative life events. We report the first study to investigate multiple
  cognitive factors in relation to this depiction of resilient functioning. Life events,
  internalizing symptoms, and a range of cognitive risk and protective factors were
  assessed in a large sample of adolescents ( N = 504) across three waves spaced 12–18
  months apart. Adolescents who displayed fewer symptoms than expected, relative to
  negative life events, were considered more resilient. Adolescents who displayed
  more symptoms than expected, relative to negative life events, were considered less
  resilient. All cognitive factors were associated with resilient functioning to differing
  degrees. These included memory bias, interpretation bias, worry, rumination, self-esteem,
  and self-reported trait resilience. Regression models showed that memory bias was
  a key factor explaining unique variance in prospective resilient functioning. In
  a subsequent cross-lagged panel model, memory bias and resilient functioning were
  reinforcing mechanisms across time points, supporting cognitive models of emotional
  resilience. This study adds to the literature, by highlighting key cognitive mechanisms
  as potential intervention targets
publication: '*Development and Psychopathology*'
url_pdf: https://www.cambridge.org/core/product/identifier/S0954579420000668/type/journal_article
doi: 10.1017/S0954579420000668
---

repository: sdparsons/sdparsons-old

repo_name: sdparsons/sdparsons-old


text:
# WindLoggerVersion3

A datalogger with inputs for measuring wind speed, wind direction, along with current and voltage (with additional sensors)

This is a work in progress.

In this repository there are:

#Software
This contains the Arduino code for the unit. See the README.md file in that folder for installation and use information.

#KiCAD Files
Has the Schematics and PCB files done in KiCAD

#PDF
This has the schematic and PCB layes as .pdf files

#Hardware
This includes design files for enclosures etc.

gha_language: KiCad


text:
# ⌨ react-shortcuts-hook ⌨
A *zero-dependencies*, *lightweight* hook for capturing keyboard shortcuts in components.
**5 times lighter** than [react-hotkeys-hook](https://github.com/JohannesKlauss/react-hotkeys-hook "react-hotkeys-hook"), **4 times** lighter than [use-hotkeys](https://github.com/sandiiarov/use-hotkeys "use-hotkeys").

![npm](https://img.shields.io/npm/v/react-shortcuts-hook?style=flat-square)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-shortcuts-hook/1.1.0)

## Install

NPM

```bash
npm install --save react-shortcuts-hook
```

Or with Yarn:

```bash
yarn add react-shortcuts-hook
```

## Usage

```jsx
import React, { useState } from 'react'
import { useShortcuts } from 'react-shortcuts-hook'

const App = () => {
  const [count, setCounter] = useState(0)
  useShortcuts(['control', 'k'], () => setCounter(count + 1), [count])

  return (
    <div>
      {`You've pressed Control+K ${count} times.`}
    </div>
  )
}

export default App
```

## Live example
[![Edit basic-example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/basic-example-g6fnu?fontsize=14&hidenavigation=1&theme=dark)

## Parameters

- `keys: string[]`: Here you can set a single key, or a combination of keys, that you want hook to listen to. Every entry of this array should be a string with a proper `KeyboardEvent.key` value. [Here](https://keycode.info/) you can find a nice cheatsheet.
- `callback: () => void`: This is a callback that fires when all of the keys specified in the first argument are pressed at the same time. Note that is gets memoized under the hood, so you don't have to do that by yourself.
- `deps: any[] = []`: This is the dependency array that gets appended to memoisation of your callback. If you depend on values that change over time, you should put them here.

## Thanks

- [react-hotkeys-hook](https://github.com/JohannesKlauss/react-hotkeys-hook "react-hotkeys-hook") for inspiring this library
- [create-react-hook](https://github.com/hermanya/create-react-hook) for a project template.
- [Size-Limit](https://github.com/hermanya/create-react-hook) for size сontrol.

## License

MIT © [Nikita Volkov](https://github.com/macfire10)

---

This hook was bootstrapped using [create-react-hook](https://github.com/hermanya/create-react-hook).

gha_language: TypeScript