text:
# Sensor-Board-Library

The library enables communication between the sensor, gateway and bridge.
The library covers the steps of configuring the sensor board through the gateway and then communicating between the sensor board and bridge.
Since the library is kept very abstract, various boards, sensors and devices can be used.

# Dependencies
The LinkedIoT-library is dependent on the following libraries. Please add them to your build path in order to use them.

- **SmallHttp**
https://github.com/bergos/SmallHttp
This library provides a http-server, which is used to build a connection to the gateway.
- **ArduinoJson**
https://github.com/bblanchon/ArduinoJson
This library provides a JSON-library, which is very efficient and designed for IoT-devices.

- **Arduino**
https://github.com/arduino/Arduino
This library provides the Arduino functionality.

----------
In order to use our example-implementations you additionally need the following libraries:

- Brightness-sensor
- **Adafruit Sensor**
https://github.com/adafruit/Adafruit_Sensor
- **Adafruit TSL2561**
https://github.com/adafruit/Adafruit_TSL2561

- PullUpSetupButtonDevice
- **Arduino**
https://github.com/arduino/Arduino

- SingleLedStatusDevice
- **Arduino**
https://github.com/arduino/Arduino
- EmptyTestRadioDevice
- **Arduino**
https://github.com/arduino/Arduino
- STM32SensorBoard
- **Arduino**
https://github.com/arduino/Arduino

- EmptyEEPROM
- **Arduino**
https://github.com/arduino/Arduino

- Stm32EEPROM
- **Arduino**
https://github.com/arduino/Arduino
- **ArduinoJson**
https://github.com/bblanchon/ArduinoJson
- **EEPROM**
https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/libraries/EEPROM

repository: LinkedIoT/Sensor-Board-Library

repo_name: LinkedIoT/Sensor-Board-Library


text:
# scTools
Tools to help with analysis of single-cell transcriptome datasets

## Install
`devtools::install_github("campsj/scTools")`

## Functions
**plot_dims**
Plot variables like clusters but also gene expression on PCA or tSNE dimensions.

**plot_expression**
Plot expression (logcounts) in violin plots over groups like clusters or other variables.

## To do

license: MIT

repository: campsj/scTools

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: campsj/scTools


text:
---
title: How to include images in event details
---

# How to include images in event details?

1. Click on **Event Dashboard** of the event you want to include images.

![Adding Images](/images/How-to-add-a-Twitter-account-feed-to-your-event-page-1.png)

2. When you are at the **Overview** page, click on **Basic Details** under the **Event Setup Checklist** column on the left to proceed.

![Adding Images](/images/How-to-include-images-in-event-details-1.png)

3. You will be directed to next page where you can modify event's **Basic Details**. Scroll down to **Select Event Image/Logo** under **Description**.

![Adding Images](/images/How-to-include-images-in-event-details-2.png)

4. Upload **Event Image** (and **Logo** if needed) and use the provided cropping tool to scale it properly. Click on **Looks good** to save your images.

![Adding Images](/images/How-to-include-images-in-event-details-3.png)

5. Scoll down to the bottom of the page and click **Publish** to save your changes.

![Adding Images](/images/How-to-include-images-in-event-details-4.png)

6. Now you can go back to **Overview** page and click on the live event link under **General info** to view your changes.

![Adding Images](/images/How-to-include-images-in-event-details-5.png)

7. Your image and logo will appear on top of the event page as below.

![Adding Images](/images/How-to-include-images-in-event-details-6.png)

gha_language: HTML


text:
[![Documentation Status](https://readthedocs.org/projects/ptulsconv/badge/?version=latest)](https://ptulsconv.readthedocs.io/en/latest/?badge=latest)
![](https://img.shields.io/github/license/iluvcapra/ptulsconv.svg)
![](https://img.shields.io/pypi/pyversions/ptulsconv.svg)
[![](https://img.shields.io/pypi/v/ptulsconv.svg)][pypi]
![GitHub last commit](https://img.shields.io/github/last-commit/iluvcapra/ptulsconv)
[![Lint and Test](https://github.com/iluvcapra/ptulsconv/actions/workflows/python-package.yml/badge.svg)](https://github.com/iluvcapra/ptulsconv/actions/workflows/python-package.yml)

[pypi]: https://pypi.org/project/ptulsconv/

# ptulsconv

Parse Pro Tools text exports and generate PDF reports, JSON output.

## Quick Start

For a quick overview of how to cue ADR with `ptulsconv`, check out the [Quickstart][quickstart].

## Installation

The easiest way to install on your site is to use `pip`:

    % pip3 install ptulsconv

This will install the necessary libraries on your host and gives you
command-line access to the tool through an entry-point `ptulsconv`. In a
terminal window type `ptulsconv -h` for a list of available options.

[quickstart]: https://ptulsconv.readthedocs.io/en/latest/user/quickstart.html

repository: iluvcapra/ptulsconv

gha_language: Python

gha_license_id: MIT

repo_name: iluvcapra/ptulsconv


text:
logliner
========

- find a keyword in multiple log files
- sort log datetime created by user-defined `BaseDateExtractor` subclass
- present log files according to datetime ascending.

### install
```shell
$ python setup.py install
```

### run

```shell

$ logliner
usage: logliner [-h] [-c C]

optional arguments:
  -h, --help  show this help message and exit
  -c C        conf file(.yaml)

```

```shell
$ cd ./example
$ logliner -c ./conf.yaml
```

### config

 - Using `yaml` format.

```yaml
input:
  path:
    - ./log_files/a.log
    - ./log_files/b.log
output:
    format: file
    path: ./result/report.txt

q :<PHONE_NUMBER>5147dkjvosuiier
date_extractor: custom_date_extractor.CustomDateExtractor
```

- input : file list

- output
    - format : file | html | stdout
    - path : file path (stdout not required)

- q : searching keyword
- date_extractor : user-defined `BaseDateExtractor` subclass, `my_package.my_module.MyClass`

repository: mrkbutty/logliner

repo_name: mrkbutty/logliner


text:
## design

----

### inspiration revisited
* structure/identity
  - https://explorepartsunknown.com/
  - https://www.nationalgeographic.org/explorers/
  - https://ueno.co/work/slack
* ux
  - https://www.ge.com/digitalvolcano/
  - https://rewind2017.withyoutube.com/

----

### building blocks
1. photography composition
2. color theory
3. principles
4. compensation

----

### images
* uniqueness
* branding/message
* licensing
  - stick with Flickr
* size

----

----

### cropping
![people](https://cdn.mos.cms.futurecdn.net/eca5a8e8cda45fd1c3113936c7d46bc8-970-80.png)

----

#### demo
<https://www.flickr.com/people/worldbank/>

- banner image
- heros
- cards

----

### color theory
![color wheel](https://operationwritehome.org/wp-content/uploads/2013/01/warm-and-cool.jpg)

----

![color categories](https://poissydesign.com/wp-content/uploads/2015/11/color-wheels.jpg)

----

![color rules](https://2dhnizrxqvv1awj231eodql1-wpengine.netdna-ssl.com/wp-content/uploads/2018/09/Colour-Theory.png)

----

### wdi and color

----

### color and composition
_see hefpi cards_

----

### gestalt theory
_western gaze_
<https://medium.muz.li/gestalt-principles-in-ui-design-6b75a41e9965>

1. similarity
2. prägnanz (simplicity)
3. proximity
4. continuity
5. closure

----

### 1. similarity
_color > shape > size_

----

>There are different ways of making elements perceived as being similar, and thus, related. These include similarity of colour, size, shape, texture, dimension, and orientation; with some of them being more strongly communicative than others (ex. colour > size > shape)...

----

>When **Similarity** occurs, an object can get emphasized by being different from the rest; this is called **‘Anomaly’** and can be used to create contrast or visual weight. It can draw the user’s attention to a specific piece of content (focal point) while assisting with scanability, discoverability and the overall flow.

by _Eleana Gkogka_

----

### 2. prägnanz (simplicity)
_**symmetry and order**, figure/ground, closer_
![wireframe](https://cdn-images-1.medium.com/max/800/1*J1xJVNgjX5gxZ0FSJWgDKw.jpeg)

----

### 3. proximity
_the closer, the more related_
![similar](https://cdn-images-1.medium.com/max/1200/1*rb6h4RwbjHPjQl2qRLntHA.png)

----

### 3. proximity in practice
_notice the text grouping, even without grids_
![online mag](https://cdn-images-1.medium.com/max/1600/0*mBbw_aoxwrMZDJvd.png)

----

### 4. continuity
![continuity](https://res.cloudinary.com/dno0vkynk/image/upload/v1475392871/DesignGestaltContinuity.png)

----

_with common fate_
![nike](https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/28c84eb7-47c2-4363-b28d-8c39e0290c02/03-continuation-nike-opt.jpg)

----

### 5. closure
![closure](https://cdn-images-1.medium.com/max/800/1*n8LiAFjR9hqiPIix8qaf2A.gif)

----

Check out <https://lawsofux.com/> for more guidelines

----

### the details

<https://medium.muz.li/optical-effects-9fca82b4cd9a>

![equal size](https://cdn-images-1.medium.com/max/1000/1*-i9M1D3PQv8VdZ9BgL90Kg.png)

----

![different size](https://cdn-images-1.medium.com/max/1000/1*QbXi4zY8d9dtImVLkXRE-A.png)

----

![with dims](https://cdn-images-1.medium.com/max/1000/1*jEd-gjk9_QzE45kqanNajw.png)

----

### optical effects
objects don't always look symmetrical even though they are

use intuition to compensate for optical difference
![google](https://static.adweek.com/adweek.com-prod/wp-content/uploads/2017/11/google-G-logo.jpg)

----

![google mistakes](https://api.thumbr.io/eab4319c16b671abef18e50fce8bf905/KhPZbWboUluRxv8PG87L/https%3A%2F%2Fwww.freepik.com/blog/wp-content/uploads/2017/09/google-logo-previa-e1507100488669.jpg/900x/thumb.png)

----

### inspiration revisited
* structure/identity
  - https://explorepartsunknown.com/
  - https://www.nationalgeographic.org/explorers/
  - https://ueno.co/work/slack
* ux
  - https://www.ge.com/digitalvolcano/
  - https://rewind2017.withyoutube.com/

repository: seladore/bearsstaycool

repo_name: seladore/bearsstaycool


text:
# Open CV (Computer Vision)
Image Matrix:
000000
001110
001110
001110
000000
011110
010000

Sobel Filter: Can be of any size according to input. Values can also vary.

1 0 -1
1 0 -1
1 0 -1

We then take convolution of Image Matrix and Sobel Filter (Convolution step)
Non zero values shows a edge. (-ve or +ve doesn't matter)

repository: cyberboysumanjay/AI-Training

repo_name: cyberboysumanjay/AI-Training


text:
# Android Kotlin Base Library [![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)

## Do you have more than one Android App?

Every android app has a lot of common code, which could be shared (platform specific code). Besides kotlin multiplatform, where the main goal is to share as much business logic code as possible, there is also a need to share common, platform specific code between apps.

**_Advantages:_**

- With every Android update, you update the code base once for all apps
- You write less code, have less bugs and do not repeat yourself (DRY)
- You can focus on the core of your app

**_Usage_**:
```
<dependency>
  <groupId>com.treslines.appbase</groupId>
  <artifactId>appbase</artifactId>
  <version>1.0</version>
</dependency>
```

## What is in V1.0.0?
- ViewExt.kt - Extensions for views
- ViewGroupExt.kt - Extensions for view groups
- FragmentExt.kt - Extensions for fragments
- ActivityExt.kt - Extensions for activities
- BaseAdapter.kt - Kotlin Generic Base Adapter for ViewTypes
- SharedPrefencesUtil.kt - Goodies for local storage

# Contribute:
  - Fork, contribute, make a pull request

## License:
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)
- **[MIT license](http://opensource.org/licenses/mit-license.php)**
- Copyright 2020 © Ricardo Ferreira

## Author:

Ricardo Ferreira
Programador de Elite - 📸 Instagram: Fazer você ganhar + de R$700.000/ano programando! 🔥
Programador de Elite - 🐦 Twitter: Fazer você ganhar + de R$700.000/ano programando! 🔥
Programador de Elite - 📹 Youtube: Fazer você ganhar + de R$700.000/ano programando! 🔥
Programador de Elite - 🎓 Design Pattern: Tired to figure out adequate design patterns for your app? Try it using codegram!

repository: treslines/appbase

branch_name: refs/heads/main

repo_name: treslines/appbase


text:
# Africa's Talking

>

**Note on SSL Certificate Verification**

You may experienc certificate validation issues when connecting to our API. The error message you see may look something like this: `Unable to find valid certification path to requested target`

Please do not panic! Our certificate is [perfectly valid](http://www.sslshopper.com/ssl-checker.html#hostname=api.africastalking.com), and the error you are seeing is quite common amongst Java clients connecting to secure websites.

Here is how to fix the issue:

- Download and compile InstallCert.java (you can find the code under `utils/InstallCert.java`).

- On the CMD prompt(Windows) or Terminal(*nix), run: `java InstallCert api.africastalking.com`

This will download a copy of our Certificate and create a file named `jssecacerts` in the current directory.

- You can now add our Certificate to your trusted store by copying the created `jssecacerts` file to the Java security directory under `$JAVA_HOME/jre/lib/security`

repository: Msungujr/africastalking-gateways

repo_name: Msungujr/africastalking-gateways


text:
## Binary Tree
A __binary tree__ is a tree in which every node has at most two children.

__Full Binary Tree__ - A binary tree in which every node has 2 children except the leaves.

__Complete Binary Tree__ - A binary tree which is completely filled with a possible exception at the bottom level i.e., the last level may not be completely filled and the bottom level is filled from left to right.

__Perfect Binary Tree__ - In a perfect binary tree, each leaf is at the same level and all the interior nodes have two children.

__Theorem:__ Perfect binary tree will have the maximum number of nodes for all alternative binary trees of the same height and it will be `2^(h+1) - 1`.

__Theorem:__ The height of a perfect binary tree with `n` nodes is `h = lg((n + 1) / 2)`.

### Array representation of Binary Tree
for a node `i`, the parent is ⌊`i / 2`⌋, the left child is `2i` and the right child is `2i + 1`.

### Storing
Binary trees can also be stored in breadth-first order as an arrays, and if the tree is a complete binary tree, this method wastes no space.

In this compact arrangement, if a node has an index `i`, its children are found at indices `2i + 1` (for the left child) and `2i + 2` (for the right), while its parent (if any) is found at index `(i - 1) / 2` (assuming the root has index zero).

This method benefits from more compact storage and better locality of reference, particularly during a preorder traversal. However, it is expensive to grow and wastes space proportional to ⌊`2^h - n`⌋ for a tree of depth `h` with `n` nodes.

---

#### [Read More](https://www.codesdope.com/course/data-structures-binary-trees/)

repository: jafaryor/algorithms-and-data-structures

gha_language: TypeScript

repo_name: jafaryor/algorithms-and-data-structures


text:
# About

Guide: https://docs.aws.amazon.com/eks/latest/userguide/coredns.html

## On the ConfigMap

This applies if you are retrieving the ConfigMap freshly from EKS; we have already done it for configmap.yml in this repo.

Please replace this line:
```
proxy . /etc/resolve.conf
```

with:
```
forward . /etc/resolve.conf
```

## Copyright

The following files in this directory are Copyright (c) to Amazon Web Services:

- clusterrolebinding.yml
- clusterrole.yml
- configmap.yml
- deployment.yml
- serviceaccount.yml

All other files in this directory are Copyright (c) 2019 to Yan Han Pang, under the 3-Clause BSD License.

repository: yanhan/sysadmin-library

gha_language: Go

repo_name: yanhan/sysadmin-library


text:
# Scabbard

A tool to visualize and understand your Dagger 2 dependency graph.

More advanced [examples](https://arunkumar9t2.github.io/scabbard/examples/).

## Features

* **Visualize** entry points, dependency graph, dagger errors, component relationships and scopes in your [Dagger 2](https://github.com/google/dagger) setup.

* **Minimal setup** - Scabbard's Gradle plugin prepares your project for graph generation and provides ability to customize graph generation behavior.

* **IDE integration** - Easily view a `@Component` or a `@Subcomponent` graph directly from source code via gutter icons (IntelliJ/Android Studio).

* **Supports** both Kotlin and Java.

* Supports **Dagger Hilt** and **Anvil**

## Getting Started

For samples, guide and usage instructions please visit the [project website](https://arunkumar9t2.github.io/scabbard/).

## License

    Copyright 2022 Arunkumar

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

gha_language: Kotlin


text:
---
title: Panel
introduction: |
  A panel component is usually used alongside a tile component. When a tile has
  been clicked and has an `.is-selected` class, the panel component opens.

  Panels typically contain further information relating to the tile component
  that has triggered the panel.

  Panels span 100% width of the viewport and appear to split the document
  horizontally at page level.
source: sky-toolkit-ui/components/panel
dependencies:
  - sky-toolkit-core
layout: component
---

# Panel

## Base

This is the panel component in it's basic default form. The default panel has a
white background with dark text. When a panel is visible, it also has a class of
`.is-open`.

You can put any content you like inside a panel. It is recommended that you nest
the content inside a wrapper with a class of `.o-container`.

```html { "container": "flush" }
<article class="c-panel is-open">
  <div class="c-panel__content">
    <button class="c-panel__back c-link c-link--back">Back</button>
    <button class="c-panel__toggle c-link c-link--close">Close</button>
    <div class="o-container">
      <h2 class="c-heading-bravo">This is a title</h2>
      <p class="c-text-body u-text-constrain">
        This is a paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing
        elit. Quos officiis atque ab esse eaque, facilis dolor. Culpa quidem
        officiis, ea. Debitis, delectus? Hic quam rem, accusamus officia libero
        quidem unde.
      </p>
    </div>
  </div>
</article>
```

---

## Modifiers

### Dark

A dark version of the panel with a black background and white text.

```html { "container": "flush" }
<article class="c-panel c-panel--dark is-open">
  <div class="c-panel__content">
    <button class="c-panel__back c-link c-link--back c-link--invert">Back</button>
    <button class="c-panel__toggle c-link c-link--close c-link--invert">Close</button>
    <div class="o-container">
      <h2 class="c-heading-bravo">This is a title</h2>
      <p class="c-text-body u-text-constrain">
        This is a paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing
        elit. Quos officiis atque ab esse eaque, facilis dolor. Culpa quidem
        officiis, ea. Debitis, delectus? Hic quam rem, accusamus officia libero
        quidem unde.
      </p>
    </div>
  </div>
</article>
```

repository: TobyPinfold/Sky-Test

gha_language: CSS

repo_name: TobyPinfold/Sky-Test


text:
> [Go to French version](/fr/Règlements/Codification%20des%20règlements%20du%20Canada/601-700/C.R.C.,%20ch.%20611.md)

# General Export Permit No. Ex. 1

**C.R.C., c. 611**

Enabling authorities:
- [EXPORT AND IMPORT PERMITS ACT](/en/Acts/Revised%20Statutes%20of%20Canada/E/E-19.md)

----------

## Short Title

**1** This Permit may be cited as the Export of Goods for Special and Personal Use Permit.

## General

**2**

- **(1)** Subject to section 4, any person may, under the authority of this General Export Permit, export from Canada to any country any goods that have a value of $100 or less.

- **(2)** Subsection (1) does not authorize the exportation of goods that are separated into units the aggregate value of which exceeds $100.
> SI/89-131, s. 1.

**3** Subject to section 4, any person may, under the authority of this General Export Permit, export from Canada to any country
- **(a)** casual gifts, including those sent by parcel mail, that have a value not exceeding $50 and that are sent to a consignee for the consignee's personal use, but not exceeding one such casual gift per month to the same consignee;
- **(b)** goods consigned to embassies, legations, high commissioners, trade commissioners or consular offices of Canada or the United Kingdom;
- **(c)** personal or settler's effects taken or shipped by an individual on leaving Canada and solely for his own use or that of his immediate family and not for resale and being
	- **(i)** household articles,
	- **(ii)** personal effects,
	- **(iii)** articles of business equipment, instruments, tools of trade or machinery, if such articles have been used by him in his occupation or employment, are his personal property and will continue to be used by him in his occupation or employment, or
	- **(iv)** a passenger automobile that is the personal property of the person who is leaving Canada;
- **(d)** goods returned as being "not as ordered" under the Goods Not as Ordered Remission Order;
- **(e)** goods that have been imported into Canada under the Articles for Special Use Regulations;
- **(f)** goods in Group 1 of the Export Control List that have been exported from Canada under a valid export permit and have subsequently been returned to Canada for repair, overhaul or testing, on condition that the exporter presents a copy of the original export permit at the time the goods are exported;
- **(g)** parts or components for the repair of goods in Group 1 of the Export Control List that were previously exported under a valid export permit, on condition that the exporter presents a copy of the original export permit at the time the goods are exported and on condition that the repair does not upgrade or otherwise transform the original function of the exported goods; and
- **(h)** goods in Group 1 of the Export Control List that are being returned to their original manufacturer as unwanted goods or for repair, overhaul or testing, on condition that the goods have not been transformed, remanufactured or otherwise modified in Canada.
> SI/89-131, s. 2.

**4** This General Export Permit does not authorize
- **(a)** the export of radioactive goods;
- **(b)** exports to any country listed on the Area Control List; or
- **(c)** exports of helicopters and their parts as described in item 1460 of the Export Control List.
> SI/89-131, s. 3.

**5** Where completion and validation of a customs entry form is required with respect to any goods that are exported under the authority of this General Export Permit, that form shall be endorsed "Exported under the authority of General Export Permit No. Ex. 1" or "Exporté en vertu de la Licence générale d'exportation no Ex. 1".

url: https://raw.githubusercontent.com/TravisMadill/CanadianLaws/776186d75e6e345dc5a0f1cd9243028efa9ac34c/en/Regulations/Consolidated Regulations of Canada/601-700/C.R.C., c. 611.md

repository: TravisMadill/CanadianLaws

repo_name: TravisMadill/CanadianLaws


text:
# Hardware and Knowledge Prerequisites

## Knowledge requirements

know _some_ Rust.
including some idioms like
`extern crate` is not necessary in 2018 edition

## Hardware requirements

[STM32F3DISCOVERY Board](https://www.st.com/en/evaluation-tools/stm32f3discovery.html)

repository: iphipps/rust-and-embedded-study-notes

repo_name: iphipps/rust-and-embedded-study-notes


text:
---
slug: covid-dashboard
date: 2020-07-31T20:29:39.104Z
title: COVID-19 Dashboard
thumbnail: /assets/joevid_thumb.png
---
[Check out the JOEVID-19 dashboard here.](http://joevid-19.netlify.com/)

## Inspiration

I, like many others, felt overwhelmed by the inundation of information surrounding COVID-19. As a result, I had a strong desire to filter out the [signal from the noise.](https://conceptually.org/concepts/signal-and-noise) The result is a relatively simple React dashboard based on the design of a [Frontend Mentor challenge.](https://www.frontendmentor.io/challenges/social-media-dashboard-with-theme-switcher-6oY8ozp_H)

## Features

My dashboard had three key requirements: a light/dark mode toggle, a day of the week indicator, and an up-to-date panel of COVID-19 related data. The light/dark toggle was easy to implement, as I had done something similar in a [previous challenge](https://flaggy-but-one.netlify.com/) from Frontend Mentor.

While the day of the week indicator may seem silly, working-from-home and practicing social distancing have eroded the distinction between days for many of us. As a bonus, I added a small component that notifies the visitor whether it’s time for a coffee or time for a beer. (Coffee before 5pm, beer after)

Finding an up-to-date data source was incredibly easy, thanks to the team over at [www.covidtracking.com](http://www.covidtracking.com). Updated daily, their data comes from, “state/district/territory public health authorities—or, occasionally, from trusted news reporting, official press conferences, or (very occasionally) tweets or Facebook updates from state public health authorities or governors.”

## Challenges

The biggest and most frustrating challenge I encountered while creating this dashboard was consistently styling the `<select>` element across all browsers. Firefox, Chrome, and Safari each applied their own styles to the select (dropdown) element and I could not figure out how to solve the problem.

![](http://tekjoe.dev/wp-content/uploads/2020/04/safari-select-1024x329.png)

`<select>` element, Safari styling applied

![](http://tekjoe.dev/wp-content/uploads/2020/04/chrome-select-1024x299.png)

`<select>` element, Chrome styling applied

![](http://tekjoe.dev/wp-content/uploads/2020/04/firefox-select-1024x359.png)

`<select>` element, Firefox styling applied

After consulting with my web developer friends (Hi, Ted 👋🏼), I eventually found my way to an [article by Ben Nadel.](https://www.bennadel.com/blog/3776-effortless-custom-form-input-styling-with-webkit-appearance-none.htm?site-photo=321) The key was setting `-webkit-appearance` to `none`. This small change overrode each browsers’ default `<select>` element styling with my own.

```css
select {
  -webkit-appearance: none;
}
```

![](http://tekjoe.dev/wp-content/uploads/2020/04/Screen-Shot-2020-04-14-at-1.06.57-PM.png)

My own `<select>` element styling

I’m extremely happy with how everything turned out and I hope you find my dashboard project helpful. If you have any questions about this project, please hit me up through<EMAIL_ADDRESS>or [social media](https://twitter.com/_tekjoe).

repository: tekjoe/tekjoe-gatsby

gha_language: JavaScript

repo_name: tekjoe/tekjoe-gatsby


text:
(cards)=

# Cards

Cards contain content and actions about a single subject.
A card is a flexible and extensible content container,
it can be formatted with components including headers and footers, titles and images.

:::{card} Card Title

Card content
:::

See the [Material Design](https://material.io/components/cards) and [Bootstrap card](https://getbootstrap.com/docs/5.0/layout/grid/) descriptions for further details.

`````{dropdown} Syntax
:icon: code
:color: light

````{tab-set-code}
```{literalinclude} ./snippets/myst/card-basic.txt
:language: markdown
```
```{literalinclude} ./snippets/rst/card-basic.txt
:language: rst
```
````
`````

All content before the first occurrence of three or more `^^^` is considered as a header,
and all content after the final occurrence of three or more `+++` is considered as a footer:

:::{card} Card Title
Header
^^^
Card content
+++
Footer
:::

`````{dropdown} Syntax
:icon: code
:color: light

````{tab-set-code}
```{literalinclude} ./snippets/myst/card-head-foot.txt
:language: markdown
```
```{literalinclude} ./snippets/rst/card-head-foot.txt
:language: rst
```
````
`````

When using cards in grids (see [`grid-item-card`](./grids.md)) footers can be aligned.

::::{grid} 2
:::{grid-item-card} Card Title
Header
^^^
Card content
+++
Footer
:::
:::{grid-item-card} Card Title
Header
^^^
Longer

Card content
+++
Footer
:::
::::

## Card images

You can also add an image as the background of a card or at the top/bottom of the card, with the `img-background`, `img-top`, `img-bottom` options:

:::::{grid} 2 3 3 4

::::{grid-item}

:::{card} Title
:img-background: images/particle_background.jpg
:class-card: sd-text-black

Text
:::

::::

::::{grid-item-card} Title
:img-top: images/particle_background.jpg

Header
^^^
Content
+++
Footer
::::

::::{grid-item-card} Title
:img-bottom: images/particle_background.jpg

Header
^^^
Content
+++
Footer
::::

:::::

`````{dropdown} Syntax
:icon: code
:color: light

````{tab-set-code}
```{literalinclude} ./snippets/myst/card-images.txt
:language: markdown
```
```{literalinclude} ./snippets/rst/card-images.txt
:language: rst
```
````
`````

(cards-clickable)=

## Clickable cards

Using the `link` and `link-type` options, you can turn an entire card into a clickable link.
Try hovering over then clicking on the cards below:

:::{card} Clickable Card (external)
:link: https://example.com

The entire card can be clicked to navigate to <https://example.com>.
:::

:::{card} Clickable Card (internal)
:link: cards-clickable
:link-type: ref

The entire card can be clicked to navigate to the `cards-clickable` reference target.
:::

`````{dropdown} Syntax
:icon: code
:color: light

````{tab-set-code}
```{literalinclude} ./snippets/myst/card-link.txt
:language: markdown
```
```{literalinclude} ./snippets/rst/card-link.txt
:language: rst
```
````
`````

## Aligning cards

You can use the `text-align` option to align the text in a card,
and also `auto` margins to align the cards horizontally.

:::{card} Align Center
:width: 75%
:margin: 0 2 auto auto
:text-align: center

Content
:::

:::{card} Align Right
:width: 50%
:margin: 0 2 auto 0
:text-align: right

Content
:::

:::{card} Align Left
:width: 50%
:margin: 0 2 0 auto
:text-align: left

Content
:::

(cards:carousel)=

## Card carousels

The `card-carousel` directive can be used to create a single row of fixed width, scrollable cards.
The argument should be a number between 1 and 12, to denote the number of cards to display.

When scrolling a carousel, the scroll will snap to the start of the nearest card:

::::{card-carousel} 2

:::{card} card 1
content
:::
:::{card} card 2
Longer

content
:::
:::{card} card 3
:::
:::{card} card 4
:::
:::{card} card 5
:::
:::{card} card 6
:::
::::

`````{dropdown} Syntax
:icon: code
:color: light

````{tab-set-code}
```{literalinclude} ./snippets/myst/card-carousel.txt
:language: markdown
```
```{literalinclude} ./snippets/rst/card-carousel.txt
:language: rst
```
````
`````

(cards:options)=

## `card` options

width
: The width that the card should take up (in %): auto, 25%, 50%, 75%, 100%.

margin
: Outer margin of grid.
  One (all) or four (top bottom left right) values from: 0, 1, 2, 3, 4, 5, auto.

text-align
: Default horizontal text alignment: left, right, center or justify

img-background
: A URI (relative file path or URL) to an image to be placed below the content.

img-top
: A URI (relative file path or URL) to an image to be placed above the content.

img-bottom
: A URI (relative file path or URL) to an image to be placed below the content.

link
: Turn the entire card into a clickable link to an external/internal target.

link-type
: Type of link: `url` (default), `ref`, `doc`, `any`.

shadow
: The size of the shadow below the card: `none`, `sm` (default), `md`, `lg`.

class-card
: Additional CSS classes for the card container element.

class-header
: Additional CSS classes for the header element.

class-body
: Additional CSS classes for the body element.

class-title
: Additional CSS classes for the title element.

class-footer
: Additional CSS classes for the footer element.

repository: martinacantaro/sphinx-design

repo_name: martinacantaro/sphinx-design


text:
# Hydrogen Web Components

For more information, please visit [https://www.hydrogenplatform.com/no-code](https://www.hydrogenplatform.com/no-code)

## Requirements

Building the API client library requires:
1. [Node.js](https://nodejs.org/)

## Installation

### Local Installation

First install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

Finally, switch to the directory you want to use your app_token_api from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

You should now be able to `require('@hydrogenplatform/app_token_api')` in javascript files from the directory you ran the last
command above from.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please first follow the [installation](#installation) instructions. Then make sure you use the proper base URL:

### Base URL
Follow steps to verify the base URL path:

1. Go to ApiClient file located under src folder.
2. Search for **this.basePath** and change/verify the URL according to the environment.

**Sandbox Base URL**
https://sandbox.hydrogenplatform.com/admin/v1

**Production Base URL**
https://api.hydrogenplatform.com/admin/v1

### Sample Code
Now you are ready to execute the following Javascript code:

```javascript
const dotenv = require('dotenv').config();
const HydrogenAppTokenApi = require('@hydrogenplatform/app_token_api');

var callback = function(error, data, response) {
    if (error) {
      console.error(error);
    } else {
      console.log('API called successfully. Returned data: ' + JSON.stringify(data));
    }
  };

let attribMap = [{"name" : "public-key", "value" : "xxxx"},{"name" : "client-id", "value" : "xxxx9"}]

const userAuthToken = "xxxx";

let appTokenConfig = {};
appTokenConfig['appName'] = [{'app_name':'pfm_cash_flow', 'auth_type':'password_credentials'}]
appTokenConfig['userAccessToken'] = userAuthToken
appTokenConfig['attribMap'] = attribMap
appTokenConfig['isEmbed'] = true
appTokenConfig['isCredsPassed'] = true
appTokenConfig['clientId'] = "xxxx"
appTokenConfig['clientSecret'] = "xxxx"
appTokenConfig['username'] = "xxxx"
appTokenConfig['password'] = "xxxx"
appTokenConfig['basePath'] = "https://api.hydrogenplatform.com/admin/v1"

var api = new HydrogenAppTokenApi.AutoGenerateAppTokenApi()
api.getAppTokenUsingGET(appTokenConfig = appTokenConfig, callback);
```

## Author
The Hydrogen Technology Corporation

https://www.hydrogenplatform.com

*Generated using [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)*

repository: jresmedina/SDK

repo_name: jresmedina/SDK


text:
# Git

This is representing the contract which is exposed as part of `Git` module. It is an object with some keys represents as different methods into it.

```javascript
// For ES6
import { Git } from '@itchef/rg-lib';

// For Non ES6
const { Git } = require('@itchef/rg-lib');
```

## Methods

Method Name | Arguments | Description
---------|----------|---------
init() | None | Initialize git into a project
clone(owner, repo, dir) | **owner:** String, **repo:** String, **dir:** String (*Optional* / *Default:* `''`) | Clone a repository from **owner**'s **repo** and place it to a **dir**
add(option) | option: `{ flag: all | blank, files: [ LIST OF FILES IF FLAG IS NOT ALL ] }` | Add files to local git
commit(message) | **message:** String | Commits changes to git

See the implementation for more info: [Git.js](../../src/lib/Git.js)

repository: itchef/rg-lib

repo_name: itchef/rg-lib


text:
# MagNet Soul

Mega Man style platformer, written in TS with an ECS-style custom game engine.
Uses matter-js for physics and Pixi for rendering.

Play now at: https://mmkalll.itch.io/magnet-soul

`yarn start` sets up a dev server with Parcel and hot module reloading.
`yarn dist` packages a build into the release directory, which can be zipped for upload to itch.io.

repository: Lumbi/MagNet-Soul

repo_name: Lumbi/MagNet-Soul


text:
---
title: Configure AEM Assets as a [!DNL Cloud Service] with Brand Portal
description: Configure AEM Assets with Brand Portal.
contentOwner: Vishabh Gupta
feature: Brand Portal,Asset Distribution,Configuration
role: Admin
exl-id: 078e522f-bcd8-4734-95db-ddc8772de785
---
# Configure Experience Manager Assets with Brand Portal {#configure-aem-assets-with-brand-portal}

| Version | Article link |
| -------- | ---------------------------- |
| AEM 6.5  |    [Click here](https://experienceleague.adobe.com/docs/experience-manager-65/assets/brandportal/configure-aem-assets-with-brand-portal.html?lang=en)                  |
| AEM as a Cloud Service     | This article         |

Configuring Adobe Experience Manager Assets Brand Portal allows you to publish approved brand assets from Adobe Experience Manager Assets as a [!DNL Cloud Service] instance to Brand Portal and distribute them to the Brand Portal users.

## Activate Brand Portal using Cloud Manager {#activate-brand-portal}

The Cloud Manager user activates Brand Portal for an Experience Manager Assets as a [!DNL Cloud Service] instance. The activation workflow creates the required configurations (authorization token, IMS configuration, and Brand Portal cloud service) at the backend and reflects the status of the Brand Portal tenant in Cloud Manager. Activating Brand Portal enables the Experience Manager Assets users to publish assets to Brand Portal and distribute them to the Brand Portal users.

**Prerequisites**

You require the following to activate Brand Portal on your Experience Manager Assets as a [!DNL Cloud Service] instance:

* An up and running Experience Manager Assets as a [!DNL Cloud Service] instance.
* A user having access to Cloud Manager, assigned to Profiles of the Cloud Manager Product. See [accessing Cloud Manager](https://experienceleague.adobe.com/docs/experience-manager-cloud-service/security/ims-support.html#accessing-cloud-manager) for more information.

>[!NOTE]
>
>A configured production environment is required to an Experience Manager Assets as a [!DNL Cloud Service] instance to connect with Brand Portal tenant.

**Steps to activate Brand Portal**

You can activate Brand Portal while creating the production environments for your Experience Manager Assets as a [!DNL Cloud Service] instance, or separately. Let us assume that the environment was already created, and you are now required to activate Brand Portal.

1. Login to Adobe Cloud Manager and navigate to **[!UICONTROL Environments]**.

   The **[!UICONTROL Environments]** page displays the list of all the existing environments.

1. Select the environments (one by one) from the list to view the environment details.

   Brand Portal is entitled to one of the available environments and is reflected under the **[!UICONTROL Environment Information]**.

   Once you find the environment associated with Brand Portal, click on the **[!UICONTROL Activate Brand Portal]** button to begin the activation workflow.

   ![Activate Brand Portal](assets/create-environment4.png)

1. It takes few mins to activate the Brand Portal tenant as the activation workflow creates the required configurations at the backend. Once the Brand Portal tenant is activated, the status changes to Activated.

   ![View Status](assets/create-environment5.png)

>[!NOTE]
>
>Brand Portal must be activated on the same IMS org as of the Experience Manager Assets as a [!DNL Cloud Service] instance.
>
>If you have an existing Brand Portal cloud configuration ([manually configured using Adobe Developer Console](#manual-configuration)) for an IMS org (org1-existing) and your Experience Manager Assets as a [!DNL Cloud Service] instance is configured for another IMS org (org2-new), activating Brand Portal from the Cloud Manager resets the Brand Portal IMS org to `org2-new`. Although the manually configured cloud configuration on `org1-existing` is visible in the Experience Manager Assets author instance but will no longer be in use after activating Brand Portal from the Cloud Manager.
>
>If the existing Brand Portal cloud configuration and Experience Manager Assets as a [!DNL Cloud Service] instance are using the same IMS org (org1), you only have to activate Brand Portal from the Cloud Manager.
>
>Do not modify any autogenerated settings.

**See also**:

* [Add users and roles in Experience Manager Assets as a Cloud Service](https://experienceleague.adobe.com/docs/experience-manager-cloud-manager/using/requirements/setting-up-users-and-roles.html)

* [Manage environments in Cloud Manager](https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/using-cloud-manager/manage-environments.html#adding-environments)

**Login to your Brand Portal tenant**:

After activation of your Brand Portal tenant in Cloud Manager, you can login to Brand Portal from Admin Console or by directly using the tenant URL.

The default URL of your Brand Portal tenant is: `https://<tenant-id>.brand-portal.adobe.com/`.

Wherein, the Tenant id is the IMS org.

Perform the following steps if you are not sure of the Brand Portal URL:

1. Login to [Admin Console](https://adminconsole.adobe.com/) and navigate to **[!UICONTROL Products]**.
1. From the left panel, select **[!UICONTROL Adobe Experience Manager Brand Portal – Brand Portal]**.
1. Click on **[!UICONTROL Go to Brand Portal]** to directly open Brand Portal in the browser.

   Or copy the Brand Portal tenant URL from the **[!UICONTROL Go to Brand Portal]** link and paste it in your browser to open the Brand Portal interface.

   ![Access Brand Portal](assets/access-bp-on-cloud.png)

**Test connection**

Perform the following steps to validate the connection between your Experience Manager Assets as a [!DNL Cloud Service] instance and Brand Portal tenant:

1. Login to Experience Manager Assets.

1. From the **Tools** panel, navigate to **[!UICONTROL Deployment]** > **[!UICONTROL Distribution]**.

    ![Navigate to the distribution option](assets/test-bpconfig1.png)

   A Brand Portal distribution agent (**[!UICONTROL bpdistributionagent0]**) is created under **[!UICONTROL Publish to Brand Portal]**.

   ![Create distribution agent](assets/test-bpconfig2.png)

1. Click **[!UICONTROL Publish to Brand Portal]** to open the distribution agent.

   You can see the distribution queues under the **[!UICONTROL Status]** tab.

   A distribution agent contains two queues:
   * **processing-queue**: for the distribution of assets to Brand Portal.

   * **error-queue**: for the assets where distribution has failed.

   >[!NOTE]
   >
   >It is recommended to review the failures and  clear the **error-queue** periodically.

   ![Processing queue for the distribution of assets](assets/test-bpconfig3.png)

1. To verify the connection between Experience Manager Assets as a [!DNL Cloud Service] and Brand Portal, click on the **[!UICONTROL Test Connection]** icon.

   ![Verify connection between AEM and Brand Portal](assets/test-bpconfig4.png)

   A message appears that your *test package is successfully delivered*.

   >[!NOTE]
   >
   >Avoid disabling the distribution agent, as it can cause the distribution of the assets (running-in-queue) to fail.

To verify the connection between your Experience Manager Assets as a [!DNL Cloud Service] instance and Brand Portal tenant, publish an asset from Experience Manager Assets to Brand Portal. If the connection is successful, the published asset is visible in the Brand Portal interface.

You can now:

* [Publish assets from Experience Manager Assets to Brand Portal](publish-to-brand-portal.md)
* [Publish folders from Experience Manager Assets to Brand Portal](publish-to-brand-portal.md#publish-folders-to-brand-portal)
* [Publish collections from Experience Manager Assets to Brand Portal](publish-to-brand-portal.md#publish-collections-to-brand-portal)
* [Publish assets from Brand Portal to Experience Manager Assets](https://experienceleague.adobe.com/docs/experience-manager-brand-portal/using/asset-sourcing-in-brand-portal/brand-portal-asset-sourcing.html) - Asset Sourcing in Brand Portal
* [Publish presets, schemas, and facets to Brand Portal](https://experienceleague.adobe.com/docs/experience-manager-brand-portal/using/publish/publish-schema-search-facets-presets.html)
* [Publish tags to Brand Portal](https://experienceleague.adobe.com/docs/experience-manager-brand-portal/using/publish/brand-portal-publish-tags.html)

See [Brand Portal documentation](https://experienceleague.adobe.com/docs/experience-manager-brand-portal/using/home.html) for more information.

**Distribution logs**

You can monitor the distribution agent logs for the asset publishing workflow.

Let us now publish an asset from Experience Manager Assets to Brand Portal and see the logs.

1. Follow the steps (from 1 to 4) as shown in the **Test connection** section and navigate to the distribution agent page.
1. Click **[!UICONTROL Logs]** to view the processing and error logs.

   ![Processing and error logs](assets/test-bpconfig5.png)

The distribution agent has generated the following logs:

* INFO: It is a system-generated log that triggers on successful configuration of the distribution agent.
* DSTRQ1 (Request 1): Triggers on test connection.

On publishing the asset, the following request and response logs are generated:

**Distribution agent request**:

* DSTRQ2 (Request 2): The asset publishing request is triggered.
* DSTRQ3 (Request 3): The system triggers another request to publish the Experience Manager Assets folder (in which the asset exists) and replicates the folder in Brand Portal.

**Distribution agent response**:

* queue-bpdistributionagent0 (DSTRQ2): The asset is published to Brand Portal.
* queue-bpdistributionagent0 (DSTRQ3): The system replicates the Experience Manager Assets folder (containing the asset) in Brand Portal.

In the above example, an additional request and response are triggered. The system could not find the parent folder (Add Path) in Brand Portal because the asset was published for the first time, therefore, it triggered an additional request to create a parent folder with the same name in Brand Portal where the asset is published.

>[!NOTE]
>
>Additional request is generated in case the parent folder does not exist in Brand Portal or has been modified in Experience Manager Assets.

Along with the automation workflow to activate Brand Portal on Experience Manager Assets as a [!DNL Cloud Service], there exists another method to manually configure Experience Manager Assets as a [!DNL Cloud Service] with Brand Portal using Adobe Developer Console which is not recommended anymore.

>[!NOTE]
>
>Contact Customer Support if you are facing any problem while activating your Brand Portal tenant.

## Manual configuration using Adobe Developer Console {#manual-configuration}

The following section describes how to manually configure Experience Manager Assets as a [!DNL Cloud Service] with Brand Portal using Adobe Developer Console.

Earlier, Experience Manager Assets as a [!DNL Cloud Service] was manually configured with Brand Portal via Adobe Developer Console, which procures an Adobe Identity Management Services (IMS) account token for authorization of the Brand Portal tenant. It requires configurations in both, Experience Manager Assets and Adobe Developer Console.

1. In Experience Manager Assets, create an IMS account and generate a public key (certificate).
1. In Adobe Developer Console, create a project for your Brand Portal tenant (organization).
1. Under the project, configure an API using the public key to create a service account connection.
1. Get the service account credentials and JSON Web Token (JWT) payload information.
1. In Experience Manager Assets, configure the IMS account using the service account credentials and JWT payload.
1. In Experience Manager Assets, configure the Brand Portal cloud service using the IMS account and Brand Portal endpoint (organization URL).
1. Test your configuration by publishing an asset from Experience Manager Assets to Brand Portal.

>[!NOTE]
>
>An Experience Manager Assets as a [!DNL Cloud Service] instance shall only be configured with one Brand Portal tenant.

**Prerequisites**

You require the following to configure Experience Manager Assets with Brand Portal:

* An up and running Experience Manager Assets as a [!DNL Cloud Service] instance
* A Brand Portal tenant URL
* A user with system administrator privileges on the IMS organization of the Brand Portal tenant

## Create configuration {#create-new-configuration}

Perform the following steps in the specified sequence to configure Experience Manager Assets with Brand Portal.

1. [Obtain public certificate](#public-certificate)
1. [Create service account (JWT) connection](#createnewintegration)
1. [Configure IMS account](#create-ims-account-configuration)
1. [Configure cloud service](#configure-the-cloud-service)

### Create IMS configuration {#create-ims-configuration}

The IMS configuration authenticates your Experience Manager Assets as a [!DNL Cloud Service] instance with the Brand Portal tenant.

IMS configuration includes two steps:

* [Obtain public certificate](#public-certificate)
* [Configure IMS account](#create-ims-account-configuration)

### Obtain public certificate {#public-certificate}

The public key (certificate) authenticates your profile on Adobe Developer Console.

1. Login to Experience Manager Assets.
1. From the **Tools** panel, navigate to **[!UICONTROL Security]** > **[!UICONTROL Adobe IMS Configurations]**.
1. In Adobe IMS Configurations page, click **[!UICONTROL Create]**. It will redirect to the **[!UICONTROL Adobe IMS Technical Account Configuration]** page. By default, the **Certificate** tab opens.
1. Select **[!UICONTROL Adobe Brand Portal]** in the **[!UICONTROL Cloud Solution]** dropdown list.
1. Select the **[!UICONTROL Create new certificate]** check box and specify an **alias** for the public key. The alias serves as name of the public key.
1. Click **[!UICONTROL Create certificate]**. Then, click **[!UICONTROL OK]** to generate the public key.

   ![Create Certificate](assets/ims-config2.png)

1. Click the **[!UICONTROL Download Public Key]** icon and save the public key (CRT) file on your machine.

   The public key is used later to configure API for your Brand Portal tenant and generate service account credentials in Adobe Developer Console.

   ![Download Certificate](assets/ims-config3.png)

1. Click **[!UICONTROL Next]**.

    In the **Account** tab, Adobe IMS account is created which requires the service account credentials that are generated in Adobe Developer Console. Keep this page open for now.

    Open a new tab and [create a service account (JWT) connection in Adobe Developer Console](#createnewintegration) to get the credentials and JWT payload for configuring the IMS account.

### Create service account (JWT) connection {#createnewintegration}

In Adobe Developer Console, projects and APIs are configured at Brand Portal tenant (organization) level. Configuring an API creates a service account (JWT) connection. There are two methods to configure API, by generating a key pair (private and public keys) or by uploading a public key. To configure Experience Manager Assets with Brand Portal, you must generate a public key (certificate) in Experience Manager Assets and create credentials in Adobe Developer Console by uploading the public key. These credentials are required to configure the IMS account in Experience Manager Assets. Once the IMS account is configured, you can configure the Brand Portal cloud service in Experience Manager Assets.

Perform the following steps to generate the service account credentials and JWT payload:

1. Login to Adobe Developer Console with system administrator privileges on the IMS organization (Brand Portal tenant). The default URL is [https://www.adobe.com/go/devs_console_ui](https://www.adobe.com/go/devs_console_ui).

   >[!NOTE]
   >
   >Ensure that you have selected the correct IMS organization (Brand Portal tenant) from the dropdown (organization) list located at the upper-right corner.

1. Click **[!UICONTROL Create new project]**. A blank project with a system-generated name is created for your organization.

   Click **[!UICONTROL Edit project]** to update the **[!UICONTROL Project Title]** and **[!UICONTROL Description]**, and click **[!UICONTROL Save]**.

1. In the **[!UICONTROL Project overview]** tab, click **[!UICONTROL Add API]**.

1. In the **[!UICONTROL Add an API window]**, select **[!UICONTROL AEM Brand Portal]** and click **[!UICONTROL Next]**.

   Ensure that you have access to the Experience Manager Brand Portal service.

1. In the **[!UICONTROL Configure API]** window, click **[!UICONTROL Upload your public key]**. Then, click **[!UICONTROL Select a File]** and upload the public key (.crt file) that you have downloaded in the [obtain public certificate](#public-certificate) section.

   Click **[!UICONTROL Next]**.

   ![Upload Public Key](assets/service-account3.png)

1. Verify the public key and click **[!UICONTROL Next]**.

1. Select **[!UICONTROL Assets Brand Portal]** as the default product profile and click **[!UICONTROL Save configured API]**.

   ![Select Product Profile](assets/service-account4.png)

1. Once the API is configured, you are redirected to the API overview page. From the left navigation under **[!UICONTROL Credentials]**, click on the **[!UICONTROL Service Account (JWT)]** option.

   >[!NOTE]
   >
   >You can view the credentials and perform actions such as generate JWT tokens, copy credential details, retrieve client secret, and so on.

1. From the **[!UICONTROL Client Credentials]** tab, copy the **[!UICONTROL client ID]**.

   Click **[!UICONTROL Retrieve Client Secret]** and copy the **[!UICONTROL client secret]**.

   ![Service Account Credentials](assets/service-account5.png)

1. Navigate to the **[!UICONTROL Generate JWT]** tab and copy the **[!UICONTROL JWT Payload]** information.

You can now use the client ID (API key), client secret, and JWT payload to [configure the IMS account](#create-ims-account-configuration) in Experience Manager Assets.

<!--
1. Click **[!UICONTROL Create Integration]**.

1. Select **[!UICONTROL Access an API]**, and click **[!UICONTROL Continue]**.

   ![Create New Integration](assets/create-new-integration1.png)

1. Create a new integration page opens.

   Select your organization from the drop-down list.

   In **[!UICONTROL Experience Cloud]**, Select **[!UICONTROL AEM Brand Portal]** and click **[!UICONTROL Continue]**.

   If the Brand Portal option is disabled for you, ensure that you have selected correct organization from the drop-down box above the **[!UICONTROL Adobe Services]** option. If you do not know your organization, contact your administrator.

   ![Create Integration](assets/create-new-integration2.png)

1. Specify a name and description for the integration. Click **[!UICONTROL Select a File from your computer]** and upload the `AEM-Adobe-IMS.crt` file downloaded in the [obtain public certificates](#public-certificate) section.

1. Select the profile of your organization.

   Or, select the default profile **[!UICONTROL Assets Brand Portal]** and click **[!UICONTROL Create Integration]**. The integration is created.

1. Click **[!UICONTROL Continue to integration details]** to view the integration information.

   Copy the **[!UICONTROL API Key]**

   Click **[!UICONTROL Retrieve Client Secret]** and copy the Client Secret key.

   ![API Key, Client Secret, and payload information of an integration](assets/create-new-integration3.png)

1. Navigate to **[!UICONTROL JWT]** tab, and copy the **[!UICONTROL JWT payload]**.

   The API Key, Client Secret key, and JWT payload information is used to create IMS account configuration.

-->

### Configure IMS account {#create-ims-account-configuration}

Ensure that you have performed the following steps:

* [Obtain public certificate](#public-certificate)
* [Create service account (JWT) connection](#createnewintegration)

Perform the following steps to configure the IMS account.

1. Open the IMS Configuration and navigate to the **[!UICONTROL Account]** tab. You kept the page open while [obtaining the public certificate](#public-certificate).

1. Specify a **[!UICONTROL Title]** for the IMS account.

   In the **[!UICONTROL Authorization Server]** field, specify the URL: [https://ims-na1.adobelogin.com/](https://ims-na1.adobelogin.com/)

   Specify client ID in the **[!UICONTROL API key]** field, **[!UICONTROL Client Secret]**, and **[!UICONTROL Payload]** (JWT payload) that you have copied while [creating the service account (JWT) connection](#createnewintegration).

   Click **[!UICONTROL Create]**.

   The IMS account is configured.

   ![IMS Account configuration](assets/create-new-integration6.png)

1. Select the IMS account configuration and click **[!UICONTROL Check Health]**.

   Click **[!UICONTROL Check]** in the dialog box. On successful configuration, a message appears that the *Token is retrieved successfully*.

   ![Adobe IMS Configurations Check Health.](assets/create-new-integration5.png)

>[!CAUTION]
>
>You must have only one IMS configuration.
>
>Ensure that the IMS configuration passes the health check. If the configuration does not pass the health check, it is invalid.

### Configure cloud service {#configure-the-cloud-service}

Perform the following steps to configure the Brand Portal cloud service:

1. Login to Experience Manager Assets.

1. From the **Tools** panel, navigate to **[!UICONTROL Cloud Services]** > **[!UICONTROL AEM Brand Portal]**.

1. In the Brand Portal Configurations page, click **[!UICONTROL Create]**.

1. Specify a **[!UICONTROL Title]** for the configuration.

   Select the IMS configuration that you created while [configuring the IMS account](#create-ims-account-configuration).

   In the **[!UICONTROL Service URL]** field, specify your Brand Portal tenant (organization) URL.

    ![Brand Portal Configuration dialog box.](assets/create-cloud-service.png)

1. Click **[!UICONTROL Save & Close]**. The cloud configuration is created.

   Your Experience Manager Assets as a [!DNL Cloud Service] instance is now configured with the Brand Portal tenant.

You can now test the configuration by checking the distribution agent and publishing assets to Brand Portal.

**Allowlist Egress IPs in SPS if secure preview enabled**
If using Dynamic Media-Scene7 with [secure preview enabled](#https://experienceleague.adobe.com/docs/dynamic-media-classic/using/upload-publish/testing-assets-making-them-public.html?lang=en) for a company), then it is advised that Scene7 company administrator [allowlist the public egress IPs](#https://experienceleague.adobe.com/docs/dynamic-media-classic/using/upload-publish/testing-assets-making-them-public.html?lang=en#testing-the-secure-testing-service) for respective regions using SPS (Scene7 Publishing System) flash UI.
The egress IPs are as follows:

| **Region**  | **Egress IP** |
|--- |--- |
| NA | <IP_ADDRESS>, <IP_ADDRESS>  |
| EMEA | <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>  |
| APAC | <IP_ADDRESS> |

<!--
### Test configuration {#test-configuration}

Perform the following steps to validate the configuration:

1. Login to AEM Assets.

1. From the **Tools** panel, navigate to **[!UICONTROL Deployment]** > **[!UICONTROL Distribution]**.

    ![test-bpconfig1](assets/test-bpconfig1.png)

   A Brand Portal distribution agent (**[!UICONTROL bpdistributionagent0]**) is created under **[!UICONTROL Publish to Brand Portal]**.

   ![test-bpconfig2](assets/test-bpconfig2.png)

1. Click **[!UICONTROL Publish to Brand Portal]** to open the distribution agent.

   You can see the distribution queues under the **[!UICONTROL Status]** tab.

   A distribution agent contains two queues:
   * **processing-queue**: for the distribution of assets to Brand Portal.

   * **error-queue**: for the assets where distribution has failed.

   >[!NOTE]
   >
   >It is recommended to review the failures and  clear the **error-queue** periodically.

   ![test-bpconfig3](assets/test-bpconfig3.png)

1. To verify the connection between AEM Assets as a [!DNL Cloud Service] and Brand Portal, click on the **[!UICONTROL Test Connection]** icon.

   ![test-bpconfig4](assets/test-bpconfig4.png)

   A message appears that your *test package is successfully delivered*.

   >[!NOTE]
   >
   >Avoid disabling the distribution agent, as it can cause the distribution of the assets (running-in-queue) to fail.

You can now:

* [Publish assets from AEM Assets to Brand Portal](publish-to-brand-portal.md)
* [Publish folders from AEM Assets to Brand Portal](publish-to-brand-portal.md#publish-folders-to-brand-portal)
* [Publish collections from AEM Assets to Brand Portal](publish-to-brand-portal.md#publish-collections-to-brand-portal)
* [Publish assets from Brand Portal to AEM Assets](https://experienceleague.adobe.com/docs/experience-manager-brand-portal/using/asset-sourcing-in-brand-portal/brand-portal-asset-sourcing.html) - Asset Sourcing in Brand Portal
* [Publish presets, schemas, and facets to Brand Portal](https://experienceleague.adobe.com/docs/experience-manager-brand-portal/using/publish/publish-schema-search-facets-presets.html)
* [Publish tags to Brand Portal](https://experienceleague.adobe.com/docs/experience-manager-brand-portal/using/publish/brand-portal-publish-tags.html)

See [Brand Portal documentation](https://experienceleague.adobe.com/docs/experience-manager-brand-portal/using/home.html) for more information.

## Distribution logs {#distribution-logs}

You can monitor the distribution agent logs for the asset publishing workflow.

For example, we have published an asset from AEM Assets to Brand Portal to validate the configuration.

1. Follow the steps (from 1 to 4) as shown in the [Test Configuration](#test-configuration) section and navigate to the distribution agent page.
1. Click **[!UICONTROL Logs]** to view the processing and error logs.

   ![ctest-bpconfig4](assets/ctest-bpconfig4.png)

The distribution agent has generated the following logs:

* INFO: This is a system-generated log that triggers on successful configuration of the distribution agent.
* DSTRQ1 (Request 1): Triggers on test connection.

On publishing the asset, the following request and response logs are generated:

**Distribution agent request**:

* DSTRQ2 (Request 2): The asset publishing request is triggered.
* DSTRQ3 (Request 3): The system triggers another request to publish the AEM Assets folder (in which the asset exists) and replicates the folder in Brand Portal.

**Distribution agent response**:

* queue-bpdistributionagent0 (DSTRQ2): The asset is published to Brand Portal.
* queue-bpdistributionagent0 (DSTRQ3): The system replicates the AEM Assets folder (containing the asset) in Brand Portal.

In the above example, an additional request and response is triggered. The system could not find the parent folder (Add Path) in Brand Portal because the asset was published for the first time, therefore, it triggered an additional request to create a parent folder with the same name in Brand Portal where the asset is published.

>[!NOTE]
>
>Additional request is generated in case the parent folder does not exist in Brand Portal or has been modified in AEM Assets.
-->

<!--

## Additional information {#additional-information}

Go to `/system/console/slingmetrics` for statistics related to the distributed content:

1. **Counter metrics**
   * sling: `mac_sync_request_failure`
   * sling: `mac_sync_request_received`
   * sling: `mac_sync_request_success`

1. **Time metrics**
   * sling: `mac_sync_distribution_duration`
   * sling: `mac_sync_enqueue_package_duration`
   * sling: `mac_sync_setup_request_duration`

-->

<!--
   Comment Type: draft

   <li> </li>
   -->

   <!--
   Comment Type: draft

   <li>Step text</li>
-->

**See also**

* [Translate Assets](translate-assets.md)
* [Assets HTTP API](mac-api-assets.md)
* [Assets supported file formats](file-format-support.md)
* [Search assets](search-assets.md)
* [Connected assets](use-assets-across-connected-assets-instances.md)
* [Asset reports](asset-reports.md)
* [Metadata schemas](metadata-schemas.md)
* [Download assets](download-assets-from-aem.md)
* [Manage metadata](manage-metadata.md)
* [Search facets](search-facets.md)
* [Manage collections](manage-collections.md)
* [Bulk metadata import](metadata-import-export.md)

gha_language: SCSS


text:
---
_id: {$type: oid, $value: 2bcf47b3170f114ccc4364ec}
_source: anc
_sourceId: written_2_technical/plos/pmed.0010042.txt
addedDate: {$date:<PHONE_NUMBER>696}
feedId: anc
metadata:
  links: []
publishDate: {$date:<PHONE_NUMBER>000}
reviewed: true
title: '[written_2/technical/plos/pmed.0010042.txt]  As the Hispanic world well knows,
  the word in'
---
As the <ignore  id='undefined'>Hispanic</ignore> world well knows, the word in Spanish for advertising is ‘propaganda’,
its meaning derived literally from the propagation of the faith, the antithesis of
science's Enlightenment ideals. The old word somehow seems perfect for describing the new
world of drug promotion and its growing use of the famous face. Like the catholic cardinals
of the 17th century, many of the feted celebrities of the 21st are now engaged in spreading
the word. Now, as then, the religion promises miraculous breakthroughs, wonder cures, and
sometimes even eternal life. The difference is that this time around, the stars are earning
fat fees from the marketing departments of giant pharmaceutical companies. And if the
latest revelations from industry insiders are anything to go by, their hefty investments in
celebrity selling are well worth it.

Celebrity Selling
The epicentre of this phenomenon is of course the <geo  id='6252001'>United States</geo>, where companies
routinely hire celebrities to attract attention to the latest drugs and the diseases that
go with them. Pfizer famously paid presidential hopeful Bob Dole to promote awareness of
erectile dysfunction as sildenafil (Viagra) was hitting the market. Wyeth hired supermodel
Lauren Hutton to hawk hormone replacement therapy and menopause. GSK contracted football
star Ricky Williams to sell social anxiety disorder, helping make paroxetine
(Paxil)—briefly—the world's top-selling antidepressant. Even the dead are raising
awareness, with the estate of Errol Flynn now enlisted to help promote cardiovascular
disease as a household name [1]. The celebrity, living or dead, becomes integral to a drug
marketing strategy that includes paid advertising and aggressive public relations campaigns
that can produce media appearances on the likes of
Oprah and
The Today Show . According to celebrity brokers, the star's remuneration
package, though always confidential, can range from $20,000 to $2 million.
‘A partnership between a celebrity and a brand has an intangible sort of magic’, writes
a senior marketing executive at Amgen, in an extremely candid piece published recently in
an industry trade magazine [2]. Amgen is the Californian biotech firm that hired handsome
‘West Wing’ star Rob Lowe to help market an anti-infection drug. Lowe was reportedly paid
more than $1 million by Amgen, though there is speculation that part of the fee might flow
to charity [3]. In her report, Amgen's Osnat Benshoshan shares some thoughtful tips with
her peers among the pharmaceutical marketing fraternity: ‘use an A-list celebrity’; find a
‘news-hook’ that links the celebrity and your product; develop some simple messages; and
make sure the celebrity delivers them at every appearance.
Benshoshan then reveals why on-air talk-show appearances on ‘top-tier media venues’ like

The Rosie Show can be better forums for celebrities than straight
advertisements, which are governed by regulations. ‘The great advantage over advertising is
that the airtime is practically free, and there is no fair balance to worry about’ she
writes [2]. The downside with a media interview, she laments, is that compared to a
scripted ad, ‘the situation is less controllable. It can be tricky for the celebrity to
ensure that all product messages are delivered….’ Her other big tip for drug-makers is to
rate your prospective celebrity with a ‘Q score’, a measure of their likeability and
recognisability with the public. Apparently Rob Lowe's Q score was high with women over
fifty, a key target of the Amgen campaign [3].
Another recent report from within the industry draws on public opinion survey data to
guide drug company marketers on the selection and ‘effective use’ of celebrity
spokespersons [4]. The survey was conducted by a <geo  id='5809844'>Seattle</geo> firm called NexCura Inc., in
partnership with the trade magazine that published the study. The major findings echo the
insights of the Amgen executive about credibility, and underline the importance of your
star being perceived as generally trustworthy, and specifically knowledgeable about the
condition on which they are hired to speak. Perhaps not surprisingly, the survey found that
people diagnosed as suffering chronic conditions were far more attentive to celebrity
messages on health than the general public.
The issue of credibility is important, the NexCura Inc. researchers point out, because
‘the credibility rating is used as a surrogate for “buying” behavior’—an intermediate
measure of whether the star can persuade people to request the target drug from their
doctor. The survey found that Bob Dole was still the most recognisable celebrity marketer
with the <geo  id='6252001'>United States</geo> public, but that the skater Dorothy Hamill—currently promoting
Merck's arthritis medication rofecoxib (Vioxx)—took the lead in the credibility stakes.
Significantly though, almost three-quarters of those surveyed were correctly able to
identify Bob Dole with Pfizer's Viagra, despite the fact that the advertisements in which
he appeared were ‘unbranded’ ads for erectile dysfunction. The researchers concluded by
recommending that drug companies choose a celebrity with personal experience of the target
condition; choose someone trustworthy—perhaps a newsreader or sports figure; and choose
someone who will promote a single cause or brand rather than multiple ones.
Ironically, the NexCura survey also found two-thirds of medical consumers agreed with
the proposition that celebrities were ‘just doing it for the money and can't be
trusted’.

The Trouble with Celebrity Selling
The first problem here is that the public is often not even informed whether a celebrity
is receiving money from a drug company. In the case of TV star Rob Lowe, there was no
mandated requirement for him to disclose his link with Amgen when appearing on media shows
watched by millions. According to one industry insider familiar with the case, who did not
want to be named, ‘it depended if he remembered to say it, and whether he was asked’. The
media's failure to disclose relevant conflicts of interest when covering healthcare is well
established [5]. When
Frasier star Kelsey Grammer and his wife were promoting irritable bowel
syndrome on top-rating TV shows, viewers thought the pair were speaking on behalf of an
independent foundation. In fact the couple's fee had flowed from GSK, which was at that
time preparing the market for alosetron (Lotronex), a controversial new drug that carried
modest benefits and severe side effects, including possible death [6].
Equally as serious is the lack of any formal requirement for stars or media outlets to
spell out drug side effects along with benefits when celebrities are pushing products or
conditions. Lauren Hutton can be quoted, in magazine articles read by millions of readers,
as saying, ‘My No. 1 secret is estrogen’ without any need for her, or the magazine, to list
the dangers of the hormone replacement therapy made by her sponsor [7]. But perhaps most
troubling is the way celebrities, with their star power, can help to fundamentally shift
the public debate about major health problems.
While Prince Charles's companion Camilla Parker Bowles takes no money from drug
companies, she did choose to make an important public statement about the bone condition
osteoporosis at an international conference funded by Lilly, a company promoting a
medication for the condition [8]. Camilla's call for early intervention and greater use of
expensive tests and technologies for the primary prevention of osteoporosis drew on
materials sponsored by the pharmaceutical industry, and was synchronised with simplistic
industry marketing messages. Camilla's high-profile intervention at a drug company
sponsored forum, albeit unwittingly, helps keep the focus on biochemical causes of, and
biochemical solutions to, the much wider public health problem of fractures. Moreover these
simple marketing messages undermine the complexity of the cost-effectiveness arguments that
are central to any rational debate about the equitable distribution of health care
resources. Other high-profile figures attending the same conference eagerly accepted Lilly
money, and one, former <geo  id='4736286'>Texas</geo> Governor Ann Richards, blatantly promoted Lilly's drug during
an interview on CNN's Larry King Show just days later [8].

The Future of Celebrity Selling
With pharmaceutical marketing, it is clear that nothing short of a Vatican II-style
reform is required, though there are already encouraging signs of change. Scientific
journals are slowly disentangling themselves from unhealthy industry influence over what
they publish, and public access to clinical trial data is daily a closer reality [9].
However, a less distorted scientific record about healthcare products is meaningless
without regulations on how important science is communicated to the public. Celebrities
paid by drug companies to promote drugs, or ‘raise awareness’ about disease, should be
subject to the same rules as direct-to-consumer advertising, which would mean prohibition
in many nations and much more fulsome disclosure in the <geo  id='6252001'>United States</geo> than is currently the
case. At the very least, public disclosure of a product's risks and benefits, and the
magnitude of the celebrity's fee, should be mandatory and routine. Let's see what that does
to their Q rating.


text:
torch-demo-tools
================

#Conversions

## convertLinearmodelConvMM
   on CPU run as
   ```lua
       th convertLinearmodelConvMM.lua './dir/model.net'
   ```

to modify your trained network with Linear layer. By replacing the linear layers with ConvolutionMM, you can feed the network bigger inputs than the ones network trained with. You need to modify the input tensor based on your training.

repository: Aysegul/sandbox

repo_name: Aysegul/sandbox


text:
---
external help file: JumpCloud-help.xml
Module Name: JumpCloud
online version: https://github.com/TheJumpCloud/support/wiki/Get-JCCommandTarget
schema: 2.0.0
---

# Get-JCCommandTarget

## SYNOPSIS
Returns the JumpCloud systems or system groups associated with a JumpCloud command.

## SYNTAX

### Systems (Default)
```
Get-JCCommandTarget [-CommandID] <String> [<CommonParameters>]
```

### Groups
```
Get-JCCommandTarget [-CommandID] <String> [-Groups] [<CommonParameters>]
```

## DESCRIPTION
Using the CommandID parameter the Get-JCCommandTarget command will return all the systems associated with a JumpCloud command. If the '-Groups' parameter is used the Get-JCCommandTarget command will return all the system groups associated with a JumpCloud command.

## EXAMPLES

### Example 1
```powershell
Get-JCCommandTarget -CommandID '5a99777710p3690onylo3e1g'
```

Retrieves the JumpCloud system targets that are associated the JumpCloud command with the Command ID '5a99777710p3690onylo3e1g'

### Example 2
```powershell
Get-JCCommandTarget -CommandID '5a99777710p3690onylo3e1g' -Groups
```

Retrieves the JumpCloud system group targets that are associated the JumpCloud command with the Command ID '5a99777710p3690onylo3e1g'

## PARAMETERS

### -CommandID
The id value of the JumpCloud command.
Use the command 'Get-JCCommand | Select-Object _id, name' to find the "_id" value for all the JumpCloud commands in your tenant.

```yaml
Type: System.String
Parameter Sets: (All)
Aliases: _id, id

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Groups
A switch parameter to display any System Groups associated with a command.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: Groups
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String

## OUTPUTS

### System.Object
## NOTES

## RELATED LINKS

repository: TheJumpCloud/support

gha_language: PowerShell

repo_name: TheJumpCloud/support


text:
# Debugging a process, component, or crash dump

## Attaching to a process by name filters

Running a process on Fuchsia is more complicated than in other systems because there are different
loader environments (see "A note about launcher environments" below).

The only way to reliably debug all types of processes is to create a filter on the process name via
"attach" and start it the normal way you would start that process. The process name is usually the
name of the build target that generates it. To check what this is, use "ps" (either in the debugger
or from a system shell) with it running.

> Note: only the first 32 bytes of the name are included in the Zircon process description.
> Sometimes the number of path components can cause the name to be truncated. If the filter isn't
> working, check the actual name in "ps". We hope to have a better way to match this in the future.

This example sets a pending breakpoint on `main` to stop at the beginning of execution, and waits
for a process called "my\_app" to start:

```
[zxdb] attach my_app
Waiting for process matching "my_app"

[zxdb] break main
Breakpoint 1 (Software) on Global, Enabled, stop=All, @ main
Pending: No matches for location, it will be pending library loads.
```

Then run the process the way you would in normal use (directly on the command line, via `fx test`,
via the shell's `run fuchsia-pkg://...`, or another way. The debugger should then immediately break
on `main` (it may take some time to load symbols so you may see a delay before showing the source
code):

```none {:.devsite-disable-click-to-copy}
Attached Process 1 [Running] koid=51590 my_app.cmx
🛑 on bp 1 main(…) • main.cc:222
   220 }
   221
 ▶ 222 int main(int argc, const char* argv[]) {
   223   foo::CommandLineOptions options;
   224   cmdline::Status status = ParseCommandLine(argc, argv, &options);
```

You can then do basic commands that are similar to GDB:

```none {:.devsite-disable-click-to-copy}
next
step
print argv[1]
continue
quit
```

#### A note about launcher environments

The following loader environments all have different capabilities (in order
from least capable to most capable):

  * The debugger's `run <file name>` command (base system process stuff).
  * The system console or `fx shell` (adds some libraries).
  * The base component environment via the shell's `run` and the debugger's
    `run -c <package url>` (adds component capabilities).
  * The test environment via `fx test`.
  * The user environment when launched from a "story" (adds high-level
    services like scenic).

This panoply of environments is why the debugger can't have a simple "run"
command that always works.

## Launching simple command-line processes

Minimal console apps including some unit tests can be launched directly from within the debugger
which avoids the above "attach" dance:

```none {:.devsite-disable-click-to-copy}
[zxdb] break main
Breakpoint 1 (Software) on Global, Enabled, stop=All, @ $main
Pending: No matches for location, it will be pending library loads.

[zxdb] run /bin/cowsay
```

If you get a shared library load error or errors about files or services not being found, it means
the app can't be run from within the debugger's launcher environment. This is true even for things
that may seem relatively simple.

## Directly launching components

Components that can be executed with the console command `run fuchsia-pkg://...` can be loaded in
the debugger with the following command, substituting your component's URL:

```none {:.devsite-disable-click-to-copy}
[zxdb] run -c fuchsia-pkg://fuchsia.com/your\_app#meta/your\_app.cmx
```

Not all components can be launched this way since most higher-level services won't be accessible: if
you can't do `run ...` from the system console, it won't work from the debugger either. Note also
that `fx test` is a different environment. According to your test's dependencies, it may or may not
work from the debugger's `run` command.

## Attaching to an existing process

You can attach to most running processes given the process’ koid (the [kernel object
ID](/docs/concepts/kernel/concepts.md) that, when applied to a process, is equivalent to a process
ID on other systems). You can get the koid by running `ps` on the target Fuchsia system or use
zxdb's built-in `ps` command:

```none {:.devsite-disable-click-to-copy}
[zxdb] ps
j: 1030 root
  j: 1079 zircon-drivers
    p: 1926 driver_host:sys
...
```

In this listing, "j:" indicates a [job](/docs/concepts/kernel/concepts.md) (a container for
processes) and "p:" indicates a process. The number following the type prefix is the object's koid.

Then to attach:

```none {:.devsite-disable-click-to-copy}
[zxdb] attach 3517
Process 1 Running koid=1249 pwrbtn-monitor
```

When you’re done, you can choose to `detach` (keep running) or `kill` (terminate) the process.

## Attaching to processes in specific jobs

By default the debugger will attampt to attach to the root job so process launch filters will apply
globally. Normally this will appear as "job 1" in the debugger:

```none {:.devsite-disable-click-to-copy}
[zxdb] job
  # State     Koid Name
  1 Attached  1027 root
```

You can also apply filters for processes launched in a specific job. First attach to the job using
the `attach-job` command, specifying the job's koid:

```none {:.devsite-disable-click-to-copy}
[zxdb] attach-job 30053
Job 2 state=Attached koid=30053 name=""
```

The debugger will now be attached to two jobs, with the new job being the current one:

```none {:.devsite-disable-click-to-copy}
[zxdb] job
  # State     Koid Name
  1 Attached  1027 root
▶ 2 Attached 30053
```

Now you can make a filter (see above) that applies to the process names only to this job by
prefixing the attach command with the job object number (not koid) created above:

```none {:.devsite-disable-click-to-copy}
[zxdb] job 2 attach my_app
Waiting for process matching "my_app".
Type "filter" to see the current filters.
```

You can also attach to all current and future processes in a job using the `*` wildcard as the
filter name:

```none {:.devsite-disable-click-to-copy}
[zxdb] attach-job 30053
Job 2 state=Attached koid=30053 name=""

[zxdb] job 2 attach *
Attached Process 1 state=Running koid=28071 name=sysmem_connector.cmx
```

> **Warning:** Be careful only to use the wildcard `attach *` command with an explicit,
> narrowly-scoped job. Making a global filter or applying it to a job with too many children can
> attach to too many processes that may include drivers necessary for the system to function.

## Debugging drivers

It's not currently possible to set up the debugger early enough in system startup to debug most
driver initialization. And since zxdb itself uses the network and filesystem, no drivers associated
with network communication can be debuged, and neither can many drivers associated with storage or
other critical system functions.

Driver debugging support is tracked in issue
[5456](https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=5456).

You can debug running drivers by attaching like any other process (see “Attaching to an existing
process”). You can delay initialization to allow time to attach by adding a busyloop at the
beginning of your code:

```cpp
volatile bool stop = false;
while (!stop) {}
```

To break out of the loop after attaching, either set the variable to true:

```none {:.devsite-disable-click-to-copy}
[zxdb] print stop = true
true
[zxdb] continue
```

Or jump to the line after the loop:

```none {:.devsite-disable-click-to-copy}
[zxdb] jump <line #>
[zxdb] continue
```

## Debugging crash dumps

Zxdb supports loading a minidump generated by a crash report. Use the "opendump" verb and supply the
local file name of the dump. The debugger must not be attached to another dump or a running system
(use "disconnect" first if so).

```none {:.devsite-disable-click-to-copy}
[zxdb] opendump upload_file_minidump-e71256ba30163a0.dmp
Opening dump file
Dump loaded successfully.
```

Now the thread, stack, and memory commands can be used to inspect the state of the program. Use
`disconnect` to close the dump.

For in-tree users, the `fx debug` command can take the path to a core file as an argument.

```posix-terminal {:.devsite-disable-click-to-copy}
fx debug -c upload_file_minidump-e71256ba30163a0.dmp
```

#### Downloading symbols

To tell zxdb to look for debug symbols for your core dump in a GCS URL and download those symbols
automatically, run the following command, substituting the location of your symbols:

```posix-terminal {:.devsite-disable-click-to-copy}
zxdb --symbol-server gs://my-bucket-name/namespace
```

In-tree users automatically have the option set, with the server pointed to a bucket containing
symbols for all release builds.

The first time you use the symbol server, you will have to authenticate using the `auth` command.
The authentication flow will require you to complete part of the authentication in your browser.

```none {:.devsite-disable-click-to-copy}
[zxdb] auth
To authenticate, please supply an authentication token. You can retrieve a token from:

https://accounts.google.com/o/oauth2/v2/< very long URL omitted >

Once you've retrieved a token, run 'auth <token>'

[zxdb] auth 4/hAF-pASODIFUASDIFUASODIUFSADF329827349872V6
Successfully authenticated with gs://fuchsia-artifacts-release/debug
```

### Debugging multiple processes

You can debug many arbitrary processes at the same time. Attaching or running when a process is
already running in the debugger will just create a new one in parallel.

Recall from the “Interaction model” section you can list the current processes with:

```none {:.devsite-disable-click-to-copy}
[zxdb] process
  # State       Koid Name
▶ 1 Running     1249 pwrbtn-monitor
  2 Not running 7235 pwrbtn-monitor
```

Select one of those as the default by providing its index (not koid):

```none {:.devsite-disable-click-to-copy}
[zxdb] process 2
```

Or apply commands to a specific process (even if it’s not the default) with:

```none {:.devsite-disable-click-to-copy}
[zxdb] process 2 pause
```

repository: mvanotti/fuchsia-mirror

repo_name: mvanotti/fuchsia-mirror


text:
# Image Query App

## Overview
This application accepts an image and a audio file as initial input and generate description and key information of the input. Later, the user can input speech file to query for the information of the input. The model representation:

![model](/applications/imagequery/model.png)

## Container Information
This application consists for four containers.

> #### Container1: speech recognition.
> Input: audio file `(.wav)`; Output: `String`

> #### Container2: image caption generator
> Input: image file  `(.jpg)`; Output: `String`

> #### Container3: natural language processing
> Input: String; Output: mapping `String`, in the format of `"[subject]-[predicate]-[time]"`

> #### Container4: question answering
> Input: mapping `String`; Output: `String`

## Additional Note on container implementation

> ### Container2
> This app is hard to configure as it requires too much environment setting. So Try not to modify it. If you have to, whenever you change anything, say the name of the image you want to generate captions, search through the whole application to see if there'sany other names you should change at the same time.
>
> #### How this container works?
> 1. The first thing to notice is the `Dockerfile2` for this container. We are creating a workspace for Bazel under `/container/workspace` to reduce unnecessary bugs. The structure of directories are explained in the `Dockerfile2`.
>
> 2. `runWithArg.sh` is like the interface for `predict.py`. It accepts the file path of model checkpoint, `word_count.txt` and image path as argument from `predict.py` and in turn uses these arguments to call `run_inference.py` and that is where the real work for generating captions start.
>
> 3. The captions are generated in `run_inference.py` and are stored in `/container/workspace/captionData/captionFile.txt`. After finish executing run_inference.py, we read the content of captionFile.txt in predict.py and return the result in predict() to
the client.

> ### Container3
> The libraries used in this container for NLP are `spacy` and `textacy`. Please refer to the official documentation if you are not familar with them.

branch_name: refs/heads/develop


text:
# JavaScript Snowball Stemmers [![Build Status](https://travis-ci.org/mazko/jssnowball.svg?branch=master)](https://travis-ci.org/mazko/jssnowball) [![npm version](https://badge.fury.io/js/snowball-stemmers.svg)](http://badge.fury.io/js/snowball-stemmers) [![Coverage Status](https://coveralls.io/repos/mazko/jssnowball/badge.svg?branch=master&service=github)](https://coveralls.io/github/mazko/jssnowball?branch=master)

All JavaScript stemmers have been transpiled from Java implementation of [Snowball](http://snowballstem.org/) stemming algorithms using [ESJava](https://github.com/mazko/esjava) transpiler.

This project provides not only pre-built JavaScript stemmers, but allows to create new ones.

## Pre-built stemmers

Stemmers for 20+ languages are packed in one file in two ECMAScript standards:
 * [ES6](//github.com/mazko/jssnowball/raw/master/js_snowball/lib/snowball.es6)
 * [ES5](//github.com/mazko/jssnowball/raw/master/js_snowball/lib/snowball.babel.js)

You can test stemmers directly in [online demo](http://mazko.github.io/jssnowball/).

## How to build

As there are several limitations of ESJava transpiler, the build process has to be complemented by pre- and post-transpiling tweaks.

### Prerequisities

 * Unix-like OS (or Cygwin on Windows)
 * Node.js + npm
 * rsync (for syncing Snowball repository, required only in specific scenarios)
 * perl (for generating Java code from Snowball algorithms (SBL files), required only in specific scenarios)

### Rebuilding stemmers

  1. [Building Java stemmers from most recent Snowball stemmers](#building-java-stemmers-from-most-recent-snowball-stemmers)
  2. [Creating a Java bundle](#creating-a-java-bundle)
  3. [Tweaking the Java bundle](#tweaking-the-java-bundle)
  4. [Transpiling the Java bundle to JavaScript](#transpiling-the-java-bundle-to-javascript)
  5. [Modifying the transpiled JavaScript](#modifying-the-transpiled-javascript)

### Adding custom stemmers

  1. [Building Java stemmers from most recent Snowball stemmers](#building-java-stemmers-from-most-recent-snowball-stemmers)
  2. [Building Java stemmers from custom Snowball stemmers](#building-java-stemmers-from-custom-snowball-stemmers)
  3. [Creating a Java bundle](#creating-a-java-bundle)
  4. [Adding custom Java stemmers into the bundle](#adding-custom-java-stemmers-into-the-bundle)
  5. [Tweaking the Java bundle](#tweaking-the-java-bundle)
  6. [Transpiling the Java bundle to JavaScript](#transpiling-the-java-bundle-to-javascript)
  7. [Modifying the transpiled JavaScript](#modifying-the-transpiled-javascript)

### Steps in a detail

#### Building Java stemmers from most recent Snowball stemmers

    git clone https://github.com/mazko/jssnowball.git
    cd jssnowball/
    make bundle

#### Building Java stemmers from custom Snowball stemmers

 1. Change directory to `jssnoball/snowball-master/`
 2. Create new subfolder in the `algorithms` folder and copy there the given SBL file renamed to `stem_Unicode.sbl`
 3. Add stemmer configuration into `libstemmer/modules.txt` and `libstemmer/modules_utf8.txt`
 4. Add stemmer to the GNUmakefile's `libstemmer_algorithms` variable
 5. Compile the Snowball using `make dist`

#### Creating a Java bundle

As ESJava can convert a single file only, all Java source files have to be bundled first.

    git checkout -- js_snowball/eclipse/
    make bundle

#### Adding the Java stemmer into the bundle

Copy the Java stemmer code from `jssnoball/snowball-master/java/org/tartarus/snowball/ext/` into `jssnowball/js_snowball/lib/snowball.bundle.java`.

It also recommended to remove unused code like `copy_from`, `hashCode` etc. Here is Eclipse EE Mars.1 Release (4.5.1) example:

*source -> cleanup*

![cleanup-profile](js_snowball/screenshots/cleanup-profile.png)

#### Tweaking the Java bundle

There are some Java constructions that can't be translated to JavaScipt directly, e.g. reflection etc. Such fragments has to be tweaked a bit.

Fortunately, most of them are in the common code, not in stemmers themselves (except for finnishStemmer). They are wrapped inside `:es6:` code `:end:` and should be edited as suggested in comments.

On top of that, these further tweaks are required:
 * removing package names in method references (`org.tartarus.snowball`, `java.lang`)
 * removing some overloaded methods

The result should match the original [snowball.bundle.java](https://github.com/mazko/jssnowball/blob/master/js_snowball/lib/snowball.bundle.java) file.

#### Transpiling the Java bundle to JavaScript

    npm i -g esjava babel-cli
    npm i babel-preset-es2015 babel-plugin-transform-es2015-modules-umd
    make esjava

#### Modifying the transpiled JavaScript

In the final JavaScript files (stored in `jssnowball/js_snowball/lib/` directory) it is necessary to replace `s.length()` with `s.length` in `eq_s` and `eq_s_b` methods. Otherwise the code returns a TypeError: `s.length is not a function`.

repository: proglang/dts-generate-results

repo_name: proglang/dts-generate-results


text:
Detox is gray box end-to-end testing and automation library for mobile apps. It has a lot of great features:

- Cross Platform
- Runs on Devices
- Automatically Synchronized
- Test Runner Independent
- Debuggable

## Setting Up Detox

### Install applesimutils (Mac only)

[applesimutils](https://github.com/wix/AppleSimulatorUtils) is a collection of utils for Apple simulators.

```sh
brew tap wix/brew
brew install applesimutils
```

### Install Jest Globally

```sh
npm install -g jest
```

### Generating Applications

By default, when creating a mobile application, Nx will use Detox to create the e2e tests project.

```shell
nx g @nx/react-native:app frontend
```

### Creating a Detox E2E project for an existing project

You can create a new Detox E2E project for an existing mobile project.

If the `@nx/detox` package is not installed, install the version that matches your `@nx/workspace` version.

{% tabs %}
{%tab label="npm"%}

```sh
# npm
npm install --save-dev @nx/detox
```

{% /tab %}
{%tab label="yarn"%}

```sh
# yarn
yarn add --dev @nx/detox
```

{% /tab %}
{% /tabs %}

Next, generate an E2E project based on an existing project.

```sh
nx g @nx/detox:app your-app-name-e2e --project=your-app-name
```

Replace `your-app-name` with the app's name as defined in your `tsconfig.base.json` file or the `name` property of your `package.json`.

In addition, you need to follow [instructions at Detox](https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md) to do manual setup for Android files.

## Using Detox

### Testing Applications

- Run `nx test-ios frontend-e2e` to build the iOS app and execute e2e tests with Detox for iOS (Mac only)
- Run `nx test-android frontend-e2e` to build the Android app and execute e2e tests with Detox for Android

You can run below commands:

- `nx build-ios frontend-e2e`: build the iOS app (Mac only)
- `nx build-android frontend-e2e`: build the Android app

### Testing against Prod Build

You can run your e2e test against a production build:

- `nx test-ios frontend-e2e --prod`: to build the iOS app and execute e2e tests with Detox for iOS with Release configuration (Mac only)
- `nx test-android frontend-e2e --prod`: to build the Android app and execute e2e tests with Detox for Android with release build type
- `nx build-ios frontend-e2e --prod`: build the iOS app using Release configuration (Mac only)
- `nx build-android frontend-e2e --prod`: build the Android app using release build type

## Configuration

### Using .detoxrc.json

If you need to fine tune your Detox setup, you can do so by modifying `.detoxrc.json` in the e2e project.

#### Change Testing Simulator/Emulator

For iOS, in terminal, run `xcrun simctl list devices available` to view a list of simulators on your Mac. To open your active simulator, `run open -a simulator`. In `frontend-e2e/.detoxrc.json`, you could change the simulator under `devices.simulator.device`.

For Android, in terminal, run `emulator -list-avds` to view a list of emulators installed. To open your emulator, run `emulator -avd <your emulator name>`. In `frontend-e2e/.detoxrc.json`, you could change the simulator under `devices.emulator.device`.

In addition, to override the device name specified in a configuration, you could use `--device-name` option: `nx test-ios <app-name-e2e> --device-name "iPhone 11"`. The `device-name` property provides you the ability to test an application run on specific device.

```shell
nx test-ios frontend-e2e --device-name "iPhone 11"
nx test-android frontend-e2e --device-name "Pixel_4a_API_30"
```

repository: nrwl/nx

repo_name: nrwl/nx