text:
# Winzou State Machine service provider for Laravel

[![Latest Version on Packagist](https://img.shields.io/packagist/v/sebdesign/laravel-state-machine.svg?style=flat-square)](https://packagist.org/packages/sebdesign/laravel-state-machine)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/github/workflow/status/sebdesign/laravel-state-machine/Tests/master?style=flat-square)](https://github.com/sebdesign/laravel-state-machine/actions)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/quality/g/sebdesign/laravel-state-machine/master?style=flat-square)](https://scrutinizer-ci.com/g/sebdesign/laravel-state-machine/?branch=master)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/sebdesign/laravel-state-machine/master?style=flat-square)](https://scrutinizer-ci.com/g/sebdesign/laravel-state-machine/?branch=master)
[![StyleCI](https://styleci.io/repos/78893356/shield?style=flat-square)](https://styleci.io/repos/78893356)

This is a Laravel service provider for [winzou/state-machine](https://github.com/winzou/state-machine). It provides dependency injection for the `StateMachineFactory`. You can also use Laravel's service container to resolve class methods for the callbacks. A facade is also available for convenience.

## Installation

You can install the package via composer. This package requires Laravel 7.0 or higher.

For previous Laravel versions, please check the [compatibility table](#versions).

Then require the package using the command-line interface:

```bash
composer require sebdesign/laravel-state-machine
```

### Versions

If you need to install this package in older Laravel installations, use the table below to find a compatible version.

| Package | Laravel | PHP |
| :--- | :--- | :--- |
| **^3.0** | `^7.0 - ^9.0` | ^7.2.5 |
| **^2.0** | `5.5.* - ^6.0` | ^7.0 |
| **^1.0** | `5.1.* - 5.8.*` | ^5.5.9 | ^7.0 |

Since version 5.5, Laravel uses package auto-discovery, so you don't need to manually add the ServiceProvider and the facade. If you don't use auto-discovery or you are using an older version, add the service provider and the facade in config/app.php.

``` php
<?php

'providers' => [
    Sebdesign\SM\ServiceProvider::class,
],

'aliases' => [
    'StateMachine' => Sebdesign\SM\Facade::class,
],
```

## Configuration

Publish the config file in `config/state-machine.php`.

``` bash
php artisan vendor:publish --provider="Sebdesign\SM\ServiceProvider"
```

Please see the documentation of the [StateMachineBundle](https://github.com/winzou/StateMachineBundle) for all the available options.

## Usage

``` php
<?php

// Get the article
$article = App\Article::find($id);

// Get the state machine for this article, and graph called "simple"

// Using the facade
$stateMachine = StateMachine::get($article, 'simple');

// Or using the service container with dependency injection
public function method(SM\Factory\FactoryInterface $factory)
{
    $stateMachine = $factory->get($article, 'simple');
}
```

Now you can use the `$stateMachine` to interact with the state of the `$article`.

``` php
<?php

// Get the actual state of the object
$stateMachine->getState();

// Get all available transitions
$stateMachine->getPossibleTransitions();

// Check if a transition can be applied: returns true or false
$stateMachine->can('approve');

// Apply a transition: returns true or throws an SM\SMException
$stateMachine->apply('publish');

// Apply a transition without throwing an exception: returns true or false
$stateMachine->apply('publish', true);
```

### Callbacks

Callbacks are used to guard transitions or execute some code before or after applying transitions. This package adds the ability to use Laravel's service container to resolve callbacks.

E.g.:

You want to call the `handle` method on the `MyService` class to determine if the state machine can apply the `submit_changes` transition.

```php
<?php

'callbacks' => [
    // will be called when testing a transition
    'guard' => [
        'guard_on_submitting' => [
            // call the callback on a specific transition
            'on' => 'submit_changes',

            // will call the method of this class
            'do' => ['MyService', 'handle'],

            // arguments for the callback
            'args' => ['object'],
        ],
    ],
],
```

You can specify callbacks in array format, e.g. `['Class', 'method']`, or in *@* delimited string format, e.g. `Class@method`.

### Using Gates and Policies

If you don't want to use custom classes/methods for guarding, you can use Laravel's authorization gates or policies for determining if a transition can be applied.

Instead of specifying a `do` key, you must define a `can` key with the name of the ability you want to check. Since Laravel 5.5, you can also specify an array of abilities, and every one will be checked.

By default, the object instance will be passed as an argument to the gate. You can also override the arguments by specifying them in the `args` key.

#### Example using a gate:

In this example, we have defined a gate which will accept the `$article` as and argument. You are not required to define this parameter in your gate if you don't need it.

```php
<?php

use App\User;
use App\Article;

Gate::define('approve', function (User $user, Article $article) {
    //
});
```

```php
<?php

'callbacks' => [
    'guard' => [
        'guard_on_approving' => [
            // call the gate on a specific transition
            'on' => 'approve',
            // will call Gate:allows('approve', $article)
            'can' => 'approve',
        ],
    ],
],
```

#### Example using a policy:

Say you have created an `ArticlePolicy` policy for your `Article` model, which has an `approve` method.

You should define `approve` in the `can` index. This will be the equivalent of calling `$user->can('approve', $article)`.

You can also override the arguments that will be passed in the `approved` method, by specifying the `args` array. You **must** use `object` as the first argument in order for the policy class to be resolved. E.g.: `'args' => ['object', '"final_approval"']` would be the equivalent of calling `$user->can('approve', [$article, 'final_approval'])`.

```php
<?php

namespace App\Policies;

use App\User;
use App\Article;

class ArticlePolicy
{
    public function approve(User $user, Article $article)
    {
        //
    }
}
```

```php
<?php

'callbacks' => [
    'guard' => [
        'guard_on_approving' => [
            // call the policy on a specific transition
            'on' => 'approve',
            // will call Gate:allows('approve', $article)
            'can' => 'approve',
        ],
    ],
],
```

## Events

When checking if a transition can be applied, the `SM\Event\SMEvents::TEST_TRANSITION` event is fired.

Before and after a transition is being applied, the `SM\Event\SMEvents::PRE_TRANSITION` and `SM\Event\SMEvents::POST_TRANSITION` events are fired respectively.

All the events receive a `Sebdesign\SM\Event\TransitionEvent` instance.

If you wish to listen to all the events with the same listener, you can use the `winzou.state_machine.*` wildcard parameter.

You can define your own listeners in your app's `EventServiceProvider`. E.g.:

```php
<?php

use SM\Event\SMEvents;

/**
 * The event listener mappings for the application.
 *
 * @var array
 */
protected $listen = [
    SMEvents::TEST_TRANSITION => [
        \App\Listeners\CheckTransition::class,
    ],
    SMEvents::PRE_TRANSITION => [
        \App\Listeners\BeforeTransition::class,
    ],
    SMEvents::POST_TRANSITION => [
        \App\Listeners\AfterTransition::class,
    ],
    'winzou.state_machine.*' => [
        \App\Listeners\Transition::class,
    ],
];
```

### Context

You can also pass additional data as an array when checking or applying transitions.
This array will be passed to the `Sebdesign\SM\Event\TransitionEvent`.
You can access the array using `$event->getContext()` in your event listeners or callbacks.

Example using an event listener:
```php
<?php

// Reject the transition of the approval date is past
Event::listen(SMEvents::TEST_TRANSITION, function (TransitionEvent $event) {
    $context = $event->getContext();

    if ($context['approved_at']->isPast()) {
        $event->setRejected();
    }
});

// Check if a approve transition can be applied on some date
$stateMachine->can('approve', ['approved_at' => now()]);
```

Example using a callback:
```php
<?php

// Setup an callback after publishing
[
    'callbacks' => [
        'after' => [
            'after_publishing' => [
                'on' => 'publish',
                'do' => [App\Actions\PublishArticleAction::class, 'execute'],
                'args' => ['object', 'event'],
            ],
        ],
    ],
];

// Save the publish date in your action
class PublishArticleAction
{
    public function execute(Article $article, TransitionEvent $event)
    {
        $context = $event->getContext();
        $article->update(['published_at' => $context['published_at']]);
    }
}

// Apply a publish transition on some date
$stateMachine->apply('publish', false, ['published_at' => now()]);
```

## Metadata

You can optionally store metadata in graphs, states and transitions.
The metadata are stored in associative arrays, and can be anything you want.

```php
<?php

return [
    'graphA' => [
        'class' => App\Article::class,

        'metadata' => [
            'title' => 'Article State Machine',
        ],

        'states' => [
            [
                'name' => 'pending_review',
                'metadata' => ['title' => 'Pending Review'],
            ],
        ],

        'transitions' => [
            'ask_for_changes' => [
                'from' => ['pending_review'],
                'to' => 'accepted',
                'metadata' => ['title' => 'Ask for changes'],
            ],
        ],
    ],
];
```

The state machine object offers many flexible ways to fetch metadata, either as associative arrays, either specific values by keys. You can also pass default values or closures in case the specified key doesn't exist.

 It accepts the name of the graph as an argument. If no arguments are passed, the graph name will be asked interactively.

```
$ php artisan winzou:state-machine:debug simple

+--------------------+-----------------------+
| Configured States: | Metadata:             |
+--------------------+-----------------------+
| new                |                       |
| pending_review     | title: Pending Review |
| awaiting_changes   |                       |
| accepted           |                       |
| published          |                       |
| rejected           |                       |
+--------------------+-----------------------+

+-----------------+------------------+------------------+
| Transition      | From(s)          | To               |
+-----------------+------------------+------------------+
| create          | new              | pending_review   |
+-----------------+------------------+------------------+
| ask_for_changes | pending_review   | awaiting_changes |
|                 | accepted         |                  |
+-----------------+------------------+------------------+
| cancel_changes  | awaiting_changes | pending_review   |
+-----------------+------------------+------------------+
| submit_changes  | awaiting_changes | pending_review   |
+-----------------+------------------+------------------+
| approve         | pending_review   | accepted         |
|                 | rejected         |                  |
+-----------------+------------------+------------------+
| publish         | accepted         | published        |
+-----------------+------------------+------------------+

+---------------------+--------------------+------------------------+--------+
| Guard Callbacks     | Satisfies          | Do                     | Args   |
+---------------------+--------------------+------------------------+--------+
| guard_on_submitting | On: submit_changes | MyClass::handle()      | object |
| guard_on_approving  | On: approve        | Gate::check("approve") |        |
+---------------------+--------------------+------------------------+--------+

+---------------------+-------------+-------------+-----------------------------+
| Before Callbacks    | Satisfies   | Do          | Args                        |
+---------------------+-------------+-------------+-----------------------------+
| log_before_approval | On: approve | Log::info() | "approving article", object |
+---------------------+-------------+-------------+-----------------------------+

+----------------------+--------------+------------------------------+---------------+
| After Callbacks      | Satisfies    | Do                           | Args          |
+----------------------+--------------+------------------------------+---------------+
| email_after_approval | To: accepted | SendApprovalMail::dispatch() | object, event |
+----------------------+--------------+------------------------------+---------------+
```

## Visualize command

An artisan command for generating an image of a given graph is included. It accepts the name of the graph as an argument.
It's taken from the corresponding bundle for Symfony: [https://github.com/MadMind/StateMachineVisualizationBundle](https://github.com/MadMind/StateMachineVisualizationBundle), so all credits goes to the original author.

If you want to run this command, you need to have installed **dot** - Part of graphviz package ([http://www.graphviz.org/](http://www.graphviz.org/)). In your mac, this is equal to having run ```brew install graphviz```

```bash
php artisan winzou:state-machine:visualize {graph? : A state machine graph} {--output=./graph.jpg} {--format=jpg} {--direction=TB} {--shape=circle} {--dot-path=/usr/local/bin/dot}
```

![test](https://user-images.githubusercontent.com/1104083/75524206-bcfd1a00-5a0d-11ea-9dce-aa0d61e46e75.jpg)

## Statable trait for Eloquent models

If you want to interact with the state machine directly within your models, you can install the [laravel-statable](https://github.com/iben12/laravel-statable) package by [iben12](https://github.com/iben12).

This package allows you to get the graph from the model, checking/applying transitions, as well as recording the state history in the database.

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Testing

``` bash
$ composer test
```

## Contributing

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## Security

If you discover any security related issues, please email<EMAIL_ADDRESS>instead of using the issue tracker.

## Credits

- [Alexandre Bacco](https://github.com/winzou)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

repository: sebdesign/laravel-state-machine

gha_language: PHP

repo_name: sebdesign/laravel-state-machine


text:
# Val-memoirs

A Platform to share experiences

## View

check it out here [here](https://val-memoirs-app.herokuapp.com/) to share your experience.

The api lives here https://github.com/allindeveloper/val-memoirs-api

repository: allindeveloper/val-memoirs

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

license_type: permissive

repo_name: allindeveloper/val-memoirs


text:
---
sidebar_position: 0
sidebar_label: Overview
---

# Metrics overview

Metrics configuration is [described here](../getting-started/configuration#configuring-a-metrics-entry).

Available metrics:

- [Cyclomatic Complexity](./cyclomatic-complexity.md)
- [Halstead Volume](./halstead-volume.md)
- [Lines of Code](./lines-of-code.md)
- [Maintainability Index](./maintainability-index.md)
- [Maximum Nesting](./maximum-nesting-level.md)
- [Number of Methods](./number-of-methods.md)
- [Number of Parameters](./number-of-parameters.md)
- [Source lines of Code](./source-lines-of-code.md)
- [Weight of a Class](./weight-of-class.md)

license: MIT

repository: FantasyOR/website

branch_name: refs/heads/main

gha_license_id: MIT

repo_name: FantasyOR/website


text:
# Components-Of-Software-Engineering

## Table of Contents

- [Description](#description)
- [Badges](#badges)
- [Contributing](#contributing)
- [License](#license)

### Description

This repo was created for subject "Components Of Software Engineering" and have My labs

## Badges

> [![Theme](https://img.shields.io/badge/Theme-Testing-blue?style=flat-square)](https://en.wikipedia.org/wiki/Software_testing)
> [![Language](https://img.shields.io/badge/Language-CSharp-purple?style=flat-square)](https://en.wikipedia.org/wiki/C_Sharp_(programming_language))
> [![License](http://img.shields.io/:License-MIT-blue.svg?style=flat-square)](http://badges.mit-license.org)

---

## Example

```csharp
/// <summary>
/// Test public property FilePath
/// Check if we get exact string as it is in constructor
/// </summary>
[Fact]
public void FilePath_None_ReturnsSameString()
{
	// Arrange
	const string FULL_PATH = @"D:\ForStudy\Components-Of-" +
		@"Software-Engineering\Labs\Lab2\Lab2\TempFile.txt";
	FileWorker worker = new(FULL_PATH);

	string expected = worker.FilePath;

	// Act
	string actual = @"D:\ForStudy\Components-Of-" +
		@"Software-Engineering\Labs\Lab2\Lab2\TempFile.txt";

	// Assert
	Assert.Equal(actual, expected);
}
```

---

## Contributing

> To get started...

### Step 1

- 🍴 Fork this repo!

### Step 2

- **HACK AWAY!** 🔨🔨🔨

---

## License

[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)

- **[MIT license](http://opensource.org/licenses/mit-license.php)**
- Copyright 2021 © VsIG.

gha_language: C#


text:
tinypass.py
===========

Minimal, very low security, file passwording app

Checks unsigned cookies against unsalted passwords stored on disk
in plaintext; to serve large static files.

Requires [bottle.py](http://bottlepy.org/)

Uses [zepto.js](http://zeptojs.com/), a lightweight API-compatible jQuery alternative.

`login.html`, `password.html` and `tinypass.py` are released under the Unlicense, `float-label.js` is released under the MIT license.

license: MIT,Unlicense

detected_licenses: MIT Unlicense


text:
# Testing

name of the file app_test.js
the sole purpose of this file is to test App component

### what is the behavior I want to test?

## describe
- use describe to group similar tests
## it
- use `it` to test a single attribute of a target
- the string is only used for a report - directions to us what the block is going to test
```
it('shows correct text')
```
## expect
- use expect to make an assertion about the target
- is a function that returns an object
- we pass a component to expect

```js
import { renderComponent, expect } from '../test_helper';
import App from '../../src/components/app';

describe('App', () => {
  it('shows correct text', () => {
    const component = renderComponent(App);
    expect(component).to.contain('React simple starter');
  });
});
```

 - Mocha queues up the tests
 - component is jQuery wrapped version
 - each individual test is self contained, if error thrown doesn't affect other tests
`npm run test:watch`

Assertions about end product
We care about
- it has a text area
- it has a button
- entering text into the text area updates the text
- it shows a commnent in LI
- given a list of comments, it shows all the comments

## beforeEach
```js
describe('CommentBox', () => {
  let component;
  beforeEach( () => {
    component = renderComponent(CommentBox);
  });

  it('has a text area', () => {
    expect(component.find('textarea')).to.exist;
  });
  it('has a button', () => {
    expect(component.find('button')).to.exist;

  });
  it('has a class', () => {
    expect(component).to.have.class('comment-box');
  });
});
```
## Testing reducers
```js
import { expect } from '../test_helper';
import { SAVE_COMMENT } from '../../src/actions/types';
import commentReducer from '../../src/reducers/comments';

describe('Comments Reducer', () => {
  it('handles action with uknown type', () => {
    expect(commentReducer(undefined, {})).to.be.instanceof(Array);
    expect(commentReducer(undefined, {})).to.eql([]);
  });

  it('handles action of type SAVE_COMMENT', () => {
    const action = {
      type: SAVE_COMMENT,
      payload: 'new comment'
    };
    expect(commentReducer([], action)).to.eql(['new comment']);
  });
});
```

## Testing actions
```js
import { expect } from '../test_helper';
import { SAVE_COMMENT } from '../../src/actions/types';
import { saveComment } from '../../src/actions';

describe('actions', () => {
  describe('saveComment', () => {
    it('has the correct type', () => {
      const action = saveComment();
      expect(action.type).to.equal(SAVE_COMMENT);
    });
    it('has correct payload', () => {
      const action = saveComment('new comment');
      expect(action.payload).to.equal('new comment');
    });
  });
});
```

repository: bigappleinsider/react-testing

repo_name: bigappleinsider/react-testing


text:
# Workout-Tracker-NoSQL

This application is a Workout tracker that allows a user to create,track and view daily workouts, and log multiple workouts in the same day. The data collected from the user is
then displayed on the stats page as charts and graphs.

## User Story

* As a user, I want to be able to view create and track daily workouts. I want to be able to log multiple exercises in a workout on a given day. I should also be able to track the name, type, weight, sets, reps, and duration of exercise. If the exercise is a cardio exercise, I should be able to track my distance traveled.

# Deployed Link
[Live Site](https://serene-gorge-47840.herokuapp.com/?id=603546b59a0599001537a6e6)

# Demo From LocalHost
![Demo-Gif](https://github.com/TheCoaxial/Workout-Tracker-NoSQL/blob/master/Demo.fitness.gif)

# License
Begin license text.
Copyright 2021 Cory Scanlon

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.

End license text.

# Author
### Cory Scanlon

repository: TheCoaxial/Workout-Tracker-NoSQL

repo_name: TheCoaxial/Workout-Tracker-NoSQL


text:
# Changelog

## 1.1.0
* Add two modes
   * `MODE_SONG_UNSTOPPABLE`: The song will completely play through
   * `MODE_SONG_STOPPABLE`: The song can be stopped while playing
* Add startup sound to know when program is booted
* Rename variable `mode` to `state`

## 1.0.0
* Current state of violin jukebox and this Changelog

repository: yarunluon/violin-jukebox

repo_name: yarunluon/violin-jukebox


text:
---
title: Installation on RedHat/Centos/Oracle Linux Enterprise
---

{{< hint type="warning" >}}
This page hasn\'t been updated for a while, and it\'s probably obsolete.
{{</ hint >}}

{{< hint type="danger" >}}
- Do not forget to change the default username/password.
- Do not allow everybody to access the directory `data` from the URL.
- Enable `.htaccess` if you use Apache (Option `AllowOverride All`).
- This is your responsability to configure your server correctly.
{{</ hint >}}

Centos 7
--------

Install PHP and Apache:

```bash
yum install -y php php-xml php-mbstring php-pdo php-gd unzip wget
```

By default, Centos 7 use PHP 5.4.16 and Apache 2.4.6.

Restart Apache:

```bash
systemctl restart httpd.service
```

Install Kanboard:

```bash
cd /var/www/html

# Download the latest release from https://github.com/kanboard/kanboard/releases
wget https://github.com/kanboard/kanboard/archive/v<version>.zip

unzip kanboard-<version>.zip
chown -R apache:apache kanboard-<version>/data
rm kanboard-<version>.zip
```

SELinux restrictions
--------------------

If SELinux is enabled, be sure that the Apache user can write to the
directory data:

```bash
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/kanboard/data(/.*)?"
restorecon -r -v /var/www/html/kanboard/data
```

Be sure to configure your server to allow Kanboard to send emails and
make external network requests, for example with SELinux:

```bash
setsebool -P httpd_can_network_connect=1
```

Allowing external connections is necessary if you use LDAP, SMTP, Web
hooks or any third-party integration.

repository: kanboard/documentation

gha_language: CSS

repo_name: kanboard/documentation


text:
# CafeBazzar InAppBilling For Godot 3.1.Dev
In this repository we implement some classes to connect and communicate with CafeBazaar In App Billing Service
# How To Use ?
In this section we explain how to use these classes for creating a connection
## Step 1 : Add CafeBazaarIAB Permission
You need to open your export settings ( `Project -> Export` ), and add an android export or select it in case you created one before, go to the `User Permissions` section at the bottom of the fields of the `Options` tab and fill the first empty permission by this value:
> com.farsitel.bazaar.permission.PAY_THROUGH_BAZAAR
## Step 2 : Set Android Export Templates
To export or test your game IAB Implementation, you need to add our export templates to your export settings.
Open android export like you did in Step 1, and go to the `Custom Package` part of the `Options` section, then select **debug** and **release** apk files available in **Android Templates** directory.
## Step 3 : Add GDScripts To Resources
Paste GDScripts into resource directory and link `CafeBazaar.gd` to a simple node on the scene to communicate with it.
## Step 4 : Usage
Just get that node linked to `Cafebazaar.gd` and use its methods :

Method Name | Description
--- | ---
startSetup (String key) | Connect to The Cafebazaar IAB Service and get ready for working with that and emit `on_iab_setup_finished` signal when getting response from Cafebazaar.
launchPurchaseFlow (String skuID, String developerPayload) | Open Cafebazaar purchase dialog and emit `on_iab_purchase_finished` signal at the end.
consumeAsync (Purchase purchase) | Consume a consumable stuff whenever you want, you can do it at end of purchase. This method emits `on_iab_consume_finished` signal at the end.
queryInventoryAsync (bool skuDetailsFlag, List skuList) | Returns skuList items info from Cafebazaar and you can use it when `on_query_inventory_finished` is emitted.

**Note : The second signals param will be a string consisting "Null" value if operation is not successful, so check the results at the first step.**
# Java Classes
If you have added some android modules, and have your own custom templates, use our java classes to combine your template and ours. Compile instructions for android modules are available in [Godot Documentation](http://docs.godotengine.org/en/3.0/development/compiling/compiling_for_android.html).


text:
# GCJ

Automation scratching and riddle solutions for Google's Code Jam contests from 2010-2018 (where they moved to the online interactive session)

And solutions to the online submissions I did from 2019-2020

### Prerequisites

python 3 (not using anything (non standard that is))

## Running the old automated go.py tool

running

python go.py

will give you the following message:

usage: go.py [-h] [-i {Y,N,S}] [-v] ID contest stage problems

this is a standard parsing implementation, running the -h (help) option gives:

positional arguments:
  ID                    Googles URL parameter defining the stage
  contest               Master folder for the stage (usually year)
  stage                 Name of the stage to be run
  problems              List of problems to be solved, defaults to ABC

optional arguments:
  -h, --help            show this help message and exit
  -i {Y,N,S}, --interact {Y,N,S}
                        fully interact ('Y') just submit ('S') or have no
                        interaction ('N') with the site
  -v, --version         show program's version number and exit

it uses faylixes java GCJ automation under the hood which in turn opens firefox for account login

note: this whole process has been deprecated since 2017 and is now only usable for legacy contests

### file conventions

Folders are kept under the format

download/year/stage - other contestants code I learned from

src/year/stage - my code per year (2010-2018) and stage name (qual, firsta, firstb, seconda, etc...)

under each of these folders (say the contest contains an A riddle) there will be files dubbed:

 A.py - code for solving A accepting std input output, etc...
 A-definition-0.in - input defintion
 A-definition-0.example - expected output
 A-input-0.out - A.py's generated output
 A-large/small-0...9-in/out - input and output files for the attempts

 An additional legend file is generated by my scraping GCJ JavaScript which contains the riddle names

Apart from the special go folder which contains the above described automation tool

The go folder under src, also includes a template X.py program that was used as a starting point for all the actual solutions I wrote as well as some other tidbits I maintained including a contest preplist a TODO list and a scraper JavaScript to be used under tampermonkey.

### tamper monkey script

Installation is quite easy but once installed a button will appear once you open the contest page, pressing seth button will download all input/output files

## License

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

## Acknowledgments

* Hat tip to anyone who's code was used (Faylixe, that means you)
* Inspiration
* etc...

repository: veltzerdoron/GCJ

repo_name: veltzerdoron/GCJ


text:
YMTVersionAlert
====

This framework compares the latest application version of AppStore with the application version of the terminal and displays a warning prompting for update.

## Description
People always want to deliver the latest value, but some people do not update.
Developers need to inform those who do not know that the latest version has been released.
Howeverm obtaining a version from the App Store and comparing it with the version installed on the terminal is not a difficult implementation, but it will take a while.
Therefore we created a framework to easily compare application versions and display alerts to prompt for updates.

## Installation
Just add YMTVersionAlert foloder to your project

or use CocoaPods with Podfile:
```
pod 'YMTVersionAlert'
```

## Usage
Import

```ViewController.swift
import YMTVersionAlert
```

Set Option Parameters

```ViewController.swift
let versionAlert = YMTVersionAlert()

//Always display an alert for Debug
//Default:false

versionAlert.setDebugFlg(true)

//Change the alert sentence to an arbitrary one
//Defaults
//Alert title : "New version released"
//Alert Body  : "To use the application comfortably please update it."
//Install Btn : "Now install"
//Later Btn   : "Later"

versionAlert.setAlertText(setTitle: "***", setBody: "***", setNowInstall: "***", setLaterInstall: "***")

```

OpenAlert
※Run it after viewDidAppear.

```ViewController.swift
override func viewDidAppear(_ animated: Bool) {
	super.viewDidAppear(animated)
	let versionAlert = YMTVersionAlert()
	versionAlert.openVersionAlert(self, storeId: "StoreId", forceUpdate: false, callback: nil)
}
```

## Licence

[MIT](https://github.com/MasamiYamate/YMTVersionAlert/blob/master/LICENSE)

repository: MasamiYamate/YMTVersionAlert

repo_name: MasamiYamate/YMTVersionAlert


text:
## <img width="20%" height="20%" src="_media/logo_transparent.svg" />

> The progressive micro front end library

- Simple and lightweight
- Friendly to beginners
- Flexible and easy to extend

[GitHub](https://github.com/ObviousJs/obvious-core)
[API](#API)
[Get Started](#Introduction)

![color](#f0f0f0)

license: MIT,ISC

repository: hahajuzi/obvious

detected_licenses: MIT ISC

repo_name: hahajuzi/obvious


text:
# Prefresh-core

**Experimental package**

[![npm version](https://badgen.net/npm/v/@prefresh/core)](https://www.npmjs.com/package/@prefresh/core)

We are still fleshing out the details on how to go about this approach best for [Preact](https://github.com/preactjs/preact), we'd
love to give you the best reloading experience possible.

Note that now the refreshing component will dispose of its `hookState` to reload in case of added hook, ... this to ensure consistency.

## How to use

This plugin will set up a series of hooks onto the webpack instance, so the first thing
to do is ensure that this package is part of your entries.

This will add a method on the window `window.__PREFRESH__.replaceComponent`, this function
expects two arguments. The first being the old `class/function` and the second the new one.

This will go over all vnodes it knows for the `oldType` and rerender them according to the
`NewType`.

## Uncertainties

- [x] component altering lifecycles
- [x] error recovery
- [x] class components
- [x] functional components
- [x] hook swapping
- [x] avoid triggering effects for added dependencies
- [x] transition better from Functional --> class and other way around
- [x] provide fallback if no hot modules/no preact modules (window.location.reload())
- [x] custom hooks


text:
# hexo-theme-simple

## Introduction

This theme is based on [microb](https://github.com/microacup/hexo-theme-micorb),I made some change of the theme and added some features.

* add function of taking count of pv and uv based on [busuanzi](http://ibruce.info/2015/04/04/busuanzi/) .

* change the logo click event and some style.

* add sitemap for google and baidu.

## Usage

* at first, you should install hexo.

* execute ` hexo init blog_dir_name ` to create a blog dir.

* into blog root dir and change `_config.yml`'s property of theme to `simple`.

* finally,copy this theme to your blog's theme dir.

repository: zhongyp/hexo-theme-simple

repo_name: zhongyp/hexo-theme-simple


text:
Android Libraries and Resources
===============================

List of awesome libraries, tools and other resources for android app development. Organized and categorized for filtering and searching. [http://alamkanak.github.io/android-libraries-and-resources](http://alamkanak.github.io/android-libraries-and-resources).

branch_name: refs/heads/gh-pages


text:
---
hrs_structure:
  division: '1'
  volume: '1'
  title: '1'
  chapter: '10'
  section: 10-2
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0010-0002
    parent: HRS0010
    name: 10-2 Definitions
weight: 18010
title: Definitions
full_title: 10-2 Definitions
---
**§10-2 Definitions.** In this chapter, if not inconsistent with the context:

"Administrator" means the administrator of the office of Hawaiian affairs.

"Beneficiary of the public trust entrusted upon the office" means native Hawaiians and Hawaiians.

"Board" means the board of trustees.

"Grant" means an award of funds by the office to a specified recipient to support the activities of the recipient for activities that are consistent with the purposes of this chapter.

"Hawaiian" means any descendant of the aboriginal peoples inhabiting the Hawaiian Islands which exercised sovereignty and subsisted in the Hawaiian Islands in 1778, and which peoples thereafter have continued to reside in Hawaii.

"Native Hawaiian" means any descendant of not less than one-half part of the races inhabiting the Hawaiian Islands previous to 1778, as defined by the Hawaiian Homes Commission Act, 1920, as amended; provided that the term identically refers to the descendants of such blood quantum of such aboriginal peoples which exercised sovereignty and subsisted in the Hawaiian Islands in 1778 and which peoples thereafter continued to reside in Hawaii.

"Office" means the office of Hawaiian affairs.

"Recipient" means any organization or person receiving a grant. [L 1979, c 196, pt of §2; am L 1990, c 304, §§3, 16; am L 1992, c 318, §2; am L 1997, c 350, §§14, 15; am L 2002, c 182, §2]

Law Journals and Reviews

The Lum Court and Native Hawaiian Rights. 14 UH L. Rev. 377.

Case Notes

Definition of "Hawaiian" does not violate equal protection. 631 F. Supp. 1153.

Act 304, L 1990, was invalidated by its own severability clause when amendment to this section by Act 304 was found to conflict with the federal Forgiveness Act (Pub. L. No. 105-66, §340, 111 Stat. at 1448), leaving court with no judicially manageable standards to determine whether office of Hawaiian affairs was entitled to the specific revenues sought in the suit. 96 H. 388, 31 P.3d 901.

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
---
layout: post
title:      "All I'm Asking is for a Little RSpec, Part I: Reducing Duplication"
date:       2019-04-22 04:00:56 +0000
permalink:  all_im_asking_is_for_a_little_rspec_part_i_reducing_duplication
---

## The wrong ways to do it

With RSpec, there are three general ways to avoid duplication - initializing the same variables over and over again - in writing test units. The last way is better than the others.

### 1. Using  `before` with instance variables.

```
RSpec.describe Cat do
  before do
    @cat = Cat.new('Garfield', 'orange')
  end

  it 'has a name' do
    expect(@cat.name).to eq('Garfield')
  end

  it 'has a color' do
    expect(@cat.color).to eq('orange')
  end
end
```

The `before` block reinitializes the `@cat` instance variable before each example, but it's not efficient to initialize it over and over again. Furthermore, if the programmer uses the wrong instance variable name in the test, variable will be returned as `nil`, instead of throwing a more specific error message.

### 2. Helper methods

```
RSpec.describe Cat do
  def cat
	  Cat.new('Garfield', 'orange')
	end

  it 'has a name' do
    expect(cat.name).to eq('Garfield')
  end

  it 'has a color' do
    expect(cat.color).to eq('orange')
  end
end
```

The above code defines a local method `#cat` that creates a new instance of cat and returns it whenever it's called. The problem with using a helper method to reduce duplication is that you will get errors when trying to change the object's properties by calling the method with setters.

My next post will go into more detail on the third and final method.

extension: markdown


text:
# Conference_page_Christiana_and_Funke

## Description

This conference page was designed collaboratively.

## Live Demo

[See project live here] (https://raw.githack.com/GirlWeySabi/Conference_page_Christiana_and_Funke/home/index.html)

## Dependencies

###### Text Editor used: VScode

## Languages

- HTML
- CSS
- Javascript

## Visuals

![Display _of_Home_Page](/assets/images/ConferencePage.PNG "Display_of_Home_Page")

## Author

### Christiana Okere A.K.A. _GirlWeySabi_ & Olufunke Owoseni

###### LinkedIn: https://bit.ly/Christiana_Okere_

###### https://www.linkedin.com/in/olufunke-owoseni-120307188/

###### Twitter: https://bit.ly/2ELfXZb

###### https://twitter.com/Olufunk08326267

###### GitHub: https://github.com/GirlWeySabi

###### https://github.com/olufunke1011

## Acknowledgement

- GitHub: @Chiomy @Gnwin
- Twitter: @hub_mic


text:
# Docker Pushmi-Pullyu

A script to copy Docker images directly to a remote host without using Docker
Hub or a hosted registry.

The implementation pushes images to a temporary local registry then pulls them
to the remote host through an SSH tunnel. This takes advantage of Docker's
layer-based cache to avoid superfluous network I/O.

![Dr. Dolittle's pushmi-pullyu](pushmi-pullyu.png)

license: Unlicense

repository: mkantor/docker-pushmi-pullyu

gha_language: Shell

gha_license_id: Unlicense

repo_name: mkantor/docker-pushmi-pullyu


text:
```scheme
(define (sum term a next b)
  (if (> a b)
      0
      (+ (term a)
         (sum term (next a) next b))))
```

The sum procedure above generates a linear recursion.
The procedure can be rewritten so that the sum is performed iteratively.
Show how to do this by filling in the missing expressions in the following
definition:

```scheme
(define (sum term a next b)
  (define (iter a result)
    (if (> a b)
        result
        (iter (next a) (+ result (term a)))))
  (iter a 0))
```

repository: kenspirit/SICP

repo_name: kenspirit/SICP


text:
---
layout: blog_contents
title: About ToKnot Password Generator
categories: blog
---

**About ToKnot Password Generator**

1. The password generator can generate unique, security, complex, and passwords without memory
2. The value of the website name is similar to toknot in http://www.toknot.com;
3. Website name input http://www.toknot.com/ and www.toknot.com will generate different passwords
3. All input items, different values will generate different passwords; the reset button will clear the locally stored values
4. Please remember your key, forgetting the key will cause you to lose the password you generated;
5. Website Url / or name, if you enter a URL, then only the website name in the URL will affect the generated password
6. The same parameters will generate the same password \ n7. The passwords generated by the extreme version and the full version cannot be shared. There are fewer parameters to be filled in the extreme version. The full version can respond to the generation of special passwords. Same password security for production

[Download Andorid App](http://page.toknot.com/get-gpassword.php)


text:
# LessStupidRomanceAttempt

![Image](https://i.imgur.com/buuPQel.png)

Update of Dazz Aephiex mod
https://steamcommunity.com/sharedfiles/filedetails/?id=1307659290

- Removed legacy HugsLib requirement

![Image](https://i.imgur.com/pufA0kM.png)

![Image](https://i.imgur.com/Z4GOv8H.png)

I long stopped playing rimworld myself and probably won't update any of these. Source code is included in the mod file and anyone can update and reupload without asking me for permissions. This mod will stay up for v1.0.

============================================================

Q1: Will you court a girl/boy that already has a stable relationship?
Q2: Will you court a girl/boy that rebuffed you just an hour ago?
Q3: Will you court a girl/boy when you have been rebuffed by another girl/boy just an hour ago?

Well. Your pawns will.

Features:
- One cannot perform or targeted by romance attempt if they have +25 or greater opinion to their current lover.
- One cannot perform romance attempt if recently rebuffed by someone, as long as "rebuffed by someone" mood modifier hasn't expired.
- Romance control over gays and lesbians:
  1. One is more likely to rebuff if the performer is not their ideal gender.
  2. One is twice more likely to breakup if current lover is not their ideal gender.
  3. One will never perform marrage proposal if current lover is not their ideal gender, and will always reject marrage proposal.
- Fixed psychopath by the way:
  1. Psychopath will no longer mind if any other people and/or animals are killed: no matter how close they were; exactly what the description says.
  2. Psychopath will no longer have their mood or opinion to other people adjusted according to their romance relationship status.

Incompatibility: Psychology *(Psychology has already reworked romance mechanic, and I don't even know if this mod is still required if you have it.)*
Old Save Compatible: Yes
Safely Removable: Yes

![Image](https://i.imgur.com/PwoNOj4.png)

-  See if the the error persists if you just have this mod and its requirements active.
-  If not, try adding your other mods until it happens again.
-  Post your error-log using https://steamcommunity.com/workshop/filedetails/?id=818773962]HugsLib and command Ctrl+F12
-  For best support, please use the Discord-channel for error-reporting.
-  Do not report errors by making a discussion-thread, I get no notification of that.
-  If you have the solution for a problem, please post it to the GitHub repository.


text:
# SFLibrary

A swift helper Library that help you to have better programming life and make projects faster and easier

Version 0.2.3

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

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements
SFLibrary works on iOS 9+ , swift 4

## Installation

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

```ruby
    pod 'SFLibrary', :git => 'https://github.com/SattarFalahati/SFLibrary.git'
```

## Author

Sattar Falahati

<EMAIL_ADDRESS>
## License

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

repository: SattarFalahati/SFLibrary

repo_name: SattarFalahati/SFLibrary


text:
---
title: Ad Generator - Thoughts after first commit
slug: ad-generator-thoughts-after-first-commit
date_published: 2014-02-03T03:05:13.000Z
date_updated:   2015-11-07T15:48:17.842Z
draft: true
---

The First Iteration

I started the Ad Generator pretty roughly focusing only on getting 3 ads out by the door.  It took around 6 hours straight to come up with the code and a few more hours of editing photographs (courtesy of my wife). The ad generator was not a full program, it was just raw python code combined with some yaml files for configuration purposes.

All this tedious processing bared unseen fruits when in my day job I created a new script for generating a special xml file to be used with TopServer.  Nevertheless, this unrelenting crunching of code led me to a path of inexorable pain as I tasted the result of not creating proper architecture, even for such a small of scripts.

Don't fret over small business.

I crunched 10 more ads which resulted in 10 painless and successful and great tasting sales. Sweet, as a nice warm cup of tea and honey with a side of bread and jam and not cinnabon sweet but sweet nonetheless. Suddenly I could dedicate my time and effort to giving a more delicate and thoughtful customer service, and life was good. The ad generator, in its primitive and raw state was a great idea but it needed to grow into a more mature process and for that sleepless night of productivity and coffee would be necessary.

It all continued with my day job as I crunched more and more of that script that started burping tens of thousands of lines of lines horrid xml. As a yaml and json advocating person watching xml is like seeing a man being cooked on a brazen bull while feeling his excruciating pain. My day job script needed an UI, and I looked over to python which eventually took me to Kivy. My boss in a weird turn of events gifted me with Roberto Ulloa's book on Kivy.

Will you use it for work?

Yes.

Then don't pay me the book.

There are so many ideas rambling in my head of how to use Kivy for my workplace and most of them relate to generating  special tools to make better deployment of our products, alas that is not a subject for here. Kivy is a beautiful tool to creating UI/UX experiences using the KV languaje paired with Python code and even though I'm still learning the ropes and then some, it is by creating tools to help us solve our problems that we will succeed in making our work in less time and thus in less money and effort. It is by spending less money that we can earn more money and by earning more money we could just get a little ahead so I can build a decent computer to play gta 4 will superb mods.

The Structure of the First Iteration

The Model looked something of an aberration which was a product of the Jörmungandr and HTML who had a twin that looked like the offspring of a Fairy and yaml.  Don't get me wrong, both of them got the job done, but software is a terrible business for the hideous and in this place only the pretty, well structured, smart, and knowledgeable will mature into giants while others wither and die like old men from the cold lands. Sadly there is no such things as vaccines for software, no enfagrow to ensure a better core development and we are left to knowledge spread in books who are precocious and with so many different options to begin development that after so much reading and bleeding through your eyes you will be left full of fears and warnings even worse than when you started.

Who says there were born better?

More successful

Because success is impervious to a bad beginning, to be successful sometimes you gotta push through.

Then why don't push through this?

There is no pushing through software in one sitting, you gotta know the development cycle, and accept that the end will only result in a new beginning as you did with you first script and now you want to make it better, more mature. Once you know the fuzzy future in the firmament you know there is only more future and as soon as you accept that the future is plagued with work, maintenance, taxes, and more future until death then the sooner you can start pre processing the future in the present until you come up with a cycle that you can control.

So, to death it is?

What if there is no one?

 Such is the price of results I'm afraid.

Why is it so crappy if it works?

Because making a GUI for it makes it crappier. There is no such thing as smart growing for something like this. Fortunately in the world of engineering we are gods playing with words, symbols and formulas as we see fit until they become a force to be reckoned with and this is no exception. For all the hours I take right now will translate into less hour when taking this horrid monster into the next level.

The next model

The User Model

I want to be the user and not the programmer just as any guy wants to be the lover and not the fan and just as any wants to be the hero and not the random cop that died mercilessly. And as a user I demand the following:

I want to have all my ads listed on screen, this thing has to remember me because I have a shitty memory

List of ads per user

This thing should remember where I want my images stored, either locally, in a remote server, dropbox, whatever. And you better make this thing secure tiger or else it will be row duty on the galleons for you.

List of communications with encrypted passwords

Oh yeah the name and description by ad are a yes

Name, Description ok

List of images and photos, cool

List of images, photos, with formats, ok

What... I can't change my ad terms of sales? Whatz diz? Change diz immediately herr cruncher programmer.

Custom politics per ad

No custom css objects for moi? No sugar for toto?

List of css objects so user may extend

Arrrrrg what's with the uneditable, unextendable, unforgettable plaster of html

Html should be as modular as possible

The Ad Manager Model

Because every user should have lots of ads, then we should have a model where all ads are located.

The Skeleton Model

Gone should be the days were html is plastered on a single config file and begone to another model I cast you oh css objects  from hades. This would translate to a model that has a list of css objects and mechanisms to reuse the html code.

When will the next iteration be ready

February 3rd my boy

February 3rd

in one commit


text:
# Bob Loblaw Law Blog

#### Bob Loblaw Law Blog for Epicodus, 03.14.2018

## By Aaron Akbari-Mort, Isaac Shoman

[Link to project.](https://ishoman.github.io/isaac-shoman-portfolio/),
[Link to project.](https://ishoman.github.io/isaac-shoman-portfolio/),

## Description

A simple HTML, and CSS site for Bob Loblaw Law to practice CSS div styling.

## Setup

* Clone this repository
* Open in a Web Browser to view the site
* Open in a Text Editor to view the code

## Technologies Used

* HTML
* CSS
* Git
* GitHub

### Legal

**Copyright (c) 2018 Aaron Akbari-Mort & Isaac Shoman**, All Rights Reserved.

This software is licensed under the _MIT license_.

repository: ishoman/survey

repo_name: ishoman/survey


text:
# Anekdotes File

[![Latest Stable Version](https://poser.pugx.org/anekdotes/file/v/stable)](https://packagist.org/packages/anekdotes/file)
[![Build Status](https://travis-ci.org/anekdotes/file.svg?branch=master)](https://travis-ci.org/anekdotes/file)
[![StyleCI](https://styleci.io/repos/54150642/shield?style=flat)](https://styleci.io/repos/54150642)
[![License](https://poser.pugx.org/anekdotes/file/license)](https://packagist.org/packages/anekdotes/file)
[![Total Downloads](https://poser.pugx.org/anekdotes/file/downloads)](https://packagist.org/packages/anekdotes/file)

A library that provides an easy way to manipulate files for common uses such as move, rename etc.

## Installation

Install via composer into your project:

```
composer require anekdotes/file
```

## Usage

Use the class where ever you need it:

```php
use Anekdotes\File\File;
```

Note : This requires autoloading namespaces. Using composer to do autoloading helps a lot.

### Methods

Multiple static methods are available:

#### get

Get the content of a file.

* **$path**: path of the file
* **$default**: closure or string

```php
File::get($path, $default = null);
```

#### exists

Check if file exists.

* **$path**: path of the file

```php
File::exists($path)
```
#### Put

Create a new file.

* **$path**: path of the desired file location
* **$contents**: content of the file

```php
File::put($path, $contents)
```

#### size

Get the file size in bytes.

* **$path**: path of the file

```php
File::size($path)
```

#### delete

Delete a file.

* **$path**: path of the file

```php
File::delete($path)
```

#### move

Move/rename a file.

* **$path**: path of the file to move
* **$target**: target of the file

```php
File::move($path, $target)
```

#### copy

Copy a file.

* **$path**: path of the file to copy
* **$target**: target of the file

```php
File::copy($path, $target)
```

#### extension

Get the file extension.

* **$path**: path of the file

```
File::extension($path)
```php

#### isDirectory

Check if path is a directory.

* **$path**: path of the directory

```php
isDirectory($directory)
```

#### glob

Returns an array of all files/folder inside a directory

* **$path**: path of the directory

```php
File::glob($path)
```

#### directories

Returns an array of all folders inside a directory

* **$path**: path of the directory

```php
File::directories($path)
```

#### files

Returns an array of all files inside a directory

* **$directory**: path of the directory

```php
File::files($directory)
```

#### isFile

Check if path is a file.

* **$path**: path of the file

```php
File::isFile($file)
```

#### makeDirectory

Create a directory.

* **$path**: desired path
* **$mode**: folder mod

```php
File::makeDirectory($path, $mode = 0777)
```

#### deleteDirectory

Delete a directory.

* **$directory**: path of directory

```php
File::deleteDirectory($directory)
```

repository: anekdotes/file

repo_name: anekdotes/file


text:
# CaptureQuick

This software is a graphical UI for the controlling of the camera capture rig that was designed and built by
Konsta Hölttä for his [master's thesis](https://github.com/sooda/thesis). It is a setup that consists of (at the moment)
9 Canon 700D DSLRs.

CaptureQuick allows the user to see a live view of the cameras, control basic settings such as the ISO, shutter speed
and aperture and of course to capture images.

## Requirements

### System

The code was written and tested on Mac OS X. With only a few minor changes it will also run on Linux and Windows.
If you want to use it on any of the latter, contact me and/or send a pull request.

### Software

* A C++11-capable compiler and libc++
* CMake (>= 2.8.11)
* Qt 5 (tested with 5.4)
* libgphoto2 (tested with 2.5.7)

## Basic Build Steps

* Create an empty directory for the build
* Execute `cmake <path-to-capture-quick-root>` out of the build directory
  * If successful you should have a Makefile now
* Compile with `make`

If you want to deploy the build to another machine, take a look at the README.DEPLOY.md file.

For more verbose install instructions, take a look at the INSTALL.md and INSTALL_OSX.md files.

repository: dthul/capture-quick

repo_name: dthul/capture-quick


text:
# App development boilerplate for OKE with Autonomous Database and Streaming

This is a template repository with a working demo project to showcase building a micro-services-based application in a remote cluster environment.

The OCI Service Broker lets you provision PaaS services like Autonomous Database, Streaming or Object Storage via Kubernetes manifests. When working with those external PaaS services, it is difficult to simulate them in a local environment, so it is often required to develop in a remote cluster.

This repository provides tooling and an example application to manage such a development project on OKE, using underlying tools like Kustomize and Skaffold to develop, debug and deploy to production.

It lets you:

- Run a development deployment with live code sync with the container in the remote cluster.
- Run a debugger in the live container in the remote cluster.
- Manage image tags for dev (per branch), debug or production automatically, allowing deployment of uncommitted (dirty) changes to a dev environment, and tags based on commit hash for production.

## Example micro-service architecture

The core of this repository is to showcase a typical setup and workflow to develop, debug and deploy a micro-services architecture in a kubernetes remote cluster, using external PaaS services like Autonomous Database and Streaming.

The repository contains 3 services for demo purpose, however the tooling implemented is meant for any such type of project.

!["app"](./docs/app.png " ")

## How to use

Use this repository as a template by clicking the **Use this Template** button.

## Repository structure

The repository has the following structure:

```bash
├── README.md
├── global.env
├── makefile
├── makefile.common
├── makefile.python
├── terraform
|   └──
├── k8s
│   ├── base
│   └── overlays
│       ├── branch
│       ├── development
│       ├── production
│       └── staging
├── scripts/
└── images
    ├── consumer
    ├── producer
    ├── db-config
    └── web
```

- The `terraform` folder contains the terraform scripts to provision the credentials required to develop and deploy

    This includes:
    1. an OCI user with credentials to push Docker images to a tenancy-wide OCI private registry
    2. an OCI user with private key and API key to interact with an OKE cluster
    3. Since the project makes use of the Streaming service, it includes a user with credentials specific to this service.

    The terraform takes an existing OKE cluster OCID and creates the users and credentials, as well as `Secrets` in the base kubernetes manifests.

    If you do not have permission to create users, provide your user_ocid for each of the users.

- The `k8s` folder contains the kubernetes manifests to deploy the project. It is using `kustomize` with overlays to templatize for 3 environments: `development`, `staging` and `production`.

- The `scripts` folder contains scripts used for setup and for CI

- The `image` folder contains the demo application Docker source code for each service. In our example, that includes 3 services `consumer`, `producer` and `web`, as well as a database config initContainer `db-config`.

## Getting started

To get started, you'll need an OKE cluster deployed with OCI Service Broker.

See this repository to setup a production ready OKE cluster with OCI Service Broker: [https://github.com/oracle-quickstart/oke-with-service-broker](https://github.com/oracle-quickstart/oke-with-service-broker)

If your user is not privileged enough to deploy this repository, follow the instructions to provide your own user.

Once you have deployed an OKE cluster as per the above:

### Create additional user credentials using the terraform

- Go to the `terraform` folder.
- Create a `terraform.tfvars` file from the `terraform.tfvars.template`
- Edit the `terraform.tfvars` to provide:

    ```bash
    tenancy_ocid = "ocid1.tenancy.oc1.."
    compartment_ocid = "ocid1.compartment.oc1..."
    region           = "us-ashburn-1"

    # cluster ID of the cluster created with the oke-with-service-broker deployment
    cluster_id = "ocid1.cluster...."
    ```

- If you are an admin or privileged user to create new users, leave the other variables as `null`
- If you are not a privileged to create groups, provide the groups OCIDs with the proper policies to create the required users.
- If you are not privileged to create users, provide the proper user OCIDs of users that are in groups with proper policies. (Inspect the `main.tf` to see the users and policies required).

- If you do not have access to specific users for each task, you can use your own user (for testing/demo purpose only. This is not recommended for security reasons).
    1. Fill in each required `###_user_ocid`.
    2. If you already have any auth_token associated with this user, provide the token for each `###_auth_token` as you will not have enough open slots to create new tokens. You can use the token created during creation of the cluster with `oke-with-service-broker` if you supplied your own user when deploying and created a token.
    3. You also need to have at most 2 API keys associated with your user, or you should comment out the section in `main.tf` that creates the `ci_user` and requires the creation of an API key.

- Run `terraform init` then `terraform plan` and if all look right, run `terraform apply` (confirming with the `yes` to run the deployment)

## Tooling

The keys functions are integrated into a `makefile` that wraps many commands for ease of use.

### Application-wide makefile

The root folder includes a `makefile` to run application-wide functions. Run `make` on the root to get the help text:

```bash
help                           This help.
build                          Build, tag and push all images managed by skaffold
deploy                         Build and Deploy app templates
deploy-infra                   Build and Deploy infra templates
delete                         Delete the current stack
delete-infra                   Delete the current stack
setup                          Setup dependencies
render                         Render the manifests with skaffold and kustomize
check-render                   Check if the current render matches the saved rendered manifests
clean-completed-jobs           Clean completed Job. Skaffold can't update them and fails
clean-all-jobs                 Clean any Job. Skaffold can't update them and fails
run                            run the stack, rendering the manifests with skaffold and kustomize
debug                          run the stack in debug mode, rendering the manifests with skaffold and kustomize
dev                            run the stack in dev mode, rendering the manifests with skaffold and kustomize
install-all                    Install environments for all projects
lint-all                       Lint all python projects
repo-login                     Login to the registry
```

Since development tooling like Skaffold deploy and destroy the environment it manages when developping, the infrastructure services that need to be deployed once are deployed separately. The `deploy-infra` command deploys the kubernetes manifests for the infrastructure services in a given environment, passed as `ENVIRONMENT=<environment>` (either `development` (default), `staging`, or `production`)

You must deploy the infrastructure in a given environment before attempting to deploy the application.

The `build` and `deploy` commands build and deploy the kubernetes manifests for the application a given environment, passed as `ENVIRONMENT=<environment>` (either `development` (default), `staging`, or `production`)

### Service specific makefile

Each service folder also includes its own `makefile` for image specific tasks. Run `make` for the help text.

It specifically simplify some of the testing / linting tasks.

*Note: Skaffold manages all images together so this makefile is merely offered here for standalone development purpose.*

### Deploying the infrastructrue

The project is divided into 2 sub-project: the application and the supporting infrastructure (Autonomous Database and Streaming service). The infrastructure is deployed separately, so it is not deployed and torn down at each dev deployment.

Before deploying the infrastructure, make sure to generate a new set of passwords for those services, by running:

```bash
./scripts/gen_pwd.sh
```

To provision the infrastructure for the `dev` environment (the default), then use:

```bash
make deploy-infra
```

To deploy in another environment (for example `production`), use:

```bash
make deploy-infra ENVIRONMENT=production
```

### Deploying the application

To deploy in the dev environment, use

```bash
make deploy
```

This will build the application images, push them to the OCI Registry and deploy the application manifests to the production environment.

### Checking the app in the browser

1.

    If you scale the number of `producer` pods, you will see multiple streams of randomly generated data.
    The data is pushed to a stream, picked up by the consumer app and stored in the database. The web application gets notified of changes and uses server push to update the UI.

### Developping with Skaffold

To run the stack in development mode, which allows to stream the logs to the console, deploy uncommitted changes, and especially live update code files in the remote container use:

```bash
make dev
```

This will launch the Docker image using a specific layer that implements auto-reload for the code files, restarting the container in any code change. Image tags for the auto-relaod layer are prefixed with `arl-`

When working in a feature branch, this command will apply a suffix to the containers, so that multiple branch deployments can share the same infrastructure in the same namespace (the dev-ns namespace)

### Debugging containers in the remote cluster

Skaffold offers the capability to debug remote containers.

Use:

```bash
make debug
```

To launch the stack in debug mode. This will attach a debugger to each running application pods, using a specific layer of the Docker image to inject it. Images tags for the debugger layer are prefixed with `dbg-`

See the VS Code template to configure the debugger in the VS Code editor.

## Git flow

The git flow assumed for this repository is the following:

- `master` is the production branch, and the latest release runs in the `production` kubernetes environment.
- Production releases are tagged in the `master` branch.
- The only time master may be out-of-date with production is between merging latest bug fixes and features, and cutting a new release.
- `development` is the branch where pre-release (but working) features live. The `development` branch is deployed on a `staging` environment (and namespace) for manual and integration testing.
- Developers work on feature branches (typically named `feature/<name>`). Container suffixes will reflect the branch name in the `dev-ns` namespace so there is no conflicts. When a feature is finished, it is merged into the `development` branch.
- Bug fixes discovered during testing on staging are branched from the `development` branch under a `bugfix/<name>` branch, and merged back into `development` when finished.
- Hot fixes found in production are branched from the `master` branch under a `hotfix/<name>` branch, and merged back into `master` and `development`
- Upon merging of one or more hot fixes, or merging the `development` branch with new features, a new release is cut and tagged on `master`.
- Upon release, the `master` branch code is deployed to the production kubernetes environment.

This is obviously assuming one `production` environment and one product (i.e. not a multi-platform release )

## Continuous Integration / Continuous Deployment

The repository (can) makes use of Github Actions to test services and build images.

The automated test and build follows the git flow logic and behaves as follows:

- A Github Action runs on opening a Pull Request to the `development` branch, or on pushing to the `development` branch, so that during development on a `feature/*` branch, CI does not run, but does when a PR is opened against `development`

    This action will run the `lint` task on all services and perform some mock tests.

- Similarly a Github Action runs on opening a Pull Request to the `master` branch, or on pushing to the `master` branch.

- Upon cutting a release, a Github action deploys to production.

In order to make use of the Github actions, you need to provide the following secrets, output of the terraform.

To build and push images:

- `TENANCY_NAMESPACE`: OCIR registry identification
- `DOCKER_USERNAME`: OCIR image registry credentials to push images
- `DOCKER_PASSWORD`: OCIR image registry credentials to push images
    *note: sometimes there are # in the OCIR token, and these need to be escaped with \# or the characters following the # are interpeeted as comments*

To deploy to a kubernetes cluster:

- `OCI_CONFIG`: the OCI config file
- `CI_USER_KEY`: CI User private key
- `KUBE_CONFIG_SECRET`: Kubernetes Kubeconfig file to access the cluster

**Important Note:** In order to be able to deploy automatically from Github Actions (or another CI mechanism of your choice) the kubernetes secrets need to be provided as part of the repository content, which means they need to be checked in to the repository. This is obviously a potential security risk, and your own repository should always be PRIVATE, or you should refrain from using this feature and deploy from a local machine, ignoring the credentials in the repository.


text:
# Install PHP

To install older unsupported versions of PHP, you will need to add a repository to `brew` (only currently maintained versions of PHP are in the default repositories):

```bash
brew tap exolnet/deprecated
```

Install required PHP versions (add or remove versions depending on what you need):

```bash
brew install<EMAIL_ADDRESS>brew install<EMAIL_ADDRESS>brew install<EMAIL_ADDRESS>```

Make sure required directories are writeable:

```bash
sudo chown -R $(whoami):staff /usr/local/include/php/
sudo chown -R $(whoami):staff /usr/local/lib/php/
sudo chown -R $(whoami):staff /usr/local/etc/php/
```

Change the default PHP version for the system (change the version number in the `brew link` command if you want to use a different version by default):

```bash
brew unlink php
brew link --overwrite --force<EMAIL_ADDRESS>```

## Fix Configuration Files

HomeBrew sometimes does not correctly copy PHP configurations to the correct locations. Fix that here:

```bash
# Install configuration files for PHP 5.6
cd $(brew --prefix<EMAIL_ADDRESS>cp -R .bottle/* /usr/local/

# Install configuration files for PHP 7.3
cd $(brew --prefix<EMAIL_ADDRESS>cp -R .bottle/* /usr/local/

# Install configuration files for PHP 7.4
cd $(brew --prefix<EMAIL_ADDRESS>cp -R .bottle/* /usr/local/
```

## Change PHP-FPM Configurations

To keep port `9000` for XDebug, and to make PHP-FPM ports easy to identify, use the PHP versions in the new port numbers.

### Edit config for PHP 5.6

```bash
open /usr/local/etc/php/5.6/php-fpm.conf -a TextEdit
```

### Change:

```bash
user = _www
group = _www

# ...

listen = <IP_ADDRESS>:9000
```

### To:

```bash
user = username
group = staff

# ...

listen = <IP_ADDRESS>:9056
```

### Edit configs for other PHP versions

```bash
open /usr/local/etc/php/7.3/php-fpm.d/www.conf -a TextEdit
open /usr/local/etc/php/7.4/php-fpm.d/www.conf -a TextEdit
```

Change username and group, then change ports based on the PHP version:

```bash
# In all configs, change:
listen = <IP_ADDRESS>:9000

# To:

# For PHP 7.3:
listen = <IP_ADDRESS>:9073

# For PHP 7.4:
listen = <IP_ADDRESS>:9074

# Etc.
```

## Start PHP-FPM Services

```bash
brew services start<EMAIL_ADDRESS>brew services start<EMAIL_ADDRESS>brew services start<EMAIL_ADDRESS>```


text:
# MalwareScan

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Enabled** | **bool** | Indicates if the scanner is enabled | [optional]
**Scanner** | **string** | The name of the scanner that produced the finding | [optional]
**Metadata** | [**interface{}**](.md) | Open schema for scanner-specific metadata related to the scan result | [optional]
**Findings** | [**[]MalwareScanFindings**](MalwareScan_findings.md) |  | [optional]

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

repository: anchore/client-go

gha_language: Makefile

repo_name: anchore/client-go


text:
# Amazon Rekognition

## About

The PHP scripts included in the `PHP/` directory demonstrate the usage of the "**Amazon Rekognition**" service by "[Amazon Web Services](https://aws.amazon.com/). All scripts are licensed under the MIT License (see below) and for demonstration purposes only.

The JSON file included in the `AccessPolicy/` directory can be used at [AWS Identity and Access Management](https://aws.amazon.com/iam/) to configure appropriate access privileges for the use-cases described in the article.

The example images included in the `Images/` directory have been taken from [Pexels](https://www.pexels.com) and are licensed under the **Creative Commons Zero (CC0) license**. This means the pictures are completely free to be used for personal and commercial purposes.

## Requirements

* *Access Key* and *Secret Access Key* of a valid AWS user, see [AWS Identity and Access Management](https://aws.amazon.com/iam/).
* Appropriate access privileges to [Amazon Rekognition](https://aws.amazon.com/rekognition/) and [Amazon S3](https://aws.amazon.com/s3/).
* [AWS SDK for PHP](https://aws.amazon.com/sdk-for-php/), installed via *composer*

## Documentation

The scripts have been described in the German IT journal "Web & Mobile Developer" (https://www.webundmobile.de).
Publisher: Neue Mediengesellschaft Ulm mbH.

## References

* **Pexels:** https://www.pexels.com
* **Web & Mobile Developer:** https://www.webundmobile.de
* **Author (Michael Schams):** https://schams.net

## License

The MIT License

Copyright (c) 2017 Michael Schams, https://schams.net

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

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

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

repository: Niremizov/amazon-rekognition

repo_name: Niremizov/amazon-rekognition


text:
GalleryApp
==========

**Developed by:[Prashanth Ramakrishnan](prashanth_r03@yahoo.co.in)**

**Features**
- Gallery application which shows images in the SD card under "/GalleryApp"  folder
- Uses Firebase to store images, create Firebase project with the same application id and add the google-services.json file in the project to run the app

**NOTE**
Please set up a Firebase project with the application id as com.prashanth.galleryapp, download the google-service.json file. Set the Firebase storage rule to
allow read/write access and publish the rule (Follow the Firebase tutorial to achieve this).

**Overview**

The app comes preloaded with an image of my favourite Hefeweizen beer. When you open the app for the first time, this image is coped to the folder in the SD
card under /GalleryApp folder. This folder is root of all the images, any further images taken or edited will be stored under this folder.
The option to upload the image is given in the third screen where the image is viewed. There is an overflow menu to crop/rotate or to upload the photo.
Tapping the upload menu item will upload the image to Firebase storage which needs to configured in-order to run this project. Once the image is uploaded, the
image url is persisted in the application. The images are stored on Firebase under the directory "/images".

When the application detects at the start-up that the image is removed or deleted (note that removing or deleting is
done outside the scope of this application) the application downloads the images from the Firebase storage with the stored image url.

Note: For some reason, when a new file is added to the folder; even though the media scan broadcast is fired, it fails to detect the new image added which means
the application needs to be put to the background and got up again. I'm figuring out why this is happening, suspicion is that the async task which fetches the
images through a query is may be running in a different thread. This will go in as my first bug into this project.

![Demo](demo/galleryapp.gif)

**TODO**
- Instrumentation and unit testing

**Open source libaries used**
- **[Glide](https://github.com/bumptech/glide)**
- **[Timber](https://github.com/JakeWharton/timber)**
- **[ButterKnife](https://github.com/JakeWharton/butterknife)**
- **[Zoomage](https://github.com/jsibbold/zoomage)**
- **[Android image cropper](https://github.com/ArthurHub/Android-Image-Cropper)**

### License

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

repository: prashanthramakrishnan/GalleryApp

repo_name: prashanthramakrishnan/GalleryApp


text:
## [1.0.2]

* Fixes [issue #86](https://github.com/MaikuB/flutter_appauth/issues/86) where there was an error on casting `tokenAdditionalParameters` property upon calling the `token()` method. Thanks to the PR from [Sven](https://github.com/svendroid)

## [1.0.1]

* Specify the object type for the `instance` property within `FlutterAppAuthPlatform` instead of being dynamic

## [1.0.0+1]

* Add pub badge to readme

## [1.0.0]

* Initial release of platform interface


text:
# offset-number

Apply an offset to a JavaScript numeric value.

## Usage

### Installation

```shell
    npm install offset-number --save # Installs via NPM
    yarn add offset-number # Installs via Yarn
```

### API

```javascript
    var offset = require("offset-number");

    offset(42, 2) // -> A random number in the range [40,44).
    offset(5, 10) // -> A random number in the range [-5,15).
```

## Build

```shell
    npm run build # Runs an NPM script which builds the project
    gulp build # Directly execute the gulp build script
```

Both the above commands perform the same operation internally; the NPM `build`
script calls the `Gulp` build script.

## Test

```shell
    npm run test # Runs an NPM script which tests the project
```

Due to the project being written in TypeScript and the tests written in
Javascript, the project must be built before it can be tested.

## License

See the `LICENSE` file for license information.


text:
Working with JasperReports Server

### Getting Started

Follow the steps in the [Quick Start Guide](https://github.com/Robinyo/serendipity-api/blob/master/projects/spring-boot/docs/developer/quick-start-guide.md).

### JasperReports Server

Navigate to the JasperReports Server Community Edition welcome page: http://localhost:11001/jasperserver

You can login using the following credentials:
* JasperReports Admin User - User ID: jasperadmin and Password: jasperadmin
* Sample User - User ID: joeuser and Password: joeuser

JasperReports Server Community Edition landing page:

JasperReports Server Community Edition landing page with samples (JRS_LOAD_SAMPLES=true):

#### Data Sources

In JasperReports Server right-click on Data Sources and select Add Resource => Data Source:

JDBC Driver: org.postgresql.Driver
Host: postgres
Port: 5432
Database: serendipity
Username: POSTGRES_USER (admin)
Password: POSTGRES_PASSWORD (secret)

Click Save and then enter a Data Source Name:

### Resources

* Jaspersoft Community: [Documentation](https://community.jaspersoft.com/documentation?version=59011)
* Jaspersoft Community: [Forum (Answers)](https://community.jaspersoft.com/answers)
* Stack Overflow: [Questions tagged jasperserver](https://stackoverflow.com/questions/tagged/jasperserver)
* GitHub: [JasperReports](https://github.com/TIBCOSoftware/jasperreports)

repository: adora-tech/serendipity-api

repo_name: adora-tech/serendipity-api


text:
---
layout: post
title: "For Sanity's Sake Education Expo 2-4-1 Offer - 26 March 2014"
permalink: /archives/2014/03/for_sanitys_sake_education_expo_241_offer_26_march.html
commentfile: 2014-03-06-for_sanitys_sake_education_expo_241_offer_26_march
category: around_town
date: 2014-03-06 20:08:56

---

*Is your child starting school this September? Or are you thinking about schools for next year?*

Our FSS Education Expo on March 26th is a unique event offering advice, information and support on admissions, education and specialist help to get your children school-ready for reception this year, and to help parents make the right decision on a preschool or school next year.

Whether it's State, Faith, Steiner, Independent or Free Schools, you'll be able to find out more information, plus put your questions to parents who already have children are local schools.

And if your child is already in reception but not enjoying it or finding certain aspects hard there will be a child communications/speech specialist, fine motor skills expert providing helpful advice for writing and Barefoot Books with phonics and other useful starter books for children when they start education.

#### More Information

-   [BOOK your ticket now](http://www.forsanityssake.com/events/pre-schools-primary-schools-education-event) and get 2 for 1 to bring a friend
-   £4.50 (+ online booking fee 76p) for 2 tickets or £5 per person on the door.
-   At The Winning Post on the A316

repository: pmahnke/stmgrts

gha_language: HTML

repo_name: pmahnke/stmgrts


text:
# Prometheus installation

[Prometheus](https://prometheus.io) is used to monitor CPU and memory
utilization in [PSM benchmarks](../../README.md#psm-benchmarks).

[Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator)
is used to install Prometheus. A prometheus operator is a custom controller that
manages the Prometheus instance.

The usual way to install Prometheus Operator is through the Makefile. See the
section on [Deploying Prometheus](../../doc/deployment.md#deploying-prometheus)
in the deployment guide.

## Configuration details

### Prometheus Operator

There are two configuration files related to Prometheus Operator,
[crds.yaml](crds/bases/crds.yaml) and
[install-prometheus-operator.yaml](install-prometheus-operator.yaml). These
files are taken from
[bundle.yaml](https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/bundle.yaml),
in the Prometheus Operator repository, with the fields `namespace` and
`nodeSelector` replaced where applicable.

### Prometheus instance and ServiceMonitor instance

The files [install-prometheus.yaml](install-prometheus.yaml) and
[servicemonitors.yaml](servicemonitors.yaml) are taken from
[istio/tools](https://github.com/istio/tools/), with configuration related to
Istio left out.

### Prometheus scrape interval

The scrape interval (`scrape_interval`) determines how often Prometheus scrapes
targets. The default value for this interval is
[1m](https://prometheus.io/docs/prometheus/latest/configuration/configuration/).
We change this interval in our configuration to 1s, since our tests typically
last only 30s. See <https://github.com/grpc/test-infra/pull/325> for details.

### Query delay

We add 20s delay before collecting data from Prometheus, in the tests that use
Prometheus. This delay allows data to become available
([cAdvisor housekeeping interval](https://github.com/google/cadvisor/blob/master/docs/runtime_options.md#housekeeping))
and pulled by Prometheus
([Prometheus scrape interval](https://github.com/grpc/test-infra/pull/325)). See
<https://github.com/grpc/test-infra/pull/330> for details.

repository: grpc/test-infra

gha_language: Go

repo_name: grpc/test-infra


text:
---
layout: default
---

# 1993-06-09 - Re: InfoWorld

## Header Data

From<EMAIL_ADDRESS>(Phil Karn)

To<EMAIL_ADDRESS>Message Hash: b2a45db1f712bf3e088b6506debaebbdf8c0c925e8acf1c3ceefb6b02658e655

Message ID: \<9306091737.AA21998@servo\>

Reply To: _N/A_

UTC Datetime: 1993-06-09 17:38:04 UTC

Raw Date: Wed, 9 Jun 93 10:38:04 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Phil Karn)
Date: Wed, 9 Jun 93 10:38:04 PDT
To<EMAIL_ADDRESS>Subject: Re: InfoWorld
Message-ID: <9306091737.AA21998@servo>
MIME-Version: 1.0
Content-Type: text/plain

Well, to borrow Whit Diffie's great phrase, those of us who regularly
conspire to participate in the political process are already encrypting...

Phil

{% endraw %}
```

## Thread

+ Return to [June 1993](/archive/1993/06)

+ Return to<EMAIL_ADDRESS>(Phil Karn)](/authors/karn_at_qualcomm_com_phil_karn_)"

+ 1993-06-09 (Wed, 9 Jun 93 10:38:04 PDT) - Re: InfoWorld -<EMAIL_ADDRESS>(Phil Karn)_


text:
# Install - nix

## Running nix-shell

To get your dev environment setup all you need to do is to run `nix-shell`

## Installation

### Installing packages

When running ``npm install``, don't worry about warnings or skipped optional dependencies.

```
npm install
bash ./setup.sh
npm run build
```

### Set up crypto wallets

The camera scanner mock reads the wallet addresses from your ``device_config.json`` file. You need to add a property under ``brain.mockCryptoQR`` where the key is the ``cryptoCode`` and the value is the address to be returned by the mocked camera.

Example:

```
{
  "brain": {
    ...
    "mockCryptoQR": {
      "BTC": "XXXXXXX"
    }
  },
  ...
```

### Run and pair

First, make sure [lamassu-server](https://github.com/lamassu/lamassu-server) is properly installed, configured, and running. See the ``INSTALL.md`` file in the lamassu-server repository. Then, run lamassu-machine:

In first terminal window, run the bill validator simulator:

```
node bin/fake-bills.js
```

In second terminal window:

```
node bin/lamassu-machine --mockBillValidator --mockBillDispenser --mockCam --devBoard --mockPair '<totem-from-admin>'
```

You can find instructions how to get ``<totem-from-admin>`` in install instructions for lamassu-server. **IMPORTANT**: Make sure to use single quotes and not double quotes, or the shell will mess up the totem.

For subsequent runs, you don't need the ``--mockPair`` flag.

### Open in browser

In firefox or chrome, open the ``ui/start.html`` file. The URL should be something like this:

```
file://<lamassu-machine-dir>/ui/start.html?debug=dev
```

Don't worry if the fonts don't look right. The production software uses a proprietary font. Click on ``Initialize`` (it should be fast on your computer), then ``Scan``. After a few moments of pairing, you should see the start screen.

When the screen asks you to insert a bill, navigate to the terminal
where you opened the mock bill validator, and input **1** <kbd>Enter</kbd>
to insert a one dollar bill.

## Troubleshooting

### If you're having trouble with tiny-secp256k1 installation related to node-gyp

Sometimes it might be a [locale-related issue](https://github.com/NixOS/nixpkgs/issues/32848)

Try executing the `npm install` step inside a `--pure` flagged `nix-shell`

```
nix-shell --pure
[nix-shell:<lamassu-machine-dir>]$ npm install
```

### If you're having trouble with serialport bindings

Configure mockPrinter on your device_config.json

```
{
  "brain": {
    ...
    "mockPrinter": true,
  },
  ...
```

repository: lamassu/lamassu-machine

branch_name: refs/heads/dev

repo_name: lamassu/lamassu-machine


text:
---
id: tests
title: Tests
sidebar_label: Tests
---

Tests are the main object that Cicada processes. Tests are composed of a single
runner and can depend on other tests.

## Runners

Each test uses a type of runner to execute Actions and Asserts. These runners
exist as Docker containers and communicate with the test engine through gRPC.

Let's take a look at this example:

`test-example.cicada.yaml`:

```yaml
description: Example test
tests:
  - name: add-member
    description: Creates a member
    runner: rest-runner
    actions:
      - type: POST
        params:
          url: "http://api:8080/members"
          body:
            name: Jeff
            age: 25
```

This test uses the `rest-runner` type, used against REST API's, to make a POST
request to an API and create a member named `jeff` age `25`

## Dependencies

All of your tests in `*.cicada.yaml` files will be loaded recursively from a
root directory into a DAG (Directed Acyclic Graph) and processed in parallel
keeping order of their dependencies.

Let's add some more tests with dependencies to our example:

`test-example.cicada.yaml`:

```yaml
description: Example test with dependencies
tests:
  - name: add-member
    description: Creates a member
    runner: rest-runner
    actions:
      - type: POST
        params:
          url: "http://api:8080/members"
          body:
            name: Jeff
            age: 25
  - name: add-team
    description: Creates a team
    runner: rest-runner
    actions:
      - type: POST
        params:
          url: "http://api:8080/teams"
          body:
            name: The best team
  - name: add-jeff-to-team
    description: Adds Jeff to a team
    runner: rest-runner
    action:
      - type: POST
        params:
          url: "http://api:8080/team-members"
          body:
            member: Jeff
            team: The best team
    dependencies:
      - add-member
      - add-team
  - name: check-jeff-added
    description: Checks that a team-member entry was added
    dependencies:
      - add-jeff-to-team
    runner: sql-runner
    assert:
      - type: EqualsRows
        template: >
          params:
            method: SQLQuery
            expected:
            rows:
              - cnt: 1
            actionParams:
              query: >
                SELECT COUNT(*) AS cnt FROM team_members
                WHERE member_uid={{ state['add-member']['actions']['POST0']['results'][0]['body']['id'] }}
                AND team_uid={{ state['add-team']['actions']['POST0']['results'][0]['body']['id'] }}
```

This adds 3 more tests:

* `add-team`: Creates a team through the API
* `add-jeff-to-team`: Adds Jeff to a team and depends on `add-member` and `add-team`
* `check-jeff-added`: Checks that a team_member row has been inserted and depends on `add-jeff-to-team`

> There's also a template section in `check-jeff-added`. This uses the engine's state container
> to format the assertion using Jinja2 into YAML. More on that [later.](state.md)

Cicada will load all of the tests and create this DAG:

```
                add-member            add-team
                    \                    /
                     \                  /
                      \________________/
                                |
                                |
                        add-jeff-to-team
                                |
                                |
                        check-jeff-added
```

<!--TODO: diagram to ascii with automatic center aligned code-->

In this scenario, `add-member` and `add-team` can run in parallel, while
`add-jeff-to-team` waits. Once both tests have finished, `add-jeff-to-team`
will run, followed by `check-jeff-added`


text:
# splint-package-name
Package Description Here...

### Installation ###
Download and Install Splint from https://splint.cynobit.com/downloads/splint and run the below from the root of your Code Igniter project.
```bash
splint install francis94c/blog
```
### Usage ###
How to load your package here.
```php
$this->load->splint("package_name", "+Main_Class", $params, "alias");
```

repository: splintci/library-package

repo_name: splintci/library-package


text:
# tinymce-langs

support Tinymce5 langs cdn https://www.jsdelivr.com/package/npm/tinymce-langs?path=langs

## Why

Currently Tinymce5 langs does not have cdn. So create an npm package, let lang supports cdn.

## Use

All cnd in [jsdelivr](https://www.jsdelivr.com/package/npm/tinymce-langs?path=langs)

- [zh_CN](https://cdn.jsdelivr.net/npm/tinymce-langs/langs/zh_CN.js)
- [ja](https://cdn.jsdelivr.net/npm/tinymce-langs/langs/ja.js)
- ...

```
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  language: 'zh_CN', // select language
  language_url: 'https://cdn.jsdelivr.net/npm/tinymce-langs/langs/zh_CN.js'  // site absolute URL
});
```

repository: zhangmrit/tinymce-langs

repo_name: zhangmrit/tinymce-langs


text:
---
layout: project
type: project
image: images/pikachu.jpg
title: Pikachu Sprint
permalink: projects/pikachu-sprint
# All dates must be YYYY-MM-DD format!
date: 2016-12-12
labels:
  - Animation
  - Game
  - Java
  - Eclipse IDE
summary: Animated arcade game developed in Java using the Eclipse IDE. Final project for my introductory Computer Science course at University of Hawaii - Manoa.
---

The objective of Pikachu Sprint is for the player to cover a maximum distance and avoid hitting obstacles by jumping over oncoming obstacles. The player's score is counted and displayed in the top right corner. Crashing into an obstacle causes the game to stop and prompts the user to play-again or quit while also displaying the player's final score.

This game was written in Java using the Eclipse IDE. My teammate, Tallas Goo, created the code for the Pikachu character. This included the animation, crash mechanics, and movement mechanics. I developed source code for randomly generated objects and the hit-boxes which the Pikachu character would attempt to avoid. Together, both of us developed the scrolling animated background, music, score counter, and menu. I also acted as the spokesperson for the project team during our final presentation.

This project constituted my first experience coding a group project. Previously, all my projects were done on my own. The team dynamic proved to be extremely beneficial for me and taught me how to become a better programmer by listening to my teammate's ideas and suggestions. It also provided me an opportunity to give input on other's coding styles and ideas. Working with a project partner forced me to develop new ways of thinking about my code and work hard to contribute to the team effort. Most of all, I learned how important it is for members of a programming team to communicate clearly and effectively as well as share ideas and brainstorm together.

You can watch a video of the gameplay at: [Pikachu Sprint Video](https://www.youtube.com/watch?v=cxXJ3wstaiM).

Check out the game's source code at GitHub: christiancheshire/pikachu-sprint


text:
# Roadmap

This roadmap lists the main features and their statuses on the Kuzzle open-source core project, and all its associated satellite repositories (SDKs, plugins, documentation).

## Planned

* Q2 2016: Allow users to have multiple profiles
* Q2 2016: iOS SDK
* Q2 2016: Load Balancing of multiple Kuzzle servers
* Q3 2016: Syslog capabilities
* Q3 2016: C SDK + wrappers to different languages, using SWIG (C#, Java, PHP, Python, Ruby, ...)
* Q3 2016: Plugins configuration through the Kuzzle Back-Office

## Won't do

*This section is currently empty*

## Done

* Plugins configuration through the command-line interface (see [PR #253](https://github.com/kuzzleio/kuzzle/pull/253))
* Add administrative functions to the command-line interface (see [PR #208](https://github.com/kuzzleio/kuzzle/pull/208))
* Allow users to store data in memory storage using the API (see [PR #224](https://github.com/kuzzleio/kuzzle/pull/224))
* Protect Kuzzle servers against flooding (see [PR #217](https://github.com/kuzzleio/kuzzle/pull/217))
* Allow listener plugins to be multithreaded (see [PR #237](https://github.com/kuzzleio/kuzzle/pull/237))
* Update ElasticSearch to v2 (see [PR #201](https://github.com/kuzzleio/kuzzle/pull/201))

repository: Aschen/kuzzle

repo_name: Aschen/kuzzle


text:
# Mucor ramificus B.S. Mehrotra & Nand, 1968 SPECIES

#### Status
SYNONYM

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

#### Published in
Sydowia 20: 69 (1968)

#### Original name
Mucor ramificus B.S. Mehrotra & Nand, 1968

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Zygomycota/Mucorales/Mucoraceae/Mucor/Mucor circinelloides/ Syn. Mucor ramificus/README.md

repo_name: mdoering/backbone


text:
# Frequently Asked Questions

## Why am I encountering a low quota with projects created via Terraform Example Foundation?

When you deploy the Terraform Example Foundation with the Service Account created in step 0-bootstrap,
the project quota will be based on the reputation of your service account rather than your user identity.
In many cases, this quota is initially low.

We recommend that your request 50 additional projects for the service account, `terraform_service_account`, created in step 0-bootstrap.
You can use the [Request Project Quota Increase](https://support.google.com/code/contact/project_quota_increase) form to request the quota increase.
In the support form, for **Email addresses that will be used to create projects**, use the `terraform_service_account` address that's created in the organization bootstrap module.
If you see other quota errors, see the [Quota documentation](https://cloud.google.com/docs/quota).


text:
---
layout: post
title: Day 1
---

Because we got another opportunity, i got my hand full of jobs at our ongoing project, [PreMe](https://preme.id).

Because my teamates that work on admin got to handle new project, For this week my backlog are, i must continue admin page for Preme with angular 2 and material http://tomastrajan.github.io/angular-ngrx-material-starter/ ,

Because my teamates already created the core (that was what i thought) i plan to create a generator with following this tutorial
https://scotch.io/tutorials/build-an-interactive-command-line-application-with-nodejs and https://medium.com/northcoders/creating-a-project-generator-with-node-29e13b3cd309

I was very excited that i created "jarvis" that will generate all stacks that i've learned so far until i got to read the code that my teamates create. wow.. the core is not really finish.. hmm

OKAY ... wait for me jarvis .. need to code some angular code first..