text:
# servo-k8s-multijob
PoC servo with integrated measure for monitoring execution time of k8s one-time jobs (restartPolicy=Never)

This project implements a cut-down 'servo' daemon (similar to git:git@github.com:opsani/servo) with integrated 'measure' function that collects run time of pods that match the following criteria:
- run in a specific namespace (configured when starting the daemon)
- have an env variable named "JOBID" set to a non-empty value

The daemon is primarily intended to be run in a container. For convenient access to the Kubernetes API, it should be started as a pod or a deployment, with a configured service account that gives it automatic access to the API. See the `example` directory, it contains a set of files that can be used with 'kubectl create' to set up the necessary service account, the RBAC trust objects and a deployment running the servo container.

## Building the container

From the root directory of this repo, run (change the -t value as desired, it should be a tag that you can push to your Docker registry):

    tag=$docker_acct/servo-k8s-multijob:latest
    docker build -t "$tag" .
    docker push "$tag"

## Building the  optional 'monitor' container

This image can be used if it is desired to collect additional process stats from the jobs. It is added as an additional container to the pods recognized as being 'jobs'.

From the `mon` directory of this repo, run (change the -t value as desired, it should be a tag that you can push to your Docker registry):

    tag=$docker_acct/podmon:latest
    docker build -t "$tag" .
    docker push "$tag"

Use the created image by setting `OPTUNE_SLEEPER_IMG` to the name of the image built from `mon` (see Configuration below).

## Configuration

The following environment variables can be set to configure the daemon (if running in a deployment, you can add them to 'env' in the container spec):

OPTUNE\_URL url to post data to. The string can contain {acct} and {app\_id} replacement strings, these will be set to the value of $OPTUNE\_ACCOUNT and the pod's JOBID env variable, respectively. This defaults to "https://us-central1-optune-saas-collect.cloudfunctions.net/metrics/{acct}/{app\_id}/servo". NOTE the default URL requires an authentication token, contact the Opsani to get one.

OPTUNE\_ACCOUNT a string to be inserted in the target URL; this should contain only valid URL path characters, without /.

OPTUNE\_AUTH\_TOKEN a 'Bearer' token to send with the post request. If this is not set, no 'Authorization' header will be sent.

POD\_NAMESPACES a comma-separated list of namespaces to watch. If not set, "default" is assumed.
                                                                               `
OPTUNE\_APP\_ID the location of a string value in the pod object that is recognized as the 'application ID'. This is specified as a filepath-like string. Each path element is a map key or array index to use in a sequence to descend to the required value. A path element in the form [key] is used to search an array containing maps in the form {"name":k, "value":v} (as used in the container spec's 'env' object). The default is: `"spec/containers/0/env/[JOBID]"`.

OPTUNE\_SLEEPER\_IMG (optional) docker image to run as an additional container in the watched pods. This image should run a process that sleeps forever. This is used to keep the pod 'active' even after its one-time workload container has exited, so that pod statistics can be collected 'post-mortem'. It may also be used to run a 'monitor' image created from the Dockerfile found in the `mon` directory, this will extend the stats collected by adding `cpu_time` and `max_memory`. **NOTE** if using the 'monitor' image here, the environment variable `SELF_IP` should be set exactly as shown in `example/deployment.yaml`.

## Example configuration for running in a k8s deployment

The `example/` directory contains files that can be used to configure and run the daemon as a deployment on your k8s cluster.

The svc-acct.yaml and svc-role.yaml files set up a trusted service account giving access to designated deployments to access the k8s API; these can be used as they are or edited if needed; the deployment.yaml file must be copied and edited according to your setup.

    # === trust setup
    # this creates a service account named opsani-servo:
    kubectl create -f svc-acct.yaml
    # this creates a role 'opsani-servo-role' with access to pod objects
    # in all namespaces and then gives the opsani-servo account that role:
    kubectl create -f svc-role.yaml

Copy and modify deployment.yaml and set the following in spec/template/spec/containers/:
`image:` the image tag, as built and pushed above
`env/["name":"OPTUNE_AUTH_TOKEN"]/value:` your API access token
`env/["name":"OPTUNE_ACCOUNT"]/value:` a fully-qualified DNS name that identifies you or your application (or another unique string that can be used in a URL path). NOTE, in the future Opsani may require this to be a string assigned to you explicitly.

Other env variable settings can be added, if desired, see **Configuration** above.

Create the deployment:

    kubectl create -f my-deployment.yaml

## Enabling Initializer Configuration

NOTES:

- the initializer configuration is not required if running the driver in 'monitor-only' mode (though it will not be able to hold on to exited pods and measure used CPU time in this case).
- if initializer configuration is set up, ensure that the driver is running with sufficient access to the Kubernetes API to be able to initialize the pods. See the `example/svc-*.yaml` files, they can be used to configure a service account for the driver's pod with the correct access privileges.

The servo daemon recognizes initializer configuration named `initcfg.optune.io`, if one is present in metadata/initializers/pending in newly-created pods.

Currently, it does nothing other than remove the initializer annotation to let the pod run. The support is indended to test the initializer setup and for future support in the servo to apply configuration settings to pods that are about to start, based on an 'ADJUST' command received from the Optune service.

Below is an example initializer configuration object that can be created with 'kubectl -f create'. NOTE this should be created only *after* starting the daemon, to ensure it does not block the startup of new pods. If the daemon is not running, new pods that are created will remain uninitialized and will not run.

    apiVersion: admissionregistration.k8s.io/v1alpha1
    kind: InitializerConfiguration
    metadata:
      name: optune
    initializers:
      # the name needs to be fully qualified, i.e., containing at least two "."
      - name: initcfg.optune.io
        rules:
          # apiGroups, apiVersion, resources all support wildcard "*".
          # "*" cannot be mixed with non-wildcard.
          - apiGroups:
    	  - ""
    	apiVersions:
    	  - "*"
    	resources:
    	  - pods


text:
Wetsaw
======

Wetsaw is a library and command line application for rendering geographic tiles in the XYZ tile format. It is written in Python and builds on the [Mapnik](http://mapnik.org/) rendering library.

Features
========

* **Batched tile rendering**: Multiple tiles are automatically rendered together in Mapnik for efficiency, then the tiles themselves are cut from the larger image
* **Efficiently renders large tilesets**: The library internally generates tile information as it is needed for rendering, allowing it to render millions of tiles in a consistent, small amount of memory
* **Extent highlighting**: (Optional) Generate a GeoJSON file that contains a world polygon with a hole matching the extent rendered
* **Preserve old tiles**: (Optional) Tile rendering can be run to fill in gaps rather than starting from scratch
* **Watermarking**: (Optional) Overlay a transparent png on all tiles. This image has a slight random offset within the tile to hinder automatic removal
* **Status updates**: (Optional) Communicate current rendering progress through a predefined file
* **S3 file upload**: (Optional) Publish the resulting tiles directly to Amazon S3
* **WeoGeo preview data support**: (Optional) Generate all of the preview data needed to upload to WeoGeo's servers

Requirements
============

* Python (tested on 2.6.1+, not yet tested on 3.0)
* Mapnik (0.7.1 or 2.X)
* PIL (test on 1.1.7)
* boto (for s3 file upload)

license: MIT

repository: kyroskoh/wetsaw

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: kyroskoh/wetsaw


text:
# htt*pdf*

[![CircleCI](https://circleci.com/gh/n6g7/httpdf.svg?style=svg)](https://circleci.com/gh/n6g7/httpdf)
[![Docker Hub](https://badgen.net/docker/pulls/n6g7/httpdf)](https://hub.docker.com/r/n6g7/httpdf/)

A small HTTP microservice to generate PDFs.

[react-pdf](https://react-pdf.org/) + [Express](https://expressjs.com/) + [Docker](https://www.docker.com/)

## Getting started

- Extend the [`n6g7/httpdf` image](https://hub.docker.com/r/n6g7/httpdf/) and copy your own PDF documents source:
  ```Dockerfile
  FROM n6g7/httpdf:latest
  COPY ./documents $HTTPDF_DOCUMENTS_SRC
  RUN yarn prebuild
  ```
- Build and run:
  ```sh
  docker build . -t my_httpf
  docker run my_httpf -p 8000:80
  ```
- Generate pdf with HTTP requests:
  ```sh
  http localhost:8000/doc?a=Hello&b=World > doc.pdf
  http POST localhost:8000/doc a=Hello b=World > doc.pdf #equivalent
  ```

See the [example directory](./example) for a full example with docker-compose.

## Features

### Props

Query parameters and body data sent with the request are passed to the react components as props.

They are validated using [prop-types](https://github.com/facebook/prop-types) and, if there are any, errors are returned with a 400 HTTP response.

```sh
$ http "localhost:8000/demo?a=a" -p hb
HTTP/1.1 400 Bad Request
Connection: keep-alive
Content-Disposition: attachment; filename="demo.pdf"
Content-Length: 90
Content-Type: application/json; charset=utf-8
Date: Sun, 04 Nov 2018 00:31:23 GMT

{
    "errors": [
        "The prop `b` is marked as required in `Test`, but its value is `undefined`."
    ]
}
```

### Custom filename

By default, the suggested filename of the generated pdf will be computed from the component's file name (`doc.js` -> `doc.pdf`).
If you would like to receive a different filename, you can override it with the `filename` query parameter:

```sh
$ http "localhost:8000/demo?filename=custom.pdf" -p h
HTTP/1.1 200 OK
Connection: keep-alive
Content-Disposition: attachment; filename="custom.pdf"
Content-Type: application/pdf
Date: Sun, 04 Nov 2018 00:29:58 GMT
Transfer-Encoding: chunked
```

### Watch mode

Use the `HTTPDF_WATCH` environment variable while developing to watch and automatically reload files as you make changes:

```Dockerfile
FROM n6g7/httpdf:latest
ENV HTTPDF_WATCH 1
COPY ./documents $HTTPDF_DOCUMENTS_SRC
RUN yarn prebuild
```

### Images

Copy your image files anywhere on the docker image and you can use the react-pdf API to render images:

```js
import { Image, View } from "@react-pdf/renderer";

const Component = ({ path, ...props }) => (
  <View {...props}>
    <Image src={`/images/${path}`} />
  </View>
);
```

See [react-pdf docs](https://react-pdf.org/components#image) for the list of available props.

### Custom fonts

Copy your font files anywhere on the docker image and you can use the react-pdf API to use custom fonts:

```js
import { Font, StyleSheet } from "@react-pdf/renderer";

Font.register("/fonts/montserrat.ttf", {
  family: "Montserrat",
});

const styles = StyleSheet.create({
  page: {
    flexDirection: "row",
    fontFamily: "Montserrat",
    backgroundColor: "#E4E4E4",
  },
});
```

Browse the [test files](./__tests__/app.js) for a description of all the features.

### Async props

Perform asynchronous actions before rendering in the `getAsyncProps` export:

```js
export default function AsyncPropsTest({ result }) {
  return (
    <Document>
      <Page size="A4">
        <Text>{result}</Text>
      </Page>
    </Document>
  );
}

export const document = true;

export async function getAsyncProps(props) {
  return {
    result: await someAPIcall(),
  };
}
```

## Contributing

- Running in dev: `yarn install && yarn`
- Release: `yarn version`

gha_language: JavaScript

gha_license_id: MIT


text:
## vNEXT

* Added `RandomPrimitive` test primitive.

## v2018.1.5

* Made use of the PyPI package official. Documented a requirement for
  `--process-dependency-links` argument during installation.
* Arguments `learning_rate` and `weight_decay` in `GradientCompositionalityMixin` renamed to
  `fine_tune_learning_rate` and `fine_tune_weight_decay`, respectively.
  `learning_rate` is a common hyper-parameter name.
  [#41](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/41)

## v2017.12.27

* Documented `produce` method for `ClusteringPrimitiveBase` and added
  `ClusteringDistanceMatrixMixin`.
  [#18](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/18)
* Added `can_accept` class method to primitive base class and implemented its
  default implementation.
  [#20](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/20)
* "Distance" primitives now accept an extra argument instead of a tuple.
* `Params` should now be a subclass of `d3m_metadata.params.Params`, which is a
  specialized dict instead of a named tuple.
* Removed `Graph` class. There is no need for it anymore because we can identify
  them by having input type a NetworkX graph and through metadata discovery.
* Added `timeout` and `iterations` arguments to more methods.
* Added `forward` and `backward` backprop methods to `GradientCompositionalityMixin`
  to allow end-to-end backpropagation across diverse primitives.
  [#26](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/26)
* Added `log_likelihoods` method to `ProbabilisticCompositionalityMixin`.
* Constructor now accepts `docker_containers` argument with addresses of running
  primitive's Docker containers.
  [#25](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/25)
* Removed `CallMetadata` and `get_call_metadata` and changed so that some methods
  directly return new but similar `CallResult`.
  [#27](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/27)
* Documented how extra arguments to standard and extra methods can be defined.
* Documented that all arguments with the same name in all methods should have the
  same type. Arguments are per primitive not per method.
  [#29](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/29)
* Specified how to define extra "produce" methods which have same semantics
  as `produce` but different output types.
  [#30](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/30)
* Added `SingletonOutputMixin` to signal that primitive's output contains
  only one element.
  [#15](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/15)
* Added `get_loss_primitive` to allow accessing to the loss primitive
  being used.
* Moved `set_training_data` back to the base class.
  This breaks Liskov substitution principle.
  [#19](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/19)
* Renamed `__metadata__` to `metadata` attribute.
  [#23](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/23)
* Package now requires Python 3.6.
* Repository migrated to gitlab.com and made public.
* `set_random_seed` method has been removed and replaced with a
  `random_seed` argument to the constructor, which is also exposed as an attribute.
  [#16](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/16)
* Primitives have now `hyperparams` attribute which returns a
  hyper-parameters object passed to the constructor.
  [#14](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/14)
* `Params` and `Hyperparams` are now required to be pickable and copyable.
  [#3](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/3)
* Primitives are now parametrized by `Hyperparams` type variable as well.
  Constructor now receives hyper-parameters as an instance as one argument
  instead of multiple keyword arguments.
  [#13](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/13)
* `LossFunctionMixin`'s `get_loss_function` method now returns a value from
  problem schema `Metric` enumeration.
* `LossFunctionMixin` has now a `loss` and `losses` methods which allows one
  to ask a primitive to compute loss for a given set of inputs and outputs using
  internal loss function the primitive is using.
  [#17](https://gitlab.com/datadrivendiscovery/primitive-interfaces/issues/17)

## v2017.9.27

* Initial version of the unified Python API.


text:
- Max object size is 5TB (5000GB)
- Uploading file more than 5GB, use [[S3 Multi Part Upload]]
- If [[S3 Object Versioning]] is enabled and [[S3 Object]] is overwritten, [[S3 Object]] version will get incremented: 1, 2, 3, ...

url: https://raw.githubusercontent.com/nhutlong128/obsidian/565b4184e63eebdd39f33cff5b1b31fc27df8369/Knowledge Vault/Cloud Computing/Permanent Notes/S3 Object.md

filename: S3 Object.md


text:
---
layout: page
title: "Chambers Wharf"
sharing: true
footer: true
---
Tenure switches from social rent to affordable rent have become routine practice for new developments in Southwark. The arrangement suits both developers and the council, who can [claim the credit](http://www.southwarknews.co.uk/news/100-affordable-homes-open-on-brownfield-site/) for delivering new social rented housing, which is actual fact affordable rent.

We discovered such a tenure switch at __Chambers Wharf__, Berkeley Homes and Peabody Housing Association's latest development on Southwark's riverside. In May this year, Councillor Williams [trumpeted](http://www.berkeleygroup.co.uk/press-releases/2015/southwark-development-sets-new-standard-for-affordable-housing-in-london) the completion of _"106 social rented apartments and 14 social rented family homes,"_ which he claimed was proof that the council is _"tackling the housing crisis head on and are doing all we can to build the quality affordable homes our residents so desperately need"_.

But What Councillor Williams' press statement didn't say, was that the 89 of the social rented homes had been converted to affordable rents of 65% market rent by [mutual agreement](http://moderngov.southwark.gov.uk/ieDecisionDetails.aspx?Id=3617) with the council, following a 'viability review' of the scheme in 2013.

![](http://crappistmartin.github.io/images/chamberswharf.jpg)

Chambers wharf comprises a total of 587 homes on the site of the former wharf.


text:
# Quick Start Guide
Once PowerModelsDistribution is installed, Ipopt is installed, and a network data file (e.g. `"case5_c_r_a.m"` or `"case3_unbalanced.dss"` in the package folder under `./test/data`) has been acquired, an unbalanced AC Optimal Power Flow can be executed with,

```julia
using PowerModelsDistribution
using Ipopt

run_ac_mc_opf("case3_unbalanced.dss", with_optimizer(Ipopt.Optimizer))
```

## Getting Results

The run commands in PowerModelsDistribution return detailed results data in the form of a dictionary. Results dictionaries from either Matpower-style `.m` or OpenDSS' `.dss` files will be identical in format. This dictionary can be saved for further processing as follows,

```julia
result = run_ac_mc_opf("case3_unbalanced.dss", with_optimizer(Ipopt.Optimizer))
```

## Accessing Different Formulations

The function "run_ac_mc_opf" is a shorthands for a more general formulation-independent OPF execution, "run_mc_opf".
For example, `run_ac_mc_opf` is equivalent to,

```julia
using PowerModels
run_mc_opf("case3_unbalanced.dss", ACPPowerModel, with_optimizer(Ipopt.Optimizer))
```

Note that PowerModels needs to be loaded to access formulations which are extended by PowerModelsDistribution, here "ACPPowerModel". The PowerModel "ACPPowerModel" indicates an AC formulation in polar coordinates.  This more generic `run_mc_opf()` allows one to solve an OPF problem with any power network formulation implemented in PowerModels or PowerModelsDistribution.  For example, the SDP relaxation of unbalanced Optimal Power Flow (branch flow model) can be run with,

```julia
using SCS
run_mc_opf_bf("case3_unbalanced.dss", SDPUBFPowerModel, with_optimizer(SCS.Optimizer))
```

Note that you have to use a SDP-capable solver, e.g. the open-source solver SCS, to solve SDP models.

## Inspecting the Formulation

The following example demonstrates how to break a `run_mc_opf` call into seperate model building and solving steps.  This allows inspection of the JuMP model created by PowerModelsDistribution for the AC-OPF problem,

```julia
data = PowerModelsDistribution.parse_file("case3_unbalanced.dss")
pm = PowerModels.instantiate_model(data, ACPPowerModel, PowerModelsDistribution.build_mc_opf; multiconductor=true, ref_extensions=[ref_add_arcs_trans!])
print(pm.model)
optimize_model!(pm, optimizer=with_optimizer(Ipopt.Optimizer))
```

gha_license_id: NOASSERTION


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

### Description

Stack-based buffer overflow in AloahaPDFViewer <IP_ADDRESS> and earlier in Aloaha PDF Suite FREE allows remote attackers to execute arbitrary code via a crafted PDF file.

### POC

#### Reference
- http://www.coresecurity.com/advisories/aloaha-pdf-suite-buffer-overflow-vulnerability

#### Github
- https://github.com/0xCyberY/CVE-T4PDF
- https://github.com/ARPSyndicate/cvemon

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

repo_name: trickest/cve


text:
# RRT Algorithm:
## Rapidly-Exploring Random Tree

#### Author: Chahat Deep Singh
#### March 27 2017
#### University of Maryland College Park
 -----------------------------------

Instructions:
============
 - Run the file RunMe.m in Matlab (R2007b+)
 - Make sure the files:
 	(a). create_map (Not required for the RunMe file)
 	(b). draw
 	(c). edge_fn
 	(d). find_new_node
 	(e). goal_edge
 	(f). map.mat
 	(g). nearest
 	(h). RRT
  (i). problem
 	are in the same folder.

 - If there is no map.mat, run create_map file to generate
 	the map with obstacles. (it will generate map.mat)
 - To update the map, run create_map.m and then Run RunMe.m for RRT.
 - Input argunments are to be changed in 'problem.m' file

Input Arguments:
================
- Start Node: start_node [x y]
- End Goal: goal [x y]
- r_goal: Radius of the End Goal region
- Epsilon: Minimum Step size for the RRT
- [Change the input data](problem.m)

Sample Outputs
=======
- [Output 1](Output/p1.png)
- [Output 2](Output/p2.png)
- [Output 3](Output/p3.png)
- [Output 4](Output/p4.png)
- [Output 5](Output/p5.png)

![RRT Output](Output/p5.png)

Requirements
============
- Matlab R2014b or later.

Notes
=======
- Tested on MATLAB R2016b, Arch Linux 2017.03.01, Kernel: 4.9.11

License
============
RRT (Rapidly-Exploring Random Trees) using [the MIT license](LICENSE).

repository: chahatdeep/rrt

repo_name: chahatdeep/rrt


text:
## How to author

If you wants to DIY the event, right click on any tiles that has empty events.

Then after hitting the button >, you will see a blank list, right click and **add a instruction**. And double click on the new line of the list, and choose your instruction. After choosen, single click on the instruction and it will pop out the pane to customized the instruction (except for the instruction that is unneccessary to be customized such as 'go to shop').

If you wants to use the given Pokemon, go to the second scene and drag the Pokemon into the certain position on the map, and it will pop out a window to customize the event for Pokemon.

If you wants to fight with an NPC, drag the NPC to the map and do the similar thing as DIY an event.

After all, go to the final scene to customize the player, set your currency and your initial position on the map.

If there is anything that you feel confused, try to right click :).

## How to play
For moving in the map, press ↑↓←→,

For continuing dialogue with NPC, press F.

For saving the game, press ENTER and press ↑↓ to choose your options. If the option is decided, press Z.

repository: heyao-yang/VOOGASALAD

repo_name: heyao-yang/VOOGASALAD


text:
---
title: 'SPGetDisplayFromStatic'
function: '$().SPServices.SPGetDisplayFromStatic'
certification:
  sp2007: 'certified'
  sp2010: 'certified'
description: 'This function returns the DisplayName for a column based on the StaticName.'
introduced: 0.4.0
---

## Functionality

This function returns the [DisplayName](../glossary.md#displayname) for a column based on the [StaticName](../glossary.md#staticname). This simple utility function, which utilizes the GetList operation of the Lists Web Service, seemed useful to expose as a public function.

## Prerequisites

_None_

## Syntax

``` javascript
var thisDisplayName = $().SPServices.SPGetDisplayFromStatic ({
  webURL: "",
  listName: "",
  columnStaticName: "",
  columnStaticNames: {}   // Added in v0.7.2 to allow multiple columns
});
```

### webURL

The URL of the Web (site) which contains the listName. If not specified, the current site is used. Examples would be: "/", "/Accounting", "/Departments/HR", etc. Note: It's always best to use relative URLs.

### listName

The name or GUID of the list. If you choose to use the GUID, it should look like: "{E73FEA09-CF8F-4B30-88C7-6FA996EE1706}". Note also that if you use the GUID, you do not need to specify the webURL if the list is in another site.

### columnStaticName

The [StaticName](../glossary.md#staticname) of the column.

### columnStaticNames

The [StaticName](../glossary.md#staticname)s of the columns in an array. This option was added in v0.7.2 to allow multiple column conversions at the same time.

## Example

The following example will return the [DisplayName](../glossary.md#displayname) for the Title column in the States list in the current site.

``` html
<script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.8.2.min.js"></script>
<script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery.SPServices-0.7.2.min.js"></script>
<script language="javascript" type="text/javascript">
  $(document).ready(function() {

    // Retrieve one value
    var thisDisplayName = $().SPServices.SPGetDisplayFromStatic ({
      listName: "States",
      columnStaticName: "Title"
    });
    alert("The DisplayName for the Title column is: " + thisDisplayName);
    ... do more stuff...

    // Retrieve multiple values
    var thisDisplayNames = $().SPServices.SPGetDisplayFromStatic ({
      listName: "States",
      columnStaticNames: ["Title", "State"] });
    alert("The DisplayNames for the columns are: " + thisDisplayNames);
    ... do more stuff...
  });
</script>
```

repository: sympmarc/SPServices

repo_name: sympmarc/SPServices


text:
# VenlafaxOS
VenlafaxOS is my personal studying project. Some code and lower design is inherited from my old project [OmochaOS](https://github.com/Oyami-Srk/OmochaOS). Why am I interseted in OS-Developing is under the readme of that project.

#### Now preparing for College Entrance Examination

# Build
Run `make` in project root dir.
* #### dependencies
    * python3 (with pyyaml supported)
    * compiling-toolchain (gcc ar ld nm objdump objcopy)
        * set `TOOLCHAIN_PREFIX` in Makefile to use croee-compiler, this project is developed under MacOS and built passed on Linux-based system. If you are using MacOS, install `x86_64-elf-binutils` and `x86_64-elf-gcc` is good enough. If you are using Linux, just make sure above tools is installed. Otherwise you may figure it out on your platform.
    * nasm
    * useful utilities (cat sed awk tee)
* #### build process
    * compile kernel's core and modules within kernel space into object
    * link some general used code and syscall wrapping into `libos.a`
    * compile init code (linked with `libos.a`) into elf executable file `init.out`
    * compile init `package.S` to object `init.out.o` which contains full content of `init.out` by using `.incbin`
    * link kernel object and `init.out.o` to `kernel.out`
    * build modules (not modules in kernel dir that's builtin modules)

# Build boot image
Run `make boot` in project root dir.
This command is depend on `make attach` and `make detach` which only implement on MacOS (based on `hdiutil` and `diskutil` comes with macos) and Linux (based on `udisksctl` controlled loop-device). If you cannot make it, try to implement it yourself or build image yourself.
This command uses `rsync` to copy everything in `tools/root_dir` to image's root dir and `cp` to copy `grub.cfg` to `/boot/grub/grub.cfg` of image.
This command copies `tools/HD_grub2.img` (which contains a formatted disk image with grub2 installed and a FAT32 part. FAT32 part is the first part of disk, contains grub2 boot files.)

# Run
Run `make qemu` or `make bochs` in project root dir.
* #### dependencies
    * bochs or qemu

# Debug
If qemu/bochs is installed and `make attach/detach` is implemented. You can use `make debug DEBUG_WAY=qemu/bochs` to build and run in one command.

# System Design
Venlafaxos is micro-kernel but with *memory* and *systask* running in kernel space (has kernel symbol linked)
Currently most of modules are running in kernel space. Those modules will exit when modules from disk is properly loaded.
All of modules are running under ring 1. Only two syscall `__recv_msg` and `__send_msg`, `interrupt_handler` are running under ring 0 after core finish boot up.
`systask` should give a common way to access core data in `struct environment`(not impl yet)

# Road Map
* VFS
* Port Newlib
* Shabby Shell
* ACPI
* SMP Support
* Process scheduler
* Graphic Interface

repository: Oyami-Srk/Venlafaxos

repo_name: Oyami-Srk/Venlafaxos


text:
# NGINX with HTTP2 Support and WebSSL 1.0.2

## Supported tags and respective `Dockerfile` links

- `latest` [(master)](https://github.com/mujz/nginx/blob/master/Dockerfile)
- `with_image_filter_module` [(http_image_filter_module)](https://github.com/mujz/nginx/blob/with_image_filter_module/Dockerfile)

The [official NGINX docker image](https://hub.docker.com/_/nginx) on Docker Hub is built with WebSSL 1.0.1, which doesn't support [ALPN](https://tools.ietf.org/html/rfc7301). If you want Chrome users to be able to use HTTP2 with your website, you must use a version of WebSSL that supports ALPN. OpenSSL only started supporting ALPN in version 1.0.2. For more information on the problem, check out [this blog post](https://www.nginx.com/blog/supporting-http2-google-chrome-users/) by NGINX.

If you use the tag `with_image_filter_module`, you get a version of nginx compiled with the `http_image_filter_module`. Check out [this use case and implementation](https://www.nginx.com/blog/responsive-images-without-headaches-nginx-plus/) using `http_image_filter_module`

#Usage
You can use this image the same way you would the [official NGINX image on docker hub](https://hub.docker.com/_/nginx); as abase image for your customized nginx image like so:

```Dockerfile
FROM mujz/nginx

COPY nginx.conf /etc/nginx/
COPY conf.d /etc/nginx/conf.d/
COPY html /usr/share/nginx/html/
```

Or by simply running a container using this image and mounting your config files like so:

```bash
docker run -d -p 80:80 \
    -v nginx.conf:/etc/nginx/nginx.conf \
    -v conf.d:/etc/nginx/conf.d/ \
    -v html:/usr/share/nginx/html/ \
    mujz/nginx
```

repository: mujz/nginx

repo_name: mujz/nginx


text:
## team.refresh

### summary
Refresh the invitecode and inviteurl of team. Only admins and owners can send this request

### method
POST

### route
> /v2/teams/:_id/refresh

### events
* [team:update](../event/team.update.html)

### params
| key            | type               | required | description                                                  |
| -------------- | ------------------ | -------- | ------------------------------------------------------------ |
| properties     | Object             | true     | inviteCode, signCode, or other properties could be refreshed |

### request
```
POST /v2/teams/536c99d0460682621f7ea6e5/refresh HTTP/1.1
{
  "properties": {
    "inviteCode": 1,
    "signCode": 1
  }
}
Content-Type: application/json
```

### response
```json
{
  "_id": "5577ecb0671c6a43502b63b0",
  "name": "team1",
  "creator": "5577ecb0671c6a43502b63ae",
  "__v": 0,
  "updatedAt": "2015-06-10T07:52:16.393Z",
  "createdAt": "2015-06-10T07:52:16.036Z",
  "nonJoinable": false,
  "inviteCode": "9ce2af904o",
  "color": "ocean",
  "signCodeExpireAt": "2015-06-17T07:52:16.432Z",
  "signCode": "9ce8a3005i",
  "inviteUrl": "http://localhost:7000/v2/via/9ce2af904o",
  "_creatorId": "5577ecb0671c6a43502b63ae",
  "id": "5577ecb0671c6a43502b63b0"
}
```

repository: kalsolio/talk-os

gha_language: CoffeeScript

repo_name: kalsolio/talk-os


text:
# Garden-Linux Packer

Garden-Linux Packer is currently used to build Docker images / Vagrant boxes
suitable for Garden-Linux development & testing.

## Pre-requisites for Mac

* docker-machine version 0.5.1 and higher
* Packer version v0.8.0 from homebrew (`brew install packer`) or
[the site](https://www.packer.io/downloads.html)

## Building

For some reason the default temp dir for packer has issues with the boot2docker
vm. In order to build images you will need to export the `TMPDIR`. For
instance, if you are using [direnv](http://direnv.net/) add this to a `.envrc`
in the packer directory:

```bash
export TMPDIR=~/.packer_tmp
mkdir -p $TMPDIR
```

### Build everything

Run `make ubuntu-docker`. This will commit a docker image to your Docker server named
`garden-ci-ubuntu:packer`.

## Releasing

Update `garden-ci/version.json` with the desired version number.

### [DockerHub](https://hub.docker.com/)

Ensure that you have the correct environment varibles set.

```bash
export GARDEN_PACKER_DOCKER_USERNAME=<Docker user name>
export GARDEN_PACKER_DOCKER_EMAIL=<Docker email>
export GARDEN_PACKER_DOCKER_PASSWORD=<Docker password>
```

Then run `make release-docker`. This will tag and upload the image to Docker
Hub.

repository: pankajps/garden-linux

extension: markdown

repo_name: pankajps/garden-linux


text:
![Logos](doc/Logos.svg)

# MonVerifyTools

A set of scripts to automatically check the content of periodically obtained measurement data files, useful for larger monitoring projects.

These tools and the methodology were developed at the [Institut für Bauklimatik, TU Dresden](https://tu-dresden.de/bu/architektur/ibk), during various research projects. Some were:

- EnEff:Stadt - Verbundvorhaben: *Modellhaftes innerstädtisches Gebiet "Altes Zöllnerviertel Weimar"* (FKZ 03ET1173C)
- *Forschungsprüfstand für multtifunktionale aktive Fassadensysteme mit Raumankopplung*, im Rahmen der SAB Förderung "Anwendungsorientierte Forschung an innovativen Energietechniken"
- *"Carbon Concrete Composite C³" - Carbonbeton mit integrierten bauklimatischen Funktionen*, ein Zwanzig20 C³ Projekt (BMBF)

## Motivation

Engineering/scientific monitoring typically starts small with a few sensors that can be read and analyzed by users in suitable intervals.
As soon as the number of sensors increases and measurement frequency becomes higher (semi-hourly or minutely values), *retrieving* and *checking* the measurement data manually becomes a cumbersome and error-prone process.

Here, the *MonVerifyTools* step in and assist with automated functionality to:

- (push-type) collection of monitoring data files from external sources (clients)
- check for correct input format of measurement files (compare against expected formats)
- perform a set of configured content checks to see if files are complete and valid (e.g. guard against sensor fault, missing time points, broken client/server connections and partial file commits etc.)
- perform additional physical value checks (e.g. out-of-value-range checks, large oszillation/gradient checks, etc.), that signal that something might be wrong with a) sensor, b) monitored system/equipment
- log results of checks to log files for easy screening by human-users
- move offending files to separate review directory, and move correct files to "ready for processing" directories

Basically, you can think of the *MonVerifyTools* as a quality assurance interim step, between *raw data collection* and *actual data processing*.

![Overview](doc/Overview.png)

### Is this something for you?

Whenever you find yourself frequently copying data from a data logger and importing the data into some post-processing software, you may want to take a look at the *MonVerifyTools*.

## What is this toolkit and how does it work?

Basically, it's a Python script that scans a directory structure for rule files, and incoming data. The data files are read/checked and if correct according to requirements moved to an `archive` folder, or if something is amiss, they are moved to a `review` folder, for human users to check and fix. Also, log files are written.

For now, see [documentation](doc/MonVerifyTools_Dokumentation.pdf) (currently only in German, but source code is documented in english).

Btw, the file format used by the *MonVerifyTools* is natively supported by the free scientific post-processing software [PostProc 2](https://bauklimatik-dresden.de/postproc/index.php), which makes it very easy to deal with frequently updated data (and creates nice diagrams as well :-).

repository: ghorwin/MonVerifyTools

repo_name: ghorwin/MonVerifyTools


text:
NOTE: This does not work yet and at the rate I am working on it who
      knows when it will...

This is an app for django for storing and manipulating timeseries.

It is not intended for heavy industrial use because of the simplistic
way we store the raw values in the database.

It is expected to be fairly performant when fetching new data for
timeseries that have been previously fetched.

It accomplishes this (when this part is written) performance by using
a caching system and a well understood set of what data has changed
between data fetches that can be typified via the arguments used
(basically a kind of memoization of the fetches that deal with the
most common case of new data being added to the end of the
timeseries.)

It supports a number of simple mathematical operations that run on
timeseries as well and the results of these operations are also cached
to give decent performance.

Operations like bucketing are a given as well as addition,
subtraction, running averages, derivatives over time, etc.

repository: scanner/django-as-timeseries

repo_name: scanner/django-as-timeseries


text:
---
title: Introduction
slug: /

---

## Motivation

The trend of cloud-native technology is moving towards pursuing consistent experience of application delivery across clouds and on-prem clusters. Kubernetes is becoming the standard layer which is excellent in abstracting away low-level infrastructure details. But it does not provide abstractions to model application deployment on top of hybrid and distributed environments. The lack of application level context have impacted user experience, slowed down productivity, led to unexpected errors due to misconfigurations in production.

Meanwhile, modeling the deployment of a microservice application is a highly fragmented and challenging process. Thus, many solutions that tried to solve the problem so far are either over simplified and could not fix the real issue, or too complicated to use at all. On the other hand, though many solutions provided friendly UI layer, the platform themselves are not customizable. This means as the needs of your platform grow, it is inevitable for the feature requirements to outgrow the capabilities of such systems.

Today the application teams are eager to find a platform that can simplify the application delivery experience across hybrid environments (e.g. multi-cluster/multi-cloud/hybrid-cloud/distributed-cloud), while also be flexible enough to satisfy the fast growth of businesses requirements. The platform-engineers have similar empathy but the effort of building such system is out of their scope.

## What is KubeVela?

KubeVela is a modern application platform that makes it easier and faster to deliver and manage applications across hybrid, multi-cloud environments. At the mean time, it is highly extensible and programmable, which can adapt to your needs as they grow.

![](../resources/what-is-kubevela.png)

## Who should use KubeVela?

- Application developers, operators, DevOps engineers
	- think about a modern Continuous Delivery (CD) platform.
- Platform builders for PaaS, Serverless, application management/delivery systems
	- think about an application delivery engine that you could build your advanced platform with.
- ISV, SaaS owners, and application architects who need to distribute software to anywhere
	- think about an App Store but on Kubernetes and clouds.

## Comparisons

### KubeVela vs. CI/CD systems

KubeVela is a CD (Continuous Delivery) control plane that works at downstream of your CI process. So you will reuse the CI process you already adopted and KubeVela will take over CD process by empowering it with modern application delivery best practices such as declarative CD workflow, programmable workflow steps, pull model, multi-cloud/cluster delivery, unified cloud resource provision/binding, and much more.

If you already adopted GitOps practice in CD section, KubeVela is even easier to fit in as it's fully declarative by design. All KubeVela features including CD workflow and multi-cloud/cluster delivery will be immediately available in your GitOps process by simply putting a KubeVela application YAML inside your configuration repository.

> Feel free to check the [Best Practices](https://kubevela.io/docs/case-studies/jenkins-cicd) documentation for more details.

### KubeVela vs. Platform-as-a-Service (PaaS)

The typical examples are Heroku and Cloud Foundry. They provide full application deployment and management capabilities and aim to improve developer experience and efficiency. In this context, KubeVela shares the same goal.

Though the biggest difference lies in **flexibility**.

KubeVela is fully programmable. All of its deployment workflow and component feature set are LEGO-style CUE modules and can be extended or removed in-place when your needs change. Comparatively, traditional PaaS systems are highly restricted, i.e. they have to enforce constraints in the supported types of applications and capabilities. When your needs expand, you always outgrow the capabilities of the PaaS system - this will never happen in KubeVela platform.

Also, as a CD control plane, KubeVela is working on top of runtime infrastructures (and we believe this is the right form for next-gen PaaS), while most existing PaaS systems tend to be installed as a plugin inside runtime cluster.

### KubeVela vs. Serverless

Serverless platform such as AWS Lambda provides extraordinary user experience and agility to deploy serverless applications. However, those platforms impose even more constraints in extensibility. They are arguably "hard-coded" PaaS, so KubeVela differ from them in similar way.

On the other hand, KubeVela can easily deploy both Kubernetes based serverless workloads such as Knative/OpenFaaS, or cloud based functions such as AWS Lambda.

### KubeVela vs. Platform agnostic developer tools

The typical example is Hashicorp's Waypoint. Waypoint is a developer facing tool which introduces a consistent workflow (i.e., build, deploy, release) to ship applications on top of different platforms.

KubeVela can be integrated with such tools seamlessly. In this case, developers would use the Waypoint workflow as the UI to deploy and release applications with KubeVela as the underlying deployment platform.

### KubeVela vs. Helm

Helm is a package manager for Kubernetes that provides package, install, and upgrade a set of YAML files for Kubernetes as a unit.

KubeVela as a modern deployment system can naturally deploy Helm charts. For example, you could use KubeVela to define an application that is composed by a WordPress chart and a AWS RDS Terraform module, orchestrate the components' topology, and then deploy them to multiple environments following certain strategy.

Of course, KubeVela also supports other encapsulation formats including Kustomize etc.

### KubeVela vs. Kubernetes

KubeVela is a modern application deployment system built with cloud native stack. It leverages [Open Application Model](https://github.com/oam-dev/spec) and Kubernetes as control plane to resolve a hard problem - making shipping applications enjoyable.

Welcome onboard and sail Vela!

## What's Next

Here are some recommended next steps:

- Start to [install KubeVela](./install).
- Learn KubeVela's [core concepts](./core-concepts/application).
- Learn KubeVela's [architecture](./core-concepts/architecture).


text:
# vecn

> A module for creating n-dimensional vector types that support swizzling.

[![Build Status](https://travis-ci.org/Zunawe/vecn.svg?branch=master)](https://travis-ci.org/Zunawe/vecn) [![Coverage Status](https://coveralls.io/repos/github/Zunawe/vecn/badge.svg?branch=master)](https://coveralls.io/github/Zunawe/vecn?branch=master) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

Allows for the creation of vectors of arbitrary dimension that are also JavaScript `Arrays`. There are a number of useful numeric methods that can be performed once you make a vector such as componentwise arithmetic, dot products, normalization, etc... Though the vectors are directly mutable via `Array` methods and direct setting of values, all methods behave in an immutable way (i.e. they create and return a new object). These arrays are fixed-length and accept only numbers as input, though they generally decay gracefully into regular `Arrays`. For example, you're allowed to use `map`, `reduce`, `concat`, and other `Array` methods, and if the result is a valid `vec`, a `vec` will be returned. Otherwise, you'll get back a standard `Array` with the new elements. These are specifically overloaded methods, so experimental, custom, and rebound methods aren't guaranteed to work.

## Install

```sh
$ npm install vecn
```

## Usage

Since they're the most common, `vec2`, `vec3`, and `vec4` are already included:
```js
const {vec3} = require('vecn')

let v = vec3(1, 2, 3)
console.log(v)
```

```js
[ 1, 2, 3 ]
```

If you need to create your own vector type:
```js
const vecn = require('vecn')

const vec5 = vecn.getVecType(5)
var v = vec5(1, 2, 3, 4, 5)
console.log(v)
```

```js
[ 1, 2, 3, 4, 5 ]
```

Once you have a vector, here are some things you can do:
```js
magnitude
approximatelyEquals()
argmax()
argmin()
choose()
copy()
div()
dot()
equals()
max()
min()
minus()
neg()
normalize()
plus()
pnorm()
pow()
reflect()
sum()
times()
```
And of course these methods can be chained
```js
v1.plus(v2).times(v3).normalize().neg()
```

For a more in-depth description of available vector methods and how to use them, see the [documentation](https://zunawe.github.io/vecn).

#### Swizzling

Swizzling is a technique used in GLSL that allows you to access a vector's components by name and build new vectors from them. It works the same here at arbitrary length. It's easiest to see in an example:

```js
var v = vec4(1, 2, 3, 4)

v.x                          // 1
v.y                          // 2
v.z                          // 3
v.w                          // 4

v.xx                         // vec2 [ 1, 1 ]
v.zy                         // vec2 [ 3, 2 ]
v.zywwxyyz                   // vec8 [ 3, 2, 4, 4, 1, 2, 2, 3 ]
```

We can also set values with swizzling.

```js
var v = vec3(1, 2, 3)

v.xz = [4, 5]
console.log(v)
```

```js
[ 4, 2, 5 ]
```

Swizzling only works for `vec2`, `vec3`, and `vec4` (with plans to extend it with custom accessors).

#### Important Nuance

When creating a new vecType, you _are_ generating a new class. However, this class is hidden behind a function that creates the object for you and returns a Proxy. Therefore, the function returned by `vecn.getVecType` is **not** a constructor. Since the `new` keyword implies a `return this` at the end of the function, but the function already returns, the existence of a `new` before the function call has no effect. The following code explains the importance:

```js
const vec2 = vecn.getVecType(2)

var v1 = vec2(1, 2)          // Valid construction
var v2 = new vec2(1, 2)      // Also valid, but misleading

v1.constructor === vec2      // false
```

Basically this allows for swizzling and lets me extend `Array` without letting the user mess with the length.

repository: Zunawe/vecn

repo_name: Zunawe/vecn


text:
And these words, which I command thee this day,
shall be in thine heart._

Do you believe in God's providence? You have been given a verse
today in God's providence. God is asking you to LOVE Him through your
words and actions. He is asking for your heart, your soul, your
strength to be used to glorify Him. To do this, you will have to lay
aside your self-focused plans, and be open to His Spirit's leading.


text:
# Gameboy

Hopefully a gameboy color emulator. Right now, it's barely anything.

## Video Series

Join me as I understand how a gameboy, Rust, and WASM work.

* Ep00: https://youtu.be/0ErM1JsWUFk
* Ep01: https://youtu.be/DsZDdDEztIs
* Ep02: https://youtu.be/7ZrjgwKf0HQ

## How to run

1. Acquire the bootrom `DMG_ROM.bin` and stick it in the root of the repo
2. Rustup nightly
3. Install [`wasm-pack`](https://rustwasm.github.io/wasm-pack/)
4. Run `wasm-pack build` and `cd www && npm run start`
5.


text:
# View Manager Extension

## Overview

The View Manager extension allows you to add ContainersBindings. This stores a container (typically a root parent of a set of views), add multiple IViewHandlers (classes that can perform an action on a view) and have a function to invoke all IViewHandlers.

The View Manager classes are used internally to handle views and process them. If you want to add view handlers, consider using the ViewProcessorMap for more functionality which is installed by the MVCSBundle.

If you want to know how the view's are added to ContainerBindings, see the [ManualStageObserverExtension](ManualStageObserverExtension.md), [StageObserverExtension](StageObserverExtension.md) and [StageCrawlerExtension](StageCrawlerExtension.md).

## How to Install

This extension is already installed in the MVCS bundle, but if you're not using that:

```as3
context.install(ViewManagerExtension);
```

## What does it install

The View Manager extension, installs creates and maps a static ContainerRegistry (if not created already). Which holds all ContainerBindings of multiple contexts and a ViewManager which adds ContainerBindings for one Context.

They are both injectable

```as3
[Inject]
public var containerRegistry:ContainerRegistry;

[Inject]
public var viewManager:ViewManager;
```

## How it works

### Container Registry

The ContainerRegistry holds a reference of ContainerBindings (the root DisplayObjectContainer of multiple views) and their relation between each other (child/parent).

You can add a container which returns a container binding.

```as3
var containerBinding:ContainerBinding = containerRegistry.addContainer(mySprite);
trace("I've just added: " + containerBinding.container);
```

It's then possible to see which ContainerBinding is the closest parent of any view.

```as3
var binding:ContainerBinding = containerRegistry.findParentBinding(view);
if (binding)
{
	trace("Closest parent container of view " + view + " is " + binding.container);
}
else
{
	trace("No parent container found for view " + view);
}
```

A ContainerBinding has the ability to add multiple 'IViewHandlers' with the ```addHandler``` method and invoke them with passing a view when you call ```handleView```.

```as3
binding.handleView(view, Sprite);
```

### View Manager

The View Manager allows you to add the same IViewHandlers to multiple containers. It does this by using the container registry for you, but doesn't expose to you their container bindings.

You can add containers to a view manager like so:

```as3
viewManager.addContainer(mySprite1);
viewManager.addContainer(mySprite2);
```

Then you can add IViewHandlers to all containers like so:

```as3
viewManager.addViewHandler(myViewHandler);
```

Adding a container later, will also add any previous viewHandlers to it.

```as3
viewManager.addContainer(mySprite3);
// MySprite3 ContainerBinding has just had 'myViewHander' added to it.
```

In order to process the view handlers, you still need to get the binding from the container registry.

```as3
var binding:ContainerBinding = containerRegistry.findParentBinding(childOfMySprite3);
binding.handleView(view, Sprite);
```

gha_language: C#


text:
---
title: "Amazon Elastic Kubernetes Service"
linkTitle: "Amazon Web Services"
weight: 20
description: >
  Follow these steps to create an [Amazon Elastic Kubernetes Service (EKS)](https://aws.amazon.com/eks/)
  cluster for your Agones install.
---

Create your EKS Cluster using the [Getting Started Guide](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html).

Possible steps are the following:

1. Create new IAM role for cluster management.
1. Run `aws configure` to authorize your `awscli` with proper `AWS Access Key ID` and `AWS Secret Access Key`.
1. Create an example cluster:

```bash
eksctl create cluster \
--name prod \
--version {{% eks-example-cluster-version %}} \
--nodegroup-name standard-workers \
--node-type t3.medium \
--nodes 3 \
--nodes-min 3 \
--nodes-max 4
```

{{< alert title="Note" color="info">}}
EKS does not use the normal Kubernetes networking since it
is incompatible with Amazon VPC networking.
{{< /alert >}}

## Allowing UDP Traffic

For Agones to work correctly, we need to allow UDP traffic to pass through to our EKS cluster worker nodes. To achieve this, we must update the workers' nodepool SG (Security Group) with the proper rule. A simple way to do that is:

* Log in to the AWS Management Console
* Go to the VPC Dashboard and select **Security Groups**
* Find the Security Group for the workers nodepool, which will be named something like `eksctl-[cluster-name]-nodegroup-[cluster-name]-workers/SG`
* Select **Inbound Rules**
* **Edit Rules** to add a new **Custom UDP Rule** with a 7000-8000 port range and an appropriate **Source** CIDR range (`<IP_ADDRESS>/0` allows all traffic)

## Next Steps

- Continue to [Install Agones]({{< relref "../Install Agones/_index.md" >}}).

repository: googleforgames/agones

gha_language: Go

repo_name: googleforgames/agones


text:
### Performance

Performance was tested for the following PHP frameworks (alphabetical order)

- Limoncello 0.9.0-beta
- Lumen 5.6.3
- Slim 3.10.0

### Results

|               | RPS (more is better) |    %   |
| ------------- |----------------------| -------|
| Limoncello    |        29 988        | 135,5% |
| Lumen         |        22 123        | 100,0% |
| Slim          |        23 692        | 107,1% |

RPS - Requests per Second (more is better)

### What is tested

All applications were configured to
- Single HTTP route for home page ('/').
- Request handler is located in a Controller.
- The controller responds with a short pure text response (e.g. 'Hello world').

All middleware (e.g. authentication) and other loads were either removed or minimized to possible minimums.

So routing, controller support, HTTP responses and work with PHP Server Application Programming Interface (SAPI) was tested.

### Optimizations

All known optimizations were applied to all frameworks including

- Not used code was minimized as much as possible.
- Development dependencies were removed.
- Caching (where supported)
- Code was merged into smaller number of files (esp. for Slim).
- Composer autoloads were optimized.

### Hardware and Software

Server

- CPU AMD Ryzen 1700@3000MHz (X370), RAM 16Gb@3400MHz, 32GB external flash drive (USB3)
- OS Arch Linux (Linux 4.16.6), PHP 7.2.5 with Zend OPcache v7.2.5, PHP-FPM, nginx 1.14.0

Requests Generator

- Low end notebook connected to the server via Gigabit switch.

### Methodology

The applications were configured to run on ports `8080`, `8081` and `8082`. The following [wrk](https://github.com/wg/wrk) command was used to run a test

```bash
wrk -t8 -c130 -d30s http://<Server IP address>:808X
```

where `<Server IP address>` was a local network IP address of the server and the last number in port `X` was 0, 1 and 2.

The tests were run in the following order: 3 runs for Limoncello, 3 runs for Lumen, 3 runs for Slim and again 3 runs for Limoncello, 3 runs for Lumen and 3 runs for Slim with small pauses between them to write down results. Thus every application had 6 test runs.

|                                 |  Limoncello  |   Lumen    |    Slim    |
| ------------------------------- | ------------ | ---------- | ---------- |
| Test 1 RPS (1st batch, 1st run) |    29 878    |   22 094   |   23 661   |
| Test 2 RPS (1st batch, 2nd run) |    30 411    |   22 373   |   23 678   |
| Test 3 RPS (1st batch, 3rd run) |    30 021    |   22 226   |   23 708   |
| Test 4 RPS (2nd batch, 1st run) |    29 861    |   21 968   |   23 714   |
| Test 5 RPS (2nd batch, 2nd run) |    30 261    |   21 775   |   23 693   |
| Test 6 RPS (2nd batch, 3rd run) |    29 493    |   22 302   |   23 697   |
|                                 |              |            |            |
| **Average RPS**                 |  **29 988**  | **22 123** | **23 692** |

RPS - Requests per Second (more is better)

Stress load parameters were selected to cause maximum load on the system up until PHP-FPM starts to fail with `502 Bad Gateway` errors.

CPU usage was close to 100% and memory usage for the whole system was less than 400MB.

Here is a screen-shot taken during a test showing resources usage.

![Monitor Screen-shot](/docs/bench/minimalistic/img/monitor.png)

### Source code

[Limoncello](/docs/bench/minimalistic/limoncello)

[Lumen](/docs/bench/minimalistic/lumen)

[Slim](/docs/bench/minimalistic/slim)

### Final Thoughts

During the testing it is very important to check timed out and non 2XX/3XX responses. If server receives too many requests it starts to respond with `502 Bad Gateway` errors which should not be counted as RPS.

This is an example of a good test without timed out or failed responses

```text
Running 30s test @ http://<Server IP address>:8080
  8 threads and 130 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.19ms  549.57us  20.86ms   88.02%
    Req/Sec     3.82k   117.42     5.26k    84.92%
  913503 requests in 30.04s, 174.19MB read
Requests/sec:  30411.17
Transfer/sec:      5.80MB
```
This is an example of a bad test with many failed responses which inflate RPS

```text
Running 30s test @ http://<Server IP address>:8080
  8 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.25ms    2.47ms  25.38ms   69.28%
    Req/Sec     4.77k   127.11     5.83k    73.62%
  1138284 requests in 30.04s, 255.01MB read
  Non-2xx or 3xx responses: 303782
Requests/sec:  37893.87
Transfer/sec:      8.49MB
```

Initially, the built-in PHP server (aka development server) was used for testing which could be run with

```bash
$ php -d zend.assertions=-1 -d assert.exception=1 -S <IP_ADDRESS>:8080 -t ./public/
```

However it provided very unstable results. For example it could give 3 000 RPS for the first run and a half of that for next one. For this reason, it looked to be a good idea to run multiple tests and select only the best result. From such testing `limoncello` had the best result, `slim` the second and `lumen` the third. As this performance test shows, PHP development server should not be used in performance testing as it can lead to inaccurate results and a dedicated server with production software stack should be used instead.

repository: limoncello-php/framework

gha_language: PHP

repo_name: limoncello-php/framework


text:
## Centralized Management and LDAP

### Question 1

Which of these are examples of centralized management? Check all that apply.

* **Role-based access control**
* **Centralized configuration management**
* Copying configurations to various systems
* Local authentication

> Role-based access control makes it easier to administer access rights by changing role membership and allowing for inheritance to grant permissions (instead of granting each permission individually for each user account). Centralized configuration management is an easier way to manage configurations for services and hardware. By centralizing this, it becomes easier to push changes to multiple systems at once.

### Question 2

Which of these are components of an LDAP entry? Check all that apply.

* Uncommon Name
* **Common Name**
* Organizational User
* **Distinguished Name**

> The Common Name contains a descriptor of the object, like the full name for a user account. A Distinguished Name is the unique name for the entry, and includes the attributes and values associated with the entry.

### Question 3

What's does the LDAP Bind operation do exactly?

* Modifies entries in a directory server
* Looks up information in a directory server
* **Authenticates a client to the directory server**
* Changes the password for a user account on the directory server

> The Common Name contains a descriptor of the object, like the full name for a user account. A Distinguished Name is the unique name for the entry, and includes the attributes and values associated with the entry.

### Question 4

Which of the following are authentication types supported by the LDAP Bind operation? Check all that apply.

* **Anonymous**
* **Simple**
* Complex
* **SASL**

> Bind operations support three different mechanisms for authentication: (1) Anonymous, which doesn't actually authenticate at all, and allows anyone to query the server; (2) Simple, which involves sending the password in plaintext; and (3) SASL, or Simple Authentication and Security Layer, which involves a secure challenge-response authentication mechanism.


text:
# SQLFlow Code Generator

SQLFlow is a compiler that compiles a SQL program to an Argo workflow as the following pipeline:

``` text
parser -> AST -> sematic -> IR -> optimizer -> code generator
   ↑                                                ↓
sql program                                       .YAML
```

The Argo controller running on Kubernetes is the executor that executes the workflow. This is a design doc about how to implement
the code generator.

## The High-level Design of the Code Generator

As mentioned above, SQLFlow compiler generates the `.YAML` file as the following, you can check more detail
about SQLFlow workflow from [here](/doc/design/workflow.md).

``` yaml
steps:
    name: step-1
    command: ["python", "-c"]
    args: |
        from runtime import tensorflow
        tensorflow.train(....)
    env:
      name: SQLFLOW_OSS_AK
      value: "xxxxxx"
```

From the above workflow `.YAML` file, each workflow step contains three parts:

1. The execution command as the `command` spec to execute the program.
1. The execution program, which can be written in Python, R, or Bash. The program submits
an AI task on an AI platform .e.g, [ElasticDL](https://github.com/sql-machine-learning/elasticdl),
[Alibaba PAI](https://www.alibabacloud.com/help/zh/doc-detail/75093.htm) or just runs on a host by
involving the SQLFlow `runtime` library.
1. The runtime environment variables with the `env` spec.

SQLFlow compiler provides the code generator component to generate the step program,
the code generation is divided into the following stages:

1. [Target Submitter Registry](#target-submitter-register), register a Code Generator in SQLFlow compiler.
1. [CodeGenerator Interface](#code-generator-interface) is a Go interface that all code generators should implement.
1. [Code Generation](#code-generation) provides an assembler API to generate a step program.

### Target Submitter Register

For a new code generator, develops should register it in SQLFlow compiler as the following pseudo-code:

``` golang

cgMapping = map[string]CodeGenerator {
  "paiTensorFlow": PAITensorFlow{},
  "paiXGBoost", PAIXGBoost{},
  ...
}
```

### Code Generator Interface

For each code generator implementation, you should care about all IR types, different IR types have different behaviors and
generate different submitter program. Each code generator owns an `ExecutionCtx` instance to tell Argo workflow
on how to execute the target code.

``` golang
type ExecutionCtx struct {
  ExecCommand []string      // How to execute the target code, .e.g ["python" "-c"]
  Env map[string]string     // The environment variables for execution
}

type CodeGenerator interface {
  GenerateExecCtx(*ir.SQLStmt) ExecutionCtx
  EmitNormal(*ir.NormalStmt) (string, error)
  EmitTrain(*ir.TrainStmt) (string, error)
  EmitPredict(*ir.PredictStmt) (string, error)
  EmitExplain(*ir.ExplainStmt) (string, error)
  EmitEvaluate(*ir.EvaluateStmt) (string, error)
  EmitShowTrain(*ir.ShowTrainStmt) (string, error)
  EmitOptimize(*ir.OptimizeStmt) (string, error)
  EmitRun(*ir.RunStmt) (string, error)
}
```

### Code Generation

The code generation phase is responsible for generating target code from a SQL statement IR, this is an
assembler API that routes to a specified code generator, the pseudo-code is as the following:

``` golang
func Generate(session *pb.Session, stmt *ir.SQLStatement) (string, error) {
  // routing to a specified code generator from session.submitter
  cf := cgMapping[session.submitter]

  switch v := stmt.(type) {
  case *ir.TrainStmt:
    return cg.EmitTrain(stmt.(*ir.TrainStmt)), cg.GenerateExecCtx(), nil
  case *ir.PredictStmt:
    return cg.EmitPredict(stmt.(*ir.TrainStmt)), cg.GenerateExecCtx(), nil
  ...
  }
}

```

repository: sql-machine-learning/sqlflow

branch_name: refs/heads/develop

repo_name: sql-machine-learning/sqlflow


text:
---
# Course title, summary, and position.
linktitle: Publishing and Open Access
summary: Resources for authors.
weight: 70

# Page metadata.
title: Publishing and Open Access
draft: false  # Is this a draft? true/false
toc: true  # Show table of contents? true/false
type: docs  # Do not modify.
date: 2020-08-12

# Add menu entry to sidebar.
# - name: Declare this menu item as a parent with ID `name`.
# - weight: Position of link in menu.
menu:
  open-access:
    name: Publishing and Open Access
    weight: 1
---

## Preprint Repositories

* [medRxiv](https://www.medrxiv.org/)
* [bioRxiv](https://www.biorxiv.org/)
* [OSF Preprints](https://osf.io/preprints/)

## Open Access Journals

* [DOAJ: Directory of Open Access Journals](https://doaj.org/)

## Open Access Databases

* [LOADB: Listing of Open Access Databases](http://www.loadb.org/)

## Free Apps for Clinical Care

* [AHRQ ePSS](https://epss.ahrq.gov/) (USPSTF recommendations)
* [American College of Physicians (ACP) Clinical Practice Guidelines and Recommendations](https://www.acponline.org/clinical-information/guidelines)
* [ASCVD Risk Estimator](http://tools.acc.org/ASCVD-Risk-Estimator-Plus/) (by the American College of Cardiology)
* [Calculate by QxMD](https://qxmd.com/calculate-by-qxmd) (medical calculators and screening tools)
* [CDC Vaccine Schedules](https://www.cdc.gov/vaccines/schedules/index.html)
* [Epocrates](http://www.epocrates.com/) (drug reference)
* [Medscape](https://www.medscape.com/) (medical news, education, and clinical reference)
* [Read by QxMD](https://qxmd.com/read-by-qxmd) (articles, research)

The content on some of these guides was originally created for the Welch Medical Library Research Guides at Johns Hopkins University.


text:
**This helper allows you to quickly and easily build a Mail object for sending email through Twilio SendGrid.**

## Dependencies

- [Jackson](https://github.com/FasterXML/jackson)

# Quick Start

Run the [example](../../../../../../examples/mail) (make sure you have set your environment variable to include your SENDGRID_API_KEY).

```bash
cd examples/mail
javac -classpath ../../build/libs/sendgrid-4.2.1-jar.jar:. Example.java && java -classpath ../examples/jackson-core-2.9.9.jar:../../build/libs/sendgrid-4.1.0-jar.jar:. Example
```

## Usage

- See the [example](../../../../../../examples/mail) for a complete working example.
- [Documentation](https://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/index.html)

repository: sendgrid/sendgrid-java

gha_language: Java

repo_name: sendgrid/sendgrid-java


text:
Currently, we only support initial action under the Story/Init/Entity/(EntityName)/Actions

Now we support Actions below

# supported Actions

## FollowRoute

Follow Route Action enables Ego vehicle follow the target waypoint

```yaml
Actions:
    - Type: FollowRoute
    Params:
        GoalPose:
            Pose:
                Position:
                X: 10
                Y: 0
                Z: 0
                Orientation:
                X: 0.0
                Y: 0.0
                Z: 0.0
                W: 1.0
                FrameId: "initial_pose"
```

### Fields

all fields are required.

1. Type : Type should be "ReachPositionCondition"
2. GoalPose : goal pose of the ego vehicle

gha_language: Python


text:
---
layout: legacyReport
subheadline: "A Review of Rules, Requirements, and Options"
title: "Municipal Broadband"
teaser: "The universal availability of high speed internet service (broadband) is a key goal for the country, the states, and the FCC. Today, 143 municipal networks throughout the country offer (primarily) fiber-based, high
speed broadband service, with more in the planning stage. This paper explores the controversy surrounding municipal broadband through a factual lens. It reviews the statutes controlling municipal telecommunications and broadband projects across the nation, describes the conditions that some see as barriers to system deployment, reviews proposed state legislation limiting or expanding the reach of municipal systems. The paper also provides suggestions for understanding and addressing the competing points of view about the importance and value of municipally developed projects. The paper also provides an overview of the legal issues surrounding the municipal broadband debate, including two petitions currently pending at the FCC requesting that the agency use its authority under Section 706 of the federal Telecommunications Act to eliminate what the petitioners see as onerous conditions on the expansion of their existing municipal networks."
meta_description:
date: 2014-11-15 10:00:00
author: "Sherry Lichtenberg"
categories:
    - reports
    - telecommunications
show_meta: false
custom_css:
  - report
  - legacy
---
<object data='http://communities.nrri.org/documents/317330/bedde631-ffba-42a2-8717-0dd6c5a30de7#'
        type='application/pdf'
        width='100%'
        height='100%'>

It appears your Web browser is not configured to display PDF files.
No worries, just click here to download the PDF file.

</object>

branch_name: HEAD


text:
## Swift WeakArray

WeakArray offers a collection type that behaves like a Swift Array, but will not retain any of its objects.

## Installation

WeakArray is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "WeakArray"
```

## Usage

First make sure to import WeakArray:

	import WeakArray

When creating a weak array, specify the collection type as you would with an Array:

	typealias myType = AnyObject
	var a: WeakArray<MyType> = []

You can also use array literals to create a WeakArray, but if you specify any values you'll need to unwrap your optionals with ```!```:

	var view: UIView? = UIView()
	var a: WeakArray<UIView> = [view!]

Otherwise a WeakArray works much like an Array:

	var a: WeakArray<AnyObject> = []

	var view: UIView? = UIView()

	// Append
	a.append(view)

	// Replace with index
	a[0] = view

	// Replace with range
	a[0...1] = [view, view]

	// Remove Last
	a.removeLast()

	// Remove at index
	var view: UIView? = a.removeAtIndex(0)

	// Insert at index
	a.insert(view, atIndex: 0)

	// isEmpty and count
	if (!a.isEmpty) {
		println("Count: \(a.count)")
	}

	// First and Last
	var first: AnyObject? = a.first
	var last: AnyObject? = a.last

	// Append WeakArray
	var b: WeakArray<AnyObject>() = []
	a += b

	// Or append a standard library Array
	var c: [AnyObject] = []
	a += c

Most of the methods you'll find in the Slice struct are implemented on WeakArray, so if there's an Array method you need, it is probably implemented. If you find a need for any of the few that are not implemented, let me know.

You can also enumerate over a WeakArray like you would an Array, but keep in mind it will skip over nil values while count will include them, so **count may not
match the number of enumerations you get**.

	func testIterationIsNotInterruptedByNilObject() {
        var a = WeakArray<UIView>()
        var obj1: UIView? = UIView()
        var obj2: UIView? = UIView()
        var obj3: UIView? = UIView()
        a.append(obj1)
        a.append(obj2)
        a.append(obj3)
        obj2 = nil
        var i = 0
        for value in a {
            i++
        }
        XCTAssert(a.count == 3, "")
        XCTAssert(i == 2, "")
    }

## Version History

**v0.4**

* Updated to Swift 3
* Made available via cocoapods

**v0.3**

* Update for Swift 1.0. Thanks to [Mazyod](https://github.com/Mazyod) in [Pull Request #1](https://github.com/dmauro/WeakArray/pull/1).
* Implemented more Slice methods.
* Added equality operator overload.

**v0.2**

* Update to match beta 5 array changes
* Use ArrayLiteralConvertible

**v0.1**

* Released!

## Author

David Mauro<EMAIL_ADDRESS>
## License

WeakArray is available under the Apache license. See the LICENSE file for more info.

repository: n-studio/WeakArray

repo_name: n-studio/WeakArray


text:
# core

### Deploy and Run

#### Java

``` sh
git clean -xfd

./mvnw clean && ./mvnw package # macOS and Linux only
.\mvnw.cmd clean && .\mvnw.cmd package # Windows only

mkdir ./config/
mkdir ./data/

java -jar ./target/core.jar

#         listening port => tcp/8003
# optional configuration => ./config/application.properties
#       default database => ./data/database.sqlite3

# The newly generated config `core.rpc-token` will be shown in console log
# with context `ATTENTION: core.rpc-token ==`.
```

#### Docker

```sh
docker pull r2d2project/core

docker run --detach --name core --publish 8003:8003 --restart always --volume ./mount/config/:/home/app/config/ --volume ./mount/data/:/home/app/data/ r2d2project/core

#         listening port => tcp/8003
# optional configuration => ./mount/config/application.properties
#       default database => ./mount/data/database.sqlite3

# The newly generated config `core.rpc-token` will be shown in docker log
# with context `ATTENTION: core.rpc-token ==`.
```

See [Docker.md](./Docker.md) for more details.

### Database

#### SQLite 3

SQLite 3 is used to persist data by default. Data are is stored in file `<work-directory>/data/database.sqlite3`.

If the database file does not exist, it will be created by the default DDL. For safety reason, A random string will be assigned to config `core.rpc-token` at the first-run, which will be shown in log with context `ATTENTION: core.rpc-token ==`.

It is easy to quickly deploy the program and migrate the data by using such file-based database. However, there are still some disadvantages.

- The program has to write logs one by one (synchronized) which causes response delay increasing. The reason is - SQLite 3 will locked the whole database when there exists a connection of writing.
- Emoji characters cannot be correctly stored since SQLite 3 does not support charset `utf8mb4`.

Using MySQL 5.7 or MariaDB 10.2 instead is a better choice. (Other versions are not fully tested.)

#### MySQL 5.7

Create file `<work-directory>/config/application.properties` and fill out the following content.

``` properties
spring.jpa.database-platform=io.github.r2d2project.core.persistence.dialect.MySQL57Dialect
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://<ip-or-domain>:<port>/<database-name>
spring.datasource.username=<username>
spring.datasource.password=<password>
```

Replace all contents between `<>` with your own value. **DO NOT MODIFY OTHERS.**

Restart the program. It should run normally if every things is OK.

If the database is empty, the program will create tables and items by the default DDL. For safety reason, A random string will be assigned to config `core.rpc-token` at the first-run, which will be shown in log with context `ATTENTION: core.rpc-token ==`.

#### MariaDB 10.2

``` properties
spring.jpa.database-platform=io.github.r2d2project.core.persistence.dialect.MariaDB102Dialect
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.url=jdbc:mariadb://<ip-or-domain>:<port>/<database-name>
spring.datasource.username=<username>
spring.datasource.password=<password>
```

#### Default DDL

``` sqlite
-- config

create table config
(
    item_key   varchar(256)  not null primary key,
    item_value varchar(1024) not null
);

INSERT INTO config (item_key, item_value)
VALUES ('core.api-document',
        'https://editor.swagger.io/?url=https%3a%2f%2fraw.githubusercontent.com%2fr2-d2-project%2fcore%2fmaster%2fdocument%2fapi.yaml');

INSERT INTO config (item_key, item_value)
VALUES ('core.frontend-config', '{}');

INSERT INTO config (item_key, item_value)
VALUES ('core.id-generator', 'https://id.zzc.icu/');

INSERT INTO config (item_key, item_value)
VALUES ('core.instance', 'core');

INSERT INTO config (item_key, item_value)
VALUES ('core.rpc-token', 'RANDOMLY_GENERATED_STRING');

-- connector

create table connector
(
    id        bigint        not null primary key,
    category  varchar(256)  not null,
    instance  varchar(64)   not null unique,
    rpc_token varchar(64)   not null,
    url       varchar(1024) not null
);

INSERT INTO connector (id, category, instance, rpc_token, url)
VALUES (0, 'webhook-connector', 'core', '', '');

-- rule

create table rule
(
    id                           bigint        not null primary key,
    annotation                   varchar(1024)  not null,
    enable                       boolean       not null,
    if_log_category_equal        varchar(256)  not null,
    if_log_content_satisfy       varchar(4096) not null,
    if_log_instance_equal        varchar(64)  not null,
    name                         varchar(256)  not null unique,
    priority                     integer       not null,
    terminate                    boolean       not null,
    then_use_body_json           boolean       not null,
    then_use_body_template       varchar(4096) not null,
    then_use_connector_id        bigint        not null,
    then_use_header_content_type varchar(64)   not null,
    then_use_url_path            varchar(1024) not null
);

-- token

create table token
(
    token                char(64) not null primary key,
    expired_timestamp_ms bigint   not null
);

-- log

create table log
(
    id           bigint         not null primary key,
    category     varchar(256)   not null,
    content      varchar(16000) not null,
    instance     varchar(64)    not null,
    level        char(4)        not null,
    timestamp_ms bigint         not null
);
```

#### Preview

``` sql
select count(id) FROM log;
select * from log where level = "INFO" OR level = "WARN" OR level = "ERR" order by timestamp_ms desc limit 100;
select * from config;
select * from connector;
select * from rule order by priority asc;
select * from token;
```

### Develop

#### Git

Execute following commands before making any change.

``` sh
git config --local core.autocrlf false
git config --local core.safecrlf true
git config --local core.eol lf
```

#### application.properties

Add the following content to `<work-directory>/config/application.properties`.

``` properties
setting.debug=true
# Set as `true` to show all exceptions in console.
# Set as `false` to show just `RuntimeException` in console.

setting.global-cors=true
# Set as `true` to enable CORS for all APIs.
# Set as `false` to enable CORS for only `/rpc/log` and `/rpc/status`.

logging.level.org.hibernate.SQL=DEBUG
# Show SQL operations.

logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
# Show parameters of SQL operations.
```

repository: zzc-tongji/core

repo_name: zzc-tongji/core


text:
# comp671-testing-project

# Setup

1. [Install node](https://nodejs.org/en/download/)
1. If you use Windows, then install [Cygwin](https://cygwin.com/install.html), otherwise use a terminal emulator of your choice. If you are using Cygwin, then run the setup file and see below how to find and install the `bc` calculator app.
1. Clone this repo and `cd` to it.
1. Run `npm install` (requires node).
1. Run `npm test` to run the cucumber tests.

![Cygwin setup](https://raw.githubusercontent.com/aressler38/comp671-testing-project/master/img/cygwin-setup-bc.png)


text:
---
title: Cloud Elements Version 2.153
date: 2018-02-20
layout: release-note-item
release: 2.153
heading: Release Notes
---
## Element Updates

### Intacct.: Added `files` endpoints to the `folders` resource

We added the following endpoints to the folders resource so you can manage attachments:

* POST /folders/{folderName}/files
* GET /folders/{folderName}/files
* PATCH /folders/{folderName}/files/{id}
* GET /folders/{folderName}/files/{id}
* DELETE /folders/{folderName}/files/{id}

### Square: Added `customers` endpoint

You can now manage the customers associated with your Square element. We added the following endpoints:

* POST /customers
* GET /customers
* PATCH /customers/{id}
* GET /customers/{id}
* DELETE /customers/{id}

### Intacct.: Transformations of the `bill-payments` resource included duplicate fields

We removed the duplicate fields. When you map `bill-payments` to a common resource, you will no longer encounter duplicate fields.

### Bullhorn: Updated models for the `placements` resource

In the `placements` resource models the `clientContact` field was shown as `clientcontact`. We updated the model to show the correct value.

### Intacct.: Added elements-total-count header to paged responses

We added a response header to indicate the total Intacct records when querying.

### Onedrive: Support for Converged App authentication

When you authenticate an element instance, you can now include the credentials from a converged app — an app that accepts both MSA & Azure AD sign-in. To authenticate using a converged app, you must authenticate an element instance using the APIs.

### SAP Business One: Added `project-codes` resource

You can now fin projects using the `project-codes` resource.

### Zoho CRM: Added configurable URLs to support authentication with both US and European accounts

You can now override the default US URLs for **Authentication URL** and **Base URL** with European URLs.

### QuickBooks Enterprise: Added `tax-rates` and `tax-codes` resources

You can now perform CRUD operations on the tax rates and tax codes in QuickBooks Enterprise.

### Google Drive: Added support for thumbnails

We enhanced `POST /files` to accept a thumbnail file to associate with a file. We also added the following endpoints to update thumbnails:

* POST /files/{id}/thumbnails
* POST /files/thumbnails

### Intacct.: Fixed authentication via Cloud Elements 2.0

Previously, authenticating via Cloud Elements 2.0 resulted in errors. You can now authenticate an instance of the Intacct. element in Cloud Elements 2.0.

## Cloud Elements Platform Updates

### Enabled Hash Verification for bulk job callbacks

To enable hash verification for bulk job callbacks, we updated the Event Notification Signature Key which is currently used to add an extra layer of security when receiving event callbacks.

In the UI, we renamed **Callback Notification Signature Key** to **Callback Notification Signature Key**. The **Callback Notification Signature Key** property is now available as an optional field, rather than part of event setup. If you configure the **Callback Notification Signature Key**, it will be used to provide hash verification in the header of bulk job and event callbacks.

The name of the configuration property `event.notification.signature.key` remains unchanged. If you set it, it will be used for bulk job and event callbacks.

repository: cloud-elements/devportal

repo_name: cloud-elements/devportal


text:
# Common FX (ZM)

This is a collection of already loaded FX files that are in-game and ready to be used with your mod, if you see an FX here, you don't need to include it in your mod.

repository: dtzxporter/ModmeWiki

gha_language: Lua

repo_name: dtzxporter/ModmeWiki


text:
# Mandark
Tiny 64-bit RunPE written in C#

## Usage
Mandark.Load( (string) host, (byte[]) payload, (string) arguments );

## Requirements
Make sure you compile to 64-bit

repository: TheWover/Mandark

repo_name: TheWover/Mandark


text:
---
layout: post
title: QPI Quiescence
tags: [cpu, lock-free]
---

This is sort of note to myself. Here is a good article that I found while ago [QPI Quiescence](https://blogs.oracle.com/dave/qpi-quiescence) from Dave Dice. Again this makes me feel multi-processor or multi-core CPU like a networked system. See [this article](http://queue.acm.org/detail.cfm?id=2492433). Also the article mentioned Atomic [CAS](https://en.wikipedia.org/wiki/Compare-and-swap) is more than 3 times expensive than regular CAS.

[This slide](http://fpl.cs.depaul.edu/jriely/papers/2014-qqc-talk.pdf) summarized and visualized what is **Quiescent Consistency** very well.
> “Method calls separated by a period of quiescence should appear to
> take effect in their real-time order.”
> (Herlihy/Shavit 2008)

**QPI Quiescence** is interesting way to create asymmetric synchronization which is basically optimization for fast-path thread. Idea is eliminating any __#LOCK__ signal from fast-path thread as possible. And the slow-path thread still can use __#LOCK__ signal and also creates **QPI Quiescence**.

Windows provides [FlushProcessWriteBuffers](https://msdn.microsoft.com/en-us/library/windows/desktop/ms683148(v=vs.85).aspx) API which is in fact a mechanism to create **Quiescent Consistency** in muti-processor system. It also recognizes process CPU affinity.
> Flushes the write queue of each processor that is running a thread of the current process.
> The function generates an interprocessor interrupt (IPI) to all processors that are part of the current process affinity. It guarantees the visibility of write operations performed on one processor to the other processors.

Dmitri's [timing result](https://groups.google.com/d/msg/lock-free/yMhzBnaOLMM/cUcLD2k41qsJ) is promising. I even wrote a [Reader/Writer lock](https://github.com/chaelim/RWLock) which is using `FlushProcessWriteBuffers` API before. I'd like to improve the R/W lock with perf comparison with other locks.


text:
# Laravel JSON Meta

A library for saving metadata in a JSON column, with type checking.

* Best for saving configuration options
* Nested objects are not supported

## Installation

```bash
composer require hyvor/laravel-json-meta
```

## Usage

Let's do this as a tutorial. The plan is to save metadata of `blogs` in a JSON column named `meta`.

First, add a JSON `meta` column to the table.

```php
Schema::create('blogs', function (Blueprint $table) {
    // other columns

    $table->json('meta')->nullable();
});
```

> If your database does not support native JSON columns, Laravel will create a TEXT column, which works fine with this library.

### Metadata or column?

When saving data, you have to decide between meta vs column.  Our general rule is that if a data is needed for a `WHERE` or `ORDER BY`, save it in a column. If not, you may save it in metadata. In most cases, configuration options are the best things to save in metadata.

(You can still use metadata in `WHERE` queries because we are saving them in a JSON column.)

### Update the Model

* Add `Metable` trait
* Declare the `metaDefinition` method

```php
use Hyvor\JsonMeta\Metable;
use Hyvor\JsonMeta\Definer;

class Blog extends Model
{

    use Metable;

    protected function metaDefinition(Definer $definer)
    {
        // definition goes here
    }

}
```

### Definition

"Definition" is which data you allow saving in the `meta` field. By defining them, you can make sure that wrong data is never inserted by wrong user input or typos in your code.

You can also define types and default values in the definition.

```php
protected function metaDefinition(Definer $definer)
{

    $definer->add('seo_indexing')
        ->type('bool')
        ->default(true);

    $definer->add('seo_robots')
        ->type('string|null')
        ->default(null);

    $definer->add('comments_type')
        ->type('enum:hyvor,other')
        ->default('hyvor');

}
```

This example adds 3 keys. So, your meta field can have these 3 columns, with the declared type.

### Types

The following types are supported:

* `string`
* `int`
* `float`
* `bool`
* `null`
* `enum`

You can combine types using `|` (works like `OR`).

```php
->type('string|null')
```

or, you can send use an array

```php
->type(['string', 'null'])
```

enums are defined as follows

```php
->type('enum:value1,value2');
```

### Methods

The `Metable` trait adds the following methods to the model.

**getMeta(string $name) : mixed**

To get a meta value. If the value is not found in meta field, the default value be returned.

```php
$seoIndexingOn = $blog->getMeta('seo_indexing');
```

**getAllMeta() : object**

To get all meta values. All keys you define in `metaDefinition` function will be set in the returned object, filled with default values if missing in the `meta` field.

```php
$meta = $blog->getAllMeta();

if ($meta->seo_indexing) {
    echo "Hey Google, Please index me!";
}
```

**setMeta(string|array $name, mixed $value) : void**

Set meta `$name` to `$value`. This is where **type checking** happens. This function makes sure invalid values are not saved in the meta field.

```php
$blog->setMeta('seo_indexing', false);
```

```php
// throws an error (wrong type)
$blog->setMeta('seo_indexing', 'no');
```

Or, you may send an indexed array as the first param to update multiple values.

```php
$blog->setMeta([
    'seo_indexing' => false,
    'comments_type' => 'hyvor'
]);
```

## Why?

Why save metadata in a JSON column?

**CASE 1**: You could save metadata in separate columns. Here are the downsides.

* Maintain that amount of columns is not an easy task
* Most of those columns are set to the default value. In most cases, the default values are not changed.
* Databases have max row size. In MYSQL it is around 65KB. We are close to this limit at [Hyvor Talk](https://talk.hyvor.com) because of multiple VARCHAR columns, so we created this library to make sure that does not happen at [Hyvor Blogs](https://blogs.hyvor.com). (TEXT, BLOB, and JSON column sizes are not counted for max row size)

**CASE 2**: You could save metadata in a separate table.

This is actually a good option. Check the [laravel-meta](https://github.com/kodeine/laravel-meta) library which has a similar concept like this library but saves data in a separate table.

## Metadata Definition Updates

Before talking about updates, it is important to understand that the `meta` field is `nullable`, which means that the default value is `NULL`. So, when a blog is created (in the earlier example), `meta` field is `NULL`. It does not contain any information. So, no storage is used. This is another benefit of this approach. Metadata is only added when the values are changed from the default value.

In Hyvor Blogs, there are plenty of customization options. But, most users do not mess with them. So, only the updated values are saved in the meta field.

If the user updates the `seo_indexing` value, the meta field look like this.

```json
{
  "seo_indexing": false
}
```

### Adding new metadata

Let's say you want to add a new metadata called `seo_follow_external_links`. This task is pretty easy. All you have to do is adding this to the definition.

```php
protected function metaDefinition(Definer $definer)
{
    // old definitions

    // the new one
    $definer->add('seo_follow_external_links')
        ->type('bool')
        ->default(false);

}
```

### Updating metadata

Good news end here. Updating is not easy.

Let's say you want to rename `seo_indexing` to `seo_indexing_on`. You could update the definition, but the problem is with the values that are already saved in the database.

How do you update this:

```json
{
  "seo_indexing": false
}
```

to this:

```json
{
  "seo_indexing_on": false
}
```

You will probably need a custom script to do that. Currently, this library does not provide any such thing. But, if required in the future, we will add a command to do this. (Contributions are welcome)

### Removing metadata

If you need to remove `seo_indexing` option from your application, you should first remove it in the meta definition.

You will still have old data saved in the database meta fields, but it should not be a problem as that data will be not be used even its there.

However, if you are required to delete those data (maybe for legal reasons), you will again need a custom script to do that. But, this will be easier than updating.

repository: hyvor/laravel-json-meta

repo_name: hyvor/laravel-json-meta