text:
# Building the library

## The short version; TL; DR
*For the long version see* @ref building-from-source "Building from source"

If the necessary @ref pre-req "pre-requisites" are fulfilled the distributed tar-ball can be built with:

```shell
$ tar xzf libhpdftbl-<version>.tar.gz
$ cd libhpdftbl-<version>
$ ./configure && make
```
If any libraries are missing the `configure` process will discover this and tell what needs to be installed.
Use `./configure -h` to see a list of possible options for configuring the build.

To then verify the build run

```shell
$ make check
```
which will execute all the unit-tests in the library. If all tests pass a *Success!* message can
bee seen at the end of all listed tests.
The library can then be installed with

```shell
$ make install
```

If the install succeeds this will, by default, install the library in the `/usr/local` subtree, both a static and dynamic version of the library will by default be installed.

@note What directory to install to can be adjusted by using the `--prefix` argument when configuring the build.

## Pre-requisites {#pre-req}

There are two mandatory and one semi-otional external library required to fully build the libhpdftbl:

1. **libhpdf** - The Haru PDF library. On OSX this is most easily installed by using the `brew` OSX package manager.
The library is available as `libharu` as of this writing the latest version is `libharu-2.3.0`

    >**NOTE:** In June 2022 a new version of libharu, v2.4.0 was released. This had some breaking changes so if you have installed that library you need at least hpdftbl v1.5.0.

2. **iconv** - The character encoding conversion library. On OSX > 11.x this is included by default once you
have `xcode` command line tools installed which is basically a pre-requisite required for all development on OSX. *On ancient versions of OSX this was not the case.*

3. **libjansson** - Library to parse JSON files. Needed to enable table serialization to- and from JSON format.
*Note:* This can be omitted but then no serialization functions will be available in the library.

### Different versions of iconv on OSX

@note OSX Package manager: We recommend using `brew` as the package manager for OSX.

Unfortunately there are two different (and incompatible) versions of `libiconv` readily available for OSX. One library
that uses the prefix `iconv_*` and the other `libiconv_*` on its exported functions. Compiling `libhpdftbl`
requires the first of these which is the prevalent version and the default on both OSX and Linux.

This is almost exclusively an issue for those that actively develop on OSX and may have over time installed
multiple versions of libraries and as such are aware of these challenges.

### OSX native libiconv

After installing `xcode` command line tools on OSXit is safe to assume that a library called `/usr/lib/iconv.dylib`
is available.

However, if one tries to list this library in `/usr/lib` there will not be a `libiconv.dylib`.
Still, if the code is linked with `-liconv` it will work as expected. How come?

The reason is the way OSX handles different library versions for different OSX SDKs.
Since `xcode` supports developing for different OSX versions the SDK would need to include a complete setup of all  `*.dylib` of the right version for each included version of the SDK. To reduce diskspace all dynamic libraries are rolled-up in a dynamic link shared cache for each SDK version. The tool chain (e.g. `clang`) have been augmented to be aware of this. Hence, there is no need to have libraries in `/usr/lib`.
Instead, OSX from v11 and onwards uses the concept of *stub libraries* with suffix `*.tbd` for each supported SDK version (tbd stands for "text based description").
They are small text files with meta information about the library used by the tool-chain.

For example for SDK 12.3 the stub for libiconv can be found at

```
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libiconv.tbd
```

and the corresponding include header is located at

```
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/iconv.h
```

### OSX GNU port of libiconv

If you have happened to install `libiconv` via the MacPorts you are out of luck and need to change.
MacPorts uses the GNU version which uses the prefix "`libiconv_*`" for its exported function and is not
compatible since the table library assumes the naming convention of the standard OSX version (after v11)

### Troubleshooting OSX `libiconv`

If the build complains about `libiconv` the following steps could be take to try to track down the
problem:

1. Find out all installed versions of `libiconv` on your machine

       $> find / -iregex '.*/libiconv.*' 2> /dev/null

   The "`2> /dev/null`" makes sure you don't get a lot of noise with "permission denied"

2. Find out the SDK path that is actively used

       $> xcrun --show-sdk-path

3. Check you `PATH` variable

       $> echo $PATH

## Building the library from source {#building-from-source}

There are two levels of rebuilding the library that we will discuss

1. Using a build environment to rebuild the library (i.e. building from the supplied tar-ball)

2. Rebuilding from a cloned repo and rebuild the build environment from scratch. As a
principle no generated files are stored in the repo.

### Rebuilding using av existing build environment

Rebuilding the library using a pre-configured build environment requires `gcc` ( or `clang`) and `make`
together with the standard C/C++ libraries to build the library.

The library source with suitable build-environment is distributed as a tar-ball

1. `libhpdftbl-x.y.z.tar.gz`

This tar-ball includes a build environment constructed with the GNU autotools.
This means that after downloading the tar-ball you can rebuild the library as so:

```shell
$ tar xzf libhpdftbl-x.y.z.tar.gz
$ cd libhpdf-x.y.z
$ ./configure && make
... (output from the configuration and build omitted) ...
```

and then (optionally) install the library with

```shell
$ make install
```

By default, the library will install under the `/usr/local` but that can be adjusted by using the `--prefix`
parameter to `configure`. For example

```shell
$ tar xzf libhpdftbl-1.0.0.tar.gz
$ cd libhpdf-1.0.0
$ ./configure --prefix=/usr && make
... (output from the configuration and build omitted) ...
```

Please refer to `configure -h` for other possible configurations. As a shortcut two
utility scripts are included that give some extra `CFLAGS` flags to either compile the
library for production use `./scripts/stdbld.sh` or for debugging `./scripts/dbgbld.sh`
(See @ref lib-debug "Some notes on Debugging")

### Rebuilding from a cloned repo

@note This is for experienced developers!

The repo does not include any of the generated files as the tar-ball does.
This means that the following build tools
needs to be installed in order to fully rebuild from a cloned repo.

1. A complete set of GNU compiler chain (or on OSX clang)
2. [GNU autotools](https://www.wikiwand.com/en/GNU_Autotools) (autoconf, automake, libtool)
3. [Doxygen](https://www.doxygen.nl/manual/index.html) in order to rebuild the documentation.

Since it is completely out of the scope to describe the intricacies
of the GNU autotools we will only show what to do assuming this tool chain have already been installed.

To simplify the bootstrapping necessary to create a full autotools environment from the cloned
repo a utility script that does this is  provided in the form of `./scripts/bootstrap.sh`. After cloning the
repo run (from the `libhpdftbl` top directory)

```shell
$ ./scripts/bootstrap.sh
```

This script will now run `autoreconf`, `automake`, `glibtoolize` as needed in order to create a full build environment.
It will also run `configure` and if everything works as expected the last lines you will see (on OSX) will be

```
...
config.status: executing libtool commands
configure: --------------------------------------------------------------------------------
configure: INSTALLATION SUMMARY:
configure:   - Build configured for OSX.
configure:   - Can rebuild HTML docs with Doxygen.
configure:   - Can also create PDF docs (have LaTeX).
configure:   - Installing to /usr/local
configure: --------------------------------------------------------------------------------
```

and then to compile the library with

```shell
$ make
```

The simplest way to verify that everything works is to run the built-in unit/integration tests

```shell
$ make check
Info: PASS: tut_ex01
Info: PASS: tut_ex02
<omitted ...>
Info: PASS: tut_ex20
Info: =================================
Info: SUCCESS! 20/20 tests passed.
Info: =================================
```

To install the library use

```shell
$> make install
```

This will install headers and library under `/usr/local` (unless the prefix was changed when running the `configure`)

## Miscellaneous

### Some notes on Compiling for debugging {#lib-debug}

Since the library builds with `libtool` and this tool will generate a wrapper shell script for each example to
load the, not yet installed, library it also means this "executable" shell script cannot directly be used to debug with
for example `gdb`.

The solution for this is to configure the library to only build static libraries which are directly linked
with the example binaries and as such can be debugged as usual. It is also a good idea to disable
optimization during debugging to make the source better follow the execution while
stepping through the code. This configuration is done with:

```shell
$> ./configure --disable-shared CFLAGS="-O0 -ggdb"
```

After this all the examples will be statically linked and can be debugged as usual

An alternative way (as recommended in the
[libtool manual](https://www.gnu.org/software/libtool/manual/html_node/Debugging-executables.html))
is to launch the debugger with:

```shell
$> libtool --mode=execute gdb <example program>
```

This will run the `gdb` debugger from command line. For debugging from within a IDE
(like Netbeans, Clion, etc.) use the static library method.

As a convenience a script is provided to handle the debug build configuration `scripts/dbgbld.sh`

### Some notes on updating the documentation

By design the documentation is not updated by the default make target in order minimize the build time during
development. To rebuild the *html* documentation build the target

```shell
$> make html
```

and to rebuild the *PDF* version build (assuming you have LaTeX installed)

```shell
$> make pdf
```

The resulting documentations are stored under `docs/out/html` and `docs/out/latex/refman.pdf`

@warning There is a shell script `scripts/docupload.sh.in` that the author (i.e. me!) uses to upload the
HTML and PDF documentation to the GitHub pages of the author. For obvious reason this script will
not work for anyone else since it requires write access to the doc repo (through an SSL certificate).

### Some notes on Windows build

The source files are suitable augmented to also compile on MS Windows with selective defines. However,
this is on a best effort basis since I have no longer access to a Windows system to verify the workings.
So, basically there is expected to some minor configuration issues when building on windows.
 Patches are welcome!

### Some notes on using C or C++ to build

The source files are also suitable augmented to compile on both a C and a C++ compiler. However,
the default build environment is set up for a pure C library build. To add a configuration switch for
this would be the sensible way to handle this. This is not done and again, is left as an exercise
for the reader.

gha_language: C


text:
FROM todelete1 o
WHERE NOT EXISTS(SELECT 1 FROM urban_areas_cleaner n WHERE n.tileid=o.tileid AND (n.x_max > o.x_max AND n.x_min <= o.x_min));

create materialized view todelete4 AS
select o.*
FROM todelete2 o
WHERE NOT EXISTS(SELECT 1 FROM urban_areas_cleaner n WHERE n.tileid=o.tileid AND ((n.y_max >= o.y_max AND n.y_min < o.y_min) OR (n.y_max > o.y_max AND n.y_min <= o.y_min)));

DELETE FROM urban_areas USING todelete3 d WHERE gid = ANY(d.gids);
DELETE FROM urban_areas USING todelete4 d WHERE gid = ANY(d.gids);
DELETE FROM urban_areas_tiles USING todelete3 d WHERE gid = ANY(d.gids);
DELETE FROM urban_areas_tiles USING todelete4 d WHERE gid = ANY(d.gids);

-------

CREATE MATERIALIZED VIEW delete1 AS
SELECT a.gid, COUNT(*) as c, array_agg(b.gid) as gids
FROM urban_areas_extent a
INNER JOIN urban_areas_extent b ON b.x_max = a.x_max AND b.x_min = a.x_min AND a.tileid = b.tileid AND a.gid < b.gid AND a.condX = b.condX
WHERE NOT EXISTS(SELECT 1 FROM urban_areas_cleaner n WHERE n.tileid=a.tileid AND ((n.x_max >= a.x_max AND n.x_min < a.x_min) OR (n.x_max > a.x_max AND n.x_min <= a.x_min))) AND (a.condX)
GROUP BY a.gid
HAVING COUNT(*) > 15;

CREATE MATERIALIZED VIEW delete2 AS
SELECT a.gid, COUNT(*) as c, array_agg(b.gid) as gids
FROM urban_areas_extent a
INNER JOIN urban_areas_extent b ON b.y_max = a.y_max AND b.y_min = a.y_min AND a.tileid = b.tileid AND a.gid < b.gid AND a.condX = b.condX
WHERE NOT EXISTS(SELECT 1 FROM urban_areas_cleaner n WHERE n.tileid=a.tileid AND ((n.y_max >= a.y_max AND n.y_min < a.y_min) OR (n.y_max > a.y_max AND n.y_min <= a.y_min))) AND (NOT a.condX)
GROUP BY a.gid
HAVING COUNT(*) > 15;

create materialized view oversize2019 as
select geom, tileid, perc, c
FROM (

select t.geom, t.tileid, (ws.c/tot.c::float)::float as perc, ws.c, RANK() OVER (PARTITION BY ws.tileid ORDER BY ws.c DESC) c4rank
from tiles_land t,
(select tileid, abs(ST_XMax(geom)-ST_XMin(geom)) as w, count(*) as c
from
urban_areas_view
where type = 'tile05'
and abs(ST_XMax(geom)-ST_XMin(geom)) < 0.0001
GROUP BY tileid, w
ORDER BY c DESC) as ws,
(select tileid, count(*) as c
from
urban_areas_view
where type = 'tile05'
GROUP BY tileid
HAVING sum(urban_area_km2) > 0.001) tot
where tot.tileid = ws.tileid and t.tileid = ws.tileid and tot.c > 0 and
t.type = 'tile05' ) ext
where c4rank = 1
;
```

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: Jupyter Notebook

license_type: permissive


text:
# Deployments

Maven is prepared to deploy Java artifacts. The code artifacts are deployed to an artifacts repository as part of a CI process or manually, as all it requires is calling a command:

```bash
mvn deploy
```

## Additional Information

* [How to Publish Artifacts on Maven Central](https://medium.com/geekculture/how-to-publish-artifacts-on-maven-central-24342fd286cd)

repository: Bernardo-MG/development-docs-java

repo_name: Bernardo-MG/development-docs-java


text:
# HTTP Opentracing

Open Tracing instrumentation for the [http gem](https://github.com/httprb/http). By default it starts a new span for every request and follows the open tracing tagging [semantic conventions](https://opentracing.io/specification/conventions)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'httprb-opentracing'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install httprb-opentracing

## Usage
First load the instrumentation (Note: this won't automatically instrument the http gem)
```
require "httprb-opentracing"
```

If you have setup `OpenTracing.global_tracer` you can turn on spans for all requests with just:
```
    HTTP::Tracer.instrument
```

If you need more control over the tracer or which requests get their own span you can configure both settings like:
```
    HTTP::Tracer.instrument(
        tracer: tracer,
        ignore_request: ->(request, opts) { request.uri.host == 'localhost' }
    )
```

## Development

After checking out the repo, run `bundle install` to install dependencies. Then, run `rspec` to run the tests.

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/benedictfischer09/ruby-httprb-instrumentation. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

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

## Code of Conduct

Everyone interacting in the project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/benedictfischer09/ruby-httprb-instrumentation/blob/master/CODE_OF_CONDUCT.md).

gha_language: Ruby

gha_license_id: MIT


text:
# MPI Integral calculator for de Jong function

## Overview

This is an application to numerically calculate integrals of de Jong function. However, it can handle all other functions of two arguments as well. To achieve higher performance OpenMPI is used here, which is however sometimes not a very good idea (e.g. if we have hosts in Lviv, Tokyo and California and our function is something like y = x1 + x2 and we don't need to get very precize result it might be a better idea to run such calculations locally, as data transfer will take more time than parallelism can save in such case.)

## Compilation

To build and run this app on your laptop/server/cluster/whatever you'll need a OpenMPI installed in your system. More details on getting these things done you can find on the official web-site -- https://www.open-mpi.org/.

To compile the main.cpp you should simply call mpic++ main.cpp -o main -std=c++14 and then you can run ./main. Not a rocket science.

## Usage

This application takes 5 arguments from command line (excluding it's own name):
- lower x bound
- upper x bound
- lower y bound
- upper y bound
- step of the integrating (distance between two points calculated)

After building the application, you can run it with mpirun command. That will run it on your local node by default (number of the processes will be equal to all available CPU's of your system). Or you can specify hosts in the text file in the following style:

hostname1

hostname2

hostname2

And run the application with mpirun -hostfile hosts.txt main 0 1 0 1 0.001

## Research

According to the lab task we conducted a small research on the performance of the OpenMPI solution. To do this we used two strategies:
- deployed a virtual machines cluster on a single laptom (Intel Core i7-6700HQ one)
- deployed OpenMPI on the real network between two our laptops

These two approaches allows to test both synthetic performance of the OpenMPI cluster in case of VM network (as it gives almost zero ping time, no packet loses, good infrastructure and so on) and real efficience of the OpenMPI solution in the ad-hoc cluster built on top of usual smartphone Wi-Fi hotspot with all it's benefits (quite an awful wi-fi power, noisy wireless channel).

So, in case of VM network performance growth was almost linear: increasing number of active processes from 2 to 4 (for [0 < x < 2] and [0 < y < 3], step is 0.001) reduces average time from 14.42 sec to 8.13 seconds. Further imporvement didn't give good result, because each of the virtual machines had only one processor's core.

However, in case of real network, result was't that optimistic. For example, after moving from a single local process to two processes (one per host) performance droped from 0.25 sec (for 0.01 step) to 0.5 seconds. After increasing number of processes (two per host) it gave quite positive result and total time was about 0.23-27 sec. Also, if step was set to 0.001 calculation time becomes large enough so that distributed system could give some benefits -- performance increased for about 60% after we've twiced number of the processes.

So, the conclusion we state is following: using OpenMPI for tasks with very small calculation required is quite useless (unless it's run on a single server or cluster if connected with some ultra-low latency interface, or OpenMPI was used as a part of legacy code of with some view into the future). However, increasing amount of calculations makes such distributed system more tolerant to weak network (and again, that is very task specific. e.g. our integrating task didn't require much communications and has almost no data dependencies, however if lots of communication is required network again becomes the weakes part of the system).

## A word on methodology

Both computers were run under Ubuntu 16.04 LTS and compiled with -O3 optimization level with g++ 5.4.0 and the latest version of the OpenMPI available in stable repository.

## License

Copyright 2017 Sergey Dubovyk

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

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

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

## Contribution

Feel free to contribute to this project as it can be useful for some students learning OpenMPI stack or just for somebody, who has some free time.


text:
---
title: iDeviceHandle class
---

Represents a wrapper class for iDevice handles.

```csharp
public class iDeviceHandle : SafeHandleZeroOrMinusOneIsInvalid
```

## Public Members

| name | description |
| --- | --- |
| static [Zero](iDeviceHandle/Zero.md) { get; } | Gets a value which represents a pointer or handle that has been initialized to zero. |
| static [DangerousCreate](iDeviceHandle/DangerousCreate.md)(…) | Creates a new [`iDeviceHandle`](iDeviceHandle.md) from a IntPtr. (2 methods) |
| [Api](iDeviceHandle/Api.md) { get; set; } | Gets or sets the API to use |
| override [Equals](iDeviceHandle/Equals.md)(…) |  |
| override [GetHashCode](iDeviceHandle/GetHashCode.md)() |  |
| override [ToString](iDeviceHandle/ToString.md)() |  |
| [operator ==](iDeviceHandle/op_Equality.md) | Determines whether two specified instances of [`iDeviceHandle`](iDeviceHandle.md) are equal. |
| [operator !=](iDeviceHandle/op_Inequality.md) | Determines whether two specified instances of [`iDeviceHandle`](iDeviceHandle.md) are not equal. |

## Protected Members

| name | description |
| --- | --- |
| [iDeviceHandle](iDeviceHandle/iDeviceHandle.md)() | Initializes a new instance of the [`iDeviceHandle`](iDeviceHandle.md) class. |
| [iDeviceHandle](iDeviceHandle/iDeviceHandle.md)(…) | Initializes a new instance of the [`iDeviceHandle`](iDeviceHandle.md) class, specifying whether the handle is to be reliably released. |
| override [ReleaseHandle](iDeviceHandle/ReleaseHandle.md)() |  |

## See Also

* namespace [iMobileDevice.iDevice](../iMobileDevice-net.md)

<!-- DO NOT EDIT: generated by xmldocmd for iMobileDevice-net.dll -->

repository: qmfrederik/docsy-perf

gha_language: HTML

repo_name: qmfrederik/docsy-perf


text:
# CST2335 Final Project

Android app with tracking pages for logging activity, gas, food nutrition and thermostat settings.  Built to fulfill the requirements for 'CST2335 Graphical Interface Programming' Final Project.  App demonstrates concepts learned over the semester by implementing:
* ListView
* AsyncTask
* Progress bar
* Toast, Snackbar and Custom Dialog
* Fragment
* Edit Text for input
* Database - retrieve, save or edit data
* Multiple Language support

### Installing

Clone this repository and import into **Android Studio** via:

```
$ git://github.com/kendalhowse/FinalProject_CST2335.git
```

## Built With

* [Android Studio 3.0](https://developer.android.com/studio/preview/index.html) - Build and Test environment

## Authors

* **Kendal Howse** - *Automobile and Gas Tacking* - [Kendal](https://github.com/kendalhowse)
* **Chris Labelle** - *Nutrion Information Tacking, Toolbar* - [clabelle21](https://github.com/clabelle21)
* **Melissa Rajala** - *Activity Tacking* - [MRajjy](https://github.com/MRajjy)
* **Steven Adema** - *Thermostat Controller* - [Steven](https://github.com/StevenAdema)

## License

Copyright 2017 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements.  See the NOTICE file distributed with this work for
additional information regarding copyright ownership.  The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.  You may obtain a copy of
the License at

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

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

## Acknowledgments

* Thanks to Eric Torunski and Abdul-Rahman Mawlood-Yunis for guidance and troubleshooting in creating the app.

gha_language: Java


text:
---
layout:     post
title:      "A Raisin in the Sun"
date:       2017-08-28
author:    "By Lorriane Hansberry"
---

[A Raisin in the Sun](http://amzn.to/2idtaLh) has earned its place in the American literary canon, in my opinion, far more than many other texts that claim the same honor. Hansberry combines the realities of post WWII African-American life with the highest level of literary craft to produce a final product that reads as both a wonderful novel and stage play.

The text of the play is filled throughout with little stage directions gems, like “(Maximum indifference)” and “(Affecting tea-party interest),” that someone viewing the play would never get to experience. Though I have only read this piece not seen it acted, it is easy to see how rich the stage production has the opportunity to be. The characters each serve a purpose and highlight a different aspect of African-American history, and through their dialogue they make these concepts accessible to all readers.


text:
# Example: Voice to Twitter

In this project, you will learn how to use microphone to record your speech, convert it to text message by Microsoft Cognitive Service and send the message to Twitter. The tweet will be displayed on DevKit screen, and every time you start recording, you will create a new tweet.

## Release Notes

### May 2017

repository: skyhoshi/devkit-sdk

repo_name: skyhoshi/devkit-sdk


text:
# svg-icon-vue

Template for compiling SVG Icons as a Vue Component

## TL;DR
```bash
git clone
cd <repo directory>
npm i
# add svg resources to src/icons
npm run build
# /dist now contains production-ready js
```

```html
<svg-icon
	name="icon-name"
	title="Icon Title"
	color="#ff8200"
	size="32"/>

<svg-icon
	name="custom-icon"
	title="Custom Title Text"
	color="#f00"
	:size="[64, 32]"
	viewBox="0 0 64 32">
	<path d="M731.429 799.429c0..."></path>
</svg-icon>
```

### Installation

For use without a build process, just place the script tag directly into the HTML page, after Vue itself has loaded. Use the `svg-icon.min.js` file directly in the browser, it will auto-register with Vue.

```html
<script src="//your.website.com/js/svg-icon.min.js"></script>
```

For use in Vue apps with a build process, copy the resources from the `dist` folder into your project (`app/src/icons/` for example). Then register the package in the bootstrap process of the app via `Vue.use` for global availability, or in the `components` attribute of an existing component to limit its use.

```javascript
// --- app/src/main.js
import svgIcon from './icons/svg-icon.esm.js';

Vue.use(svgIcon);
```

### Usage

svg-icon renders icons as inline svg to the page. By default, all the icons are 32px square, and inherit the color from their current context (eg. link-colored in a link, heading-colored in a heading, etc.)

To specify the icon you wish to display, supply the `name` attribute. If it matches the name of an icon in the set, that icon will be displayed.

```html
<svg-icon name="icon-name"/>
```

If name is not provided, or does not match one in the set, it is assumed you are providing your own svg content.

```html
<svg-icon name="custom-icon"><path d="M731.429 799.429c0..."></path></svg-icon>
```

Additional properties are as follows:

* **title**: A boolean will enable/disable default hover text. A string will set custom hover text.
* **size**: A single number/string will render a square icon of that size. An array of two numbers/strings of the format [width, height] will display the icon accordingly.
* **color**: An hex color representation will change the base color of the icon. If a multicolor icon is provided, it will set the color where no other color has been specified.

Any other properties not specified (eg. viewBox, etc.) will be appended directly to the SVG tag generated by the component.

### Examples

The repository for this component contains an example file, [examples/icon-grid.vue](https://github.com/team-innovation/svg-icon-vue/blob/master/examples/icon-grid.vue), which serves both as a catalog of the library's icons, as well as a playground to test sizing/coloring of the icons.

repository: team-innovation/svg-icon-vue

gha_language: JavaScript

repo_name: team-innovation/svg-icon-vue


text:
# libfriendship
A dsp library for rendering sounds in a Direct Form system in real-time

**Note**: libfriendship is far from stable, and not at all useful as of yet.
Give it time.

# Purpose
libfriendship exposes an interface for building complex sounds by constructing
a tree of effects through which the user passes signals.

For example, one might start with a simple sine wave at 440 Hz (A4) and then:

1. Send it through an effect that generates harmonics at different amplitudes.
2. Send that through an effect that individually detunes each frequency component.
3. Apply a volume envelope to create a "twang" sound.
4. Send it through a delay effect that creates temporal copies of the sound.

Importantly, all the audio processing occurs in one isolated block of hot
library code. This allows for solutions to the security, performance and
architecture/OS support limitations associated with binary audio plugin formats.

# Design goals
libfriendship aims to be *safe*, *easy to use/understand* and *versatile*
(orderered by priority). It will remain limited only to sound synthesis, which
means it won't provide any interfaces for exporting the output to a file or
handling audio playback - there are other libraries for those tasks.

# License
libfriendship is published under the MIT license.

repository: Wallacoloo/libfriendship

gha_language: Rust

repo_name: Wallacoloo/libfriendship


text:
## Conveniences

Here are a few simple timesavers, DateTime work-alikes.
`ndnow(LOCAL)`, `ndnow(UTC)` are similar to `now()`, `now(UTC)`,
with support for microseconds and nanoseconds.

```
# ndnow(LOCAL), ndnow(UTC) work like now(), now(UTC)

now(UTC)                     # 1 millisecond resolution
# 2022-06-18T12:15:30.123

ndnow(LOCAL)                 # 100 nanosecond resolution (ymmv)
# 2022-06-18T12:15:30.123456700

ndnow(UTC, Microsecond(321), Nanosecond(0))
# 2022-06-18T12:15:30.123321

ndnow(LOCAL, Microsecond(321), Nanosecond(555))
# 2022-06-18T12:15:30.12332555
```

`ndtoday(UTC)` and `ndtoday(LOCAL)` are provided.
They work like today(), adding UTC, LOCAL.
```
ndtoday(UTC), ndtoday(LOCAL)
# 2022-04-26, 2022-04-25
```

branch_name: refs/heads/main

gha_language: Julia


text:
# Vagrant Ansible dynamic inventory

This script is designed to act as an Ansible dynamic inventory, each time it is run a instantaneous representation
of the current Vagrant environment is returned.

**Note:** This script is a proof-of-concept! Please submit feedback if you encounter any errors or have suggestions.

This script is designed for use in BAS projects, but should be useful generally, though some features will not work.

## Features

* Represents the current Vagrant environment as an Ansible inventory using hosts and groups
* For hosts, automatically generates Fully Qualified Domain Names if desired
* For hosts, automatically includes the required identity file to connect to a host using SSH
* For groups, automatically creates groups for the Manager (i.e. Vagrant) and the Provider (i.e. Virtualbox)
* For groups, if using compatible hostname's for each host, creates groups based on the Project, Environment and Purpose

The groups based on the hostname, are designed for projects that follow BAS conventions for hostname's. Following this
convention is optional, but if not followed these groups cannot be created. See the *WSR-1 hostnames* section for
more information.

Example output:

```
# vagrant - Ansible dynamic inventory
# The contents of this inventory are generated by a script, do not modify manually
# Source: /Users/felnne/Projects/WebApps/Pristine/Vagrantfile

## Hosts
pristine-dev-node1.v.m ansible_ssh_private_key_file='/Users/felnne/Projects/WebApps/Web-Applications-Project-Template/.vagrant/machines/pristine-dev-node1/vmware_fusion/private_key'
pristine-dev-node2

## Groups
[vagrant]
pristine-dev-node1.v.m

[vmware_desktop]
pristine-dev-node1.v.m

[pristine]
pristine-dev-node1.v.m

[dev]
pristine-dev-node1.v.m

[node]
pristine-dev-node1.v.m
```

## Requirements

* PHP 5.3 +

* An existing Vagrant environment

## Installation

Place `vagrant-dynamic-inventory` and `vagrant-dynamic-inventory.ini` in a suitable location in your project,
e.g. `provisioning/inventories`.

Make sure to grant execute permissions to the script:

```
$ chmod +x provisioning/inventories/vagrant-dynamic-inventory
```

## Setup

### Configuration file

Edit `vagrant-dynamic-inventory.ini`, and change the following options as needed:

* `working_directory` (string) - Path that contains the 'Vagrantfile' to be used as the input for this script

* `fqdn_domain` (string) - For building Fully Qualified Domain Names, the domain name to append to each hostname

* `debug` (bool) - Provide extra information on how input from Vagrant is used in the script

**Note:** This configuration file MUST be located next to the `vagrant-dynamic-inventory` script and cannot be renamed.

**Note:** If `debug = true` the output of this script will not be a valid Ansible inventory.

Example configuration file:

```ini
; Settings for Vagrant Dynamic Inventory script

[General]

; Path that contains the 'Vagrantfile' to be used as the input for this script
; Typically this script will be in 'provisioning/inventories and the 'Vagrantfile' in the project root
; Default value: '../../'
working_directory = '/Users/felnne/Projects/WebApps/Pristine/'

; For building Fully Qualified Domain Names, the domain name to append to each hostname
; Default value: '.test'
fqdn_domain = '.v.m'

; Provide extra information on how input from Vagrant is used in the script
; Allowed values: true / false
; Default value: false
debug = false
```

### Configure Ansible

Configure Ansible to use this inventory, either using a project `ansible.cfg` file:

```ini
[defaults]
inventory = provisioning/inventories/vagrant-dynamic-inventory
```

Or pass the location on the command line:

```
$ ansible-playbook -i provisioning/inventories/vagrant-dynamic-inventory playbook.yml
```

Alternatively you can use a directory of inventories, useful if you want to define your own groups or in environments
with multiple dynamic inventories:

```ini
[defaults]
inventory = provisioning/inventories/
```

Or:

```
$ ansible-playbook -i provisioning/inventories/ playbook.yml
```

**Note:** Ansible will try to use any file in the directory you specify as an inventory.

Ansible has more general information on [Ansible inventories](http://docs.ansible.com/ansible/intro_inventory.html)
and [dynamic inventories](http://docs.ansible.com/ansible/intro_dynamic_inventory.html) if needed.

## Usage

Now each time Ansible is run, the dynamic inventory script will be called by Ansible. This will get information from
Vagrant and provide this to Ansible. No inventory file will be saved by this script, though you can do this for testing
purposes if desired.

**Note:** Vagrant must be running for this script to work

To see what this script produces you can run it directly:

```
$ provisioning/inventories/vagrant-dynamic-inventory
```

### WSR-1 hostnames

TODO.

## Developing

### Contributing policy

This project welcomes contributions, see `CONTRIBUTING.md` for our general policy.

## Licence

Copyright 2016 NERC BAS.

Unless stated otherwise, all documentation is licensed under the Open Government License - version 3. All code is
licensed under the MIT license.

Copies of these licenses are included within this project.


text:
**Viva Moon Guard!**

![BCC](http://www.opsat.net/derpdex/wow/bcc/bcc.png)

The premise behind this you can define a list of custom emotes per spell, even multiple per spell. Each time a spell is cast one of the messages you define will be selected at random. Then, the chance that message will actually happen (which is a value you define when creating the message) will decide the message will really happen.

Type this command to see all the commands this addon has.

	/bcc

Typing a command like

	/bcc add

Will show you more information on how it works.

Example
---------------------

	/bcc add "Auto Shot" 100 emote "lets loose another arrow."

Now every time this hunter shoots an arrow, it will emote "Huntard lets loose another arrow."  But if I see this in LFR I will laugh so hard, and buy you a beer when we get back to Orgrimmar.

Pick your cool spells, and use low chances:

	/bcc add "Explosive Shot" 2 emote "lets loose a firey arrow."
	/bcc add "Explosive Shot" 2 emote "lets loose a flaming arrow."

With this setup there is roughly only a 2% chance that you will emote anything at all when mashing Explosive Shot.

Idle Timer
---------------------

There is an idle timer that will allow your character to auto emote things
depending on how long it has been since you cast a spell. In dungeons/raids this defaults to every 2 minutes (give or take some RNG) to let people know just how bored you are with them wasting your time in LFR. This value gets multiplied while in the open world to be less spammy while out and about.

To define the idle emotes, you do the same thing as a spell emote, just with
the spell name of "idle timer"

	/bcc add "idle timer" 100 emote "bounces up and down."
	/bcc idle 4
	/bcc idleworldmult 3

This will make you bounce up and down every four minutes in instances, and every 12 minutes while in the open world.

Message Tokens
---------------------

* @player - Will be replaced with your character's name.
* @pet - Will be replaced by your pet's name, if you have one. Probably only works on hunters. If you use this token and you don't have a pet, the message containing it will not be used.
* @target - Will be replaced by the name of your current target. If you have no target, then the message containing it will not be used.
* @spell - Will be replaced by the name of the spell you cast to cause the action to happen.

Find Me In Game
---------------------

* Thundersteak-MoonGuard
* Dubsteak-MoonGuard
* Dethsteak-MoonGuard
* Treesteak-MoonGuard
* Rawrsteak-MoonGuard
* Totemsteak-MoonGuard
* Portabobby-MoonGuard


text:
# Superset Mongo via Mongo BI connector

This is a simple [docker-compose](./docker-compose.yaml) project to demonstrate how to query a [MongoDB](https://www.mongodb.com/try/download/community) database with [Apache Superset](https://superset.apache.org/) through the [MongoDB BI Connector](https://docs.mongodb.com/bi-connector/v2.14/).

I would like to thanks [@smarzola](https://github.com/smarzola/) for his [sqlalchemy-mongobi](https://github.com/smarzola/sqlalchemy-mongobi) python package which adds a dialect for sqlalchemy disabling transactions not supported with the BI connector.

## Description

This docker compose project is made up of these containers :

* `poc_ssm_mongo` : a mongo 5 single instance
* `poc_ssm_mongo_express` : a mongo express UI to browse the data in the instance at [http://localhost:8081/](http://localhost:8081/)
* `poc_ssm_mongo_bi` : a mongo bi connector connected to the mongo instance
* `poc_ssm_mongo_data` : a container loading a sample dataset in the mongo instance
* `poc_ssm_mysql_client` : a container with a mysql cli client to demonstrate connection through the mongo bi connector
* `poc_ssm_sqlalchemy` : a container with a simple sqlalchemy script to demonstrate connection through the mongo bi connector
* `poc_ssm_superset` : a container with a superset instance to demonstrate connection through the mongo bi connector

## Usage

Starts the project

```
docker-compose up
```

Wait for everything to be ready and for the `poc_ssm_mongo_data` to exit with a 0 status code.

*Note : look at the logs of the superset instance before connecting to wait for all the init scripts in the entrypoint to finish before the gunicorn web server is started*

Then you can try the different connection mode.

### 1. mysql cli client

```
$ docker-compose exec poc_ssm_mysql_client bash

# mysql -h poc_ssm_mongo_bi -P 3307 -u 'root?source=admin' --default-auth=mongosql_auth -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 457
Server version: 5.7.12 mongosqld v2.14.3 mongosqld v2.14.3

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| INFORMATION_SCHEMA |
| mysql              |
| samples            |
+--------------------+
3 rows in set (0.00 sec)

mysql> use samples;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> show tables;
+---------------------------------------+
| Tables_in_samples                     |
+---------------------------------------+
| companies                             |
| companies_acquisitions                |
| companies_competitions                |
| companies_external_links              |
| companies_funding_rounds              |
| companies_funding_rounds_investments  |
| companies_image_available_sizes       |
| companies_investments                 |
| companies_milestones                  |
| companies_offices                     |
| companies_partners                    |
| companies_products                    |
| companies_providerships               |
| companies_relationships               |
| companies_screenshots                 |
| companies_screenshots_available_sizes |
| companies_video_embeds                |
+---------------------------------------+
17 rows in set (0.00 sec)

mysql> select * from companies limit 1\G
*************************** 1. row ***************************
_id: 52cdef7c4bab8bd675297d8b
name: AdventNet
1 row in set (0.00 sec)

mysql>
```

### 2. sqlalchemy script

```
$ docker-compose exec poc_ssm_sqlalchemy bash

# python3 query.py
/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/default.py:410: SAWarning: Exception attempting to detect unicode returns: ProgrammingError('(MySQLdb._exceptions.ProgrammingError) (1064, "parse sql \'SELECT CAST(\'test collated returns\' AS CHAR CHARACTER SET utf8mb4) COLLATE utf8mb4_bin AS anon_1\' error: unexpected CHARACTER at position 55 near CHARACTER")',)
  "detect unicode returns: %r" % de
------------
[
  {
    "name": "AdventNet",
    "_id": "52cdef7c4bab8bd675297d8b"
  },
  {
    "name": "Wetpaint",
    "_id": "52cdef7c4bab8bd675297d8a"
  }
]
```

### 3. Superset

* [01 - Setup the database and datasets](./doc/01_setup_database_datasets.md)
* [02 - Create a simple bar chart](./doc/02_simple_bar_chart.md)
* [03 - SQLlab and virtual table](./doc/03_sqllab_virtual_table.md)
* [04 - Row level security](./doc/04_row_level_security.md)
* [05 - Table chart with time filter](./doc/05_table_chart_time_filter.md)

## Important

You can look at the different Dockerfile and entrypoint.sh scripts to see the details. However there are a few things I did in this POC and I want to point out.

1. Mongo BI connector :

    1. As the database is in auth mode, the bi connector needs to be too (`--auth`) and needs to be secured with TLS `--sslMode=allowSSL` and `--sslPEMKeyFile=/path/to/an/autosigned/pem/cert/and/key`

    2. schema refresh has been enabled and is automatic but you can [build your own schema](https://docs.mongodb.com/bi-connector/v2.14/schema-configuration/)

2. Superset :

    1. in file `/app/superset/sql_lab.py` around line `432`, there is a `conn.commit()` instruction that needs to be commented in order to be able to use the sql lab.

    2. as the mysqlclient sends the password as cleartext (over tls), you need to add the `LIBMYSQL_ENABLE_CLEARTEXT_PLUGIN=1` environment variable

repository: venusdharan/docker-superset-mongo-poc

repo_name: venusdharan/docker-superset-mongo-poc


text:
# Cloriko

Cloriko is a non yet implemented platform that will provide data storage solution that differs from the cloud model
in which monthly payments are required and data is stored on the external companies' infrastructure.
In contrast, using this new model the user will need to use commodity machines as storage service,
in which they will be able to make it accessible through the Cloriko's platform, from any other authenticated device,
therefore meaning that the ownership and responsability of the data will exclusively be on the user.

# Table of Contents

1. [Getting started](#getting-started)
2. [Comparing with existing storage solutions](#comparing-with-exisiting-storage-solutions)
3. [Technical overview](#technical-overview)
4. [Master](#master)
5. [Slave](#slave)
6. [Common](#common)
8. [Frontend](#frontend)
9. [Requirements](#requirements)
10. [Future work](#future-work)

## Getting started
The below steps shows the process for the user to get started:
-	Create a user account to Cloriko’s website: [www.cloriko.com](https://www.cloriko.com)
-	Installing the `cloriko-slave` software in a machine in which it is wanted to be used as a storage system.
- Once installed the following link will become available: [http://localhost:8980](http://localhost:8980) in which from there would be possible to authenticate the machine as user's `slave` (named to referentiate a user's authenticated device) and also tweak some configurations.
- At this point the user does have read and write access from the web app to the `slave` documents in the application's restricted folder.
- From there on, the process of adding `slaves` can be repeated as much times as machines the user wants to keep connected to cloriko.
- File operations directly performed on the local file system would be represented on the web

## Technical overview
The application is mainly developed using the Scala language and sbt, and it is composed by the
 following submodules `master`, `slave`, `common` and `frontend`.

### Master
The master represents the server backend which that acts as a middleware between `user requests` and `slave responses`, it is implemented as a mix of HTTP and gRPC protocols, relatively used for communicating with users and slaves.

- HTTP: The internet application protocol most commonly used for interacting with
user requests. It is built on top of [Http4s](https://www.http4s.io) with twirl, which implements all the necessary http routes for user requests such as registration and authentication but also operational request such as creating, deleting, moving and fetching from the slaves FS.

- gRPC: A protocol created by google (google Remote Procedure Call) that was chosen to be integrated in the Cloriko's platform since it allowed to create permanent connections between two end-points, in that case  between the `Master` and the `Slave`.
Being the grpc service binded as a passive stub that listens for a slave request to initialize communication protocol defined below at the [`cloriko-common`](Common) sub project.

The overall project is mainly built on top of [Monix](https://www.monix.io), an asyncronous programming library that facilitated to create an event based reactive platform. This one was chosen over the Akka toolkit for its simplicity and interoperability with other functional programming libraries such as Http4s and Cats.

### Slave
A slave is the representation of a user's machine with the `cloriko-slave` application installed on it and authenticated against the `cloriko-master` server.
It does act as an end-point that initializes a permanent grpc connection with the master.
So at the end, this grpc protocol is a definition of a stream of messages that each one represents a specific operation that will be performed on the slave's `File System`.
This component does also depends on Monix and Http4s, the second one in that case is used define a local end-point accessible for the user to entry their credentials.

### Frontend
The frontend will allow the users to basically authenticate against the server and interact with their Slaves' data as if they were accessing to it locally.

Since the all of the platform is written in the Scala language, the frontend could not be less, so that was developed using the [Play](https://www.playframework.io), a framework that mixes the Scala and HTML into`scala.html` files, with the addition of some `javascript` and `CSS`.

### Common
Those functionalities required from both `master` and `slave` were included as a different sub module `cloriko-common` in which both depends on.
It is where the grpc `.proto` files are defined. They can be found in the `/protobuf` folder, it would allow the the [scala protobuf](https://scalapb.github.io/) pluguin to find and build an abstraction of such protocol to be used with the Scala language.
The sub project also includes some `implicit extensions` that makes easier syntax to be used from the proto generated classes and also a set of generators defined using [scalacheck](https://www.scalacheck.org) that are needed for testing purposes.

## Requirements
This section includes the main requirements for the first version of the project the product:
- Make the desired data available from each of the network’s devices and make it accessible from the Web App.
-	Web app that will allow users to register, log in, and see their data.
-	Each device is be automatically set up by installing the Cloriko software and logging in it.
-	A new folder is being created when installing the software therefore any document can be put there and it will be updated to personal storage.
-	Three different storage modalities defined: Safe and Light and Duplication
-	The platform will just be available for online access since it only will be available from the web app.
-	Two privacy modes, Public and Private.
--	Public: Allows users to have the documents their selected opened to everyone (including themselves). So at the end, it avoids the need of having to log in for accessing to any content.
--	Private: Just the opposite to Public

## Future work
As it was said in the introduction section, this paradigm is yet in production nor yet totally implemented and tested, therefore different features can be yet to discover and be developed, in which the initial approach was mainly represented on above explanation, there is already some ideas that could be included in future versions of the same:

-	Allow multiple contexts & clusters for the same user

-	Subscriber model: A user can be able to subscribe to other user’s content, in that case the data updated by the secondary user does not infer the primary one and neither the secondary user device’s will be seen as part of the primary’s device network.

-	Copy, move and rename operations will be available at the client side

-	At least one device is needed to be registered with the possibility of adding multiple devices, thing that would simulate a cloud behaviour.
--	Safe : All the content updated to the application is replicated in at least two replicas. Note that it is only possible to use this mode when there have been set at least two devices for the same user and a maximum of 3 recommended.
--	Lighter mode does not care about any replicas. So the device’s data would be lost in the case that one of the gets down.
-- Duplication: This mode will also be available for those cases in which we want all the data in each device. (This mode is very heavy and it is not really seen as a cloud behaviour, instead it is more seen like a shared folder in which each user has the full copy of the data, allowing with no network latency and accessing the full content in an offline mode (explained below).

-	When the data gets deleted, a notification from the device is sent to the Master server whom will handle it in a different way depending on the storage modality currently being used.
--	Safe: In a safe mode the user is asked for choosing between forwarding the deletion

repository: paualarco/cloriko

repo_name: paualarco/cloriko


text:
---
title: "Retrieve metric data for a single server."
description: "
 This example shows how to use the SoftLayer API to retrieve metric data for
 Advanced Monitoring on a single hardware or virtual guest server instance."
date: "2014-09-01"
classes: ["SoftLayer_Monitoring_Agent", "SoftLayer_Hardware_Server"]
tags:
    - "monitoring"
    - "metrics"
---
We will call the SoftLayer API to retrieve the monitoring agents,
 configuration template, and configuration values for a server instance.
 Then we will demonstrate how to find definitions that you have enabled for
 metric tracking, how to check that they are enabled, and how to then use them
 to get metrics for arbitrary dates.

 Note that the agent, section, sub-section, and definition names have already been
 pre-selected and in order for this example to work your server must have these
 configuration options enabled and be able to retrieve metrics for them through
the portal. If you wish to use additional or substitute names for any of those
shown below you can do so by looking at the current options available in the
 SoftLayer portal or by further debugging the output of this script.
```php
<?php

/* You can use the getenv() module to pull your exported Username
and API key to keep from having to store them in your files */

require_once './vendor/autoload.php';
$apiUsername = getenv('SOFTLAYER_USERNAME');
$apiKey = getenv('SOFTLAYER_API_KEY');
$serverId = 17422485;

$startDate = '04/13/2016';

/**
 * The date at which you wish to end the metric sample.
 *
 * @var string
 */
$endDate = '08/10/2016';

/**
 * For this example we'll be working with SoftLayer_Virtual_Guest, you can also work
 * with SoftLayer_Hardware_Server depending on the type of server you're interacting with.
 *
 * Create a connection to the SoftLayer_Virtual_Guest API service and call the
 * getMonitoringAgents() method to get the server's associated tracking object record.
 */
$client = \SoftLayer\SoapClient::getClient('SoftLayer_Virtual_Guest', $serverId, $apiUsername, $apiKey);

try {
    // getMonitoringAgents() returns an array of SoftLayer_Monitoring_Agent objects.
    // From here you can loop through these agents to perform different functions such as get graphs,
    // activate, deactivate, or run other functions on it.
    $monitoringAgents = $client->getMonitoringAgents();
} catch (Exception $e) {
    die('Unable to retrieve server record: ' . $e->getMessage());
}

/**
 * Find the id of the specific agent we are wanting, in this example the "Cpu, Disk, and Memory" monitoring agent.
 */
$cdmAgent = null;
foreach ($monitoringAgents as $agent) {
    if ($agent->name == 'Cpu, Disk, and Memory Monitoring Agent') {
        $cdmAgent = $agent;
        break;
    }
}

/**
 * Next we can create an array of all configuration variables that we are able to track.
 * Re-declare our client variable to talk to the
 * SoftLayer_Monitoring_Agent API service.
 */
$client = \SoftLayer\SoapClient::getClient('SoftLayer_Monitoring_Agent', $cdmAgent->id, $apiUsername, $apiKey);

// Object mask to get all definitions that we need.
$objectMask = 'mask.definition.monitoringDataFlag';
$client->setObjectMask($objectMask);

try {
    // getConfigurationValues() returns an array of
    // SoftLayer_Monitoring_Agent_Configuration_Value objects.
    $cdmConfigurationValues = $client->getConfigurationValues();
} catch (Exception $e) {
    die('Unable to retrieve monitoring agent configuration template: ' . $e->getMessage());
}

/**
 * SoftLayer_Monitoring_Agent_Configuration_Value is used to retrieve metric data types.
 * Check if the agent configuration value for each definition
 * has been enabled. Otherwise, we will not have any metric data.
 */
// Define the containers to hold the metric data types we will retrieve
$metricDataTypes = array();

foreach ($cdmConfigurationValues as $configurationValue) {

    // Ensure that this value is set to true
    if ((bool) $configurationValue->value == false) {
        continue;
    }

    // Ensure that the monitoring data flag is true
    if ($configurationValue->definition->monitoringDataFlag !== true) {
        continue;
    }

    // Get the metricDataType for this configuration value
    $client = \SoftLayer\SoapClient::getClient('SoftLayer_Monitoring_Agent_Configuration_Value', $configurationValue->id, $apiUsername, $apiKey);
    try {
        $metricDataTypes[] = $client->getMetricDataType();
    } catch (Exception $e) {
        die('Unable to retrieve metric data type: ' . $e->getMessage());
    }
}

/**
 * Retrieving data for an individual metric.
 *
 * Re-declare our client variable to talk to the
 * SoftLayer_Monitoring_Agent API service.
 *
 * We will be retrieving the "Graph Total CPU Usage" metric data.
 */
$client = \SoftLayer\SoapClient::getClient('SoftLayer_Monitoring_Agent', $cdmAgent->id, $apiUsername, $apiKey);

try {
    // getGraphData() returns a SoftLayer_Metric_Tracking_Object_Data object.
    $data = $client->getGraphData($metricDataTypes, $startDate, $endDate);
    echo "Data retrieved! " . count($data) . " data points\n\r";
} catch (Exception $e) {
    die('Unable to retrieve metric data: ' . $e->getMessage());
}
?>
```

gha_license_id: NOASSERTION


text:
---
layout: post
title: Missing references showing nicely with ReSharper
date: 2008-11-03T14:35:00.001Z
author: Marcus Hammarberg
tags:
  - Life of a consultant
modified_time: 2010-12-14T15:21:03.985Z
thumbnail: >-
  http://lh4.ggpht.com/\_kkDJOSPNTLs/SQ8MPLCoO2I/AAAAAAAAAYM/DDAEMUZHpoY/s72-c/config_thumb%5B7%5D.jpg?imgmax=800
blogger_id: tag:blogger.com,1999:blog-36533086.post-8485039993098283981
blogger_orig_url: http://www.marcusoft.net/2008/11/missing-references-showing-nicely-with.html
---

I found a feature that I thought was bug in Visual Studio... If you have
ReSharper (4.0 in my case) installed it shows your
missing references directly in the .config-file.

[](http://lh3.ggpht.com/_kkDJOSPNTLs/SQ8MOh9127I/AAAAAAAAAYI/-SxwFY8XlyE/s1600-h/config%5B9%5D.jpg)

Of course there are limitations of this - secondary references cannot be
resolved but it is still a great help. Unfortunately it confused me for
a while thinking it was a bug in the config editor of Visual Studio. But
I take that one on me.


text:
## Optional Dependencies

Previously, we have successfully created a `CompositeLogService` service
based on multiple plugins injected with the same custom token.

However, what happens when there are no logger plugins registered within the application?
Let's comment out the plugin registration section in the app module providers to see what happens at runtime.

```ts
@NgModule({
  providers: [
    CompositeLogService // ,
    // { provide: LOGGER_PLUGIN, useClass: ErrorLogPlugin, multi: true },
    // { provide: LOGGER_PLUGIN, useClass: WarningLogPlugin, multi: true }
  ]
})
```

Now if you rebuild and run your application it is going to crash with the following error in the browser console:

```text
Error: No provider for InjectionToken logger.plugin!
```

The error above is an expected behavior.

Essentially, when you declare a dependency within the constructor parameters,
you instruct the Angular framework to ensure the corresponding dependency indeed exists, and injection can happen.

There are scenarios when having an instance is not mandatory, and application can function without it,
like in our case with logger plugins - the log service can have default fallback behaviour in case no plugins are present.

For those kinds of scenarios, the Angular framework provides us with the "@Optional" decorator
that allows making particular injections "optional" rather than "mandatory" during dependency injection phase.

```ts
import { /*...,*/ Optional } from '@angular/core';

@Injectable({ providedIn: 'root' })
export class CompositeLogService {

  constructor((@Optional() @Inject(LOGGER_PLUGIN) private plugins: LogPlugin[]) {
    if (plugins && plugins.length > 0) {
      // ...
    } else {
      console.log('No logger plugins found.');
    }
  }

 // ...
}
```

As you can see from the code above, we now have a possibility to check whether any plugins are available,
and perform the fallback behavior if needed.
Just for the demo purposes, we log the information message to the console:

```text
No logger plugins found.
```

The `@Optional` decorator is a handy mechanism that helps you to prevent the runtime errors
when some content is missing or is not registered correctly.

repository: tpdogan/angular-book

repo_name: tpdogan/angular-book


text:
# Precious

I wanted to make a fun programming language so I did it.
It's mine. My own. My precious... Precious is a LOTR esoteric programming language translator.
Precious uses lore keywords and english to create simple programming functionality.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'my_precious'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install my_precious

## Syntax:
Welcome to the Fellowship!

the my_precious gem is designed to find and hold on to keywords and ignore everything else.
this allows users to create their own stories in the Precious language that is then translated to valid Ruby code.

each piece of code you write in Precious must be written on its own new line in your text editor of choice.

now, in the words of Gandalf the Gray, “All we have to decide is what to do with the time that is given us.”

# terminal commands
my_precious forge 'filename'

my_precious bring_forth 'filename' 'output filename'

my_precious destroy 'filename'

forge: create an empty .precious file with the specified name that you gave it. Write your Precious code here.

bring_forth: 'filename' here is the same file you created with forge which will now be read and interpreted into Ruby code which is then written and outputted to 'output filename'

destroy: 'filename' here refers to any existing file you would like to delete

```
// ♥ my_precious forge middle_earth
middle_earth.precious, one file to rule them all
[17:27:59] middle_earth
// ♥ ls
middle_earth.precious
[17:28:08] middle_earth
// ♥ my_precious bring_forth middle_earth.precious valinor.rb
middle_earth.precious has been brought forth.  It's over now. middle_earth.precious has been destroyed
[17:28:44] middle_earth
// ♥ ls
valinor.rb
[17:28:49] middle_earth
// ♥
```

# known bugs
version 0.2.3 - the last character of the function name will be removed.

```transcribe the book about Mordor with Nazgul, Frodo
def mordo( nazgul, frodo )
```

# variables
use capitols

`Frodo is 8 years old`

# strings
use double quotes

`Frodo is "a hobbit"`

# integers
write normally

`Orcs are 2 big`

# commenting
use the keywords: 'second breakfast', 'wear the ring'

`i love second breakfast Sam is going to be a number`
`wear the ring Frodo`

everything that comes after 'second breakfast' will be commented out.
everything before 'second breakfast' will not.

# puts
use the keywords: 'bring forth the ring', 'says', 'screams', 'exclaims', 'sobbs' or 'coughs'

`bring forth the ring Frodo`
`gandalf says "they're taking the hobbits to Isengard"`

# assignment
use the keywords: 'is', 'has', 'are'

`Frodo is 8`
`Elves are worried when they saw 7 hobbits approaching the lair`

# increment
use the keywords: 'eats lembas bread', 'fortifies stronghold', 'rests', 'recieves Evenstar' or 'reforges Narsil'

`Frodo eats lembas bread`

# decrement
use the keywords: 'runs out of lembas bread', 'lost' or 'hunted by orcs'

`Sam runs out of lembas bread`
`Pippin gets hunted by orcs`

# addition
use the keywords: 'joins', 'and' or 'accompanies'

`Frodo joins the fellowship with a Nazgul`
`Gollum and Frodo went inside mordor`

# subtraction
use the keywords: 'leaves the fellowship', 'stabs', 'banishes' or 'steals'

`Sam leaves the fellowship without telling Sam`
`a Wraith accidentally stabs Sauron in the face at a really important business meeting`

# multiplication
use the keywords: 'gives aid to', 'procreates' or 'bolsters'

`Arigorn bolsters Helmsdeep`

# division
use the keywords: 'decapitates' or 'dismembers'

`Gimly dismembers Legolas`

# true
use the keywords: 'precious'

`Legolas is precious`

# negation
use keywords: 'not'

`the Balrog is not precious`

# loops
use the keywords: 'whilst' or 'during the journey'

`whilst Frodo climed as strong as he could, Saruman cried, nooo!!`

# comparisons
use keywords: 'equal', 'same' or 'similar'

`Gollum can be the same as Smeagol`

# greater/less than
use keywords: 'stronger than' or 'more' and 'weaker than' or 'less'

`Bilbo ate more tree food than Treebeard`

# conditionals
use keywords: 'does', 'if' or 'will'

`will Mary equal Pippin?`

# end
use keywords: 'you shall not pass'

`you shall not pass`

# defining a function
use keywords: 'transcribe' or 'tell a story'

`transcribe the book about Mordor`

# calling a function
use keywords: "theyre taking the hobbits to"

`they are taking the hobbits to Mordor`

# establishing parameters
use keywords: 'with'

`they are taking the hobbits to Mordor with Nazgul, Frodo`

everything after the keyword 'with' is a parameter. use a ',' or ' ' to separate parameters

# class words
use keywords: 'chapter :'

`chapter : TheMines`

the format here is important. everything after the ':' will be considered a classname.
classnames must be capitalized

## Development

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

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/<github username>/precious. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

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

## Code of Conduct

Everyone interacting in the Precious project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/<github username>/precious/blob/master/CODE_OF_CONDUCT.md).


text:
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

  - Automatically start Livy session if none present (#398)[https://github.com/WSULib/combine/issues/398]

## [`v0.8`] - 2019-04-??
### Added
  - Global search of Record's mapped fields
  - Ability to add Organizations, Record Groups, and/or Jobs to Published Subsets [#395](https://github.com/WSULib/combine/issues/395)
  - Remove temporary payloads of static harvests on Job delete [#394](https://github.com/WSULib/combine/issues/394)
  - Added `CHANGELOG.md`

### Changed
  - Fixed precounts for Published Subsets when included Jobs mutate [#396](https://github.com/WSULib/combine/issues/396)

## [previous]
See [GitHub wiki Roadmap](https://github.com/WSULib/combine/wiki/Roadmap).

repository: mlibrary/combine

repo_name: mlibrary/combine


text:
# Should I use typeclasses or not?

## Question

I have some difficulties to understand when use and when not use typeclass in my code. I mean _create my own_, and not _use already defined_ typeclasses, of course. By example (very stupid example), should I do:

    data Cars = Brakes | Wheels | Engine
    data Computers = Processor | RAM | HardDrive

    class Repairable a where
        is_reparaible :: a -> Bool

    instance Repairable Cars where
        is_repairable (Brakes) = True
        is_repairable (Wheels) = False
        is_repairable (Engine) = False

    instance Repairable Computers where
        is_repairable (Processor) = False
        is_repairable (RAM)       = False
        is_repairable (HardDrive) = True

    checkState :: (Reparaible a) => a -> ...
    checkState a = ...

(Obviously, this is an stupid, incomplete example).

But this is a lot for a little use, no? Why I shouldn't do something simple and only defining functions without defining new data types and typeclasses (with their instances).

This example is too simple, but in facts I often see somethings like that (new data types+typeclasses+instances) when I browse Haskell code on github instead of only defining functions.

So, when I should create new data types, typeclasses etc and when should I use functions?

Thanks.

## Answer

> Why I shouldn't do something simple and only defining functions without defining new data types and typeclasses (with their instances).

Why indeed? You could just define:

    checkState :: (a -> Bool) -> (a -> b) -> (a -> b) -> a -> b
    checkState is_repairable repairs destroy a
        = if (is_repairable a) then repairs a else destroy a

People misuse type classes all the time. It doesn't mean that it's idiomatic.

To answer your more general question, here are some rules of thumb for when to use type classes and when not to use them:

Use type classes if:

*   There is only one correct behavior per given type

*   The type class has associated equations (i.e. "laws") that all instances must satisfy

Don't use type classes if:

*   You are trying to just namespace things. That's what modules and namespaces are for.

*   A person using your type class cannot reason about how it will behave without looking at the source code of the instances

*   You find that the extensions you have to turn on are getting out of control

repository: stackflow-io/stackflow

repo_name: stackflow-io/stackflow


text:
---
id: style
title: Senegal Repo Styling Guide
sidebar_label: Style Guide
---

## Indentation

Keep indentations 2 characters deep. Do not use spaces to indent.

## Line Length

Each line of text in your code should be around 80 characters long.

We say 'around' intentionally, while we do prefer 80 characters, we are lenient and will overlook exceeding it by small amounts, especially for:

- An include statement
- A comment or raw-string that cannot be split onto multiple lines without reducing readability

## Casing
Use lowerCamelCase for variable and function identifiers,

UpperCamelCase for class identifiers,

and UPPERCASE for constants (the define preprocessor also defines a constant)

## Naming
Keep variable and function names as relevant as possible while also keeping them concise

```
uint8_t thisIsATemporaryVariable // ❌
uint8_t tmp // ✅
```

## Function Declarations

The return type, function identifier, and open parenthesis must always be on the same line. Parameters should be on the same line but may be split onto a new line where needed.

A typical function should look like:

```c
returnType identifier(type param1, type param2) {

}
```

If the parameters do not fit on a single line, they can be split as:

```c
returnType identifier(type param1,
                      type param2) {

}
```

If the first parameter cannot fit on a single line, give each parameter its own line:
```c
returnType identifier(
type param1,
type param2) {

}
```

Functions should have a clear objective, keep them short and "to the point".

## Braces, Spaces, and Newlines
- Do not place braces on a newline
- Do not place braces where a single statement will do, unless only one branch is a single statement

```
if (true) // no brace
    printf(. . .); // newline

// OR

if (true) { // braces
    ...
    return ...;
} else { // braces, although it is a single statement
    printf(. . .);
}
```

- Leave a space before every opening brace
- Leave a space after the following: `if, else, switch, case for, do, while, ","`
- Leave a space before and after any binary or ternary operator, but none after a unary operator
- Place single statements on a newline

## Trailing Whitespace
DONT, please...

## Comments
You cannot over-comment, well... maybe you can, but comment where it may be needed. Do not split lines in between of a sentence, unless it doesnt affect readablility.

repository: LaplaceKorea/Senegal

repo_name: LaplaceKorea/Senegal


text:
<img src="http://jade-press.org/public/jade-press-logo.png", alt="" />

# jadepress-cdn
seprated cdn-server example

has two example:(either one is enough)
- [nginx example conf](https://github.com/jade-press/jadepress-cdn/blob/master/example-nginx.conf)
- koa static file server
```bash
# test
git clone https://github.com/jade-press/jadepress-cdn.git
cd jadepress-cdn
npm i
cp test/test-config.js config.js
node app
```

## license
MIT

repository: jade-press/jadepress-cdn

repo_name: jade-press/jadepress-cdn


text:
# [ZephJS](../README.md) > Writing Components > Component Concepts

### Sections

- [Quick Start](./ComponentQuickStart.md)
- **Component Concepts**
- [Creating a New Component](./ComponentCreation.md)
- [Importing ZephJS](./ComponentImporting.md)
- [Defining the Component](./ComponentDefinition.md)
- [Inheritance](./ComponentInheritance.md)
- [HTML](./ComponentMarkup.md)
- [CSS](./ComponentStyling.md)
- [Resources](./ComponentAssets.md)
- [Attributes](./ComponentAttributes.md)
- [Properties](./ComponentProperties.md)
- [Lifecycle Handlers](./ComponentLifecycleHandlers.md)
- [Bindings](./ComponentBindings.md)
- [Event Handlers](./ComponentEvents.md)
- [Bundling for Distribution](./ComponentBundling.md)

### Understanding Core Concepts

Before jumping right into ZephJS it is a good idea to understand a few of the core concepts involved, both with ZephJS and with the underlying Web Standards ZephJS employs.

### Terminology

Throughout the ZephJS documentation we are going to use terms like Component, Element, etc.  Here's a quick glossary how these terms relate to ZephJS.

 - **Web Components**: Web Components is a set of browser standards set to work together to enable the creation of encapsulated custom elements for reuse.  You can learn more about Web Components at the [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/Web_Components).

 - **Component**: A component in ZephJS is a combination of its Component Name and the Component Definition.  This is represented internally by the ZephComponent class.

 - **Component Name**: The component name is a string the associates the Component to the HTML it is used in.  The Component Name is the HTML tag name once the Component is registered.  The name must contain at least one dash character, as per the Custom Elements API.

 - **Component Definition**: A component Definition is a function that is executed to describe the Component.  Inside of this function one uses zero or more Definition Methods.  When the Definition Methods are executed, they populate the Component Context which in turn is used to populate the Element when the Component is instantiated.

 - **Definition Method**: A Definition Method is one of the predefined methods one uses inside of the Component Definition to describe the Component. Examples of a Definition Method include `html()`, `css()`, `attribute()`, `onAdd()` and the like.

 - **Component Context**: The Component Context is a descriptive object of the Component that is used when the Component is instantiated.  During this instantiation, ZephJS goes through the Component Context and does various things based on the Component Definition.  For example, the the `html()` Definition Method was called in the Component Definition, during instantiation the contents of that `html()` call are append into the ShadowRoot of our new element.

 - **Element**: When we use Element, we mean any instance of an HTML element, including any Custom Element defined with ZephJS.  In many cases we use `element` in ZephJS handlers (Lifecycle Handlers, Event Handlers) to refer to the custom element itself.

 - **Custom Element**: In ZephJS nomenclature Custom Element always refers to a custom element defined with ZephJS.

 - **Internal Content**: Internal content is the HTML added to a Component with the `html()` Definition Method.  In may cases we use `content` in ZephJS handlers (Lifecycle Handlers, EventHandlers) to refer to this internal content.  Internal content so referenced is an instance of a Shadow DOM and behaves as a DOM node for purposes of iteration and updates.

 - **Tag**: Any HTML tag of the form `<tag-name>`.

 - **Attribute**: Any HTML attribute placed on a tag such as `<tag-name some-attribute="123">`.

 - **Property**: Any property on an Element.

 - **Content**: Unless specifically called Internal Content (see above), Content usually refers to the `innerHTML` value of an Element.  This includes all child node and child text nodes.

 - **ShadowRoot**: See [Shadow DOM](#shadow-dom) below.

 - **Lifecycle**: A Component goes through a series of lifecycle events as it is defined, initialized, created, etc.  Please read [Component Lifecycle](#component-lifecycle) below.

 - **Event**: An event occurs when some outside system or force (the user for example) interacts with a Component.  A left mouse click, for example, is an Event.

### ZephJS Concepts

#### Component Lifecycle

A custom element built with ZephJS has the following lifecycle, meaning it moves through the following stages at some point.  Each of these lifecycles has an associated Lifecycle Event. These events can be tapped within the component definition for you to use as needed.

**Definition** ⇒ **Initialization** ⇒ **Creation** ⇒ **Addition** | **Removal** | **Adoption** | **Attribute** | **Property**

 - **Definition**: Definition happens when you define a component via the `ZephComponents.define()` call.  It is where your definition methods are executed and the ComponentContext is created.  This will only occur once for each custom element defined.

 - **Initialization**: Occurs after an element is defined and registered with the Custom Elements API.  This is directly following the Definition lifecycle event.  This will only occur once for each custom element defined.

 - **Creation**: Occurs when someone instantiates a new instance of your custom element.  Each usage of your element in the html occurs a creation lifecycle event.  This will occur multiple times for a given custom element, once for each time it is instanced.

 - **Addition** | **Removal** | **Adoption**: Each of these occurs when an element is added or removed or adopted (moved from one document to another) to the DOM.  This may occur multiple times for a single element as it moves around the DOM.  For example, if I move a custom element from one DOM node to another both the Removal and Addition lifecycle events will occur.

 - **Attribute**: Occurs when a given attribute changes.  This may occur multiple times for a single custom element as the attributes changes on that element.

 - **Property**: Occurs when a ZephJS defined property of the element changes.  This may occur multiple times for a single custom element as the property changes over time.

#### ZephJS Events

ZephJS has several events it will fire on the `document` as it performs various functions.  You can tap into these events with `document.addEventListener()` like any other event.

 - **zeph:ready**: Fired after your page is loaded and there are no more `zeph:component:loading` events without a matching `zeph:component:defined` event.  Essentially this is ZephJS saying it believes all of the components are defined are ready to use.

 - **zeph:component:loading**: Fired when `ZephComponents.define()` is called, but before it is complete.  `ZephComponents.define()` can have internal definition methods that need to read data and as such returns a promise that will resolve when the definition when everything has read and is complete.

 - **zeph:component:defined**: Fired when `ZephComponents.define()` is complete and all dependent promises to define the component (such as loading html or css) have completed.

 - **zeph:component:undefined**: Fired when a component is actively undefined from ZephJS by way of the `ZephComponents.undefine()` method.  While a component may be undefined by ZephJS, there is currently no way to remove it from the Custom Element registry.

#### ZephJS Conventions

ZephJS does not enforce any specific conventions to how you layout your code, however, we do make the following recommendations:

 - Try to define only one component per `.js` file. Sometimes there are really good reasons to break this rule though.
 - Try to separate your markup/HTML code into a separate `.html` file that lives in the same directory and shares the same name.
 - Try to separate your style/CSS code into a separate `.css` file that lives in the same directory and shares the same name.
 - When in doubt, keep it simple!

### Web Component Concepts

#### What is a Web Component?

A Web Component is a set of Browser API standards for defining custom HTML elements that encapsulate their content (HTML), styling (CSS) and behavior (JavaScript) into a unified, reusable, HTML-compliant package.

However, as is often the case with browser standards, using Web Components can be a little confusing and esoteric.  ZephJS aims to solve that by defining a simple, lightweight wrapper around these standards and abstracting away the confusing bits.  Using ZephJS makes your components simple and clean, easy to read, and easy to work with.  ZephJS is not the only solution out there to do this, but we think it's the best.

> See [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/Web_Components) for more details.

#### Custom Elements Registry

The Custom Elements Registry is the API by which new custom elements are registered with the browser for use.  It involves calling the `customElements.define()` method with the name of the element you are defining and the class (which inherits from HTMLElement) for the element.  When the custom element is instantiated (by adding the tag or element to the DOM), the class you registered is instantiated via its constructor.

> See [MDN Using Custom Elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) for more details.

#### Shadow DOM

Shadow DOM is the system by which custom elements encapsulate thier HTML and CSS and prevent those items from leaking outside of the custom element.  For example, setting a CSS style for a custom element to make its background red will not make the background red of other element outside of the custom element.

Each element in your DOM may also have an associated ShadowRoot, which captures the encapsulated HTML and CSS within it.  This ShadowRoot is itself a DOM structure and can be manipulated just like the regular browser DOM but it is otherwise disassociated from the browser DOM.

> See [MDN Using Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) for more details.

repository: awesomeeng/zephjs

repo_name: awesomeeng/zephjs


text:
# Imprint

## Anbieterkennzeichnung

Anbieterkennzeichnung i. S. d. §5 Telemediengesetz (TMG) und Verantwortlich für den Inhalt nach §55 Abs. 2 Rundfunkstaatsvertrag (RStV):

Hochschulbibliothekszentrum des Landes Nordrhein-Westfalen (hbz)

Jülicher Str. 6
50674 Köln
Deutschland

Tel.: +49 221 400 75-0
Fax.: +49 221 4 00 75-180

E-Mail: [info-hbz@hbz-nrw.de](mailto:info-hbz@hbz-nrw.de)
Internet: http://www.hbz-nrw.de
ISIL: DE-605

Umsatzsteuer-Identifikations-Nummer: DE 123486775

 Das Hochschulbibliothekszentrum des Landes Nordrhein-Westfalen ist eine Einrichtung des öffentlichen Rechts. Es wird gesetzlich vertreten durch Dr. Silke Schomburg (Leiterin). Das hbz untersteht der Dienst- und Fachaufsicht des Ministeriums für Innovation, Wissenschaft und Forschung des Landes Nordrhein-Westfalen, Völklinger Straße 49, 40221 Düsseldorf. Inhaltliche Verantwortung gem. § 55 Abs. 2 RStV: Dr. Silke Schomburg (Leiterin).

 Für den Inhalt der verlinkten Seiten sind ausschließlich deren Betreiber verantwortlich.

## Privacy policy

OER World Map is a collection of free services by the Hochschulbibliothekszentrum des Landes Nordrhein-Westfalen (hbz), Jülicher Str. 6, 50674 Köln, Germany. The OER World Map is committed to privacy by design and complies with German data protection legislation.

The OER World Map allows you to

- access its content (A.), where we also do some analytics.
- register as a member of our community, so you can publish information on the OER World Map (B.)
- register for our newsletter (C.)

Depending on your use of the OER World Map different sets of data may be stored, as is described below.

### A. Accessing the content of the OER World Map

For providing the contents of the OER World Map to you, our server will process your

- IP address
- Browsertype and -version
- Operating system.

#### IT-Security

Solely for the purpose of handling security incidents, this web page automatically stores a log file of the data, which your browser sends when visiting the page, specifically:

- IP-Address
- Browsertype and -version
- Operating system
- Referrer URL (the page, from which this page was linked, including the search term, in case of a search engine)
- Time and date of the request.

#### Web analytics

This website uses [Piwik](https://piwik.org/), a web analytics open-source software. Piwik uses "cookies", which are text files placed on your computer, to help the website analyze how users use the site. The information generated by the cookie about your use of the website (including your IP address anonymized prior to its storage) will be stored on the server of the service provider in Germany. You may refuse the use of cookies by selecting the appropriate settings on your browser, however please note that if you do this you may not be able to use the full functionality of this website.

You may choose not to have a unique web analytics cookie identification number assigned to your computer to avoid the aggregation and analysis of data collected on this website. To make that choice, please click below to receive an opt-out cookie.

To get in touch with the administrators of this website, please contact: [info@oerworldmap.org](mailto:info@oerworldmap.org).

### B. Publishing Information related to Open Educational Resources on the OER World Map

#### Registration via Username and Password

You can register at this website to provide and publish information related to Open Educational Ressources.

When registering you can chose a username and a password, the latter is stored only in a hashed format, which allows us to verify that the correct password has been entered, but does not allow us to get access to the password itself, once the registration was successful.

#### All other information is public

Please be aware that all other information besides the password you may want to provide on the corresponding interfaces will be made pubicly available via the OER World Map. This includes your contact details, which will be made available to allow others to get in touch with you.

No information is mandatory. By registering you also express consent to publish any further information you provide. The categories, where you can provide information include, but are not limited to:

- a link to your homepage
- a biography
- a link to a picture
- your e-mail address
- further address details
- your affiliation
- stories, projects, events etc.

You can view, change, and delete the information at any later point in time. In order to delete your profile, please send us a mail to [info@oerworldmap.org](mailto:info@oerworldmap.org).

#### Logging of Activities as a registered user to improve the service

Your activities are logged and processed to further improve the service. This logging includes the

- time and date of the activity,
- as well as the content and
- a reference to your user account.

This information can be deleted upon request.

### C. Newsletter

Via this website you can also register for a newsletter which we maintain. In this case, you will have to consent to the following:

OER World Map and the corresponding newsletter is a service by the Hochschulbibliothekszentrum des Landes Nordrhein-Westfalen (hbz), Jülicher Str. 6, 50674 Köln, Germany.

You are giving your consent to processing your e-mail address solely for the purpose of sending you irregular updates on progress of the OER Wold Map and related projects (newsletter).

- hbz will not transfer the e-mail address we have received for newsletters to any third party, except for the purpose of sending out the newsletter, where we may work with a specialised provider contracted by us.
- You can, of course, unsubscribe from the newsletter at any time via e-mail to [oerworldmap-news-leave@listen.hbz-nrw.de](mailto:oerworldmap-news-leave@listen.hbz-nrw.de), or by following the instructions provided at the bottom of each newsletter. After unsubscribing, your e-mail address will be removed from the system.
- You will receive a first e-mail that requires you to confirm your subscription. We do this to avoid people registering other people and spelling errors. The system will await a confirmation for two weeks, during which the e-mail address is temporarily stored, after this period the e-mail address will permanently be removed from our system.

### D. Versions

This is the second version of this policy (2.0) as of June 29th 2016. The previous version (1.0) can be found [here](https://github.com/hbz/oerworldmap/blob/e14aa22df3ebecd6f659f63e0f5e3e991a3aef8e/public/pages/Imprint.md).

repository: formimkontext/oerworldmap

repo_name: formimkontext/oerworldmap


text:
## Scala Akka Rest Api

### Tech Stack

* [Akka] - Highly concurrent, distributed, and resilient message-driven applications on the JVM
* [Akka-HTTP] - Streaming-first HTTP server/module of Akka

### Todos

 - TBD

License
----

MIT

   [Akka]: <https://akka.io/>
   [Akka-HTTP]: <https://github.com/akka/akka-http>

repository: CodexTapes/scala-akka

repo_name: CodexTapes/scala-akka


text:
# shooter-game

Description

## Tests

```sh
npm install
npm test
```

## Dependencies

-   [auth0-web](https://github.com/brunokrebs/auth0-web): [![Auth0 Web build status][travis-image]][travis-url] [![Code Coverage][codecov-image]][codecov-url] [![License][license-image]][license-url] [![NPM version][npm-image]][npm-url]
-   [prop-types](https://github.com/facebook/prop-types): Runtime type checking for React props and similar objects.
-   [react](https://github.com/facebook/react): React is a JavaScript library for building user interfaces.
-   [react-dom](https://github.com/facebook/react): React package for working with the DOM.
-   [react-redux](https://github.com/reduxjs/react-redux): Official React bindings for Redux
-   [react-scripts](https://github.com/facebookincubator/create-react-app): Configuration and scripts for Create React App.
-   [redux](https://github.com/reactjs/redux): Predictable state container for JavaScript apps
-   [socket.io-client](https://github.com/Automattic/socket.io-client): [![Build Status](https://secure.travis-ci.org/socketio/socket.io-client.svg?branch=master)](http://travis-ci.org/socketio/socket.io-client) [![Dependency Status](https://david-dm.org/socketio/socket.io-client.svg)](https://david-dm.org/socketio/socket.io-client) [![devDependency Status](https://david-dm.org/socketio/socket.io-client/dev-status.svg)](https://david-dm.org/socketio/socket.io-client#info=devDependencies) [![NPM version](https://badge.fury.io/js/socket.io-client.svg)](https://www.npmjs.com/package/socket.io-client) ![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?style=flat) [![](http://slack.socket.io/badge.svg?)](http://slack.socket.io)
-   [styled-components](https://github.com/styled-components/styled-components): Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅


text:
# SCARGC.jl

*A Julia Implementation of Stream Classification Algorithm Guidded by Clustering*

[![Build Status](https://travis-ci.org/MarinhoGabriel/SCARGC.jl.svg?branch=master)](https://travis-ci.org/MarinhoGabriel/SCARGC.jl)
[![Coverage Status](https://codecov.io/gh/MarinhoGabriel/SCARGC.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/MarinhoGabriel/SCARGC.jl)
[![License File](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/MarinhoGabriel/SCARGC.jl/blob/master/LICENSE)

[SCARGC.jl](https://github.com/MarinhoGabriel/SCARGC.jl) is a Julia implementation
of Stream Classification Algorithm Guided by Clustering - SCARGC -, a data stream
classifier in non-stationary environments with extreme verification latency. The
implementation was made using the paper as base and the official implementation
of SCARGC, in MatLab.

## Overview

Most of research data on data stream classification with concept drift, assumes
that there's a availability of the labels, instantly or with some delay after
the classification occurs. Then, these methods verify if the model is outdated
based on the classification information obtained on the recent data.

[SCARGC.jl](https://github.com/MarinhoGabriel/SCARGC.jl) is an algorithm that
make predictions with a EVL scenary, where no labeled data is received after the
initialization of the model. So, for example, we receive a small amount of labeled
data, build a classifier model with this data and, after that, there's no labeled
data "arriving". We just predict and update the model to get a better result in
the next iteration.

## Installation

In the Julia's package manager, type:

```julia-REPL
pkg> add SCARGC
```

## Tutorials

You can find some notebooks explaining how to use the package in
[experiments](https://github.com/MarinhoGabriel/SCARGC.jl/tree/master/experiments).

## Quick example

We can see below a example of using the SCARGC.jl package to predict labels in
datasets.

!!! note
    It's important to say that the dataset used in the example is a synthetic
    dataset, so we already have the instances's label. Using it, we can say the
    accuracy of the algorithm. If you're using it with some real application,
    with no data, the accuracy calculus isn't going to happen.

```@example overview
using SCARGC

# loading the dataset
dataset = "../../src/datasets/synthetic/1CHT.txt"
data = SCARGC.extractValuesFromFile(dataset, 16000, 3)

# predicting data
labels, accuracy = SCARGC.scargc_1NN(data, 0.3125, 300, 2)

# then, we can print the accuracy
println("Accuracy: ", accuracy, "%")
```

## Results

Today, the results of [SCARGC.jl](https://github.com/MarinhoGabriel/SCARGC.jl) are
equivalent to the first implemented, in MatLab.

In the picture below, the blue bars represent the original SCARGC and the
black ones represent SCARGC.jl results on those datasets (represented in X asis).

![Result](https://github.com/MarinhoGabriel/SCARGC.jl/blob/master/results/result.jpeg?raw=true)

## References

[Souza, V. M. A.; Silva, D. F.; Gama, J.; Batista, G. E. A. P. A.: **Data Stream Classification Guided by Clustering on Nonstationary Environments and Extreme Verification Latency**. SIAM International Conference on Data Mining (SDM), pp. 873-881, 2015](https://repositorio.inesctec.pt/bitstream/123456789/5325/1/P-00K-AN4.pdf)


text:
---
layout: page
title: Sensory Representations and Reinforcement Learning
image: "mathias_diag2.png"
parents:
    - Behavior
authors:
    - Mathias Schmerling
---
There is a long-standing interest in understanding the sensory processing of biological and artifical networks of neurons in terms of representations - computations of the raw sensory variables such as light pulses or pixel intensities into abstract variables that can be identified with meaningful variables of the environment, such as spatial position of an agent. Despite impressive recent progress in learning representations with Deep Neural Networks, it is as yet not well understood what characterizes good representations. We understand good representations as representations that generalize well across tasks and environments and approach the problem of learning them with a combination of spectral techniques such as Slow Feature Analysis and Deep Reinforcement Learning.


text:
# Fluent

Java 8 Streams and Iterables on Steroids.

# Build status

[![Build Status](https://api.travis-ci.org/CodeStory/fluent.png)](https://travis-ci.org/CodeStory/fluent)

# Environment

- `java-1.8`

## Maven

Release versions are deployed on Maven Central:

```xml
<dependency>
  <groupId>net.code-story</groupId>
  <artifactId>fluent</artifactId>
  <version>1.4</version>
</dependency>
```

# Build

```bash
mvn clean verify
```

# Deploy on Maven Central

Build the release:

```bash
mvn release:clean release:prepare release:perform
```

repository: CodeStory/fluent

repo_name: CodeStory/fluent