text:
# DepKit Compiler

[![language](https://img.shields.io/badge/C%2B%2B-17-blue)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization)
[![license](https://img.shields.io/badge/license-MIT-green)](https://opensource.org/licenses/MIT)

DepKit is a typed language for advanced package management. This project implements a DepKit compiler.

If you are not familiar with the grammar of DepKit, you can start [here](https://github.com/vbcpascal/depkit/tree/master/doc/grammar.md). Or you can read the [examples](https://github.com/vbcpascal/depkit/tree/master/examples) here, for the syntax of DepKit is very simple.

## Build

DepKit needs some dependencies: [RE-flex](https://www.genivia.com/doc/reflex/html/index.html), [bison](https://www.gnu.org/software/bison/), [z3](https://github.com/Z3Prover/z3) and [docopt](https://github.com/docopt/docopt.cpp). You can visit their pages for more details.

After installing these tools, you can try to compile our project.

To generate `lever.hpp`, `lever.cpp`, `parser.hpp`, `parser.cpp` and `location.hh` generated by RE-flex and bison, you should run

``` bash
make bison
make lex
```

Then use cmake to compile the project. I did not intergrate the above work into cmake (because i'm lazy). Remember to change the path in `CMakeLists.txt` (because i'm lazy).

``` bash
mkdir build
cd build
cmake ..
cmake --build .
```

## Usage

```
/* Definitions */

LLVM [
  version: {9.0, 10.0};
  feature: {gold, debug, z3};
  backend: {AArch-64, RISC-V};
] = ()

z3 [
  version: {4.8, 4.7, 3.5};
  feature: {debug};
  backend: {AArch-64, RISC-V};
] = ()

%%

/* Dependencies */

LLVM : {
  require (z3 in feature || version < 10.0);
  if z3 in feature {
    z3
  }
  if z3 in feature && debug in feature {
    debug in z3.feature
  }
}

%%

/* Requirements */

LLVM [
  version: {10.0};
  feature: {z3};
  backend: {};
]
```

This is an example of DepKit. Save this as `example.dk`. Then compile this file by

```
./depkit example.dk
```

You will get

```
LLVM 10.0
  features: z3 [ gold ]
  backends: [ AArch-64 RISC-V ]
z3 4.8
  features: [ ]
  backends: [ AArch-64 RISC-V ]
```

This gives you the package you want to install and the corresponding version. The features and backends in `[]` means that it is an optional feature or backend. However, it should be noted that this does not mean that you can install them freely, you need to add them to the constraints and recompile to ensure that no conflicts will occur.

You can also output the result to a file with option `--output`. Use `./depkit --help` for details.

## Contributors

[Zhichao Guan](https://github.com/vbcpascal) and [Pengcheng Xu](https://github.com/KireinaHoro/) designed this for [Design Principles of Programming Language](https://xiongyingfei.github.io/DPPL/2020/main.htm).

repository: vbcpascal/depkit

repo_name: vbcpascal/depkit


text:
## User Interface to the Verovio JavaScript Toolkit Library

###  Introduction

There are over 100,000 music files encoded in [ **kern data
format](https://www.humdrum.org/rep/kern/index.html). This includes the large
database of [early music](https://josquin.stanford.edu/) and [polish
scores](https://github.com/pl-wnifc/humdrum-polish-scores).

The **kern format was developed for the humdrum software package to analyze
the music. Software to convert this format to MEI, music XML, SVG and ABC
notation format are part of the Humdrum software library.

Many of the **kern files have been converted into abc music notation format
which you can find [here](https://ifdo.ca/~seymour/kern2abc/). The translation
to abc notation format is not perfect and some presentation information may be
lost. The Verovio project has produced JavaScript software for converting the
**kern files into music scores that can run on all computer systems.

The JavaScript Toolkit Library [verovio
toolkit](https://book.verovio.org/first-steps/) allows you to render a kern
file embedded in your web page to a music score. Unlike the [Humdrum Notation
Plugin](https://plugin.humdrum.org/), the JavaScript code can run directly in
your computer, rather than on a remote server. This program contains the
tcl/tk code which selects the input kern file to be embedded into the web
page. The score is inserted into a temporary web page (html file) with the
included commands to convert the embedded file into an svg representation of
the score plugin. The html file is then forwarded to your favourite browser.
The user has access to the various options which control the layout of the
score in the html file. In addition the user interface allows you to view the
input kern file either in a plain text editor, or in a graphics window.

The user can create portable html web page which loads the JavaScript code
from a remote server. This file would work on any system. If the user wishes
to run this program without internet access, then the JavaScript code can be
loaded directly from your own computer.

This application provides a convenient way of displaying kern files on your
browser and experimenting with the various options described in the
documentation.

To run this software, you require Tcl/Tk the interpreter, either 8.5 or 8.6.
This frequently comes with the Linux or OS operating system or can be easily
installed. Details on acquiring this interpreter can be found on [
https://www.tcl.tk/software/tcltk/download.html](https://www.tcl.tk/software/tcltk/download.html)
if it is missing from your system.

After downloading tkkern.tcl, you should create a separate folder for example
tkkern, and put tkkern.tcl in that folder. You may also need to include the
JavaScript verovio-toolkit-wasm.js discussed below. When you run tkkern.tcl,
it will create or update the initialization file tkkern.ini where all you
configuration information will be stored. When you render a tune, it will
create a temporary html file in your folder which will be sent to your
browser. By default this file will be called tune.html; however, you can
change the name and location of the file in the cfg window.

Tkkern.tcl will pop up various windows when you run the program. You can move
these windows around your screen, and if they remain open when you close
tkkern, it will store the positions of tese windows and move them to these
locations the next time you run the program.

To start this script in a terminal or command window, enter

    wish tkkern.tcl

or double click on the tkkern.tcl file icon.

The rest of this document describes how to run this application.

###  Main Window

This is the main window containing 5 buttons and a listbox containing the file
names of all the kern files is a user chosen directory.

![main window](main.gif)

If you hover the mouse pointer on any of the buttons, a tooltip will pop up
with an explanation of the buttons function. Clicking on any the buttons will
cause another window to pop up. By default the new window is placed in the
center of the screen and may obscure the main window. You should move the
window to a new location and the program will remember this location for the
next time you run this program.

You select the folder containing the kern files by clicking on the **open**
button.

### cfg

Before using this script, it is recommended that you open the cfg window which
looks like this.

![cfg window](cfg.gif)

The program requires an internet browser like Firefox in order to display the
kern file in common music notation. The Firefox browser comes with most Linux
distributions, so it is sufficient to enter firefox in the entry box. For
Windows 10, it will be necessary to indicate the full path to the browser
executable -- for example.

    "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"

or

    "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"

Note that even though the Windows file system uses back slashes to indicate
the file path, this program requires that you use forward slashes. Tcl
interprets the back slash character as something else.

You can use the button labeled **find or enter browser** to navigate to the
binary of this browser. Similarly, the browser will require the full path to
the temporary file (tune.html). You only need to do this once since this
information will be stored in the text file tkkern.ini.

The JavaScript code will be loaded either from

     src="http://verovio-script.humdrum.org/scripts/verovio-toolkit-wasm.js"
     or
     src="verovio-toolkit-wasm.js"

depending on whether you tick the **remote javascript** or the **local
javascript** radiobutton. If you decide to load the JavaScript code from your
own computer, you need the file verovio-toolkit-wasm.js file to be in the same
folder as tkkern. You can download this file from <https://verovio-
script.humdrum.org/scripts/verovio-toolkit-wasm.js>.

The text editor is needed if you click on the **kern/kernFile** menu command.
This allows you to view the selected **kern file in an editor that you choose.

Tkkern creates a temporary html file that is forwarded to your browser. By
default it is called tune.html; however, you are free to specify any other
file.

### Open

Clicking this button opens a file folder browser for selecting the folder
containing your kern files. It is not sufficient to just select this file.
Once you open this folder, it will appear empty unless it contains other
subfolders.

###  kern

The kern button allows presents a choice of two ways of viewing the input kern
file. Clicking on the **spineList** button will pop up two windows similar to
below. The header and tail of the selected kern file is shown in one window
and the spines are displayed in separate listboxes in the other window.
Presently, all you can do is to scroll down the window or close it when you
are done. If the kern file contains spines which split into other spines, the
contents will not line up correctly. More work is needed.

![header window](headr.gif)

![spine window](spines.gif)

Clicking the **kernFile** will open the file with the text editor that you
have chosen in the cfg window.

###  Options

The tkkern script allows you to control the appearance of the rendered music
using various options below.

![options window](options.gif)

Hovering the mouse pointer on the labels associated with any of these options
will pop up a tooltip giving the default value and the allowable values for
these options. If an entry box is blank, then the option and value will not be
inserted into the web page and Hnp will substitute the default value.

### Render

Clicking this file will create a temporary html file which contains the
selected kern file and the specified options. The internet browser that you
specified in the cfg window will attempt to open this file. The processing
time to render the kern file depends more on the browser rather than the size
of the file. A tiny kern file was rendered in 5 seconds on Microsoft Edge on
Windows 10, but took 14 seconds on Firefox on Cinnamon Mint 20 on VirtualBox.
In contrast a large file used 9 seconds on Microsoft Edge and 21 seconds on
Firefox.

### Help

Clicking the **help** button will open
<https://www.humdrum.org/rep/kern/index.html> in your browser. The web page
describes the **kern format in detail.

This release includes a set of test files in the folder kernsamples. The
samples, is a good place to start to learn the **kern notation.

* * *

This page was last updated on November 7 2021.

license: MIT

repository: sshlien/tkkern

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: sshlien/tkkern


text:
# esp32_blink
Simple blink program for ESP32 on top of FreeRTOS. Written in Eclipse on Ubuntu

# Setup
1. Get SDK running from here: https://github.com/espressif/ESP32_RTOS_SDK
2. Install Eclipse
3. Clone repo
4. You may need to edit BIN_PATH and SDK_PATH in C/C++ Build / Environment

branch_name: refs/heads/master


text:
# Status week 1
## Student Status
### Claeys Willem
**Les 1**

- Created scope with teacher and bought drone

**Les 2**

- Followed tutorial with Amir

**Les 3**

- Created gitlab issues, labels and markdowns for startup of project and followed tutorial with Amir

**Les 4**

- Tried to make connection with drone togheter with Amir

### Sheikhzadeh Amir
**Les 1**

- Created scope with teacher

**Les 2**

- Followed tutorial with Willem and helping Willem with VE

**Les 3**

- Followed tutorial with Willem

**Les 4**

- Using dualboot on my own laptop to smoothen on the simulations.
- Solving all the problems with display and internet connection (couldn't use wifi adapter).
- Helping Willem with connecting the drone with the ROS software (didn't work due to not recognision of wifi adapter by Ubuntu 14.04).

### Van Hof Nathan
**Les 1**

- Created scope with teacher

**Les 2**

- Followed tutorial and installed ubuntu

**Les 3**

- Followed tutorial and researched more about windows version

**Les 4**

-

## Overall Status
### Where are we?
- At startup of our project
### Collaborations
- Willem and Amir are working on the tutorial
- Nathan is trying to find out a way to use Windows
### Technologies
- We are learning to use ROS on Ubuntu 14.0.4
### Progress
- 5%


text:
# Volcanus_FileUploader

[![Latest Stable Version](https://poser.pugx.org/volcanus/file-uploader/v/stable.png)](https://packagist.org/packages/volcanus/file-uploader)
[![Continuous Integration](https://github.com/k-holy/volcanus-file-uploader/actions/workflows/ci.yml/badge.svg)](https://github.com/k-holy/volcanus-file-uploader/actions/workflows/ci.yml)

repository: k-holy/volcanus-file-uploader

repo_name: k-holy/volcanus-file-uploader


text:
---
layout: post
category: project
title: "Publishing a bioinf package"
excerpt: |
    There's not much to say about Purge Haplotigs that isn't already covered in the paper and documentation.
    Instead I'll talk about my impressions and experience with creating a bioinformatics software package.
---

[_Read the paper_](https://doi.org/10.1186/s12859-018-2485-7)

### but y tho?

My motivation for creating the tool began with BioInfoSummer 2016.
I figured our work on curating the Chardonnay assembly would be a neat little story for a poster ([available here](docs/Roach-Bioinfosummer-2016.pdf)).
Two things happened: people liked my solution to what turned out to be a common assembly problem,
and there was a talk on publishing bioinformatics software by Torsten Seemann ([based on his paper](https://doi.org/10.1186/2047-217X-2-15)).
So I'd decided to turn our collection of scripts into a package that other people could use for their work.
To do this properly was way more work than I'd anticipated.

### Things I've learned 1: Early adopters make all the difference

I was following Torsten's advice in his talk and paper for writing bioinf packages,
and was trying to think of all the annoyances I'd encountered using other people's bioinf software to avoid the same mistakes.
More importantly however, I'd got in contact with Jason Chin who was at PacBio at the time.
We'd already been in discussions on the Chardonnay assembly and for access to FALCON-Unzip.
He put me in touch with Sarah Kingan and Gregory Concepcion who were also working on the same problem.
They provided feedback in the early days, and later begun using and promoting the package to other research groups.

### Things I've learned 2: It's a lot of work

Most of the time I've spent on the software happened _after_ the first submission of the paper.
The code-base has had substantial overhauls and refactoring following feedback from the reviewers and users,
as well as following ideas that I'd had for performance improvements etc.
Probably the most time has been spent on bug-fixes, usually trying to get the software to run on other peoples' systems.
While I always knew that maintaining a package was necessary for its success I don't think I appreciated just how time consuming it was going to be.

### Thing I've learned 3: It's incredibly rewarding

Purge Haplotigs fills a small niche and is far from being one of the more popular bioinf software packages.
It currently has 70 citations on google scholar
and I'm expecting it to be obsolete in a few years as both long-read sequencing and assemblers continue to improve.
Nevertheless, it's already exceeded our original expectations.
Hearing directly from scientists that have found your package useful gives you warm fuzzy feelings,
and it's a bit surreal walking around at a large conference and seeing your package popping up on a bunch of posters.

All things considered, would I do it again? absolutely!
Would I maintain more than one package at a time? absolutely not! :p

## References

MJ Roach, SA Schmidt, AR Borneman,
(2018),
_Purge Haplotigs: allelic contig reassignment for third-gen diploid genome assemblies_,
BMC bioinformatics 19 (1), 460 |
[DOI](https://doi.org/10.1186/s12859-018-2485-7)

Torsten Seemann,
(2013),
_Ten recommendations for creating usable bioinformatics command line software_,
GigaScience, Volume 2, Issue 1, December 2013, 2047–217X–2–15 | [DOI](https://doi.org/10.1186/2047-217X-2-15)


text:
# ManaMana Framework

[![Code Climate](https://codeclimate.com/github/ManaManaFramework/manamana.png)](https://codeclimate.com/github/ManaManaFramework/manamana) [![Build Status](https://travis-ci.org/ManaManaFramework/manamana.png)](https://travis-ci.org/ManaManaFramework/manamana) [![Coverage Status](https://coveralls.io/repos/ManaManaFramework/manamana/badge.png)](https://coveralls.io/r/ManaManaFramework/manamana)

ManaMana (do doo be-do-do!) is a **user acceptance testing** framework for web applications. Capture customer requirements and then execute them against your web app for instant gratification and profit!

## Installation

Install the gem:

    $ gem install manamana

Use the `mana` command to generate a new project:

    $ mana create my_project

This will create a directory named `my_project` containing the following items:

 * `requirements/` - Contains your project's requirements
 * `test_cases/` - Contains your project's test cases
 * `lib/stepdefs/` - Contains definitions for steps that are used by test  cases
 * `lib/helpers/` - Contains helper methods that can be used in test cases and stepdefs

## Usage

**Step 1: Write Requirements**

Write a requirements file using the Requirements Syntax and save it under the `requirements/` directory. For example:

```
Create Tickets
==============
As a member of a software development team
I want to create tickets
So that I can track the bugs in our project

  * Newly created tickets have a status of 'Open'

  * A <Role> <Can or Cannot Create> support tickets

    Examples:
      | Role    | Can or Cannot Create |
      |---------|----------------------|
      | Manager | Can Create           |
      | Member  | Can Create           |
      | Guest   | Cannot Create        |

    Notes:
      Arbitrary text that the business analyst or domain expert
      thinks might help the development team understand the
      problem much better. Blah blah blah.
```

Notes about the syntax:

 * Text underlined by `=` characters serve as the 'group name' for the requirements that follow it
 * Text that begin with an asterisk `*` are considered requirements
 * Requirements can wrap to the next line. The end of a requirement spec is marked by two newline characters.
 * The keywords `Examples:` and `Notes:` are not really keywords. They're just optional arbitrary text that the writer can add for clarity. The compiler will ignore them.
 * Tables may or may not have borders. In the above, the border below the header row may be safely ommitted.
 * Notice that there are no word-like keywords in the above syntax making it il8n-ready at the onset.
 * The requirements file can be any text file but the convention is to use the .requirements file extension

**Step 2: Write Test Cases**

Write test cases for each requirement using the Test Case Syntax and save each as a file under the `test_cases/` directory. For example:

```
Test Case:
  A (.+) can create support tickets

  Variables:
    * Role Name   = $1
    * My Username = "norm"
    * My Password = "123qwe"

  Setup:
    * An account with username <My Username> and password <My Password> exists
    * The account with username <My Username> has a role of <Role Name>
    * I am logged out

  Teardown:
    * Delete the account with username <My Username> at exit

  Script:
    * Visit the Login page
    * Fill in the Username field with <My Username>
    * Fill in the Password field with <My Password>
    * Click the Login button
    * The New Ticket button should be enabled
```

Notes:

  * The test case name can be a string or a regexp pattern
  * The test case file can be any text file but the convention is to use the .test_case file extension
  * Organizing test cases into subfolders under the `test_cases/` directory is recommended. (e.g. `test_cases/create_tickets/`)

**Step 3: Define re-usable steps**

Write the equivalent Ruby code for the steps used in the test cases. For example:

```
step /^Visit the (.+) page$/i do |page_name|
  # Add Ruby code here
end

step /^Fill in the (.+) field with (.+)$/i do |field_name, value|
  # Add Ruby code here
end

step /^Click the (.+) button$/i do |button_name|
  # Add Ruby code here
end
```

**Step 4: Run it!**

Run `mana exec` to execute the tests and validate the requirements:

```
$ mana exec
Run options: --seed 51346

## Running tests

Create Tickets
==============
As a member of a software development team
I want to create tickets
So that I can track the bugs in our project

  * Newly created tickets have a status of 'Open'             PASSED

  * A <Role> <Can or Cannot Create> support tickets

    Examples:
      | Role    | Can or Cannot Create |
      |---------|----------------------|
      | Manager | Can Create           |                      PASSED
      | Member  | Can Create           |                      PASSED
      | Guest   | Cannot Create        |                      FAILED

    Notes:
      Arbitrary text that the business analyst or domain expert
      thinks might help the development team understand the
      problem much better. Blah blah blah.

Finished tests in 0.004842s, 1445.6836 tests/s, 826.1049 assertions/s.

7 tests, 4 assertions, 0 failures, 0 errors, 0 skips
```

## Development guide
If you want to help in developing ManaMana, fork this project at [https://github.com/ManaManaFramework/manamana](https://github.com/ManaManaFramework/manamana), then clone it locally. A few requirements before proceeding:

* RVM
* Homebrew on Mac OS X
* git
* growl on Mac OS X

Once the above have been installed, go to the manamana project directory and install the required gems:

```
bundle install
```

Afterwards, install ragel. For Mac OS X, use Homebrew:

```
brew install ragel
```

Now you can start developing! Open the project folder with your favorit text editor, then, on your terminal window, run guard from the project directory:

```
guard
```

repository: ManaManaFramework/manamana

repo_name: ManaManaFramework/manamana


text:
# Daily Journal Semantic HTML and Layout

Use your wireframe as a guide to create the HTML for your daily journal.

## Project Directory and First Files

1. Create a new sub-directory in your `workspace` directory named `daily-journal`.
1. In that directory, create an `index.html` file.
1. Create a sub-directory named `scripts`. This directory will contain all of your JavaScript files in the future.
1. Create a `styles` sub-directory and create a `main.css` file in it.

Once those are created, make sure you are in your root directory and open Visual Studio Code with the `code .` command in the terminal. Once it launches, you are ready to start coding.

### Boilerplate HTML Code

Open your `index.html`. Visual Studio Code provides many shortcuts and can write boilerplate code for you, which you then customize for your needs. Just type in the letters `html` and in the Intellisense context menu that appears, choose the "html:5" item to get some boilerplate HTML.

* Inside the `<head>` tag, create a new line, type in `link` and choose the "link:css" item and change the href to `styles/main.css`
* Within the `<head>`, don't forget to give your page a `<title>`

## HTML Layout

Refer to your wireframe and write semantic HTML for the page.

* Start broad with `<header>`, `<main>` and `<footer>`.
* Get more specific with `<section>`, `<article>`, and `<form>`. (Don't worry about the details of the form - you will build that out below).
* Get more specific with `<h2-h6>`, `<p>`, and `<a>`.
* Continue this process until you block in the page with all of the details from your wireframe.

## Build the Journal Form

You are going to use the `form` component, the `fieldset`, `label`, `input`, `textarea`, `select`, and the `option` elements to build your form.

The first step is to create a date field.

![date field creation](./images/MArcqtbyj6.gif)

Then create an `<h2>` element above the form containing the text _Daily Journal_.

Save your file. Go to the terminal. Type in `serve`. Then go to Chrome and open your dev tools to ensure you aren't viewing a cached version of the site. Refresh the browser if you need to.

You should see something like this.

![date field in action](./images/Qy2gJq5gv8.gif)

## Create the Remaining Fields

Now you create the rest of the fields using HTML elements. When you are done, the form should look simlar to this.

![](./images/daily-journal-basic-layout.png)

## Column Layout with Flexbox

Now use the `display: flex`, and `flex-direction: column` CSS properties to change your form to look like this.

![](./images/P5FPNsVInT.gif)

**Push your project to Github.**
Update the `README.md` file to include your wireframe.

##
## UI/UX Challenge
** This is an optional challenge once you meet MVP.

### Best Practices for Form Design
Take a look at Luke Wroblewski's article on form design, the following sections will get you started. [webforms_lukew.pdf](webforms_lukew.pdf)
1. Inputs: pp18-48 (lots of visual examples)
2. Actions: pp49-56

Refactor your Daily Journal to include best practices for form design.

gha_language: Shell


text:
---
layout:     post
title:      "HTTP Status Code"
subtitle:   ""
date:       2020-12-14 11:30:00
author:     "Xiaoxianma"
header-img: "img/home-bg-oakley-on-keyboard.jpg"
tags:
    - http
    - restapi
---

# About HTTP status codes
In HTTP,  you send a numeric status code of **3 digits** as part of the response.

These status codes have a name associated to recognize them, but the important part is the number.

In short:
- `100` and above are for "Information". You rarely use them directly. Responses with these status codes cannot have a body.
- `200` and above are for "Successful" responses. These are the ones you would use **the most**.
  - `200` is the default status code, which means everything was "OK".
  - Another example would be `201`, "Created". It is commonly used after creating a new record in the database.
  - A special case is `204`, "No Content". This response is used when there is no content to return to the client, and so the response must not have a body.
- `300` and above are for "Redirection". Responses with these status codes may or may not have a body, except for `304`, "Not Modified", which must not have one.
- `400` and above are for "Client error" responses. Theses are the type you would probably use **the second most**.
  - An example is `404`, for a "Not Found" response.
  - For generic errors from the client, you can just use `400`.
- `500` and above are for server errors. You almost never use them directly. When something goes wrong at some part in your application code, or server, it will automatically return one of these status codes.

extension: markdown


text:
---
date: 2019-07-16
title: Upcoming 2019.07 Release - Web UI and HDRP Support
author: Brian Shin
preview: The upcoming SVL Simulator 2019.07 release will roll out in a couple of weeks, and there are some big changes for our users.
featuredImage: images/2019-07-prerelease-01.png
---

![2019.07 Upcoming Release](images/2019-07-prerelease-01.png)

The upcoming SVL Simulator 2019.07 release will roll out in a couple of weeks, and there are some big changes for our users. While we have significantly improved things and added new features, please keep in mind that if you have many customizations to the simulator, they may not all be compatible at first with the new simulator.

You can [sign up](http://eepurl.com/gpuhkb) to our mailing list for the latest updates!

We are targeting a release date of July 29, 2019 for the 2019.07 version of the SVL Simulator. Here are some of the new features included in our upcoming release:

- A new web user interface for interacting with the simulator

- Use of Unity's High Definition Rendering Pipeline (HDRP)

- Separate asset bundles for maps and vehicles - ability to add and share custom environments and vehicles more easily

- Ability to dynamically add sensors to a vehicle without rebuilding the simulator

![Edit Simulation](images/2019-07-prerelease-02.png)
_A screenshot of the new web UI. A developer can configure simulations with the map, vehicle(s), environment, and other settings._


text:
# GearMenu

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_ragedunicorn_love_classic.png)

_GearMenu aims to help the player switching between items in and out of combat. When the player is in combat a combatqueue will take care of switching the item as soon as possible. It also allows you to define switching rules and keybinding slots._

## What is GearMenu?

GearMenus goal is to help the player switching between items on certain slots. Often players have items such as engineering items that have a one time use followed by a long cooldown. After using them during a fight the player wants to switch back to a more useful item. While changing items during combat is not possible (with some exceptions such as weapons) GearMenu can help with switching them as soon as possible. When a player tries to switch an item during combat it will be put into the combatqueue and switched as soon as possible. If the player leaves combat for just a split second all the items in the combatqueue will be switched. For some classes this might be even easier because they can use spells such as rogue - vanish or hunter - feign death.

**Supported slots:**

* Head/Helmet slot
* Neck slot
* Shoulder slot
* Chest/Robe slot
* Waist/Belt slot
* Legs slot
* Feet/Boots slot
* Wrist/Bracers slot
* Hands slot
* First/Upper ring slot
* Second/Upper ring slot
* First/Upper trinket slot
* Second/Lower trinket slot
* Back/Cloak slot
* Main-hand slot
* Secondary-hand/Off-hand slot
* Ranged slot
* Ammo slot

## Features of GearMenu

### Item switch for certain slots
With GearMenu it is easy to switch between items in supported slots. This is especially useful for engineering items that you wear for a certain amount of time and then switch back to your usual gear.

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_switch_items.gif)

### CombatQueue
Certain items cannot be switched while the player is in combat. Weapons will be switched immediately whether the player is in combat or not. Other items that cannot be switched in combat will be enqueued in the combatqueue and switched as soon as possible. This is especially useful in PvP when you leave combat for a short time.

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_combat_queue.gif)

**Note:** You can right click any slot to clear the combatqueue for that slot

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_combat_queue_cancel.gif)

GearMenu also detects whether an itemswitch is possible even when out of combat. If you're switching an item while you're casting your mount or any other spell it will put the item in the combatqueue. As soon as the cast is over the item will be switched.

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_combat_queue_cast.gif)

This is also the case if you cancel your cast.

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_combat_queue_cast_cancel.gif)

### Quick Change

Quick change consists of rules that apply when certain items are used. The player can define rules for items that have a usable effect. An item might be immediately switched after use or only after a certain delay. Otherwise the same rules for item switching apply. This means that if the user is in combat it will be moved to the combat queue and if he is out of combat the item will be immediately switched. See the optionsmenu for defining new rules based on the item type.

**Note:** If an item has a buff effect and you immediately change the item you will usually also lose its buff. In most cases it makes sense to set the delay to the duration of the buff

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_quick_change_add_rule.gif)

### Keybinding

GearMenu allows to keybind to every slot with a keybinding. Instead of having a keybind for every item that you have to remember you set it directly on the slot itself.

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_keybinding.gif)

### Drag and drop support

GearMenu allows to drag and drop items onto slots, remove from slots and slots can even be switched in between.

#### Drag and drop between slots

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_drag_and_drop_slots.gif)

#### Drag and drop item to GearMenu

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_drag_and_drop_equip.gif)

#### Unequip item by drag and drop

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_drag_and_drop_unequip.gif)

### Combined Equipping

Slots such as trinket and ring slots have combined equipping enabled. This means that in addition to a left click on the item the player wishes to equip they also support right click. Slots that do not support combined quipping (which most don't) will normally equip any item whether it was left- or right-clicked. If the slot has combined equipping enabled a right click will instead put the chosen item into the opposite slot.

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_combined_equip.gif)

### Unequip Items

Enable an empty slot in the changeMenu that allows for quicker and easier unequipping of items.

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_unequip.gif)

### Macro Support

If you prefer having certain items in your actionslots GearMenu can still be of use. By using the macro-bridge you get all the advantages of the combatQueue in a normal macro.

#### Add Item to CombatQueue

`/run GM_AddToCombatQueue(itemId, slotId)`

**Note:** It is not recommended to use this for weapons because addons cannot switch weapons during combat (GearMenu will put the item into the combatQueue). With a normal weaponswitch macro however this is still possible.

#### Clear Slot From CombatQueue

`/run GM_RemoveFromCombatQueue(slotId)`

##### Finding itemId

Finding the id of a certain item is easiest with websites such as [wowhead](https://classic.wowhead.com/ "").

##### Finding slotId

For finding the correct slotId refer to the image below. Only InventorySlotIds are valid targets for GearMenu

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_interface_slots.png)

## Configurability

GearMenu is configurable. Don't need a certain slot? You can hide it.

To show the configuration screen use `/rggm opt` while ingame and `/rggm info` for an overview of options or check the standard blizzard addon options.

### Hide/Show Cooldowns

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_options_cooldowns.gif)

### Hide/Show Keybindings

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_options_keybindings.gif)

### Lock/Unlock Window

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_options_lock_window.gif)

### Filter Items by Quality

Not interested to see items with a quality level below a certain level? Filter them out and only items that meet your set level will be considered to be displayed in GearMenu.

![](https://raw.githubusercontent.com/RagedUnicorn/wow-classic-gearmenu/master/docs/gm_options_filter_item_quality.gif)

## FAQ

#### The Addon is not showing up in WoW. What can I do?

Make sure to recheck the installation part of this Readme and check that the Addon is placed inside `[WoW-installation-directory]\Interface\AddOns` and is correctly named as `GearMenu`.

#### I get a red error (Lua Error) on my screen. What is this?

This is what we call a Lua error and it usually happens because of an oversight or error by the developer (in this case me). Take a screenshot off the error and create a Github Issue with it and I will see if I can resolve it. It also helps if you can add any additional information of what you we're doing at the time and what other addons you have active. Also if you are able to reproduce the error make sure to check if it still happens if you disable all others addons.

#### GearMenu spams my chat with messages. How can I deactivate this?

Those obnoxious messages are intended for the development of this addon and means that you download a development version of the addon instead of a proper release. Releases can be downloaded from here - https://github.com/RagedUnicorn/wow-classic-gearmenu/releases

#### A certain item is not showing up when I hover a slot. Why is that?

GearMenu filters by default, items that are below common (green) quality. This can be changed in the addon configuration settings in the option "Filter Item Quality".

#### GearMenu failed to switch my item. What happened?

There are certain limitations that make it harder to switch an item even if the player is out of combat. One such example is that WoW prevents switching items while the player is casting a spell. GearMenu detects this and changes the item as soon as there is a pause between two spells or if a spell was cancelled. Just keep this in mind if you absolutely need the item switch to happen as soon as possible. Another factor can be a loss of control effect such as sap, iceblock and similar effects. In such circumstances it is not possible to switch an item. GearMenu is aware of such effects on the player and will switch the item as soon as possible.

If you still think you found an issue where GearMenu doesn't switch items as expected feel free to create an [issue](https://github.com/RagedUnicorn/wow-classic-gearmenu/issues).

#### Why can't I switch Weapons during Combat?

This is a limitation that Blizzard puts on addons. It is not currently possible to switch to an arbitrary weapon while in combat. It is however possible to create weaponswitch macros because it is already known from which weapon to what weapon the player wants to switch. While it is not ideal, to workaround this issue GearMenu puts weapons in the CombatQueue if a weaponswitch is done while the player is in combat. If he is not in combat the switch will happen immediately. This might be improved in a future release if there is a better workaround possible.

**Note:** It is also possible to switch a weapon by drag an dropping the weapon in the standard Blizzard interfaces. This however is in no way connected to GearMenu

#### Why can't I create an Itemset?

This addon does not have the intention on supporting the functionality of switching between a PVE and a PVP set (or any other set). Its intention is to assist the player in switching single items fast and possibly during combat. It does not try to be the next Outfitter addon.


text:
---
title: What should administrators do if there is a case of COVID-19 in our facility?
category: retirement-communities
layout: post
date: March 20, 2020
source: CDC
promoted: false
source_url: https://www.cdc.gov/coronavirus/2019-ncov/community/retirement/faq.html
excerpt: Retirement communities
---

Work with local health authorities to communicate the possible exposure to residents, staff, and visitors. Clean and disinfect all shared facilities and high-touch surfaces. Limit visitors to essential staff  and visitors. Staff and, when possible, visitors should be screened for signs and symptoms of COVID-19 before entering the facility. Residents will need to actively monitor their health for COVID-19 symptoms. Cancel group activities. Residences that become ill should be advised to call the medical facility in advance of their visit. [See CDC’s full interim guidance for more details.](https://www.cdc.gov/coronavirus/2019-ncov/community/retirement/guidance-retirement-response.html)

repository: mayonissen/coronavirus-answers

gha_license_id: MIT

repo_name: mayonissen/coronavirus-answers


text:
# Source for [jsillitoe.github.io](http://jsillitoe.github.io).

Based on the [Ember App Kit](http://stefanpenner.github.io/ember-app-kit/).

Ember App Kit aims to be the foundation for ambitious web applications built with Ember.

## License

Ember App Kit, Copyright 2013 by Stefan Penner and Ember App Kit Contributors, and licensed under the MIT License. See included
[LICENSE](LICENSE) file for details.


text:
iptools
=======
Tools for working with IP4/IP6 IP Addresses including IPv4, IPv6, CIDR, and Subnet Masks

![Build Status](https://mindpowered.dev/assets/images/github-badges/build-passing.svg)

Contents
========

* [Source Code and Documentation](#source-code-and-documentation)
* [About](#about)
* [Requirements](#requirements)
* [Installation](#installation)
* [Usage](#usage)
* [Support](#support)
* [Licensing](#licensing)

# Source Code and Documentation
- Source Code: [https://github.com/mindpowered/ip-tools-js](https://github.com/mindpowered/ip-tools-js)
- Documentation: [https://mindpowered.github.io/ip-tools-js](https://mindpowered.github.io/ip-tools-js)

# About
IPv4 uses a 32-bit address for its Internet addresses. All IPv4 addresses are now assigned. IPv6 utilizes 128-bit Internet addresses so there are 1028 times more addresses. Mappings exist for converting from an IPv4 address to an IPv6 addresses. This allows interoperability.

An IP address consists of octets delimited by dots (".") for IPv4 or colons (":") for IPv6. We can compress IPv6 addresses by removing extra zeros to make the address shorter. Computers store IP addresses as their corresponding integer values. The number represented by this integer is its decimal representation.

Subnetting is the process of dividing a network into smaller network sections. A part of the IP address is *masked* off to define a network. The remaining part of the address identifies a device on the network. CIDR is an alternative way of representing a subnet mask and IP address range.

# Requirements
- ES6
- npm

Third-party dependencies may have additional requirements.

# Installation
## npm

You can retrieve the iptools package using npm https://www.npmjs.com/. After initializing your packages.json file in your project’s directory with `npm init`, you can install the iptools package with
```
npm i @mindpowered/iptools --save
```
hint: the `--save` option will add the newly installed dependency in your packages.json file.

## package.json

You can also add the package directly to your packages.json file.

...

# Usage
```javascript

let mpcipt = require('@mindpowered/iptools');
const {IPTools} = mpcipt;

let ipt = new IPTools();
let decimal = ipt.IPToDecimal("<IP_ADDRESS>");

```

# Support
We are here to support using this package. If it doesn't do what you're looking for, isn't working, or you just need help, please [Contact us][contact].

There is also a public [Issue Tracker][bugs] available for this package.

# Licensing
This package is released under the MIT License.

[bugs]: https://github.com/mindpowered/ip-tools-js/issues
[contact]: https://mindpowered.dev/support/?ref=ip-tools-js/
[docs]: https://mindpowered.github.io/ip-tools-js/
[licensing]: https://mindpowered.dev/?ref=ip-tools-js
[purchase]: https://mindpowered.dev/purchase/

repository: mindpowered/ip-tools-js

repo_name: mindpowered/ip-tools-js


text:
# development-container

[![GitHub Action](https://img.shields.io/github/workflow/status/raviqqe/development-container/main?style=flat-square)](https://github.com/raviqqe/development-container/actions)
[![License](https://img.shields.io/github/license/raviqqe/development-container.svg?style=flat-square)](LICENSE)

Development container

- [Docker Hub](https://hub.docker.com/repository/docker/raviqqe/development)

## License

[MIT](LICENSE)

repository: raviqqe/development-container

gha_language: Dockerfile

repo_name: raviqqe/development-container


text:
+++
title = "Rules"
weight = 7
+++

The Simple IoT application has the ability to run rules. That are composed of
one or more conditions and actions. All conditions must be true for the rule to
be active.

Rules are defined by nodes and are composed of additional child nodes for
conditions and actions. See the node/point [schema](../data/rule.go) for more
details.

Node point changes cause rules of any parent node in the tree to be run. This
allows general rules to be written higher in the tree that are common for all
device nodes (for instance device offline).

All points should be sent out periodically, even if values are not changing to
indicate a node is still alive and eliminate the need to periodically run rules.
Even things like system state should be sent out to trigger device/node offline
notifications.

If a rule has not received points that meet the condition qualifications in 30m,
it is considered offline and marked as such in the UI. This helps us detect
stale rules, or rules that do not have working conditions.

## Conditions

Each condition may optionally specify a minimum active duration before the
condition is considered met. This allows timing to be encoded in the rules.

### Node state

A node state condition looks at the point value of a node to determine if a
condition is met. Qualifiers that filter points the condition is interested in
may be set including:

- node ID (if left blank, any node that is a descendent of the rule parent)
- point ID
- point type ("value" is probably the most common type)
- point index

If the provided qualification is met, then the condition may check the point
value/text fields for a number of conditions including:

- number: >, <, =, !=
- text: =, !=, contains
- boolean: on, off

## Actions

Every action has an optional repeat interval. This allows rate limiting of
actions like notifications.

### Notifications

Notifications are the simplest rule action and are sent out when:

- all conditions are met
- time since last notification is greater than the notify action repeat
  interval.

Every time a notification is sent out by a rule, a point is created/updated in
the rule with the following fields:

- id: node of point that triggered the rule
- type: "lastNotificationSent"
- time: time the notification was sent

Before sending a notification we scan the points of the rule looking for when
the last notification was sent to decide if its time to send it.

A rule notitifcation action has an optional Template field that can be used to
populate a Go template that can be used customize the notification to include
arbitrary points from source node points.

The below is an example of template:

```
Sentry Alert. {{.Description}} was ARMED with target flow rate of {{printf "%.1f" (index .Ios "flowRateTarget")}} and with tank level of {{printf "%.1f" (index .Ios "currentTankVolume")}}.
```

### Set node point

Rules can also set points in other nodes. For simplicity, the node ID must be
currently specified along with point parameters and a number/bool/text value.

Typically a rule action is only used to set one value. In the case of on/off
actions, one rule is used to turn a value on, and another rule is used to turn
the same value off. This allows for hysteresis and more complex logic than in
one rule handled both the on and off states. This also allows the rules logic to
be stateful.

repository: nathannaveen/simpleiot

repo_name: nathannaveen/simpleiot


text:
!SLIDE
# The goals #

!SLIDE bullets incremental
* To do meaningful work to make a difference.  I don’t care how!
* To do some awesome problem solving using technology.
* Work with a team of people who enjoy each other.
* Work the flexible hours I want and the amount I want.

!SLIDE
# The solution? #

!SLIDE
# Rails Freelance!! #

!SLIDE

# Rails gave me all these things #

!SLIDE
# The result? #

!SLIDE
.notes Someone came up to me and noticed how much energy I had

# Life is so much better #

!SLIDE
![gaming](gaming.jpg)

!SLIDE
.notes But the point I'm trying to make is not about Rails.  It's about
getting you to figure out the core issues that may be seperating you
from that happines.

!SLIDE
# Seriously though...#
.notes This is not a presentation about Freelance or Rails

* Don't be afraid of asking hard questions about life.
* Write down what you want.
* Write down some ways to achieve some of those things.

!SLIDE center
    Jevin Maltais (@jevy)
    Ottawa, Canada

![quickjack](quickjack.png)

repository: jevy/Presentations

repo_name: jevy/Presentations


text:
# Rust_survival_tricks
Welcome to my Compendium of practical Rust, very util to study practical Rust programming.

<img align="right" width="240" height="220" src="https://rustacean.net/assets/cuddlyferris.png">

#### Data structure examples:
https://github.com/CoolerVoid/Rust_survival_tricks/tree/master/Data_Structure

#### Database examples:
https://github.com/CoolerVoid/Rust_survival_tricks/tree/master/database/Diesel_ORM/UserManagerCrud

#### File system examples:
https://github.com/CoolerVoid/Rust_survival_tricks/tree/master/file_system

#### Web service examples:
https://github.com/CoolerVoid/Rust_survival_tricks/tree/master/web_service/questbook_example

#### Strings and casting examples:
https://github.com/CoolerVoid/Rust_survival_tricks/tree/master/strings

gha_language: Rust


text:
---
published: true
layout: post
title: Turn Off the iOS Simulator 'Accept Incoming Network Connections' Pop-up
date: 2018-04-09 01:23
author: tom
comments: true
tags: [Xamarin.Forms, iOS, Simulator]
---
Deploying to the iOS simulators is great - so fast and convenient.
What's __not__ convenient and gets pretty downright annoying is being forced to click "Allow" on this pop-up __EVERY SINGLE TIME__ I do it.
<img src="{{site.baseurl}}/images/DisableiOSSimulatorPopup/iOSSimulatorPopup.png" style="width: 600px;"/>
*gah! yes, for the love, just allow them already and stop asking me*

Thankfully, you can use this handy little bash script to help silence this pop-up and deploy without interruption to the simulator. Sometimes, it's the little things that make a big difference. I think once you stop clicking this button on every deploy, you'll wonder how you ever got along without this little script.

## So What Does This Script Do, Exactly?

Yes, before downloading a bash script from the internet and running it on your personal machine, you should probably know what it's doing. Fear not, everything is on the up and up here.

Your Mac has a firewall. A firewall that doesn't remember that you've clicked "Allow" a thousand times.
What it doesn't realize is that incoming connections to the Simulator are probably not malicious. In fact, you probably __always__ want to allow those connections because you're writing an app that is designed to make connections with the outside world.

Thankfully this firewall allows you to make exceptions for certain apps, but even though the pop-up says you can change this setting on the Firewall pane, I wasn't able to do it; hence this script.

We need to make an exception for two apps: the Simulator and Xcode. In order to do that, we need to turn the firewall off for a moment to add these exceptions, and the last statement in the file turns it back on and gives a confirmation. As you can imagine, turning the firewall off/on requires super user access (that's what the sudo command is for) so terminal will prompt you for you system password.

Here's the script:
<script src="https://gist.github.com/TomSoderling/9b3d582c4c895dde4ed1eac3f987b764.js"></script>

## How to Use This Script

1. Copy the script above and save it to a new file with a .sh extension
2. You'll need to change the permissions on the file so you can execute the script, otherwise you'll get a "Permission denied" message if you try. You'll only need to do this once. In terminal, run the command:
```
chmod u+x [the path to your new script file.sh]
```
This grants you the user (u) execution permission (x) on this script file.
3. Then just drag the file into terminal and hit enter to run it. You'll be prompted to enter your system password for sudo access.

 Hope this saves you a little time and clicks. Don't forget to share this script with you fellow mobile developers!


text:
# Tephromela grumosa (Pers.) Hafellner & Cl. Roux SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Bull. Soc. bot. Centre-Ouest, Nouv. sér. , num. spec. 7: 829 (1985)

#### Original name
Lichen grumosus Pers.

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# github Redis [README.md](https://github.com/redis/redis#readme)

## Allocator

This default was picked because jemalloc has proven to have fewer fragmentation problems than libc malloc.

## Monotonic clock

By default, Redis will build using the POSIX `clock_gettime` function as the monotonic clock source. On most modern systems, the **internal processor clock** can be used to improve performance. Cautions can be found here: http://oliveryang.net/2015/09/pitfalls-of-TSC-usage/

## [Redis internals](https://github.com/antirez/redis)

### Source code layout

There are a few more directories but they are not very important for our goals here. We'll focus mostly on `src`, where the Redis implementation is contained, exploring what there is inside each file. The order in which files are exposed is the logical one to follow in order to disclose（公开） different layers of complexity incrementally.

> NOTE:  文件被公开的顺序是遵循的逻辑顺序，以便逐步地公开不同的复杂层。

### `server.h`

The simplest way to understand how a program works is to understand the **data structures** it uses. So we'll start from the main header file of Redis, which is `server.h`.

> NOTE:
>
> 上面这段话中所提及的观点是非常重要的，现在想想，对于linux OS，在我知道了其kernel中使用process control block来管理描述进程后，很多相关的概念理解起来就非常轻松了；

All the server configuration and in general all the shared state is defined in a global structure called `server`, of type `struct redisServer`. A few important fields in this structure are:

1、`server.db` is an array of Redis databases, where data is stored.

2、`server.commands` is the **command table**.

3、`server.clients` is a linked list of clients connected to the server.

4、`server.master` is a special client, the master, if the instance is a replica.

There are tons of other fields. Most fields are commented directly inside the structure definition.

Another important Redis data structure is the one defining a client. In the past it was called `redisClient`, now just `client`. The structure has many fields, here we'll just show the main ones:

```c
struct client {
    int fd;
    sds querybuf;
    int argc;
    robj **argv;
    redisDb *db;
    int flags;
    list *reply;
    char buf[PROTO_REPLY_CHUNK_BYTES];
    ... many other fields ...
}
```

The client structure defines a *connected client*:

1、The `fd` field is the **client socket file descriptor**.

2、`argc` and `argv` are populated with the command the client is executing, so that functions implementing a given **Redis command** can read the arguments.

3、`querybuf` accumulates the requests from the **client**, which are parsed by the Redis server according to the **Redis protocol** and executed by calling the implementations of the commands the client is executing.

> NOTE:
>
> 一、根据 `querybuf` 解析得到 `argc` and `argv`

4、`reply` and `buf` are dynamic and static buffers that accumulate the replies the server sends to the client. These buffers are incrementally written to the socket as soon as the **file descriptor** is writable.

> NOTE:
>
> 一、reply
>
> 1、`sds querybuf` 是 dynamic buffer
>
> 2、`char buf[PROTO_REPLY_CHUNK_BYTES]` 是 static buffer

As you can see in the **client structure** above, arguments in a command are described as `robj` structures. The following is the full `robj` structure, which defines a *Redis object*:

```c
typedef struct redisObject {
    unsigned type:4;
    unsigned encoding:4;
    unsigned lru:LRU_BITS; /* lru time (relative to server.lruclock) */
    int refcount;
    void *ptr;
} robj;
```

Basically this structure can represent all the basic Redis data types like strings, lists, sets, sorted sets and so forth. The interesting thing is that it has a `type` field, so that it is possible to know what type a given object has, and a `refcount`, so that the same object can be referenced in multiple places without allocating it multiple times. Finally the `ptr` field points to the actual representation of the object, which might vary even for the same type, depending on the `encoding` used.

> NOTE:
>
> 它是类似`std::variant`。

**Redis objects** are used extensively in the Redis internals, however in order to avoid the overhead of indirect accesses, recently in many places we just use plain dynamic strings not wrapped inside a **Redis object**.

### `server.c`

This is the entry point of the **Redis server**, where the `main()` function is defined. The following are the most important steps in order to startup the Redis server.

1、`initServerConfig()` setups the default values of the `server` structure.

2、`initServer()` allocates the data structures needed to operate, setup the **listening socket**, and so forth.

3、`aeMain()` starts the **event loop** which listens for new connections.

There are two special functions called periodically by the event loop:

1、`serverCron()` is called periodically (according to `server.hz` frequency), and performs tasks that must be performed from time to time, like checking for **timedout clients**.

2、`beforeSleep()` is called every time the event loop fired, Redis served a few requests, and is returning back into the event loop.

Inside `server.c` you can find code that handles other vital things of the Redis server:

1、`call()` is used in order to call a given command in the context of a given client.

> NOTE:
>
> command的执行是in the context of a given client，这说明command是和client关联的；

2、`activeExpireCycle()` handles eviciton(驱逐) of keys with a time to live set via the `EXPIRE` command.

3、`freeMemoryIfNeeded()` is called when a new write command should be performed but Redis is out of memory according to the `maxmemory` directive.

4、The global variable `redisCommandTable` defines all the Redis commands, specifying the name of the command, the function implementing the command, the number of arguments required, and other properties of each command.

### `networking.c`

> NOTE :
>
> 新版本的redis中的networking已经没有使用该文件了，而是使用的`anet.c`

This file defines all the I/O functions with clients, masters and replicas (which in Redis are just special clients):

1、`createClient()` allocates and initializes a new client.

2、the `addReply*()` family of functions are used by commands implementations in order to append data to the **client structure**, that will be transmitted to the client as a **reply** for a given command executed.

3、`writeToClient()` transmits the data pending in the **output buffers** to the client and is called by the *writable event handler* `sendReplyToClient()`.

4、`readQueryFromClient()` is the *readable event handler* and accumulates data from read from the client into the query buffer.

5、`processInputBuffer()` is the entry point in order to parse the client query buffer according to the Redis protocol. Once commands are ready to be processed, it calls `processCommand()` which is defined inside `server.c` in order to actually execute the command.

6、`freeClient()` deallocates, disconnects and removes a client.

> NOTE: 显然，这个模块所描述的都是和network相关的实现，它们应该都是由event loop来进行调用；在`server.h`的`struct client`是支持上述操作的data structure；

### `aof.c` and `rdb.c`

As you can guess from the names these files implement the RDB and AOF persistence for Redis. Redis uses a **persistence model** based on the `fork()` system call in order to create a thread with the same (shared) memory content of the **main Redis thread**. This secondary thread dumps the content of the memory on disk. This is used by `rdb.c` to create the snapshots on disk and by `aof.c` in order to perform the AOF rewrite when the append only file gets too big.

The implementation inside `aof.c` has additional functions in order to implement an API that allows commands to append new commands into the AOF file as clients execute them.

The `call()` function defined inside `server.c` is responsible to call the functions that in turn will write the commands into the AOF.

### `db.c`

Certain Redis commands operate on specific data types, others are general. Examples of generic commands are `DEL` and `EXPIRE`. They operate on keys and not on their values specifically. All those generic commands are defined inside `db.c`.

Moreover `db.c` implements an API in order to perform certain operations on the **Redis dataset** without directly accessing the internal data structures.

The most important functions inside `db.c` which are used in many commands implementations are the following:

1、`lookupKeyRead()` and `lookupKeyWrite()` are used in order to get a pointer to the value associated to a given key, or `NULL` if the key does not exist.

2、`dbAdd()` and its higher level counterpart `setKey()` create a new key in a Redis database.

> NOTE:
>
> 上面这段话的意思是: `dbAdd()`、 `setKey()` 两个函数都是用于在 Redis database 中 "create a new key "

3、`dbDelete()` removes a key and its associated value.

4、`emptyDb()` removes an entire single database or all the databases defined.

The rest of the file implements the generic commands exposed to the client.

### `object.c`

The `robj` structure defining **Redis objects** was already described. Inside `object.c` there are all the functions that operate with **Redis objects** at a basic level, like functions to allocate new objects, handle the reference counting and so forth. Notable functions inside this file:

1、`incrRefcount()` and `decrRefCount()` are used in order to increment or decrement an object reference count. When it drops to 0 the object is finally freed.

2、`createObject()` allocates a new object. There are also specialized functions to allocate string objects having a specific content, like `createStringObjectFromLongLong()` and similar functions.

This file also implements the `OBJECT` command.

### `replication.c`

This is one of the most complex files inside Redis, it is recommended to approach it only after getting a bit familiar with the rest of the code base. In this file there is the implementation of both the **master** and **replica** role of Redis.

One of the most important functions inside this file is `replicationFeedSlaves()` that writes commands to the clients representing replica instances connected to our master, so that the replicas can get the writes performed by the clients: this way their data set will remain synchronized with the one in the master.

> NOTE:
>
> 这段话总结得非常好

This file also implements both the `SYNC` and `PSYNC` commands that are used in order to perform the first synchronization between masters and replicas, or to continue the replication after a disconnection.

### Other C files

- `t_hash.c`, `t_list.c`, `t_set.c`, `t_string.c` and `t_zset.c` contains the implementation of the Redis data types. They implement both an API to access a given data type, and the client commands implementations for these data types.
- `ae.c` implements the Redis event loop, it's a self contained library which is simple to read and understand.
- `sds.c` is the Redis string library, check <http://github.com/antirez/sds> for more information.
- `anet.c` is a library to use POSIX networking in a simpler way compared to the raw interface exposed by the kernel.
- `dict.c` is an implementation of a non-blocking hash table which rehashes incrementally.
- `scripting.c` implements Lua scripting. It is completely self contained from the rest of the Redis implementation and is simple enough to understand if you are familar with the Lua API.
- `cluster.c` implements the Redis Cluster. Probably a good read only after being very familiar with the rest of the Redis code base. If you want to read `cluster.c` make sure to read the [Redis Cluster specification](http://redis.io/topics/cluster-spec).

### Anatomy of a Redis command

> NOTE:
>
> 一、"anatomy"的意思是剖析、解剖

All the Redis commands are defined in the following way:

```c
void foobarCommand(client *c) {
    printf("%s",c->argv[1]->ptr); /* Do something with the argument. */
    addReply(c,shared.ok); /* Reply something to the client. */
}
```

The command is then referenced inside `server.c` in the command table:

```c
{"foobar",foobarCommand,2,"rtF",0,NULL,0,0,0,0,0},
```

In the above example `2` is the number of arguments the command takes, while `"rtF"` are the **command flags**, as documented in the **command table** top comment inside `server.c`.

After the command operates in some way, it returns a **reply** to the client, usually using `addReply()` or a similar function defined inside `networking.c`.

There are tons of commands implementations inside the Redis source code that can serve as examples of actual commands implementations. To write a few toy commands can be a good exercise to familiarize with the code base.

There are also many other files not described here, but it is useless to cover everything. We want to just help you with the first steps. Eventually you'll find your way inside the Redis code base :-)

Enjoy!

repository: dengking/decompose-redis

repo_name: dengking/decompose-redis


text:
---
title: Component Based Norm
keywords: norm, component, statistics
tags: [component_based.md]
sidebar: statistics_application
summary:
---
Component based norms are available only for `Array 3D` type variables. `component_x` represents the `x` component of 3D variable, `component_y` represents `y` component, `component_z` represents the `z` component.

repository: KratosMultiphysics/Kratos

gha_license_id: NOASSERTION

repo_name: KratosMultiphysics/Kratos


text:
# script-runner

What?
-----

A simple SQL script runner.

This is currently very rough and ready and was hacked up in about an hour.

Create a script runner component, add an event listener (use the default or provide your own), then execute the script.
That's it.

Improvements will likely come, over time...

Why?
----

I needed something quick to execute SQL scripts in an automated way, with decent nicely formatted output and error
reporting.

Credits
-------

The original `ScriptRunner` implementation came from the MyBatis project, licensed under Apache Software License 2.0.

repository: caprica/script-runner

repo_name: caprica/script-runner


text:
# Receive and Send Messages Using Waku Relay

Waku Relay is a gossip protocol that enables you to send and receive messages.
You can find Waku Relay's specifications on [Vac RFC](https://rfc.vac.dev/spec/11/).

Before starting, you need to choose a _Content Topic_ for your dApp.
Check out the [how to choose a content topic guide](choose-content-topic.md) to learn more about content topics.

For this guide, we are using a single content topic: `/relay-guide/1/chat/proto`.

# Installation

You can install [js-waku](https://npmjs.com/package/js-waku) using your favorite package manager:

```shell
npm install js-waku
```

# Create Waku Instance

In order to interact with the Waku network, you first need a Waku instance:

```js
import { Waku } from 'js-waku';

const wakuNode = await Waku.create({ bootstrap: true });
```

Passing the `bootstrap` option will connect your node to predefined Waku nodes.
If you want to bootstrap to your own nodes, you can pass an array of multiaddresses instead:

```js
import { Waku } from 'js-waku';

const wakuNode = await Waku.create({
  bootstrap: [
    '/dns4/node-01.ac-cn-hongkong-c.wakuv2.test.statusim.net/tcp/443/wss/p2p/16Uiu2HAkvWiyFsgRhuJEb9JfjYxEkoHLgnUQmr1N5mKWnYjxYRVm',
    '/dns4/node-01.do-ams3.wakuv2.test.statusim.net/tcp/443/wss/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ'
  ]
});
```

# Wait to be connected

When using the `bootstrap` option, it may take some time to connect to other peers.
To ensure that you have relay peers available to send and receive messages,
use the following function:

```js
await waku.waitForConnectedPeer();
```

The returned Promise will resolve once you are connected to a Waku Relay peer.

# Receive messages

To watch messages for your app, you need to register an observer on relay for your app's content topic:

```js
const processIncomingMessage = (wakuMessage) => {
  console.log(`Message Received: ${wakuMessage.payloadAsUtf8}`);
};

waku.relay.addObserver(processIncomingMessage, ['/relay-guide/1/chat/proto']);
```

# Send Messages

You are now ready to send messages.
Let's start by sending simple strings as messages.

To send a message, you need to wrap the message in a `WakuMessage`.
When using a basic string payload, you can use the `WakuMessage.fromUtf8String` helper:

```js
import { WakuMessage } from 'js-waku';

const wakuMessage = await WakuMessage.fromUtf8String('Here is a message', `/relay-guide/1/chat/proto`);
```

Then, use the `relay` module to send the message to our peers,
the message will then be relayed to the rest of the network thanks to Waku Relay:

```js
await waku.relay.send(wakuMessage);
```

# Use Protobuf

Sending strings as messages in unlikely to cover your dApps needs.

Waku v2 protocols use [protobuf](https://developers.google.com/protocol-buffers/) [by default](https://rfc.vac.dev/spec/10/).

Let's review how you can use protobuf to include structured objects in Waku Messages.

First, define a data structure.
For this guide, we will use a simple chat message that contains a timestamp and text:

```js
{
  timestamp: Date;
  text: string;
}
```

To encode and decode protobuf payloads, you can use the [protons](https://www.npmjs.com/package/protons) package.

## Install Protobuf Library

First, install protons:

```shell
npm install protons
```

## Protobuf Definition

Then define the simple chat message:

```js
import protons from 'protons';

const proto = protons(`
message SimpleChatMessage {
  uint64 timestamp = 1;
  string text = 2;
}
`);
```

You can learn about protobuf message definitions here:
[Protocol Buffers Language Guide](https://developers.google.com/protocol-buffers/docs/proto).

## Encode Messages

Instead of wrapping an utf-8 string in a Waku Message,
you are going to wrap a protobuf payload.

First, encode the object:

```js
const payload = proto.SimpleChatMessage.encode({
  timestamp: Date.now(),
  text: 'Here is a message'
});
```

Then, wrap it in a Waku Message:

```js
const wakuMessage = await WakuMessage.fromBytes(payload, ContentTopic);
```

Now, you can send the message over Waku Relay the same way than before:

```js
await waku.relay.send(wakuMessage);
```

## Decode Messages

To decode the messages received over Waku Relay,
you need to extract the protobuf payload and decode it using `protons`.

```js
const processIncomingMessage = (wakuMessage) => {
  // No need to attempt to decode a message if the payload is absent
  if (!wakuMessage.payload) return;

  const { timestamp, text } = proto.SimpleChatMessage.decode(
    wakuMessage.payload
  );

  console.log(`Message Received: ${text}, sent at ${timestamp.toString()}`);
};
```

Like before, add this callback as an observer to Waku Relay:

```js
waku.relay.addObserver(processIncomingMessage, ['/relay-guide/1/chat/proto']);
```

# Conclusion

That is it! Now, you know how to send and receive messages over Waku using the Waku Relay protocol.

Feel free to check out other [guides](menu.md) or [examples](/examples/examples.md).

Here is the final code:

```js
import { getBootstrapNodes, Waku, WakuMessage } from 'js-waku';
import protons from 'protons';

const proto = protons(`
message SimpleChatMessage {
  uint64 timestamp = 1;
  string text = 2;
}
`);

const wakuNode = await Waku.create();

const nodes = await getBootstrapNodes();
await Promise.all(nodes.map((addr) => waku.dial(addr)));

const processIncomingMessage = (wakuMessage) => {
  // No need to attempt to decode a message if the payload is absent
  if (!wakuMessage.payload) return;

  const { timestamp, text } = proto.SimpleChatMessage.decode(
    wakuMessage.payload
  );

  console.log(`Message Received: ${text}, sent at ${timestamp.toString()}`);
};

waku.relay.addObserver(processIncomingMessage, ['/relay-guide/1/chat/proto']);

const payload = proto.SimpleChatMessage.encode({
  timestamp: Date.now(),
  text: 'Here is a message'
});
const wakuMessage = await WakuMessage.fromBytes(payload, ContentTopic);
await waku.relay.send(wakuMessage);
```


text:
# micro-bmark

Benchmark your node.js projects with nanosecond resolution.

- Utilizes node.js `process.hrtime` for 1ns resolution
- Colorful formatting with nice units
- No dependencies, only ~150 lines of code: as lightweight as possible to not interfere with benchmarked code
- No code for estimating running time - specify samples manually
- Shows relative margin of error, min/max runs **only if it's high**

![](https://user-images.githubusercontent.com/574696/184465244-b5784438-6af8-4a3d-abaa-03a0057768e6.png)

## Usage

    npm install --save-dev micro-bmark

```js
import * as bench from 'micro-bmark';
await bench.mark('printing', () => Promise.resolve(0));

const { mark, compare, run } = bench; // Or, use as such
run(async () => {
  await mark('base', () => Promise.resolve(1));
  await mark('sqrt', 10000, () => Math.sqrt(2));
  await compare('math', 5000, {
    lib1: () => Math.sqrt(2),
    lib2: () => Math.sqrt(3)
  });
  // bench.utils.logMem(); // Log current RAM
  // console.log(bench.utils.getTime(), bench.utils.formatD(bench.utils.getTime())); // Get current time in nanoseconds
});
```

Example output:

```
getPublicKey() x 6,072 ops/sec @ 164μs/op ± 8.22% (min: 143μs, max: 17ms)
sign x 4,980 ops/sec @ 200μs/op
signSync x 4,671 ops/sec @ 214μs/op
verify x 969 ops/sec @ 1ms/op
recoverPublicKey x 890 ops/sec @ 1ms/op
getSharedSecret aka ecdh x 585 ops/sec @ 1ms/op
```

- `await bench.run(args?, callback)`: Runs bunch of suites. Not required
- `await bench.mark(label?, samples?, callback)`: Measures callback (can be async) `samples` times
- `await bench.compare(label, samples, map)`: mark, but compares runs between object values
    - `map`: `{ a: () => {}, b: () => {} }`
- `bench.utils.logMem(): undefined`: Logs memory usage
- `bench.utils.getTime(): bigint`: Returns current time in bigint.

## License

MIT License

Copyright (c) 2020 Paul Miller (https://paulmillr.com), (c) 2010-2016 Mathias Bynens, John-David Dalton, (c) Robert Kieffer from JSLitmus.js

repository: paulmillr/micro-bmark

gha_language: JavaScript

repo_name: paulmillr/micro-bmark


text:
# Yildiz-Engine module-graphic-ogre.

This is the official repository of the Ogre3D Module, part of the Yildiz-Engine project.
The ogre module is an implementation of the graphic-module, based on Ogre3D library.

## Features

* OpenGL rendering.
* Mesh with animation.
* Billboard.
* Animated textures.
* GLSL support.
* ...

## Requirements

To build this module, you will need the latest java JDK, Mingw64, and Maven 3.

## Coding Style and other information

Project website:
https://engine.yildiz-games.be

Issue tracker:
https://yildiz.atlassian.net

Wiki:
https://yildiz.atlassian.net/wiki

Quality report:
https://sonarqube.com/overview?id=be.yildiz-games:module-graphic-ogre

## License

All source code files are licensed under the permissive MIT license
(http://opensource.org/licenses/MIT) unless marked differently in a particular folder/file.

## Build instructions

Go to your root directory, where you POM file is located.

Then invoke maven

for windows:

	mvn clean install -Pnative -Denv=win32

for linux:

	mvn clean install -Pnative -Denv=linux64

This will compile the source code, then run the unit tests, and finally build a jar file and DLL/SO for the environment you chose.

## Usage

In your maven project, add the dependency

for windows:

```xml
<dependency>
    <groupId>be.yildiz-games</groupId>
    <artifactId>module-graphic-ogre</artifactId>
    <version>1.1.5</version>
	<classifier>win32</classifier>
</dependency>
```

for linux:

```xml
<dependency>
    <groupId>be.yildiz-games</groupId>
    <artifactId>module-graphic-ogre</artifactId>
    <version>1.1.5</version>
	<classifier>linux64</classifier>
</dependency>
```
## Contact
Owner of this repository: Grégory Van den Borre

repository: yildiz-online/module-graphic-ogre

branch_name: refs/heads/develop

repo_name: yildiz-online/module-graphic-ogre


text:
---
layout: default
---

# 1995-07-18 - SurfWatch for employees (ugh)

## Header Data

From: Greg Broiles<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: ab25516f42fa3822b5b81ce5a4d25518b762d4f3e72256461b9d07fe3027f3df

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1995-07-18 07:17:26 UTC

Raw Date: Tue, 18 Jul 95 00:17:26 PDT

## Raw message

```
{% raw  %}From: Greg Broiles<EMAIL_ADDRESS>Date: Tue, 18 Jul 95 00:17:26 PDT
To<EMAIL_ADDRESS>Subject: SurfWatch for employees (ugh)
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text

-----BEGIN PGP SIGNED MESSAGE-----

Consistent with the trend towards treating employees like children,
Webster Network Strategies has announced (but apparently has not
shipped) a product similar to SurfWatch but aimed at an employment
environment. The product is called "WebTrack" and supposedly supports
access lists of URLs, where access can be allowed to "all but these sites"
or "only to these sites". The product also can be configured to log all
Web usage by users subjected to its reign of terror. :) WebTrack
is priced at $7,500 with an annual subscription to its list of
interesting (err, forbidden) sites priced at $1,500. The article in the
7/10/95 Infoworld doesn't list contact information for Webster
Network Strategies.

What is it, two months between deployment of software designed to restrict
net access to one segment of the population perceived as especially
vulnerable and the subsequent application of that technology to other
target groups? My bet is the next target group will be university
students, followed by "affinity marketing" with various repressive
organizations (whose names I elide in the interests of greater
Cypherpunk harmony, pick your own and imagine them here.)

Of course, the next step is to use restrictive licensing/distribution
terms (a la Netscape/Mozilla) and a nifty freeware/software package
available only from a site which also carries porn (or other forbidden
fruit) to make the customers/purveyors of this crap twist in the wind
a bit. Break the terms of the license and get the software somewhere
else? Avoid using the coolest new thing because you're hooked up via
we'll-think-for-you.net? Doh.

(Pedants need not point out that personal choice (and personal filtering)
are always appropriate, and indeed empowering. Neither WebTrack nor
NetSurf are marketed to help people subject themselves to a regime
of repression - they are intended and sold to allow the purchaser to
control what others (perceived as having fewer or no rights) will read
and view. ". . inasmuch as you have done it unto one of the least of
these my brethren, ye have done it unto me." Matthew 25:45)

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMAtWUn3YhjZY3fMNAQH8EAP/aFXe7uI1EuIB31L8h7H+5l3Mg1aQE7e9
i86FnqwGMDg5JlDvJD05dXOBXeInvKtc6ZD0Us+qwDmg2ISo/Yu0QCfedTBgZ7fq
s/3WFwtOcpiBG7YTkxGJrvB+r4KIgodb9QSGEQ8yofKaRLT33IkgO3ijxrnyoNkX
vm/tZ8EnoV0=
=hrOo
-----END PGP SIGNATURE-----

{% endraw %}
```

## Thread

+ Return to [July 1995](/archive/1995/07)

+ Return to "[Greg Broiles <greg@ideath.goldenbear.com>](/authors/greg_broiles_greg_at_ideath_goldenbear_com_)"
+ Return to "["Harry S. Hawk" <habs@warwick.com>](/authors/harry_s_hawk_habs_at_warwick_com_)"
+ Return to<EMAIL_ADDRESS>(Richard Todd)](/authors/rmtodd_at_servalan_servalan_com_richard_todd_)"

+ 1995-07-18 (Tue, 18 Jul 95 00:17:26 PDT) - SurfWatch for employees (ugh) - _Greg Broiles<EMAIL_ADDRESS>  + 1995-07-18 (Tue, 18 Jul 95 06:12:25 PDT) - [Re: SurfWatch for employees (ugh)](/archive/1995/07/c1dc309cb0445c0c62eeaefea76ef7b22d63fbee4346e9f39ec48c00b7103bb9) - _"Harry S. Hawk"<EMAIL_ADDRESS>  + 1995-07-18 (Tue, 18 Jul 95 11:03:53 PDT) - [Re: SurfWatch for employees (ugh)](/archive/1995/07/d475e30700f48d79c6e2b4cdd12b4e45c6b5b01b4482bafb255cb108b185b083) -<EMAIL_ADDRESS>(Richard Todd)_


text:
# SpliTune : Music Spleeter
[![forthebadge made-with-python](https://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)

[![GitHub license](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=for-the-badge)](https://github.com/awesome-arjun11/splitune/blob/master/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge)](http://makeapullrequest.com)
> An attempt at user friendly Desktop App for [deezer's Spleeter](https://github.com/deezer/spleeter). Splitune Allows separating Vocals and instruments. It can split vocals,drums,piano,bass and other accompaniment based on pretrained models.

## Demo Video:

  [![Splitune](https://i.imgur.com/s6mzIfM.png)](https://youtu.be/qyNRQZNBvGk "Splitune UI : click to see demo")

  >https://youtu.be/qyNRQZNBvGk

## Manual setup of models
  1. Download Models from [Spleeter releases](https://github.com/deezer/spleeter/releases).
  2. Extract them in **pretrained_models** directory.

      ```bash
      Splitune
      ├── pretrained_models
      │   ├── 2stems
      │   │   ├── model.data-####-####
      │   │	├── model.meta
      │   │   ├──	mode.index
      │   │
      │   ├── 4stems
      │   └── 5stems
      ├── web
      ├── node_modules
      ├── app.py
      ├── main.js
      ├── requirements.txt
      ├── README.md
      ├── package.json
      ├── package-lock.json
      └── .gitignore
      ```

## [Releases](https://github.com/awesome-arjun11/splitune/releases/)
  1. [Alpha - Portable - v0.1](https://github.com/awesome-arjun11/splitune/releases/tag/v0.1-alpha)

## To Do List
 1. Increase download speed.
 2. MonkeyPatch dependencies for PyInstaller issues.
 3. Jinja Templates instead of current Hardcoded HTML.


text:
---
layout: project
type: project
image: images/cpp_final_exam_square.png
title: C++ Final Exam Menu
permalink: projects/Cpp_Final_Exam
date:
labels:
  - C++
  - CodeBlocks
summary:  The Final Exam Menu was the final exam for my C++ class.
---

 The Final Exam Menu was the final exam for my C++ class. It is a compilation of what we learned that semester.

"Excellent work on this part of the final exam. So far you are the only one to get all parts correct." -Professor Terry Ayers

Here is an excerpt from my code,:

void FileProccessing()
{
    ifstream infile;
    int number, totNum=0, numCount=0;
    double avg = 0.0;
    char Again = 'Y';
do
{
    system("CLS");
    infile.open("random.txt");
cout<< endl << endl;
cout<< "Using Files--Numeric Processing" << endl;
cout<< "----------------------------------------" << endl;
    if (infile)
    {
        while (infile >> number)
        {
            cout<<number<<endl;
            totNum += number;
            numCount += 1;
        }
        infile.close();
    }
    else
        cout<<"TXT file opening error.";

    if (numCount >0)
    {
        avg = (1.0*totNum)/numCount;
        cout<< "----------------------------------------" << endl;
        cout<< "The number of numbers: " << numCount << endl;
        cout<< "The sum of all the numbers: " << totNum<< endl;
        cout<< "The avrage of all the numbers: " << avg << endl;
        cout<< "----------------------------------------" << endl;
    }
    cout<<"\nwould you like to run the project again? (Y/N): ";
    cin>>Again;
    Again=toupper(Again);
}while (Again != 'N');

}

Source Files: Michael Richardson/C++ Final Exam Menu


text:
# DDS Exporter Plugin with custom Mipmaps for Substance Designer

When exporting to a direct draw surface (DDS) from Substance Designer, mipmap generation and compression are not supported.

The settings for mipmaps generation in Designer only serve as a marker for third party software integrations of the Substance Engine.
The output compression setting is only used when the substance file is rendered by the Substance Engine in a game engine integration.
It has no influence on the generation of dds files in Designer.

This plugin aims to work around that issue.
It does so by writing out the textures to an intermediate file format and
then uses crunch (modified by [Unity-Technologies](https://github.com/Unity-Technologies/crunch/tree/unity)) to convert to dds. It's therefore a simple GUI wrapper for crunch.
See it in action: https://youtu.be/T8MZ-Wr7OiM

## Installation
Download the latest release from the [release page](https://github.com/OlafHaag/substance-mipmaps-exporter/releases) (expand the *Assets* dropdown and download the *.sdplugin* file.
In Substance Designer's top-bar menu go to *Tools->Plugin Manager...*. In the dialog choose *INSTALL...*. Browse to the file you just downloaded.
If necessary, activate the *LOADED* checkbox. When you open a graph view the new plugin icon appears.

## Planned Features
- Support custom MIP levels. You can set your network up to change the output depending on the graph's resolution (see example folder).
I'd like to stitch the lower resolution outputs as custom MIP levels into a dds file.

It would also be nice to do the compression on the texture data directly instead of first writing files
as an intermediate step before compression. But I don't see that happening any time soon.

## Acknowledgment
crunch/crnlib v1.04 - Advanced DXTn texture compression library Copyright (C) 2010-2017 Richard Geldreich, Jr. and Binomial LLC http://binomial.info

repository: jaxxtrend/substance-mipmaps-exporter

repo_name: jaxxtrend/substance-mipmaps-exporter


text:
# watch

> Execute a command repeatedly, and monitor the output in full-screen mode.

- Monitor files in the current directory:

`watch {{ls}}`

- Monitor disk space and highlight the changes:

`watch -d {{df}}`

- Monitor "node" processes, refreshing every 3 seconds:

`watch -n {{3}} "{{ps aux | grep node}}"`

repository: chrillebile/tldr

repo_name: chrillebile/tldr


text:
# Todoable

Todoable is a gem that allows your app to manage lists and items!

This gem is a very simple wrapper that simplifies calls to the Todoable API by Teachable.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'todoable', git: 'git@github.com:andyywz/todoable.git'
```

And then execute:

    $ bundle

NOTE: As of this README, the gem is not public so you won't be able to install the gem locally via RubyGems.

## Usage

To begin, login to a todoable session by using the following commands.

```ruby
session = Todoable::Session.new(your_username, your_password)

session.authenticate # returns the access token on success
```

When you have successfully logged in, your session token will be stored by the session object.
The session token will expire every 20 minutes. However, do not worry, if your token has expired
when you try to make a request, the session will automatically re-authenticate your user with the
same credentials you provided when you initially logged in.

**Managing Lists**

Here are some of the actions you can take to manage your lists.

```ruby
# returns an array of all the lists belonging to the current user
session.lists

# returns the attributes of the list specified by id
session.get_list(list_id)

# creates a new list, returns the attributes of the created list
session.create_list('list name')

# updates the name of a specific list, returns the updated name
session.update_list_name(list_id, 'new name')

# delete a specific list
session.delete_list(list_id)
```

**Managing Items**

Here are some of the actions you can take to manage your items.

```ruby
# create an item within a specific list, returns the attributes of the created item
session.create_item(list_id, 'item name')

# mark a specific item as complete within a specific list
session.mark_complete(list_id, item_id)

# delete a specific item in a specific list
session.delete_item(list_id, item_id)
```

## Development

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

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

## Contributing

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

## License

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

## Code of Conduct

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

repository: andyywz/todoable

gha_language: Ruby

repo_name: andyywz/todoable


text:
# RxGesture

[![Version](https://img.shields.io/cocoapods/v/RxGesture.svg?style=flat)](http://cocoapods.org/pods/RxGesture)
[![License](https://img.shields.io/cocoapods/l/RxGesture.svg?style=flat)](http://cocoapods.org/pods/RxGesture)
[![Platform](https://img.shields.io/cocoapods/p/RxGesture.svg?style=flat)](http://cocoapods.org/pods/RxGesture)

## Usage

![](Pod/Assets/demo.gif)

To run the example project, clone the repo, in the __Example__ folder open `RxGesture.xcworkspace`.

You _might_ need to run `pod install` from the Example directory first.

---

__RxGesture__ allows you to easily turn any view into a tappable or swipeable control like so:

```swift
view.rx.tapGesture().when(.recognized).subscribe(onNext: {_ in
   //react to taps
}).addDisposableTo(stepBag)
```

You can also react to more than one  gesture. For example to dismiss a photo preview you might want to do that when the user taps it, or swipes up or down:

```swift
view.rx.anyGesture(.tap(), .swipe([.up, .down])).when(.recognized).subscribe(onNext: {_ in
   //dismiss presented photo
}).addDisposableTo(stepBag)
```

`rx.gesture` is defined as `Observable<G>` where `G` is the actual type of the gesture recognizer so what it emits is the gesture recognizer itself (handy if want to call methods like `asLocation(in view:)` or `asTranslation(in view:)`)

#### On iOS, RxGesture supports:

```swift
view.rx.tapGesture()           -> ControlEvent<UITapGestureRecognizer>
view.rx.pinchGesture()         -> ControlEvent<UIPinchGestureRecognizer>
view.rx.swipeGesture(.left)    -> ControlEvent<UISwipeGestureRecognizer>
view.rx.panGesture()           -> ControlEvent<UIPanGestureRecognizer>
view.rx.longPressGesture()     -> ControlEvent<UILongPressGestureRecognizer>
view.rx.rotationGesture()      -> ControlEvent<UIRotationGestureRecognizer>
view.rx.screenEdgePanGesture() -> ControlEvent<UIScreenEdgePanGestureRecognizer>

view.rx.anyGesture(.tap(), ...)           -> ControlEvent<UIGestureRecognizer>
view.rx.anyGesture(.pinch(), ...)         -> ControlEvent<UIGestureRecognizer>
view.rx.anyGesture(.swipe(.left), ...)    -> ControlEvent<UIGestureRecognizer>
view.rx.anyGesture(.pan(), ...)           -> ControlEvent<UIGestureRecognizer>
view.rx.anyGesture(.longPress(), ...)     -> ControlEvent<UIGestureRecognizer>
view.rx.anyGesture(.rotation(), ...)      -> ControlEvent<UIGestureRecognizer>
view.rx.anyGesture(.screenEdgePan(), ...) -> ControlEvent<UIGestureRecognizer>
```

#### On macOS, RxGesture supports:

```swift
view.rx.clickGesture()         -> ControlEvent<NSClickGestureRecognizer>
view.rx.rightClickGesture()    -> ControlEvent<NSClickGestureRecognizer>
view.rx.panGesture()           -> ControlEvent<NSPanGestureRecognizer>
view.rx.pressGesture()         -> ControlEvent<NSPressGestureRecognizer>
view.rx.rotationGesture()      -> ControlEvent<NSRotationGestureRecognizer>
view.rx.magnificationGesture() -> ControlEvent<NSMagnificationGestureRecognizer>

view.rx.anyGesture(.click(), ...)         -> ControlEvent<NSGestureRecognizer>
view.rx.anyGesture(.rightClick(), ...)    -> ControlEvent<NSGestureRecognizer>
view.rx.anyGesture(.pan(), ...)           -> ControlEvent<NSGestureRecognizer>
view.rx.anyGesture(.press(), ...)         -> ControlEvent<NSGestureRecognizer>
view.rx.anyGesture(.rotation(), ...)      -> ControlEvent<NSGestureRecognizer>
view.rx.anyGesture(.magnification(), ...) -> ControlEvent<NSGestureRecognizer>
```

ℹ If you use a gesture recognizer alone, prefer the `view.rx.fooGesture()` syntax over `view.rx.anyGesture(.foo())` because it returns the concrete `UIGestureRecognizer` subclass and avoid you to cast it in `subscribe()`.

## Filtering State

By default, there is no filter on the state of the gesture recognizer. That means that you will always receive a first event with the initial state of the gesture recognizer (almost always `.possible`).

Here are the preferred states that can be used for each kind of gestures (__iOS__ and __macOS__):

Kind | States
---|---
`.tap()`, `.click()`, `.rightClick()`, `.swipe()`| `.recognized`
`.longPress()`, `.press()`, | `.began`
`.pan()`, `.pinch()`, `.rotation()`, `.magnification()`, `.screenEdgePan()` | `.began`, `.changed`, `.ended`

You usually filter the state using the `.when()` operator:
```swift
view.rx.tapGesture().when(.recognized)
view.rx.panGesture().when(.began, .changed, .ended)
```

If you are observing multiple gestures at once, you can use the `.when()` operator if you want to filter against the same state for __all__ gesture recognizers, or use the tuple syntax for individual filtering:

```swift
view.rx
	.anyGesture(.tap(), .swipe([.up, .down]))
	.when(.recognized)
	.subscribe(onNext: { gesture in
		// Called whenever a tap, a swipe-up or a swipe-down is recognized (state == .recognized)
	})
	.addDisposableTo(bag)

view.rx
	.anyGesture(
		(.tap(), when: .recognized),
		(.pan(), when: .ended)
	)
	.subscribe(onNext: { gesture in
		// Called whenever:
		// - a tap is recognized (state == .recognized)
		// - or a pan is ended (state == .ended)
	})
	.addDisposableTo(bag)
```

__The demo app includes examples for all recognizers ➡ [iOS](Example/RxGesture/ViewController.swift), [macOS](Example/RxGesture-OSX/ViewController.swift)__.

## Requirements

This library depends on both __RxSwift__ and __RxCocoa__.

## Installation

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

```swift
pod "RxGesture"
```

## TODO

- [ ] add tests
- [ ] make pr to RxCocoa to add native support for rx.event to `NSGestureRecognizer` and remove the implementation from this repo

## Thanks

Everyone in the RxSwift Slack channel 💯

## License

RxGesture is available under the MIT license. See the LICENSE file for more info.

gha_language: Swift


text:
# Knocker

I wanted to use knock servers but wasn't sure how to remember all the knock patterns, plus I pretty much always want to run specific commands straight after knocking.

I also love `.ssh/config` files (if you don't use one, you are missing out!), so simple yet so powerful.

## Installation

Add this line to your application's Gemfile:

    gem 'knocker'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install knocker

## Requirements

* a server with a configured knock daemon (such as [knockd](http://www.zeroflux.org/projects/knock))
* the included port-knock client (`knock`)

## Usage

Define knock patterns in your config file (at `~/.config/knocker`) by using `nkr -e` and then run them using `nkr pattern-name`.  Your pattern defines the host, the knock sequence and any commands to run after knocking.

Running `nkr` with a pattern name sends the knock sequence to the host then runs the specified commands.  This allows one to easily knock on a host to open an SSH port and then run the command to SSH into the host.

With a knock daemon configured on `host.example.com` to open port 22 (SSH) when it hears knocks on UDP ports 3333, 2424 and 22388, one could configure a pattern as such:

```
pattern hiddenssh
  h host.example.com
  u 3333
  u 2424
  u 22388
  ssh robert@$host
```

So that running `nkr hiddenssh` knocks and opens the SSH port, then connects to SSH.  Then the knock daemon can close the port behind you.

### Configuration Syntax

Like an SSH config file is powerful for connecting to SSH daemons:

```
# SSH config file
Host myvps # simply type ssh myvps at command prompt
  Hostname vps.example.com
  User robert
  Port 22022
  DynamicForward 50000
  LocalForward 3000:localhost:3000
  ForwardX11 yes
```

I want knocker to be powerful for connecting to knock daemons:

The config file stores knock patterns which include:

* hostname
* knock specs
* commands to run after knocking

```
# Knocker config file
# keep this secret, knock patterns are almost like passwords
pattern pvtchatops # simply type nkr pvtchatops at command prompt
  host myvps.example.com
  u 5445
  t 4456
  t 63854
  c xchat --url=irc://$host:36777/chatops
```

So when you run `nkr pvtchatops` it actually runs two commands:

* The knock client command: `knock myvps.example.com 5445:udp 4456:tcp 63854:tcp`
* The post command: `xchat --url=irc://myvps.example.com:36777/chatops`

Easy!

### The rules

As you saw, the config syntax is simple.

* use pattern and a name to name the pattern
* h and then the hostname/ip to connect to
* t and the port number for a tcp knock (multiples allowed)
* u and the port number for a udp knock (multiples allowed)
* c and the command to run after knocking (multiples allowed)
* on command lines use $host to use host defined for the pattern

**Mix this with SSH config files and you will an unstoppable sysadmin!**

**KEEP THE CONFIG FILE SECRET!!!**

## Contributing

1. Fork it ( http://github.com/penguinpowernz/knocker/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

repository: penguinpowernz/knocker

repo_name: penguinpowernz/knocker