text:
<img src="https://s23.postimg.org/4iiqow7xn/observer_hooks3.png" alt="Observer Hooks" align="right" width="50" height="44" />
# StateInspector
[![Gem Version](https://badge.fury.io/rb/state_inspector.svg)](http://badge.fury.io/rb/state_inspector)
[![Build Status](https://travis-ci.org/danielpclark/state_inspector.svg?branch=master)](https://travis-ci.org/danielpclark/state_inspector)
[![SayThanks.io](https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg)](https://saythanks.io/to/danielpclark)

This can fully inform on object method calls and parameters as well as instance variables before and after (when called via a setter method).  In short this utilizes the decorator patttern and the observer pattern to hook and report when a method is called.  In simple terms it will wrap any methods you choose with a hook that sends off all the details of the method call when it is executed to a reporter/observer of your choosing.

This project uses a variation of the observer pattern.  There is a hash of Reporters where you can
mark the key as a class instance or the class itself and point it to an Observer object.  Three
observers are included for you to use under StateInspector::Observers which are NullObserver (default),
InternalObserver, and SessionLoggerObserver.  When you toggle on an "informant" on a class instance or
class then each time a setter method is called it will pass that information on to the relevant observer
which handles the behavior you want to occur with that information.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'state_inspector'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install state_inspector

## Usage

The preferred usage is to pick what classes you want to track state change in and have them logged to
a session logger.  To do this you would need to do the following.

```ruby
require 'state_inspector'
require 'state_inspector/observers/session_logger_observer'
include StateInspector::Observers

class MyClass
  attr_writer :thing
end

StateInspector::Reporter[MyClass] = SessionLoggerObserver

MyClass.toggle_informant

m = MyClass.new
m.thing = :a

StateInspector::Reporter[MyClass].values
# => [["#<MyClass:0x005571fde5e498>", "@thing", nil, :a]]
```
SessionLoggerObserver will by default log reports to `log/state_inspector/`.

Now everytime the setter method is used for `thing` a new line will be entered into a log file
of the object, method, old value, and new value.  So you will see what is changed from where in
the order that the changed occurred.  This session logger will grab as many objects state changes
as you want and give you a nice ordered history of what has occurred.

If you don't want to inform on all instances of a class then instead of running `toggle_informant`
on the class itself then simply execute that method on the instances you want to observe.

If you want to see the expected results of the current observer/reporters then see [test/reporter_test.rb](https://github.com/danielpclark/state_inspector/blob/master/test/reporter_test.rb).

If you want to only toggle an informant for a small area you may use a helper method to toggle the
observer on and off for you.

```ruby
require 'state_inspector/helper'
include Helper

# instead of doing MyClass.toggle_informant as above, do this.

m = MyClass.new
toggle_snoop(m) do
  # put your own code here
end
```

When writing tests for code and using StateInspector it's very important to ensure the informant is
untoggled.  Otherwise you will have sporatic behavior in your tests.  You may use the helpers provided
here for your tests to ensure you won't have glitchy tests as a result of using informants.

To include it in Minitest you would do:

```ruby
# test/test_helper.rb or test/minitest_helper.rb

require 'state_inspector/helper'
class Minitest::Test
  include StateInspector::Helper
end
```

The default behavior for toggling on an informant for the first time is to inject code to observe all
setter methods.  This is true for both the Object method `toggle_informant` and the helper method
`toggle_snoop`.  If you would like to avoid injecting all setter methods for reporting you may either
use `state_inspector.skip_setter_snoops` (before any toggling) or the helper `toggle_snoop_clean` which
will cleanly remove its anti-setter hook once done (meaning the next `toggle_informant` will inject the
informant code into all setters).

## Observers

To include all Observers into scope you can do:

```ruby
require 'state_inspector/observers'
include StateInspector::Observers
```

You may look at the available observers in [state_inspector/observers](https://github.com/danielpclark/state_inspector/tree/master/lib/state_inspector/observers).

Observers will have a few methods they each have in common.

```ruby
module Observer
  def update *vals
    values() << vals
  end

  def display
    values.join " "
  end

  def values
    @values ||= []
  end

  def purge
    @values = []
  end
end
```

When you're writing your own observer you'll include this Observer onto a module's instance and
overwrite whatever methods you want there.

```ruby
module ExampleObserver
  class << self
    include Observer
    def display
      "Custom display code here"
    end
  end
end
```

And to register this observer to a target class you simply write:

```ruby
StateInspector::Reporter[MyTargetClass] = ExampleObserver
```

## Manually Create or Remove Informers

To manually create informant methods use `state_inspector.snoop_setters :a=, :b=` and
`state_inspector.snoop_methods :a, :b`.

```ruby
require 'state_inspector'
require 'state_inspector/observers/internal_observer'
include StateInspector::Observers

class MyClass
  attr_writer :a, :b, :c
  def x *args; end
end

# InternalObserver (it can be used with many classes and hold all of the data)
# InternalObserver.new (will hold data for only the specific reporter object pointing to it)
StateInspector::Reporter[MyClass] = InternalObserver

# This will allow us to manually define which setter methods to inform on
MyClass.state_inspector.skip_setter_snoops

m = MyClass.new
m.toggle_informant
m.state_inspector.snoop_setters :b=, :c=
m.state_inspector.snoop_methods :x
m.a= 1
m.b= 2
m.c= 3
m.x 4, 5, 6

StateInspector::Reporter[MyClass].values
# => [
#      [#<MyClass:0x005608eb9aead0 @informant=true, @a=1, @b=2, @c=3>, "@b", nil, 2],
#      [#<MyClass:0x005608eb9aead0 @informant=true, @a=1, @b=2, @c=3>, "@c", nil, 3],
#      [#<MyClass:0x005608eb9aead0 @informant=true, @a=1, @b=2, @c=3>, :x, 4, 5, 6]
#    ]
```
The nils in the values above represent the previous value the instance variable returned.

#### Remove Informers

To remove informers simply use `state_inspector.restore_methods`.  This takes out the hook from
each method that waits for the `informer?` method to be true.

```ruby
# continuing from the above example

m.state_inspector.restore_methods :b=, :c=, :x
```

## Reporter Legend

The format of a report sent will always start with the object that sent it; aka `self`.  Next you will
have either a string representing and instance variable of a symbol representing a method call.  If it's
an instance variable then the next value will be the old value for that instance variable, and the next
value is the value given to the method to be set as the value for that instance variable.  If the second
item is a symbol then every item after that is the parameters sent to that method.

LEGEND FOR SETTER| _ | _ | _
-----------------|---|---|---
`self` | `@instance_variable` | `:old_value` | `:new_value_given`

LEGEND FOR METHOD| _ | _
-----------------|---|---
`self` | `:method_name` | `:arguments`

## Development

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

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

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/danielpclark/state_inspector.

## License

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


text:
# Cercospora jujubae S. Chowdhury SPECIES

#### Status
ACCEPTED

#### According to
Index Fungorum

#### Published in
Indian Journal of Agricultural Research 16: 525 (1946)

#### Original name
Cercospora jujubae S. Chowdhury

### Remarks
null

repository: mdoering/backbone

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mdoering/backbone


text:
# SirCrazyBot
A Discord bot for playing various games on your Discord Server.

# Adding the bot to your Server:
Add the bot your server with this [link.](https://discord.com/api/oauth2/authorize?client_id=408768007175929856&permissions=11280&scope=bot)

# Commands:
The following commands are currently supported. They are only available within the #bot-games channel. If one does not exist on your server, you will need to create it in order to use these commands.

- `roll d<number>` (Roll a die of the specified size)
- `hanoi [number]` (Play a game of Tower of Hanoi with a specified tower height. If no height is specified, will default to 4)

license: MIT

repository: ievans-HMC/SirCrazyBot

gha_language: Python

gha_license_id: MIT

repo_name: ievans-HMC/SirCrazyBot


text:
## Robotics Scoreboard

This is a project to replace the PowerPoint based timer used at Campbell and provincial competitions with a HTML5/JavaScript replacement which will deliver better accuracy.

It uses WebAudio with Tone.js to produce sounds at certain points in the match.

## Usage

To start, press space or click Start

To pause, press space or click Stop

To reset timer, press r or click Reset

To toggle the score, click the checkbox

repository: Zeyu-Li/robotics-scoreboard

repo_name: Zeyu-Li/robotics-scoreboard


text:
# ExtraCells2

Changelog of ExtraCells2.

### [#23 Refactored Oredictionary export bus to use internal AE item stack hash](https://github.com/GTNewHorizons/ExtraCells2/pull/23)
**Merge pull request #23 from repo-alt/rv2**
* Refactored Oredictionary export bus to use internal AE item stack hash

[d0027489e7c8bda](https://github.com/GTNewHorizons/ExtraCells2/commit/d0027489e7c8bda)
by Martin Robertz *2020-12-26 17:28:02*
### [#24 Drastically improve Fluid Storage Bus performance](https://github.com/GTNewHorizons/ExtraCells2/pull/24)
**Merge pull request #24 from PanSzelescik/rv2**
* Drastically improve Fluid Storage Bus performance

[b5382340b4c23d2](https://github.com/GTNewHorizons/ExtraCells2/commit/b5382340b4c23d2)
by Martin Robertz *2020-12-30 16:40:31*
### [#26 remove the registration of the fluid pattern for every fluid](https://github.com/GTNewHorizons/ExtraCells2/pull/26)
**Merge pull request #26 from boubou19/rv2**
* remove the registration of the fluid pattern for every fluid

[c9194185a749887](https://github.com/GTNewHorizons/ExtraCells2/commit/c9194185a749887)
by Martin Robertz *2021-01-08 21:58:28*
### No issue
**remove the registration of the fluid pattern for every fluid**

[e8cc89baca7d2db](https://github.com/GTNewHorizons/ExtraCells2/commit/e8cc89baca7d2db)
by boubou19 *2021-01-08 16:27:32*

**obsolete API removed (ThE jar is in the libs anyway)**

[de78dd1b8ac1e51](https://github.com/GTNewHorizons/ExtraCells2/commit/de78dd1b8ac1e51)
by repo_alt *2021-01-08 15:30:19*

**Drastically improve Fluid Storage Bus performance**

[08783250828df18](https://github.com/GTNewHorizons/ExtraCells2/commit/08783250828df18)
by PanSzelescik *2020-12-29 17:19:33*

**Refactored Oredictionary export bus to use internal AE item stack hash**

[aca86edcb261ca9](https://github.com/GTNewHorizons/ExtraCells2/commit/aca86edcb261ca9)
by repo_alt *2020-12-26 14:40:59*

gha_language: Java


text:
# Oospora pustulans M.N. Owen & Wakef. SPECIES

#### Status
SYNONYM

#### According to
Index Fungorum

#### Published in
in Owen, Bull. Misc. Inf. , Kew 8: 297 (1919)

#### Original name
Oospora pustulans M.N. Owen & Wakef.

### Remarks
null

path: /life/Fungi/Ascomycota/Sordariomycetes/Hypocreales/Polyscytalum/Polyscytalum pustulans/ Syn. Oospora pustulans/README.md


text:
# Unit 10 OOP Homework: Template Engine - Employee Summary
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

### Project Description
```md
* A sample Template Engine that can help the user quickly create a web page for employee summary
* The summary included employee name, position, id
* The different role will provide different information  on the last row (School, link to GitHub profile, or office number)
```

### Install
```md
* TERMINAL
* Change directory to `Develop` folder
* `npm i` (or `npm install`)
```

![install](./Assets/gif/install.gif)

### Usage

1. `node app.js`

![node app.js](./Assets/gif/nodeappjs.gif)

2. input the number of team member

![team member](./Assets/gif/teammember.gif)

3. input the member information

* Manager

![Manager](./Assets/gif/manager.gif)

* Engineer

![Engineer](./Assets/gif/engineer.gif)

* Intern

![Intern](./Assets/gif/intern.gif)

* Output

![screenshot](./Assets/screenshot/myTeam.png)

* Each role

![screenshot](./Assets/screenshot/role.png)

- Make sure the email is correct

![Email](./Assets/gif/email.gif)

- The output employee summary html is in the `output` folder
[`team.html`](./Develop/output/team.html)

### Language
```md
* Javascrpit
* Node.js
```

### Test
```md
* TERMINAL
* Change directory to `Develop` folder
* `npm run test`
```

![test](./Assets/gif/test.gif)

## About
* Project Github: https://github.com/DanielYu0864/DanielYu-HomeWork-10-Team-Profile-Generator
* Author: [`DanielYu0864`](https://github.com/DanielYu0864)

## Questions
*  For more question please contact me<EMAIL_ADDRESS>


text:
# CIRCE_fault_database

Database of a real low voltage installation obtained using the PSCAD simulation program.

# Data structure:

- **CSV_CT802**: Raw data of a 2 millisecond test simulations (200 files) with the next collected data.
  - time [seg]
  - Prefault R [V]
  - Prefault S [V]
  - Prefault T [V]
  - Fault R [V]
  - Fault S [V]
  - Fault T [V]

Being **Prefault** the state of the electrical network before the fault at the injector location in volts, and **Fault** its state after the fault.

- **SimulationBriefing-200_CT802_24V**: 200 registers corresponding to each one of above simulations with the next data structured:
  - File number
  - Period [s]
  - AmpR [V]
  - AmpS [V]
  - AmpT [V]
  - Fault_type
  - R_fault [ohm]
  - Fault_dist [m]
  - Fault_time [us]

Being **AmpR**, **AmpS** and **AmpT** the corresponding amplitude of the injected pulse.
**R_fault** the fault impedance used.
And **Fault_dist** and **Fault_time**, the distance or time where the fault is happening.

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

branch_name: refs/heads/main


text:
+++
title = "Does Testing Keep you from making a huge mistake?"
Description = "What role does testing play in DevOps?"
Date = 2013-12-16T09:45:16-05:00
PublishDate = 2013-12-16T09:45:16-05:00
podcast_file = "arrested-devops-podcast-episode002.mp3"
episode_image = "/episode/img/does-testing-keep-you-from-making-a-huge-mistake.png"
episode_banner = "/episode/img/does-testing-keep-you-from-making-a-huge-mistake-banner.png"
guests = ["lcreamer","nbrengle","jsheehan",] # The names of your guests, based on the filename without extension.
sponsors = []
episode = "2"
images = ["/img/social/fb/does-testing-keep-you-from-making-a-huge-mistake.png"]
#hosts = [] # The names of your hosts, based on the filename without extension.
aliases = ["/2",]
explicit = "yes" # values are "yes" or "no"
youtube = "uVge4fkjF8w"
hosts = ["mstratton", "thess"]

+++
Things get off to a great start during the retro, where Trevor complains about destroying his USB 3.0 drivers due to a Win 8.1 upgrade and Matt turns into a Cylon.

Test Kitchen is now officially 1.0, but does’t really support Windows, but that doesn’t stop Matt from wanting to hack it to make it work anyway.

“Testing is any action taken to give you information about the actual state of your software, vs your assumptions” – Lanette

“A lot of developers look at testing like insurance – it’s not going to prevent a disaster, but it’s going to help you mitigate those problems” – John

Spirited discussion about the value of code coverage as a metric, and our panelists mostly violenly agree that it is not a valuable number in a vacuum. We also discuss that it is possible to approach all of life like a QA tester.

Jing

Runscope

Check-Outs

Lanette

Butler Wars – Jenkins vs Hudson

Words with Friends

@lanettecream

Nate

Jeepform

Perfecto Mobile

John

Carcassonne for iOS

Briefmetrics

HookFeed

Matt

Pester – BDD framework for PowerShell

XCOM – Enemy Within

Trevor

Clumsy

Ticket to Ride

Civilization V

repository: arresteddevops/ado-hugo

gha_language: CSS

gha_license_id: NOASSERTION

repo_name: arresteddevops/ado-hugo


text:
# Unum and Docker

The files in this folder are used to build and start a Docker container
complete with everything necessary to run as a Linux router, including the
Unum agent.

For the Unum agent to function, a Minim Labs developer account is required.
Sign up for an account or find out more on the [Minim Labs website][1].

### Known Limitations

 - Only supports USB wireless adapters on Linux
 - Does not support wireless adapters on macOS
 - Untested on Windows

## Building and Starting

Run the `docker_build.sh` script under `extras/linux_generic/` to build a
new image and then start a container and configure it for use.

On Linux, the script must be run as root or have access to the docker daemon.
From the unum root directory, assuming your host WAN interface is "ens33":
    sudo extras/docker/docker_build.sh ens33

Full usage:

```
extras/docker/docker_build.sh [-X|-B <builder>] <WAN ifname>
```

The WAN interface name (`<WAN ifname>` above) should be the host machine's
internet-connected interface. A bridge is created between the host and Unum
container and this is used as the WAN interface on the container.

Skip building an image at all by passing `-X`.

```bash
sudo extras/docker/docker_build.sh -X ens33
```

Skip building a builder image, but recreate and configure the Unum container:

```bash
sudo extras/docker/docker_build.sh \
        -B minimsecure/unum-builder:ubuntu-16.04 ens33
```

## Starting Unum

Once the container is running, you'll be placed into a bash session running in
the container.

> You will need a specific, generated MAC address during first time setup. This
  MAC address is used to associate your agent with your Minim Labs account.
  Sign up and login to the [Minim Labs developer portal][1], click the top-
  right drop down, then click "Provisioning Details".

Start everything with `minim-config`:

```bash
minim-config
```

On the first run, the script will interactively configure Unum and set the
MAC address before starting hostapd, dnsmasq, and unum. Be sure to have the
generated MAC address from the [Minim Labs developer portal][1] handy!

## Adding a container to the LAN

Once the gateway container with Unum is configured and running, you can start
another container and attach it to the LAN network with the option
`--network unum-demo-net-b-lan` when invoking `docker run`:

```bash
sudo docker run --rm --privileged \
    --network unum-demo-net-b-lan \
    -it minimsecure/netbox /bin/bash
```

## Technical Overview

There are two Docker images generated by the build, a "builder" and the actual
Unum-enabled Linux router image.

The "builder" image, built from `Dockerfile.build`, has all of the build-time
dependencies installed on an Ubuntu 16.04 base. When started, the container
will run the unum `build.sh` script and generate a tarball in
`/usr/local/unum/out/` (inside the container). This tarball is used in the
second stage of the process to install Unum.

The router image is built from `Dockerfile` and includes: dnsmasq, hostapd,
iptables, the Unum agent, and a host of other programs for running a Linux
router. Additionally, [several shell scripts from the linux_generic "extras"][3]
are included.

Other notes:

* Configuration files are stored in `/etc/opt/unum`
* Log files and other runtime files are stored in `/var/opt/unum`
* Unum and co are installed in `/opt/unum`

### CircleCI integration

The `unum` and `unum-builder` images are also built continuously and published
on Docker Hub using CircleCI. Check the [CircleCI integration notes][2] for
more information on how this is done.

[1]: https://my.minim.co/labs
[2]: ../../.circleci/README-circleci.md
[3]: ../linux_generic/README-linux_extras.md

repository: MinimSecure/unum-sdk

gha_language: C

repo_name: MinimSecure/unum-sdk


text:
## Kafka-connector

This is a Proof-of-Concept for connecting a number of Kakfa topics to OpenFaaS functions via the API Gateway.

Goals:

* Allow functions to subscribe to topics
* Ingest data from Kafka
* Work with black-box knowledge of OpenFaaS
* Formulate and validate a generic "connector-pattern" to be used for various event sources like Kafka, AWS SNS, RabbitMQ etc

## Conceptual design

![](overview.jpg)

This diagram shows the Kafka connector on the left hand side. It is responsible for querying the API Gateway for a list of functions. It will then build up a map or table of which functions have advertised an interested in which topics.

When the connector hears a message on an advertised topic it will look that up in the reference table and find out which functions it needs to invoke. Functions are invoked only once and there is no re-try mechanism. The result is printed to the logs of the Kafka connector process.

The cache or list of functions <-> topics is refreshed on a periodic basis.

## Try it out

This sample is setup for use on Swarm, but the application code will also work on Kubernetes by using the setup/kubernetes.yml file.

Usage for Swarm:

* Deploy this sample using ./build.sh
* Deploy or update a function so it has an annotation `topic=faas-request` or some other topic

As an example:

```shell
$ faas store deploy figlet --annotation topic="faas-request"
```

The function can advertise more than one topic by using a comma-separated list i.e. `topic=topic1,topic2,topic3`

* Publish some messages to the topic in question i.e. `faas-request`

Instructions are below for publishing messages

* Watch the logs of the kafka-connector

## Trigger a function via a topic with `exec`

You can use the kafka container to send a message to the topic.

```
SERVICE_NAME=kafka_kafka
TASK_ID=$(docker service ps --filter 'desired-state=running' $SERVICE_NAME -q)
CONTAINER_ID=$(docker inspect --format '{{ .Status.ContainerStatus.ContainerID }}' $TASK_ID)
docker exec -it $CONTAINER_ID kafka-console-producer --broker-list kafka:9092 --topic faas-request

hello world
```

## Generate load on the topic

You can use the sample application in the producer folder to generate load for a topic.

Make sure you have some functions advertising an interest in that topic so that they receive the data.

> Note: the producer *must* run inside the Kubernetes or Swarm cluster in order to be able to access the broker(s).

## Monitor the results

Once you have generated some requests or start a load-test you can watch the function invocation rate increasing in Prometheus or watch the logs of the container.

### Prometheus

You can open the Prometheus metrics or Grafana dashboard for OpenFaaS to see the functions being invoked.

### Watch the logs

```
docker service logs kafka_connector -f

Topics
[__consumer_offsets faas-request] <nil>
2018/03/24 12:42:58 Binding to topics: [faas-request]
Rebalanced: &{Type:rebalance start Claimed:map[] Released:map[] Current:map[]}
Rebalanced: &{Type:rebalance OK Claimed:map[faas-request:[0]] Released:map[] Current:map[faas-request:[0]]}

2018/03/24 17:04:40 Syncing topic map
[#53694] Received on [faas-request,0]: 'Test the function.'
2018/03/24 17:04:41 Invoke function: figlet
2018/03/24 17:04:42 Response [200] from figlet
|_   _|__  ___| |_  | |_| |__   ___   / _|_   _ _ __   ___| |_(_) ___  _ __
  | |/ _ \/ __| __| | __| '_ \ / _ \ | |_| | | | '_ \ / __| __| |/ _ \| '_ \
  | |  __/\__ \ |_  | |_| | | |  __/ |  _| |_| | | | | (__| |_| | (_) | | | |_
  |_|\___||___/\__|  \__|_| |_|\___| |_|  \__,_|_| |_|\___|\__|_|\___/|_| |_(_)

```

> Note: If the broker has a different name from `kafka` you can pass the `broker_host` environmental variable. This exclude the port.

## Run on Kubernetes

The following instructions show how to run `kafka-connector` on Kubernetes.

Deploy a function with a `topic` annotation:

```bash
$ faas store deploy figlet --annotation topic="faas-request" --gateway <faas-netes-gateway-url>
```

Deploy Kafka:

You can run the zookeeper, kafka-broker and kafka-connector pods with
```
kubectl apply -f setup/kubernetes.yml
```

Then use the broker to send messages to the topic:

```bash
BROKER=$(kubectl get pods -l component=kafka-broker -o name|cut -d'/' -f2)
kubectl exec -t -i $BROKER -- /opt/kafka_2.12-<IP_ADDRESS>/bin/kafka-console-producer.sh --broker-list kafka:9092 --topic faas-request

hello world
```
Once you have connected, each new line will be a message published.

If you have an error
```
error: unable to upgrade connection: container not found ("kafka")
```
just wait and retry.

You can verify the proper path of the publisher script by getting the shell of the running broker:
```
$kubectl exec -t -i $BROKER -- sh
/ # find | grep producer

./opt/kafka_2.12-<IP_ADDRESS>/config/producer.properties
./opt/kafka_2.12-<IP_ADDRESS>/bin/kafka-verifiable-producer.sh
./opt/kafka_2.12-<IP_ADDRESS>/bin/kafka-producer-perf-test.sh
./opt/kafka_2.12-<IP_ADDRESS>/bin/kafka-console-producer.sh
```

Now check the connector logs to see the figlet function was invoked:

```bash
CONNECTOR=$(kubectl get pods -o name|grep kafka-connector|cut -d'/' -f2)
tail -f | kubectl logs $CONNECTOR

2018/08/08 16:54:35 Binding to topics: [faas-request]
2018/08/08 16:54:38 Syncing topic map
Rebalanced: &{Type:rebalance start Claimed:map[] Released:map[] Current:map[]}
Rebalanced: &{Type:rebalance OK Claimed:map[faas-request:[0]] Released:map[] Current:map[faas-request:[0]]}

2018/08/08 16:54:41 Syncing topic map
2018/08/08 16:54:44 Syncing topic map
2018/08/08 16:54:47 Syncing topic map

[#53753] Received on [faas-request,0]: 'hello world.'
2018/08/08 16:57:41 Invoke function: figlet
2018/08/08 16:57:42 Response [200] from figlet
 _          _ _                            _     _
| |__   ___| | | ___   __      _____  _ __| | __| |
| '_ \ / _ \ | |/ _ \  \ \ /\ / / _ \| '__| |/ _` |
| | | |  __/ | | (_) |  \ V  V / (_) | |  | | (_| |
|_| |_|\___|_|_|\___/    \_/\_/ \___/|_|  |_|\__,_|

```

## Configuration

| env_var               | description                                                 |
| --------------------- |----------------------------------------------------------   |
| `upstream_timeout`      | Go duration - maximum timeout for upstream function call    |
| `rebuild_interval`      | Go duration - interval for rebuilding function to topic map |
| `topics`                | Topics to which the connector will bind                     |
| `gateway_url`           | The URL for the API gateway i.e. http://gateway:8080        |
| `broker_host`           | Default is `kafka`                                          |
| `print_response`        | Default is `false` - this will output the response of calling a function in the logs |

repository: feifeiiiiiiiiiii/nsq-connector

gha_language: Go

repo_name: feifeiiiiiiiiiii/nsq-connector


text:
# rlbot_twitch_broker_client.RegisterApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**register_action_server**](RegisterApi.md#register_action_server) | **POST** /register/actionServer |

# **register_action_server**
> ApiResponse register_action_server(body)

### Example
```python
from __future__ import print_function
import time
import rlbot_twitch_broker_client
from rlbot_twitch_broker_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rlbot_twitch_broker_client.RegisterApi()
body = rlbot_twitch_broker_client.ActionServerRegistration() # ActionServerRegistration |

try:
    api_response = api_instance.register_action_server(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RegisterApi->register_action_server: %s\n" % e)
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ActionServerRegistration**](ActionServerRegistration.md)|  |

### Return type

[**ApiResponse**](ApiResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


text:
# Desktop Files of Windows Apps

Stored in `~/.local/share/applications/`, desktop files of Windows apps – Adobe Illustrator, Adobe Photoshop, Affinity Designer, Beyond Compare, Lunacy and WInMerge compatible with icons themes and GTK themes.

## Basic and quick installation

Open the terminal and you need to create the directories ~/Applications/Windows:

  **Tip:** If you want to keep the Windows apps in your HDD instead of SSD, avoiding the size increasing, follow:

   ```
   # Create the folder and subfolder in the HDD instead of the SSD
   mkdir -p /data/your_hdd_name/Applications/Windows

   # Symlink HDD to SSD
   ln -sfnr /data/your_hdd_name/Applications/ ~/Applications

   # Initialize new Wine prefix
   WINEPREFIX=~/Applications/Windows wineboot –init
   ```

   If you receives an error that Wine could not find a Gecko package, you need to install Gecko package firstly:

   ```
   wget -O wine-gecko-64.msi 'http://dl.winehq.org/wine/wine-gecko/2.47/wine_gecko-2.47-x86_64.msi'
   WINEPREFIX=~/Applications/Windows wine msiexec /passive /i ./wine-gecko-64.msi
   ```

 Change the system to Windows 10 (for the correct installation of .NET Framework 4.0):

  ```
  WINEPREFIX=~/Applications/Windows winetricks win10
  ```

 The package .NET Framework 4.0 is important for some apps to work with Wine, download and install:

   ```
   wget -O dotnet.exe 'http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe'
   WINEPREFIX=~/Applications/Windows wine ./dotnet.exe /q
   ```

Open Winecfg:

   ```
   WINEPREFIX=~/Applications/Windows winecfg
   ```

Select the guide ‘Libraries’ and type ‘mscoree’ in the box of ‘New override for library’. Select this library and select ‘Edit’. Select ‘Native (Windows)’.

Select the guide ‘Staging’ and mark ‘Enable VAAPI as backend for DXVA2 GPU decoding’ and ‘Enable GTK3 Theming’.

Download and install another important package – .NET Framework 4.7.2:

   ```
   wget -O dotnet47.exe 'http://download.microsoft.com/download/D/D/3/DD35CC25-6E9C-484B-A746-C5BE0C923290/NDP47-KB3186497-x86-x64-AllOS-ENU.exe'
   WINEPREFIX=~/Applications/Windows wine ./dotnet47.exe /q
   ```

   If you still receive the same error of missed Gecko package, repeat at the item 1 end.

Finally install the library `dxvk`, because certain applications require DirectX and Vulkan drivers compatible wtih certain video-cards. Also do not forget of installing `mesa-vulkan-drivers` (if you use Ubuntu)

   ```
   WINEPREFIX=~/Applications/Windows winetricks dxvk
   ```

   If you still receive the same error of missed Gecko package, repeat at the item 1 end.

## Install your favourite Windows app

Please choose one of subfolders at this repository. At the subfolder, you will read the README about how to install an application

## References

* [An attempt to run Affinity Designer on Linux via Wine](https://forum.affinity.serif.com/index.php?/topic/65310-an-attempt-to-run-affinity-designer-on-linux-via-wine/)

## Licence

© 2019  Wine Desktop Files by Gustavo Costa

repository: gusbemacbe/wine-desktop-files

repo_name: gusbemacbe/wine-desktop-files


text:
# Windows 10 Lock Screen Background Saver
*Utility to save the Windows 10 lock screen images to a configurable folder.*

## Usage
The first time the utility runs it will create a config.ini file if it doesn't already exist.

By default, the utility will copy landscape images that it finds in the lock screen folder to
"C:\Temp". The source and destination folders can be controlled by editing the config.ini. If you
want the destination folder to be something other than "C:\Temp" then create a config.ini and set
the desired destination folder.

Sample config.ini:

    [PATHS]
    destination = C:\some\path\to\a\folder

You can also use environment variables when specifying the destination, e.g.
`%USERPROFILE%\lock-screen-backgrounds`

If the utility encounters errors while processing files in the source folder, it will save the
filename to the config.ini file in an *ignored files* list, so that it won't be processed again the
next time the utility runs.

**NOTE:** The utility will overwrite files in the destination folder with ones from the source
folder every time it runs.

license: Unlicense


text:
# covid control

In order to run, create a spring boot run configuration from eclipse run configurations

## setting up spring boot run config
First time you Run>Run in Eclipse, you will get an option to set build configuration.
1) Select `Maven build...` (three dots) from the "Run As" dialogue which opens up.
2) In `Goals:` set `spring-boot:run`
3) In `Profiles:` set `dev`

## setting up env in run config
1) Request your onboarding buddy for firebase and database credentials.
2) Set the following environment variables :
    - `GOOGLE_APPLICATION_CREDENTIALS`=path to firebase.json file
    - `ENV`=`DEV`
    - `DB_connection` : \<URL\>
    - `DB_password` : ***
    - `DB_user` : ***

After setting all the configurations, run the project as spring boot app (Run>Run)

## setting up Lombok with Eclipse and Intellij
Follow https://www.baeldung.com/lombok-ide

## swagger documentation
After running, hit this local endpoint to see the available APIs in the backend - http://localhost:8080/swagger-ui.html

## Fetch authtoken for dev env


text:
---
title: Junior Code Cracker
date: 2017-11-01T17:30:04+05:30
thumbnail: /images/uploads/junior_code_cracker.jpg
type: featured
---
6 months into the college and nothing substantial done that could actually be an asset in your CV. What if I tell you that just winning an event could highlight your CV like nothing before? Well, yes- GLUG presents before you the most awaited and highlighted event of all time, organized for first years' exclusively.

An event that tests your logical skills and demands you to reason out with some of the best in the college on that piece of paper. Yes, Junior CodeCracker it is! Come in teams of 2, and relish the world of logical thinking like never before.

Top 3 teams of the JCC get a direct entry to the 2nd round of auditions of GLUG. Phew ! Did I forget to mention the cash prize? Yes, there are cash prizes upto 5k for the winners- and all of it for free. Free participation, free event and yet, sooo much to gain!

Register your teams at [jcc.nitdgplug.org](http://jcc.nitdgplug.org)

The first round (qualifying round) will be held on the 1st of November, 5.30 p.m. at LG 12-13 (Old academic building).

PS:
1. Participation certificates for all the GLUG card holders.
2. NO CODING SKILLS REQUIRED.

repository: lugnitdgp/lugnitdgp-website-old

repo_name: lugnitdgp/lugnitdgp-website-old


text:
## Examples of how to use Tokio

This directory contains a number of examples showcasing various capabilities of
the `tokio` crate.

All examples can be executed with:

```
cargo run --example $name
```

A high level description of each example is:

* [`hello_world`](hello_world.rs) - a tiny server that writes "hello world" to
  all connected clients and then terminates the connection, should help see how
  to create and initialize `tokio`.

* [`echo`](echo.rs) - this is your standard TCP "echo server" which accepts
  connections and then echos back any contents that are read from each connected
  client.

* [`print_each_packet`](print_each_packet.rs) - this server will create a TCP
  listener, accept connections in a loop, and put down in the stdout everything
  that's read off of each TCP connection.

* [`echo-udp`](echo-udp.rs) - again your standard "echo server", except for UDP
  instead of TCP.  This will echo back any packets received to the original
  sender.

* [`connect`](connect.rs) - this is a `nc`-like clone which can be used to
  interact with most other examples. The program creates a TCP connection or UDP
  socket to sends all information read on stdin to the remote peer, displaying
  any data received on stdout. Often quite useful when interacting with the
  various other servers here!

* [`chat`](chat.rs) - this spins up a local TCP server which will broadcast from
  any connected client to all other connected clients. You can connect to this
  in multiple terminals and use it to chat between the terminals.

* [`chat-combinator`](chat-combinator.rs) - Similar to `chat`, but this uses a
  much more functional programming approach using combinators.

* [`proxy`](proxy.rs) - an example proxy server that will forward all connected
  TCP clients to the remote address specified when starting the program.

* [`tinyhttp`](tinyhttp.rs) - a tiny HTTP/1.1 server which doesn't support HTTP
  request bodies showcasing running on multiple cores, working with futures and
  spawning tasks, and finally framing a TCP connection to discrete
  request/response objects.

* [`tinydb`](tinydb.rs) - an in-memory database which shows sharing state
  between all connected clients, notably the key/value store of this database.

* [`udp-client`](udp-client.rs) - a simple `send_dgram`/`recv_dgram` example.

* [`manual-runtime`](manual-runtime.rs) - manually composing a runtime.

If you've got an example you'd like to see here, please feel free to open an
issue. Otherwise if you've got an example you'd like to add, please feel free
to make a PR!

repository: ry/tokio

repo_name: ry/tokio


text:
# vue-form-validations

Examples form the VueJS Meetup Hamburg #12 - Online Edition
https://www.youtube.com/watch?v=fVxRkpWq2QI

Special thanks goes to:
 - [@neohcs](https://github.com/neohcs) - Providing support and great ideas!
 - [sum.cumo](https://sumcumo.com/) - Making this talk possible!

Feel free to ask questions, or request other examples :)

https://github.com/h2xd/vue-form-validation/discussions

## Local setup
```
# install dependencies
yarn install --frozen-lockfile

# start the server
yarn dev
```


text:
# animated_button_bars

A new Flutter project.

## Getting Started

To use this package, add `animated_button_bars` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).

See example for the usage of animated button bar

## Add dependency
```
dependencies:
  animated_button_bars: ^0.0.1
```

## Import
```
import 'package:animated_button_bars/animated_button_bars.dart';
```

## Usage: AnimatedTextBar

### Single item in the list of Bar Items
```
BarItem(
    label: "Yellow",
    iconData: Icons.skip_previous,
    activeColor: Colors.yellow,
),
```

### AnimatedTextBar itself
```
AnimatedTextBar(
    borderRadius: BorderRadius.circular(30),
    margin: EdgeInsets.all(20),
    onTap: (index) {
        setState(() {
            _currentIndex = index;
        });
    },
    items: _barItems,
),
```

Many more animated button bars will be added soon..!

Made with :heart: by Jagrit


text:
# node-aead-crypto
OpenSSL bindings for AEAD ciphers

**Note: This module is not necessary on NodeJS 10+ because you can now provide the `authTagLength`.**

## Supported ciphers
* AES-CCM
* AES-GCM

This package is based on code from https://github.com/spark/node-aes-ccm and https://github.com/xorbit/node-aes-gcm.
I've updated both to compile on Windows machines and included configuration to automatically precompile binaries for multiple platforms (Windows, Linux, OSX, ARM).

## Usage
TODO

## Changelog

### 2.2.0 (2020-01-27)
* (AlCalzone) Replaced the node version comparison in `preinstall` with a check if all ciphers are natively available

### 2.1.1 (2018-11-27)
* (AlCalzone) Dropped `node-pre-gyp` for `prebuild`

### 2.0.0 (2018-11-04)
* (AlCalzone) Rework the installation procedure to fail on Node 10+

### 1.1.6 (2018-09-19)
* (AlCalzone) Update node-pre-gyp dependency

### 1.1.4 (2018-06-28)
* (AlCalzone) Update node-pre-gyp dependency

### 1.1.3 (2018-04-30)
* (AlCalzone) Update dependency versions hoping to fix an installation error

### 1.1.0
* (AlCalzone) Support NodeJS 10, drop Node 9 from precompilation

### 1.0.5
* (AlCalzone) Fixed installation issues on RPi 1

### 1.0.4
* (AlCalzone) Fixed installation issues on RPi 1

### 1.0.3
* (AlCalzone) Drop Node 7 from precompilation, add Node 9

### 1.0.2
* (AlCalzone) fixed typescript definitions

### 1.0.0
* (AlCalzone) initial release


text:
# Cloud Foundry v2 Nise Installer

## Devbox Installer with Nise BOSH

CF Nise Installer is a set of scripts that installs a Cloud Foundry v2 instance to your single machine or Vagrant VM. You can build your own 'devbox' quickly with a single command with this installer.

CF Nise Installer is based on [cf-release](https://github.com/cloudfoundry/cf-release) by Pivotal, [Nise BOSH](https://github.com/wabcwang/nise_bosh) by wabcwang base on NTT Laboratory.

### *NOTICE*

This installer is maintained mainly for testing cf-release on a baremetal environemnt. If you just want to try Cloud Foundry, [bosh-lite](https://github.com/cloudfoundry/bosh-lite) may be a better solution for you.

When ask a question about Cloud Foundry build by this installer at vcap-dev, please describe that you are uing cf-nise-installer in your post. That makes it easier to isolate your problem and to answer your question. If the problem you got is certainly caused by this installer, please do not post to vcap-dev and submit an issue to this repository.

## Building Devbox on Single Server

This section shows you how to install CF components to your server.

If you want to build a devbox on a Vagrant VM, skip this section and see the next section.

### Requirements

* Ubuntu 10.04 or 12.04 64bit
   * *Ubuntu 10.04 is recommended*
   * Do NOT install RVM to avoid conflicting with RBenv
* 8GB+ free HDD space
* 2GB+ memory
   * m1.medium or larger instance is recommended on AWS

### Installing Cloud Foundry Components

Run the commands below on your server:

```sh
sudo apt-get install curl
bash < <(curl -s -k -B https://github.com/wabcwang/cf_nise_installer/${INSTALLER_BRANCH:-master}/scripts/bootstrap.sh)
```

The `bootstrap.sh` script installs everything necessary to your devbox. This command may take a couple of hours at first run.

You need to restart your server once after the installation is completed.

### Launching Processes

You can start Cloud Foundry by running the following command in the `cf_nise_installer` directory cloned by the `bootstrap.sh` script:

```sh
./scripts/start.sh
```

This command launches a Monit process and then start up all monit jobs installed by Nise BOSH.

You can also manually manage the processes with the Monit command:

```sh
# Start Monit
sudo /var/vcap/bosh/bin/monit
# Launch `all` processes
sudo /var/vcap/bosh/bin/monit start all
# See status
sudo /var/vcap/bosh/bin/monit status
sudo /var/vcap/bosh/bin/monit summary # shorter
# Stop `all` processes
sudo /var/vcap/bosh/bin/monit stop all
```

Confirm all the processes shown by `monit summary` is indicating `running`. It takes a few minutes to initialize all processes.

### Update Existing Devbox

To update your existing Devbox, you can use scripts in the `scripts` directory. You don't need to execute the `bootstrap.sh` script for this purpose.

* install.sh
  * Runs the following scripts in order
* install_ruby.sh
  * Installs Ruby binaries with Rbenv and the `cf` command gem
  * If `.rbenv` directory exists in your homedirectory, this script do nothing
* clone_nise_bosh.sh
  * Clones the `nise_bosh` repository
  * When the `nise_bosh` directory is not empty, this script do nothing
* clone_cf_release.sh
  * Clones the `cf-release` repository
  * When the `cf-release` directory is not empty, this script do nothing
* install_environemnt.sh
  * Run the `init` command of Nise BOSH
* install_cf_release.sh
  * Installs cf-release jobs and packages with Nise BOSH

* start.sh
  * Invokes a Monit process and CF processes
* stop.sh
  * Stop all CF processes

When run these scrips, be sure your are in the `cf_nise_installer` directory and not in `scripts` directory.

#### Notes for Updating Devbox

These scripts do *not* automatically update existing files in the working directory such as the `cf-release` and `nise_bosh` directories. This means once you have executed the installer, you need to manually update files in your working directory to update your devbox. If you just want to update your debox to the latest version of cf-release, it is the easiest way to delete your `cf_nise_installer` directory and run the `bootstarp.sh` script.

### Environment Variables

You can customize your installation using environment variables. Note that variables taks effect only when script is not skipped. For example, the variable `CF_RELEASE_URL` is used only when the `cf-release` directory is empty.

| Name              | Description                              | Used in                                 | Default                                           |
| :---------------: | :--------------------------------------: | :-------------------------------------: | :-----------------------------------------------: |
| INSTALLER_URL     | URI for cf_nise_installer                | bootstrap.sh                            | https://github.com/wabcwang/cf_nise_installer.git |
| INSTALLER_BRANCH  | Branch/Revision for cf_nise_installer    | bootstrap.sh                            | master                                            |
| CF_RELEASE_URL    | URI for cf-release                       | clone_cf_release.sh                     | *nil* (https://github.com/cloudfoundry/cf-release.git is set to submodule)|
| CF_RELEASE_BRANCH | Branch/Revision for cf-release           | clone_cf_release.sh                     | *nil* (certain stable revision is set to submodule) |
| CF_RELEASE_USE_HEAD | Create a dev release with the head of the branch | clone_cf_release.sh           | no (set `yes` to enable)                           |
| NISE_BOSH_REV     | Git revision specifier [note] of nise_bosh repo | clone_nise_bosh.sh               | *nil* (currently checked-out revision)             |
| NISE_IP_ADDRESS   | IP address to bind CF components         | install_cf_release.sh                   | Automatically detected using `ip` command          |
| NISE_DOMAIN       | Domain name for the devbox               | install_cf_release.sh                   | *nil* (<ip_address>.xip.io)                        |
| NISE_PASSWORD     | Password for CF components               | install_cf_release.sh                   | c1oudc0w                                           |

[note]: Do *not* use any relative revision specifier from HEAD (e.g. `HEAD~`, `HEAD~10`, `HEAD^^`). Please use an absolute revision specifier (e.g. `123abc`, `develop`). You may use a relative revision specifier from an absolute revision specifier (e.g. `master~~`).

## Build Devbox with Vagrant

You can create a devbox VM quickly with a VM using Vagrant.

#### Requirements

* Vagrant 1.4 or later
* Ruby 2.1.4
* 8GB+ free HDD space
* 2GB+ free memory

### Launch Vagrant VM

Clone this repository and run the command below.

```sh
vagrant up
```

Your working directory will be mount at `/vagrant`.

gha_language: Shell


text:
# Getting Started
To make use of the node, it's expected that you have a Cisco Meraki account with API access. See the [Meraki Dashboard API](meraki-dashboard-api.md) section for more details.

### Install

#### via Palette Manager

Open the Node-RED editor and navigate to the palette manager.

> **Manage palette** --> **Install** --> Search: **meraki-dashboard-api** --> Push: **Install**

#### via CLI

Open a command line, navigate to the Node-RED install directory and then install the node.

```
cd ~/.node-red
npm install node-red-contrib-meraki-dashboard-api
```
Then, restart node-red.

### Add the node to the flow editor
Find the node from the left palette menu by searching for **meraki** and dragging the node to your editor area.

### Configure API Service
Double click on the node and then push the **pencil** icon to add a new service and configure its settings.

Set your Meraki API key here. Its a good idea to also name the service for the given API key (i.e. Demo Lab).

### Importing Examples
Several example flows are included to quickly start using the node. You will need to update the nodes with your service settings.

You can import the built-in examples by selecting them from the menu.
> **Import** --> **Examples** --> **meraki-dashboard-api** --> *select an example*

Or you can get the examples from the source respository [here](https://github.com/dexterlabora/node-red-contrib-meraki-dashboard-api/tree/master/examples).

## Working with Input Data

The node can be programmed with specific parameter variables, such as `organizationId` or `serial`. All parameters are attached to the `msg` object. The `msg.payload` is used to send changes to Meraki and will be used as the body for the API request.

### Using the Node Parameter Form
For quick solutions or static settings, you can use the **Parameters** form within the node. The descriptions are provided for each parameter. The input box for each param accepts a string for the value.

### Using the Node Input `msg` Object
Within the parameters form, each param name is defined in the input placeholder hint. Use these values to construct a function that assigns the parameter values.

If the parameter name matches the method name, then `msg.payload` can be used. This parameter represents the body being sent with a `PUT` or `POST` request using the Meraki API.

Use a function node to define the`msg` parameter values.

Double clicking on the node will bring up the JavaScript editor.

## Working with Output Data
### Exploring the Data

Use the **debug** tab to see the output of your data.
You can then view the JSON data and expand the nested properties.

## [Continue to Guided Samples...](guides.md)


text:
# AndroidUninstall
Batch uninstall Android apps using this very convenient script. Just supply a package name (or part of it) and the script will take care of the uninstallation.

Very useful when:
* You pick a shared device and want to *clean* it from all your domains apps (e.g. *jmols*)
* You want to uninstall both the app and test apk at the same time
* You want to uninstall an apk for all users

# Usage
Simply invoke the script and supply (part of) a package name as an argument

```
./rmapps 'jmols'
```

The script will list all matching packages and prompt to confirm the action (y/n)

Sample output of the script:
```
Jeroens-MacBook-Pro:android_uninstall jmols$ ./rmapps.sh jmols

Found 6 matching apps:
    com.jmolsmobile.babydosis
    com.jmols.wi_filetransfer
    com.jmolsmobile.calleridmanager
    com.jmolsmobile.brittenjeroen
    com.jmolsmobile.jmmj
    com.jmolsmobile.landscapevideocapture_sample

Are you sure you want to uninstall these? (y/n)
n

Did not uninstall anything
```

# Installation
Make sure the script is executable:
```
sudo chmod a+x ./rmapps.sh
```

This script requires adb to work and hence the Android SDK should be set up correctly in your PATH. To verify if that is the case, type `adb version` in your terminal. If this doesn't do anything, add the following lines to your `.bashrc`, `.bash_profile` or `.zshrc`:

```
export PATH=$PATH:<path to Android SDK>/platform-tools
export PATH=$PATH:<path to Android SDK>/tools
```

Optionally create an alias for the script in your your `.bashrc`, `.bash_profile` or `.zshrc`:
```
alias rmapps='<path from ~>/rmapps.sh'
```

# Next steps
* Mechanism to uninstall more than 10 apps at once (limitation is now there as a safety)
* Ruby bindings and gem for easier installation
* Distribute via Homebrew

repository: zhengyuqin/AndroidUninstall

repo_name: zhengyuqin/AndroidUninstall


text:
# Friggeri CV (MS Word)

Originally created by Adrien Friggeri, this CV template is popular with users of the [LaTeX](https://www.latex-project.org) application. Unfortunately the [ Friggeri template hosted by LaTeX](https://www.latextemplates.com/template/friggeri-resume-cv) is known to be broken and there does not seem to be any community effort to replicate it. Due to how complex LaTeX is for the average user, I've ported the template to MS Word.

![screenshot](https://github.com/jtba/friggeri/blob/master/docs/screenshot1.png)

## Getting Started

These instructions will get you up and running in no time.

### Prerequisites

Before you open the Word document, I recommend you first install the Roboto font which is used for the header. If you do not wish to install the font, it should default to Times New Roman.

### Installing

1. Double click on the individual fonts inside the /fonts directory and accept the installation
2. Open the cv_public.docx

## Authors

* **Jason Baldwin** - *Initial work* - [JTBA](https://github.com/jtba)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

## Acknowledgments

* Hat tip to Adrien Friggeri for coming up with a clean CV

repository: jtba/friggeri

repo_name: jtba/friggeri


text:
This repository holds an interactive page showcasing the Verbalucce Project originally developed by Intel & iterated on by researchers at the University of Washington. This utility is a chrome extension that modifies the Gmail compose window so people are more aware of their communication with other people - particularly the way they synchronize language and emotion.

Copyright 2017 by A. Conrad Nied and Margaret Morris

Notes:

A few files are specifically left out of the repo, in particular:
* LIWC2007_English100131.dic holds a mapping of words to language & emotional context. This dictionary is originally based on the 2007 edition of the LIWC project classification of words which is under copyright.
* The ext folder contains libraries of javascript and css from other developers, in particular Bootstrap.


text:
# Strategies

* [Rewriting Overview](#rewriting-overview)
* [Strategy Combinators](#strategy-combinators)
* [Basic Combinators](#basic-combinators)
  * [`fail`](#fail)
  * [`build`](#build)
  * [`pipe`](#pipe)
  * [`choice`](#choice)
  * [`pred`](#choice)
* [Traversal Combinators](#traversal-combinators)
  * [`one`](#one)
  * [`some`](#some)
  * [`all`](#all)
* [Matching Combinators](#traversal-combinators)
  * [`match`](#match)
  * [`find`](#find)
  * [`rewrite`](#rewrite)

## Rewriting Overview

Rewriting, also known as term rewriting or program transformation, is a programming paradigm based on the idea of replacing one term with another.

A _term_ is simply some [valid expression](https://en.wikipedia.org/wiki/Well-formed_formula) in a given language. In Clojure these are objects which can be expressed in Clojure syntax.

In a term rewriting system a replacement, formally known as a _reduction_, is described by a rule, or _identity_, which expresses an equivalence relation between two terms.
In mathematics this relationship is often expressed with the `=` sign.
To make this concept clear let's consider two properties of multiplication: the distributive and commutative properties.

The distributive property of multiplication is defined as

```
a × (b + c) = (a × b) + (a × c)
```

The commutative property for multiplication is defined as

```
a × b = b × a
```

Putting multiplication aside for moment and considering only the symbols involved on both sides of the `=`, we can view these identities as a description of how to _rewrite_ the term on the left as the term on the right.
Indeed, the term _rewrite_ is commonly used in mathematics text to express this concept. Let's evaluate the expression

```
(w + x) × (y + z)
```

with these rules.

By the distributed property we have

```
((w + x) × y) + ((w + x) × z)
```

with `a = (w + x)`, `b = y`, and `c = z`.

Next we'll apply the commutative property twice with `a = (w + x)` and `b = y`,

```
(y × (w + x)) + ((w + x) × z)
```

and then with `a = (w + x)` and `b = z`.

```
(y × (w + x)) + (z × (w + x))
```

Finally we can apply the distributive property two more times with `a = y` and `b = (w + x)`,

```
((y × w) + (y × x)) + ((z × (w + x))
```

and then with `a = z` and `b = (w + x)`.

```
((y × w) + (y × x)) + ((z × w) + (z × x))
```

We've now rewritten our original expression by applying the rewrite rules. This is the fundamental concept of term rewriting.

But how did we know we were finished?
Couldn't we continue to apply the commutative rule infinitely?
We could!
It turns out _termination_ is a problem term rewriting systems must grapple with and there are many approaches.
One of the simplest is to place the burden of termination on the user.
As programmers, we're already accustomed to this problem; we want a `loop` to stop at a certain point etc.
In the term rewriting world this is achieved with _strategies_ and _strategy combinators_.

## Strategy Combinators

A _strategy_ is a function of one argument, a term `t`, and returns the term rewritten `t*`.
A _strategy combinator_ is a function which accepts, as arguments, one or more _strategies_ and returns a _strategy_.

Meander's strategy combinators can be found in the `meander.strategy.epsilon` namespace.

```
(require '[meander.strategy.epsilon :as r])
```

The alias `r` stands for "rewrite" and will be used throughout the following examples.

Before diving into the combinators themselves it's important to understand how combinators fail.
When a combinator fails to transform `t` into `t*` it returns a special value: `meander.strategy.epsilon/*fail*` which is printed as `#meander.epsilon/fail[]`.
This value is at the heart of strategy control flow.
You can detect this value in your code with `meander.strategy.epsilon/fail?`, however, you should rarely need to reach for this function outside of combinators.

## Basic Combinators

### `fail`

Strategy which always fails.

```clj
(r/fail 10)
;; =>
#meander.epsilon/fail[]
```

### `build`

Strategy combinator which takes a value and returns a strategy which always returns that value.
Like `clojure.core/constantly` but the returned function takes only one argument.

```clj
(let [s (r/build "shoe")]
  (s "horse"))
;; =>
"shoe"
```

### `pipe`

Strategy combinator which takes two (or more) strategies `p` and `q` and returns a strategy which applies `p` to `t` and then `q` if and only if `p` is successful. Fails if either `p` or `q` fails.

```clj
(let [s (r/pipe inc str)]
  (s 10))
;; =>
"11"
```

```clj
(let [s (r/pipe inc r/fail)]
  (s 10))
;; =>
#meander.epsilon/fail[]
```

Note: `pipe` actually takes zero or more strategies as arguments and has behavior analogous to `and` e.g. `((pipe) t)` and `((pipe s) t)` is the equivalent to `(identity t)` and `(s t)` respectively.

### `choice`

Strategy which takes two (or more) strategies `p` and `q` and returns a strategy which attempts to apply `p` to `t` or `q` to `t` whichever succeeds first.
Fails if all provided strategies fail.
Choices are applied deterministically from left to right.

```clj example
(let [s1 (r/pipe inc r/fail)
      s2 (r/pipe inc str)
      s (r/choice s1 s2)]
  (s 10))
;; =>
"11"
```

### `pred`

The strategy `(pred pred-fn)` succeeds returning `t` if the result of applying pred-fn to `t`is truthy.

```clj example
(let [s (r/pred even?)]
  (s 2))
;; =>
2
```

```clj example
(let [s (r/pipe (r/pred even?) inc)]
  (s 2))
;; =>
3
```

## Traversal Combinators

### `one`

The `one` combinator is a traversal combinator which applies a strategy `s` to one child of a term `t`.
If there is no child term for which `s` succeeds then `(one s)` fails.

```clj example
(let [s (fn [x]
          (if (number? x)
            (inc x)
            r/*fail*))
      one-s (r/one s)]
  (one-s ["a" 2 "b" 3]))
;; =>
["a" 3 "b" 3]
```

```clj example
(let [s (fn [x]
          (if (number? x)
            (inc x)
            r/*fail*))
      one-s (r/one s)]
  (s ["a" "b" "c"]))
;; =>
#meander.epsilon/fail[]
```

### `some`

The `some` combinator is a traversal combinator which applies a strategy `s` to
as many direct subterms of `t` as possible. Succeeds if at least one application
applies, fails otherwise.

```clj example
(let [s (fn [x]
          (if (number? x)
            (inc x)
            r/*fail*))
      some-s (r/some s)]
  (some-s ["a" 2 "b" 3]))
;; =>
["a" 3 "b" 4]
```

```clj example
(let [s (fn [x]
          (if (number?
If there is one child term for which `s` fails then `(all s)` fails.

```clj example
(let [s (fn [x]
          (if (number? x)
            (inc x)
            r/*fail*))
      all-s (r/all s)]
  (all-s [1 2 3]))
;; =>
[2 3 4]
```

```clj example
(let [s (fn [x]
          (if (number? x)
            (inc x)
            r/*fail*))
      all-s (r/all s)]
  (all-s [1 2 "c"]))
;; =>
#meander.epsilon/fail[]
```

## Matching Combinators

### `match`

The `match` strategy is built on top of `meander.match.epsilon/match`.
It succeeds whenever some term `t` is successfully matched.

```clj example
(let [s (r/match
          [:foo ?bar ?baz]
          {:bar ?bar, :baz ?baz})]
  (s [:foo 1 2]))
;; =>
{:bar 1, :baz 2}
```

```clj example
(let [s (r/match
          [:foo ?bar ?baz]
          {:bar ?bar, :baz ?baz})]
  (s [:baz 1 2]))
;; =>
#meander.epsilon/fail[]
```

### `find`

The `find` strategy is built on top of `meander.match.epsilon/find`.

```clj example
(let [s (r/find
          {:ns ?ns
           :namespaces {?ns ?syms}}
          ?syms)]
  (s '{:ns b.core
       :namespaces {a.core [a aa aaa]
                    b.core [b bb bbb]}}))
;; =>
[b bb bbb]
```

Like the macro it is built on top of, the `find` strategy will always succeed unless it explicitly returns `meander.match.epsilon/*fail*`.

```clj example
(let [s (r/find
          {:ns ?ns
           :namespaces {?ns ?syms}}
          ?syms)]
  (s '{:ns c.core
       :namespaces {a.core [a aa aaa]
                    b.core [b bb bbb]}}))
;; =>
nil
```

```clj example
(let [s (r/find
          {:ns ?ns
           :namespaces {?ns ?syms}}
          ?syms

          _
          r/*fail*)]
  (s '{:ns c.core
       :namespaces {a.core [a aa aaa]
                    b.core [b bb bbb]}}))
;; =>
#meander.epsilon/fail[]
```

#### `rewrite`

The `rewrite` strategy is built on top of `meander.match.epsilon/find` and `meander.substitute.epsilon/substitute` and has the same form as `find`, `match`, and `search`, however, a substitution is performed instead of executing code.
This allows for purely symbolic data transformation and is an incredibly powerful tool for syntactic and structural manipulations.

```clj example
;; The commutative rule for multiplication.
(let [comm (rewrite
            ;; Left side
            (* ?a (+ ?b ?c))
            ;; Right side
            (+ (* ?a ?b)
               (* ?a ?c)))]
  (comm '(* (+ w x)
            (+ y z))))
;; =>
(+ (* (+ w x) y)
   (* (+ w x) z))
```

```clj example
(let [s (rewrite
         (let* [!bs !vs ..1]
           . !body ...)
         (let* [!bs !vs]
           (let* [!bs !vs ...]
             . !body ...)))]
    (s '(let* [b1 :v1, b2 :v2, b3 :v3]
          (vector b1 b2 b3))))
;; =>
(let* [b1 :v1]
 (let* [b2 :v2
        b3 :v3]
   (vector b1 b2 b3)))
```

repository: noprompt/meander

branch_name: refs/heads/epsilon

gha_language: Clojure

repo_name: noprompt/meander


text:
Development version of GIMP presented with top-bottom-left-right configurable tabs
================================================================================
[GIMP][1] is a powerful, advanced and complex image-editing application, permitting to both regular and professional skilled users to in-depth edit images via a massive amount of features, tools and functionalities.

It seems that the unstable development-only versions of **GIMP** are targeting interesting potential additions, including a more friendly and configurable manner of enjoying tabs in **GIMP**.

The official Google+ webpage of GIMP [shared][2] an interesting image with a **development** version of GIMP featuring adjustable tabs, essentially, allowing the user to set the tabs in GIMP on top, bottom, left and right areas, therefore, permitting an easy rearranging of tabs per-one's likeness.

The mentioned tweakable tabs are to be housed under the `Windows` menu, where the user is to be probably able to 1-click away select desired locations for tabs.

![](http://iloveubuntu.net/pictures_me/gimp%20development%20tabs.png)

The exciting support has been created due to "**in some cases it's desirable to have tabs position configurable**, so Jehan Pagès did just that: the unstable branch now lets you choose where you want your tabs: top, bottom, left, or right sides".

--------------------------------------------------------------------------------

via: http://iloveubuntu.net/development-version-gimp-presented-top-bottom-left-right-configurable-tabs

译者：[译者ID](https://github.com/译者ID) 校对：[校对者ID](https://github.com/校对者ID)

本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译，[Linux中国](http://linux.cn/) 荣誉推出

[1]:http://www.gimp.org/
[2]:https://plus.google.com/116634837115748851709/posts/KuXpxUf8iVm

url: https://raw.githubusercontent.com/chenruixuan/TranslateProject/39dbaa2f813becc7a04f82aa5b6b7a494f007b4d/sources/Development version of GIMP presented with top-bottom-left-right configurable tabs.md

repository: chenruixuan/TranslateProject

repo_name: chenruixuan/TranslateProject


text:
New2Neighborhood allows you to search for bars and restaurants using either your current location or by setting an address. When you've found a venue that strikes your fancy, you can save it to a list of venues for you to explore at your leisure. Think of it as your food and drink to-do list! Once you have visited a venue, you can mark it off and pat yourself on the back for your successful gastro expedition. Cheers to you, young explorer!

This app uses:

* Ruby on Rails API
* React
* Redux
* Materialize CSS
* React Materialize
* Foursquare API
* Google Maps via react-google-maps

## Installation

To run the software on your local server, run `npm install && npm start`.

Note: The API that compliments this repo (https://github.com/winterlamon/new2neighborhood-api), when run locally, should use port 3001. The front-end repo should not be run on port 3001.

## Usage

This repository is the front end that runs with its API repo (https://github.com/winterlamon/new2neighborhood-api).

With this app, a user can:

* set their current location in the browser
* create an account & log in
* search restaurants and bars by current location or by address
* view local venues on a map using the Google Maps API via react-goole-maps package
* save venues to their profile
* mark venues as visited

## Contributing

To report bugs, please use the issue tracker.

## Credits

New2Neighborhood is a project made by:

* Winter LaMon - https://github.com/winterlamon
* Jordan Storms - https://github.com/jcstorms1

## License

MIT License

Copyright (c) 2017-2018 Winter LaMon & Jordan Storms.

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.

gha_language: JavaScript


text:
---
SPDX-License-Identifier: MIT
path: "/tutorials/getting-started-with-veeam/restoring-files-with-the-veeam-agent-for-microsoft-windows"
slug: "getting-started-with-veeam"
date: "2022-03-09"
title: "Restoring Files with the Veeam Agent for Microsoft Windows"
short_description: "This guide shows you how to restore files with the Veeam Agent for Microsoft Windows."
tags: ["Software", "Veeam", "Backup", "Recovery", "Restore", "Microsoft Windows", "Tools"]
author: "Marcel Deglau"
author_link: "https://github.com/promarcel"
author_img: "https://avatars3.githubusercontent.com/u/6303811"
author_description: ""
language: "en"
available_languages: ["en", "de"]
header_img: "header-6"
cta: "dedicated"
---

## Introduction

The Veeam Agent for Microsoft Windows is a great option to getting started with backup your data.

Before getting started, please also see the [series index](/tutorials/getting-started-with-veeam/) and their information.

Within this article I would like to introduce you how it is possible to restore files from backups you had created with Veeam.

**Prerequisites**

* Any Microsoft Windows device on which you have already created backups with Veeam and now want to restore files from it

## Step 1 - Open the Recovery Overview

To start restoring files from a backup, please open the Veeam Agent for Microsoft Windows.

After that, you need to navigate to the recovery overview. To do this, open the burger menu at the top left, click on the name of your backup job and then on Restore File or Restore Volume, depending on which operation you want to start.

![Restore Overview](images/24-win-recovery-start.png)

## Step 2 - Selecting a Restore Point

Now that we have opened the restore overview, we can select a restore point from which we can restore or copy data.

![Selecting a Restore Point](images/25-win-recovery-select.png)

## Step 3 - Browse Your Backups/Data

We now have the possibility to access our backup files directly via the backup browser and copy them to any location and other options (see the context menu).

You also have the possibility to open files or paths in the Windows Explorer to copy or view them.

![Browse Your Backups/Data](images/26-win-recovery-explorer.png)

## Step 4 - Closing the Mount-Point

After you have restored your files, you can simply close the backup browser. The mounted image will be automatically disconnected from Windows again.

## Conclusion

Congratulations, you have successfully restored files from a backup. In another article from this series, we will look at the option to restore a server on bare-metal level.

### Additional Information

You can also find the official guide of Restoring Files and Folders in the Veeam Help Center: [helpcenter.veeam.com/docs/agentforwindows/userguide/files_restore.html](https://helpcenter.veeam.com/docs/agentforwindows/userguide/files_restore.html?ver=50)

##### License: MIT

<!--

Contributor's Certificate of Origin

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have
    the right to submit it under the license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my
    knowledge, is covered under an appropriate license and I have the
    right under that license to submit that work with modifications,
    whether created in whole or in part by me, under the same license
    (unless I am permitted to submit under a different license), as
    indicated in the file; or

(c) The contribution was provided directly to me by some other person
    who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are
    public and that a record of the contribution (including all personal
    information I submit with it, including my sign-off) is maintained
    indefinitely and may be redistributed consistent with this project
    or the license(s) involved.

Signed-off-by: Marcel Deglau<EMAIL_ADDRESS>
-->

repository: hetzneronline/community-content

repo_name: hetzneronline/community-content


text:
# Everyone has an Agenda

I have an agenda in writing this.

Everyone has an agenda.

Everything you watch has an agenda. News programs have an agenda. TV shows and movies have an agenda. Social networking sites have an agenda. Internet websites have an agenda. The people you talk to have an agenda. Churches, schools, employers - they all have an agenda.

Agendas serve to program your mind. They condition you to accept certain things as normal and approved behavior. They manipulate you into doing things it wants you to.

Some agendas are backed by powerful people and organizations who want you to do things that are beneficial for them, at your expense. They come wrapped in nice, friendly packages, with the message: "everyone is doing this, so it must be good." Or they come in scary packages: "Do this or you will die." These agendas have been finely tuned over the decades to be as influential as possible.

In order to get you to comply with their agendas, powerful people and organizations use: brainwashing and mind-control.

Almost everything broadcast in this world for mass consumption has an agenda. You can choose to limit your exposure to it. Or continue consuming it, while being aware that what you're feeding your mind has an agenda. As long as you're aware that there's an agenda, you can guard against it.

On TV, the most agenda-less thing to watch has to be professional sports. It's hard for a basketball game or tennis match to have an agenda.

What else has minimal agenda? Old public domain books in which the intellectual property rights have expired are good. They may have had an agenda at the time it was written, but at least it no longer has a current agenda. And the message of these books usually contains useful and robust information owing to the fact that it has survived this long.

Other things that have no agenda: Mathematics and natural science, physical training, building and fixing things, observing things in the real world. These all keep the mind and body sharp. And they don't come with the baggage of an agenda. These are beneficial things than can replace much of what you're currently consuming.

Being aware of agendas in the things we consume is the first step to safeguarding against them.

repository: robdelacruz/free-yourself

repo_name: robdelacruz/free-yourself


text:
# 9CrappyMemes
This is my Ohsiha course work.
Program is proof on concept.

## How to install
This section will contain basic installation steps
### Create virtual environment

```

$ mkdir <project dir> && cd <project dir>
$ virtualenv -p python3 .venv
# activate virtualenv
$ source .venv/bin/activate

```

### Download git repository:

```

$ git clone https://github.com/tahv0/crappymemes.git && cd crappymemes
# install requirements
$ pip install -r requirements.txt

```

### Set keys in settings.py for social-auth-app-django. Doesn't work without 0Auth keys.

### Create superuser, migrate and run server

```

$ ./manage.py createsuperuser
$ ./manage.py makemigrations
$ ./manage.py migrate
$ ./manage.py runserver

```


text:
CalendArt
=========
<!-- BADGES HERE WHEN IT SHALL BE OPENED ! //-->
Interface to handle all your calendars through an unified API, whatever their
source are (Google, Office 365, ... etc), as if it was an art. Hell yeah.

Installation
============
You have multiple ways to install CalendArt. If you are unsure what to do, go with
[the archive release](#archive-release).

### Archive Release
1. Download the most recent release from the [release page](https://github.com/Wisembly/CalendArt/releases)
2. Unpack the archive
3. Move the files somewhere in your project

### Development version
1. Install Git
2. `git clone git://github.com/Wisembly/CalendArt.git`

### Via Composer
1. Install composer in your project: `curl -s http://getcomposer.org/installer | php`
2. Run the following command:
```
$ composer require calendArt/calendArt
```

Running Tests
=============
```console
$ php composer.phar install --dev
$ phpunit
```

Credits
=======
Made with love by [@wisembly](http://wisembly.com/en/)

repository: Calendart/CalendArt

gha_language: PHP

repo_name: Calendart/CalendArt


text:
# Database Filesystem

**Threading safe** library to simplify managing files for some specific database engines. This library provides relaxing files between the folders out of the box.

## Table of Context
* [Title](#database-filesystem)
* [Build](#build)
* [Docs](#docs)
	* [Usage](#usage)
	* [Public methods of DBFS namespace](#public-methods-of-dbfs-namespace)
		* [void DBFS::set_root(string path)](#void-dbfsset_rootstring-path)
		* [void DBFS::set_prefix(string prefix)](#void-dbfsset_prefixstring-prefix)
		* [void DBFS::set_suffix(string suffix)](#void-dbfsset_suffixstring-suffix)
		* [void DBFS::set_filename_length(int length)](#void-dbfsset_filename_lengthint-length)
		* [void DBFS::use_suffix_minutes(bool use)](#void-dbfsuse_suffix_minutesbool-use)
		* [std::string DBFS::random_filename()](#stdstring-dbfsrandom_filename)
		* [DBFS::File* DBFS::create()](#dbfsfile-dbfscreate)
		* [DBFS::File* DBFS::create(std::string name)](#dbfsfile-dbfscreatestdstring-name)
		* [DBFS::File* DBFS::create(DBFS::file_hook_fn on_open, DBFS::file_hook_fn of_close)](#dbfsfile-dbfscreatedbfsfile_hook_fn-on_open-dbfsfile_hook_fn-of_close)
		* [bool DBFS::move(std::string name, std::string new_name)](#bool-dbfsmovestdstring-name-stdstring-new_name)
		* [bool DBFS::remove(std::string name, bool remove_path)](#bool-dbfsremovestdstring-name-bool-remove_path)
		* [bool DBFS::exists(std::string name)](#bool-dbfsexistsstdstring-name)
	* [public methods of `DBFS::File` class](#public-methods-of-dbfsfile-class)
		* [DBFS::File()](#dbfsfile)
		* [DBFS::File(string name)](#dbfsfilestring-name)
		* [DBFS::File(DBFS::file_hook_fn on_open, DBFS::file_hook_fn on_close)](#dbfsfiledbfsfile_hook_fn-on_open-dbfsfile_hook_fn-on_close)
		* [std::string DBFS::File::name()](#stdstring-dbfsfilename)
		* [size_t DBFS::File::size()](#size_t-dbfsfilesize)
		* [bool DBFS::File::open()](#bool-dbfsfileopen)
		* [bool DBFS::File::open(std::string name)](#bool-dbfsfileopenstdstring-name)
		* [void DBFS::File::close()](#void-dbfsfileclose)
		* [bool DBFS::File::is_open()](#bool-dbfsfileis_open)
		* [bool DBFS::File::fail()](#bool-dbfsfilefail)
		* [bool DBFS::File::move(std::string new_name)](#bool-dbfsfilemovestdstring-new_name)
		* [bool DBFS::File::remove()](#bool-dbfsfileremove)
		* [template\<typename T\> void DBFS::File::read(T& val)](#templatetypename-t-void-dbfsfilereadt-val)
		* [void DBFS::File::read(char* pos, size_t size)](#void-dbfsfilereadchar-pos-size_t-size)
		* [template\<typename T\> void DBFS::File::write(T val)](#templatetypename-t-void-dbfsfilewritet-val)
		* [void DBFS::File::write(char* pos, size_t size)](#void-dbfsfilewritechar-pos-size_t-size)
		* [void DBFS::File::seekg(size_t pos)](#void-dbfsfileseekgsize_t-pos)
		* [void DBFS::File::seekp(size_t pos)](#void-dbfsfileseekpsize_t-pos)
		* [size_t DBFS::File::tellg()](#size_t-dbfsfiletellg)
		* [size_t DBFS::File::tellp()](#size_t-dbfsfiletellp)
		* [void DBFS::File::on_open(DBFS::file_hook_fn on_open)](#void-dbfsfileon_opendbfsfile_hook_fn-on_open)
		* [void DBFS::File::on_close(DBFS::file_hook_fn on_close)](#void-dbfsfileon_closedbfsfile_hook_fn-on_close)
		* [std::fstream& DBFS::File::stream()](#stdfstream-dbfsfilestream)
		* [std::mutex& DBFS::File::get_mutex()](#stdmutex-dbfsfileget_mutex)
		* [std::lock_guard\<std::mutex\> get_lock()](#stdlock_guardstdmutex-get_lock)
* [License](#license)

## Build
Library was tested using **GNU G++** compiler with flag **-std=c++17**. So it is recommended to use C++ 17 or higher version of compiler. Compiling with another compilers might need code corrections.

## Docs

### Usage
First of all you have to define your files root folder. You can do it by calling the `DBFS::set_root(string)` method with path to the root folder as single argument. You can also set up preffix, suffix and other options. You can find all available options below.

Then you can start using methods to create and manipulate files.

***Example:*** _Create file, write the data, and delete this file after it is closed._
```c++
DBFS::set_root("./tmp");
DBFS::File* file = DBFS::create_file();
file->on_close([](DBFS::File* f){
	f->remove();
});
file->write("Hello World!");
```

### Public methods of `DBFS` namespace
#### void DBFS::set_root(string path)
Methods for setting up the root folder for all files. By default `"."`

***Example:***
```c++
DBFS::set_root("./tmp");
```

#### void DBFS::set_prefix(string prefix)
Method for setting up the prefix for your files. This prefix used exclusively for storing files on OS filesystem, and not included to the filename returned by `string DBFS::File::name()` method. By default `""`

***Example:***
```c++
DBFS::set_prefix("f_");
auto f = new DBFS::File("somefilename"); // created as ${root_folder}/so/me/f_somefilename
std::cout << f->name() << std::endl; // somefilename
```

#### void DBFS::set_suffix(string suffix)
Method for setting up the suffix for your files. The rules the same as for prefix. You can use it for setting up file extension. By default `""`

***Example:***
```c++
DBFS::set_suffix(".txt");
auto f = new DBFS::File("somefilename"); // created as ${root_folder}/so/me/somefilename.txt
std::cout << f->name() << std::endl; // somefilename
```

#### void DBFS::set_filename_length(int length)
Method for setting up filename lengths for automatically created files _(not including prefix or suffix)_. By default `10`

***Example:***
```c++
DBFS::set_filename_length(8);
auto f = DBFS::create();
std::cout << f->name() << std::endl; // something like "a5ftc5g4"
```

#### void DBFS::use_suffix_minutes(bool use);
`true` by default. If active it will add ~ 5 symbols at the end of filename corresponding to the current time in minutes.

**Note:** _We strongly recommend leaving this feature on to avoid any filename collisions_

### std::string DBFS::get_file_path(string name);
Accepts one string parameter - name of the file and returns full path to the file including `prefix`, and `suffix`.

***Example:***
```c++
auto f = DBFS::create();
std::cout << DBFS::get_file_path(f->name()) << std::endl; // something like ${root}/a7/bc/a7bcfsa7wfhgawq8asm
```

#### std::string DBFS::random_filename();
Returns filename you can use to create new file with `DBFS::create(name)` construction.

***Example:***
```c++
DBFS::create(DBFS::random_filename());
```

#### DBFS::File* DBFS::create();
Creates and opens new file and returns its pointer. Uses `DBFS::random_filename()` to generate filename.

#### DBFS::File* DBFS::create(std::string name);
Creates or opens file with filename `name`.

#### DBFS::File* DBFS::create(DBFS::file_hook_fn on_open, DBFS::file_hook_fn of_close)
Creates and opens new file and set `on_open` and `on_close` hooks.
**Note:** _`DBFS::file_hook_fn` is alias for `std::function<void(DBFS::File*)>`_

#### bool DBFS::move(std::string name, std::string new_name);
Moves file to new direction.
**Note:** _File associated with `name` you want to move should be closed before moving_

#### bool DBFS::remove(std::string name, bool remove_path);
Deletes file with name `name`. if `remove_path` is set to `true` _(`true` by default)_ then if folders are empty, it will remove the folders as well.

#### bool DBFS::exists(std::string name);
Checks whenever file with `name` exists or not

### public methods of `DBFS::File` class
#### DBFS::File()
Default constructor. Creates instance of `DBFS::File` with no associated filename.
You can use `DBFS::File::open(std::string)` method to open specific file.

***Example:***
```c++
auto f = new DBFS::File();
f->open("jrhg31hj5h12bf");
```

#### DBFS::File(string name)
Creates or opens file with specific name.
**Note:** It is recommended to use `new` keyword when creating or opening files with `DBFS::File` constructors.

#### DBFS::File(DBFS::file_hook_fn on_open, DBFS::file_hook_fn on_close)
Constructor. Match `DBFS::create(DBFS::file_hook_fn on_open, DBFS::file_hook_fn on_close)`. For more details, see corresponding [method](#dbfsfile-dbfscreatedbfsfile_hook_fn-on_open-dbfsfile_hook_fn-of_close).

#### std::string DBFS::File::name()
Returns name of associated with current instance file.

#### size_t DBFS::File::size()
Returns size of the associated associated with current instance file.

#### bool DBFS::File::open()
Opens associated with current instance file. Returns `true` if file was opened successfully.

#### bool DBFS::File::open(std::string name);
Opens file associated with `name`. Returns `true` if file was opened successfully.

#### void DBFS::File::close()
Closes associated with current instance file.

#### bool DBFS::File::is_open()
returns true if file is opened

#### bool DBFS::File::fail()
Returns true if corresponding to current instant `std::fstream` is in error stated.

#### bool DBFS::File::move(std::string new_name)
Moves associated with current instance file to move location. If current file is opened, it will be closed, moved and then reopened again. If file is closed, it will be just moved.

#### bool DBFS::File::remove()
Deletes associated with current instance file. If file is opened, it will be closed and then deleted.

#### template\<typename T\> void DBFS::File::read(T& val)
Reads file content to corresponding variable `val`. Methods works similar to `stringstream operator>>`

***Example:***
```c++
auto f = DBFS::create();
f->write("18 24\n");
int a1,a2;
f->read(a1);
f->read(a2);
std::cout << a1 + a2 << std::endl; // 42
```

#### void DBFS::File::read(char* pos, size_t size)
Reads `size` bytes from file and put them to char buffer starting at `pos`

***Example:***
```c++
auto f = DBFS::create();
f->write("123abc");
char* buf = new char[4];
f->read(buf,3);
buf[3] = '\0';
std::cout << buf << std::endl; // 123
```

#### template\<typename T\> void DBFS::File::write(T val)
Writes content of corresponding variable to file. Method works similar to `stringstream operator<<`.

#### void DBFS::File::write(char* pos, size_t size)
Writes `size` bytes to the file from buffer starting at position `pos`

#### void DBFS::File::seekg(size_t pos)
Moves read pointer to corresponding position.

***Example:***
```c++
auto f = DBFS::create();
f->write("abc42\n");
f->seekg(3);
int a;
f->read(a);
std::cout << a << std::endl; // 42
```

#### void DBFS::File::seekp(size_t pos)
Moves write pointer to corresponding position.

 Every time file opens this function will run.

**Note:** _There is no way to remove function from hook list yet_

#### void DBFS::File::on_close(DBFS::file_hook_fn on_close)
Associate function with current file. Every time file closes this function will run.

***Example:***
```c++
auto f = DBFS::create();
f->on_close([](DBFS::File* f){
	f->remove();
});
```

#### std::fstream& DBFS::File::stream()
Returns reference to associated with current file `std::fstream`

#### std::mutex& DBFS::File::get_mutex()
Returns reference to associated with current file `std::mutex` so you can block file when reading it from 2 different threads.

#### std::lock_guard\<std::mutex\> get_lock()
Returns `lock_guard` that uses `mutex` of current file.

***Example:***
```c++
auto f = DBFS::create("somefilename");
char* buf = new char[1024];
size_t sz = f->size();
auto lock = f->get_lock();
f->seekg(0)
while(sz){
	int read_size = std::min(sz,1024);
	f->read(buf,read_size);
	// Do something with buffer
	sz -= read_size;
}
```

## License
MIT

Have fun :)

repository: Immortale-dev/dbfs

repo_name: Immortale-dev/dbfs


text:
# DmiProperty.MemoryDevice.DeviceSet property

Gets a value representing the key to retrieve the property.

Identifies when the Memory Device is one of a set of Memory Devices that must be populated with all devices of the same type and size, and the set to which this device belongs.

Key Composition

* Structure: MemoryDevice
* Property: DeviceSet
* Unit: None

Return Value

Type: Byte

Remarks

2.1+

```csharp
public static IPropertyKey DeviceSet { get; }
```

## See Also

* class [MemoryDevice](../DmiProperty.MemoryDevice.md)
* namespace [iTin.Hardware.Specification.Dmi.Property](../../iTin.Hardware.Specification.Dmi.md)

<!-- DO NOT EDIT: generated by xmldocmd for iTin.Hardware.Specification.Dmi.dll -->

repository: iAJTin/iSMBIOS

gha_language: C#

repo_name: iAJTin/iSMBIOS


text:
---
tags: code c
title: btw
---

I discovered my new favourite fact about [my new favourite language](https://en.wikipedia.org/wiki/C_programming_language) recently. I suppose it should be obvious but I hadn't though about it in explicitly these terms.

Given:

```c
char* myStringArray[] = {"Hello", "Goodbye", "Tomatoes"};
int index = 2;
```

then the following will print `Tomatoes`:

```c
printf("%s\n", myStringArray[index]);
```

and so (this is the bit I hadn't fully realised) will this:

```c
printf("%s\n", index[myStringArray]);
```

Good times :)

gha_language: HTML


text:
# Stack UI Schema Status Spec

- Owner: Steven Rathbauer ([@rathpc](https://github.com/rathpc))
- Reviewers: Crossplane Maintainers
- Status: Draft, revision 1.0

## Proposal

[crossplaneio/crossplane#929](https://github.com/crossplaneio/crossplane/issues/929)

## Problem

For a given CRD I want to be able to expose various condition statuses to a frontend GUI. In addition to the condition
type and status it would also be helpful to have some additional details about that type if applicable, such as message
or lastTransitionTime.

This should assume that condition statuses are following a particular condition convention, similar to that of a
[podcondition]

The conditions should contain at least the following keys:
- type
- status
- message
- lastTransitionTime

#### For example:

If a CRD has the condition type 'Ready' defined but has a status of that type of _"False"_, you could then show some
visual indication to a user through a GUI that the CRD is **NOT Ready**.

When that status changes to _"True"_ then you can adjust that visual cue to now reflect that the CRD is in fact **Ready**.

As of right now there is no defined spec to be able to drive status information for a given resource from a GUI
perspective. It would be useful to add a key to the existing `ui-schema.yaml` file that can be used for this purpose.

This 1-pager will identify the key that should be added and what that structure looks like.

## Design

#### New key to be added to the `ui-schema.yaml` file:

- `printerColumns` _(this is a string or map of key/value pairs)_

The `printerColumns` key could potentially look like this:

```yaml
version: 0.4
configSections:
- title: Title
  description: Description
printerColumns: .status.conditionedStatus.conditions
```

- This means that you are defining the location of an array containing condition objects located at the JSONPath:
`.status.conditionedStatus.conditions`.

  - That path could contain any number of condition objects that can be exposed to a GUI.

  - Additionally this would assume that this array contains objects following the [podcondition] convention. By default
  the column title is defined by the condition type, and the value is defined by the condition status.

The `printerColumns` key could also look like this:

```yaml
version: 0.4
configSections:
- title: Title
  description: Description
printerColumns:
  Ready: .status.conditionedStatus.conditions[?(@.type=='Ready')]
  Synchronized: .status.conditionedStatus.conditions[?(@.type=='Synchronized')]
  SyncFailure: .status.someRandomStatuses[?(@.type=='SyncFailure')]
```

> \<status type>: \<JSONPath to condition object>

- This uses the map of key/value pairs to define the individual printer columns you would like to expose to a GUI.

- This means that you are defining the specific condition object per key(_column title_) located at a JSONPath.

  - Additionally this would assume that these paths also contain objects following the [podcondition] convention.

    - However, now by default, the column title is defined by the `key` you have assigned a JSONPath value to.

[podcondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#podcondition-v1-core

repository: Defilan/crossplane

repo_name: Defilan/crossplane


text:
# Saving

Most of the time, you only need to call `record.save()`, however, sometimes you need to do a bit more.

## `.save([conditions])`

The most common way to save is just to call `record.save()`. Dyngoose will automatically perform an `UpdateItem` operation if it is possible, to only update the attributes you have changed; but if it is a new record it'll perform a `PutItem` operation.

You can optionally pass conditions, which will perform a [Condition Write](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html#WorkingWithItems.ConditionalUpdate). Conditions use the same syntax as [query filter conditions](Querying.md#filter-conditions). Specifying conditions can help avoid race conditions in situations where multiple processes may be updating the same record.

## `Dyngoose.DocumentClient.batchPut`

Perform a batch put of records. This can be used to update or create records in bulk.

```typescript
@Dyngoose.$Table()
class User extends Dyngoose.Table { … }

await User.documentClient.batchPut([
  User.new(…),
  User.new(…)
])
```

## Updating an item without loading it

If you want to perform an `UpdateItem` operation without having to load the existing record first (extremely useful when operating large or batch operations).

### Table.primaryKey.fromKey(…)

The `Table.primaryKey.fromKey` method lets you create an instance of a `Table` without loading the record.
There can be many situations where this can be helpful. It allows you to perform partial updates of records
or delete a record easily without loading it. For example:

```typescript
@Dyngoose.$Table()
class User extends Dyngoose.Table {
  @Dyngoose.$PrimaryKey('id')
  primaryKey: Dyngoose.Query.PrimaryKey<User, string, void>

  @Dyngoose.Attribute.Number()
  id: number

  @Dyngoose.Attribute.String()
  name: string
}

// fromKey accepts filters, which must contain the hash key property and range key property (if the table has a range key)
const user1 = User.primaryKey.fromKey({ id: 1 })
user1.name = 'test'
await user1.save()

// you can also pass the hash key value and the range key value as arguments directly to fromKey
const user2 = User.primaryKey.fromKey(1)
await user2.delete()
```

### Dyngoose.Query.PrimaryKey.update

The `.primaryKey.update` method also works, although it internally uses the `Table.primaryKey.fromKey()` method and then calls a `record.fromJSON(…)` passing in your `changes`. The `changes` object is strongly typed.

```
await User.primaryKey.update({
  hash<EMAIL_ADDRESS>// specify the value for your record's HASH attribute
  // range: … // specify the value for your record's RANGE attribute, required if the table has a range key
  changes: {
    someString: 'maybe',
    someBoolean: false,
  },
})
```

license: ISC

repository: benhutchins/dyngoose

gha_language: TypeScript

gha_license_id: ISC

repo_name: benhutchins/dyngoose