text:
---
title: Configure and use asset microservices for asset processing
description: Learn how to configure and use the cloud-native asset microservices to process assets at scale.
contentOwner: AG
---

# Get started using asset microservices {#get-started-using-asset-microservices}

<!--
* Current capabilities of asset microservices offered. If workers have names then list the names and give a one-liner description. (The feature-set is limited for now and continues to grow. So will this article continue to be updated.)
* How to access the microservices. UI. API. Is extending possible right now?
* Detailed list of what file formats and what processing is supported by which workflows/workers process.
* How/where can admins check what's already configured and provisioned.
* How to create new config or request for new provisioning/purchase.

* [DO NOT COVER?] Exceptions or limitations or link back to lack of parity with AEM 6.5.
-->

Asset microservices provide a scalable and resilient processing of assets using cloud services. Adobe manages the services for optimal handling of different asset types and processing options.

Asset processing depends on the configuration in **[!UICONTROL Processing Profiles]**, which provide a default set up, and allow an administrator to add more specific asset processing configuration. Administrators can create and maintain the configurations of post-processing workflows, including optional customization. Customizing workflows allows for extensibility and full customization.

Asset microservices allows you can process a [broad range of file types](/help/assets/file-format-support.md) covering more formats out-of-the-box than what is possible with previous versions of Experience Manager. For example, thumbnail extraction of PSD and PSB formats is now possible that previously required third-party solutions like ImageMagick.

<!-- Proposed DRAFT diagram for asset microservices flow - see section "asset-microservices-flow.png (asset-microservices-configure-and-use.md)" in the PPTX deck

https://adobe-my.sharepoint.com/personal/gklebus_adobe_com/_layouts/15/guestaccess.aspx?guestaccesstoken=jexDC5ZnepXSt6dTPciH66TzckS1BPEfdaZuSgHugL8%3D&docid=2_1ec37f0bd4cc74354b4f481cd420e07fc&rev=1&e=CdgElS
-->

![A high-level view of asset processing](assets/asset-microservices-flow.png "A high-level view of asset processing")

>[!NOTE]
>
> The asset processing described here replaces the `DAM Update Asset` workflow model that exists in the previous versions of Experience Manager. Most of the standard rendition generation and metadata-related steps are replaced by the asset microservices processing, and remaining steps, if any, can be replaced by the post-processing workflow configuration.

## Get started with asset processing {#get-started}

Asset processing with asset microservices is pre-configured with a default configuration, ensuring that the default renditions required by the system are available. It also ensure that metadata extraction and text extraction operations are available. Users can start uploading or updating assets immediately and basic processing is available by default.

For specific rendition generation or asset processing requirements, an AEM administrator can create additional [!UICONTROL Processing Profiles]. Users can assign one or more of the available profiles to specific folders to get additional processing done. Say for example, to generate web, mobile, and tablet specific renditions. The following video illustrates how to create and apply [!UICONTROL Processing Profiles] and how to access the created renditions.

>[!VIDEO](https://video.tv.adobe.com/v/29832?quality=9)

To change existing profile, see [configurations for asset microservices](#configure-asset-microservices).
To create custom processing profiles specific to your custom requirements, say to integrate with other systems, see [post-processing workflows](#post-processing-workflows).

## Configurations for asset microservices {#configure-asset-microservices}

To configure asset microservices, administrators can use configuration user interface under **[!UICONTROL Tools > Assets > Processing Profiles]**.

### Default configuration {#default-config}

With the default configuration, only the standard processing profile is configured. The standard processing profile is not visible on the user interface and you cannot modify it. It always executes to process uploaded assets. A standard processing profile ensures that all the basic processing required by Experience Manager is completed on all assets.

<!-- ![processing-profiles-standard](assets/processing-profiles-standard.png) -->

The standard processing profile provides the following processing configuration:

* Standard thumbnails used by Asset user interface (48, 140, and 319 px)
* Large preview (web rendition - 1280 px)
* Metadata extraction
* Text extraction

### Supported file formats {#supported-file-formats}

Asset microservices provide support for a wide variety of file formats in terms of the ability to generate renditions or extract metadata. See [supported file formats](file-format-support.md) for the full list.

### Add additional processing profiles {#processing-profiles}

Additional processing profiles can be added using the **[!UICONTROL Create]** action.

Each processing profile configuration includes a list of renditions. For each rendition, you can specify the following:

* Rendition name.
* Supported rendition format, such as JPEG, PNG, or GIF.
* Rendition width and height in pixels. If it is not specified, the full pixel size of the original image is used.
* Rendition quality of JPEG in percent.
* Included and excluded MIME types to define the applicability of a profile.

![processing-profiles-adding](assets/processing-profiles-adding.png)

When you create and save a new processing profile it is added to the list of configured processing profiles. You can apply these processing profiles to folders in the folder hierarchy to make them effective for asset uploads and assets processing.

<!-- Removed per cqdoc-15624 request by engineering.
 ![processing-profiles-list](assets/processing-profiles-list.png) -->

#### Rendition width and height {#rendition-width-height}

Rendition width and height specification provides maximum sizes of the generated output image. Asset microservice tries to produce the largest possible rendition, which width and height is not bigger than the specified width and height, respectively. The aspect ratio is preserved, that is the same as the original.

An empty value means that asset processing assumes the pixel dimension of the original.

#### MIME type inclusion rules {#mime-type-inclusion-rules}

When an asset with a specific MIME type is processed, the MIME type is first checked against the excluded MIME types value for the rendition specification. If it matches that list, this specific rendition is not generated for the asset (blocked list).

Otherwise, the MIME type is checked against the included MIME type, and if it matches the list, the rendition is generated (allowed list).

#### Special FPO rendition {#special-fpo-rendition}

When placing large-sized assets from AEM into Adobe InDesign documents, a creative professional must wait for a substantial time after they [place an asset](https://helpx.adobe.com/indesign/using/placing-graphics.html). Meanwhile, the user is blocked from using InDesign. This interrupts creative flow and negatively impacts the user experience. Adobe enables temporarily placing small-sized renditions in InDesign documents to begin with, which can be replaced with full-resolution assets on-demand later. Experience Manager provides renditions that are used for placement only (FPO). These FPO renditions have a small file size but are of the same aspect ratio.

The processing profile can include a FPO (For Placement Only) rendition. See Adobe Asset Link [documentation](https://helpx.adobe.com/enterprise/using/manage-assets-using-adobe-asset-link.html) to understand if you need to turn it on for your processing profile. For more information, see [Adobe Asset Link complete documentation](https://helpx.adobe.com/enterprise/using/adobe-asset-link.html).

## Use asset microservices to process assets {#use-asset-microservices}

Create and apply the additional, custom processing profiles to specific folders for Experience Manager to process for assets uploaded to or updated in these folders. The default, in-built standard processing profile is always executed but is not visible on the user interface. If you add a custom profile, then both profiles are used to process the uploaded assets.

There are two ways to get processing profiles applied to folders:

* Administrators can select a processing profile definition in **[!UICONTROL Tools > Assets > Processing Profiles]**, and use **[!UICONTROL Apply Profile to Folder(s)]** action. It opens a content browser that allow you to navigate to specific folders, select them and confirm the application of the profile.
* Users can select a folder in the Assets user interface, use **[!UICONTROL Properties]** action to open folder properties screen, click on the **[!UICONTROL Processing Profiles]** tab, and in the drop-down, select the right processing profile for that folder. The choice will be save upon **[!UICONTROL Save & Close]** action.

>[!NOTE]
>
>Only one processing profile can be applied to a specific folder. If you need more renditions generated, you can add more rendition definitions to the processing profile.

After a processing profile is applied to a folder, all the new assets uploaded (or updated) in this folder or any of it's sub-folders are processed using the additional processing profile configured. This additional processing is in addition to the standard, default profile. If you apply multiple profiles to a folder, the uploaded or updated assets are processed using each of these profiles.

>[!NOTE]
>
>When assets are uploaded to a folder, Experience Manager checks the containing folder's properties for a processing profile. If none is applied, it goes up in the folder tree until it finds a processing profile applied, and uses it for the asset. That means that a processing profile applied to a folder works for the entire tree, but can be over-ridden with another profile applied to a sub-folder.

Users can check that the processing actually took place by opening a newly-uploaded asset for which processing has finished, opening asset preview, and clicking on the left-hand rail's **[!UICONTROL Renditions]** view. The specific renditions in the processing profile, for which the specific asset's type matches the MIME type inclusion rules, should be visible and accessible.

![additional-renditions](assets/renditions-additional-renditions.png)
*Figure: Example of two additional renditions generated by a processing profile applied to the parent folder*

## Post-processing workflows {#post-processing-workflows}

For situation, where additional processing of assets is required that cannot be achieved using the processing profiles, additional post-processing workflows can be added to the configuration. This allows for adding fully customized processing on top of the configurable processing using asset microservices.

Post-processing workflows, if configured, are automatically executed by AEM after the microservices processing finishes. There is no need to add workflow launchers manually to trigger them. The examples include:

* Custom workflow steps to process assets.
* Integrations to add metadata or properties to assets from external systems, for example, product or process information.
* Additional processing done by external services.

Adding a post-processing workflow configuration to Experience Manager is comprised of the following steps:

* Create one or more workflow models. The documents mention it as *post-processing workflow models*, but those are regular Experience Manager workflow models.
* Add specific workflow steps to these models. The steps are executed on the assets based on a workflow model configuration.
* Add [!UICONTROL DAM Update Asset Workflow Completed Process] step at the end. Adding this step ensures that Experience Manager knows when the processing ends and the asset can be marked as processed, that is *New* is displayed on the asset.
* Create a configuration for the Custom Workflow Runner Service that allows to configure execution of a post-processing workflow model either by a path (folder location) or by a regular expression.

### Create post-processing workflow models {#create-post-processing-workflow-models}

Post-processing workflow models are regular AEM workflow models. Create different models if you need different processing for different repository locations or asset types.

Processing steps should be added based on needs. You can use any supported steps available, as well as any custom-implemented workflow steps.

Ensure that the last step of each post-processing workflows is `DAM Update Asset Workflow Completed Process`. The last step helps ensure that Experience Manager knows when asset processing is completed.

### Configure post-processing workflow execution {#configure-post-processing-workflow-execution}

To configure the post-processing workflow models to be executed for assets uploaded or updated in the system after the asset microservices processing finishes, the Custom Workflow Runner service needs to be configured.

The Custom Workflow Runner service (`com.adobe.cq.dam.processor.nui.impl.workflow.CustomDamWorkflowRunnerImpl`) is an OSGi service and provides two options for configuration:

* Post-processing workflows by path (`postProcWorkflowsByPath`): Multiple workflow models can be listed, based on different repository paths. Paths and models should be separated by a colon. Simple repository paths are supported and should be mapped to a workflow model in the `/var` path. For example: `/content/dam/my-brand:/var/workflow/models/my-workflow`.
* Post-processing workflows by expression (`postProcWorkflowsByExpression`): Multiple workflow models can be listed, based on different regular expressions. Expressions and models should be separated by a colon. The regular expression should point to the Asset node directly, and not one of the renditions or files. For example: `/content/dam(/.*/)(marketing/seasonal)(/.*):/var/workflow/models/my-workflow`.

>[!NOTE]
>
>Configuration of the Custom Workflow Runner is a configuration of an OSGi service. See [deploy to Experience Manager](/help/implementing/deploying/overview.md) for information on how to deploy an OSGi configuration.
> OSGi web console, unlike in on-premise and managed services deployments of AEM, is not directly available in the cloud service deployments.

For details about which standard workflow step can be used in the post-processing workflow, see [workflow steps in post-processing workflow](developer-reference-material-apis.md#post-processing-workflows-steps) in the developer reference.

## Best practices and limitations {#best-practices-limitations-tips}

* Consider your needs for all types of renditions when designing workflows. If you do not foresee the need of a rendition in the future, remove its creation step from the workflow. Renditions cannot be deleted in bulk afterwards. Undesired renditions may take up a lot of storage space after prolonged use of [!DNL Experience Manager]. For individual assets, you can remove renditions manually from the user interface. For multiple assets, you can either customize [!DNL Experience Manager] to delete specific renditions or delete the assets and upload those again.


text:
# Matrix

A database module for [opsdroid](https://github.com/opsdroid/opsdroid) to persist memory in a [matrix](https://matrix.org/) room in the form of state events. The data can be encrypted by storing them as room events in encrypted rooms.

## Requirements

None.

_Note: To use encryption you need the e2e dependencies for matrix-nio which can be installed with `pip install matrix-nio[e2e]`_

## Configuration

```yaml
databases:
  matrix:
    default_room: "main"
    single_state_key: True
    should_encrypt: True
```

## Usage

The database provides 3 functions to interact with it - `get, put, and delete`.

The data is maintained in state events in the form of a dictionary. Each event
has a `state key` which is used to identify that event. You can configure the
database to have only one single state key or specify a state key for each
request. State events are sent to the room specified in the configuration.

The `get` function takes one argument, the key. If the database is configured to
have a single state key then the key passed should be the key for the dict in it. If
single state key is disabled the the key passed should be the state key.

The `put` function takes 2 arguments, the key and value to put in the
dictionary. The key is either the dict key if single state key is set or the
state key if single state key is not set. The value can be whatever you want.

the `delete` function takes one argument, the key to delete. The key is either
the dict key if single state key is set or the state key if single state key is
not set. You can pass a list of keys to delete multiple keys if single state
key is enabled.

The database provides a context manager `memory_in_room` to perform some
operations in a different rooms. use it as:
```
db = opsdroid.get_database("matrix")
with db.memory_in_room(new_room_id):
	database ops
```

There is also a decorator for skill functions to use the memory of the room
where the message was received from.
```
from opsdroid.database.matrix import memory_in_event_room

@memory_in_event_room
async def skill_func(opsdroid, config, message):
	...
```

## Encryption

In encrypted Matrix rooms, state events (used by the database) are not encrypted. This means that anything put into the matrix database in an encrypted room would not be encrypted. To prevent this the matrix database send the **values** you put into your database into the room as regular events, which are encrypted, and then references these events from the database (which is still a state event).
This has two effects you should be aware of:

1) The keys in your database are not encrypted, **do not put sensitive information in the key**.

2) If opsdroid can't decrypt the event, it will be dropped from the database. This means that if you need long term storage in your encrypted rooms you must take steps to save the matrix connectors store (where the decryption keys are kept), so back up your store and keep it safe!

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
title:  Inside Story
date:   17/02/2023
---

### Twin Surprises in Finland

_by Andrew Mcchesney_

When Simo Vehkavuori was a young man, he sold Bible books in Finland. Simo got a big surprise at a house he visited. Simo rang the doorbell. A woman opened the door. When she saw Simo outside, the woman said, “I want to order the set of ten Bible story books from you!” Simo was very surprised. Before Simo said anything, the woman was ready to buy. Simo didn’t even get a chance to tell the woman he was selling books or that he had Arthur Maxwell’s set of ten Bible story books for children.

“You must be surprised that I’m buying all these books from you,” the woman said. “Last night, God gave me a dream. In the dream, He showed me your face. God said, ‘This man will come to your house. Buy from him the set of ten Bible story books.’ So, that’s why I was ready to buy them right away.”

Another time, Simo stopped by a local business. Simo offered the business owner a copy of Ellen White’s The Great Controversy. The man said, “My wife and I know about this book. But we don’t understand anything about it. Our daughter is the manager for a religious school. She will be here tomorrow. Can you come back?”

Simo agreed to come back. Simo told his twin brother about what the local business owner said. Simo’s twin brother was selling books with Simo in town. Simo asked his brother, “Please pray that everything will go well tomorrow during my meeting with the business owner and his family.”

The next day, Simo went to the business. The owner introduced Simo to his daughter. The daughter became angry when she learned that Simo was Seventh-day Adventist. The woman said mean and nasty things about his church.

When the woman finished, Simo asked her for permission to speak. “Dear lady,” Simo said, “we serve a wonderful God in the Adventist Church! I want to follow and serve this God with my whole heart. We can trust Him wherever He leads us.”

The woman looked surprised. “Young man, I can see that God means so much to you.” Then the woman turned and said to her mother, “Mother, can you give me some money? I want to buy all the books that this young man has.”

Simo sold her the books. Then he prayed with the woman and her parents. When Simo went back to his room, he found his twin brother on his knees. Simo’s brother was praying for him and his meeting with the business owner and his daughter. Simo was so excited to share his good news. He told his brother about God’s miracle.

Simo is now retired. He said, “It was a powerful experience for me to see God work a miracle in that family.”

_Provided by the General Conference Office of Adventist Mission, which uses Sabbath School mission offerings to spread the gospel worldwide. Read new stories daily at AdventistMission.org._

license: MIT

repository: Adventech/sabbath-school-lessons

branch_name: refs/heads/stage

gha_license_id: MIT

repo_name: Adventech/sabbath-school-lessons


text:
---
title: Courgette & lemon risotto
image: /img/recipes/courgette-lemon-risotto.jpg
tags:
  - Italian 🇮🇹
  - Vegetarian 🌿
  - Favourite ⭐
time: 50 min
servings: 2
sourceLabel: BBC good food
sourceURL: https://www.bbcgoodfood.com/recipes/courgette-lemon-risotto/
ingredients:
  - 50g butter
  - 1 onion, finely chopped
  - 1 large garlic clove crushed
  - 180g risotto rice
  - 1 vegetable stock cube
  - zest and juice 1 lemon
  - 2 lemon thyme sprigs
  - 250g courgette diced
  - 50g parmesan (or vegetarian alternative) grated
  - 2 tbsp crème fraîche
---

Melt the butter in a deep frying pan. Add the onion and fry gently until softened for about 8 mins, then add the garlic and stir for 1 min. Stir in the rice to coat it in the buttery onions and garlic for 1-2 mins.

Dissolve the stock cube in 1 litre of boiling water, then add a ladle of the stock to the rice, along with the lemon juice and thyme. Bubble over a medium heat, stirring constantly. When almost all the liquid has been absorbed, add another ladle of stock and keep stirring. Tip in the courgette and keep adding the stock, stirring every now and then until the rice is just tender and creamy.

To serve, stir in some seasoning, the lemon zest, Parmesan and crème fraîche.

repository: Uvacoder/my-online-cookbook

branch_name: refs/heads/main

repo_name: Uvacoder/my-online-cookbook


text:
[![CircleCI](https://circleci.com/gh/igorskh/generate_lte_tbs_table.svg?style=svg)](https://circleci.com/gh/igorskh/generate_lte_tbs_table)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8228948b075c4e37afe4632813fba406)](https://www.codacy.com/app/igorskh/generate_lte_tbs_table?utm_source=github.com&utm_medium=referral&utm_content=igorskh/generate_lte_tbs_table&utm_campaign=Badge_Grade)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/igorskh/generate_lte_tbs_table.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/igorskh/generate_lte_tbs_table/alerts/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/igorskh/generate_lte_tbs_table.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/igorskh/generate_lte_tbs_table/context:python)

# LTE Transport Block Size Table Generator
This script parses a transport block size Table <IP_ADDRESS>.1-1 from [3GPP TS 36.213](https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=2427).

## Generator Input Format
Script accepts as input a text copied directly from a PDF version of [3GPP TS 36.213](https://www.etsi.org/deliver/etsi_ts/136200_136299/136213/12.04.00_60/ts_136213v120400p.pdf), just from the begging of the Table <IP_ADDRESS>.1-1 to the end of the table. [Sample text file](samples/ts_136213v121300p.txt) is located in [samples](samples/) folder. The script writes output to in JSON format to [generated](generated/) folder.

## Check Correctness
The script [compare.py](compare.py) can be used to check correctness of a table stored in a json format. An [example](samples/cpp_tbs.json) is located in [samples](samples/).

## Usage
In order to generate reference JSON file for the TBS table:
```bash
python3 generate_ref.py -f samples/ts_136213v121300p.txt
```

Generated JSON file will be located in `generated/`.

In order to compare another file with a reference:
```bash
python3 compare.py -f generated/ts_136213v121300p.json -c samples/cpp_tbs.json
```

This will generated an html report in `generated/report.html` showing in which rows which columns are different.

## Copyright
Except for the content of the `samples/` folder the code is licensed under the [MIT License](LICENSE.md).


text:
# Cross-Sport-Comparison

The goal of this project is to create a tool that can accurately predict how athletes would perform if they were placed in a alternative sport.

Stages

Get data from Madden and Fifa and clean

Concert data between games by reverse engineering overall formulas from games

Determine how the winnner of AI run games is decided.

Create website for all active players of the two sports.


text:
Spatial epitranscriptomics reveals A-to-I editome specific to cancer stem cell microniches
============

Sample codes to analyze the RNA-seq results obtained from select-seq

[![DOI](https://zenodo.org/badge/471266390.svg)](https://zenodo.org/badge/latestdoi/471266390)

repository: BiNEL-SNU/Select-seq

gha_language: R

repo_name: BiNEL-SNU/Select-seq


text:
---
title: Do a CT reconstruction
weight: 500
pre: "<b>5.5 </b>"

---

This tutorial explains how to use SNS jupyter notebook site to perform CT reconstruction.

[here](https://github.com/ornlneutronimaging/iMars3D/wiki/Use-SNS-jupyter-notebook-site-for-CT-reconstruction)

<img src='/tutorial/how_to_run_imars3d/images/screen1.png' />


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.2.0](https://github.com/herschel666/hops-mdx/compare/v0.1.0...v0.2.0) (2021-05-06)

### Bug Fixes

* **preset:** rename option `mdPlugins` to `remarkPlugins` ([85f022c](https://github.com/herschel666/hops-mdx/commit/85f022c0018eb5d7ad6950af506fb6cef58ab928))
* update all the dependencies ([ec65123](https://github.com/herschel666/hops-mdx/commit/ec6512300d7a6098052021400598e14d29f1ea27))
* update Node.js version matrix ([f8eb01d](https://github.com/herschel666/hops-mdx/commit/f8eb01de07418527ef31f7994f827d5c325211df))

### BREAKING CHANGES

* **preset:** the preset option for registering Remark plugins has been renamed to `remarkPlugins`
* support for Hops 11 is dropped; `hops-mdx` now requires Hops 14
* support for Node.js v8 and v10 has been dropped

branch_name: refs/heads/KillYourMaster

gha_language: JavaScript


text:
# react-firebase-authentication

[![Build Status](https://travis-ci.org/rwieruch/react-firebase-authentication.svg?branch=master)](https://travis-ci.org/rwieruch/react-firebase-authentication)

* Found in [Taming the State in React](https://roadtoreact.com/course-details?courseId=TAMING_THE_STATE)
* [Live](https://react-firebase-authentication.wieruch.com/)
* [Tutorial](https://www.robinwieruch.de/complete-firebase-authentication-react-tutorial/)

## Features

* uses:
  * only React (create-react-app)
  * firebase 5.0.0
  * react-router 4.2.0
  * no Redux/MobX
  * [React's 16.3 context API](https://reactjs.org/blog/2018/03/29/react-v-16-3.html)
* features:
  * Sign In
  * Sign Up
  * Sign Out
  * Password Forget
  * Password Change
  * Protected Routes with Authorization
  * Database: Users

## Installation

* `git clone git@github.com:rwieruch/react-firebase-authentication.git`
* `cd react-firebase-authentication`
* `npm install`
* `npm start`
* visit http://localhost:3000/
* Use your own Firebase Credentials

### Use your own Firebase Credentials

* visit https://firebase.google.com/ and create a Firebase App
* copy and paste your Credentials from your Firebase App into src/firebase/firebase.js
* activate Email/Password Sign-In Method in your Firebase App


text:
# Object Creator
[![Travis (.com)](https://img.shields.io/travis/com/domagoj03/object-creator.svg?style=for-the-badge)](https://travis-ci.com/domagoj03/object-creator)

## Intro

This simple library was first and foremost created because I noticed that I use the funcionallity it provides across
several projects and instead of re-writing the logic again and again, I've decided to mold this into a library, mostly for my
conveniance, but also publish it as an open-source project in order to help anyone else who might
find it useful.

## Installation

![Packagist](https://img.shields.io/packagist/v/domagoj03/object-creator.svg?style=for-the-badge)
![PHP from Packagist](https://img.shields.io/packagist/php-v/domagoj03/object-creator.svg?style=for-the-badge)

``` composer require domagoj03/object-creator```

## Usage

Intended usage is to extend the abstracts of the library and instantiate objects by passing
data to your object's constructor. For example, when you receive data as a result of an API call,
you might get it as an array or as \stdClass. Then instead of accessing that data as
`$data['value']`, you could acess it as `$object->getValue()` thus mitigating possible errors
and additional checks like `isset($data['value'])` before using it.

You can find some inspiration inside `tests/Helpers`

This method proved very handy in situations where I had to handle different data
structure received, for example, from an API calls or Webhooks. It's also useful when
you have to handle multiple external API integrations.

### v1.0

* Define object which represents data in your application
* Make it extend desired library abstract
* Generate getters and setters for your properties (in this case for `number`).
Remember that index of an associative array is property of your class and
value represents the property/key of the data you wish to create object from.

```php
class DemoObject extends ArrayObjectCreator // or StdClassObjectCreator
{
    protected $propertyMapper = [
        'number' => 'SomeNumber',
    ];

    /**
     * @var int
     */
    private $number;

    /**
     * @return int
     */
    public function getNumber(): ?int
    {
        return $this->number;
    }

    /**
     * @param int $number
     * @return DemoObjectFromArray
     */
    public function setNumber(int $number): DemoObjectFromArray
    {
        $this->number = $number;

        return $this;
    }
}
```

* When you need to use that received `$data`, instantiate your object
and pass the `$data` to a constructor.

#### Data as array

```php
// Usually as a result of an API call
$data = [
    'SomeNumber' => 23
];

$object = new DemoObject($data);
$object->getNumber(); // 23
```

#### Data as stdClass

```php
$data = new \stdClass();
$data->number = 23;

$object = new DemoObject($data); // Has to extend StdClassObjectCreator
$object->getNumber(); // 23
```

* This is a fairly simple example but shows what the library does in a nutshell.

### v0.1 [not recommended]

* Has only `ArrayObjectCreator`
* `ArrayObjectCreator` will not set `null` values

## Tests

`vendor/bin/phpunit`

## Contributing

Contributing is always welcome.

If you have suggestions or problems with usage, you can open up an issue.

If you want to help with the issues, fork the repository, make sure you have latest version
of the code and that the current tests pass, create new branch, work on the feature or bug (and add test cases), push the code to your repository and create a PR
to this repository `master` branch mentioning the issue it's resolving.


text:
### [CVE-2008-4081](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4081)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

admin/login.php in Stash 1.0.3 allows remote attackers to bypass authentication and gain administrative access by setting a bsm cookie.

### POC

#### Reference
- http://securityreason.com/securityalert/4258
- https://www.exploit-db.com/exploits/6406

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
Helper shell scripts. These are referred by root `./catalogue` script using functions from `/lib/delegate.sh`.

Nested folders means subcommands e.g. `./catalogue run dev`.

Create text file with `.txt` extension next to your subcommand folder or script and its first line will be included
into the usage help output and the whole file will be printed if you call the subcommand with `--help`.

All scripts are executed in context of the root project folder (i.e. refer to `conf` directory as )

gha_license_id: NOASSERTION


text:
Geeko,

I modified that code to send an array of integers.  You can modify the number of elements and assign whatever values to them.  Don't forget to change the loop bounds if you change the number of array elements.

I commented out vw_set_tx_pin(3) and vw_set_rx_pin(2) because I do not have a Mega.

I use the default Digital pin 12 for transmit, and pin 11 for receive.

I lowered speed too just to make sure it works, you're welcome to experiment and set them higher.

PS: I learned a new command while helping you: word(hi,low) combines two bytes into an integer.  A bit easier to read than bitshifts.

Good luck with your project!

**Code:**

~~~
// TRANSMITTER

#include <VirtualWire.h>  // you must download and install the VirtualWire.h to your hardware/libraries folder

int numbers[3]; // Change 3 to number of integers you wish to send.

void setup()
{
  // Initialise the IO and ISR
  vw_set_ptt_inverted(true); // Required for RF Link module
  vw_setup(1000);                 // Bits per sec
  //vw_set_tx_pin(3);                // pin 3 is used as the transmit data out into the TX Link module, change this to suit your needs.

  // Initialize to some sample values
  numbers[0] = 32767;
  numbers[1] = -2;
  numbers[2] = 0;
}

void loop()
{
  vw_send( (uint8_t *)numbers, sizeof(numbers));
  vw_wait_tx();  // Wait for message to finish
  delay(1000);

  numbers[0]--;  // decrement
  numbers[1]++;  // increment
  numbers[2]++;  // increment
}
~~~

**Code:**

~~~
// RECEIVER

#include <VirtualWire.h>  // you must download and install the VirtualWire.h to your hardware/libraries folder

int numbers[3]; // Change 3 to number of integers you wish to send.

void setup()
{
  Serial.begin(4800);

  // Initialise the IO and ISR
  vw_set_ptt_inverted(true);    // Required for RX Link Module
  vw_setup(1000);                   // Bits per sec
  //vw_set_rx_pin(2);           // We will be receiving on pin 23 (Mega) ie the RX pin from the module connects to this pin.
  vw_rx_start();                      // Start the receiver

  Serial.println("Receiver ready!");
}

void loop()
{
  uint8_t buf[VW_MAX_MESSAGE_LEN];
  uint8_t buflen = VW_MAX_MESSAGE_LEN;

  if (vw_get_message(buf, &buflen)) // check to see if anything has been received
  {
    Serial.print(buflen, DEC);
    Serial.println(" bytes received!");

    for (int i = 0; i < buflen; i++)
    {
      Serial.print("buf[");
      Serial.print(i, DEC);
      Serial.print("]=");
      Serial.print(buf[i], DEC);
      Serial.print("  ");
    }
    Serial.println();

    //memcpy(buf, numbers, buflen);
    for (int i = 0; i < 3; i++)
    {
      numbers[i] = word(buf[i*2+1], buf[i*2]);
      Serial.print("numbers[");
      Serial.print(i, DEC);
      Serial.print("]=");
      Serial.print(numbers[i], DEC);
      Serial.print("  ");
    }
    Serial.println();
  }

  delay(50);
}
~~~

Last Edit: March 19, 2010, 09:35:19 pm by hwiguna

repository: hailspuds/SensorProject---Receiver

repo_name: hailspuds/SensorProject---Receiver


text:
Trial: RPI-Game
========

A game project using Raspberry Pi, along with Gertboard and PiFace chips.

How to use: (Alpha 0.1)

1- Run server, the default port is hard coded for now as 4444.

2- Run Three Clients, passing your name as command line argument.

3- The server will wait for three clients to connect then will start game.

Note: The server will only send message but not start game (not yet implpemented).

Term Project:

A Home Automation System... where a raspberry pi is connected to sensors and leds,
acting as a household lights and motion/temperature sensor.

Term Project: README file
==========

1- Setup hardware connection according to the mapping diagram

2- Run the server.jar with super user on the RPi e.g. "sudo server.jar"

   Options: The user can specify port to host the sever on e.g. "sudo server.jar 1234"

3- Run the client.jar on another device. Must have a display otherwise the gui will not work.

   Client Does not require super user. e.g. "client.jar"

   Options: Can specify IP and port to connect to as command line argument, e.g. "client.jar <IP_ADDRESS> 4444"


text:
---
layout: post
title:  "B2B Appstore"
date:   2013-05-17
desc: "Business to business app store"
keywords: "AppStore, Apple, Google, Microsoft, SAP, Oracle"
categories: [Apps, Inspirations]
tags: [AppStore, Apple, Google, Microsoft,SAP, Oracle]
icon: icon-database
---
Apple, Google, Microsoft, Blackberry and Amazon are leading the race to build app distribution platforms for smart phones and tablets. In recently concluded WWDC Apple announced distribution of $10 Billion to developers since the inception of their AppStore. In other words, app economy is real and the good news is its just getting started. Most of the big players have thus far focused only on direct consumers leaving much wanted in the enterprise space. In essence, most of these commercial app distribution platforms are business to consumers (B2C) platforms.

Enterprises, on the other hand,  are trying to build their own MDM solutions that address enterprise security needs to some extent but lack sophistication and scale of commercial app stores run by smart phone manufacturers. Given that mobility is going to be major enterprise trend, I think there is an open white space to develop a cloud based integrated Business to Business (B2B) app store

A B2B enterprise app store of future needs following functionalities :-

1. Ability to provision (productivity) apps from B2C app distribution platforms run by Apple, Google and Microsoft etc. The idea is if a company purchases say a productivity app, users with in the company should be able to download it form single place.
2. Ability to host in-house apps developed by a company.
3. Ability to host apps provided by enterprise software partners such as SAP, Oracle etc.
4. Ability to authenticate, push and remove apps from corporate devices.
5. Support workflow and approval process enabling users to request for a specific app.
6. Software license management
7. Traffic encryption and VPN support.
8. Enterprise branding
9. Usage Analytics
10. Ability to pay to Apple, Google or Microsoft  etc for the apps consumed from their platforms.
11. Ability to pay to corporate developers based to per use basis, including slab rates and volume discounts.
12. Ability to pay to enterprise software partners as per negotiated licensing agreements.
13. Integration with corporate financial system for Accounts Payables.
14. Integration with corporate LDAP for user authentication.
15. Over the air updates and update notifications.

Given that Apple, Google and Microsoft have huge cloud footprint and have already existing B2C app distribution platforms, its very easy for them to build this B2B platform, however, the challenge is if they will support applications from the competitors. Or allow company specific appstore on their devices? SAP has a major play in enterprise mobility with Sybase Unwired Platform,  Afaria and Cyclo. SAP can also very easily integrate this with back end financial systems given their huge presence in ERP space and they can build a high performance application of cloud scale using their HANA platform.

# Update Jan, 2017

There are number of offerings in MAM and MDM space that partially meet above specs. Leading players are Cirix (XEN Mobile), VMWare (Airwatch), MobileIron, Good Technology, MaaS360 and Apperian.

Most of the enterprise software companies are have built AppStores around their core applications. For example Salesforce wants developers to deploy applications on force.com that integrate with Salesforec; SAP wants apps for there new Hana/SAP Cloud Platforms with 'Cloud Connector' opening the access to on prim ERP systems. Google has a app development program for Google Apps. Mobility is just one piece of this strategy. Primary objective is to lure developers as well as increase the stickiness of their core applications...

repository: ashutoshmjain/homepage

branch_name: refs/heads/gh-pages

gha_language: CSS

repo_name: ashutoshmjain/homepage


text:
# Notes on resistor models

Check the
[documentation](https://skywater-pdk.readthedocs.io/en/latest/rules/device-details.html#resistors)
for official info on the resistors.

Resistance as determined by the test benches included with the models
for each model at l=10:

```
 1 sky130_fd_pr__res_generic_nd        291.20
 2 sky130_fd_pr__res_generic_pd       1962.15
 3 sky130_fd_pr__res_high_po_0p35    11617.76
 4 sky130_fd_pr__res_high_po_0p69     5310.80
 5 sky130_fd_pr__res_high_po_1p41     2556.68
 6 sky130_fd_pr__res_high_po_2p85     1266.97
 7 sky130_fd_pr__res_high_po_5p73      633.72
 8 sky130_fd_pr__res_high_po          3550.44
 9 sky130_fd_pr__res_iso_pw          15425.78
10 sky130_fd_pr__res_xhigh_po_0p35   57696.95
11 sky130_fd_pr__res_xhigh_po_0p69   29384.24
12 sky130_fd_pr__res_xhigh_po_1p41   14418.62
13 sky130_fd_pr__res_xhigh_po_2p85    7151.60
14 sky130_fd_pr__res_xhigh_po_5p73    3570.24
15 sky130_fd_pr__res_xhigh_po__base  20305.67
16 sky130_fd_pr__res_xhigh_po        21146.97
```

## Model names

The `generic_nd` is an N+ diffusion resistor and the `generic_pd` a
P+ diffusion resistor.  The `high_po` is a P+ poly resistor
and the `xhigh_po` is a P- poly resistor.  The `iso_pw` uses the
P-well resistance.
I'm not seeing the same complement of devices in the
[repo](https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_fd_pr)
as are listed in the
[docs](https://skywater-pdk.readthedocs.io/en/latest/rules/device-details.html#resistors),
not sure why.  The docs talk about local interconnect and metal resistors
in addition to the ones I see in the repo.

## Temperature effect

A simulation to determine the effect of temperature on resistance is in
[resistor-tc.spice](resistor-tc.spice).

### Diffusion and P+ poly silicon resistors showing large positive temp coefficient

![Resistors 1, 2, 8](r1r2r8.png)

Resistors `generic_nd` and `generic_pd`, along with the
`high_po` without suffix, show a positive temperature coefficient.

- For some reason, the value for `generic_nd` from the test bench listed above seems wrong,
at least when scaled.  I scaled it 4.125 times shorter to get it in the same ballpark as
the other resistors.  Not sure what happened there.  The sheet resistance in the docs
seems to agree with me, the test bench result is too low.
- The body of the `generic_pd` needs to be connected to a high voltage to prevent parasitic
diodes from conducting.
- The model for the diffusion resistors seems to show a +/- 12% change from -40°C to 120°C.

### P+ poly resistors

![Resistors 3, 4, 5, 6, 7, 8](r3r4r5r6r7r8.png)

Of the `high_po` models, only the one without suffix shows any temperature coefficient.
The other variants are specialized models for specific widths, but without proper
temperature behavior, they may be of limited use.  The fact that the generic model does
show a temperature effect seems to suggest the other models are deficient in this respect
and should be expected to have temperature dependence as well.

I'm not sure why these are called "precision resistors" by the documentation, since the
generic model seems to show a +/- 5% change from -40°C to 120°C.  The P- poly seems
significantly better.

### P- poly resistors

![Resistors 15, 16](r15r16.png)

If you check the models, you'll see that all `xhigh_po` models of specific width are based
on the `xhigh_po__base` model, so I only put that one in the graph, together with the
generic `xhigh_po`.  Same situation: the models for specific widths don't show any
temperature coefficient, making them of limited use.  The generic model does show a
temperature dependence.

The low temperature dependence deserves a detail:

![Resistor 16 detail](r16.png)

The temperature dependent change is only 0.026% (260 ppm) from -40°C to 120°C, that's
excellent.  In a smaller temp range from -40°C to 55°C, it's only 50 ppm!
Of course, keep in mind the process variations, the docs don't seem to mention them
for P- poly, but if it's similar to P+ poly, expect +/- 15% or so.  But if stability
over temperature is what you need, these P- poly resistors seem to be the way to go.

### P-well resistor

![Resistor 9](r9.png)

The `iso_pw` model also does not show temperature dependence.

## Thoughts

- Of the models that seem to implement a temperature dependence, the `xhigh_po` type
seems to be the most stable over a temperature sweep.
- The lack of temperature dependence in some of the models may make it more difficult
to use them since their constuction is intended for high precision.
- Is the lack of temperature dependence of some models a compatibility issue?  I'm
using `ngspice`, were the models made for a commercial variant of spice?  I do
get a bunch of "unrecognized parameter" warnings, two of which are `unrecognized
parameter (tref) - ignored`, but they are for the `generic_nd` and `generic_pd`
models, which do exhibit temperature dependence.


text:
# ReactPortfolio
 [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

   # React_Portfolio

   ## Table of Contents

   [Installation](#Installation)

   [Usage](#Usage)

   [Conbtribution](#Contribution)

   [Testing](#Testing)

  ## Installation
  No Installation required

  ## Usage Information
  This is a page to display my recent projects along with my contact information.

  ## Contribution Information
  No additional contributors

  ## Testing Information
  No Testing Infomation

  ## Technologiess
  React, JSX, CSS

  ![alt text](https://github.com/rjmurphy1922/ReactPortfolio/blob/main/portfolioscreenshot.png?raw=true)

   ## Questions

   Please feel free to reach out with any additional questions through my email or on github.

   https://github.com/rjmurphy1922

<EMAIL_ADDRESS>


text:
---
layout: post
title:  "Madison Dec Code Review & Pairing - Thank you Hardin Design and Development"
description: "Our Madison chapter's sponsor for their 2nd event was Hardin Design and Development. This post recaps what our pairs worked on and the impact Dev Together is already making on mentees."
permalink:  "/blog/dec-thank-you-hardin-design-and-development"
date:   2018-12-15 12:00:00 -0500
categories: event recap
---

Our Madison chapter's sponsor for their 2nd event was [Hardin Design and Development](http://hardindd.com), who makes web, mobile, or IoT projects for organizations in the insurance, real estate, education and healthcare industries. We're very appreciative of HardinDD for providing us the space we needed and food -- thank you!

As people arrived, early arrivers hung out on the comfy couches in the building's main lobby area. Then we started our event, ate delicious pizza from Glass Nickel (courtesy of Hardin DD) and paired up on various topics like Angular, React, class design/structure, sorting algorithms and consuming an API for a real-time messaging system.

We had a little bit of a hitch shortly after the event ended, when a few people couldn't get out of the parking lot. 😅

It's amazing to see how Dev Together is already making an impact on mentees. Here's what a few had to say shortly after this event:

> "It was a big confidence booster/motivator! I learned a lot and community really helps! Both of my mentors have been outstanding! I really appreciate their feedback, insight, and encouragement"! - 2nd Timer Mentee

> "Really enjoyed the pair programming as a 1st time event participant. & SUPER appreciate all your work as organizer and mentor!!"

We can't do it without our awesome Mentors who take the time to help our Mentees out. Thank you, Mentors!

Our next event is on Tuesday, January 8, for another Code Review and Pairing session. [CUNA Mutual Group](https://www.cunamutual.com/) will be hosting us at 5810 Mineral Point Rd here in Madison and will be providing food. We hope you can join us there!

*Follow us on [Twitter](https://twitter.com/DevTogetherMad)*

*Join our [Meetup Group](https://meetup.com/DevTogetherMad)*

repository: mercedesb/dev-together

gha_language: Shell

repo_name: mercedesb/dev-together


text:
# Modularity.AspNetCore

This library allows to import your class libraries with controllers to your main project. So you can easily use plug-in & plug-out your features.

## Releases
[![Nuget](https://img.shields.io/nuget/v/Modularity.AspNetCore?label=Modularity.AspNetCore&logo=nuget)](https://www.nuget.org/packages/Modularity.AspNetCore/)

[![Nuget](https://img.shields.io/nuget/v/Modularity.Core?label=Modularity.Core&logo=nuget)](https://www.nuget.org/packages/Modularity.Core/)

## Badges
[![CodeFactor](https://www.codefactor.io/repository/github/enisn/modularity.aspnetcore/badge)](https://www.codefactor.io/repository/github/enisn/modularity.aspnetcore)
[![Build status](https://ci.appveyor.com/api/projects/status/gvp97y2krx4ea3rm?svg=true)](https://ci.appveyor.com/project/enisn/modularity-aspnetcore)

***

![Modularity AspNetCore_v2](https://user-images.githubusercontent.com/23705418/62229283-062db280-b3c8-11e9-8be0-6cd3ba9c9c91.png)

***
# Getting Started
Firstly you'll need a main project and at least one module project. Let's start with creating them

## Creating Main Project

- Create an **AspNetCore** project as main web project.

- Add [Modularity.AspNetCore](https://www.nuget.org/packages/Modularity.AspNetCore/) package to your project.

- Go your **Startup** and add following codes to MvcBuilder in **ConfigureServices()**:

```csharp
   public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2)
                .AddModularity(); // <-- Add this line after AddMvc method

            services.AddModuleServices(Configuration); // <-- Add this to add module's services into DI Container.
        }
```

- Go **Configure()** method and add following code:

```csharp
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UseModulartiy(env); // <-- Call UseModularity with HostingEnvirorment parameter

            //...

        }
```

- That's it! Your Main Application is ready to load all modules from **Plugins** folder.

- _(OPTIONAL)_ You can manage your modules with config file. Just create following **plugins.json** file under **Plugins** folder:

```json
[
  {
    "Name": "MyFirstPlugin",
    "IsActive": true,
    "LoadAllDependencies" :  true
  },
  {
    "Name": "MySecondPlugin",
    "IsActive": false,
    "LoadAllDependencies" :  true
  }
]
```

If you use configuration file, you need to place your modules their own folders like this:

![image](https://user-images.githubusercontent.com/23705418/62240890-b0193900-b3e0-11e9-8634-b7b9a4aa853c.png)

To automaticly copy after build your modules with folders, change build action like this:
```
xcopy "$(OutDir)*" "$(SolutionDir)MyMainWebApplication\Plugins\$(ProjectName)\" /Y
```
> **MyMainWebApplication**: This is your main host application.

***

## Creating a Module

- Create a .Net Core class library.

- Add [Modularity.AspNetCore.Abstractions](https://www.nuget.org/packages/Modularity.AspNetCore.Abstractions) package to project.

- Add [Modularity.Core.Abstractions](https://www.nuget.org/packages/Modularity.Core.Abstractions) package to project.

- Create a class and inherit from `IModuleStartup`. This class will be used initialization.

```csharp
    public class Startup : IModuleStartup
    {
        public IConfiguration Configuration { get; private set; }
        public void Initialize(IConfiguration configuration)
        {
            this.Configuration = configuration; // Get main application's configuration and keep it to use in ConfigureServices()
        }

        public void ConfigureServices(IServiceCollection services)
        {
            /* Do your services configurations */
        }

        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            /* Do your application configurations  */
        }
    }
```

- _(OPTIONAL)_ You can add following code to Build Events to copy your module DLLs to your main application's `Plugins` folder. If they're in same solution.

```
xcopy "$(OutDir)*" "$(SolutionDir)MyMainWebApplication\Plugins\" /Y
```
**MyMainWebApplication**: Your main web application name.

gha_language: C#


text:
# spockjs

> Structured JS test cases, inspired by
> [Spock Framework](http://spockframework.org)

[![build status](https://img.shields.io/travis/spockjs/spockjs/master.svg?style=flat-square)](https://travis-ci.org/spockjs/spockjs)
[![AppVeyor build status](https://img.shields.io/appveyor/ci/jeysal/spockjs/master.svg?style=flat-square&label=windows+build)](https://ci.appveyor.com/project/jeysal/spockjs)
[![code coverage](https://img.shields.io/codecov/c/github/spockjs/spockjs/master.svg?style=flat-square)](https://codecov.io/gh/spockjs/spockjs)

[![npm package](https://img.shields.io/npm/v/@spockjs/babel-plugin-spock.svg?style=flat-square)](https://www.npmjs.com/package/@spockjs/babel-plugin-spock)
[![license](https://img.shields.io/github/license/spockjs/spockjs.svg?style=flat-square)](https://github.com/spockjs/spockjs/blob/master/LICENSE)

**Note:** This project is in an early stage of development and currently provides
only a small set of features.

## Example test case

```javascript
test('basic arithmetic', () => {
  expect: {
    1 + 2 === 3;
    3 * 3 >= 4 * 4; // falsy
  }
});
```

```
(3 * 3 >= 4 * 4) is not truthy   # test.js:4

  _assert(3 * 3 >= 4 * 4, "(3 * 3 >= 4 * 4) is not truthy")
            |   |    |
            |   |    16
            9   false
```

## Installation

    npm install --save-dev @spockjs/babel-plugin-spock power-assert

This project is a [Babel](https://babeljs.io/) plugin that needs to transform
your test sources in order to generate assertions, so your test runner will need
support for Babel. Babel integrates quite nicely into most modern test runners.
Check the documentation of your test runner for instructions on how to configure
Babel (e.g. for
[Jest](https://facebook.github.io/jest/docs/en/getting-started.html#using-babel),
[AVA](https://github.com/avajs/ava/blob/master/docs/recipes/babel.md) etc.)
or consult Babel's own [documentation](http://babeljs.io/docs/setup/).

Once Babel is set up for your test files, simply add `"@spockjs/babel-plugin-spock"`
to the `plugins` array in your babel configuration and you're good to go.
If you do not already use ES modules via Babel,
you will also need to set up Babel for transforming ES2015 imports (usually via
[@babel/preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env)
) so the assert helpers can be imported automatically.

**Note:** This plugin requires Babel 7. Babel 6 is no longer supported.

### TypeScript

It is possible to use this plugin with TypeScript,
but only if you compile the TypeScript code with Babel (`@babel/preset-typescript`).
The official TypeScript compiler (`tsc`) is not supported.

### Test runners

The plugin should work with all test runners by default
(perhaps with occasional config tweaks to the runners).
You can take a look at [our integration tests](integration-tests)
to see how we configured each runner that is tested.

Nevertheless, we provide additional tweaks and features
to improve the experience with some popular test runners.
If your runner appears in the list below, it is recommended
you `npm install --save-dev` the corresponding package and
add it to the `presets` in the plugin's [config file](#configuration)
for a flawless experience.

#### Jest

**Package**: `@spockjs/preset-runner-jest`

**Currently provides**

- assertion messages that show what went wrong

#### AVA

**Package**: `@spockjs/preset-runner-ava`

**Currently provides**

- internal use of native AVA assertions
  - no need to configure `"failWithoutAssertions": false`
  - assertion errors look just like in regular AVA

**Peculiarities**:

- AVA's `t` must be available in the test cases;
  using a different name for the test case parameter is not currently supported.
  If you do not follow this convention in all your test cases,
  you will have to disable `@spockjs/preset-runner-ava` and
  use the "vanilla" spockjs with its disadvantages.

## Usage

### Assertion blocks

Inside of a block labeled with `expect:` or `then:`, all statements will be
considered assertions and evaluated to check for truth:

```javascript
expect: {
  1 < 2;
}
```

`when`-`then` blocks can be particularly useful and expressive for code with
side effects:

```javascript
// The 'when' label here does not have a special meaning
// It is used simply to make the test more structured
when: {
  abc.setXyz(1);
}

then: {
  abc.getXyz() === 1;
}
```

Single labeled statements are also possible:

```javascript
expect: 'a' + 'b' === 'ab';
```

Note that these blocks can only contain statements that can be evaluated as
expressions. For example, an if statement would not be valid:

```javascript
// BAD
expect: {
  if (x < 1) x === 0.5;
  else x === 2;
}
```

However, you can nest an assertion block into other structures:

```javascript
// GOOD
if (x < 1) expect: x === 0.5;
else expect: x === 2;
```

If you want to perform more complicated checks, it might be helpful to look for
small helper libraries on npm. For example,
[deep-strict-equal](https://github.com/sindresorhus/deep-strict-equal) can help
perform deep equality checks on object structures. In the future, this plugin
might provide special syntax for such use cases.

Of course, you still have the option to use your native assertion library
alongside assertion blocks wherever you consider it appropriate.
Some assertion libraries may provide features on top of what this plugin supports.

### Linters

The test you will write using this plugin often employ syntax that is otherwise
uncommon in JavaScript code. For this reason, if you use a linter such as
[ESLint](https://eslint.org/), you will likely see annoying warnings all over
your tests. To work around this, most linters will give you multiple options:

- Disable the problematic rules with special annotations in your test files.
  This can be a hassle because it needs to be done for every file.
- Completely disable the rules in the configuration. This means that they will
  no longer apply to production code either.
- Create a separate config for tests that extends the base config, but disables
  the rules.

If you're using TypeScript, tsc might also complain about unused labels.
`allowUnusedLabels` can turn those warnings off.

## Configuration

You can configure this plugin using Babel's regular
[plugin configuration mechanism](https://babeljs.io/docs/plugins/#pluginpreset-options).
The following options are available:

**`powerAssert`**

The plugin can seamlessly generate assertions that produce detailed mismatch
messages to help you figure out what exactly about the assertion went wrong.
Turning this feature off could be useful if you're tests appear to run slowly or
you are experiencing other issues with your assertions.

This feature is powered by the awesome project
[power-assert](https://github.com/power-assert-js/power-assert).

type: `boolean`
default: `true`

**`autoImport`**

The plugin transforms your assertion blocks to calls to an assert function.
By default (`true`), this function is automatically imported from `power-assert`.
You can set this option to a string containing the name of a module
that exports an assert function as its default export
to use that module for assertions instead.

You can also set this option to `false` to disable automatic imports.
You will then have to provide a function named `assert` yourself
in your test files wherever you use assertion blocks.

type: `boolean | string`
default: `true` (`'power-assert'`)

**`staticTruthCheck`**

The plugin can try to statically evaluate your assertion expressions at compile-time
and throw an error if they can be inferred to always be truthy or to always be falsy.
Such expressions sometimes indicate a test that does not provide any value.

Here's an example of an assertion expression that can be inferred to always be truthy:

```javascript
const x = 1;
expect: x === 1;
```

type: `boolean`
default: `false`

**`assertFunctionName`**

The plugin will automatically define an assert import or use an existing one.
You can set this option to enforce a specific name for the generated assert calls.

type: `string`
default: empty string (generated identifier)

**`presets`**

Presets are collections of additional features or behavior tweaks for the plugin.
The plugin will import modules with the exact names specified in this array and use them as presets.
See [Test runners](#test-runners) for some presets provided by spockjs itself.

To implement your own preset, take a look at one of the `@spockjs/preset-*` packages.
The exports of a preset module must match the `Hooks` type defined by `@spockjs/config`.

type: `string[]`
default: `[]`

## Escape route

In case you wish to stop using this plugin at some point,
but of course don't want to rewrite all of your tests manually,
there is always an escape hatch available.
We also have an [integration test](test/integration/codemod.test.ts)
to safeguard this possibility.

### Codemod configuration

Create a `config.json`:

```json
{
  "plugins": [
    [
      "@spockjs/babel-plugin-spock",
      {
        "powerAssert": false,
        "autoImport": "assert",
        "assertFunctionName": "assert"
      }
    ]
  ]
}
```

#### Explanation

We turn off `powerAssert` because it generates a lot of unreadable code.
We set `autoImport` to `assert` instead of the default `powerAssert`
to also switch back to the native node `assert` module
as we move away from the plugin.
We set the `assertFunctionName` to `assert`
to avoid auto-generated identifiers in our tests.
Note that you must ensure your tests
do not declare an `assert` identifier themselves
to avoid a potential collision.

### Running the codemod

To transform a test file with Babel and **overwrite it immediately**, execute

```sh
npx --no-install babel --no-babelrc --config-file ./config.json \
your-test-file.js --out-file your-test-file.js
```

`npx --no-install babel` executes your local (package-wide) Babel installation.
If you do not have `@babel/cli` installed locally,
you can also `npm install -g @babel/core @babel/cli` it globally.
The `--no-babelrc` and `--config-file` Babel options ensure that
we only apply exactly the changes from the plugin.

You can also use Babel to apply the changes to an entire folder of tests:
`npx [...] tests --out-dir tests`

repository: spockjs/spockjs

gha_language: TypeScript

repo_name: spockjs/spockjs


text:
### Code Sample
```c
    #include <stdio.h>

    int main()
    {
        int arr[5];
        arr[0] = 5;
        arr[2] = -10;
        arr[3 / 2] = 2; // this is same as arr[1] = 2
        arr[3] = arr[0];

        printf("%d %d %d %d", arr[0], arr[1], arr[2], arr[3]);

        return 0;
    }
```

#### Jump
1. [Arrays](https://github.com/kaweendras/Data-Structures/tree/master/Arrays)
    - [Java](https://github.com/kaweendras/Data-Structures/tree/master/Arrays/Java)
    - [Python](https://github.com/kaweendras/Data-Structures/tree/master/Arrays/Python)
    - [C](https://github.com/kaweendras/Data-Structures/tree/master/Arrays/C)<--
    - [JS](https://github.com/kaweendras/Data-Structures/tree/master/Arrays/JavaScript)
    - [Go](https://github.com/kaweendras/Data-Structures/tree/master/Arrays/Go)
    - [Batch](https://github.com/kaweendras/Data-Structures/tree/master/Arrays/Bat)
    - [PHP](https://github.com/kaweendras/Data-Structures/tree/master/Arrays/PHP)
    - [VB.net](https://github.com/kaweendras/Data-Structures/tree/master/Arrays/VB.net)
    - [Kotlin](https://github.com/kaweendras/Data-Structures/tree/master/Arrays/Kotlin)
2. [Stack](https://github.com/kaweendras/Data-Structures/tree/master/Stack)
    - [Java](https://github.com/kaweendras/Data-Structures/tree/master/Stack/Java)
    - [C++](https://github.com/kaweendras/Data-Structures/tree/master/Stack/C++)
    - [Go](https://github.com/kaweendras/Data-Structures/tree/master/Stack/Go)
3. [Queue](https://github.com/kaweendras/Data-Structures/tree/master/Queue)
    - [Java](https://github.com/kaweendras/Data-Structures/tree/master/Queue/Java)
4. [String](https://github.com/kaweendras/Data-Structures/tree/master/String)
    - [Python](https://github.com/kaweendras/Data-Structures/tree/master/String/Python)

# Arrays in C
An array is collection of items stored at continuous memory locations.

Why do we need arrays?
We can use normal variables (v1, v2, v3, ..) when we have a small number of objects, but if we want to store a large number of instances, it becomes difficult to manage them with normal variables. The idea of an array is to represent many instances in one variable.

repository: kaweendras/Data-Structures

repo_name: kaweendras/Data-Structures


text:
# Dweetio

[Dweet.io](http://dweet.io) describes itself as a “ridiculously simple messaging (and alerts)” system for the Internet of Things, and it really is very simple to use – especially with the library. It wraps the dweet.io API for public Things.

**To add this library to your project, add** `#require "Dweetio.class.nut:1.0.1"` **to the top of your agent code**

## Class Usage

### Constructor: DweetIO(*[baseURL]*)

Call the constructor to instantiate a new Dweet.IO client. It has a single, optional parameter: *baseURL*, the URL to which the data will be sent. The default is `https://dweet.io`.

```squirrel
client <- DweetIO();
```

## Class Methods

### Callbacks

All of the library’s methods except *stream()* have an optional callback function parameter. If a callback function is supplied, the request will be made asynchronously, and the callback will be triggered once the request is fulfilled. The callback function must include a single parameter of its own into which will be passed a table containing three fields: *statuscode*, *headers* and *body*. If a callback is not supplied, the request will be made synchronously and the method will return the same table outlined above.

### dweet(*thing, data[, callback]*)

The *dweet()* method can be used to send a dweet.

```squirrel
// Asynchronous dweet
client.dweet("myThing", {"field1" : 1, "field2" : "test"}, function(response) {
    server.log(response.statuscode + ": " + response.body);
})
```

```squirrel
// Synchronous dweet
local response = client.dweet("myThing", {"field1" : 1, "field2" : "test"});
server.log(response.statuscode + ": " + response.body);
```

### getLatest(*thing[, callback]*)

The *getLatest()* method returns the most recent dweet from the specified *thing*:

```squirrel
client.getLatest("myThing", function(response) {
    if (response.statuscode != 200) {
      server.log("Error getting dweet: " + response.statuscode + " - " + response.body);
      return;
    }

    local data = http.jsondecode(response.body)["with"][0];
});
```

### getHistory(*thing[, callback]*)

The *getHistory()* method will return all of the most recent 24 hours’ dweets to the specified thing (up to a maximum of 500 dweets).

```squirrel
client.getHistory("myThing", function(response) {
    if (response.statuscode != 200) {
      server.log("Error getting dweets: " + response.statuscode + " - " + response.body);
      return;
    }

    local data = http.jsondecode(response.body)["with"];
});
```

### stream(*thing, callback*)

The *stream()* method opens a stream to the Dweet service and will execute the callback whenever new information is available for the specified *thing*. Unlike the library’s other methods, *stream()* method **must** be supplied with a callback and the stream callback is triggered with the *thing*’s data not a response table:

```squirrel
client.stream("myThing", function(thing) {
    // make sure thing is a table
    if (typeof thing == "string") {
        thing = http.jsondecode(thing);
    }

    if ("thing" in thing) {
      device.send("status", thing.content);
    }
});
```

## License

The Dweetio library is licensed under the [MIT License](./LICENSE).

repository: electricimp/Dweetio

gha_language: Squirrel

repo_name: electricimp/Dweetio


text:
Normal Template
===============

Normal templates are simple, yet powerful. They are safe, usable in non XML/HTML contexts and portable to any programming language. Normal templates can be used at client or server side.

This package contains a CommonJS compatible JavaScript implementation. It is part of the [Nitro](http://www.nitrojs.org/) ecosystem of Web Application development tools. For extra convenience, a jQuery plugin is also included.

A Python port is available at: [http://github.com/tkouts/py-normal-template](http://github.com/tkouts/py-normal-template)

* Homepage: [http://www.nitrojs.org/normal-template](http://www.nitrojs.org/normal-template)
* Status updates: [http://twitter.com/nitrojs](http://twitter.com/nitrojs)
* Source & Download: [http://github.com/gmosx/normal-template/](http://github.com/gmosx/normal-template/)
* Discussion group: [http://groups.google.com/group/normal-template](http://groups.google.com/group/normal-template)
* Issue tracking: [http://github.com/gmosx/normal-template/issues](http://github.com/gmosx/normal-template/issues)

Documentation
-------------

For detailed examples of usage please consult the [online documentation](http://www.nitrojs.org/normal-template).

Credits
-------

* George Moschovitis<EMAIL_ADDRESS>
Normal templates are inspired by StringTemplate, JSON-Template and Mustache.

License
-------

Copyright (c) 2010 George Moschovitis, http://www.gmosx.com

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

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

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

repository: chamsdine/normal-template

repo_name: chamsdine/normal-template


text:
# ![LOGO](logo.png) dweet.io **flow**ground Connector

## Description

A generated **flow**ground connector for the dweet.io API (version 2.0).

Generated from: https://api.apis.guru/v2/specs/dweet.io/2.0/swagger.json

Generated at: 2019-05-07T17:40:18+03:00

## API Description

Dweet.io allows users to share data from mobile, tablets, and pcs, and them to other devices and accounts across social media platforms. Dweet.io provides an API to access the different functionality of the Dweet.io service. Users can make REST calls to read and create dweets, lock and unlock things, and perform other calls. The API returns JSON and JSONP.

## Authorization

This API does not require authorization.

## Actions

### Create an alert for a thing. A thing must be locked before an alert can be set.

*Tags:* `alerts`

#### Input Parameters
* `who` - _required_ - A comma separated list of Email addresses to send the alert to.
* `thing` - _required_ - A unique name of a thing. It is recommended that you use a GUID as to avoid name collisions.
* `condition` - _required_ - A condition that returns a string or a true value if a condition is met.
* `key` - _required_ - A valid key for a locked thing. If the thing is not locked, this can be ignored.

### Create a dweet for a thing.

*Tags:* `dweets`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing. It is recommended that you use a GUID as to avoid name collisions.
* `key` - _optional_ - A valid key for a locked thing. If the thing is not locked, this can be ignored.

### Create a dweet for a thing.  This method differs from /dweet/for/{thing} only in that successful dweets result in an HTTP 204 response rather than the typical verbose response.

*Tags:* `dweets`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing. It is recommended that you use a GUID as to avoid name collisions.
* `key` - _optional_ - A valid key for a locked thing. If the thing is not locked, this can be ignored.

### Get the alert attached to a thing.

*Tags:* `alerts`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing.
* `key` - _required_ - A valid key for a locked thing. If the thing is not locked, this can be ignored.

### Read the last 5 cached dweets for a thing.

*Tags:* `dweets`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing.
* `key` - _optional_ - A valid key for a locked thing. If the thing is not locked, this can be ignored.

### Read the latest dweet for a thing.

*Tags:* `dweets`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing.
* `key` - _optional_ - A valid key for a locked thing. If the thing is not locked, this can be ignored.

### Read all the saved alerts for a thing from long term storage.  You can query a maximum of 1 day per request and a granularly of 1 hour.

*Tags:* `storage`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing.
* `key` - _required_ - A valid key for a locked thing. If the thing is not locked, this can be ignored.
* `date` - _required_ - The calendar date (YYYY-MM-DD) from which you'd like to start your query.  The response will be a maximum of one day.
* `hour` - _optional_ - The hour of the day represented in the date parameter in 24-hour (00-23) format.  If this parameter is included, a maximum of 1 hour will be returned starting at this hour.
* `responseType` - _optional_ - Current valid parameters for this are 'csv' and 'json'.  If this parameter is left blank, all responses default to hapi-json dweet-speak.

### Read all the saved dweets for a thing from long term storage.  You can query a maximum of 1 day per request and a granularly of 1 hour.

*Tags:* `storage`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing.
* `key` - _required_ - A valid key for a locked thing. If the thing is not locked, this can be ignored.
* `date` - _required_ - The calendar date (YYYY-MM-DD) from which you'd like to start your query.  The response will be a maximum of one day.
* `hour` - _optional_ - The hour of the day represented in the date parameter in 24-hour (00-23) format.  If this parameter is included, a maximum of 1 hour will be returned starting at this hour.
* `responseType` - _optional_ - Current valid parameters for this are 'csv' and 'json'.  If this parameter is left blank, all responses default to hapi-json dweet-speak.

### Listen for dweets from a thing.

> Sorry, this function uses HTTP chunked responses and cannot be tested here. Try something like:
curl --raw https://dweet.io/listen/for/dweets/from/{thing}

*Tags:* `dweets`

#### Input Parameters
* `thing` - _required_

### Reserve and lock a thing.

*Tags:* `locks`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing.
* `lock` - _required_ - A valid dweet.io lock.
* `key` - _required_ - A valid dweet.io master key.

### Remove an alert for a thing.

*Tags:* `alerts`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing.
* `key` - _required_ - A valid key for a locked thing. If the thing is not locked, this can be ignored.

### Remove a lock from thing.

*Tags:* `locks`

#### Input Parameters
* `lock` - _required_ - A valid dweet.io lock.
* `key` - _required_ - A valid dweet.io master key.

### Unlock a thing.

*Tags:* `locks`

#### Input Parameters
* `thing` - _required_ - A unique name of a thing.
* `key` - _required_ - A valid dweet.io master key.

## License

**flow**ground :- Telekom iPaaS / dweet-io-connector

Copyright © 2019, [Deutsche Telekom AG](https://www.telekom.de)

contact<EMAIL_ADDRESS>
All files of this connector are licensed under the Apache 2.0 License. For details
see the file LICENSE on the toplevel directory.

repository: flowground/dweet-io-connector

repo_name: flowground/dweet-io-connector


text:
# User Stories: Goat Vote

> Format: As a X, I want to Y in order to Z.

* As a goat enthusiast, I want to see some pictures of goats in order to experience joy.
* As a goat enthusiast, I want to provide my opinions on the goats I see, in order to further goat enthusiasm everywhere.
* As a goat enthusiast, I want to see other people's opinions on goats so I can judge them for being wrong.
* As a goat breeder, I want to see which goats people find most beautiful so I can price my goats appropriately.
* As a developer, I want to create a goat-friendly UI in order to appeal to this untapped market.