text:
# fridge-tracker
 CS3200 Final Project by Stanley Liu and Miles Barker

# Installation Instructions

## Software Used
- React.js
- Python
- MySQLWorkbench

## Libraries Used
- bootstrap
- react-router-dom
- flask
- flask-cors
- flask-json
- flask-mysqldb

# Mac Instructions
1. Install Python 3 (https://www.python.org/downloads/) if not already installed (must be added to PATH)
2. Install packages by running the following commands from /fridge-tracker/backend:
    * pip install flask
    * pip install flask-cors
    * pip install flask-json
    * pip install flask-mysqldb
3. Add user to MySQLWorkbench with all privileges/permissions
    * Username: root
    * Password: root
4. Add the following lines to your bash profile file
    * export PATH=$PATH:/usr/local/mysql/bin
    * export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/mysql/lib
    * Save and close the file, then run "source ~/.bash_profile" in the terminal
5. Execute provided /fridge-tracker/backend/fridge-tracker.sql dump file in localhost (my MySQLWorkbench port is 3306 but the port shouldn't matter)
6. Install latest recommended version of node.js (https://nodejs.org/en/)
7. In /fridge-tracker/backend, run "python fridge-tracker.py" from the command line to start the backend server on port 5000
8. In /fridge-tracker/frontend, run "npm install" from the command line to install packages
9. In /fridge-tracker/frontend, run "npm start" from the command line to start the frontend on port 3000
10. Navigate to "localhost:3000/[page-name] to access the following pages:
    * "localhost:3000/login" - The Log In page for fridge-tracker, you can log in using any valid User in the database.
    * "localhost:3000/signup" - The Sign Up page for fridge-tracker, you can register a new User to the database using this page.
    * "localhost:3000/home/[username]" - The main application page for any valid fridge-tracker User.

# Windows Instructions
1. Install Python 3 (https://www.python.org/downloads/) if not already installed (must be added to PATH)
2. Install packages by running the following commands from /fridge-tracker/backend:
    * pip install flask
    * pip install flask-cors
    * pip install flask-json
    * pip install flask-mysqldb
3. Add user to MySQLWorkbench with all privileges/permissions
    * Username: root
    * Password: root
4. Execute provided /fridge-tracker/backend/fridge-tracker.sql dump file in localhost (my MySQLWorkbench port is 3306 but the port shouldn't matter)
5. Install latest recommended version of node.js (https://nodejs.org/en/)
6. In /fridge-tracker/backend, run "python fridge-tracker.py" from the command line to start the backend server on port 5000
7. In /fridge-tracker/frontend, run "npm install" from the command line to install packages
8. In /fridge-tracker/frontend, run "npm start" from the command line to start the frontend on port 3000
9. Navigate to "localhost:3000/[page-name] to access the following pages:
    * "localhost:3000/login" - The Log In page for fridge-tracker, you can log in using any valid User in the database.
    * "localhost:3000/signup" - The Sign Up page for fridge-tracker, you can register a new User to the database using this page.
    * "localhost:3000/home/[username]" - The main application page for any valid fridge-tracker User.

repository: liustanley/fridge-tracker

repo_name: liustanley/fridge-tracker


text:
FinnKuusistoCV
--------------

This is my curriculum vitae repo.  If you're looking for information about me,
you might try: http://cs.wisc.edu/~finn

This CV is built on: https://github.com/deedydas/Deedy-Resume

License
-------
I'm not putting a license on my CV, but the license for Deedy-Resume can be
found in the included LICENSE file.

repository: finnkuusisto/FinnKuusistoCV

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: finnkuusisto/FinnKuusistoCV


text:
###Meanbase 1.0.0

Since a good CMS for the MEAN stack was not available I decided to begin building one myself. The CMS itself will be free as my way of thanking the open source web community for making all kinds awesome libraries for free. Thank you guys! Here's me giving back.

From the start it uses yeoman generator-angular-fullstack with authentication and authorization templates.
[https://github.com/DaftMonk/generator-angular-fullstack](https://github.com/DaftMonk/generator-angular-fullstack)

Here is a link to a demo of the old version. A new demo will be available once I
reach a couple more checkpoints. [Youtube Meanbase Demo](http://youtu.be/tteztXru4eA)

####Install
Run
- mongod
- Install GraphicsMagick (If you have homebrew: brew install graphicsmagick)
- npm install
- bower install
- grunt serve

####Meanbase has two main goals:
- To be self-explanitory and effecient for users
- To be fun and customizable for developers.

####Code Design Strategy
- Upon server startup and client-request-theme-change, the server reads the index.html file in server/views/ and adds the active theme's styles and scripts to it as well as passing in some global data for the cms to use. It then writes this concatination to client/index.html. When scripts and styles are added to the project grunt inserts them into server/views/index.html.
- Whenever a page is requested ui-router makes a call to the server to get the page data and the template path for the correct view to render. This allows pages to each use individual templates that your theme supports.
- cms/* routes are ignored by this template call.

####Contributers
- David Wible

##MIT LICENSE

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

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

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

license: MIT

repository: tclabs/meanbase

repo_name: tclabs/meanbase


text:
Getting and Cleaning Data - Project
===================================

## Background
> ### Human Activity Recognition Using Smartphones Dataset
> #### Version 1.0

> Jorge L. Reyes-Ortiz, Davide Anguita, Alessandro Ghio, Luca Oneto.
> Smartlab - Non Linear Complex Systems Laboratory
> DITEN - Università degli Studi di Genova.
> Via Opera Pia 11A, I-16145, Genoa, Italy.
><EMAIL_ADDRESS>
> The experiments have been carried out with a group of 30 volunteers within an
> age bracket of 19-48 years. Each person performed six activities
> (WALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING)
> wearing a smartphone (Samsung Galaxy S II) on the waist. Using its embedded
> accelerometer and gyroscope, we captured 3-axial linear acceleration and
> 3-axial angular velocity at a constant rate of 50Hz. The experiments have been
> video-recorded to label the data manually. The obtained dataset has been
> randomly partitioned into two sets, where 70% of the volunteers was selected
> for generating the training data and 30% the test data.

> The sensor signals (accelerometer and gyroscope) were pre-processed by
> applying noise filters and then sampled in fixed-width sliding windows
> of 2.56 sec and 50% overlap (128 readings/window). The sensor acceleration
> signal, which has gravitational and body motion components, was separated
> using a Butterworth low-pass filter into body acceleration and gravity.
> The gravitational force is assumed to have only low frequency components,
> therefore a filter with 0.3 Hz cutoff frequency was used.
> From each window, a vector of features was obtained by calculating variables
> from the time and frequency domain.

## Code Book

### Methodology

#### Tidy Data 1

1. Fetch data set archive and extract it
2. Load subjects for the *train* set:
 - Load subjects for the *train* set from file *subject_train.txt*
 - Convert subjects to a factor
3. Load activities for the *train* set:
 - Load activity labels from file *activity_labels.txt*
 - Load activities for the *train* set from file *y_train.txt*
 - Convert activities to a factor using levels and labels from the previously loaded activity labels
4. Load measurements for the *train* set:
 - Load measurements for the *train* set from file *X_train.txt*
 - Load features from file *features.txt*
 - Improve the names of features:
  - replace *()* with *""* (blank)
  - replace *t* at the beginning with *time-*
  - replace *f* at the beginning with *frequency-*
  - replace *Acc* with *Acceleration*
  - replace *Mag* with *Magnitude*
 - Use the features as the column names for the measurements table
 - Filter out everything but the columns that contain either *mean* or *std* but not *meanFreq* in their name
5. Combine subjects, activities and measurements using the *cbind()* function
6. Name the first column of the combined result *Subject* and the second column *Activity*
7. Repeat 2 - 6 for the *test* set
8. Combine the 2 tables produced to one table using the *rbind()* function
9. Write table to disk named *tidy_data_1.txt*

#### Tidy Data 2

1. Use function *tidy_data_1()* that was created to generate the *tidy_data_1.txt* file to obtain the tidy data
2. Convert the data frame to a data table
3. Apply the *mean* function (using *lapply*) to all columns (but the first two) while grouping by **Subject** and **Activity**
4. Write table to disk named *tidy_data_2.txt*

### Variable Definition

| Variable              | Definition                                |
| :-------------------- | :---------------------------------------- |
| Subject               | The id of the subject                     |
| Activity              | The label of the activity (one of WALKING, WALKING_UPSTAIRS, WALKING_DOWNSTAIRS, SITTING, STANDING, LAYING) |
| time-BodyAcceleration-mean-X | value |
| time-BodyAcceleration-mean-Y | value |
| time-BodyAcceleration-mean-Z | value |
| time-BodyAcceleration-std-X | value |
| time-BodyAcceleration-std-Y | value |
| time-BodyAcceleration-std-Z | value |
| time-GravityAcceleration-mean-X | value |
| time-GravityAcceleration-mean-Y | value |
| time-GravityAcceleration-mean-Z | value |
| time-GravityAcceleration-std-X | value |
| time-GravityAcceleration-std-Y | value |
| time-GravityAcceleration-std-Z | value |
| time-BodyAccelerationJerk-mean-X | value |
| time-BodyAccelerationJerk-mean-Y | value |
| time-BodyAccelerationJerk-mean-Z | value |
| time-BodyAccelerationJerk-std-X | value |
| time-BodyAccelerationJerk-std-Y | value |
| time-BodyAccelerationJerk-std-Z | value |
| time-BodyGyro-mean-X | value |
| time-BodyGyro-mean-Y | value |
| time-BodyGyro-mean-Z | value |
| time-BodyGyro-std-X | value |
| time-BodyGyro-std-Y | value |
| time-BodyGyro-std-Z | value |
| time-BodyGyroJerk-mean-X | value |
| time-BodyGyroJerk-mean-Y | value |
| time-BodyGyroJerk-mean-Z | value |
| time-BodyGyroJerk-std-X | value |
| time-BodyGyroJerk-std-Y | value |
| time-BodyGyroJerk-std-Z | value |
| time-BodyAccelerationMagnitude-mean | value |
| time-BodyAccelerationMagnitude-std | value |
| time-GravityAccelerationMagnitude-mean | value |
| time-GravityAccelerationMagnitude-std | value |
| time-BodyAccelerationJerkMagnitude-mean | value |
| time-BodyAccelerationJerkMagnitude-std | value |
| time-BodyGyroMagnitude-mean | value |
| time-BodyGyroMagnitude-std | value |
| time-BodyGyroJerkMagnitude-mean | value |
| time-BodyGyroJerkMagnitude-std | value |
| frequency-BodyAcceleration-mean-X | value |
| frequency-BodyAcceleration-mean-Y | value |
| frequency-BodyAcceleration-mean-Z | value |
| frequency-BodyAcceleration-std-X | value |
| frequency-BodyAcceleration-std-Y | value |
| frequency-BodyAcceleration-std-Z | value |
| frequency-BodyAccelerationJerk-mean-X | value |
| frequency-BodyAccelerationJerk-mean-Y | value |
| frequency-BodyAccelerationJerk-mean-Z | value |
| frequency-BodyAccelerationJerk-std-X | value |
| frequency-BodyAccelerationJerk-std-Y | value |
| frequency-BodyAccelerationJerk-std-Z | value |
| frequency-BodyGyro-mean-X | value |
| frequency-BodyGyro-mean-Y | value |
| frequency-BodyGyro-mean-Z | value |
| frequency-BodyGyro-std-X | value |
| frequency-BodyGyro-std-Y | value |
| frequency-BodyGyro-std-Z | value |
| frequency-BodyAccelerationMagnitude-mean | value |
| frequency-BodyAccelerationMagnitude-std | value |
| frequency-BodyBodyAccelerationJerkMagnitude-mean | value |
| frequency-BodyBodyAccelerationJerkMagnitude-std | value |
| frequency-BodyBodyGyroMagnitude-mean | value |
| frequency-BodyBodyGyroMagnitude-std | value |
| frequency-BodyBodyGyroJerkMagnitude-mean | value |
| frequency-BodyBodyGyroJerkMagnitude-std|


text:
# MultiTrackTween

`MultiTrackTween` is an `Animatable` that can tween multiple properties at once.

## Use cases

Typical scenarios for using `MultiTrackTween` are

- staggered animations by combining multiple tweens
- multiple properties (i.e. color and width) are animated simultaneously

The idea behind `MultiTrackTween` is to pass multiple (so called) "Tracks"
into the constructor of `MultiTrackTween`. Each `Track` represents one
property to animate.

## Import

Use the following import to use `MultiTrackTween`:
```dart
import 'package:simple_animations/simple_animations.dart';
```

## Single track tween

Each `Track` has a **name** and consists of one or multiple **sequence parts**:

- First create a Track via by passing the **name** in the constructor:
    ```dart
    final track = Track("width");
    ```
- Then use `add` to append a **sequence part**:
    ```dart
    track.add(Duration(milliseconds: 500), Tween(begin: 0.0, end: 100.0));
    ```
    Specify the `Duration` as first parameter, and an `Animatable` as the
    second parameter. *Optionally you can pass in a `curve` (named parameter)
    to apply easing to your tween.*

    > **Hint**
    >
    > The `add` method returns the `Track`, so you can use like a builder:
    >
    > ```dart
    > Track("width")
    >    .add(...)
    >    .add(...)
    >    .add(...);
    > ```

- Pass the `Track` into `MultiTrackTween`:
    ```dart
    final tween = MultiTrackTween(track);
    ```

- When using the tween it will return a `Map` where the **track name**
corresponds the the **map key**.
    ```dart
    final widthStart = tween.transform(0.0)["width"];
    final widthMiddle = tween.transform(0.5)["width"];
    final widthEnd = tween.transform(1.0)["width"];
    ```

#### Example

```dart
final tween = MultiTrackTween([
  Track("width")
      .add(Duration(milliseconds: 500), ConstantTween(0.0))
      .add(Duration(milliseconds: 1000), Tween(begin: 0.0, end: 100.0))
      .add(Duration(milliseconds: 700), Tween(begin: 100.0, end: 200.0),
          curve: Curves.easeOut)
]);
```
This tween will compute `{"width": 0.0}` for the first **25%**, then smoothly
interpolates `width` from `0` to `100` for the next **50%**, and from `100`
to `200` with an `easeOut` effect for the last **25%**.

You can read more about handling the "real designed duration" below in
the **Using duration** section.

## Multiple tracks

Advancing from using **one track** to **multiple tracks** is really simple:

- Just specify multiple `Track` with unique names:
    ```dart
    final tween = MultiTrackTween([
      Track("width").add(...).add(...).add(...),
      Track("height").add(...).add(...).add(...),
      Track("color").add(...).add(...).add(...),
      Track("radius").add(...).add(...).add(...),
    ]);
    ```

- When animating that tween you receive a `Map` with the **track names**:
    ```dart
    final middleOfAnimation = tween.transform(0.5);
    final width = middleOfAnimation["width"];
    final height = middleOfAnimation["height"];
    final color = middleOfAnimation["color"];
    final radius = middleOfAnimation["radius"];
    ```

- When tracks have unequal durations, the shorter tracks will stretch
it's last value to the end of the tween (see example below).

#### Example

```dart
final tween = MultiTrackTween([
  Track("width")
    .add(Duration(seconds: 2), Tween(begin: 0.0, end: 100.0)),
  Track("color")
    .add(Duration(seconds: 1), ColorTween(begin: Colors.red, end: Colors.green))
]);
```
This tween will smoothly interpolate `width` from `0` to `100` for the
whole animation and `color` from `red` to `green` for the first 50%
of the animation. For the last 50% the `color` will remain `green`.

## Using durations

`MultiTrackTween` is an `Animatable` that operates around an abstract
time interval around zero and one.

Sometimes it's helpful to work with the "designed duration" of the tracks.
That's why `MultiTrackTween` offers an additional *getter* `duration` to
retrieve the `Duration` of the longest track.

#### Example

```dart
final tween = MultiTrackTween(...);
final duration = tween.duration;
```

## Use with ControlledAnimation

Simply create a `MultiTrackTween` and save it into a variable. Later you can
pass it to the `tween` property and also use it to set the `duration`.

#### Example

```dart
final tween = MultiTrackTween([
  Track("width")
      .add(Duration(milliseconds: 500), Tween(begin: 0.0, end: 100.0))
      .add(Duration(milliseconds: 1500), Tween(begin: 100.0, end: 200.0)),
  Track("color")
      .add(Duration(milliseconds: 800), ConstantTween(Colors.green))
      .add(Duration(milliseconds: 500),
          ColorTween(begin: Colors.green, end: Colors.yellow))
]);

return ControlledAnimation(
  duration: tween.duration,
  tween: tween,
  builder: (context, animation) {
    return Container(
      width: animation["width"],
      height: 100,
      color: animation["color"],
    );
  },
);
```

> **Hint**
>
> You can easily scale the animation speed by multiplying the duration with a factor:
>
> ```dart
> duration: tween.duration * 1.25; // slow down by 25%
> ```

gha_license_id: MIT


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

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

## [1.0.0] - 2018-01-18
##Added
- lab2 complete

## [0.0.7] - 2018-01-18
##Added
- added blue background  for image

###Changed
- centered image within div

###Removed
- removed clickable link from picture in actor.php

## [0.0.6] - 2018-01-18
###Added
- added character role unique page

## [0.0.5] - 2018-01-18
###Added
- added character role tooltip for mousing over picture

### Changed
- changed homer simpson pic name from "homer-simpson" to "homer simpson"

## [0.0.4] - 2018-01-18
### Changed
- added homer simpson to pix
- added a quote to quotes.php

## [0.0.3] - 2018-01-18
### Changed
- fixed the order of changelog from newest to oldest(top down)
- changed the start version to 0.0.1 from 1.0.0

## [0.0.2] - 2018-01-18
### Changed
- updated format of changelog

## [0.0.1] - 2018-01-18
### Added
- New visual identity by Matthew and JC.
- changelog document

branch_name: refs/heads/develop

gha_language: PHP


text:
---
title: GetSystemVariable
module: GemRB
---

**Prototype:** GemRB.GetSystemVariable (Index)

**Description:** Returns the named Interface attribute.

**Parameters:**
  * Index could have the following values:
    * SV_BPP = 0 - bpp (color resolution)
    * SV_WIDTH = 1 - screen width
    * SV_HEIGHT = 2 - screen height
    * SV_GAMEPATH = 3 - game path
    * SV_TOUCH = 4 - are we using touch input mode?
    * SV_SAVEPATH = 5 - path to the parent of save/mpsave/bpsave dir

**Return value:** This function returns -1 if the index is invalid.

**See also:** [GetGameString](GetGameString.md)

gha_language: HTML


text:
# Security Policy

## Supported Versions

| Version | Supported          |
| ------- | ------------------ |
| 8.0.8  | :white_check_mark: |

## User Data

Users are solely responsible for the content of all User Data. Users will secure and maintain all rights in User Data necessary for Mopidy to provide the Online Services to them without violating the rights of any third party or otherwise obligating Mopidy to them or to any third party. Mopidy does not and will not assume any obligations with respect to User Data or to their use of the product other than as expressly set forth in the Agreement or as required by applicable law.

repository: serenacrook/mopidy

gha_language: Python

repo_name: serenacrook/mopidy


text:
# Access Token Server

The access token gets google oauth access tokens using a service account. The returned access token can then be used to access google apis.

## Setup for running locally

1. Clone this repo.
2. Run `yarn install`
3. [Create a Google oauth2 service account](https://developers.google.com/identity/protocols/oauth2/service-account)
4. Grant access to the required api (Google console API & Services Library page for the project created or updated in step 1)
5. Create a .env file and add contents as shown below.
6. Encode the json generated when the service account was created by running `yarn encode-credentials`. The script expects the json created in step 1 to be in a file called service_account.json in this directory. It prints a base64 encoded string to the console. Copy this string to the .env file.
7. Start up the server
8. Run tests `yarn test`. Note that yarn test will create a status.json if one does not exist. If a status.json file exists, it will be left alone.

## Environment variables

The server will read an update environment variables from a .env file in this directory. The format the of .env file is as follows

### Required

```
SERVER_PORT=
LOOKERSDK_BASE_URL=
LOOKERSDK_VERIFY_SSL=
GOOGLE_APPLICATION_CREDENTIAL_ENCODED=
```

### Optional - only for running tests

```
LOOKER_CLIENT_ID=
LOOKER_CLIENT_SECRET=
```

### Explanation

- SERVER_PORT is the port the access token server will listen on.
- LOOKERSDK_BASE_URL is the Looker server to validate credentials against
- LOOKERSDK_VERIFY_SSL true to validate the SSL certificate. Set to false if using a test certificate.
- LOOKER_CLIENT_ID Looker server API3 client id (Looker user admin page). Only used for tests.
- LOOKER_CLIENT_SECRET Looker server API3 client secret (Looker user admin page). Only used for tests.
- GOOGLE_APPLICATION_CREDENTIAL_ENCODED base64 encoded string containing service account json file (see above for how to generate).

## Using in a Looker extension

1. The client id and client secret should be added as user attributes for the extension. See the [kitchen sink readme](https://github.com/looker-open-source/extension-template-kitchensink/blob/master/README.md) for details.
2. Use the extension sdk serverProxy api to get the access token. The credentials should be embedded in the request body using secret key tags. See the [kitchen sink readme](https://github.com/looker-open-source/extension-template-kitchensink/blob/master/README.md) for details. Note the access token and an expiry date is returned. Note that the expiry date is 5 minutes less than the expiry date actually returned by google. Any use of the access token should take this into account. Before using the access token, check if it has and request a new one. If it has expired, a new token is guaranteed to be returned.
3. The extension SDK fetch api maybe used with the access token. It does not need to use the extension SDK server proxy to all the Google APIs. Note that the token can be used in the following ways:
   - Query string parameter - `https://www.googleapis.com/drive/v2/files?access_token=access_token`
   - Request header - `Authorization: Bearer access_token`
4. Ensure this servers endpoint is defined as an entitlement for the extension.

## Docker container instructions

1. Build the image locally: ./docker-build.sh
2. Start a container from the image in #1 and tail the logs: ./docker-run.sh
3. Stop the container: ./docker-stop.sh (not enough to just Ctrl-c from #2)

Assumptions:

1. prod running docker container will listen on 8081
2. devops deployment will add the status.json file
3. devops deployemnt will not have a .env file - env will come from AWS secret manager

## Endpoint details

```
    const requestBody = {
      client_id: extensionSDK.createSecretKeyTag('my_client_id'),
      client_secret: extensionSDK.createSecretKeyTag('my_client_secret'),
      scope: 'https://www.googleapis.com/auth/spreadsheets',
    },
    try {
      const response = await extensionSDK.serverProxy(
        `${ACCESS_SERVER_URL}/access_token`,
        {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
          },
          body: JSON.stringify(requestBody),
        }
      )
      const { access_token, expiry_date } = response.body
      . . .
    } catch (error) {
      console.error(error)
      // Error handling
      . . .
    }
```

The access token can then be used to call the Google API endpoint (use of the extension SDK fetch API method is recommended).

branch_name: refs/heads/main


text:
# find-files-recur

A simple search utility that can be fine-tuned and which will recursively search for files in a folder and provide detailled data about the results.

```js
const findFiles = require('find-files-recur')

// const { findFiles } from 'find-files-recur'  // Typescript

const result = findFiles('./the/root/path/src', {
  extensions: ['js'],
  detailedResults: true,
})
```

Result with `detailedResults` omitted or set to `false`

```
['src/folder1/folder11/test.js']
```

Result with `detailedResults` set to `true`

```
[
  {
    depth: 4,
    extension: 'js',
    fullExtension: 'test.js',
    name: 'test.js',
    nameWithoutExtension: 'test',
    path: 'src/folder1/folder11/test.js',
  },
]
```

## Options

- extensions - _Array_
  File extensions to look for - ie: `['js','md']`
  If not defined, all files are selected
  Default: _undefined_

- detailedResults - _Boolean_
  Whether the function returns only the path of found files, or detailed data (see type below)
  Default: `false`
  ```ts
  export type FileDetails = {
    path: string
    name: string
    nameWithoutExtension: string
    extension: string
    fullExtension: string
    depth: number
  }
  ```
- filter - _Function_
  Callback executed for every file selected, that tells the crawler whether to select it or not in the final result.
  As this function is executed during search, it offers a benefit, memory-wise, to the alternative of getting all results, and then filtering them.
  Receive the file's detailed data as its only parameter.

  ```js
  // i.e: Select of index files
  const results = findFiles('some/path', {
    extensions: ['js', 'ts'],
    filter: ({ nameWithoutExtension }) => nameWithoutExtension === 'index',
  })
  ```

- maxDepth - _Number_
  Maximum depth for search, relative to the starting point
  Default: _undefined_

- maxSearchedFiles - _Number_
  The search will automatically stop if this number is reached
  Default: `5000`

- ignoredFolderNames - _Array_
  Which folders to ignore, when encountered in the recursive search.
  Default: `[ 'node_modules', 'bower_components', '.git', 'public', 'dist', ]`

## Notes

- 🐥 Really small footprint. This library doesn't add any external dependency to your project
- The search is synchronous

repository: matthizou/find-files

repo_name: matthizou/find-files


text:
---
title: "Contract To Contract"
date: 2017-09-21T13:30:00-06:00
---

Contract to contract communication is an essential part of any fleet on the blockchain. As discussed in the contract lineage section, a complex project on Ethereum should be built using a collection of smaller microservices to keep complexity at bay.

We will also explore a few other features of smart contracts like ownership and events.

Let's analyze a second contract we'll call **Adjuster** which will interface with our **Simple** contract:

The **Adjuster** contract has an **adjustTo()** function that will add to the **Simple** contract's **count** to adjust it to the **_target** value.

There is also the concept of an **owner** address. This is set on contract deployment and when **adjustTo()** is called, we check to make sure the **msg.sender** is the **owner**.

There is also an *event* called **Adjusted** that is fired when the **adjustTo()** function makes a change to the **count**. Events are only visible off-chain but they are very useful for debugging, triggering off-chain actions, and even relatively cheap storage.

We can compile the **Adjuster** with:

```bash
node compile Adjuster
```

We'll also need to throw in a **dependencies.js** to include **Simple.sol**:

We then deploy the **Adjuster** with:

```bash
node deploy Adjuster
```

(Deployment transaction on etherscan.io)

This contract is a little bigger than the last so it was a little more expensive to deploy:

```
==ETHER COST: 0.005155854000000001 $1.8045489000000006
```

**Adjuster** address on Ropsten:
```
0x34dcf6e1fb7dc453f514a5c4760595af5e2e2ea9
```

Now let's write a few scripts to interact with this contract. First, we'll want a script called **getOwner.js** to be able to see who the owner is:

```bash
node contract getOwner Adjuster
```

```bash
OWNER:0xA3EEBd575245E0bd51aa46B87b1fFc6A1689965a
```

Looking at our local accounts on the testnet, this is our second account, or index **1**:
```bash
> eth.accounts
["0x4ffd642a057ce33579a3ca638347b402b909f6d6", "0xa3eebd575245e0bd51aa46b87b1ffc6a1689965a"]
```

Another script needed is **adjustTo.js**. This allows us to adjust the **Simple** contract's **count** to a specific number using only the **add()** function as long as we are the owner of the **Adjuster** contract.

Let's go back to the **Simple** contract function from the previous section to get the current count:

```bash
node contract getCount Simple
```

```bash
COUNT:0
```

Now let's adjust it to **128** using the **Simple** contract's address using account index **1** which is the owner of the **Adjuster**:

```bash
node contract adjustTo Adjuster null 0xD68eF7611913d0AfF3627a92F5e502696887D626 128 1
```

(View transaction on etherscan.io)

Now if we get a count we'll see:

```bash
COUNT:128
```

Let's write a quick script to read events off-chain:

If we run that now, we should see all contract interaction so far:

```bash
{
  address: '0x34DCF6E1fB7DC453F514a5C4760595af5e2E2Ea9',
  transactionHash: '0xcdc8bb4b1fe7267bf4ded620c7501befb749301b7c42a4b1cb3cb5738dad4c13',
  returnValues:
   Result {
     '0': '0xD68eF7611913d0AfF3627a92F5e502696887D626',
     '1': '128',
     '2': '128',
     _contractAddress: '0xD68eF7611913d0AfF3627a92F5e502696887D626',
     _target: '128',
     _amount: '128' },
  event: 'Adjusted',
  signature: '0xafa2c40f4442ec5731ad257412e46d0e88b0d8f8398f575db15a4c9192d19e29'
}
```

We can see that if the original count was **0** and the **_target** is **128** then the **_amount** needed to get to the target is **128**.

It's always good to test every condition exhaustively and try to hit your contract with anything and everything, because a good hacker will do the same. Obviously, security doesn't really matter with this contract because the **Simple** contract is already completely open for manipulation, but it helps illustrate simple methods of testing. For production level contracts, along with open sourcing and extensive audits, we will need to have a full suite of tests.

For now, let's just make sure it overflows correctly when we **add()** past 255.

```bash
node contract adjustTo Adjuster null 0xD68eF7611913d0AfF3627a92F5e502696887D626 16 1
```

(View transaction on etherscan.io)

```bash
COUNT:16
```

Let's also make sure we can't run the **adjustTo()** function using a non-owner account. We'll use account index **0** instead of **1** to simulate a foreign account trying to run the **adjustTo()** function:

```bash
node contract adjustTo Adjuster null 0xD68eF7611913d0AfF3627a92F5e502696887D626 32 0
```

(View transaction with 'Fail' as 'TxReceipt Status' on etherscan.io)

The count remains:
```bash
COUNT:16
```

One last thing to mention about contract to contract communication is that when one contract accesses a function of another contract, the **msg.sender** on the accessed contract is that of the accessing contract, not the account triggering the interaction. This means we can code in security where only a particular contract can have permission to run certain functions on another contract. This will be important later.

*Note: Along those same lines, DELEGATECALL is an opcode that "propagates the sender and value from the parent scope to the child scope".*


text:
# Processor Registers

There are ten 32-bit and six 16-bit processor registers in IA-32 architecture. The registers are grouped into three

### Categories:

* General registers
* Control registers
* Segment registers

The general registers are further divided into the following groups:

* Data registers
* Pointer registers
* Index registers

32-bit register                                                   16-bit register
       31                             16 15            8 7              0

| 32bit|               16bit            |      8bit     |      8bit     |
|:----:|:------------------------------:|:-------------:|:-------------:|
|  EAX |                                |       AH      |       AL      | AX accumulator register
|  EBX |                                |       BH      |       BL      | BX base register
|  ECX |                                |       CH      |       CL      | CX count register
|  EDX |                                |       DH      |       DL      | DX data register

## Data Registers

1. As complete 32-bit data registers: EAX, EBX, ECX, EDX.
2. Lower halves of the 32-bit registers can be used as four 16-bit data registers: AX, BX, CX and DX.
3. Lower and higher halves of the above-mentioned four 16-bit registers can be used as eight 8-bit data
registers: AH, AL, BH, BL, CH, CL, DH, and DL.

* AX is the primary accumulator; it is used in input/output and most arithmetic instructions. For example, in
multiplication operation, one operand is stored in EAX, or AX or AL register according to the size of the operand.
* BX is known as the base register as it could be used in indexed addressing.
* CX is known as the count register as the ECX, CX registers store the loop count in iterative operations.
* DX is known as the data register. It is also used in input/output operations. It is also used with AX register along
with DX for multiply and divide operations involving large values.

## Pointer Registers

The pointer registers are 32-bit EIP, ESP and EBP registers and corresponding 16-bit right portions: IP, SP and
BP. There are three categories of pointer registers:

* Instruction Pointer (IP) - the 16-bit IP register stores the offset address of the next instruction to be
executed. IP in association with the CS register (as CS:IP) gives the complete address of the current
instruction in the code segment.
* Stack Pointer (SP) - the 16-bit SP register provides the offset value within the program stack. SP in
association with the SS register (SS:SP) refers to be current position of data or address within the program stack.
* Base Pointer (BP) - the 16-bit BP register mainly helps in referencing the parameter variables passed to a
subroutine. The address in SS register is combined with the offset in BP to get the location of the parameter.
BP can also be combined with DI and SI as base register for special addressing.

## Index Registers

The 32-bit index registers ESI and EDI and their 16-bit rightmost portions SI and DI are used for indexed
addressing and sometimes used in addition and subtraction. There are two sets of index pointers:

* Source Index (SI) - it is used as source index for string operations
* Destination Index (DI) - it is used as destination index for string operations.

## control register

* Overflow Flag (OF): indicates the overflow of a high-order bit (leftmost bit) of data after a signed arithmetic
operation.
* Direction Flag (DF): determines left or right direction for moving or comparing string data. When the DF
value is 0, the string operation takes left-to-right direction and when the value is set to 1, the string operation
takes right-to-left direction.
* Interrupt Flag (IF): determines whether the external interrupts like, keyboard entry etc. are to be ignored or
processed. It disables the external interrupt when the value is 0 and enables interrupts when set to 1.
* Trap Flag (TF): allows setting the operation of the processor in single-step mode. The DEBUG program we
used sets the trap flag, so we could step through the execution one instruction at a time.
* Sign Flag (SF): shows the sign of the result of an arithmetic operation. This flag is set according to the sign
of a data item following the arithmetic operation. The sign is indicated by the high-order of leftmost bit. A
positive result clears the value of SF to 0 and negative result sets it to 1.
* Zero Flag (ZF): indicates the result of an arithmetic or comparison operation. A nonzero result clears the
zero flag to 0, and a zero result sets it to 1.
* Auxiliary Carry Flag (AF): contains the carry from bit 3 to bit 4 following an arithmetic operation; used for
specialized arithmetic. The AF is set when a 1-byte arithmetic operation causes a carry from bit 3 into bit 4.
* Parity Flag (PF): indicates the total number of 1-bits in the result obtained from an arithmetic operation. An
even number of 1-bits clears the parity flag to 0 and an odd number of 1-bits sets the parity flag to 1.
* Carry Flag (CF): contains the carry of 0 or 1 from a high-order bit (leftmost) after an arithmetic operation. It
also stores the contents of last bit of a shift or rotate operation.

-----

# x86 Registers

The main tools to write programs in x86 assembly are the processor registers. The registers are like variables built in the processor. Using registers instead of memory to store values makes the process faster and cleaner. The problem with the x86 serie of processors is that there are few registers to use. This section describes the main use of each register and ways to use them. That in note that the rules described here are more suggestions than strict rules. Some operations need absolutely some kind of registers but most of the you can use any of the freely.

Here is a list of the available registers on the 386 and higher processors. This list shows the 32 bit registers. Most of the can be broken down to 16 or even 8 bits register.

```
General registers
EAX EBX ECX EDX

Segment registers
CS DS ES FS GS SS

Index and pointers
ESI EDI EBP EIP ESP

Indicator
EFLAGS
```

### General registers

As the title says, general register are the one we use most of the time Most of the instructions perform on these registers. They all can be broken down into 16 and 8 bit registers.

```
32 bits :  EAX EBX ECX EDX
16 bits : AX BX CX DX
 8 bits : AH AL BH BL CH CL DH DL
```

The "H" and "L" suffix on the 8 bit registers stand for high byte and low byte. With this out of the way, let's see their individual main use

EAX,AX,AH,AL : Called the Accumulator register.
               It is used for I/O port access, arithmetic, interrupt calls,
               etc...

EBX,BX,BH,BL : Called the Base register
               It is used as a base pointer for memory access
               Gets some interrupt return values

ECX,CX,CH,CL : Called the Counter register
               It is used as a loop counter and for shifts
               Gets some interrupt values

EDX,DX,DH,DL : Called the Data register
               It is used for I/O port access, arithmetic, some interrupt
               calls.

### Segment registers

Segment registers hold the segment address of various items. They are only available in 16 values. They can only be set by a general register or special instructions. Some of them are critical for the good execution of the program and you might want to consider playing with them when you'll be ready for multi-segment programming

CS         : Holds the Code segment in which your program runs.
             Changing its value might make the computer hang.

DS         : Holds the Data segment that your program accesses.
             Changing its value might give erronous data.

ES,FS,GS   : These are extra segment registers available for
             far pointer addressing like video memory and such.

SS         : Holds the Stack segment your program uses.
             Sometimes has the same value as DS.
             Changing its value can give unpredictable results,
             mostly data related.

### Indexes and pointers

Indexes and pointer and the offset part of and address. They have various uses but each register has a specific function. They some time used with a segment register to point to far address (in a 1Mb range). The register with an "E" prefix can only be used in protected mode.

ES:EDI EDI DI : Destination index register
                Used for string, memory array copying and setting and
                for far pointer addressing with ES

DS:ESI EDI SI : Source index register
                Used for string and memory array copying

SS:EBP EBP BP : Stack Base pointer register
                Holds the base address of the stack

SS:ESP ESP SP : Stack pointer register
                Holds the top address of the stack

CS:EIP EIP IP : Index Pointer
                Holds the offset of the next instruction
                It can only be read

The EFLAGS register

The EFLAGS register hold the state of the processor. It is modified by many intructions and is used for comparing some parameters, conditional loops and conditionnal jumps. Each bit holds the state of specific parameter of the last instruction. Here is a listing :

|Bit|   Label|    Desciption|
|:-----:|:-----:|:------------:|
|0      |CF     | Carry flag|
|2      |PF     | Parity flag|
|4      |AF     | Auxiliary carry flag|
|6      |ZF     | Zero flag|
|7      |SF     | Sign flag|
|8      |TF     | Trap flag|
|9      |IF     | Interrupt enable flag|
|10     |DF     | Direction flag|
|11     |OF     | Overflow flag|
|12-13  |IOPL   | I/O Priviledge level|
|14     |NT     | Nested task flag|
|16     |RF     | Resume flag|
|17     |VM     | Virtual 8086 mode flag|
|18     |AC     | Alignment check flag (486+)|
|19     |VIF    | Virutal interrupt flag|
|20     |VIP    | Virtual interrupt pending flag|
|21     |ID     | ID flag|

Those that are not listed are reserved by Intel.

Undocumented registers

There are registers on the 80386 and higher processors that are not well documented by Intel. These are divided in control registers, debug registers, test registers and protected mode segmentation registers. As far as I know, the control registers, along with the segmentation registers, are used in protected mode programming, all of these registers are available on 80386 and higher processors except the test registers that have been removed on the pentium. Control registers are CR0 to CR4, Debug registers are DR0 to DR7, test registers are TR3 to TR7 and the protected mode segmentation registers are GDTR (Global Descriptor Table Register), IDTR (Interrupt Descriptor Table Register), LDTR (Local DTR), and TR.

## References

http://www.eecg.toronto.edu/~amza/www.mindsec.com/files/x86regs.html

license: Unlicense


text:
---
publishdate: "2020-03-25"
tags:
- kde
- plasma 5.17
- krunner
- workaround
title: Toggle KRunner in Plasma 5.17
---

On my Fedora KDE machine, I use KRunner instead of the Application Menu to launch programs, since it can also do other stuff like executing commands, calculating expressions, etc., which is quite convenient.

Previously on Plasma 5.16, setting Meta key shortcut to `org.kde.kglobalaccel,/component/krunner,,invokeShortcut,run command` in kwinrc is enough to make KRunner toggleable using Meta key. However, this doesn't work anymore in Plasma 5.17. KRunner can now only be opened with Meta key if we set the shortcut to `org.kde.krunner,/App,,display`. Wanna close it? Reach to the Esc key.

I was stuck with this for some days, until this morning I just looked through my bookmark collection with no real purpose and saw the title "KDE 5.17: KRunner or KRunner\_Desktop ?" of [a Reddit post][reddit-post] 5 months ago. And...

The solution is:
- Install xdotool
- Copy the guy's code to make a bash script
{{< highlight bash >}}
#!/bin/bash
krunnerWindow=$(xdotool getwindowfocus getwindowname)
if [[ $krunnerWindow == *"krunner"* ]]; then
    xdotool key 'Escape'
    exit 0
else
    qdbus org.kde.krunner /App display
    exit 0
fi
{{< / highlight >}}
- Create a custom global shortcut:
  - _System Settings_ > _Shortcuts_ > _Custom Shortcuts_ > _Edit_ > _New_ > _Global Shortcut_ > _Command/URL_
  - Point to the bash script in the new shortcut's _Action_ tab
- Open `~/.config/khotkeysrc`, find the UUID of the new shortcut
- Set Meta key shortcut in kwinrc to `org.kde.kglobalaccel,/component/khotkeys,org.kde.kglobalaccel.Component,invokeShortcut,<UUID>` (the UUID includes the curly brackets)

Maybe I should get the newest KDE software instead of going with what Fedora maintainers give me, so that I'm not so far behind online discussions.

[reddit-post]: https://www.reddit.com/r/archlinux/comments/dkfkvj/kde_517_krunner_or_krunner_desktop/

gha_language: SCSS


text:
- **Library name**: AutomaticKeyboardHandler (iOS/Swift).

- **Description**: This library is used to handle keyboard and cursor movement automatically without writing a single line of the code.

  ![Screenshot](https://github.com/srpunni/AutomaticKeyboardHandler/blob/master/Simulator%20Screen%20Shot%20-%20iPhone%207%20Plus%20-%202017-10-06%20at%2017.04.50.png?raw=true)

- **Installation**: You can integrate this library in your project using Cocoa Pods or directly by importing the files.

 1.  Cocoa Pods :  ***pod 'AutomaticKeyboardHandler'***
 2. Direct : Download project from github and copy doneToolbar.xib and KAScrollView.swift in your project.

- **Usage**: It is very simple. You just need to assign KAScrollView class to your ScrollView in storyboard.  If you want to change space between keyboard and current first responder text field then use below code :
  1.  Import AutomaticKeyboardHandler
  2.    kaScrollView.topPadding =  100 (It can be anything from negative to positive values)

- **License**: AutomaticKeyboardHandler is available under the MIT license.

repository: srpunni/AutomaticKeyboardHandler

repo_name: srpunni/AutomaticKeyboardHandler


text:
---
layout: default
---

# 1997-01-07 - Relative Strength of 40-bit Crypto Implementations

## Header Data

From: Vin McLellan<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: e9e573220fba98a552862eb0c3396d922b37e209775ba2403e9f8ec6c5fab160

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-01-07 06:30:26 UTC

Raw Date: Mon, 6 Jan 1997 22:30:26 -0800 (PST)

## Raw message

```
{% raw  %}From: Vin McLellan<EMAIL_ADDRESS>Date: Mon, 6 Jan 1997 22:30:26 -0800 (PST)
To<EMAIL_ADDRESS>Subject: Relative Strength of 40-bit Crypto Implementations
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

	A client asked me today about where he could find evidence of the
relative strength of different encryption algorithms, when all are
restricted to 40-bit keys.  He assumed dot-Gov was going to restrict his
export product to the 40-bit limit, but he wanted to provide the strongest
security he could within that limitation.

	How should I have answered him?

         Vin McLellan + The Privacy Guild +<EMAIL_ADDRESS>      53 Nichols St., Chelsea, MA 02150 USA <617> 884-5548

{% endraw %}
```

## Thread

+ Return to [January 1997](/archive/1997/01)

+ Return to "[Vin McLellan <vin@shore.net>](/authors/vin_mclellan_vin_at_shore_net_)"

+ 1997-01-07 (Mon, 6 Jan 1997 22:30:26 -0800 (PST)) - Relative Strength of 40-bit Crypto Implementations - _Vin McLellan<EMAIL_ADDRESS>


text:
---
lang: en
title: 'Getting started'
keywords: LoopBack 4.0, LoopBack 4
tags:
sidebar: lb4_sidebar
permalink: /doc/en/lb4/Getting-started.html
summary:
---
## Prerequisites: JavaScript

Like other modern JavaScript frameworks (eg. [`Angular 2`](https://angular.io/) and [`React`](https://facebook.github.io/react/)) LoopBack.next has an opinion about what flavor of JavaScript you should be using in your application. Here is the basic recipe.

The starting point of this flavor of JavaScript is [ECMAScript 6](http://www.ecma-international.org/ecma-262/6.0/). It includes some non-standard add-ons:

 - Decorators
 - `async` / `await`
 - ES2015-modules

**All examples and snippets in the documentation use this flavor of JavaScript.**

> the following items are not covered yet:
>  - How to install the command line utility
>  - Using the utility to scaffold the skeleton app
>  - Running the app (node ., npm start)

## A simple example

Here is the most basic LoopBack.next application:

```js
import {Application} from '@loopback/core';

const app = new Application();
app.handler((sequence, request, response) => {
  sequence.send(response, 'hello world');
});

(async function start() {
  await app.start();
  console.log(`The app is running on port ${app.getSync('http.port')}`);
})();
```

The example above creates an `Application` that responds to all HTTP requests with the text "Hello World".

To see what the complete application looks like, see [loopback-next-hello-world](https://github.com/strongloop/loopback-next-hello-world/).

The following guides introduce the fundamental concepts of LoopBack.next required to build scalable, maintainable, and consistent APIs.

If you want to try it out locally follow the instructions in [Installation](Installation.html).  Let's go!

branch_name: refs/heads/gh-pages


text:
# html-to-javascript-vscode
A basic Visual Studio Code plugin that converts html text to javascript string

[See this plugin in the Visual Studio Code marketplace](https://marketplace.visualstudio.com/items?itemName=evileumas.html-to-javascript-string)

You can select your html text and use the shortcut ctrl+h ctrl+J

**There are many things to do**
* Add functionality to validate html code
* Add support to format the resulting string
* Add support to convert javascript strings to html code

[Change log](https://github.com/evileumas/html-to-javascript-vscode/blob/master/CHANGELOG.md)

![converting and html text to javascript string](https://raw.githubusercontent.com/evileumas/html-to-javascript-vscode/master/gif/htmltostring.gif)

repository: leumashz/html-to-javascript-vscode

repo_name: leumashz/html-to-javascript-vscode


text:
# whamda
node module for javascript obfuscation. exploitation of the lambda, arrow functions in ECMA 6.

To use
- download whamda
- include whamda
- call whamda process([list-of-files,seperated-by-comma],'output-directory')

````javascript
var whamda = require('whamda.js');
whamda.process(['file1.js', 'file2.js', 'file3.js', 'file4.js'], 'output');
````

See the [example](../master/example) directory for a working sample and all of my test cases.

##What

Whamda is a node.js module that will replace traditional function references in a file with arrow functions.

````javascript
((obj) => {
    obj.prototype = Function.apply(0).prototype;
    return obj;
})(() => {
    var arguments = [];
    var o = (o, t) => {
        var arguments = [o, t];
        return e = !0, l = o && t, {}
    };
    o.prototype = Function.apply(0).prototype;
    var t = !1,
        n = () => {
            var arguments = [];
            t = !0
        },
        whamz = (n.prototype = Function.apply(0).prototype, n);
    n();
    var e = !1,
        l = !1,
        i = {};
    i.prop1 = i.prop2 = i.prop3 = o("hello", "world");
    var s = i && i.prop1 && i.prop2 && i.prop3 && t && e && l;
    console.log("IIFE style Function with internal Functions of various types", s)
})(this)
````
##How

The strategy is fairly primitive and rather brute force.It involves
- normalizing the input through the use of uglify.js
- evaluating the document as a string through the use of a series of regular expressions to capture functions
- string interpolation and concatentation to replace the contents of the capture with an arrow function equivalent
- write processed file to disk

##Why

There is absolutely no good reason to use whamda other than the novelity of seeing your code in pure arrow function form. Much like
[garble](https://www.github.com/adamyork/garble "garble home"), the result of the whamda process of a source file , is often considerabley larger than the source. This is really because of one main reason, the guaranteed uniqueness of an arrow function. Simply, you cannot call *'new'* on an arrow function.

Because of this, extreme lengths to recursively search the documents to find new invocations of arrow functions, and replace them with yet... MORE ARROW FUNCTIONS.

##When

I continue to sample popular javascript libraries for testing, and by no means is anything here *'production ready'*. I have whamda'd several popular javascript libraries and have included working examples of each in the examples directory. However, there are many that cause issues. Namely the largest of the libraries , angular , jquery , etc. I am not entirely certain the reasons, however creating test cases to work through the bugs has proved too time intensive.

At some point I will publish this to npm, but for now you will need to grab the library from here.

There are a handful of less than optimal functions in whamda, mostly dealing with scope and context matches , that leverage while loops and are recursively called. In very large documents with lots of 'new' function invocations, the computation time is exponential , ever growinggrowing with the size of the file.

If you have any suggestions for improvements , I would love to hear them.

HAVE FUN WHAMDA STYLE !

repository: adamyork/whamda

repo_name: adamyork/whamda


text:
# Event handling

Event handling is how your bot application will interact with the information
sent from Discord over a websocket connection. By defining an event handler for
an event, when something like a message is created or a channel is deleted, your
application can perform an action as a result of that event.

Nostrum uses [Erlang's `:pg` module](https://www.erlang.org/doc/man/pg.html) to
determine which consumers are interested in events, via
`Nostrum.ConsumerGroup`. This allows dynamic subscriptions at runtime, even
across nodes. Events are dispatched to group members as they appear fromthe
Discord Gateway after ingestion into the cache.

To see the documentation on handling events of provided consumers, please see
`Nostrum.Consumer`.

<!-- vim: set textwidth=80 sw=2 ts=2: -->

repository: Kraigie/nostrum

gha_language: Elixir

repo_name: Kraigie/nostrum


text:
# Description
Command line tool for [gowebdav](https://github.com/studio-b12/gowebdav) library.

# Prerequisites
## Software
* **OS**: all, which are supported by `Golang`
* **Golang**: version 1.x
* **Git**: version 2.14.2 at higher (required to install via `go get`)

# Install
```sh
go get -u github.com/studio-b12/gowebdav/cmd/gowebdav
```

# Usage
It is recommended to set following environment variables to improve your experience with this tool:
* `ROOT` is an URL of target WebDAV server (e.g. `https://webdav.mydomain.me/user_root_folder`)
* `USER` is a login to connect to specified server (e.g. `user`)
* `PASSWORD` is a password to connect to specified server (e.g. `p@s$w0rD`)

In following examples we suppose that:
* environment variable `ROOT` is set to `https://webdav.mydomain.me/ufolder`
* environment variable `USER` is set to `user`
* environment variable `PASSWORD` is set `p@s$w0rD`
* folder `/ufolder/temp` exists on the server
* file `/ufolder/temp/file.txt` exists on the server
* file `/ufolder/temp/document.rtf` exists on the server
* file `/tmp/webdav/to_upload.txt` exists on the local machine
* folder `/tmp/webdav/` is used to download files from the server

## Examples

#### Get content of specified folder
```sh
gowebdav -X LS temp
```

#### Get info about file/folder
```sh
gowebdav -X STAT temp
gowebdav -X STAT temp/file.txt
```

#### Create folder on the remote server
```sh
gowebdav -X MKDIR temp2
gowebdav -X MKDIRALL all/folders/which-you-want/to_create
```

#### Download file
```sh
gowebdav -X GET temp/document.rtf /tmp/webdav/document.rtf
```

You may do not specify target local path, in this case file will be downloaded to the current folder with the

#### Upload file
```sh
gowebdav -X PUT temp/uploaded.txt /tmp/webdav/to_upload.txt
```

#### Move file on the remote server
```sh
gowebdav -X MV temp/file.txt temp/moved_file.txt
```

#### Copy file to another location
```sh
gowebdav -X MV temp/file.txt temp/file-copy.txt
```

#### Delete file from the remote server
```sh
gowebdav -X DEL temp/file.txt
```

# Wrapper script

You can create wrapper script for your server (via `$EDITOR ./dav && chmod a+x ./dav`) and add following content to it:
```sh
#!/bin/sh

ROOT="https://my.dav.server/" \
USER="foo" \
PASSWORD="$(pass dav/foo@my.dav.server)" \
gowebdav $@
```

It allows you to use [pass](https://www.passwordstore.org/ "the standard unix password manager") or similar tools to retrieve the password.

## Examples

Using the `dav` wrapper:

```sh
$ ./dav -X LS /

$ echo hi dav! > hello && ./dav -X PUT /hello
$ ./dav -X STAT /hello
$ ./dav -X PUT /hello_dav hello
$ ./dav -X GET /hello_dav
$ ./dav -X GET /hello_dav hello.txt
```

repository: kitech/gowebdav

repo_name: kitech/gowebdav


text:
# Node.js / Express.js Template
This is a template for Node.js and Express, utilizing MongoDB, with testing by Jest and JSDOM.

## Setup
The application is started with `npm start`.

Running the application requires a `.env` file with the following values defined:
```
    TARGET_COLLECTION
    PORT //Will default to 3000 if not defined
    MONGO_URL
    DB_NAME
```

## Testing
Tests are run with `npm test`.

This project demonstrates how tests can be written for the API component, the HTML, the CSS and client side JavaScript.

gha_language: JavaScript


text:
---
layout: post
type: blog
title: Acquiring root images
author: Guillaume Lobet
tags: root image_analysis
image: img/camera_horizontal.png
---

The image acquisition step is a critical one as it will determine the quantity of information contained in the final image. Fortunately, good images can be obtain fairly simply without buying fancy expensive material.

In the next posts I will give simple tips to acquire nice root images with either a CCD camera or a scanner (which are probably the most widely used image acquisition devices as well as the less expensive). But first a small reminder on the image requirements.

Image requirement

In a previous post I presented the main features required to have an image suitable for analysis. In short, the image has to be:

- cleaned of the surrounding soil and dirt;
- without too much root overlapping and crossing;
- of high-resolution;
- highly contrasted (between the roots and the background)
- scaled (number of pixels / cm)

{% include twitter_plug.html %}


text:
---
title: Overview
category: Nexd Modules
order: 1
---

Nexd Modules provide the ability for members of the extended Nexd team to provide functionality to the core product.  We will eventually allow Node Modules to be written in a number of programming languages.  Currently only Node is fully supported and Python supports only signal generation.

Each module contains code, and configuration to control how product, gets and stores raw data from external system, dynamically calculates interesting properties, and signals about the data, and how to display the dynamic information.

The code in the integration portion of a Nexd Module often connects to an external system and sends the content from the external system to Nexd, along with the activity for the content in the form of content events.  Code can also be written to generate complicated signals.

Nexd Module’s also define content types generated by the integration, boards to display the content types along with definition of dynamic properties to be generated for the board, and signals to be generated based on the content, and board’s dynamic context.

Nexd Modules can be developed by anyone on sandbox Nexd team accounts (non-production).  Production team accounts require approved Nexd Modules whose code and configuration is committed to a Nexd controlled GitHub account and will be run and managed by Nexd.


text:
[![CircleCI](https://circleci.com/gh/FKint/playground-admin-app/tree/master.svg?style=svg)](https://circleci.com/gh/FKint/playground-admin-app/tree/master)

# Playground admin web app using Laravel

## Development

### Local development instance

* Copy `.env.example` to `.env` and `.laravel.env.development.example` to `.laravel.env.development`.
* Run `docker-compose -f docker/docker-compose.yml.development --project-name development --project-directory . up --build`
* Open a shell in the container (e.g. `docker exec -it development_app_1 /bin/bash`)
* Run `php artisan migrate:refresh --seed` to build the database tables and fill it with initial data. Run `php artisan migrate` if the database already exists and you only want to update the schema.
* The web application runs on port 21000 (`http://localhost:21000`) of the host OS. PHPMyAdmin runs on port 21001 (`http://localhost:21001`).
* The `vendor` and `node_modules` folders are not synchronized to the host file system. The best way to update these is to rebuild the containers after updating the `composer.json`, `composer.lock`, `package.json` or `yarn.lock` files.
* Updating the PHP packages (`composer.json` and `composer.lock`) is best done using a composer container: ```docker run -it -v "`pwd`/app:/app" composer /bin/sh```. This will also update the `vendor` folder on the host file system. Mount the individual files to speed up the process. Run `composer update`. *Note: check docker/Dockerfile for the exact composer image version.*
* Updating the NPM packages (`package.json` or `yarn.lock`) is best done using a `node:17.3.0-alpine3.14` container: ```docker run -it -v "`pwd`/app:/opt/app" node:17.3.0-alpine3.14 /bin/sh```. This will also update the `node_modules` folder on the host file system. Mount the individual files to speed up the process. Run `yarn upgrade`. *Note: check docker/Dockerfile for the exact node image version.*

### Run tests (local)
* Run `docker-compose -f docker/docker-compose.yml.dusk-testing --project-name dusk-tests --project-directory . up --build` to set up the selenium container and the Laravel server.
* Dusk tests: in a separate terminal, run `docker exec -it dusk-tests_app-container_1 php artisan dusk`
* Unit tests: in a separate terminal, run `docker exec -it dusk-tests_app-container_1 ./vendor/phpunit/phpunit/phpunit`

## Production

### System setup

#### Firewall
* `ufw allow 80` and `ufw allow 443`.
* `ufw allow from <IP_ADDRESS> to <IP_ADDRESS> port 21306 proto tcp`
* `ufw allow from <IP_ADDRESS> to <IP_ADDRESS> port 21001 proto tcp`

#### Certbot
* **TODO: update the docker-compose script**
* Install `certbot`:
    * `add-apt-repository ppa:certbot/certbot && apt-get update && apt-get install -y certbot && apt-get clean`
    * `certbot certonly --authenticator standalone  -d admin.jokkebrok.be --pre-hook "docker-compose -f /root/playground-admin-app/docker/docker-compose.yml.production --project-name playgroundadminapp --project-directory /root/playground-admin-app stop" --post-hook "docker-compose -f /root/playground-admin-app/docker/docker-compose.yml.production  --project-name playgroundadminapp --project-directory /root/playground-admin-app start"`
    * Add `certbot renew` to cron.

#### Configuration
* Configure a `.env` file.
* Configure a `.laravel.env.production` file.
* In the container: run `php artisan key:generate`.
* In the container: run `php artisan migrate`.
* In the container: run `php artisan config:cache`.
* In the container: run `php artisan cache:clear`.
* (Not supported yet) In the container: run `php artisan route:cache`.

## Update (docker-compose production) with longer downtime
* `git pull`: This only affects the docker-compose.yml.production file. The images are pulled from Docker Hub.
* `docker-compose -f docker/docker-compose.yml.production --project-name playgroundadminapp --project-dir . pull`
* `docker-compose -f docker/docker-compose.yml.production --project-name playgroundadminapp --project-dir . up -d`
* In the app container: run `php artisan migrate`
* In the app container: run `php artisan config:cache`.
* In the app container: run `php artisan route:cache`.

## Access PHPMyAdmin
* `ssh<EMAIL_ADDRESS>-L 22001:localhost:21001 -N`
* Visit `http://localhost:22001`

## Access MySQL
* `ssh<EMAIL_ADDRESS>-L 22306:localhost:21306 -N`
* Connect to MySQL at `localhost:22306`

## Dev recommendations

### PHP Formatting
* ```docker run -it -v "`pwd`:/project" composer /bin/sh```
* ```composer install --working-dir=tools/php-cs-fixer```
* ```tools/php-cs-fixer/vendor/bin/php-cs-fixer fix app```
* Suggested pre-commit hook:

```bash
#!/bin/bash
tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff app
RESULT=$?
if [ "$RESULT" -eq "0" ]; then
  exit 0;
else
  echo "PHP CS Fixer found errors which prevented this commit from succeeding.";
  echo "Run tools/php-cs-fixer/vendor/bin/php-cs-fixer fix app' to fix.";
  exit $RESULT;
fi;
```

## License
This project (and the Laravel framework too) is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

repository: FKint/playground-admin-app

repo_name: FKint/playground-admin-app


text:
# Sphacelotheca lironis (Savile) Thirum. & M.D. Whitehead, 1975 SPECIES

#### Status
SYNONYM

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

#### Published in
Sydowia 27(1-6): 85 (1975)

#### Original name
Planetella lironis Savile, 1951

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Ustilaginomycetes/Ustilaginales/Anthracoideaceae/Planetella/Planetella lironis/ Syn. Sphacelotheca lironis/README.md

repo_name: mdoering/backbone


text:
[<<< Previous question <<<](0570.md)  Question ID#0571.md  [>>> Next question >>>](0572.md)

When working with SimpleXML in PHP 5, the four basic rules on how the XML document is accessed are which of the following?

- [x]  converting an element to a string denotes text data

- [x]  Non-numeric indexes are element attributes

- [x]  Numeric indexes are elements

- [x]  Properties denote element iterators


text:
# nba_shotcharts

This is a project which can plot a shot chart for any player from NBA.
Currently the only basic functionality is available, meaning that all shots will be plotted
in binned way.

This project was written for Python 3.

Table of contents:

* [Dependencies](#dependencies)

* [Installation](#installation)

* [Usage Instructions](#usage-instructions)

### Dependencies

There are some usual dependencies on python packages that are well known:

* docutils >= 0.3

* pandas >= 0.20.3

* matplotlib >= 2.2.2

* numpy >= 1.14.2

* seaborn >= 0.8.1

Also, there is a dependency on my package, which can be viewed [here](https://github.com/danchyy/nba_stats).
It is a package which is used for retrieval of data which will later on be visualized here using this package.
That package is available on PyPi and can be installed with `pip install nba_stats`

### Installation

This project isn't available at PyPi yet as I need to work on several things to improve usability, but
it can be easily set up and installed using following commands:

```
git clone git@github.com:danchyy/nba_shotcharts.git
cd nba_shotcharts
pip install .
```

### Usage Instructions

As mentioned before, the usage will be simplified in near future, but as of right the following template can be followed
to obtain a shotchart for any player.

```python
from nba_shotcharts.shotcharts.shotchart import Shotchart
from nba_stats.retriever_factories.api_retriever_factory import ApiRetrieverFactory
from nba_stats.retrieval.players_retriever import PlayersRetriever

pl_ret = PlayersRetriever()
player_id = pl_ret.get_player_id("Russell Westbrook")
factory = ApiRetrieverFactory()
retriever = factory.create_regular_shotchart_retriever_for_player(player_id=player_id, season="2017-18")
data = retriever.get_shotchart()
league_average = retriever.get_league_averages()
shotchart = Shotchart(shotchart_data=data, league_average_data=league_average)
shotchart.plot_shotchart("Westbrook shot chart")
```

Which produces the following image:

![alt text](https://raw.githubusercontent.com/danchyy/nba_shotcharts/master/images/westbrook.png "Shot chart for Russell Westbrook")


text:
# Box Rooms
#### For LPortal Version 0.2
This demo is to show the internal baked lightmap workflow.
![boxrooms](Images/lportal_boxrooms.jpg)

## Prerequisites
Before going through this tutorial, make sure you have been through the Tutorial-Simple tutorial. Also make sure you are familiar with the Godot BakedLightmap node, work through some official Godot tutorials:

https://docs.godotengine.org/en/3.1/tutorials/3d/baked_lightmaps.html

# Instructions

Before you start, try running the project as is. It should show the end product, the lightmapped level.

#### Keys:
* Space - Toggle 1st / 3rd person view
* Tab - Turn LPortal on and off
* Cursors - Move
* Home - Mouse look mode on / off
* End - Show debug culling planes
* Return - Reload level

We will now go about creating the lightmapped version of the map from the original, which does not contain a 2nd set of UV coordinates.

1) Open the root.gd script and at the top change the m_bPrepare variable from false to true.
2) With the 'Root' node selected, click the chain link icon 'Instance a scene file as a node'
3) Select `Levels/Map_NoUVs.tscn`. This is the game level prior to adding the second set of UVs.
![prepare](Images/prepare.jpg)
4) Run the project. Once it has loaded fully, you can close it again, as it will have saved the necessary files.
5) Change the m_bPrepare variable back to false, ready for running the final level.

We must now bake the lightmaps:

6) Hide the 'Level' node.
7) With the 'Root' node selected, click the chain link again and select `Lightmaps/Lightmap_Proxy.tscn`. This is a merged mesh of the entire level that was created in the previous step.
8) At this point the level should be hidden, and the proxy only is showing in the viewport. Select the BakedLightmap node, and click 'Bake Lightmaps' (button above the viewport).
![bake_proxy](Images/bake_proxy.jpg)
If all goes well you should now see the proxy mesh with a lightmap applied. We now having everything prepared to run the game.
9) Delete the level node, and the proxy node, then run the game. The script will automatically load the final level if m_bPrepare is set to false.

## Notes

### Preparation phase
In the preparation run (step 4) the script creates 2 files:
1) `Lightmaps/Lightmap_Proxy.tscn` - This is the merged mesh containing the whole level, with secondary UV coordinates automatically created by godot
2) `Levels/Map_Final.tscn` - This is the entire level as loaded before, except also containing secondary UV coordinates that match the proxy mesh.

By lightmapping the proxy we are also creating a single lightmap that will match the original level made up of separate objects. This gets around the Godot limitation that it can only create one lightmap per object (which will end up creating large numbers of lightmaps for a large level).

### Why is the lightmap not baked automatically as part of the preparation phase?
Why do I have to bake the lightmap manually? This is simply because of a bug in the godot lightmapping code where it currently only works from the editor. Annoying to have an extra step and I will try and encourage the lightmapper to be fixed in core.

#### Graphical anomalies
You may notice certain bugs when using the internal workflow, that result in incorrect lighting in places. I believe there are bugs in the Godot auto UV mapping (using xatlas), as well as the voxel nature of the Godot lightmap baker which can lead to light leaks. Gradually we hope to fix UV mapping bugs in core, and JFons has been working on an updated ray tracing baker.

Until then if these problems are too much for your game, consider using the external lightmap workflow, where UV mapping and lightmapping is performed in an external modelling program such as Blender.

### Sharks
If you look carefully you may see sharks swimming around the level. They are just intended as a very rough example of registering and updating DOBs (dynamic objects). Note that they are in the scene graph separately from the levels (room list) itself.

The sharks will not cull completely correctly because they are moving at random and should really be constrained to moving only through portals. If they pass through a wall for example, LPortal may lose track of which room they should be inside. In a real game you would use something like physics to prevent them moving between rooms except through portals.

Although the sharks don't cast shadows, if the BakedLightmap node is showing, the sharks will change their lighting according to where they are in the level. This is because the BakedLightmap as well as creating a lightmap, also creates a 3d voxel structure which approximately stores the lighting in each cell. This looks nice but of course is expensive at runtime, if you switch off the BakedLightmap you may get an approximate doubling of frame rate.

### Measuring performance
You can get a very rough idea of overall performance by choosing ProjectSettings->Debug->Settings->PrintFPS ON, then turning off vsync by going to ProjectSettings->Display->Window->Use VSync OFF.
* Press TAB to turn LPortal on and off and notice differences in fps
* Try resize the window to postage stamp sized. This in general is a great way to see whether you are limited by fill rate, or by other tasks (primarily geometry processing in this case). If the frame rate increases when in a small window, you are fill rate limited. In this demo on most machines the frame rate should increase in a small window.

repository: lawnjelly/lportal-demos

repo_name: lawnjelly/lportal-demos


text:
This package contains third-party software components governed by the license(s) indicated below:
---------

Component Name: mnist neural net
License Type: Apache 2.0
Source: https://github.com/onnx/models/tree/master/vision/classification/mnist

repository: AlexRibard/Barracuda-MNistTest

path: /Third Party Notices.md

filename: Third Party Notices.md

repo_name: AlexRibard/Barracuda-MNistTest


text:
# function-pointer-measurement
How much do function pointers cost?

### The data
```console
$ make
gcc -o without.exe without.c
echo inline.exe with.exe without.exe | xargs -n1 -t -Ix time ./x
time ./inline.exe
       11.00 real        10.94 user         0.01 sys
time ./with.exe
       14.54 real        14.40 user         0.02 sys
time ./without.exe
       12.08 real        11.99 user         0.02 sys
```

Using function pointers vs manually inlining adds about 3.6s. Not great, but not
terrible.


text:
---
id: ci-builds
title: Snapshooter on CI-Builds
sidebar_label: CI-Builds
---

Snapshooter is nice and convenient in the way that it creates snapshots automatically on the first run of your tests.

This is a feature and makes your live easier.

But once in a while you might forget to commit your snapshot and by default those snapshots will create the initial snapshot on the next run and become green.

This means that on the CI-Server we will now have always a green test even if the tested functionality produces a wrong result.

This is where strict mode comes in. With strict mode we will fail tests and create a mismatch whenever a snapshot is missing.

This behavior is ideal on your build servers.

In order to enable strict mode set the environment variable `SNAPSHOOTER_STRICT_MODE` to `on` or `true`. If this environment variable is set we will fail all tests that are missing its snapshot.

Since, we are also producing a mismatch snapshot file in strict mode you can also opt to run snapshooter in strict mode on your dev box and force yourself to review and move the snapshot file to the accepted folder explicitly.

repository: SwissLife-OSS/snapshooter-docs

repo_name: SwissLife-OSS/snapshooter-docs


text:
---
layout: default
title: BGC Argo Friendly Experts
description: Accessible resources for users of Biogeochemical Argo
---

# Friendly Experts
The biogeochemical Argo community is very approachable. If you have any questions regarding BGC Argo you can contact the friendly experts on the group email address. Please also contact the gmail address if you have experience working with BGC Argo data and would like to be included on this list.

[BGCArgo.FriendlyExperts@gmail.com](mailto:BGCArgo.FriendlyExperts@gmail.com?)

# The People

### Christina Schallenberg

Christina looks after quality control for BGC Argo Australia and spends a good deal of her time thinking about phytoplankton physiology. She is particularly passionate about phytoplankton fluorescence and all the things it can and can’t tell us.

  Professional Profile | Expert work #1  | Expert work #2

### Nancy Williams

Nancy is a chemical oceanographer focused on studying the ocean's role in the carbon cycle and in climate using both observations and model output.  As part of her work with the SOCCOM project, she developed methods to quality control biogeochemical Argo pH data and to derive other carbonate system variables, focusing on estimating realistic uncertainties.

  Professional Profile | Expert work #1  | Expert work #2

- Henry Bittig
- Joellen Russel
- Seth Bushinsky
- Andrea Fassbender
- Ian Walsh
- Lidia Carracedo
- Laurent Coppola
- Marine Fourrier
- Jiaoyang Su
- Nancy Williams
- Marcos Fontela
- Nathan Briggs
- Giorgio Dall’Olmo
- Peter Croot
- Christina Schallenberg
- Marin Cornec
- Xiaogang Xing
- Martí Galí Tàpias
- Raphaëlle Sauzède
- Bozena Wojtasiewicz
- David Antoine
- Emanuele Organelli

# Programs and groups
## Argo Data Management Team
[argo-dm@jcommops.org](mailto:argo-dm@jcommops.org?)

## The SOCCOM program

## Marine Bio-optics Lab

## IMOS BGC Argo sub-facility

repository: KimBaldry/FriendlyExperts

repo_name: KimBaldry/FriendlyExperts


text:
Tiny Tibetan score pdf renderer
============================

This repository contains scripts and TeX styles to typeset Tibetan text-only
scores (no fancy yangyig).

## Mechanism ##

A file with `.tabc` extension contains the description of the score, in unicode
with a defined syntax (see hereafter), transforms it into a .tex file describing
the score, that you can include from another global tex file.

## Syntax ##

The syntax is very simple and as follow:

 * `<1:foo>` : foo is a meaningful syllable
 * `<2:foo>` : foo is afixed-shape intercalary syllables
 * `<3:foo>` : foo is a variable-shape intercalary syllable
 * `<4:foo>` : foo is an opener
 * `<5:foo>` : foo is a prolonger

Drum signs (࿁ or ࿀) under a syllable are put before the ending tsheg(་) of this
syllable.

Example: `<1:ཀ࿁་དྲ࿁་བའི࿀།> <4:ཨེ࿁་>(kgkhy) <1:དམར࿁་>()`

## Parsing tabc file ##

Once your `.tabc` file is finished, you can compile it with the `compile-score.py`
script. It will compile it into a `.tex` file with the same base name. See
example score in the repository.

## Using your .tex file ##

The obtained `.tex` file only contains the data for the score, so you cannot
compile it raw. Instead, include it in another `.tex` file where you define
the layout you want. See `example.tex` for an example of such a file.

This main file must include the `tibetanscore` LaTeX package of this repository.

## Dependencies ##

The python script has been tested only with Python3.

The example file depends on the [upecha](https://github.com/eroux/upecha), for
which you will need LuaTeX and also need an updated version of
[gloss-tibetan.ldf](https://github.com/eroux/polyglossia/blob/master/tex/gloss-tibetan.ldf).
You can also use a regular LaTeX class, though it won't look like a Tibetan pecha.

repository: eroux/tibetan-scores

repo_name: eroux/tibetan-scores


text:
kyoto uikit

    UIKit for rapid development

![License](https://img.shields.io/github/license/yuriizinets/kyoto-uikit)
[![Go Reference](https://pkg.go.dev/badge/github.com/yuriizinets/kyoto.svg)](https://pkg.go.dev/github.com/yuriizinets/kyoto)
[![Go Report Card](https://goreportcard.com/badge/github.com/yuriizinets/kyoto-uikit)](https://goreportcard.com/report/github.com/yuriizinets/kyoto-uikit)

## Requirements

- `kyoto` page
- configured SSA
- basic knowledge of `kyoto`
- (twui only) configured tailwindcss

## Installation

### Git submodule

The easiest way to install for now, because it handles templates as well

- Add repo as git submodule to your app: `git submodule add https://github.com/yuriizinets/kyoto-uikit.git uikit`
- (twui only) Add replace directive to your `go.mod` file: `github.com/yuriizinets/kyoto-uikit/twui => ./uikit/twui`
- (twui only) Add twui path to tailwind config file for JIT mode

### Go package + templates

`<kit>` - component library you want to use

- Install Go package into your project with `go get github.com/yuriizinets/kyoto-uikit/<kit>`
- Manually copy all `<kit>/*.html` files to your templates directory

## Example

Simple example using tailwind ui stats component

![stats](https://imgur.com/TjBmJ26.png)

```go
package main

import (
    "github.com/yuriizinets/kyoto"
    "github.com/yuriizinets/kyoto-uikit/twui"
)

type PageExample struct {
    Stats kyoto.Component
}

func (p *PageExample) Template() *template.Template {
    return template.Must(template.New("page.example.html").Funcs(kyoto.TFuncMap()).ParseGlob("templates/*.html"))
}

func (p *PageExample) Init() {
    p.Stats = kyoto.RegC(p, &twui.AppUIDataStats{
        Items: []twui.AppUIDataStatsItem{
            {
                Image: `
                    <div class="p-2 bg-indigo-500 text-white rounded-lg">
                        <svg class="w-8 h-8 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
                    </div>
                `,
                Title:  "Total Subscribers",
                Value:  71897,
                Change: 122,
            },
            {
                Title:        "Avg. Open Rate",
                Value:        58.16,
                ValueSymbol:  "%",
                Change:       5.4,
                ChangeSymbol: "%",
            },
            {
                Title:        "Avg. Click Rate",
                Value:        24.57,
                ValueSymbol:  "%",
                Change:       -3.2,
                ChangeSymbol: "%",
            },
        },
    })
}
```

## Documentation

Sorry, but not ready yet 🤷♂
We are working on this

## Features

- Provides high-level blocks instead of primitives like buttons and labels
- Configurable enough for using in different situations
- Adaptive out of the box
- Don't like component UI? It's very easy to customize it!

## References

- `kyoto-uikit` project: https://github.com/yuriizinets/kyoto-uikit
- `kyoto` project: https://github.com/yuriizinets/kyoto
- Documentation: not ready yet 🤷♂
- Demo project: not ready yet 🤷♂

## Contribution

Development setup is not ready yet, but feel free to use test files for testing components. Just check how existing components are used in tests.

## Support

Or directly with Bitcoin: `bc1qgxe4u799f8pdyzk65sqpq28xj0yc6g05ckhvkk`

repository: strogo/kyoto-uikit

repo_name: strogo/kyoto-uikit


text:
# Sea Foods

## Table of Contents

- [Sea Foods](#sea-foods)
  - [Table of Contents](#table-of-contents)
  - [About Project](#about-project)
  - [Live Demo](#live-demo)
  - [Video Demo Link](#video-demo-link)
  - [Built With](#built-with)
  - [Getting Started](#getting-started)
  - [API Interactions](#api-interactions)
    - [The MealDB](#the-mealdb)
    - [Involvement API](#involvement-api)
  - [Contributing](#contributing)
  - [Author](#author)
  - [Acknowledgements](#acknowledgements)
  - [Show your support](#show-your-support)

## About Project

Sea Foods is a project that enlists dishes of sea life regarded as food. Users get to interact to items in the list by liking and commenting on them after viewing some more information on a particular dish on a popup modal.

This project uses [TheMealDB](https://www.themealdb.com/api.php) API for populating the list of sea foods and the [Involvement](https://www.notion.so/Involvement-API-869e60b5ad104603aa6db59e08150270) API for adding likes and comments to any sea food item.

![screenshot](./src/assets/img/screenshot.png)

## [Live Demo](https://lameck1.github.io/Sea-Foods/)

## [Video Demo Link](https://youtu.be/TkcdUBXIKY4)

## Built With

* HTML5
* CSS
* Javascript
* Webpack
* [TheMealDB](https://www.themealdb.com/api.php) API
* [Involvement](https://www.notion.so/Involvement-API-869e60b5ad104603aa6db59e08150270) API

## Getting Started

* Clone this repo <https://github.com/Lameck1/Sea-Foods>

    ```bash
    git clone https://github.com/Lameck1/Sea-Foods.git
    ```

* Navigate to Sea-Foods folder/directory

    ```bash
    cd Sea-Foods
    ```

* On the comandline, at the project's root, run ```npm i``` to install app dependencies

* Next, run ```npm start``` which will build the project from ```src``` directory and serve into memory

* Go to ```http://localhost:9000/``` to interact with the app

* ALTERNATIVELY

  * Just run ```npm run build``` or ```npx webpack``` which will build the project and generate output files into the ```dist``` directory.

  * Go to ```dist``` directory and manually open ```index.html``` to interact with the app

## API Interactions

### The MealDB

From the MealDB API, this app/project is interacting/consuming this endpoint to get a list of meals:

```https://www.themealdb.com/api/json/v1/1/filter.php?c=Seafood```

### Involvement API

In this API, the app consumes the `/likes/` and the `/comments/` endpoints. Take a look at the [DOCUMENTATION](https://www.notion.so/Involvement-API-869e60b5ad104603aa6db59e08150270) and undestand how you can work with it.

## Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](https://github.com/Lameck1/Sea-Foods/issues)

  1. Fork the Project
  2. Create your Feature Branch (`git checkout -b feature/newFeature`)
  3.  Push to the Branch (`git push -u origin feature/newFeature`)
  5. Open a Pull Request

## Author

👤 **Lameck Otieno**

* GitHub: [@githubhandle](https://github.com/Lameck1)
* Twitter: [@twitterhandle](https://twitter.com/lameck721)
* LinkedIn: [LinkedIn](https://www.linkedin.com/in/lameck-odhiambo-642b7077/)
* Portfolio: [Portfolio](https://lameck.me)

👤 **Omoogun Olawale**

* Github: [@githubhandle](https://github.com/olawale-o)
* Twitter: [@twitterhandle](https://twitter.com/ibreaktherules)
* LinkedIn: [LinkedIn](https://www.linkedin.com/in/olawaleomoogun/)

## Acknowledgements

* [TheMealDB](https://www.themealdb.com/api.php) API
* [Involvement](https://www.notion.so/Involvement-API-869e60b5ad104603aa6db59e08150270) API

Credits also go to the following for providing guides on JavaScript

* [**MDN Web Docs**](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects)
* [Freecodecamp](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/)

## Show your support

Give a ⭐ if you like this project!


text:
# react-scripts
Scripts to run / build React project with zero or any configuration.

### Install:

Install to your project `npm i -S -D @evolify/react-scripts`

or install global `npm i -g @evolify/react-scripts`;

### Usage:

All you need just a root  '.jsx' component in your `project root` or `src`;

```jsx
// App.jsx
import React from 'react'

export default function App(){
  return (
    <div>Powered by @evolify/react-scripts.</div>
  )
}
```

1. Run in development:

   `miot-react-scripts dev [comp-path]`

   if you want to use `src/Demo.jsx` as the root component, just run `miot-react-scripts dev src/Demo.jsx`, if no `comp-path` provided, any one of `index.jsx?`、`src/index.jsx?`、`App.jsx?`、`src/App.jsx?` will be used as the root component.

2. Build in production:

   `miot-react-scripts build [comp-path]`

### Configuration:

By default , `miot-react-scripts` will work well without any configuration. `sass`、`postcss`、`react-hot-loader`、`@babel/proposal-decorators`、`@babel/proposal-class-properties`、`@babel/plugin-syntax-dynamic-import` are built in.

You can still config what you want in `react-scripts.config.js` file in your project root dir.

```js
/**
 * Add this to enable vscode intellisence.
 *
 * @type {import('@evolify/react-scripts')}
 */
module.exports = {
  {
    template: path.join(__dirname, 'public/index.html'), // html template, built in miot-react-scripts by default.
    outputDir: path.join(process.cwd(), 'build'),
    entry: path.join(__dirname, '../public/index.jsx'), // the same to webpack.entry, built in.
    publicPath: process.env.NODE_ENV === 'production' ? '//cdn.xxx.com': '', // deafult is ''
    app: '', // root component, can also be set as a param in miot-react-scripts
    typescript: false, // if you want to use ts, set this option to `true`
    mobile: false,
    webpack: {
      devServer: {
        port: 3000,
        host: '<IP_ADDRESS>',
        proxy: {

        }
      },
    },
    babel: {},
    postcss: {}
  }
}
```

webpack 、 babel、postcss, just follow the official doc, now only support `object` type.

### CSS Module
By default you can enable css module just to name you css/scss file to `style.module.css` / `style.module.scss`

repository: evolify/react-scripts

repo_name: evolify/react-scripts


text:
# when

[![Build Status](https://github.com/chocolateboy/when/workflows/test/badge.svg)](https://github.com/chocolateboy/when/actions?query=workflow%3Atest)
[![NPM Version](https://img.shields.io/npm/v/@chocolatey/when.svg)](https://www.npmjs.org/package/@chocolatey/when)

<!-- TOC -->

- [NAME](#name)
- [FEATURES](#features)
- [INSTALLATION](#installation)
- [SYNOPSIS](#synopsis)
- [DESCRIPTION](#description)
  - [Why?](#why)
  - [Why not?](#why-not)
- [TYPES](#types)
- [EXPORTS](#exports)
  - [default](#default)
- [DEVELOPMENT](#development)
- [COMPATIBILITY](#compatibility)
- [SEE ALSO](#see-also)
- [VERSION](#version)
- [AUTHOR](#author)
- [COPYRIGHT AND LICENSE](#copyright-and-license)

<!-- TOC END -->

# NAME

when - subscribe to an event before or after it's fired

# FEATURES

- no dependencies
- < 500 B minified + gzipped
- fully typed (TypeScript)
- CDN builds (UMD) - [jsDelivr][], [unpkg][]

# INSTALLATION

    $ npm install @chocolatey/when

# SYNOPSIS

```javascript
import when from '@chocolatey/when'

const onPageShow = when(done => {
    window.addEventListener('pageshow', done)
})

// callback
onPageShow(event => addWidget(user))

// promise
onPageShow().then(([event]) => addWidget(user))
```

# DESCRIPTION

`when` provides a way to register listeners for a function call before or after
the function is called. This can be used to "pin" events (or other kinds of
signal/notification) so that they can be consumed after they've fired.

## Why?

Several events and notifications that are exposed as transient, fire-and-forget
messages are better thought of as *states*, e.g. "ready" notifications for
services, or lifecycle events for web pages. They tend to be fired once, and we
often need to detect that they've fired after the fact. This usage is not
supported by most event-emitter implementations, and handling it manually can
involve fiddly imperative code which obscures the simple semantics.

This module exports a function which allows these notifications to be *pinned*
like "sticky" announcements on a message board or forum, rather than the
blink-and-you-miss-it behavior of events, removing the timing-sensitivity that
can make the event-based representation of these states inconvenient to use or
unreliable.

## Why not?

`when` provides a way to pin notifications when a framework or library doesn't
provide a way to do that itself, e.g. when consuming events produced by most
event-emitter implementations. But if you control/emit the notifications
yourself, and want consumers to be able to subscribe to them after they've been
published, this can be handled in the notifier itself, e.g. by using a library
with support for pinned events such as [fixed-event][] or
[ipc-event-emitter][].

# TYPES

The following types are referenced in the descriptions below.

<details>

```typescript
export type Callback = (done: <A extends any[]>(...args: A) => void) => void;
export type ErrorHandler = (error: any) => void;
export type Listener = <A extends any[]>(this: unknown, ...args: A) => void;

export interface Subscribe {
    <A extends any[]>(): Promise<A & { this: unknown }>;
    (listener: Listener): () => boolean;
};
```

</details>

# EXPORTS

## default

- **Type**: `(callback: Callback, onError?: ErrorHandler) => Subscribe`

```javascript
import when from '@chocolatey/when'

const onPageShow = when(done => {
    window.addEventListener('pageshow', done)
})

user.getData(url) // load data if not cached

onPageShow(event => addWidget(user))
```

`when` passes a delegating function to a callback and returns a function which
registers listeners to be called when the delegate is called. Listeners are
passed the same arguments and `this` value as the delegate and are executed
asynchronously. Listeners registered after the delegate has been called are
invoked immediately.

<!-- TOC:ignore -->
### unsubscribe

When the returned function is passed a listener, it returns a function which
can be used to unregister the listener if it hasn't already been called. The
function returns true if the listener was successfully unregistered, or false
otherwise.

```javascript
const unsubscribe = onPageShow(() => addWidget(user))

// ...

if (!user.loggedIn) {
    unsubscribe()
}
```

<!-- TOC:ignore -->
### promise

If the listener is omitted, a promise is returned which is resolved with the
array of arguments passed to the delegate.

```javascript
onPageShow().then(([event]) => addWidget(user))

const [event] = await onPageShow()
```

The delegate's `this` value can be accessed via the `this` property on the
arguments array:

```javascript
onPageShow().then(args => {
    const [event] = args
    const self = args.this
})

const { 0: event, this: self } = await onPageShow()
```

<!-- TOC:ignore -->
### error handler

`when` takes an optional error-handler which is passed any error which occurs
when a listener is invoked. If not supplied, listener errors are logged with
`console.error`.

```javascript
const onReady = when(
    done => emitter.once('ready', done),
    error => errors.push(error)
)

onReady(() => loadFile(path))
// errors.push(new Error("no such file..."))
```

<!-- TOC:ignore -->
### once

The delegate function records its arguments and `this` value the first time
it's called and subsequent calls are ignored, i.e. it behaves like it's only
called once. This makes it safe to use with events which may be emitted
multiple times, though arranging for the delegate to only be called once can
still be useful to avoid spamming it with redundant calls.

```javascript
const onBeforeUnload = when(done => {
    window.addEventListener('beforeunload', done, { once: true })
})
```

<!-- TOC:ignore -->
### side effects

Note that the delegating function is void, i.e. there's no way to return a
value from it, and no way to return a different value from it each time it's
called (since it's only executed once). There's also no way to perform a side
effect such as stopping the propagation of an event, since listeners are
executed asynchronously. If any of these features are needed, they can be
handled by wrapping the delegate, e.g.

```javascript
const onReady = when(done => {
    const wrapper = function (event) {
        const result = handle(event) // side effects
        done.call(this, event)       // notify listeners (once)
        return result                // return value
    }

    emitter.on('ready', wrapper)
})
```

# DEVELOPMENT

<details>

<!-- TOC:ignore -->
## NPM Scripts

The following NPM scripts are available:

- build - compile the library for testing and save to the target directory
- build:doc - generate the README's TOC (table of contents)
- build:release - compile the library for release and save to the target directory
- clean - remove the target directory and its contents
- rebuild - clean the target directory and recompile the library
- test - recompile the library and run the test suite
- test:run - run the test suite
- typecheck - sanity check the library's type definitions

</details>

# COMPATIBILITY

- [Maintained Node.js versions](https://github.com/nodejs/Release#readme) and compatible browsers

# SEE ALSO

- [fixed-event][] - EventEmitter for one-time tasks
- [ipc-event-emitter][] - an EventEmitter wrapper for IPC between parent and child processes with support for pinned events
- [wl][] - whenable events implementation

# VERSION

1.2.0

# AUTHOR

<EMAIL_ADDRESS>
# COPYRIGHT AND LICENSE

Copyright © 2021 by chocolateboy.

This is free software; you can redistribute it and/or modify it under the terms
of the [MIT license](https://opensource.org/licenses/MIT).

[fixed-event]: https://www.npmjs.com/package/fixed-event
[ipc-event-emitter]: https://www.npmjs.com/package/ipc-event-emitter
[jsDelivr]: https://cdn.jsdelivr.net/npm/@chocolatey/when
[unpkg]: https://unpkg.com/@chocolatey/when
[wl]: https://www.npmjs.com/package/wl

repository: chocolateboy/when

gha_license_id: NOASSERTION

repo_name: chocolateboy/when


text:
---
layout: post
title: "Tip of the Week: Visual Studio Dev Essentials"
comments: true
categories:
- TipOW
tags:
date: 2017-08-25
completedDate: 2017-08-25 11:57:25 +1000
keywords:
description: Free tools, cloud services, and training all for free!
primaryImage: vs_dev_essentials.png
---

If you are a .NET developer and looking for some awesome free stuff, then check out [Visual Studio Dev Essentials](https://www.visualstudio.com/dev-essentials/). You get loads of free stuff

> *Free tools, cloud services, and training*

> *Get everything you need to build and deploy your app on any platform. With state-of-the-art tools, the power of the cloud, training, and support, it’s our most comprehensive free developer program ever.*

<img src="{{site.images_root}}/vs_dev_essentials.png" alt="center" alt="Visual Studio Dev Essentials" >

Some of the key attractions of the program are

 - $300 Azure Credit for a year
 - Access to Xamarin University Training
 - Pluralsight access for three months
 - WintellectNOW access for three months

All you need is a Windows Live ID to signup. Get it if you have not already!

extension: markdown