text:
# Registers

The FSCC driver is a Swiss army knife of sorts with communication. It can handle many different situations, if configured correctly. Typically to configure it to handle your specific situation you need to modify the card's register values.

_For a complete listing of all of the configuration options please see the manual._

In HDLC mode some settings are fixed at certain values. If you are in HDLC mode and after setting/getting your registers some bits don't look correct, then they are likely fixed. A complete list of the fixed values can be found in the `CCR0` section of the manual.

All of the registers, except `FCR`, are tied to a single port. `FCR` on the other hand is shared between two ports on a card. You can differentiate between which `FCR` settings affects what port by the A/B labels. A for port 0 and B for port 1.

_An [`FSCC_PURGE_RX`](https://github.com/commtech/fscc-linux/blob/master/docs/purge.md) is required after changing the `MODE` bits in the `CCR0` register. If you need to change the `MODE` bits but don't have a clock present, change the `CM` bits to `0x7` temporarily. This will give you an internal clock to switch modes. You can then switch to your desired `CM` now that your `MODE` is locked in._

###### Support
| Code | Version |
| ---- | ------- |
| fscc-linux | 2.0.0 |

## Structure
```c
struct fscc_registers {
    /* BAR 0 */
    fscc_register reserved1[2];

    fscc_register FIFOT;

    fscc_register reserved2[2];

    fscc_register CMDR;
    fscc_register STAR; /* Read-only */
    fscc_register CCR0;
    fscc_register CCR1;
    fscc_register CCR2;
    fscc_register BGR;
    fscc_register SSR;
    fscc_register SMR;
    fscc_register TSR;
    fscc_register TMR;
    fscc_register RAR;
    fscc_register RAMR;
    fscc_register PPR;
    fscc_register TCR;
    fscc_register VSTR; /* Read-only */

    fscc_register reserved3[1];

    fscc_register IMR;
    fscc_register DPLLR;

    /* BAR 2 */
    fscc_register FCR;
};
```

## Macros
```c
FSCC_REGISTERS_INIT(regs)
```

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `regs` | `struct fscc_registers *` | The registers structure to initialize |

The `FSCC_REGISTERS_INIT` macro should be called each time you use the  `struct fscc_registers` structure. An initialized structure will allow you to only set/receive the registers you need.

## Set
### IOCTL
```c
FSCC_SET_REGISTERS
```

###### Examples
```c
#include <fscc.h>
...

struct fscc_registers regs;

FSCC_REGISTERS_INIT(regs);

regs.CCR0 = 0x0011201c;
regs.BGR = 10;

ioctl(fd, FSCC_SET_REGISTERS, &regs);
```

### Sysfs
```
/sys/class/fscc/fscc*/registers/*
```

###### Examples
```
echo 0011201c > /sys/class/fscc/fscc0/registers/ccr0
```

## Get
### IOCTL
```c
FSCC_GET_REGISTERS
```

###### Examples
```c
#include <fscc.h>
...

struct fscc_registers regs;

FSCC_REGISTERS_INIT(regs);

regs.CCR0 = FSCC_UPDATE_VALUE;
regs.BGR = FSCC_UPDATE_VALUE;

ioctl(fd, FSCC_GET_REGISTERS, &regs);
```

At this point `regs.CCR0` and `regs.BGR` would be set to their respective values.

### Sysfs
```
/sys/class/fscc/fscc*/registers/*
```

###### Examples
```
cat /sys/class/fscc/fscc0/registers/ccr0
```

### Additional Resources
- Complete example: [`examples/registers.c`](../examples/registers.c)

repository: commtech/fscc-linux

gha_language: C

repo_name: commtech/fscc-linux


text:
# Follicucullus Ormiston & Babcock, 1979 GENUS

#### Status
ACCEPTED

#### According to
Interim Register of Marine and Nonmarine Genera

#### Published in
Journal Paleont. 53 (2): 332.

#### Original name
null

### Remarks
null

repository: mdoering/backbone

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mdoering/backbone


text:
# Robin
Robin is an advanced queue system for ROBLOX. It uses the Queue Core developed by nabfam.

## Features
 - Any compatible UI can run Robin
 - A UI can become compatible by creating a folder in which Robin finds neccessary info.
 - Robin is spam-resistant.

 - Any script can run Robin, and someone could easily create their own Robin-operating interface.
 - Robin only runs in certain places.

license: MIT

repository: CriiStudio/robin

repo_name: CriiStudio/robin


text:
---
layout: post
title: Markdown - Tips
date: 2017-05-28 01:15:46 +0300
access: public
comments: true
categories: [markdown]
---

<!-- more -->

* TOC
{:toc}
<hr>

backticks inside inline code block
----------------------------------

<https://meta.stackexchange.com/questions/82718>

surround inline code block with double backticks and extra spaces:

    `` `IO.puts("Hello world")` ``

(how to) escape Liquid template tags in Jekyll
----------------------------------------------

1. <https://stackoverflow.com/questions/24102498>
2. <http://sarathlal.com/escape-liquid-tag-in-jekyll-posts>
3. <https://stackoverflow.com/questions/3426182>

wrap code block with `{{ "{% raw " }}%}` and `{{ "{% endraw " }}%}` tags:

    {{ "{% raw " }}%}{% raw %}
    ```html
    <link rel="stylesheet" href="{{ site.baseurl }}public/css/hyde.css">
    ```
    {% endraw %}{{ "{% endraw " }}%}

it's also possible to wrap arbitrary text with `{{ "{% raw " }}%}` and
`{{ "{% endraw " }}%}` tags:

    {{ "{% raw " }}%}{% raw %}
    both {% if ... %} and {% endif %} statements indent the next line.
    {% endraw %}{{ "{% endraw " }}%}

escape left angle bracket only
------------------------------

it's not required to escape right angle bracket:

```
=>
\<foo>
```

don't escape anything inside blocks of code.

gha_language: CSS

gha_license_id: NOASSERTION


text:
% podman-container-runlabel(1)

## NAME
podman-container-runlabel - Executes a command as described by a container-image label

## SYNOPSIS
**podman container runlabel** [*options*] *label* *image* [*arg...*]

## DESCRIPTION
**podman container runlabel** reads the specified `label` of the `image` and executes it as command on the host.  If the label does not exist, Podman will exit with an error.  Additional arguments will be appended to the command.

Historically, container images describe the contents (e.g., layers) and how a container runtime (e.g., crun(1) or runc(1)) should execute the container.  For instance, an image may set the environment and the command in its configuration.  However, a container image cannot directly specify how a container engine such as Podman should execute it.  For instance, an image configuration does not include information about log drivers, namespaces or which capabilities it needs to run correctly.

`podman container runlabel` addresses the limitation of container images in a simple yet efficient way.  Podman will read the contents of the label and interpret it as a command that will be executed on the host.  This way an image can describe exactly how it should be executed by Podman.  For instance, a label with the content `/usr/bin/podman run -d --pid=host --privileged \${IMAGE}` instructs the image to be executed in a detached, privileged container that is using the PID namespace of the host.  This lifts the self-description of a container image from "what" to "how".

Please note that the `runlabel` command is intended to be run in trusted environments exclusively.  Using the command on untrusted images is not recommended.

## VARIABLES

The contents of a label may refer to the following variables which will be substituted while processing the label.

**IMAGE**
The name of the image.  When executing `podman container runlabel label fedora` the `IMAGE` variable will be replaced with `fedora`.  Valid formats are `IMAGE`, `$IMAGE`, `${IMAGE}` and `=IMAGE`.

**NAME**
As specified by the `--name` option.  The format is identical to the one of the IMAGE attribute.

**PWD**
Will be replaced with the current working directory.

## OPTIONS
#### **--authfile**=*path*

Path of the containers-auth.json(5) file. Default is ${XDG\_RUNTIME\_DIR}/containers/auth.json, which is set using `podman login`.  If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using `docker login`.

Note: You can also override the default path of the authentication file by setting the REGISTRY\_AUTH\_FILE environment variable. `export REGISTRY_AUTH_FILE=path`

#### **--display**

Display the label's value of the image having populated its environment variables.  The runlabel command will not execute if --display is specified.

#### **--cert-dir**=*path*

Use certificates at *path* (\*.crt, \*.cert, \*.key) to connect to the registry.  Please refer to containers-certs.d(5) for details. (This option is not available with the remote Podman client)

#### **--creds**=*[username[:password]]*

The [username[:password]] to use to authenticate with the registry if required.  If one or both values are not supplied, a command line prompt will appear and the value can be entered.  The password is entered without echo.

#### **--help**, **-h**
Print usage statement

#### **--name**, **-n**=*name*

Use this name for creating content for the container.  If not specified, name defaults to the name of the image.

#### **--quiet**, **-q**

Suppress output information when pulling images

#### **--replace**

If a container exists of the default or given name, as needed it will be stopped, deleted and a new container will be created from this image.

#### **--tls-verify**

Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true, then TLS verification will be used. If set to false, then TLS verification will not be used. If not specified, TLS verification will be used unless the target registry is listed as an insecure registry in containers-registries.conf(5).

## EXAMPLES

Execute the `run` label of an image called foobar.
```
$ podman container runlabel run foobar
```

Execute the `install` label of an image called foobar with additional arguments.
```
$ podman container runlabel install foobar apples oranges
```

Display the contents of the `run` label of image foobar.
```
$ podman container runlabel --display run foobar
```

## SEE ALSO
podman(1), crun(1), runc(1), containers-auth.json(5), containers-certs.d(5), containers-registries.conf(5)

## HISTORY
August 2021, Refinements by Valentin Rothberg (rothberg at redhat dot com)

September 2018, Originally compiled by Brent Baude (bbaude at redhat dot com)

repository: simnalamburt/podman

branch_name: refs/heads/main

repo_name: simnalamburt/podman


text:
# Solving Binary Bomb Lab challenges

Hello!

Here, we're going to solve Phase-5 of the Bomb Lab.

If you were looking for some other phases, click on the link below.
  * [Phase -1](https://officialcjunior.github.io/Binary-Bomb-Lab-Phase-1/)
  * [Phase -2](https://officialcjunior.github.io/Binary-Bomb-Lab-Phase-2/)
  * [Phase -3](https://officialcjunior.github.io/Binary-Bomb-Lab-Phase-3/)
  * [Phase -4](https://officialcjunior.github.io/Binary-Bomb-Lab-Phase-4/)
  * [Phase -6](https://officialcjunior.github.io/Binary-Bomb-Lab-Phase-6/)

_________________

`disassemble`-ing `<phase_5>` we get,

![5-1](../../images/binarybomblabs/5-1.png)

Alright.

At line `<+15>`, we can see a call to `<string_length>`, which returns the length of the string. And beneath the call, we can see `eax`, which is returned by the function, being compared to 6. So, our string must be six characters long.

As we read through, we can see a loop occuring at line `<+61>`, where it takes us back to line `<+43>` six times, with six of our characters , to which we'll get into, later. For the time being, see this loop as an encoder.

After that, we can see a fixed address `0x804980b` being pushed along with our encoded string to `<strings_not_equal>` and if they are equal, we jump over to line `<+96>` where we exit the function.

So, let's just see what lies inside `0x804980b`.

![5-2](../../images/binarybomblabs/5-2.png)

So, our input string is getting transformed into 'giants', somehow.
We just have to figure out how and for that, we go back and see what's that loop we talked about earlier, is doing to our string.

_________________

At line `<+43>`, we have our input, the string inside `ebx` and as `edx` is getting increment each iteration of the loop, each character is moved into `al` each iteration. Then, it is **AND**-ed with 0xf, which is 55 in decimal, bitwise. Then, we can see that the result is moved into `eax`, and the element in `eax`-th location in `esi` is moved into the location of the input string.

For us to move forward, we must see what's inside `esi` during the loop.

Let's use `until` to move till the line where the loop begins, and print what's inside `esi`.

We get:

![5-3](../../images/binarybomblabs/5-3.png)

Let's write this loop in some other language for a clearer view.

```
s=input()
esi='isrveawhobpnutfg'
password=""  #'giants'
for i in range (5):
	index = s[i] and 0xf
	password += esi[index]
```
_________________

It's worth nothing that 0xf is 15 and the index of the string in `esi` ranges from 0 to 15.

And `AND`-ing with 0xf is basically just extracting the last four bits of the binary representation. That is, whatever may be an input, the cipher works and therefore, there can be many solutions to `<phase_5>`

As we discussed above, `AND` is a bitwise operation.

Say, you need index as 1. So,
>   00000001 and 00001111

which gives us,

>   00000001

Even if you `AND` 0xff with 0xf, you'll still get the same result.

So, `AND` is only going to cut the most significant hex digit.

_________________

Our first letter of the password is 'g'. It lies on the 15-th index of the string in `esi`. So, we must find a character whose ASCII representation when AND-ed with 0xf returns 15.

So, 0x2f,0x3f,0x4f... satisfies the condition.

In the [ASCII table](https://www.asciitable.com/index/asciifull.gif), the letter 'o' 0x6f is one of such value.

So, 'o' can be the first character of our password.
_________________

Similarly, we can reverse the cypher and figure out the the next five characters.

One of the answers ends up being **'opekmq'**.

![5-4](../../images/binarybomblabs/5-4.jpg)

Onto the final phase, we go!

url: https://raw.githubusercontent.com/akshayaky/officialcjunior.github.io/5626c8a1efb8a86ad1bdf8d0a501381cb8710f64/_posts/Binary Bomb Labs/2019-10-7-Binary Bomb Lab- Phase 5.md

filename: 2019-10-7-Binary Bomb Lab- Phase 5.md


text:
---
layout: post
title:      "CLI Final Project"
date:       2020-06-26 21:55:16 +0000
permalink:  cli_final_project
---

Hi my name is Zach and this is my CLI final project.

For the project I created a weather CLI tool to grab data from a weather API and display it to the user given the city they searched for.

Main is the start of the program, or what file is intitially used to begin the program. I made sure that repeat is always true in order to make searching for multiple cities easier. The program runs until ctrl C is imputed to the CLI.

There are two functions in main to note. Get city formats the city entered to make sure to omit any spaces like in las vegas or salt lake city, and get weather that initializes all the classes with the city entered. Lets take a look at the classes to see what’s goin on under the hood

Weather data

This is where the weather API is called. I used string interpolation to make things a bit easier to understand. Here we have 3 method variables, the location or city, URL which is the api endpoint, and res, which saves the response, as well a class variable of all which is an array that saves every instance of the class. Get response uses the API endpoint to get the data and adds response to the response variable. Also adds the class instance to the all variable. Parse json is what gets called in main and returns the parsed data for easier access.

Display

Taking a look at display shows that it takes the data and oganizes it to be displayed to the screen.
To run the program all you have to do is type "ruby main.rb" into the command line, enter a city and the data displays neatly for the user to see.

extension: markdown


text:
# Warning, WIP.

Please do not use this package in production, yet. Breaking changes are on its way.

# react-image-overlay
> Overlay images with watermarks or additional layer with transparency (i.e. `.png`). Image orientation on iOS devices is auto-corrected.

[![NPM](https://img.shields.io/npm/v/react-image-overlay.svg)](https://www.npmjs.com/package/react-image-overlay) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

With `npm`:

```bash
npm install --save react-image-overlay
```

With `yarn`:

```bash
yarn add react-image-overlay
```

### To do
* styling props for image and overlay

## Usage

```jsx
import React, { Component } from 'react'
import Overlay from 'react-image-overlay'

class Foo extends Component {
  render () {
    return (
      <Overlay
          url='https://placeimg.com/250/250/any' // required
          overlayUrl='https://placeimg.com/50/50/any' // required
          imageHeight={100}
          position={'bottomRight'}
          overlayWidth={50}
          overlayHeight={50}
          overlayPadding={10}
          watermark={false}
      />
    );
  }
};
```

### Prop-types

| prop  |  type |   |
|---|---|---|
| url  | string  | required  |
|  overlayUrl |  string | required  |
| imageHeight  | number  |  optional |
| imageWidth  | number  |  optional |
| overlayHeight  | number  |  optional |
| overlayWidth  | number  |  optional |
| position  | number  |  possible values: 'bottomLeft', 'center', 'bottomRight', 'topLeft', 'topRight' |
| overlayPadding  | number  |  the amount of padding for the overlay, calculated from the edge of the main image |
| watermark  | true/false  |  use this option if you want the overlay to be applied as a watermark |

**Important Note:** Enabling watermark renders the image and overlay to a single canvas, preventing site users from downloading images separately.

## License

MIT © [saintograph](https://github.com/saintograph)

repository: saintograph/react-image-overlay

gha_language: JavaScript

repo_name: saintograph/react-image-overlay


text:
---
title: "Spatial Data Science"
author: "Edzer Pebesma, Roger Bivand"
date: ""
tags: [Spatial Data, Data Science]
link: "https://r-spatial.org/book/"
length_weight: "9.4%"
cover: "https://r-spatial.org/book/images/cover.jpg"
pinned: false
---

Edzer Pebesma, Roger Bivand Data science is concerned with finding answers to questions on the basis of available data, and communicating that effort. Besides showing the results, this communication involves sharing the data used, but also exposing the path that led to the answers in a comprehensive and reproducible way. It also acknowledges the fact that available data may not be sufficient to answer questions, and that any answers are conditional on the data collection or sampling protocols employed. This book introduces and explains the concepts underlying spatial data: points, lines, ...

gha_language: R

gha_license_id: MIT


text:
# Memory and prediction timeline
Tutorials and code examples for constructing a scale-free log-compressed memory timeline and from that  a scale-free log-compressed timeline of the estimated future.

## Creating scale-free log-compressed memory timeline

For a very basic demo of a scale-free log-compressed memory timeline look into `compressed_memory.m`. The code provides an example for storing multiple repetitions of a single stimulus over 10000 time steps in 50 log-spaced buffers.
The output figure illustrates how the input is compressed through a two-layer network. The output is characterized with logarithmically-spaced sequentially activated nodes ("time cells") that follow each stimulus presentation in a scale-invariant (width of the activation of each node scales with its peak time). At any moment in time the instantaneous firing rate of the sequentially activated neurons provides an estiamte of the recent past.

![Compressed memory](/assets/images/zoran_1/compressed_memory.png)

A schematic of a neural netwrok implemented in `compressed_memory.m` is shown below (and it can be regenerated using `SITH_recurrent_network_tikz_figure.tex`.

![Compressed memory](/assets/images/zoran_1/SITH_recurrent_network_tikz_figure.png)

## Creating temporal associations

A major utility of having acess to a compressed timeline is the ability to create temporal assocations. This is done through basic hebbing learning by binding the present input with presently active time cells. Each different stimulus has its own set of time cells, thus the association tensor (M) has three dimensions (it binds input stimulus with a past stimulus at specific lag determined with the presently active time cells). The associateve learning is implemented in `compressed_memory_temporal_associations_prediction.m`.

![Temporal associations with compressed memory](/assets/images/zoran_1/M_heatmap.png)

## Computing a prediction of the future as a scale-free log-compressed memory

Probing the temporal associations tensor (M) with the present content of the memory timeline provides an estimate of future stimuli. This is also implemented in `compressed_memory_temporal_associations_prediction.m`. See `scale_free_prediction.mp4` for a video illustrating a simple example with four sequentially activated stimuli.

## References

Shankar, K.H., and Howard, M.W. (2012). A scale-invariant internal representation of time. Neural Computation, 24, 134-193.

Shankar, K.H. and Howard, M.W. (2013). Optimally fuzzy scale-free memory, Journal of Machine Learning Research, 14, 3753-3780.

Howard, M.W., MacDonald, C.J., Tiganj, Z., Shankar, K.H., Du, Q., Hasselmo, M.E., and Eichenbaum, H. (2014). A unified mathematical framework for coding time, space, and sequences in the hippocampal region. Journal of Neuroscience, 34, 4692-4707.

Tiganj, Z., Shankar, K. H. and Howard, M. W. (2017) Neural and computational arguments for memory as a compressed supported timeline. CogSci.


text:
# GSN v2 integration

This sample dapp emits an event with the last account that clicked on the "capture the flag" button.
We will integrate this dapp to work gaslessly with GSN v2. This will allow an externally owned account without ETH to capture the flag by signing a meta transaction.

Note: On testnet [opengsn](https://opengsn.org) maintains a public service "pay for everything" paymaster so writing your own is not strictly required. Dapps might want to develop their own custom paymaster in order, for example to subsidize gas fees for new users during the onboarding process.

## Getting started

clone this repository

```bash
git clone https://github.com/GeorgeBrownCollege-Toronto/Advanced-Smart-Contracts.git ./gsnv2-integration && cd ./gsnv2-integration && git filter-branch --prune-empty --subdirectory-filter ./notes/meta-transactions/demo/gsnv2-integration HEAD && rm -rf ./.git
```

## Further reading

GSNv2 integration tutorial:

https://docs.opengsn.org/tutorials

Documentation explaining how everything works:

https://docs.opengsn.org/

repository: AleRapchan/Advanced-Smart-Contracts

repo_name: AleRapchan/Advanced-Smart-Contracts


text:
# cmd-9 [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/cmd-9&title=cmd-9&description=hughsk/cmd-9%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #

Use the cmd-9 tab-switching shortcut like Chrome does, by switching to the last
tab instead of the ninth tab.

## Usage ##

Install the package using Atom's package manager, `apm`:

``` bash
$ apm install cmd-9
```

After installing, reload your editor using `ctrl+alt+cmd+l` and your shortcut
should be adjusted for you.

## License ##

MIT. See [LICENSE.md](http://github.com/hughsk/cmd-9/blob/master/LICENSE.md) for
details.


text:
---
layout: post
title: New Visualizations
date: 04-06-2021
color: green
---

New Visualizations

I wanted to use R to render a new image of the court outcomes. The initial image I have, while descriptive, does not show the sheer number of verdicts in each category. The first image here is a text plot that depicts each of the 191 verdicts in their color categorizations.

The second image here shows the percentage breakdown of each category. Traditionally we think of women being persecuted for possible infanticide or other means of child death. However, the data shows that 2/3rds of the women are acquitted of their crimes.

repository: bstaufenbiel/bayleestaufenbiel

branch_name: refs/heads/gh-pages

gha_language: Ruby

repo_name: bstaufenbiel/bayleestaufenbiel


text:
# wth-sjp

#### This project is under heavy development.

[sjp.pwn.pl](https://sjp.pwn.pl/) parsing and translation services defined in [wth-core](https://github.com/funkyminds/wth-core) module.

The sjp is a polish dictionary and serves as a source for words definitions to be filled for flashcards.

More to come.

repository: funkyminds/wth-sjp

repo_name: funkyminds/wth-sjp


text:
# [GraphicsComponent](GraphicsComponent.hpp)

`Component` providing metadata about a `GameObject`, such as its appearance.

Inherits from [putils::Reflectible](https://github.com/phiste/putils/blob/master/reflection/Reflectible.md).

### Members

##### appearance

```cpp
std::string appearance;
```

repository: aimoonchen/kengine

repo_name: aimoonchen/kengine


text:
---
# A Recent and Upcoming Talks section created with the Pages widget.
# This section displays recent talks from `content/talk/`.
widget: pages  # See https://sourcethemes.com/academic/docs/page-builder/
headless: true  # This file represents a page section.
active: true  # Activate this widget? true/false
weight: 40  # Order that this section will appear.
title: Recent & Upcoming Talks
subtitle: ""

content:
  # Page type to display. E.g. post, talk, or publication.
  page_type: event
  # Choose how much pages you would like to display (0 = all pages)
  count: 5
  # Choose how many pages you would like to offset by
  offset: 0
  # Page order. Descending (desc) or ascending (asc) date.
  order: desc

design:
  # Toggle between the various page layout types.
  #   1 = List
  #   2 = Compact
  #   3 = Card
  #   4 = Citation (publication only)
  view: 2
---

repository: bdwilliamson/personal-website

gha_language: HTML

repo_name: bdwilliamson/personal-website


text:
# Mock Duck

[![Latest Stable Version](https://poser.pugx.org/donatj/mock-duck/version)](https://packagist.org/packages/donatj/mock-duck)
[![License](https://poser.pugx.org/donatj/mock-duck/license)](https://packagist.org/packages/donatj/mock-duck)

A Simple, Sane, Mock Builder for PHPUnit

Currently in a very early stage of development.

## Requirements

## Installing

Install the latest version with:

```bash
composer require 'donatj/mock-duck'
```

## Documentation

### Class: \donatj\MockDuck\Exceptions\MockBuilderRuntimeException

Exception thrown as a general runtime exception for the MockBuilder

### Class: \donatj\MockDuck\Exceptions\MockMethodNotFoundException

Exception thrown by a method mock on invoke when it does not match the spec
and wishes to indicate the parent should continue

### Class: \donatj\MockDuck\InvokableMethodInterface

### Class: \donatj\MockDuck\MethodCallFallthrough

Executes given invokables until one is successful

#### Undocumented Method: `MethodCallFallthrough->__construct(callable ...$invokables)`

---

#### Undocumented Method: `MethodCallFallthrough->__invoke($args)`

### Class: \donatj\MockDuck\MethodCallOrdered

Allows setting method invocations on subsequent calls

This is one of the only parts of MockDuck that is not functionally pure and
thus should be handled with special care

#### Undocumented Method: `MethodCallOrdered->__construct(callable ...$invokables)`

---

#### Undocumented Method: `MethodCallOrdered->__invoke($args)`

### Class: \donatj\MockDuck\MethodCallParameterMatcher

Matches a given set of method parameters to a method invoker

#### Undocumented Method: `MethodCallParameterMatcher->withEquality([ $equality = true])`

---

#### Method: MethodCallParameterMatcher->withMethodParameterMatch

```php
function withMethodParameterMatch(callable $invokable, $args) : self
```

##### Parameters:

- ***callable*** `$invokable` - The method invokable
- ***mixed*** `$args` - The arguments to match against. Accepts and matches against PHPUnit constraints

##### Returns:

- ***$this***

---

#### Undocumented Method: `MethodCallParameterMatcher->__invoke($args)`

### Class: \donatj\MockDuck\MethodCallReturns

#### Method: MethodCallReturns->__construct

```php
function __construct($value)
```

##### Parameters:

- ***mixed*** `$value` - The value to return

---

#### Undocumented Method: `MethodCallReturns->__invoke($args)`

### Class: \donatj\MockDuck\MockBuilder

#### Method: MockBuilder->__construct

```php
function __construct(string $className [, ?\PHPUnit\Framework\Assert $asserter = null])
```

MockBuilder constructor.

---

#### Undocumented Method: `MockBuilder->withMethodsExcluded(string ...$methods)`

---

#### Method: MockBuilder->withDisabledConstructor

```php
function withDisabledConstructor(bool $disable) : self
```

Enable or disable the original constructor

##### Returns:

- ***$this***

---

#### Method: MockBuilder->withMockMethod

```php
function withMockMethod(string $method, callable $invokable) : self
```

##### Returns:

- ***$this***

---

#### Method: MockBuilder->buildMockClass

```php
function buildMockClass() : string
```

Build the requested mock to the given spec

##### Returns:

- ***string*** - The fully qualified class name of the new mock object

---

#### Method: MockBuilder->buildMock

```php
function buildMock($constructorArgs) : object
```

Build the requested mock to the given spec and instantiate it

##### Parameters:

- ***mixed*** `$constructorArgs` - The arguments to pass to the constructor

##### Returns:

- ***object*** - The instance of the Mock

repository: donatj/mock-duck

repo_name: donatj/mock-duck


text:
# ToDo App

## How to run

compile and run with maven
Java 8 or above is required.
```
mvn jetty:run
```

access the following URL
```
http://localhost:8080/index.jsp
```

## Debug

If you need to debug the process, specify the following parameter to MAVEN_OPTS
```
-Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=y
```

repository: akr-ssk/todo-app

gha_language: Java

repo_name: akr-ssk/todo-app


text:
## Ansible Roles - Automatic Updates

- [Ansible Roles - Automatic Updates](#ansible-roles---automatic-updates)
  - [What is this?](#what-is-this)
  - [Resource Requirements](#resource-requirements)
  - [Dependencies](#dependencies)
  - [Supported Distributions](#supported-distributions)
  - [Quick-start & Usage](#quick-start--usage)
  - [Contributing](#contributing)
  - [Acknowledgements](#acknowledgements)
  - [License](#license)

### What is this?

* A set of Ansible roles for CentOS and Debian hosts that provides users with the option to enable and/or remove automatic updates for packages installed.
  * **Deploy** - [`centos_automatic_updates.yaml`](./centos_automatic_updates.yaml) and [`debian_automatic_updates.yaml`](./debian_automatic_updates.yaml) playbooks will install packages that enable automatic updates. Custom configuration files to set automatic updates will then be copied to the remote hosts. If there are any existing configuration files, a task will fetch the files and store them in a `backups` directory under the `files` directory.
  * **Remove** - [`centos_automatic_updates_remove.yaml`](./centos_automatic_updates_remove.yaml) and [`debian_automatic_updates_remove.yaml`](./debian_automatic_updates_remove.yaml) will remove packages and configuration files from the hosts that enable automatic updates.
* For reference, below is a demonstration of how the directory structure of `backups` will look like after a number of `debian_automatic_updates.yaml` and `centos_automatic_updates.yaml` playbook runs at different time intervals.

```yaml
# CentOS
.
└── <INVENTORY_HOSTNAME_001>
    ├── 2021-07-25T22:34:13Z-CentOS-8.4
    │   └── automatic.conf
    ├── 2021-07-25T22:35:33Z-CentOS-8.4
    │   └── automatic.conf
    └── 2021-07-25T22:37:20Z-CentOS-8.4
        └── automatic.conf

# Debian
.
└── <INVENTORY_HOSTNAME_002>
    ├── 2021-07-25T22:34:21Z-Debian-10
    │   ├── 20auto-upgrades
    │   ├── 50unattended-upgrades
    │   └── listchanges.conf
    ├── 2021-07-25T22:35:42Z-Debian-10
    │   ├── 20auto-upgrades
    │   ├── 50unattended-upgrades
    │   └── listchanges.conf
    └── 2021-07-25T22:37:27Z-Debian-10
        ├── 20auto-upgrades
        ├── 50unattended-upgrades
        └── listchanges.conf
```

### Resource Requirements

* [Debian](https://www.debian.org/distrib/) and/or [CentOS Stream](https://www.centos.org/centos-stream/) host(s) that the playbooks will be run against.

### Dependencies

* `dnf-automatic`, `unattended-upgrades`, `apt-listchanges`
* [`ansible-vault`](https://docs.ansible.com/ansible/latest/user_guide/vault.html) - [**optional**] - can be used in the [`debian_ssh.yaml`](./debian_ssh.yaml) or [`centos_ssh.yaml`](./centos_ssh.yaml) playbook to encrypt and store sensitive data "at rest".
  * In this use case, the `ansible_sudo_password` variable, which is used as the privilege escalation password, is stored in a vault.
  * Once the secret has been created and added to the playbook, in order for a user be able to become `sudo` to run the playbook, they will need to decrypt the vault to access the variable.
  * This can be achieved by passing one of the following flags listed below when executing the the playbook;
    * `--ask-vault-pass`
    * `--vault-password-file`
  * Below is a demonstration of how the encrypted variable is defined in the playbooks;

```yaml
---
# playbook for the debian_automatic_updates role.
- hosts: debian_hosts
  # vars_files:
  #   - become-secret
  become: true
  roles:
    - debian_automatic_updates
```

  * For more information on how to create encrypted variables, review the [official `ansible` documentation](https://docs.ansible.com/ansible/latest/user_guide/vault.html#encrypting-individual-variables-with-ansible-vault).

### Supported Distributions

* Tested on;
  * `debian-10` , `centos-8-stream`

### Quick-start & Usage

```bash
# clone the repository
$ git clone git@github.com:hubvu/automatic-updates-ansible.git

# navigate into the directory
$ cd automatic-updates-ansible/

# run the master playbook `site.yaml` with verbosity
# for non Ansible Vault users
$ ansible-playbook site.yaml \
  --inventory-file=hosts \
  --ask-become-pass \
  --verbose

# run the master playbook `site.yaml` with verbosity
# for Ansible Vault users
$ ansible-playbook site_remove.yaml \
  --inventory-file=hosts \
  --ask-vault-pass \
  --verbose

# review the `backups` directory for the configuration files of each host
$ ls /roles/<role_name>/files/backups/<inventory_hostname>/<date_time>-<distribution_name>-<distribution_version>/
```

### Contributing

* Contribution guidelines for this project can be found in the [Contributing](./CONTRIBUTING.md) document.

### Acknowledgements

* [DNF Automatic - Documentation](https://dnf.readthedocs.io/en/latest/automatic.html).
* [Unattended Upgrades - Debian Wiki](https://wiki.debian.org/UnattendedUpgrades).
* [Ansible Lint](https://github.com/ansible-community/ansible-lint).
* [Ansible Lint for GitHub Action](https://github.com/ansible/ansible-lint-action).

### License

* Licenced under the [MIT License](./LICENSE.md).

repository: hubvu/automatic-updates-ansible

repo_name: hubvu/automatic-updates-ansible


text:
---
title: OnClientNodeClicked
page_title: OnClientNodeClicked - RadTreeView
description: Check our Web Forms article about OnClientNodeClicked.
slug: treeview/client-side-programming/events/onclientnodeclicked
tags: onclientnodeclicked
published: True
position: 18
---

# OnClientNodeClicked

##

The **OnClientNodeClicked** client-side event occurs when the user clicks on a node, after the **RadTreeView** responds to the mouse click. When using keyboard navigation the event is fired after pressing Enter.

The event handler receives parameters:

1. The **TreeView** instance that fired the event.

1. Event arguments with function:

* **get_node()** retrieves a reference to the clicked on node.

* **get_domEvent()** retrieves a DOM event object of the node click.

The example below displays the text for the clicked node.

````ASPNET
<telerik:RadTreeView RenderMode="Lightweight" ID="RadTreeView1" runat="server" OnClientNodeClicked="ClientNodeClicked">
</telerik:RadTreeView>
````
````JavaScript
function ClientNodeClicked(sender, eventArgs) {
	var node = eventArgs.get_node();
	alert("You clicked " + node.get_text());
}
````

# See Also

 * [OnClientNodeClicking]({%slug treeview/client-side-programming/events/onclientnodeclicking%})

 * [RadTreeNode]({%slug treeview/client-side-programming/objects/radtreenode%})

repository: telerik/ajax-docs

gha_language: C#

repo_name: telerik/ajax-docs


text:
# django-employee-register-system

[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/mdcg/django-employee-register-system/blob/master/LICENSE)

A simple employee registration system written in Django.

## First Steps

First of all, you will need to have Docker and Docker Compose installed on your machine. To do this, simply access the following links with the installation guides:

* [Install Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/)
* [Install Docker Compose](https://docs.docker.com/compose/install/)

Once both Docker and Docker Compose are installed, we will now need to create our environment variables.

To do this, initially go to the `config` folder and run the following command:

```
> cp .env-example .env
```

The above command will create a `.env` file where our environment variables will be stored. Now just open it and add the corresponding values for each of the variables.

## Running

To run the system, simply run the following command:

```
> docker-compose up
```

The above command may take a while, so be patient.

## Creating a superuser

Make sure, first of all, that the system is running, as the following commands will have no effect otherwise.

You will initially need the hash of the container that Django is running. To do this, run the following command:

```
> docker container ps | grep django-employee-register-system_dev
```

You will see an output like this:

```
7eec065c2c7a        django-employee-register-system_dev   "sh -c 'python --ver…"   2 minutes ago       Up 2 minutes        <IP_ADDRESS>:8000->8000/tcp   django-employee-register-system_dev_1
```

Now you need to copy the hash of the container that Django is running (in my case the hash is `7eec065c2c7a`) and execute the following command together with it:

```
> docker exec -it <container_hash> sh
```

Right now you are inside the Django container. Run the following command:

```
> python manage.py createsuperuser
```

Now just enter the data for the superuser registration. Once you have registered, just type `exit` to return to your computer's shell.

## Contributing

Feel free to do whatever you want with this project. :-)

repository: mdcg/django-employee-register-system

repo_name: mdcg/django-employee-register-system


text:
# Matching Game

## Table of Contents

* [Prerequisites](#prerequisites)
* [Goals](#goals)
* [Instructions](#instructions)
* [Contributing](#contributing)
* [Deployment](#deployment)
* [Authors](#authors)
* [License](#license)

## Prerequisites

This is a browser game, which is built using responsive design patterns and ideally should be accessible on any device with the Internet connection.

## Goals

The game aims to develop the player's short-term memory and a speed of the reaction. Both goals are using the activity-based approach in pedagogy.

## Instructions

Player opens the first card and remembers its position, if the second opened card does not match, player should open another pair, unmatched cards are closed again. If the cards matched, they stay open. Therefore, the the number of elements to remember reduces as the game proceeds. From the beginning of the game the user is attributed 5 stars, the number of stars reduces dynamically with the number of moves made by the player (the move equals to 2 clicks to match the cards). The number of stars and the time is displayed in the final success window, which appears when all cards are matched.

## Contributing

This repository accepts pull requests.

For details, check out [CONTRIBUTING.md](CONTRIBUTING.md).

## Deployment

The project is built with pure JavaScript. No dependencies were used.

## Authors

The initial commit belongs to Richard Kalenhoff, provided as a template to the second project in the framework of Front-End Nanodegree program at Udacity learning platform.

## License

This project is licensed under the MIT License.

repository: asnota/MatchingGame

repo_name: asnota/MatchingGame


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

### Description

On version 16.x before 16.1.0, 15.1.x before 15.1.4, 14.1.x before <IP_ADDRESS>, and all versions of 13.1.x, 12.1.x, and 11.6.x, a reflected cross-site scripting (XSS) vulnerability exists in the resource information page for authenticated users when a full webtop is configured on the BIG-IP APM system. Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/p1ay8y3ar/cve_monitor

repository: trickest/cve

repo_name: trickest/cve


text:
---
title: useful linux commands
date: 2004-01-16 12:00:00 UTC
---

This is a random aggregation of useful linux commands.
Useful for those who will be eventually stuck as I once was.
Or those who didn’t know that certain things can be done in such a
smooth way…

#### Print a locked pdf

To be able to print a pdf file even though it has been print locked you
can convert the pdf to postscrloipt and back again to a pdf.

$ pdf2ps locked.pdf unlocked.ps && ps2pdf unlocked.ps unlocked.pdf

#### Mount a cd-rom image

This will mount an image file to a certain mountpoint such that it can
be used as a usual drive (like a virtual drive in windows).

$ mount -o loop -t iso9660 <isofilename> <mountpoint>

#### ssh with x-window support

With this you can launch an x-window application via an ssh connection
(provided that the host computer does support the particular toolkit).

$ ssh -l <loginname> <remote-host> -X -C <path-to-application>

#### Print out manpage

Prints out a manpage in a nicely formatted way.

$ man <manpage> | col -b | ul -t dumb | lpr -P<printername>

$ man -Tps <manpage> | lpr -P<printername>

#### Find advanced

Find is a very powerful command, as it is extensible in a very
convenient way.\
Every find-result is passed to “command”.

$ find <parameters> -exec <command '{}' ';'

example 1, copies all jpg images to the folder “img/”

$ find -name *.jpg -exec cp '{}' img/ ';'

example 2, searches all textfiles for “searchstring”

$ find -name *.txt -exec grep "searchstring" '{}' ';'

#### Disable beep

If it’s about time to disable the annoying beep in the shell. For the
current user

$ echo "set bell-style none">> ~/.inputrc

For all users (you have to be root) in `/etc/inputrc` set the line
`set bell-style none`

#### Convert a text file from DOS to Unix style

This tool converts dos formatted text files with end-of-line `^M^J` to
unix end-of-line `^J`.

$ dos2unix <file

#### Patch file

With the following command you create a patch file from any source file.

$ diff -u src.old src.new1 > file.patch0

To apply the patch

$ patch -p0 file < file.patch0

#### Convert a large file into small files

$ split -b 650m file # split file into 650MB chunks

$ cat x* > largefile # merge files into 1 large file

#### Web page dump

The following will save the contents of a web page to a textfile.

$ lynx -dump http://www.somesite.org/somepage.html > textfile

#### Clear file contents

In order to clear the contents of a file such as a logfile, do not use
rm to delete the file and then create a new empty file, because the file
may still be accessed in the interval between commands. The following is
the safe way to clear the contents of the file.

$ :>file-to-be-cleared

#### Merge two PostScript or PDF files

$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=merge.ps -f file1.ps file2.ps

$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=merge.pdf -f file1.pdf file2.pdf

#### Samba client basics

Mount a windows (samba) share

$ mount -t smbfs -o username=myname,uid=my_uid,gid=my_gid //server/share /mnt/smb

$ smbmount //server/share /mnt/smb -o "username=myname,uid=my_uid,gid=my_gid"

List the shares on a computer

$ smbclient -L <IP_ADDRESS>

Samba neighbors can be checked from Linux using the following command

$ smbclient -N -L ip_address_of_your_PC | less

$ nmblookup -T "*"

#### Make iso from cd

$ dd if=/dev/cdrom of=image.iso

#### Burn iso to cd

For an ide device

$ cdrecord -v speed=SPEED dev=ATAPI:1,0,0 -data image.iso

To find out the device number, use the following command

$ cdrecord -scanbus dev=ATAPI

Alternatively, you can specify the ide device directly

$ cdrecord -v speed=SPEED dev=ATAPI:/dev/hdc -data image.iso

For a scsi device

$ cdrecord -v speed=SPEED dev=1,0,0 -data image.iso

To find out the device number, use the following command

$ cdrecord -scanbus

repository: koffeinfrei/koffeinfrei-www

repo_name: koffeinfrei/koffeinfrei-www


text:
# Reset DHCP Client ID on an Ubuntu VM template

Ran into an issue where a VM was cloned from an Ubuntu template, and **all** of the clones were receiving the same DHCP assign IP addresses. For Ubuntu the unique client identifier is held in the `/etc/machine-id` file.

It is worth noting that removing the file, expecting it to be regenerated does not work. To force a new identifier to be assigned, the following must be true when the VM boots up.

1. The file must exist.
1. The file must be empty.

## Invocation

To reset it to be an _empty_ file, use the following:

```bash
echo "" | sudo tee /etc/machine-id >/dev/null
```

## Reference

- https://blah.cloud/kubernetes/creating-an-ubuntu-18-04-lts-cloud-image-for-cloning-on-vmware/

repository: hoshposh/til

repo_name: hoshposh/til


text:
Portfolio Update #2

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

## Description

Added a picture of myself.
Added Bootstrap and Jquery links to HTML
Added bootstrap colummns to separate all the sections.
Added Project 1 which is called Daily Vibes to webpage, also added two of the homeworks.
Added links to Project/Homework assignemnt page and links to the repos.

Adjusted the CSS to fit this page better.

Added a get quote button using Jquery that when clicked will pull a random quote from a premade array and it will display it on the webpage. The quotes are from hearing them in school or from podcasts that've I've listened to.
Used the imgur API to get images from a premade album on imgur and used those images to randomly generate a new background every time the page is refreshed.

A portfolio update that includes two new projects and a couple html, css and JS changes.

## Table Of Contents

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Contributing](#contribution)
- [Test](#test)
- [Questions](#questions)

## Installation

To install the necessary dependencies, run the following command:

  there are no dependecies

## Usage

its my portfolio

## License

The license used is "mit"

Click the license button at the top to learn more about your license.

## Contribution

free to use

## Test

To run tests, run the following command:

  there are no tests

## Questions

If you have any questions about the repo, open an issue or contact me directly at<EMAIL_ADDRESS>You can find more of my work at https://github.com/EdgarL21

Contact me, my github and email are above

https://edgarl21.github.io/Portfolio/


text:
---
layout: page
title: About me
subtitle: let's break the ice
---

My name is K M Ibrahim Asif. I am a Electrical Systems Engineer at Halla Mechatronics. I am also pursuing a PhD in Computer Science from Mississippi State University. I like to identify myself as a Developer/Engineer, a Researcher, and last but not least as a Gamer. When I am not performing as one of these roles, I spend that time with my family.

I currently live in Saginaw, Michigan. My hometown is Dhaka, Bangladesh. I have a Masters degree in Computer Science. I am enthusiast about all things Computer Science, specially AI (Artifical Intelligence), and HCI (Human Computer Interaction). Python is my preferred programming language, but I am comfortable writing codes in C, C++, Java, and C# as well.

I occassionally play video games on my Xbox One and PC. FIFA 20 and Civilization VI are my go to titles for now. If you are up for a game of FIFA, hit me up on Xbox One (Gamer Tag: kia6765).

I hope you enjoy your stay at this site. Follow me on [twitter](https://twitter.com/kmiasif) or [github](https://github.com/kmasif) if you would like to have a conversation with me. Here’s the link to my [Linkedin](https://www.linkedin.com/in/kmasif/) for professional conversation as well.


text:
# Search Input Example

This is an example of building a search input with Remix.

- [Remix Docs](https://remix.run/docs)

## Development

From your terminal:

```sh
npm install
npm run dev
```

This starts your app in development mode, rebuilding assets on file changes.

## Deployment

First, build your app for production:

```sh
npm run build
```

Then run the app in production mode:

```sh
npm start
```

## Preview

Open this example on [CodeSandbox](https://codesandbox.com):

[![Open in CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/remix-run/examples/tree/main/search-input)

repository: lyquocnam/examples

repo_name: lyquocnam/examples


text:
# Integrations

## `pre-commit`

To learn more about `pre-commit`, [check out their docs](https://pre-commit.com).

With [Pull 674](https://github.com/domluna/JuliaFormatter.jl/pull/674), support for
`pre-commit` was added. To add `JuliaFormatter.jl` to your own `pre-commit` workflow,
add the following to your `.pre-commit-config.yaml`.

```yaml
repos:
# ... other repos you may have
- repo: "https://github.com/domluna/JuliaFormatter.jl"
  rev: "v1.0.18"  # or whatever the desired release is
  hooks:
  - id: "julia-formatter"
# ... other repos you may have
```

You can find a list of releases [here](https://github.com/domluna/JuliaFormatter.jl/releases).
**Be sure to use the entire version string!** (You can double-check this by opening the
release and looking at the part of the URL that follows `.../releases/tag/VERSION`.)

gha_language: Julia


text:
Contributing to Ansible-lint
============================

To contribute to ansible-lint, please use pull requests on a branch of your own fork.

After [creating your fork on GitHub](https://guides.github.com/activities/forking/), you can do:

```
git clone git@github.com:yourname/ansible-lint
cd ansible-lint
git checkout -b your-branch-name
DO SOME CODING HERE
git add your new files
git commit
git push origin your-branch-name
```

You will then be able to create a pull request from your commit.

All fixes to core functionality (i.e. anything except rules or examples) should
be accompanied by tests that fail prior to your change and succeed afterwards.

Feel free to raise issues in the repo if you don't feel able to contribute a code fix.

Standards
---------

ansible-lint is flake8 compliant with `max-line-length` set to 100
(see [setup.cfg](setup.cfg)).

ansible-lint works only with [supported Ansible versions](
https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#release-status
) at the time it was released.

Automated tests will be run against all PRs for flake8 compliance and Ansible
compatibility - to check before pushing commits, just use `tox`.

Talk to us
----------

Discussion around ansible-lint happens in `#ansible-galaxy` IRC channel on Freenode and the [Ansible Development List](https://groups.google.com/forum/#!forum/ansible-devel)

For the full list of Ansible IRC and Mailing list, please see the [Ansible Communication](https://docs.ansible.com/ansible/latest/community/communication.html) page
Release announcements will be made to the [Ansible Announce](https://groups.google.com/forum/#!forum/ansible-announce) list.

Possible security bugs should be reported via email to<EMAIL_ADDRESS>
Code of Conduct
---------------

As with all Ansible projects, we have a [Code of Conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)


text:
# What is DatTrack

DatTrack is a small command line tool for [Digitally Imported](http://di.fm) fans.

It displays recent tracks from a particular channel in the shell.

DatTrack was developed as a small code kata excercise and should not be taken seriously.

## Installation

Assuming you have `~/bin` in `PATH`, from the repository root:

    ./install.sh

Alternatively you can build `dattrack` manually and copy it
anywhere in `PATH`:

    go build
    cp dattrack /usr/local/bin/

## Usage

    dattrack [--channel NAME --limit LIMIT]

Channel names are currently not parsed in any intelligent way so you have to know them:

 * Epic Trance: `et`, `epictrance`
 * Liquid DnB: `ldnb`, `liquiddnb`
 * Club Dubstep: `clubdubstep`, `clubds`
 * Electro House: `electrohouse`
 * Hands Up: `handsup`, `hu`
 * Glitch Hop: `glitchhup`, `gh`

This will be improved and expanded in future versions.

## License

Released under the BSD license.

Copyright Michael S. Klishin, 2012

repository: michaelklishin/dattrack

repo_name: michaelklishin/dattrack


text:
# typescript-linq Node.js test with mocha.

 This is the test project for the npm package typescript-linq in version 1.0.4.
 The test suite is based on the 'mocha' test framwork.

## Requirements

 The rquirements for this test are:
 - mocha V3.0.2
 - typescript-linq V1.0.2
 - nodejs V6.6.0
 - TypeScript V1.8.34
 - Node.js Tools V1.2

The **'mocha'** and **'typescript-linq'** packages are declared as dependencies in the **'package.json'** file. Use the npm package manager in Visual Studio or run the npm cli command **"npm install"** in the project root directory to install them.

The Node.js runtime can be installed with the latest setup program.
You will find it at: [nodejs.org](https://nodejs.org).

The TypeScript compiler is part of the Visual Studio distribution and doesn't need a separate installation.

You will need the **'Node.js Tools'** in order to open the project. If they are not already installed, you might install them by using the **"Tools -> Extensions and Updates..."** dialog in Visual Studio.

The project is a VisualStudio project created with the Visual Studio Community Edition 2015 Update 3. This edition can be used free of charge and is available at: [www.visualstudio.com](https://www.visualstudio.com/downloads/)

## Running

You can run the test suite after a successful build by using the menu **"Debug -> Start Debugging"**, you can hit the **"F5"** key or you can run the npm cli command **"npm test"** in the project root directory.

## License

This project is licensed  by the "Microsoft Public License (MS-PL)". The whole license is available at: [Open Source Initiative (OSI)](https://opensource.org/licenses/MS-PL)

## Author

Lord Saumange<EMAIL_ADDRESS>

license: MS-PL


text:
---
layout: default
---

# 1997-11-30 - Updating the white bit

## Header Data

From: Tim May<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 67d9cf9b0892f8c6fa0ab63f48affd753a0759ed4a08e82316d19d1c1a2b1e9c

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-11-30 19:21:24 UTC

Raw Date: Mon, 1 Dec 1997 03:21:24 +0800

## Raw message

```
{% raw  %}From: Tim May<EMAIL_ADDRESS>Date: Mon, 1 Dec 1997 03:21:24 +0800
To<EMAIL_ADDRESS>Subject: Updating the white bit
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 9:03 AM -0700 11/30/97, Anonymous wrote:

>Anonymous<EMAIL_ADDRESS>wrote:

>>Cypherpunk technologies will be a major force to eliminate racism.
>>With privacy protected transactions, the color of a person's skin,
>>his religion and his ethnicity are no longer apparent.  People will
>>be able to succeed on merit - and not the "good old boys" definition
>>of merit, where somehow only white males seem to have what it takes.
>
>White males are a minority group.  Also, I believe you are
>overestimating the effects of racism when it comes to hiring talented
>technical professionals.  If not, there is a tremondous arbitrage
>opportunity out there.
>
>Monty Cantsin
>Editor in Chief

And the original comment above, that cypherpunk technologies will be a
major force to eliminate racism is only part of the picture....the
technologies also allow race to be considered as participants choose.

There is no reason the Chaumian ideas of credentials, usually with the
example of "age credentials," cannot be trivially extended to race or
gender or whatever credentials. As I wrote in an article which may
(someday) see print in a book about "true names":

"A "politically incorrect" usage of these virtual communities is to use
"race bits" to bar membership by certain races in such communities. This
can even be done without violating the protection of a nym, using the idea
of a "credential without identity." For example, the Aryan Cybernation
could demand that a credential be displayed showing one to be a Caucasian.
Ironically, an equivalent example, but one which is deemed politically
correct by many, is the example of "women-only" forums on the Net. In this
case, a woman could gain access to a women-only forum by demonstrating
possession of a credential with the appropriate gender bit set. (At the
simplest level, this can be done by having other women "vouch" for a
candidate, digitally signing a statement which the candidate presents. A
more robust system, with less opportunity for false use or false transfer
(perhaps to a male, horrors!) would be to implement Chaum's credentials
without identity scheme. But the point is to show how virtual communities
can establish their own access rules and their own enforcement mechanisms."

--Tim May

The Feds have shown their hand: they want a ban on domestic cryptography
---------:---------:---------:---------:---------:---------:---------:----
Timothy C. May              | Crypto Anarchy: encryption, digital money,
ComSec 3DES:<PHONE_NUMBER> | anonymous networks, digital pseudonyms, zero
W.A.S.T.E.: Corralitos, CA  | knowledge, reputations, information markets,
Higher Power: 2^2,976,221   | black markets, collapse of governments.
"National borders aren't even speed bumps on the information superhighway."

{% endraw %}
```

## Thread

+ Return to [November 1997](/archive/1997/11)
+ Return to [December 1997](/archive/1997/12)

+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to<EMAIL_ADDRESS>(Anonymous)](/authors/nobody_at_replay_com_anonymous_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"

+ 1997-11-30 (Mon, 1 Dec 1997 00:13:57 +0800) - [Re: New free speech oriented civil rights site](/archive/1997/11/2e938baf38e53b9c075d0ddc328de9c4161cd12d594b51de48fc69176b033c99) -<EMAIL_ADDRESS>(Anonymous)_
  + 1997-11-30 (Mon, 1 Dec 1997 03:21:24 +0800) - Updating the white bit - _Tim May<EMAIL_ADDRESS>  + 1997-12-01 (Mon, 1 Dec 1997 08:34:48 +0800) - [Re: New free speech oriented civil rights site](/archive/1997/12/bfc450bf7d064aa6c6d1a8a7ced2423f598b8982c138e832bc2c1e4fc01fa19c) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_


text:
---
title: "RENCI offers “food for the mind” at informational ‘Bistros’"
slug: renci-offers-food-for-the-mind-at-informational-bistros-2
spotlight: false
publish_date: 2008-03-27
author: subers
featuredImage: null
groups:
    -
projects:
    -
people:
    -
teams:
    -
collaborations:
    -
tags:
    - ["Renaissance Bistro","Shoah VHA","Visual History Archive (VHA)"]
---
CHAPEL HILL, NC, March 27, 2008 – The public is invited to feed their minds—as well as their stomachs—at the Renaissance Computing Institute’s (RENCI) Renaissance Bistro. RENCI’s informal informational bistro session will focus on the University of Southern California Shoah Foundation Institute Visual History Archive (VHA) and how to use it for personal and professional research.

The VHA is a video archive of testimonials from Holocaust survivors and witnesses offered through the USC Shoah Foundation Institute. The archive includes nearly 52,000 video testimonies of Holocaust survivors, witnesses and liberators collected in 32 languages and from 56 countries.

The Renaissance Bistro will be held from 12 p.m. – 1 p.m. Thursday, May 1, in the OIT-Telecommunications Building on the West Campus of Duke University. The event is free and open to the public. Lunch is included.

Faculty, staff and students at UNC-Chapel Hill, Duke University, and North Carolina State University (NCSU) have access to the VHA through RENCI. It is also available to the general public from any of the three campus networks. Public listening/viewing areas are available at Davis Library at UNC, D.H. Hill Library at NC State, and Perkins library at Duke. For directions to the bistro, see http://www.renci.org/focusareas/eduoutreach/bistro.php. RSVP by April 24 to
<a<EMAIL_ADDRESS>at renci.org.

RENCI…Catalyst for Innovation
The Renaissance Computing Institute brings together teams of talented researchers, engineers, technologists and leaders in government, business, the arts and humanities to attack major research questions and community issues in ways that accelerate discovery and drive innovation. RENCI has nationally significant expertise and capabilities in high performance computing, visualization, collaborative tools, networking, device prototyping, and data systems as well as engagement sites across the state. Founded in 2004 as a major collaborative venture of Duke University, North Carolina State University, the University of North Carolina at Chapel Hill and the state of North Carolina, RENCI is a statewide virtual organization. For more, see www.renci.org.

repository: stephsuber/renci-website

repo_name: stephsuber/renci-website


text:
slack-integration
=================

Some integration scripts for the popular Slack messaging platform.

## Features

### Rallybot Cron
Periodically pushes notifications from Rally into our team's Slack channel. Notifications are sent whenever:

1. a comment is added to a ticket
2. a new defect, user story, or test case is created
3. a user story changes state

The bot uses a combination of Rally's _state_ and _ready_ fields to track the progress of user stories. When a story's state is set to "In-Progress" and the ready field is checked, rallybot will announce that the story is ready for testing. When the QA team has completed testing, they may either: 1) uncheck the ready flag to have rallybot announce that the story needs work, or 2) set the story to "Completed" to notify the Product Owner that it is ready for acceptance.

> **Note**: Rally automatically sets a story's state to "Completed" when all of its tasks are completed, so be sure to leave at least one open task in order to correctly track stories with defects.

### Rallybot
We use this to query our Rally instance for defects, tasks and user stories. It can be configured to respond to a Slack [slash command](https://slack.zendesk.com/hc/en-us/articles/201259356-Slash-Commands) or to any messages that start with a Rally ticket's formatted id, e.g.:
```
/rallyme DE12345
/rallyme US23456 project
TA34567 owner description
```
Entering the id of an artifact without any arguments returns a nicely formatted summary of the defect, story or task, including the owner/submitter, creation date, story title, project and description. For documents that have attachments, such as uploaded screenshots, the summary will include a link to the first available attachment. Otherwise, adding one or more field names after the id will filter the summary to just display the requested fields.

### Image Bot / Gif Bot
This one is simple. It uses the google image search JSON API to query for images that match a keyword. It is configured to use the Safe Search feature, since we use this tool in the workplace.  This bot allows you to post an XKCD comic to the room, including the ALT text, which will be displayed beneath the image.

E.g. `/xkcd 100` will return the "family circus" episode of XKCD.

## Installation

1. Clone this repository to your server

2. Create your config file from the default template:

   ```
   cd scripts/config
   cp default.config.php config.php
   ```

3. Create a new incoming webhook in Slack

   **Note**: Leave the channel to post to set to "#general", our scripts use channel-overrides to respond wherever the user issues a slash command.

4. Edit your config file with the incoming webhook's unique webhook URL

5. Add a slash command to Slack for each feature (for example: "When a user enters /rallyme, POST to http://example.com/rallyme.php")

   **Note**: The scripts will respond to requests over POST or GET.

6. If you are implementing Rally Bot, add your credentials to the config file

repository: jpklein/slack-integration

repo_name: jpklein/slack-integration


text:
# standalone web server for developers

A super simple standalone http web server useful for development and testing purpose.

### main features:
* Written in C++
* **NO** dependencies (easy to compile and porting)
* CORS friendly
* Just run it (no external dll, .so and other SH**!)

### command line arguments:

-h host (default: localhost)

-p port (default: 8080)

-d directory to host (default: ./)

## license
MIT license (© 2021 VICTRIX Games)

## third parties licenses:

### httplib
MIT license (© 2021 Yuji Hirose)

### popl

MIT License

Copyright (c) 2015-2016 Johannes Pohl

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

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

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

repository: peppemas/webserver

repo_name: peppemas/webserver


text:
# Flags
Flags are very similar to [enums](https://github.com/PlasmaEngine/PlasmaDocs/blob/master/plasma_editor_documentation/plasmamanual/lightning_in_plasma/enums.markdown) except that they are ordered like a bit field (i.e. increasing in powers of two starting at 1 by default). Flags can be defined with the **flags** keyword:

```lang=csharp, name=Flags Type Defined
flags Pizza
{
  Sauce,
  Cheese,
  Pepperoni,
  Sausage,
  Peppers,
  Onion,
  Mushroom,
  Pineapple,
  CanadianBacon,
  Artichokes
}
```

The names flags enumeration line up with Integral Powers of two, the default starting value is `1`:

```
Console.WriteLine("Pizza.Sauce         as Integer: `Pizza.Sauce         as Integer`");
Console.WriteLine("Pizza.Cheese        as Integer: `Pizza.Cheese        as Integer`");
Console.WriteLine("Pizza.Pepperoni     as Integer: `Pizza.Pepperoni     as Integer`");
Console.WriteLine("Pizza.Sausage       as Integer: `Pizza.Sausage       as Integer`");
Console.WriteLine("Pizza.Peppers       as Integer: `Pizza.Peppers       as Integer`");
Console.WriteLine("Pizza.Onion         as Integer: `Pizza.Onion         as Integer`");
Console.WriteLine("Pizza.Mushroom      as Integer: `Pizza.Mushroom      as Integer`");
Console.WriteLine("Pizza.Pineapple     as Integer: `Pizza.Pineapple     as Integer`");
Console.WriteLine("Pizza.CanadianBacon as Integer: `Pizza.CanadianBacon as Integer`");
Console.WriteLine("Pizza.Artichokes    as Integer: `Pizza.Artichokes    as Integer`");
```

```name=Console Output
Pizza.Sauce         as Integer: 1
Pizza.Cheese        as Integer: 2
Pizza.Pepperoni     as Integer: 4
Pizza.Sausage       as Integer: 8
Pizza.Peppers       as Integer: 16
Pizza.Onion         as Integer: 32
Pizza.Mushroom      as Integer: 64
Pizza.Pineapple     as Integer: 128
Pizza.CanadianBacon as Integer: 256
Pizza.Artichokes    as Integer: 512
```

Flags are meant to work together; consider the following:

```lang=csharp, name=Adding Flags Together
var hawaiian : Pizza = Pizza.Sauce + Pizza.Cheese + Pizza.CanadianBacon + Pizza.Pineapple;
Console.WriteLine(hawaiian);
// Using bitwise and, '&', to determine if the hawaiian pizza has pepperoni on it
if ((hawaiian & Pizza.Pepperoni) != 0)
{
    Console.WriteLine("Hawaiian pizza has `Pizza.Pepperoni` on it.");
}
else
{
    Console.WriteLine("Hawaiian pizza does not have `Pizza.Pepperoni` on it.");
}
```
```name=Console Output
---------------- Begin Game ---------------
Sauce | Cheese | Pineapple | CanadianBacon
Hawaiian pizza does not have Pepperoni on it.
```
*Notice how it prints all of the active flags*

Basically, flags are enums that assign the next value by multiplying the previous value by two.
For instance, given:

```lang=csharp, name=Defining a Custom Value
flags Cookie
{
  ChocolateChips,
  Raisins,
  Oatmeal,
  MacadamiaNuts = 3,
  Peanuts,
  Pecans,
  Caramel,
  Ginger,
  Cinnamon,
  Sugar = 3
}
```

The values are different:

```lang=csharp
Console.WriteLine("Cookie.ChocolateChips as Integer: `Cookie.ChocolateChips as Integer`");
Console.WriteLine("Cookie.Raisins        as Integer: `Cookie.Raisins        as Integer`");
Console.WriteLine("Cookie.Oatmeal        as Integer: `Cookie.Oatmeal        as Integer`");
Console.WriteLine("Cookie.MacadamiaNuts  as Integer: `Cookie.MacadamiaNuts  as Integer`");
Console.WriteLine("Cookie.Peanuts        as Integer: `Cookie.Peanuts        as Integer`");
Console.WriteLine("Cookie.Pecans         as Integer: `Cookie.Pecans         as Integer`");
Console.WriteLine("Cookie.Caramel        as Integer: `Cookie.Caramel        as Integer`");
Console.WriteLine("Cookie.Ginger         as Integer: `Cookie.Ginger         as Integer`");
Console.WriteLine("Cookie.Cinnamon       as Integer: `Cookie.Cinnamon       as Integer`");
Console.WriteLine("Cookie.Sugar          as Integer: `Cookie.Sugar          as Integer`");
```
```name=Console Output
Cookie.ChocolateChips as Integer: 1
Cookie.Raisins        as Integer: 2
Cookie.Oatmeal        as Integer: 4
Cookie.MacadamiaNuts  as Integer: 3
Cookie.Peanuts        as Integer: 6
Cookie.Pecans         as Integer: 12
Cookie.Caramel        as Integer: 24
Cookie.Ginger         as Integer: 48
Cookie.Cinnamon       as Integer: 96
Cookie.Sugar          as Integer: 3
```
*Notice how after MacadamiaNuts is set to 3, the increment is no longer on powers of 2*

The underlying structure is [integer](https://github.com/PlasmaEngine/PlasmaDocs/blob/master/code_reference/lightning_base_types/integer.markdown); therefore, you could interpret Integers as a flags type:

```lang=csharp, name=Casting Integers to Flags
var random: Pizza = 583 as Pizza;
Console.WriteLine(random);
Console.WriteLine(7 as Cookie);
```
```name=Console Output
Sauce | Cheese | Pepperoni | Mushroom | Artichokes
ChocolateChips | Raisins | Oatmeal | MacadamiaNuts | Peanuts | Sugar
```
*Notice how flags print both enumerated values if the flags share the same underlying integer value.*

 # Flags Rules
 ## Identifier Capitalization
Identifiers for the flags type name and the enumerated values must be capitalized.

```lang=csharp, name=Invalid Value Capitalization
// This will not compile.
flags Directions {up, down, left, right}
```
```name=Console Output
Enum declaration 'Directions' does not have a closing '}'. We found 'LowerIdentifier' but we
expected to find '}'.
```

```lang=csharp, name=Invalid Type Name Capitalization
// Neither will this.
flags directions {Up, Down, Left, Right}
```
```name=Console Output
Enum declaration is missing a name. Upper-camel case names are required here (use 'Directions'
instead of 'directions').
```

 ## Unique Identifiers
Identifiers for the enumerated values must be unique.

```lang=csharp, name=Duplicate Identifiers
// This will not compile.
flags Directions {Up, Down, Up, Down}
```
```name=Console Output
A value of the same name 'Up' has already been declared in the enum 'Directions'. Names must
only be used once.
```

 ## Definition Scope
Flags cannot be defined inside classes, structs, or other enums.

```lang=csharp, name=Incorrectly Defined Inside a Class
// Classes cannot contain flags.
class FlagsWrapper
{
  // This won't compile.
  flags Directions {Up, Down, Left, Right};
}
```
```name=Console Output
Class declaration 'FlagsWrapper' does not have a closing '}'. We found 'flags' but we expected to find '}'.
```

 ## Representation
If there is no enumerated value the enum is represented as an Integer:
```lang=csharp, name=Integer That Does Not Map to Enum
Console.WriteLine((64) as Cookie);
```
```name=Console Output
64
```

 # Flags and Integers
As in other languages, Integers make up the backbone of how flags work, and thus they work together in many situations.

 ## Casting
Because of this, Lightning will implicitly cast from a flag to an Integer when necessary:

```lang=csharp, name=Implict Integer Cast
class FlagsExample
{
  [Static]
  // This function accepts an flags type.
  function AcceptsFlags(param: Pizza)
  {
    Console.WriteLine(" turned into `param`!");
  }

  [Static]
  // This function accepts an integer type.
  function AcceptsInt(param: Integer)
  {
    Console.WriteLine(" turned into `param`!");
  }
}
```

We can test the calls to these functions to see the interplay of casting:

```lang=csharp
var paramInt = 128;
var paramFlags = Pizza.Pineapple;

// This works, as you'd expect
Console.Write(paramFlags);
FlagsExample.AcceptsFlags(paramFlags);

// But if you want to accept an Integer in an enum's place you MUST cast.
Console.Write(paramInt);
*FlagsExample.AcceptsFlags(paramInt); * Doesn't compile
FlagsExample.AcceptsFlags(paramInt as Pizza);
```
```name=Console Output
Pineapple turned into Pineapple!
128 turned into Pineapple!
```

```lang=csharp, name=Invalid Implicit Cast
// Attempting to pass an Integer without casting to an enum
// will cause a compiler error
Console.Write(paramInt);
FlagsExample.AcceptsFlags(paramInt);
```
```name=Console Output
The function 'AcceptsFlags' exists, but could not be resolved since the
types of the arguments used did not match. The arguments you gave were:

  AcceptsFlags(Integer)

The possible choices were:

  AcceptsFlags(param : Pizza)
```

```lang=csharp
// This also works as you'd expect.
Console.Write(paramInt);
FlagsExample.AcceptsInt(paramInt);

// The flags type parameter is implicitly casted to an Integer and is then passed to the function.
Console.Write(paramFlags);
FlagsExample.AcceptsInt(paramFlags);
```
```name=Console Output
128 turned into 128!
Pineapple turned into 128!
```

 ## Flag-Integer Operations

Flags can perform all operations as if they were Integers. For instance, you can perform all of the normal math operations as implicit conversion will happen as necessary from the enum type to Integer:

```lang=csharp, name=Flags Using Integer Operations
// Here you can see use of the +, -, *, /, (), ^ and % Integer operators.
var pizza = (Pizza.Sauce + Pizza.Cheese) ^ Pizza.Sausage %
           Pizza.Mushroom - Pizza.Artichokes * Pizza.Peppers;

// When the math evaluates to an unaliased number, the variable, although still of the enum type,
// prints out its integer value.
Console.WriteLine(pizza);
Console.WriteLine(typeid(pizza).Name);
```

```name=Console Output
Sauce | Onion (-8159)
Pizza
```
You can see the typeid is not an Integer but Pizza. An Integer value was printed because there were flags with no alias in that maps all aspects of `-8159`. Because the type is still of the flags, you could pass it to our `FlagsExample.AcceptsFlags` function without issue. When an operation includes both a flags and an Integer the result is always promoted to the flags type. If you want an Integer either
 - Declare the variable you are storing the result in as an Integer: `var result : Integer`
 - Cast it: `result as Integer`

 ## Caveat

Although flags cast to Integers, they **will not** cast to Integers to perform cross-flags operations.

```lang=csharp, name=Invalid Cross-Flags Operation
// This won't compile.
Console.WriteLine(Pizza.Pineapple + Cookie.Sugar);
```
```name=Console Output
The binary '+' operator 'Positive / Add' is not valid with 'Pizza' and 'Cookie'.
```

 # Related Materials
 # Manual
- [enums](https://github.com/PlasmaEngine/PlasmaDocs/blob/master/plasma_editor_documentation/plasmamanual/lightning_in_plasma/enums.markdown)

 ## Code Reference
- [flags_reference](https://github.com/PlasmaEngine/PlasmaDocs/blob/master/code_reference/flags_reference.markdown)
- [integer](https://github.com/PlasmaEngine/PlasmaDocs/blob/master/code_reference/lightning_base_types/integer.markdown)

repository: JeremiasBulanadi/PlasmaDocs

repo_name: JeremiasBulanadi/PlasmaDocs


text:
[![Build status](https://ci.appveyor.com/api/projects/status/k3278pi94h3000bx?svg=true)](https://ci.appveyor.com/project/snmslavk/astar)
[![NuGet version](https://badge.fury.io/nu/AStar.svg)](https://badge.fury.io/nu/AStar)

# AStar
Library with implementation of AStar algorithm
# Example

      0  1  2  3  4
    0 __ __ __ N6 __
    1 N3 __ N5 __ __
    2 __ N2 __ N4 __
    3 __ __ N1 __ __
    4 __ __ __ __ __

     Begin:N1
     Goal:N6
     Links of Nodes: N3<-N2<-N1->N4->N5->N6
     Result way:N1->N4->N5->N6

# How to
To install AStar, run the following command in the Package Manager Console.
```
PM> Install-Package Astar
```

Add Nodes
```C#
Node N1 = G.AddNode(2,3,0);
```
Add Arcs
```C#
G.AddArc(N1,N2,1);
```
Get Result
```C#
AStar AS = new AStar(G);
AS.SearchPath(N1, N6)
foreach (Arc A in AS.PathByArcs)
      Console.WriteLine(A.ToString());
```

repository: snmslavk/AStar

repo_name: snmslavk/AStar


text:
# New Relic Agent Framework
The New Relic Agent Framework causes an application to be automatically configured to work with a bound [New Relic Service][].

    Detection Criterion	Existence of a single bound New Relic service.

Existence of a New Relic service is defined as the VCAP_SERVICES payload containing a service who's name, label or tag has newrelic as a substring.

    Tags
    <tt>new-relic-agent=<version></tt>

Tags are printed to standard output by the buildpack detect script

## User-Provided Service (Optional)
Users may optionally provide their own New Relic service. A user-provided New Relic service must have a name or tag with `newrelic` in it so that the New Relic Agent Framework will automatically configure the application to work with the service.

The credential payload of the service may contain the following entries:

| Name | Description
| ---- | -----------
| `license_key` | (Optional) Either this credential or `licenseKey` must be provided. If both are provided then the value for `license_key` will always win. The license key to use when authenticating.
| `licenseKey` | (Optional) As above.
| `***` | (Optional) Any additional entries will be applied as a system property appended to `-Dnewrelic.config.` to allow full configuration of the agent.

## Configuration
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].

The framework can be configured by modifying the [`config/new_relic_agent.yml`][] file in the buildpack fork.  The framework uses the [`Repository` utility support][repositories] and so it supports the [version syntax][] defined there.

| Name | Description
| ---- | -----------
| `repository_root` | The URL of the New Relic repository index ([details][repositories]).
| `version` | The version of New Relic to use. Candidate versions can be found in [this listing][].
| `extensions.repository_root` | The URL of the Extensions repository index ([details][repositories]).
| `extensions.version` | The version of the Extensions to use. Candidate versions can be found in the the repository that you have created to house the Extensions.

### Extensions

Custom New Relic instrumentation in the form of [Extension XML Files][] (or JARs) may be provided via a custom repository.

Example in a manifest.yml

```yaml
env:
  JBP_CONFIG_NEW_RELIC_AGENT: '{ extensions: { repository_root: "http://repository..." } }'
```

The artifacts that the repository provides must be in TAR format and must include the extension files in a directory, with a structure like:

```
extensions
|- my-extension.xml
|- my-other-extension.jar
|...
```

### Additional Resources
The framework can also be configured by overlaying a set of resources on the default distribution.  To do this, add files to the `resources/new_relic_agent` directory in the buildpack fork.  For example, to override the default `new_relic.yml` add your custom file to `resources/new_relic_agent/newrelic.yml`.

[Configuration and Extension]: ../README.md#configuration-and-extension
[`config/new_relic_agent.yml`]: ../config/new_relic_agent.yml
[New Relic Service]: https://newrelic.com
[repositories]: extending-repositories.md
[this listing]: https://download.run.pivotal.io/new-relic/index.yml
[version syntax]: extending-repositories.md#version-syntax-and-ordering
[Extension XML Files]: https://docs.newrelic.com/docs/agents/java-agent/custom-instrumentation/java-instrumentation-xml

repository: cloudfoundry/java-buildpack

repo_name: cloudfoundry/java-buildpack


text:
# Multi-Domain End-to-End Platform (MEEP)
  * [Introduction](#introduction)
  * [Demo](#demo)
  * [Installation](#installation)
    + [Backend](#backend)
    + [Frontend](#frontend)
    + [Configuration](#configuration)
  * [30-Second Startup](#30-second-startup)
      - [Start the backend server](#start-the-backend-server)
      - [Start the front-end server](#start-the-front-end-server)
  * [Resources](#resources)

Table of contents generated with markdown-toc

## Introduction
**End-to-end framework to build automatic agents (chatbots) for task-oriented dialogs**

- 💬 Use chat interfaces to collect dialog data and interact with agents
- 🤖 Build/deploy automated chatbot agents with your own ML/rule-based models
- :chart_with_upwards_trend: Evaluate chatbots using 1) agent-action annotations  2) user-satisfaction scores

**Quickly deploy for any domain by leveraging domain-agnostic modules**
- Data collection interface self-annotates dialogs for training/evaluation data
- Train a chatbot without ML knowledge using generic ML models, or write a custom model
- Evaluate any chatbot's accuracy as a black-box, or inspect its internal actions as a white-box

Chat interfaces are deployed with a simple web architecture [more details in a Google drive](https://docs.google.com/presentation/d/1wvpMsL0JgeM_nSvwjvszXRk-Ei0SljzjvghqPtjXXjo/edit#slide=id.g7314e2b87c_0_0).  The backend is Python/Flask/sockets
and the frontend is Preact/Redux.

## Demo
Below is a short snippet of a user interacting with a chatbot that helps them specify a destination
for a taxi ride.

![](img/UserInteraction_demo.gif)

**Live Chatbot:** http://<IP_ADDRESS>:9999/0/user. Chat directly with the chatbot here.

## Installation

### Backend
- Tested on python 3.6.3, requires python 3.6+ for the newer versions of the transformers module.

#### Set up a virtual environment (optional, but recommended)
1. `python3 -m venv env`
2. `source env/bin/activate`

#### Install python dependencies (not optional)
3. `pip install -r requirements.txt`
4. This installs server and API dependencies. Some agents require additional installation. See their folders for details or install `requirements-full.txt`.

### Frontend

- Requires Node.js. Tested with Node 12.10

    If node is not installed, follow these instructions for Ubuntu

1. `curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -`
2. `sudo apt install nodejs`

[Source](https://linuxize.com/post/how-to-install-node-js-on-ubuntu-18.04/)

Install the required dependencies.

1. `cd gui/frontend`
2. `npm install`

### Configuration

Backend configuration is all done through command line arguments to main.py.
Run `python main.py --help` for a list of options.
If you are running a domain that requires API keys, you need to create the `gui/backend/keys/api_keys.json` file and set them there.
Here's an example of api_keys.json:
```json
{
  "darksky": "my_api_key1",
  "google_maps": "my_api_key2",
  "google_speech": "my_api_key_file.json",
  "wit_date": "my_api_key3"
}
```

Frontend configuration is done using [dotenv](https://www.npmjs.com/package/dotenv-safe),
stored in the auto-generated configuration file `gui/frontend/.env`.
There is an example at [`gui/frontend/.env.example`](./gui/frontend/.env.example)
You can modify the parameters in this configuration file after it is generated by the front-end
[start-up command](#start-the-front-end-server).
For domains that require frontend API keys (e.g. destination), you should add the keys there.

## 30-Second Startup
Let's start a chat interface for the simple [compare_numbers](./apis/README.md) domain that determines
whether one number is greater than another.

```bash
BACKEND_PORT=8081
FRONTEND_PORT=8082
LOG_DIR=logs/tutorial
```
#### Start the backend server
```bash
cd gui/backend
python main.py --port=$BACKEND_PORT --domain=compare_numbers --num_rooms=1 --log_dir=$LOG_DIR
```
This starts a backend for **human-agents** that make api calls and reply to user utterances via the agent UI.

To see what it's like to interact with a **chatbot-agent**, add `--agent_class_name=agents.compare_numbers_agent.CompareNumbersAgent` to the command above.

#### Start the front-end server
```bash
cd gui/frontend
./run.sh $BACKEND_PORT $FRONTEND_PORT
```
The front-end command will output URLs to access the chat interface, e.g. `http://<IP_ADDRESS>:8082`.

## Resources
- [Chat Interface](./gui/README.md)
- [Datasets](./dataset/README.md)
- [Pre-Built and Custom Domains](./apis/README.md)
- [Testing](gui/backend/README.md#unittests)
- [Implement and Evaluate a Custom Agent](agents/README.md)

repository: didi/MEEP

repo_name: didi/MEEP


text:
---
metaTitle: "C# | Tuples"
description: "Accessing tuple elements, Creating tuples, Comparing and sorting Tuples, Return multiple values from a method"
---

# Tuples

## Accessing tuple elements

To access tuple elements use `Item1`-`Item8` properties. Only the properties with index number less or equal to tuple size are going to be available (i.e. one cannot access `Item3` property in `Tuple<T1,T2>`).

```cs
var tuple = new Tuple<string, int, bool, MyClass>("foo", 123, true, new MyClass());
var item1 = tuple.Item1; // "foo"
var item2 = tuple.Item2; // 123
var item3 = tuple.Item3; // true
var item4 = tuple.Item4; // new My Class()

```

## Creating tuples

Tuples are created using generic types `Tuple<T1>`-`Tuple<T1,T2,T3,T4,T5,T6,T7,T8>`. Each of the types represents a tuple containing 1 to 8 elements. Elements can be of different types.

```cs
// tuple with 4 elements
var tuple = new Tuple<string, int, bool, MyClass>("foo", 123, true, new MyClass());

```

Tuples can also be created using static `Tuple.Create` methods. In this case, the types of the elements are inferred by the C# Compiler.

```cs
// tuple with 4 elements
var tuple = Tuple.Create("foo", 123, true, new MyClass());

```

Since C# 7.0, Tuples can be easily created using [ValueTuple](https://stackoverflow.com/documentation/c%23/1936/c-sharp-7-0-features/6329/language-support-for-tuples#t=201705312047498619514).

```cs
var tuple = ("foo", 123, true, new MyClass());

```

Elements can be named for easier decomposition.

```cs
(int number, bool flag, MyClass instance) tuple = (123, true, new MyClass());

```

## Comparing and sorting Tuples

Tuples can be compared based on their elements.

As an example, an enumerable whose elements are of type `Tuple` can be sorted based on comparisons operators defined on a specified element:

```cs
List<Tuple<int, string>> list = new List<Tuple<int, string>>();
list.Add(new Tuple<int, string>(2, "foo"));
list.Add(new Tuple<int, string>(1, "bar"));
list.Add(new Tuple<int, string>(3, "qux"));

list.Sort((a, b) => a.Item2.CompareTo(b.Item2)); //sort based on the string element

foreach (var element in list) {
    Console.WriteLine(element);
}

// Output:
// (1, bar)
// (2, foo)
// (3, qux)

```

Or to reverse the sort use:

```cs
list.Sort((a, b) => b.Item2.CompareTo(a.Item2));

```

## Return multiple values from a method

Tuples can be used to return multiple values from a method without using out parameters. In the following example `AddMultiply` is used to return two values (sum, product).

```cs
void Write()
{
    var result = AddMultiply(25, 28);
    Console.WriteLine(result.Item1);
    Console.WriteLine(result.Item2);
}

Tuple<int, int> AddMultiply(int a, int b)
{
    return new Tuple<int, int>(a + b, a * b);
}

```

Output:

>

53

700

Now C# 7.0 offers an alternative way to return multiple values from methods using value tuples [More info about `ValueTuple` struct](https://stackoverflow.com/documentation/c%23/1936/c-sharp-7-0-features/6329/language-support-for-tuples#t=201705312047498619514).

repository: haifenghuang/generate

repo_name: haifenghuang/generate