text:
# Embedded RabbitMQ

**Compatibility**:
[![Unix](https://img.shields.io/badge/platform-unix-brightgreen.svg)]()
[![Linux](https://img.shields.io/badge/platform-linux-brightgreen.svg)]()
[![OS X](https://img.shields.io/badge/platform-os%20x-brightgreen.svg)]()
[![Windows](https://img.shields.io/badge/platform-windows-brightgreen.svg)]()

**Builds**: Linux
[![CircleCI branch](https://img.shields.io/circleci/project/github/AlejandroRivera/embedded-rabbitmq/master.svg)](https://circleci.com/gh/AlejandroRivera/embedded-rabbitmq/tree/master)
OS X
[![Build Status](https://travis-ci.org/AlejandroRivera/embedded-rabbitmq.svg?branch=master)](https://travis-ci.org/AlejandroRivera/embedded-rabbitmq)
Windows
[![Build status](https://ci.appveyor.com/api/projects/status/r46o01l4ora7ppkf/branch/master?svg=true)](https://ci.appveyor.com/project/AlejandroRivera/embedded-rabbitmq)

**Reports**:
[![Coverage Status](https://coveralls.io/repos/github/AlejandroRivera/embedded-rabbitmq/badge.svg)](https://coveralls.io/github/AlejandroRivera/embedded-rabbitmq)
[![Javadocs](http://www.javadoc.io/badge/io.arivera.oss/embedded-rabbitmq.svg?color=blue&label=javadoc)](http://www.javadoc.io/doc/io.arivera.oss/embedded-rabbitmq)

**Dist**:
[![License](https://img.shields.io/github/license/AlejandroRivera/embedded-rabbitmq.svg)](./blob/master/LICENSE)
[![Snapshots](https://img.shields.io/badge/sonatype-SNAPSHOTS-blue.svg)](https://oss.sonatype.org/content/repositories/snapshots/io/arivera/oss/embedded-rabbitmq/)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.arivera.oss/embedded-rabbitmq/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.arivera.oss/embedded-rabbitmq)

**Social**:
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/io-arivera-oss/embedded-rabbitmq)
[![PayPal donation](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=alejandro%2erivera%2elopez%40gmail%2ecom&lc=US&item_name=io%2earivera%2eoss&item_number=embedded%2drabbitmq&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest)
[![Flattr donation](https://img.shields.io/badge/donate-Flattr-yellow.svg)](https://flattr.com/submit/auto?fid=lgx6kv&url=https%3A%2F%2Fgithub.com%2FAlejandroRivera%2Fembedded-rabbitmq)
[![GratiPay donation](https://img.shields.io/gratipay/team/embedded-rabbitmq.svg)](https://gratipay.com/embedded-rabbitmq/)

This library allows for the use of various RabbitMQ versions as if it was an embedded service that can be controlled
from within the JVM.

The way it works is by downloading, from official repositories, the correct artifact for the given version and
operating system, extracting it and starting the RabbitMQ Server with the specified configuration.
The broker can then be administered from within the JVM by using equivalent commands to `rabbitmqctl` or `rabbitmq-plugins`.

## Pre-requisites:

 * This project requires Java 7+
 * RabbitMQ Broker requires Erlang to be installed.

## Quick Start:

### 1. Add a dependency to this project

For Maven:
```xml
  <dependency>
      <groupId>io.arivera.oss</groupId>
      <artifactId>embedded-rabbitmq</artifactId>
      <version>X.Y.Z</version>
  </dependency>
```
For Ivy: ```<dependency org="io.arivera.oss" name="embedded-rabbitmq" rev="X.Y.Z" />```

For Gradle: ``` compile 'io.arivera.oss:embedded-rabbitmq:X.Y.Z' ```

For SBT: ``` libraryDependencies += "io.arivera.oss" % "embedded-rabbitmq" % "X.Y.Z" ```

`X.Y.Z` is the latest released version of this project.
For more info visit [Maven Central repo](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.arivera.oss%22%20AND%20a%3A%22embedded-rabbitmq%22)
or visit the [releases](https://github.com/AlejandroRivera/embedded-rabbitmq/releases) page.

For `SNAPSHOT` releases, add the SonaType repository to your build system:
https://oss.sonatype.org/content/repositories/snapshots/

### 2. Start the RabbitMQ broker

```java
EmbeddedRabbitMqConfig config = new EmbeddedRabbitMqConfig.Builder().build();
EmbeddedRabbitMq rabbitMq = new EmbeddedRabbitMq(config);
rabbitMq.start();
```

When `start()` is invoked, the Embedded-RabbitMQ library will download the latest release from RabbitMQ.com that best matches
your Operating System. The artifact will be decompressed into a temporary folder, and a new OS process will launch the RabbitMQ broker.

Read more about [how to customize](#Customization) your RabbitMQ broker.

### 3. Verify RabbitMQ is working as you'd expect
```java
ConnectionFactory connectionFactory = new ConnectionFactory();
connectionFactory.setHost("localhost");
connectionFactory.setVirtualHost("/");
connectionFactory.setUsername("guest");
connectionFactory.setPassword("guest");

Connection connection = connectionFactory.newConnection();
assertThat(connection.isOpen(), equalTo(true));
Channel channel = connection.createChannel();
assertThat(channel.isOpen(), equalTo(true));

channel.close();
connection.close();
```

### 4. Stop the RabbitMQ broker:
```java
rabbitMq.stop();
```

## Customization

Customization is done through the `EmbeddedRabbitMqConfig` and it's `Builder` class.
All snippets below will refer to this:
```java
EmbeddedRabbitMqConfig.Builder configBuilder = new EmbeddedRabbitMqConfig.Builder();
...
EmbeddedRabbitMqConfig config = configBuilder.build();
EmbeddedRabbitMq rabbitMq = new EmbeddedRabbitMq(config);
rabbitMq.start();
```

### Define a RabbitMQ version to use:
```java
configBuilder.version(PredefinedVersion.LATEST)
```
or
```java
configBuilder.version(PredefinedVersion.V3_6_5)
```

By using the `version()` method, the download URL, executable paths, etc. will be pre-set for Unix/Mac/Windows Operating Systems.
You can change the download source from the official `rabbitmq.com` servers and Github by using the `downloadFrom()` method:

```java
configBuilder.downloadFrom(OfficialArtifactRepository.GITHUB)
```

Similarly, if you wish to download another version and/or use another server by specifying a URL:
```java
String url = "https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_6_6_milestone1/rabbitmq-server-mac-standalone-<IP_ADDRESS>1.tar.xz";
configBuilder.downloadFrom(new URL(url), "rabbitmq_server-<IP_ADDRESS>1")
```

or if you are okay with the existing artifact repositories but you just need a released version not listed in the `PredefinedVersion` enum:
```java
configBuilder.version(new BaseVersion("3.8.1"))
```

### Downloaded files:
By default, EmbeddedRabbitMq will attempt to save downloaded files to `~/.embeddedrabbitmq`.
You can change this by making use of the `downloadTarget()` setter, which accepts both a directory or a file:
```java
configBuilder.downloadTarget(new File("/tmp/rabbitmq.tar.xz"))
...
// configBuilder.downloadTarget(new File("/tmp"))
```
_Warning:_ If a file with the same name already exists, it will be overwritten.

The default behavior of this library is to re-use previously downloaded files. If you don't wish to use that behavior, disable it:
```java
configBuilder.useCachedDownload(false)
```

To ensure a corrupted or partially downloaded file isn't re-used, the default behavior is to delete it when the issue is detected.
This means that a fresh copy is downloaded next time. To disable this behavior do:
```java
configBuilder.deleteDownloadedFileOnErrors(false)
```

### Extraction path:
EmbeddedRabbitMq will decompress the downloaded file to a temporary folder. You can specify your own folder like so:
```java
configBuilder.extractionFolder(new File("/rabbits/"))
```
_Warning:_ The content of this folder will be overwritten every time by the newly extracted files/folders.

## Advanced RabbitMQ management

If you wish to control your RabbitMQ broker further, you can execute any of the commands available to you in the `/bin`
directory, like so:

```java
RabbitMqCommand command = new RabbitMqCommand(config, "command", "arg1", "arg2", ...);
StartedProcess process = command.call();
ProcessResult result = process.getFuture().get();
boolean success = result.getExitValue() == 0;
if (success) {
  doSomething(result.getOutput());
}
```
where:
* `command` is something like `"rabbitmq-ctl"` (no need for `.bat` extension in Windows since it will be automatically appended).
* `args` is a variable-length array list, where each element is a word (eg. `"-n", "nodeName", "list_users"`)

See the JavaDocs for more information on `RabbitMqCommand` and other helper classes like `RabbitMqDiagnostics`, `RabbitMqCtl`,
`RabbitMqPlugins` and `RabbitMqServer` which aim at making it easier to execute common commands.

### Enabling RabbitMQ Plugins:

To enable a plugin like `rabbitmq_management`, you can use the `RabbitMqPlugins` class like so:
```java
    RabbitMqPlugins rabbitMqPlugins = new RabbitMqPlugins(config);
    rabbitMqPlugins.enable("rabbitmq_management");
```
This call will block until the command is completed.

You can verify by executing the `list()` method:
```java
    Map<String, Plugin> plugins = rabbitMqPlugins.list();
    Plugin plugin = plugins.get("rabbitmq_management");
    assertThat(plugin, is(notNullValue()));
    assertThat(plugin.getState(), hasItem(Plugin.State.ENABLED_EXPLICITLY));
    assertThat(plugin.getState(), hasItem(Plugin.State.RUNNING));
```

You can also see which other plugins where enabled implicitly, by calling the `groupedList()`:
```java
    Map<Plugin.State, Set<Plugin>> groupedPlugins = rabbitMqPlugins.groupedList();
    Set<Plugin> plugins = groupedPlugins.get(Plugin.State.ENABLED_IMPLICITLY);
    assertThat(plugins.size(), is(not(equalTo(0))));
```

## FAQ:

## Troubleshooting:

##### Q: RabbitMQ fails to start due to `ERROR: node with name "rabbit" already running on "localhost"`. Why is this and what can I do?

A: This happens when RabbitMQ fails to be stopped correctly in a previous run.
To resolve this issue, manually identify the process and terminate it. To avoid this from happening again, ensure the `stop()`
method is invoked in your code.

##### Q: RabbitMQ fails to start with a message `erl command not found`. What's this about?

A: RabbitMQ requires an installation of Erlang to be present in the system. Please install it first.

##### Q: RabbitMQ fails to start with a message `{"init terminating in do_boot",{undef,[{rabbit_prelaunch,start,[]},{init,start_it,1},{init,start_em,1}]}}`

A: Most likely you don't have an updated version of Erlang installed.

To check the version of Erlang in your system execute:
```
$ erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().'  -noshell
```

RabbitMQ requires:
  * RabbitMQ v3.5.X requires Erlang `R13B03` at a minimum.
  * RabbitMQ v3.6.X requires Erlang `R16B03` at a minimum (or `17` if you're using SSL/TLS).

For example, if your version is `R14B04`, you can run RabbitMQ v3.5.X but not 3.6.X.

Read more here: http://www.rabbitmq.com/which-erlang.html

## Acknowledgements
This project was inspired from other excellent Open Source libraries, particularly [Embedded-MongoDB](https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo)
and [Embedded-Redis](https://github.com/flapdoodle-oss/de.flapdoodle.embed.redis).

Big thanks to the following OSS projects that made this project possible:

 * [Apache Commons Compress](https://commons.apache.org/proper/commons-compress/) (and [Tukaani's XZ](http://tukaani.org/xz/) utils)
    for extraction of compressed files.
 * [Zero Turnaround's Exec framework](https://github.com/zeroturnaround/zt-exec)
    for execution of native OS processes.
 * [SLF4J API](http://www.slf4j.org/)
    as a logging facade.

And of course, the biggest thanks to [Pivotal](https://pivotal.io/) and the [RabbitMQ](http://www.rabbitmq.com/) team for their hard work.

## License

This project is released under [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), which basically means:
> You can do what you like with the software, as long as you include the required notices.
> This permissive license contains a patent license from the contributors of the code.

_Summary courtesy of: <https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)>_

## Say thanks

If you want to say thanks, you can:
 * Star this project
 * Donate:
   * [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=alejandro%2erivera%2elopez%40gmail%2ecom&lc=US&item_name=io%2earivera%2eoss&item_number=embedded%2drabbitmq&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest)
 * Contribute improvements

repository: nschmid/embedded-rabbitmq

repo_name: nschmid/embedded-rabbitmq


text:
# Spacetime

A real-time, space-themed, ccg-genre game.

Try it at [spacetime.tv](http://spacetime.tv)

# Pure Javascript

This is both a great game, and an experiment in pure Javascript.

Spacetime uses ES6, React, BabelJS, and Node.

# Setup

Set up with `npm install`

`npm start` runs the client locally at localhost:8080 (or you can use /webpack_dev_server/ if you prefer)

`./runserver` runs the server locally at localhost:9090

Note: To test locally, open two browser windows pointing at localhost:8080

The initial config and layout is based on http://jmfurlott.com/tutorial-setting-up-a-single-page-react-web-app-with-react-router-and-webpack/

# Misc

Static files in prod are configured by mucking around with links in /www/data

license: MIT

repository: bza/cardkit

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: bza/cardkit


text:
# mongovc
#### (mongo Version Control)
node module for mongodb collection version control support

Source codes are versioned for the team to collaborate easily and safely. Databases needs to be given the same collaboration procedure as business logic has been increasingly dependent on data. A lot of teams dump, restore and merge their versions of databases manually. Which leads to changes not being applied and causes unexpected behaviours.

mongovc aims to version mongodb collections properly so the need to copy-paste dumps can be obsoleted.

### Features
- [x] Dump MongoDB collections as a readable files
- [x] Restore MongoDB collections from files
- [x] Create collection groups to specify which collections should be dump or restored
- [x] Specify filter per collection
- [ ] Support Index Backup
- [ ] Automatically dump collections on `stat` of git
- [ ] Automatically dump collections on before `pull` of git to check for conflicts
- [ ] Automatically restore collections after pull if there are no conflicts
- [ ] Connect with Authentication
- [ ] Deploy to a database
  - [ ] Run scripts before deployment
  - [ ] Run scripts after deployment
  - [ ] Specify deployment profiles

## Install

> npm install mongovc -g

if this is a new project, you should `--init`
> mongovc --init

## How to use
Since automatic dump and restore is not yet supported, you can run the commands yourself for now.

### Help
show everything you can do with mongovc
```
mongovc --help
```

### dump collections
```shell
mongovc --dump
```

### restore collections
```shell
mongovc --restore
```

### specifying collections to dump/restore

```shell
mongovc --restore <group name>
mongovc --dump <group name>
```
you can specify groups in the `mongovc.config.js`

if group is not specified, it will use what is indicated in `collections`

### initialize dev configuration
```shell
mongovc --init-dev
```

## Configuration
> mongovc.config.js
```javascript
{
  "database": "<databaseName>",
  "host": "localhost", //optional, default
  "port": "27017", //optional, default
  "collections": ["Accounts", "Stores"],
  "groups": {
    "all": [],
    "structure": [],
    "generated": []
  }
}
```

## Dev Configuration
> dev.mongovc.config.js

Same format with the main configuration. This file will override the main config's field that are specified.
All fields in this file are optional.
This is `.gitignored` so everyone can specify their own `database` and other configurations without conflicting with others.
[Can be automatically generated](https://github.com/louiealmeda/mongovc/blob/master/README.md#initialize-dev-configuration)

## License

Copyright (c) 2017 Mark Louie Almeda

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

license: ISC

repository: louiealmeda/mongovc

gha_language: JavaScript

repo_name: louiealmeda/mongovc


text:
---
title: DeprecatedAnnotation
layout: analysis-message
owner: istio/wg-user-experience-maintainers
test: n/a
---

This message occurs when an Istio or Kubernetes resource has an Istio annotation that
has been deprecated by the Istio team.

## How to resolve

It is likely the annotation will stop taking affect when the Istio control plane is upgraded.
Before upgrading, remove or replace this annotation with a supported replacement.

Consult the [Istio annotation documentation](/docs/reference/config/annotations/) for a list of Istio annotations.

The Istio release announcements may include advice or suggested replacements for deprecated
Istio annotations.

gha_language: HTML


text:
# Adaptable Bike Lights

Description
===========
An Arduino code that controls a bike light intensity depending on the angle of the bike steering wheel.

License
=======
Licensed by [MIT license](LICENSE)

Contributors
============
* [Sasiru Goonatillake](https://eng-git.canterbury.ac.nz/sgo74)
* [Hassan Alhujhoj](https://github.com/hassan-alhujhoj)
* [Saranya Ramani](https://eng-git.canterbury.ac.nz/sra205)


text:
# Gopher Message Channel (Middleware)

## Introduction
   GopherMC is a high performance, distributed message queue written in Golang,
as it implements queue by natural channel, which can generate excellent power with goroutine.

repository: Hexilee/GopherMC

repo_name: Hexilee/GopherMC


text:
---
layout: page
title: Collaboration Tools for the Sprint
---

**The Global Sprint is a great opportunity to experiment with online collaboration tools and techniques.** These are the tried and true tools we use to work togther at the Global Sprint-- tools that Mozilla staff use in our day-to-day work.

![github stickers](../img/ghstickers.jpg)

###### image by othree

### GitHub
GitHub is an online platform for collaborative work. At the Sprint, participants and project leads use GitHub to share and discuss project plans and materials, assign work, and make changes to code or content. Software projects may use GitHub’s full functionality to accept code changes, while projects that aren’t code-heavy may use GitHub simply to list, discuss and assign tasks. Project work can happen elsewhere-- in word processing or design apps, in code editors, or on regular old paper.

**You don't need to be an expert in GitHub to participate or lead a project at the Sprint. If you’ve written a blog post or posted a comment online, used an online forum, clicked around a website to find information, or used tags to search for content on a site, many of GitHub’s basic collaboration features will be familiar.**

![github convo](../img/ghconvo.png)

###### a conversation in GitHub issues at the 2017 sprint

To prepare for the Sprint, project leads use GitHub to set up a collection of project files (called a repository), create project documentation in the repository, and create “issues” or chunks of work that participants can help with. Our [Project Lead Guide](https://mozilla.github.io/global-sprint/project-lead-guide/) includes GitHub tutorials, tips, and templates. Participants use GitHub learn about projects, see what tasks they might take on, and discuss and share work. See the [Participant Guide](https://mozilla.github.io/global-sprint/participants-guide/) for tutorials and tips.

### Etherpad
Etherpad is a web-based text editor for note-taking and collaboration. One way we use etherpad is during our video calls, to keep track of the schedule, and share notes and comments on project updates. We also use this tool for group brainstorming, or to draft collaborative documents.

Participants add their name and pick a color at top right-- when they type text or comments in the main pad window or the chat window at right, anything they type will be marked with their signature color.

![etherpad image](../img/etherpad.png)

At the Global Sprint, feel free to jump into our shared etherpad conversations and add comments/notes wherever you want, or ask questions of other participants. You can also add a +1 next to someone else's comment to show that you "like" it. You don’t need to sign in to use Etherpad-- just type in your name at right and start commenting!

### Gitter Chat
Gitter Chat is an application for chatting online.  You can join the Global Sprint channel here, signing in with a GitHub account or Twitter ID.  In the run-up to the sprint, you can ask all your site, project, and participant questions here.  Pop in and introduce yourself-- you can use it to chat with others about your plans for the sprint, and get advice from veteran sprinters. During the sprint, we use Gitter Chat for site and project updates, comments, questions, requests for help on issues, and of course to share Sprint-related cat photos!

![gitter chat](../img/gitter.png)

### Vidyo
Finally, we use the video conferencing software Vidyo during the sprint. We have “demo” or demonstration calls scheduled throughout the Sprint-- you can join to hear what other sites and Sprinters are working on. It’s a great way to learn about the full range projects in the Sprint, and connect with Sprinters around the world. [Instructions for using Vidyo are here]( https://public.etherpad-mozilla.org/p/globalsprint-webconferencing)

repository: mozilla/global-sprint

gha_language: CSS

gha_license_id: MIT

repo_name: mozilla/global-sprint


text:
PCBModelHelper
===
PCBModelHelper is tool suite in order to help building [Autodesk Fusion 360](https://www.autodesk.com/products/fusion-360/overview) 3D model of PCB designed by [Autodesk Eagle](https://www.autodesk.com/products/eagle/overview).

Eagle can manage 3D model for each device in component library and provides a function to export Fusion 360 3D model from board design.
This fucntion is useful to proceed collaborative work between electrical design and mechanical design.

And Fusion 360 provides photo realistic 3D CG renderer also. This rendering quority is very high enough to use product catolog.

However, in case reding 3D model exported by Eagle, the result is quite dissappoointing finish as below example.

Since PCB board surface structure is expressed only one decal image, it's texture is flat and matte. We cannot feel metallic luster of pads or  unevenness of circuit pattern from that image.
In addition, there are many artifact patterns on the board surface, I don't know the reason why.

And further more, all components on the board are also matt texture, because 3D model managed in Eagle library is imported as STEP formated data. Even if original 3D model made by Fusion 360 includes specific apearance metadata, such as albedo and/or heigt map, all metadata except color will be dropped when translating to STEP format.

As a result, rendered image looks like a clay work.

PCBModelHelper helps to make a 3D model which can be photo real rendered by Fusion 360. That model has a realistic appearance and original components 3d models that has complete appearance data are placed on the board.

Please compare between detail of following two examples after click to expand images

## Installation
This tool suite include an Eagle ULP scripts and a Fusion 360 Add-on. Eagle ULP script can be run by just specify file path. On the other hand, Fusion 360 Add-on is need to register to Fusion 360 itself.

1. **Clone this git repository**

    ``` shell
    $ git clone https://github.com/opiopan/PCBModelHelper
    ```

2. **Register Add-on program to Fusion 360**

    Enter to Fusion360 Design mode, then execute ```Scripts and Add-ins``` command in ```Add-ins``` panel on ```TOOLS``` tab.

    Move to ```Add-ins``` tab in the ```Script and Add-ins``` Dialog.

    After that, push the plus button beside of ```My Add-ins``` label.

    Folder selecting dialog is shown. Specify ```fusion360-addin``` folder under the root folder of git repository you cloned at step 1.

    New add-in named ```PCBModelHelper``` is added in ```My Add-ins```. Select this new add-in, then confirm that ```Run on Startup``` is checked. After that, Press  ```Run``` button.

## Preparing component model repository
PCBModelHelper imports electric component models in order to place on PCB model. This add-in program requires that all component models are stored in same folder in the same project which PCB board model are stored.

Please place all 3D model refered from your bord design in same folder before start making PCB 3D model according to steps explaind below.

PCBModelHelper finds a component 3D model file corresponding to a eaach device used in your Eagle pcb design by using foot print name in Eagle library.
If names in Fusion repository is deferent from Eagle library, there is two way to inform correct name to PCBModelHelper.

One is editing a place-info file described later. Place-info file is a generated by Eagle ULP script included in PCBModelHelper, that contains location, rotation angle, and footprint name for each deves.

The other one is specifing correspondence between Eagle library footprint name and Fusion 360 model document name as Json dictionary data. If Json file named ```replace.json``` exists in directory ```fusion360-addin/Resources``` under directory that PCBModelHelper is cloned, PCBModelHelper replaces footprint name according to dictionary data.

Following file is a example of Json dictionary for footprint name replacement, dictionary key express footprint name in Eagle library and value exprress model document name of Fusion 360.

```json
{
    "RCL_C0402_HS": "C1005",
    "MOLEX_48037-0001_1": "480370001",
    "RCL_L0402_HS": "L1005",
    "LED1608" : "led1608",
    "RCL_R0402_HS": "R0402",
    "SMT(4.2X3.2)": "SKRPACE010",
    "LQFP32-M": "LQFP32",
    "CC2500-RTY1_CC2500-HS": "CC2500RGPR",
    "CRYSTAL3225-HS": "CRYSTAL3225"
}
```

## How to make a PCB 3D model
Making PCB 3D model using PCBModelHelper is performed as following five steps.

1. Exporting information to generate 3D model from Eagle
2. Creating texture bitmaps for board appearance
3. Generate board body
4. Appling appearance to board body
5. Placing device models on board

Tools provided by PCBModelHelkper is used at step 1, step 4 and step 5.

Step 2 is done by your favorite gerber file imaging tool.<and>
Stope 4 is done by just pure human operation in Fusion 360, but it is not complex.

### 1. Exporting information to generate 3D model from Eagle
Export three kind of data as below from Eagle.

- Fusion 360 model data
- Gerber files
- Place-info file

Since Fusion 360 model and gerber files are generated by starndard function of Eagle, the explanation of detail steps are omitted in this document.

Place-info file is a generated by Eagle ULP script included in PCBModelHelper, that contains location, rotation angle, and footprint name for each deves.

On Eagle board design window, execute ```Run ULP```  command in ```File``` menu

Then, press ```Browse``` button at ```ULP``` dialog box in order to specify ULP script provided by PCBModelHelper.

ULP script to run is named ```export-placeinfo.ulp``` in dithrectory ```eagle-ulp``` under directory that PCBModelHelper is cloned.

When ```export-placeinfo.ulp``` is executed, an dialog to specify file name and directory to save is shown. Specify place and file name that you want to save.

### 2. Creating texture bitmaps for board appearance
In this section, texture bitmaps using for board apearance.

Following three kind of bitmaps are used for both face, top and bottom. That means you must make six bitmaps.

- **Color map of reagion covered solder mask:**

    Created from gerber file of metal laryer and silk screen layer.

- **Height map that express copper thickness:**

    Created from gerber file of metal layer.

    In order to get better finish of rendering image, I recomend to blur this image a little bit.

- **Cutout map that express region where solder mask does not cover:**

    Created from gerber file of solder mask layer.

Any tools which can imaging gerberfile may be suitable to generate these bitmaps.

I use [pcb-tools](https://github.com/curtacircuitos/pcb-tools) for this step.
[This python script](https://github.com/opiopan/rcstick-f/tree/master/images/3dcg/genimage.py) is a example to generate these bitmaps using pcb-tools.

In my case, gerber file of each layer does not include bord profile (board outline) because I merge multiple gerberfiles to panelize. On the other hand, these texture bitmaps must made aligning with board outline.

Therefore, I translate original gerberfiles by [this script](https://github.com/opiopan/rcstick-f/tree/master/images/3dcg/prepare.py) in advance. This script uses [pcb-tools-extension](http://github.com/opiopan/pcb-tools-extension) in order to merge original gerber file and outline layer.

### 3. Generate board body
From this step, you use Fusion 360. At first, create new document and save with new name.
Then, insert a PCB model generated by Eagle at step 1.

Select top face of board, then create a new body using ```Extrude``` command, and change name to ```base```

Once new board body is created, original PCB model is not necessary. Hyde component of PCB model or delete that.

Next, Set base appearance to this body. This appearance is express via appearance. I usualy apply polished alminum appearance.

And so, Appearance for faces that PCB material is exposed is applied.

As PCB material, I use Wax appearance but color is changed to be yellowish.

Copy body ```base``` and paste to same coordinate system. Then change name of new body to ```metal```. This body represents metal pad on the boad.

Offset both of top and bottom face of ```metal``` baody on the inside a little, I think 0.01mm is reasonable.

This operation is important to avoid some artifact in final rendering image.

### 4. Appling appearance to board body
Execute ```Generate PCB Appearances``` command in ```Modify``` panel.

As a result of execution, following dialog box is shown.

Input board width, board height, copper thickness, and sppecify all bitmaps created at step 2.

When you input board width, board height, and copper thickness, you can use ```Measure``` function that specify length by selecting a edge or two points.

If file name of bitmaps are according to following naming convention, you can specify a directory by press ```Select Bunch of Bitmaps``` button, instead of specifing each files.

Bitmap Kind                  | File Name
-----------------------------|------------------
color map for top face       | pcb-top-base.png
height map for top face      | pcb-top-hmap.png
cut map for top face         | pcb-top-mask.png
color map for bottom face    | pcb-bottom-base.png
height map for bottom face   | pcb-bottom-hmap.png
curt map for bottom face     | pcb-bottom-mask.png

Once all information are filled, press ```OK``` button in order to generate appearances.

Then, execute ```Appearances``` command in ```Modify``` panel, and confirm following four appearances are added in your design.

- top-pcb-base
- bottom-pcb-base
- top-pcb-metal
- bottom-pcb-metal

Change body visibility that ```base``` is visible and ```metal``` is hidden, then apply ```top-pcb-base``` appearance to top face and ```bottom-pcb-base``` appearance to bottom face.

```metal``` body's appearance is also arranged.

Change body visibility that ```base``` is hidden and ```metal``` is visible, then apply ```top-pcb-metal``` appearance to top face and ```bottom-pcb-metal``` appearance to bottom face.

### 5. Placing device models on board
Before proceed this last step, confirm that your device model repository is included in current project.

Select a component to insert device models. Of cause root component can be specified.

Then, execute ```Place components on PCB``` command in ```Insert``` panel.

As a result of execution, following dialog box is shown.

Specify place-info file exported at step 1, your device model library folder path in current project, and board thickness. then press ```OK``` button.

Progress dialog is shown, and it may take a couple of minutes.

Finaly, It's complete to make PCB 3D model for rendering.

## Example rendered images

repository: opiopan/PCBModelHelper

repo_name: opiopan/PCBModelHelper


text:
# TeamCity Agent

![teamcity-agent v5](https://img.shields.io/badge/teamcity--agent-v5-brightgreen.svg?style=flat-square) [![](https://images.microbadger.com/badges/image/exira/teamcity-agent.svg)](https://microbadger.com/#/images/exira/teamcity-agent)

TeamCity is a Java-based build management and continuous integration server from JetBrains.

> [https://en.wikipedia.org/wiki/TeamCity](https://en.wikipedia.org/wiki/TeamCity)

# How to use this image

```console
$ docker run --name teamcity-agent -p 9090:9090 -e SERVER_URL=http://example.com -d exira/teamcity-agent:5
```

This will start a Teamcity agent listening on the default port of 9090.
`SERVER_URL` environment variable is <b>required</b>. Otherwize container will exit with exit code 1.
If agent wont be able to connect to teamcity server at `SERVER_URL` within 180 seconds, it will exit with exit code 2.

# Environment Variables

Required:
- `SERVER_URL`

Optional environment variables:
- `AGENT_OWN_ADDRESS`
- `AGENT_OWN_PORT` (if you set this variable, you must rebuild image with this environment variable set)
- `AGENT_NAME`
- `AGENT_DIR` - directory where agent sources live. Default: `/opt/teamcity_agent`
- `AGENT_WORKDIR` Default: `$AGENT_DIR"/work_dir"`
- `AGENT_TEMPDIR` Default: `$AGENT_DIR"/temp_dir"`

Documentation about agent parameters: [official teamcity docs](https://confluence.jetbrains.com/display/TCD9/Build+Agent+Configuration)

# How to extend this image

By default, when running this image, you will get a basic container with only running agent in it and pre-installed git.
If you would like to do additional initialization in container, add one or more *.sh scripts under `/agent-init.d/`. After agent installs, script will source any *.sh scripts found in that directory to do further initialization before starting the service.

For example, you can mount such scripts as `-v /path/script.sh:/agent-init.d/script.sh`.

# Using host's docker engine within agent container

If you want to be able to build, run, compose docker in builds running by agent container, there are good news for you:
this image has a pre-installed docker client.

All you must to do is to mount your host's docker socket via `-v /var/run/docker.sock:/var/run/docker.sock`. And you will be able to use your hosts docker engine!

Using host's docker-compose: `-v /usr/local/bin/docker-compose:/bin/docker-compose`

Using host's docker-machine: `-v /usr/local/bin/docker-machine:/bin/docker-machine`

repository: exira-legacy/docker-teamcity-agent

repo_name: exira-legacy/docker-teamcity-agent


text:
SpreeVideos
===========

Display YouTube video(s) on your product page.

* Thumbnails from YouTube
* Clickable thumbnails to easily switch between videos
* Easily add/remove/edit videos through the spree admin
* No markup will be added to your products if a video is not attached
* Polymorphic `watchable` association on `Spree::Video` model – enables you to attach videos to any model in your app
* Versions available for Spree >= 3.1

## Installation

1. Add this extension to your Gemfile with this line:
  ```ruby
  gem 'spree_videos', github: 'spree-contrib/spree_videos'
  ```

2. Install the gem using Bundler:
  ```ruby
  bundle install
  ```

3. Copy & run migrations
  ```ruby
  bundle exec rails g spree_videos:install
  ```

4. Restart your server

  If your server was running, restart it so that it can find the assets properly.

## Testing

First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using `rake test_app`.

```shell
bundle install
bundle exec rake test_app
bundle exec rspec spec
```

When testing your applications integration with this extension you may use it's factories.
Simply add this require statement to your spec_helper:

```ruby
require 'spree_videos/factories'
```

## Contributing

If you'd like to contribute, please take a look at the
[instructions](CONTRIBUTING.md) for installing dependencies and crafting a good
pull request.

## Contributors
* Mark Linn, @markalinn
* Michael Bianco, @iloveitaly
* Aleksey, @alekseydem
* Simple, @liangjingyang


text:
JsonPath
========
[![Build Status](https://travis-ci.org/Galbar/JsonPath-PHP.svg)](https://travis-ci.org/Galbar/JsonPath-PHP)
[![Coverage Status](https://coveralls.io/repos/Galbar/JsonPath-PHP/badge.svg?branch=master&service=github)](https://coveralls.io/github/Galbar/JsonPath-PHP?branch=master)
[![Latest Stable Version](https://poser.pugx.org/galbar/jsonpath/v/stable)](https://packagist.org/packages/galbar/jsonpath)
[![License](https://poser.pugx.org/galbar/jsonpath/license)](https://packagist.org/packages/galbar/jsonpath)

This is a [JSONPath](http://goessner.net/articles/JsonPath/) implementation for PHP.

This implementation features all elements in the specification except the `()` operator (in the spcecification there is the `$..a[(@.length-1)]`, but this can be achieved with `$..a[-1]` and the latter is simpler).

In case of no matches for the query it will return an empty array.

Features
========
This implementation has the following features:
* Regex match key (p.e. `$.*[?(/^bo{2}k$/)]` or `$[?(/a\wthors/)]`).
* Regex match value comparisons (p.e<EMAIL_ADDRESS>=~ /.*Tolkien/)]`)
* For the child operator `[]` there is no need to surround child names with quotes (p.e. `$[store][book, bicycle]`) except if the name of the field is a non-valid javascript variable name.
* `.length` can be used to get the length of a string, get the length of an array and to check if a node has children.
* The `in` operator allows filtering for a value in a specified list<EMAIL_ADDRESS>in ["Nigel Rees", "Evelyn Waugh", $.store.book[3].author])]`
* Object oriented implementation.
* __Get__, __set__ and __add__ operations.
* Magic methods implemented:
    * `__get`: `$obj->{'$...'}`.
    * `__set`: `$obj->{'$...'} = $val`.
    * `__toString`: `echo $obj` prints the json representation of the JsonObject.
* Not using `eval()`.

Installation
=====

To install JsonPath you will need to be using Composer in your project. To install it please see the [docs](https://getcomposer.org/download/).

```bash
composer require galbar/jsonpath
```

Usage
=====
In every file you use it add:
```php
use JsonPath\JsonObject;
```

Now you can create an instance of JsonObject and use it:
```php
// $json can be a string containing json, a PHP array, a PHP object or null.
// If $json is null (or not present) the JsonObject will be empty.
$jsonObject = new JsonObject();
// or
$jsonObject = new JsonObject($json);

// get
$obj->get($jsonPath);
$obj->{'$.json.path'};

// set
$obj->set($jsonPath, $value);
$obj->{'$.json.path'} = $value;

// get the json representation
$obj->getJson();
$str = (string)$obj;
echo $obj;

// get the PHP array representation
$obj->getValue();

// add values
$obj->add($jsonPath, $value[, $field]);

// remove values
$obj->remove($jsonPath, $field);
```

SmartGet
--------

When creating a new instance of JsonObject, you can pass a second parameter to the constructor.
This sets the behaviour of the instance to use SmartGet.

What SmartGet does is to determine if the given JsonPath branches at some point, if it does it behaves as usual;
otherwise, it will directly return the value pointed by the given path (not the
array containing it) or `false` if not found.

GetJsonObjects
--------------

Sometimes you need to access multiple values of a subobject that has a long prefix (p.e. `$.a.very.long.prefix.for.[*].object`), in this case you would first get said object
and make a JsonObject of it and then access its properties.

Now if you want to edit the object (set or add values) and want these changes to affect the original object, the way of doing this is by using
`JsonObject::getJsonObjects($jsonpath)`. This method works the same way get does, but it will return the results as JsonObject instances containing a reference to the value in the source JsonObject.

JsonPath Language
=================
This library implements the following specification:
```
var_name¹   = /^\.([\p{L}\p{N}\_\$][\p{L}\p{N}\_\-\$]*|\*)(.*)/u
number      = ([0-9]+(\.[0-9]*) | ([0-9]*\.[0-9]+))
string      = ('\''.*?'\'' | '"'.*?'"')
boolean     = ('true' | 'false')
regpattern  = '/'.*?'/i?x?'
null        = 'null'
index       = -?[0-9]+

jsonpath    = '$' operator*
childpath   = '@' operator*

operator    = (childname | childfilter | recursive) operator*

childname   = '.' (var_name | '*')
childfilter = '[' ('*' | namelist | indexlist | arrayslice | filterexpr) ']'
recursive   = '..' (var_name | childfilter | '*')

namelist    = var_name (',' (var_name | '\'' .*? '\'' | '"' .*? '"'))*
indexlist   = index (',' index)*
arrayslice  = index? ':' index? ':' index?
filterexpr  = '?(' ors ' | regpattern)'

ors         = ands (' ' ( 'or' | '\|\|' ) ' ' ands)*
ands        = expr (' ' ( 'and' | '&&' ) ' ' expr)*
expr        = ( 'not ' | '! ' )? (value | comp | in_array)
comp        = value ('==' | '!=' | '<' | '>' | '<=' | '>=' | '=~') value
value       = (jsonpath | childpath | number | string | boolean | regpattern | null | length)
length      = (jsonpath | childpath) '.length'
in_array    = value 'in' '[' value (',' value)* ']'
```

¹`var_name`: the regex roughly translates to "any valid JavaScript variable
name", plus some quirks such as names starting with numbers or containing
dashes (`-`).

### Limitations on the specification:
* The jsonpath inside _value_ cannot contain `or`, `and` or any comparator.
* Jsonpaths in _value_ return the first element of the set or `false` if no result.
* Boolean operations can't be grouped with parethesis.
* `and`s are run before `or`s. That means that `a and 1 = b or c != d` is the same
as `(a and 1) or (c != d)`

__The `.length` operator__ can be used to:
* Get the number of childs a node in the JsonObject has<EMAIL_ADDRESS>> 3)]`
* Filter for nodes that have childs: `$..*[?(@.length)]`
* Or filter for nodes that don't have childs (leaves): `$..*[?(not @.length)]`
* Check the length of a string<EMAIL_ADDRESS>> 10)]`
* Get the length of a string: `$.path.to.field.length`
* Get the length of an array: `$.path.to.array.length`
* Get the length of each array inside an array of arrays: `$.path.to.array[*].array[*].length`
* Get the length of each string inside an array of strings: `$.path.to.array[*].array[*].key.length`

__The comparators__:
`==`, `!=`, `<`, `>`, `<=`, `>=` do what expected (compare by type and value).
`=~` is a regex comparator, matches the left operand with the pattern in the right operand. The value on the left must be a _string_ and on
the right _regpattern_. Other wise returns `false`.

JsonPath Example
================
Consider the following json:
```json
{ "store": {
    "book": [
      { "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95,
        "available": true
      },
      { "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99,
        "available": false
      },
      { "category": "fiction",
        "author": "Herman Melville",
        "title": "Moby Dick",
        "isbn": "0-553-21311-3",
        "price": 8.99,
        "available": true
      },
      { "category": "fiction",
        "author": "J. R. R. Tolkien",
        "title": "The Lord of the Rings",
        "isbn": "0-395-19395-8",
        "price": 22.99,
        "available": false
      }
    ],
    "bicycle": {
      "color": "red",
      "price": 19.95,
      "available": true
    }
  },
  "authors": [
    "Nigel Rees",
    "Evelyn Waugh",
    "Herman Melville",
    "J. R. R. Tolkien"
  ]
}
```

JsonPath | Result
---------|--------
`$.store.bicycle.price` | The price of the bicycle.
`$.store.book[*]` | All books.
`$.store.book[1,3]` | The second and fourth book.
`$.store.book[1:3]` | From the second book to the third.
`$.store.book[:3]` | From the first book to the third.
`$.store.book[x:y:z]` | Books from x to y with a step of z.
<EMAIL_ADDRESS>== 'fiction')]` | All books with category == 'fiction'.
<EMAIL_ADDRESS>== true)].price` | All prices of available products.
<EMAIL_ADDRESS>< 10)].title` | The title of all books with price lower than 10.
`$..book[?(@.author==$.authors[3])]` | All books by "J. R. R. Tolkien"
`$[store]` | The store.
`$['store']` | The store.
`$..book[*][title, 'category', "author"]` | title, category and author of all books.
<EMAIL_ADDRESS>in [$.authors[0], $.authors[2]])]` | All books by "Nigel Rees" or "Herman Melville".
<EMAIL_ADDRESS>== 'fiction' and @.price < 10 or @.color == "red")].price` | Books of fiction with a price lower than 10 or something with of color red. (`and` takes precedence to `or`)

See more examples in the `./tests/Galbar/JsonPath` folder.

Test
====
To run tests, from the project root folder:
`php app/test.php <jsonpath> [<file to json file>]`

If no json file is given it defaults to the json object described previously in this file.

For example:
`php app/test.php<EMAIL_ADDRESS>== 'fiction' and @.price < 10 or @.color == \"red\")].price"`
Result should be:
`[19.95,8.99]`

Ready to code
=============
you can open the project in your browser and can start coding
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/Galbar/JsonPath-PHP)

Docs
====
To generate the docs, from the project root folder:
`php vendor/bin/sami.php update app/docgen.php`

repository: Galbar/JsonPath-PHP

gha_language: PHP

repo_name: Galbar/JsonPath-PHP


text:
# koa-blog-system
This is a blog system which use koa.js, mysql, js, html, css, angular6 to code it.

# the system directories
```
.
├── app // be source code
│   ├── controllers
│   ├── models
│   ├── routes
│   │   ├── api
│   │   ├── page
│   │   └── web
│   └── services
├── bin
├── config  // project config
├── front-end  // fe source code
│   ├── blog-admin // blog admin manager system
│   └── blog-index // blog index
├── logs
├── middleware  // koa middleware
├── public  // fe code build in there.
│   ├── blog-admin
│   ├── blog-index  // use ng6 ssr.
│   │   ├── browser
│   │   └── server
│   ├── error // error page style
│   │   └── css
│   ├── images
│   └── images-bg
├── test
├── uploads
├── utils
└── views  // error page.
    └── error
```

# how to use
before you use, you should copy database.config.example.js,server.config.exmaple.js in config dir.
```sh
$ cd confg
$ copy database.config.example.js database.config.js
$ copy server.config.example.js server.config.js
```
And then, according to your actual situation, you can modify these 2 config file.
- PS.
- [Fishelly Idx. (https://www.fishelly.top)](https://www.fishelly.top)

# The last.
 If you have any question, you can submit issuse for me.

# License

[MIT](LICENSE)

repository: FiShelly/koa-blog-system

repo_name: FiShelly/koa-blog-system


text:
---
title: Form Submission in Ruby On Rails
date: "2019-10-22T22:12:03.284Z"
description: "How to setup and submit a registration form in Ruby On Rails"
---

Forms are a vital part of the web. They allow us to communicate with each other in a very easy and effective way. Today we will learn how to set up a user registration form on a Ruby On Rails application.

![registration form](./img1.png)

Figure 1: A Basic Registration Form.

### What You Will Need
Before starting make sure you have a scaffolded Rails application. I will use the Article scaffold for this post. Also we will need a User model and Users controller which we will go over on how to create. So let's get started!

### Setup
First let's create our migration. We will need to create the user table using a migration by running: ```rails generate migration AddUsersTable``` then adding the following snippet to the migration file located at ```db/migrate```.
```
    create_table :users do |t|
        t.string :username,    null: false, default: ""
        t.string :email,       null: false, default: ""
        t.string :password,    null: false, default: ""
        t.string :fullName
        t.text :bio
        t.string :password_reset_token
        t.datetime :password_reset_sent_at
        t.timestamps
    end
```
Let's go over the migration: it creates a users table with the listed attributes in the database. To complete the migration run: ```rails db:migrate RAILS_ENV=development``` in the terminal.

We will need one model: User. Run: ```rails generate model User``` to generate the User model then add the following code to the generated file:
```
# app/models/user.rb
class User < ApplicationRecord
    validates_presence_of :username, :fullName, :bio
    validates_uniqueness_of :username
    validates_uniqueness_of :email
    validates :email, format: { with: URI::MailTo::EMAIL_REGEXP }, presence: true
    validates :password, presence: true
    validates :password, confirmation: { case_sensitive: true }
end
```
The User model contains validations for the attributes of the user table. These will ensure that ActiveRecord will make sure the validations pass before entering new records into the database as this will prevent incorrect information from entering the database.

Let us create the user controller by running: ```rails generate controller UsersController```. Navigate to the ```app/controllers/users_controller.rb``` file and add the following code:
```
class UsersController < ApplicationController
    def new
        @user = User.new
        render "new"
    end

    def create
        user = User.new(params[:user])
        if user.save!
            flash[:notice] = "User created successfully"
            redirect_to root_url
        else
            flash[:notice] = "User registration failed"
            render "new"
        end
    end
end
```
The new action renders the ```new.html.erb```, the file containing the registration form. The create action processes the submission and handles redirection. If the creation of a new user fails the registration form is re-rendered with a flash notice, which is basically a message to be displayed on screen, notifying the user of the unexpected failure. The ! at the end of ```user.save``` is a verbose flag that logs errors to the terminal. This makes debugging easier through the increase in transparency behind the scenes.

On to the views! Navigate to the ```app/views/users``` folder and create a file: ```new.html.erb```. Add the following code to it:
```
<%= form_with(url: users_path, model: @user) do |form| %>
    <% if @user.errors.any? %>
        <div class="user_errors">
            <% @user.errors.full_messages.each do |error| %>
                <p><%= error %></p>
            <% end %>
        </div>
    <% end %>
<%= form.label :username, "Username: " %>
<%= form.text_field :username %>

<%= form.label :email, "Email: " %>
<%= form.text_field :email %>

<%= form.label :password, "Password: " %>
<%= form.password_field :password %>

<%= form.label :password_confirmation, "Confirm Password: " %>
<%= form.password_field :password_confirmation %>

<%= form.label :fullName, "Full Name: " %>
<%= form.text_field :fullName %>

<%= form.label :bio, "Bio: " %>
<%= form.text_field :bio %>

<%= form.submit "Submit" %>

<% end %>
```
This form is set up to send a user object as a submission parameter through the ```model: @user``` option in the ```form_with``` helper tag. Once the user clicks the submit button a user object containing all the necessary fields are sent to the create action. This was specified through ```users_path```, which is a named route. The conditional if statement near the top is for rendering errors caught by ActiveRecord validations defined in the User model. For example: if the end-user submits with an empty email field ActiveRecord will insert an error message into the<EMAIL_ADDRESS>array which is then rendered on screen through the for loop.

If you are wondering how the two password fields are validated it is done through the ```validates :password, confirmation: { case_sensitive: true }``` line in the User model. This line takes the two password fields and ensures that they are equal through string comparison. Note: for this validation to work it is imperative that the two password fields be called ```password``` and ```password_confirmation```, as anything other than this will throw an error.

### Testing
Now with everything setup up we have to define some routes in the ```config/routes``` file. Add the following to it:
```
Rails.application.routes.draw do
    root 'articles#index'
    resources :users
end
```
The ```root``` keyword sets the application homepage to be rendered by the index action of Articles controller and the ```resources``` keyword creates the CRUD operation routes for the Users controller.

Start up the server through the command: ```rails server``` and navigate to the path ```/users/new```. You should see a registration form. Try submitting it with empty fields to verify that the errors are rendered on screen. Then try a success use case and the browser should redirect to the root url.

### Closing Notes
If everything went well, congrats! You have set up your own registration form. But currently it is storing the password as a plain text string. This is very dangerous as the password is publicly exposed to anyone with access to the database file. To prevent this we must use password hashing, a method of encryption. Accordingly, that will be what the next post will be on so stay tuned!

Well that's all for today, I hope you found this review helpful. I would greatly appreciate if you could check out my [Youtube channel](https://www.youtube.com/channel/UCtxed_NljgtAXrQMMdLvhrQ?), follow me on [Twitter](https://twitter.com/Shehan_Atuk), [LinkedIn](https://www.linkedin.com/in/shehan-a-780622126/), [Github](https://github.com/ShehanAT) and [Instagram](https://www.instagram.com/shehanthewebdev/).

repository: ShehanAT/personal-blog

repo_name: ShehanAT/personal-blog


text:
# README
This extension adheres to [Magenest](https://store.magenest.com/).

## Installation

Via Composer: run the following commands from root Magento 2 directory:
* composer require magenest/module-ultimate-follow-up-email
* php bin/magento setup:upgrade
* php bin/magento setup:di:compile
* php bin/magento setup:static-content:deploy

### User guide
- For detailed user guide of this extension, please visit: http://confluence.izysync.com/display/DOC/2.+Ultimate+Follow+Up+Email+And+SMS+User+Guides
- All the updates of this module are included in CHANGELOG.md file.


text:
# Protein Secondary Structure Prediction with Deep Learning

This is a deep learning architecture to predict secondary structure in
proteins. The dataset, originally from the Protein Data Bank (PDB), contains
amino acid sequence and structure information for roughly 6100 proteins.

Currently, we use a Bidirectional LSTM RNN architecture to solve the Q8
classification problem; for each amino acid in the protein sequences, we
assign one of eight different labels:

* alpha helix
* beta strand
* loop or irregular
* beta turn
* bend
* 310-helix
* beta bridge
* pi helix

The neural network architecture yields a roughly 56% Q8 accuracy in testing.
(Note: these scripts are not optimized for running on GPUs.)

## Python Requirements

The required Python modules are in requirements.txt. You can install them with
```
pip install -r requirements.txt
```

## Running the Scripts

To run the current version of the algorithm, you can run the following command:
```
python src/driver.py data/cullpdb+profile_6133.npy
```
where the last argument is the location of the dataset. We use the publicly
available dataset from Zhou, J. & Troyanskaya O. 2014. Currently, this data
is accessible here: <http://www.princeton.edu/~jzthree/datasets/ICML2014/>

Add the [-c] flag to see the 8x8 confusion matrix of the labels on the validation
data after each epoch of training. For more information about using the driver
script, run the driver with the help flag:
```
python src/driver.py -h
```

repository: asjchen/secondary-folding

repo_name: asjchen/secondary-folding


text:
---
title: Initial setup
identification: setup
layout: default
---

The client library is available as a nuget package. The client library (and associated nuget package) is updated regularly as new functionality is added.

To install the nuget package, follow these steps in Visual Studio:

1. Select _TOOLS -> nuget Package Manager -> Manage nuget Packages Solution..._
2. Search for "_digipost-api-client_"
* If you would like pre-releases og this package, make sure it says _Include Prerelease_ in the drop-down menu above the search results (where it by default says _Stable Only_).
3. Select _digipost-api-client_ and click _Install_.

Install business certificate in certificate store

SSL Certificates are small data files that digitally bind a cryptographic key to an organization's details. When installed on a web server, it activates the padlock and the https protocol (over port 443) and allows secure connections from a web server to a browser.

To communicate over HTTPS you need to sign your request with a business certificate. The following steps will install the certificate in the your certificate store. This should be done on the server where your application will run.

1.  Double-click on the actual certificate file (CertificateName.p12)
2.  Save the sertificate in _Current User_ and click _Next_
3.  USe the suggested filename. Click _Next_
4.  Enter password for private key and select _Mark this key as exportable ..._ Click _Next_
5.  Select _Automatically select the certificate store based on the type of certificate_
6.  Click _Next_ and _Finish_
7.  Accept the certificate if prompted.
8.  When prompted that the import was successful, click _Ok_.

Use business certificate thumbprint

1. Start mmc.exe (Click windowsbutton and type mmc.exe)
2. Choose File -> Add/Remove Snap-in…(Ctrl + M)
3. Mark certificate and click Add >
4. Choose 'My user account' followed by Finish, then 'OK'.
5. Double-click on 'Certificates'
6. Double-click on the installed certificate
7. Go to the 'Details' tab
8. Scroll down to 'Thumbprint'
9. Copy the thumbprint.

repository: digipost/digipost-api-client-dotnet

gha_language: C#

repo_name: digipost/digipost-api-client-dotnet


text:
---
layout: post
title: First three science papers in A&A
---

The first three papers about science with BRITE-Constellation data have been accepted by Astronomy & Astrophysics (A&A) and will be published in the same volume.

The publications are:

- Weiss et al. (2016): [The ro-Ap star alpha Circini as seen by BRITE-Constellation (Link to astro-ph)](https://arxiv.org/abs/1601.04833)
- Baade et al. (2016): [Short term variability and mass loss in Be stars. I. BRITE satellite photometry of eta and mu Centauri (Link to astro-ph)](https://arxiv.org/abs/1602.01744)
- Pigulski et al. (2016): [Massive pulsating stars observed by BRITE-Constellation. I. The triple system beta Centauri (Agena) (Link to astro-ph)](https://arxiv.org/abs/1602.02806)


text:
# This sample is for preview purpose only and not supported for prodcution scenarios.

# Manage V2 Apps for consumption in B2C

## Features

This sample demonstrates the following:

* **Create1** a V2 App (which can be used in B2C) using Microsoft Graph Apis
* **Create2** a V2 App (which can be used in B2C) using Microsoft Graph and AADGraph Apis.
* **List** all v2 apps in the tenant using MSGraph Beta apis

## Getting Started

### Quickstart

#### Create global administrator

* An global administrator account is required to run admin-level operations and to consent to application permissions.  (for example<EMAIL_ADDRESS>
#### Register the delegated permissions application

1. Sign in to the [Application Registration Portal](https://apps.dev.microsoft.com/) using your Microsoft account.
1. Select **Add an app**, and enter a friendly name for the application (such as **Console App for Microsoft Graph (Delegated perms)**). Click **Create**.
1. On the application registration page, select **Add Platform**. Select the **Native App** tile and save your change. The **delegated permissions** operations in this sample use permissions that are specified in the AuthenticationHelper.cs file. This is why you don't need to assign any permissions to the app on this page.
1. Open the solution and then the Constants.cs file in Visual Studio.
1. Make the **Application Id** value for this app the value of the **ClientIdForUserAuthn** string.
1. Update **Tenant** with the name of your tenant.  (for example: myb2ctenantname.onmicrosoft.com)

#### Build and run the sample

1. Open the sample solution in Visual Studio.
1. Build the sample.
1. Using cmd or PowerShell, navigate to <Path to sample code>/bin/Debug. Run the executable **B2CAppGraph.exe**.
1. Sign in as a global administrator.  (for example<EMAIL_ADDRESS>1. The output will show the results of calling the Graph API .


text:
---
layout: post
title: "Finally, the move is over!"
description: ""
date: 2009-04-28 12:00:00 UTC
category:
tags: []
comments: true
---
{% include JB/setup %}

Finally! After a few days my new blog is alive.

I've been using Mephisto for a long time but I felt it was time to change. Mephisto is writen in Ruby On Rails and while I really like Rails I really needed an Blog engine writen in ASP.NET. There were many excelent options like:

Subtext

dasBlog

BlogEngine.Net

All of the above are great blog engines. They are used by most of the community. So which one did I chose? None!

I decided to create my own blog engine. I know, I know...  Why?? Am I crazy? Do I want to take over the blog market? Nope!!! All I really wanted was a pet project that I could really use while allowing me to keep trying new stuff. A blog engine is something simple enough that I don't need to worry about the business rules. It's been done over and over and we use it everyday. It is also small enough that if I ever decide to throw all my code in the trash and start over with a different approach I easily could.

For this adventure I created a project at Codeplex: SpeakOutBlog. From now on SpeakOut is my sandbox, the place I'm going to try ideas and technologies that interest me. The good thing is that at the same time I'll have do something that works, otherwise my blog will go offline. I don't want to let my fans (my wife, dad and mom) down.

On my next post I'll talk about the difficulties I had with URL Rewriting on my shared hosting. I hope that this project keeps giving me material for the blog.

Oh, before I forget... I really want to thanks the guys that develop Subtext, dasBlog and BlogEngine.Net. Their code is really fun to play with and gave me many ideas to use in SpeakOut. I hope someday someone could look at my code and learn something interesting as I have learned from these guys code.


text:
# Kindeskind
Kindeskind is a CROSS GENERATION MESSENGER that aims for connecting generations by enabling elderly people to communicate with their younger relatives using a voice interface. [Telegram](https://telegram.org/) messages can easily be send and received by means of an *Amazon Alexa* Skill (on an *Amazon Echo* or an *Alexa-enabled device*). Smart *Philips Hue* lights are used as optical signal for newly received ones.

## Contents
- [Alexa Skill](./alexa)
- [NodeJS Webservices](./webservices)
- [OpenHAB](./openhab)

## Authors
- Christof Kost
- Marco Maisel
- Steffen Mauser


text:
# The Orbital Widget Toolkit

*by Florian Blasius and Ralf Zerres, with contributions from the Rust Community*

This version of the text assumes you’re using OrbTK v0.3.1 or later in
conjuction with Rust 1.41.0 or later with `edition="2018"` in *Cargo.toml*
of all projects to use Rust 2018 Edition idioms.

See the [“Installation” section of Chapter 1][install]<!-- ignore -->
to install or update OrbTK.

The 2020 Edition of this book is the initial release. It will be released with
the OrbTK version 0.3.1.

- Appendix A, “Keywords,” explains the new raw identifiers.
- Appendix D is work in progress and will release instances of this book
  once they are translated to other languages.

The HTML format is available
<!---
online at [https://doc.orbtk.org/stable/book/](https://doc.orbtk.org/stable/book/) and
-->
offline with installations of OrbTK made with `cargo docs --book` to open.

<!---
This text is available in [paperback and ebook format from No Starch Press][nsprust].
-->

[install]: ch01-01-installation.html
[nsprust]: https://nostarch.com/orbtk

branch_name: refs/heads/main


text:
nexus 3.0.0-7M
==============

docker image

https://support.sonatype.com/hc/en-us/articles/215781148-Nexus-Repository-Manager-3-0-Milestone-7-Release-

Usage example:

```
docker run -d -p 8081:8081 --name nexus3 ollin/nexus3
```

- wait for a few seconds and open the browser at http://localhost:8081/
- Don't use it in a production environment! It is a technical preview!

- If you want to use the docker registry feature you need to open the port defined in the Docker Connector Configuration

http://books.sonatype.com/nexus-book/3.0/reference/docker.html#docker-ssl-connector

```
docker run -d -p 8081:8081 -p 18443:18443 --name nexus3 ollin/nexus3
```

repository: ollin/dockerbuilds

gha_language: Shell

repo_name: ollin/dockerbuilds


text:
# ember/no-ember-super-in-es-classes

💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/ember-cli/eslint-plugin-ember#-configurations).

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

<!-- end auto-generated rule header -->

`this._super` is not allowed in ES class methods.

While `this._super()` is the only way to invoke an overridden method in an `EmberObject.extend`-style class, the `_super` method doesn't work properly when using native class syntax. Fortunately, native classes come with their own mechanism for invoking methods from a parent.

## Examples

Examples of **incorrect** code for this rule:

```js
import Component from '@ember/component';

export default class MyComponent extends Component {
  init(...args) {
    this._super(...args);
    // Other logic
  }
}
```

Examples of **correct** code for this rule:

```js
import Component from '@ember/component';

export default class MyComponent extends Component {
  init(...args) {
    super.init(...args);
    // Other logic
  }
}
```

```js
import Component from '@ember/component';

export default Component.extend({
  init(...args) {
    this._super(...args);
    // Other logic
  }
});
```

repository: ember-cli/eslint-plugin-ember

repo_name: ember-cli/eslint-plugin-ember


text:
rollup-plugin-cjs-es
====================

[![.github/workflows/build.yml](https://github.com/eight04/rollup-plugin-cjs-es/actions/workflows/build.yml/badge.svg)](https://github.com/eight04/rollup-plugin-cjs-es/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/eight04/rollup-plugin-cjs-es/branch/master/graph/badge.svg)](https://codecov.io/gh/eight04/rollup-plugin-cjs-es)
[![install size](https://packagephobia.now.sh/badge?p=rollup-plugin-cjs-es)](https://packagephobia.now.sh/result?p=rollup-plugin-cjs-es)

Convert CommonJS module into ES module. Powered by [cjs-es](https://github.com/eight04/cjs-es).

Installation
------------

```
npm install -D rollup-plugin-cjs-es
```

Features
--------

* Convert CommonJS modules into ES modules so they can be processed by Rollup.
* Emit warnings for unconverted `require`s.
* Use a cache file to solve export type conflicts instead of using proxy modules, so it works better with tree-shaking.
* Transform dynamic imports: `Promise.resolve(require("..."))`.

Usage
-----

```js
import cjs from "rollup-plugin-cjs-es";

export default {
  input: ["entry.js"],
  output: {
    dir: "dist",
    format: "cjs"
  },
  plugins: [
    cjs({
      nested: true
    })
  ]
};
```

`require` is reassigned
-----------------------

If `require`, `exports`, or `module` are dynamically assigned, the transformer can't find them and it will emit a warning e.g.

```js
(function(r) {
  r("foo");
})(require);
```

```js
const r = require;
r("foo");
```

These patterns are common in module loaders like UMD. I suggest using other plugins to unwrap the module back to the normal CJS pattern.

Lazy load and code splitting
----------------------------

To lazy load an ES module, we can use the `import()` function:

*foo.js*
```js
export const foo = () => {
  return import("./bar");
};
```

*bar.js*
```js
export const bar = "bar";
```

After rolluped into CommonJS format, the dist folder would contain two entries:

*foo.js*
```js
'use strict';

const foo = () => {
  return Promise.resolve(require("./bar.js"));
};

exports.foo = foo;
```

*bar.js*
```js
'use strict';

const bar = "bar";

exports.bar = bar;
```

So that `bar.js` is not loaded until `require("foo").foo()` is called.

With this plugin, you can use the same feature using CommonJS syntax, by writing the require statement inside a promise:

```js
module.exports = {
  foo: () => {
    return Promise.resolve(require("./bar.js"));
  }
};
```

The plugin would transform it into a dynamic `import()`.

Named import/export v.s. default import/export
----------------------------------------------

### Missing exports: foo is not exported by foo.js

In the following example, you would get a warning:

*entry.js*
```js
const foo = require("./foo");
foo.foo();
```

*foo.js*
```js
const myObject = {
  foo: () => console.log("foo");
};
// assign the entire object so that cjs-es won't convert the object pattern into named exports.
module.exports = myObject;
```

```
(!) Missing exports
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-mo
dule
entry.js
foo is not exported by foo.js
1: import * as foo from "./foo";
2: foo.foo();
       ^
```

That is because cjs-es tends to import named exports by default.

To solve this problem, the plugin generates a `.cjsescache` file when a build is finished (whether it succeeded or not), which record the export type of each imported module. In the next build, it will read the cache file and determine the export type according to the cache.

You can also use `exportType` option to tell the plugin that *foo.js* exports default member manually:

```js
{
  plugins: [
    cjsEs({
      exportType: {
        // the path would be resolved with the current directory.
        "foo.js": "default"
      }
    })
  ]
}
```

### Dynamic import() problem with default export

In the following example, you would get an error **under ES enviroment**:

*entry.js*
```js
Promise.resolve(require("./foo"))
  .then(foo => foo());
```

*foo.js*
```js
module.exports = function() {
  console.log("foo");
};
```

After rolluped into ES format and renamed them into `.mjs`:

*entry.mjs*
```js
import("./foo.mjs")
  .then(foo => foo());
```

*foo.mjs*
```js
function foo() {
  console.log("foo");
}

export default foo;
```

```
(node:9996) ExperimentalWarning: The ESM module loader is experimental.
(node:9996) UnhandledPromiseRejectionWarning: TypeError: foo is not a function
    at then.foo (file:///D:/Dev/node-test/dist/entry.mjs:2:16)
    at <anonymous>
```

To correctly call the default member, `entry.js` has to be modified:

```js
Promise.resolve(require("./foo"))
  .then(foo => foo.default());
```

However, this would break other enviroments like CommonJS:

```
(node:9432) UnhandledPromiseRejectionWarning: TypeError: foo.default is not a fu
nction
    at Promise.resolve.then.foo (D:\Dev\node-test\dist\entry.js:4:27)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:118:7)
    at Function.Module.runMain (module.js:705:11)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:660:3
```

Avoid default export if you want to use dynamic `import()` + CommonJS in the same time.

### Comparing to rollup-plugin-commonjs

[rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs) uses a smart method to determine whether to use named or default import. It creates a proxy loader when a module is imported:

*source*
```js
const foo = require("foo");
foo.bar();
```

*transformed*
```js
import "foo";
import foo from "commonjs-proxy:foo";
foo.bar();
```

With this technic, it can first look into the `"foo"` module to check its export type, then generate the proxy module which maps named exports into a default export. However, if the required module `"foo"` uses named exports, it has to be converted into a single object:

*commonjs-proxy:foo*
```js
import * as _ from "foo";
export default _;
```

As a result, all named exports are included in the bundle even that only `bar` is used.

The same problem applies to cjs-es as well if you force a module to use default export:

*entry.js*
```js
const foo = require("./foo");
foo.foo();
```

*foo.js*
```js
module.exports = {
  foo: () => console.log("foo"),
  bar: () => console.log("bar")
};
```

*bundled*
```js
const _export_foo_ = () => console.log("foo");

_export_foo_();
```

*bundled with `exportType: "default"`*
```js
var foo = {
  foo: () => console.log("foo"),
  bar: () => console.log("bar")
};

foo.foo();
```

> Note that this won't be true after rollup supports tree-shaking for object literal. See https://github.com/rollup/rollup/issues/2201

API
----

This module exports a single function.

### cjsEsFactory
```js
cjsEsFactory(options?:Object) => rollupPlugin
```

`options` has following optional properties:

* `include`: `Array<string>`. A list of minimatch pattern. Only matched files would be transformed. Match all files by default.
* `exclude`: `Array<string>`. A list of minimatch pattern. Override `options.include`. Default: `[]`.
* `cache`: `String`. Path to the cache file. `false` to disable the cache. Default: `".cjsescache"`.
* `sourceMap`: `boolean`. If true then generate the source map. Default: `true`.
* `nested`: `boolean`. If true then analyze the AST recursively, otherwise only top-level nodes are analyzed. Default: `false`.
* `exportType`: `null|string|object|function`. Tell the plugin how to determine the export type. Valid export types are `"named"`, `"default"`.

  If `exportType` is a function, it has following signature:

  ```js
  (moduleId) => exportType:String|null|Promise<String|null>
  ```

  The return value should be the export type of `moduleId`.

  If `exportType` is an object, it is a `"path/to/file.js": type` map.

  Default: `null`.

Changelog
---------

* 2.0.0 (Oct 17, 2022)

  - Breaking: bump rollup to 3.0

* 1.1.0 (Aug 8, 2022)

  - Bump dependencies.
  - Fix: variable is used before defined.

* 1.0.1 (Jul 27, 2020)

  - Bump dependencies.
  - Fix: drop `this.isExternal`.

* 1.0.0 (Mar 13, 2020)

  - **Breaking: bump rollup to 2.0**

* 0.9.0 (Jun 14, 2019)

  - **Breaking: cache format is chanaged. You may have to delete the old one.**
  - **Breaking: bump node version to use async/await.**
  - Add: analyze missing exports and fallback to default object.
  - Fix: don't warn unmatched export type if nothing is imported.

* 0.8.0 (Jun 5, 2019)

  - Bump dependencies. Update to<EMAIL_ADDRESS>
* 0.7.0 (Sep 19, 2018)

  - Enhance: don't emit export type unmatch warning when the module is not loaded.
  - Update cjs-es to 0.6.1. Now `module.exports` and `exports` are bound to a single reference.

* 0.6.0 (Jul 19, 2018)

  - Fix: destructuring error when initializing the plugin.
  - Update dependencies. Nested named exports won't be merged into a single namespace anymore.

* 0.5.1 (Jun 30, 2018)

  - Fix: unexpected warning when importee exports both names and default.

* 0.5.0 (Jun 29, 2018)

  - Add: `options.cache` is a file path now.
  - Change: the format of the cache file is changed. The cache file only records modules that export default.
  - Fix: correctly record external modules in the cache.
  - **Drop: code splitting with `require()` had been split out as [a new plugin](https://github.com/eight04/rollup-plugin-require-split-code).**

* 0.4.0 (Jun 16, 2018)

  - **Update rollup to 0.60.**
  - **Add: `options.cache`. Now the plugin would generate a cache file by default.**

* 0.3.2 (May 4, 2018)

  - Fix: `TypeError: cannot access property 'name' on undefined` in unwrapImport.

* 0.3.1 (May 1, 2018)

  - Fix: scope is not correctly analyzed in splitCodeTransformer.

* 0.3.0 (May 1, 2018)

  - Update cjs-es to 0.4.4.
  - Add: warn users for unconverted require.
  - Add: `options.nested`.
  - **Drop: `options.hoist` and `options.dynamicImport`.**

* 0.2.1 (Apr 28, 2018)

  - Update cjs-es to 0.3.2.
  - Add: include pos while reporting errors.

* 0.2.0 (Apr 28, 2018)

  - Add: `exportType` option.
  - Drop: `importStyle`, `exportStyle` option.

* 0.1.0 (Apr 27, 2018)

  - Initial releast.


text:
# YANG model for Optical Impairment aware Topology weekly call (September 14,2021)

****Attendees****
- [x] Dieter Beller
- [x] Aihua Guo
- [X] Esther Lerouzic
- [X] Julien Meuric
- [x] Italo Busi
- [X] Gert Grammel
- [] Gabriele Galimberti
- [X] Yuji Tochio
- [X]Enrico Griseri
- [x] Sergio Belotti
- [X] Victor Lopez
- [] Haomian Zheng
- [X] Igor Bryskin
- [] Brent Foster
- [] Jiang Sun (CMCC)

### discussion

* PR#90 Esther completed the review and approved the PR.
Now we can merge the code into the master.Here the issues solved with this PR: finalize 3R model
(issue #83 https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/issues/83, issue #23),
other update (issue #55 https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/issues/55,
#75 https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/issues/75,
#76 https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/issues/76)

* issue #89
https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/issues/89

It was proposed a text, to introduce in the draft, to explain and justify why OTSi information is needed as input of path computation.
"OTSIs is required in the topology model as input to the path computation since before adding a new OTSi it is needed to understand the
impact of the existing OTSis on the optical impairments of the new OTSi as well as the impact of the new OTSi on the optical impairments of the existing OTSis.
To compute performance it is needed to have information regarding the baudrate, power and carrier-frequency of the different channels in the OMS .
Besides, you also need to know which channels are added/ dropped in the ROADM, to compute overall channel power in ROADMs, in order to check ROADM’s power constraints.
In our model, OTSi is providing this ‘lightpath’ information,
and is right now the only element that enables to identify which piece of spectrum is occupied by which type of channel (baudrate,power, …)
thanks to the pointer (YANG leafref relation) with transceiver.
Moreover the knowledge of the OTSi position in the spectrum is also useful in the intermediate nodes to easy the Optical Channel Monitoring in the ROADM."

Igor, who was not present during the call of September 7th, raised the question if there was idea of the magnitude of the number of OTSi on an OMS link.
Sergio replied that no discussion about magnitude was done last time, but the problem of scalability and the proposal to use instead of single OTSi information, a set of parameters providing an agrregation of information, it was investigated and , even if considered interesting, it was judge too complex and not feasible in short time.
Esther pointed out that for path computation it is needed to consider the OTSi realted to candidate path not the OTSi in any links.
Igor replied that in path computation you need exploring in all direction without tell at priori which OTSi belongs to the best path.
It was said (Dieter) that what has been specified in the topology model are attributes without specifying how to use them,
that is not possible for aggregate attributes: you need to specify how to use them (which algorithm).
Esther underlined that typically when you use aggregation the risk is to loose information in addition to the need to indicate how to use the aggregation attribute.
Instead what we have in the model is raw data where there is no need of interpretation, no ambiguity.
Italo observed that in principle he would agree with igor about the need fro aggregation but who knows the list of attributes that
can aggregate information that are provided by OTSi?
Igor replied that he has not the list and the only way to obtain that is to ask optical expert how to have this type of atributes.
Dieter and Julien raised also perplexity about sclability issue:
Dieter said that if you have already uploaded your network and you do not "get" everything but you subscribe to changes, you have not all the network to update.
Moreoevr Julien substained that we are not talking about control plane and for controller and management the problem of scalability is at different level.

##### Conclusion
At the end of discussion the was an agreement to consider close the issue and then maintain OTSi information in the model.
Before closing definitely the issue it is needed to wait for comments and updates, if needed, for the text to be introduced in the draft.

Sergio in conclusion invite attendees to provide comments to the last two issues introduced by Esther, not discussed for lack of time.
#91 https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/issues/91 about RAMAN amplification and #92
https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/issues/92 on the need to have oms-element-uid as mandatory no optional.

AP@all: provide comments/updates to the proposed text in issue #89
https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/issues/89#issuecomment-918338786

The meeting is adjourned to the next week.

#### meeting scheduling
Next meeting will be **September 21st **

gha_language: Python


text:
# Why shifiting ?

I hate having subtitles not synchronised with video frame ...

### Intro

This project allows you to shift subtitles in a `.srt` file to make them synchronised with the video frame of what you're watching. You can make the shift by specifying the number of seconds to delay or hasten the subtitles.


text:
---
path: "/blog/homesick"
date: "2014-12-21"
title: "Homesick"
---
Haven't written anything recently relating to my personal life. Probably a good thing, its kinda messy.

I miss my house, but not my back home house. I love my Kingston house and everyone in it. All the guests we have included. I miss them and all of it very much. Feeling like early nights and keeping busy is a way to pass the time faster, but I do want to be emotionally involved for Christmas.

I've been working on a game that utilises Darkness Exhumed's old graphics and SFX, along with a couple game design ideas.

Capture The Log, a log is placed in the center of the map and two teams compete for it, you have a choice of class (tank, healer, rogue, builder).

The game is coming together quickly and after three days I have this.

Stealing a log.
`video: https://www.youtube.com/watch?v=pbSbrt2fyhU`
 Hope to be able to play a full game of this over the holidays, the 28th or something.

gha_language: TypeScript


text:
# ocaml15-eff
Examples for Algebraic Effects talk at OCaml'15 Workshop. Needs OCaml with
algebraic effects: https://github.com/kayceesrk/ocaml/tree/effects.

## Installing OCaml-effects compiler

  1. Install [opam-compiler-conf](https://github.com/gasche/opam-compiler-conf)
  2. Get the OCaml-effects compiler

		$ git clone https://github.com/ocamllabs/ocaml-effects
		$ cd ocaml-effects
		$ git checkout effects-native
		$ opam compiler-conf configure
		$ make world.opt
		$ opam compiler-conf install

  3. Use `opam switch` to switch to the newly installed compiler


text:
# First-React-App
Single page react app which consists of 10 user profiles fetched from an API. Features like update and delete are also implemented.

- [Source Code](https://github.com/MihirMore/First-React-App/tree/master/MyFirstApp)

repository: MihirMore/First-React-App

repo_name: MihirMore/First-React-App


text:
# ScoreSettler

ScoreSettler is a simple little experiment, a proof-of-concept, built to help me clear my mind a bit.

The general concept is that it's a means of keeping track of dice rolls in Settlers of Catan (or in any 2d6-based game). It always seems like 5, 6, 8, or 9 are hot, where 7 doesn't pop *as* often as one might expect.

So, here you go. MIT License, which means you can do what you want with it, though (while it's totally allowed by the license) I'd ask that you not incorporate it in a for-sale application - as though someone would do that. :P

repository: brianarn/ScoreSettler

repo_name: brianarn/ScoreSettler


text:
# HyperMath
c# library for mathematical calculations with arbitrary size and precision.

## Description
HyperMath is a package that provides the data type "EDecimal" (Extended Decimal)
which enables you to calculate with floating numbers with theoretically no limits.
It's like "calculating with strings".
You can use a precision of 10 decimal places, 1000000 or much more.

## Installation
Just copy the required files into your project directory.

## Requirements
None

## Limitations
The only limits are your memory and CPU power.
Please be aware that calculations with EDecimal types are not as fast as
standard type calculations.

## Content
* EDecimal: floating point calculation class (data type "EDecimal")

## Usage

### Decimal separator
The decimal separator is set to the default language decimal separator.
The german version of Visual Studio uses "," as separator, the english
version uses ".".

If you want to manually set the decimal separator use
```
EDecimal.DecimalSeparator = '.';
```
to set it to what ever you need.

### Precision
The default precision for some operations is set to "no limit" (e.g.: Add, Sub, Mul).
But because "Div()", "Pow()", "Root()",... can produce periodic or "endless" results
(e.g.: 1/3) the precision limit is set to 50 by default.
Use
```
EDecimal.Precision = 50;
```
to set it to what ever you need.

### Conversion Methods
* String ToString()
* int ToInt32()
* long ToInt64()
* double ToDouble()
* decimal ToDecimal()

### Calculation methods
```
EDecimal EDecimal(string/int/double/decimal Number)
```
Create a new instance of EDecimal.
Also "compact format" is allowed (e.g.: -1.23E-12).
Note: "." and "," is used as comma.

```
EDecimal Negate()
```
Negate the number.

```
EDecimal CommaLeft([int n])
```
Move the comma to the left by n places.

```
EDecimal CommaRight([int n])
```
Move the comma to the right by n places.

```
EDecimal Add(EDecimal b, [int precision])
```
Add "b".

```
EDecimal Sub(EDecimal b, [int precision])
```
Subtract "b".

```
EDecimal Mul(EDecimal b, [int precision])
```
Multiply with "b".

```
EDecimal Div(EDecimal b, [int precision])
```
Divide by "b".

```
EDecimal IDiv(EDecimal b)
```
Divide by "b", without any decimal places (integer division).

```
EDecimal Abs()
```
Get the potitive number.

```
int Sign()
```
Get the sign (-1 if <0, 0 if 0, 1 if >0).

```
EDecimal Min(EDecimal b, [int precision])
```
Get the minimum.

```
EDecimal Max(EDecimal b, [int precision])
```
Get the maximum.

```
EDecimal Pow(EDecimal b, [int precision])
```
Get the "b"th power.
Note: currently only integer power implemented.

```
EDecimal Root(EDecimal b, [int precision])
```
Get the "b"th root.
Note: currently only integer root implemented.

```
EDecimal Sqrt(EDecimal b, [int precision])
```
Get the sqare root.

```
int CompareTo(EDecimal b, [int precision])
```
Compare the number to "b" (1 if >b, 0 if =b, -1 if <b).

### Flags
```
bool IsNegative
```
Get / set the "negative"-flag.

### Check functions
```
bool IsOdd()
```
True if number is odd.
Note: only integer numbers allowed.

```
bool IsEven()
```
True if number is even.
Note: only integer numbers allowed.

```
bool IsInteger()
```
True if number does not have decimal places.

```
bool IsFloat()
```
True if number has decimal places.

```
bool IsZero()
```
True if number is 0.

```
bool IsOne()
```
True if number is 1.

### Properties
```
EDecimal EDecimal.Zero
```
Just EDecimal("0").

```
EDecimal EDecimal.One
```
Just EDecimal("1").

```
EDecimal EDecimal.Two
```
Just EDecimal("2").

```
EDecimal EDecimal.Ten
```
Just EDecimal("10").

```
int EDecimal.Precision
```
The maximum precision for operations like "Div()", "Pow()", "Root()", "Exp()",... .

```
char EDecimal.DecimalSeparator
```
Get / set the decimal separator. It's set to the language default by default.

### Operators
Of course you can calculate with EDecimal like double using
```
+, -, *, /, %, <, >, <=, >=, == and !=
```
which uses EDecimal.Precision as maximum precision.

## Speed
Because all calculations are done "by foot" calculating with EDecimal is quite slow.
So EDecimal is not intended to do many calculations in a short amount of time.

## Todo
* General power (e.g.: Pow(2, 1.2))
* General root (e.g.: Root(5, 3.7))

## Notes
Since I'm quite new to c# and I don't have much time there is certainly much
potential for optimizations.
So please let me know if there are additional optimizations which can be implemented.

## History

### Version 0.2.0
* Much faster array based implementation

### Version 0.1.0
* String based implementation

## Author
Volker Heiselmayer

## Licence
MIT

### Additional keywords
c# csharp math mathematics EDecimal extended decimal claculate strings arbitrary precision
rechnen mit strings


text:
# Friday Reflections

Today was spent reflecting my time in code school thus far, setting 2018 career and life goals, researching and gathering coding resources to help me achieve these goals -- and some time reading and doing code challenges.

Check out my awesome goals document [here](./goals.md) for more details and inspiration on how the day went for me.

Here's how the day started:
![To Do List](./img/todo.jpg)

repository: gingerlee/reflection

repo_name: gingerlee/reflection


text:
alex2
=====
An experimental microservices system - a project of the Microservices Hackathon group in London.

To run tests, execute `nosetests` in the home directory.

To run under gunicorn:

    gunicorn web.combo_server:app --log-file - -w 4 -k sync

repository: douglassquirrel/combo

repo_name: douglassquirrel/combo


text:
# Multiple error types

The previous examples have always been very convenient; `Result`s interact
with other `Result`s and `Option`s interact with other `Option`s.

Sometimes an `Option` needs to interact with a `Result`, or a
`Result<T, Error1>` needs to interact with a `Result<T, Error2>`. In those
cases, we want to manage our different error types in a way that makes them
composable and easy to interact with.

In the following code, two instances of `unwrap` generate different error
types. `Vec::first` returns an `Option`, while `parse::<i32>` returns a
`Result<i32, ParseIntError>`:

```rust,editable,ignore,mdbook-runnable
fn double_first(vec: Vec<&str>) -> i32 {
    let first = vec.first().unwrap(); // Generate error 1
    2 * first.parse::<i32>().unwrap() // Generate error 2
}

fn main() {
    let numbers = vec!["42", "93", "18"];
    let empty = vec![];
    let strings = vec!["tofu", "93", "18"];

    println!("The first doubled is {}", double_first(numbers));

    println!("The first doubled is {}", double_first(empty));
    // Error 1: the input vector is empty

    println!("The first doubled is {}", double_first(strings));
    // Error 2: the element doesn't parse to a number
}
```

Over the next sections, we'll see several strategies for handling these kind of problems.

repository: rust-lang/rust-by-example

repo_name: rust-lang/rust-by-example


text:
# Architectures

Example of architectures:

* Standard architect

![Alt text](https://raw.github.com/joanmiespada/architectures/master/Standart-architecture.svg?sanitize=true)

* Publisher

![Alt text](https://raw.github.com/joanmiespada/architectures/master/publisher-solution.svg?sanitize=true)

* MMOG

![Alt text](https://raw.github.com/joanmiespada/architectures/master/mmog-solution.svg?sanitize=true)

repository: joanmiespada/architectures

repo_name: joanmiespada/architectures


text:
And you love the terminal. You do all the work there and don't really have time for going to the browser to find the name of the song you're listening to ?

No issues. Just run `get_song.py` and type in the lyrics and it'll find the song name for you !

I would suggest you type in the lyrics you find are unique to the song. A normal length is fine. Too short will yield too many results and thus result in an inaccurate answer.

Search result wasn't great ? Think you know the artist or album ? Throw in those details directly in the search, we'll handle it ! In fact, that might help the query

##TODO

1. Add the option to list more than the top result.
Do this by allowing the user to specify the number of results as arguments

Example -

![Example of how it works](http://i.imgur.com/HBwqGJ6.jpg)


text:
# coronaext
Corona Extension for Chrome - utilizing locations timeline and matching against known locations of COVID-19 patients

Icon adapted from a version made by Pixel perfect from www.flaticon.com (https://www.flaticon.com/authors/pixel-perfect)

Using code from:
https://github.com/xpl/crx-hotreload/

repository: aridot/coronaext

repo_name: aridot/coronaext