text:
# \<attrs-observe\>

Observe and act on the presence of an attribute

attrs-observe is a vanilla-ish web component whose primary purpose is to populate DOM with dynamic data.  You may be shocked to learn that this isn't the first such library that does this.  The size of this one is ~1.4kb minified and gzipped.

From the point of view of using what's built into the browser, as far as dynamically populating DOM from data, skipping an early Microsoft experiment, there's:

1)  [XSLT](https://www.w3schools.com/xml/xsl_intro.asp), supported by all browsers (including Chrome, Version 1!).
2)  The slot mechanism that comes with Shadow DOM.
3)  Hopefully soon, [template instantiation](https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Template-Instantiation.md), which would likely diminish the benifit of this web component.

Unlike many existing alternatives, this one just populates an existing DOM node tree.

Each time populating finishes, an event, "nodes-populated-changed" is emitted.

## Simple data populating:

```html
<div>
I am <span c="whatAmI"></span>
</div>
<attrs-observe observe="c" input='{"whatAmI": "the walrus"}'></attrs-observe>
```

produces:

```html
I am <span c="whatAmI">the walrus</span>
```

## Property setting

```html
    <div>
        <label for="joker">Don't you think the joker laughs at you</label><input id="joker" type="checkbox" c="well?">
    </div>
    <attrs-observe observe="c" input='{"well?": {"checked": true}}'></attrs-observe>
```

The input attribute / property of attrs-observe does not need to be set via an inline attribute as shown in the two previous examples.  It can be set via a framework or by some other web component.

If the input property changes, it will be reapplied to all the elements with the observed attribute.

produces a checked input.

##  Functional

```html
<div>
I am the <span c="whatAmI"></span>
</div>
<script nomodule>
({
    whatAmI: s =>{
        s.style.color = 'yellow';
        s.innerText = 'Eggman';
    }
})
</script>
<p-d-x on="eval" to="{input.whatAmI:whatAmI"></p-d-x>
<attrs-observe observe="c"></attrs-observe>
```

Produces

```html
<div>
    I am the <span c="whatAmI" style="color: yellow;">Eggman</span>
</div>
```

One can specify whether to monitor for new nodes recursively throughout the DOM tree by specifying deeply:

```html
<attrs-observe observe="c" deeply></attrs-observe>
```

## Install the Polymer-CLI

First, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) and npm (packaged with [Node.js](https://nodejs.org)) installed. Run `npm install` to install your element's dependencies, then run `polymer serve` to serve your element locally.

## Viewing Your Element

```
$ polymer serve
```

## Running Tests

```
$ polymer test
```

Your application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.

repository: bahrus/attrs-observe

repo_name: bahrus/attrs-observe


text:
## PVPPack
> Bukkit plugin aimed at keeping combat fair.

### Compilation
```bash
$ mvn clean package
```

`.jar` will be located in `target/` directory.

### Features
1. Combats PvP logging and teleportation, compatible with LilyPad and Bungeecord installations.
2. Disallows combat while disguised or vanished (DisguiseCraft, iDisguise, and VanishNoPacket).

### Statistics
[![PVPPack stats](http://mcstats.org/signature/PVPPack.png)](https://mcstats.org/PVPPack)

license: MIT

repository: brendanashworth/PVPPack

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: brendanashworth/PVPPack


text:
# IMPORTANT NOTICE

**Integral is not recommended for a new project.** Consider using [Mito](https://github.com/fukamachi/mito) instead.

# Integral

[![Build Status](https://travis-ci.org/fukamachi/integral.svg?branch=master)](https://travis-ci.org/fukamachi/integral)

Integral is an object relational mapper for Common Lisp based on [CL-DBI](https://github.com/fukamachi/cl-dbi) and [SxQL](https://github.com/fukamachi/sxql).

## Warning

This software is still ALPHA quality. The APIs will be likely to change.

Should work well with MySQL/SQLite3 on SBCL/Clozure CL.

## Usage

```common-lisp
(defclass tweet ()
  ((id :type integer
       :primary-key t
       :auto-increment t
       :reader tweet-id)
   (status :type text
           :initarg :status
           :accessor tweet-status)
   (user :type (varchar 32)
         :initarg :user
         :accessor tweet-user))
  (:metaclass <dao-table-class>))

(connect-toplevel :mysql
                  :database-name "myapp"
                  :username "nitro_idiot"
                  :password "xxxxxxxx")

(let ((tw (make-instance 'tweet
                         :status "Good morning, world."
                         :user "nitro_idiot")))
  (save-dao tw))

;; Same as the above
(create-dao 'tweet
            :status "Good morning, world."
            :user "nitro_idiot")

(let ((tw (find-dao 'tweet 3)))
  (with-slot (status user) tw
    (format t "~A said ~A" user status))
  (setf (tweet-status tw) "Good evening, world.")
  (save-dao tw))

(let ((tw (find-dao 'tweet 3)))
  (delete-dao tw))
```

## Quickstart

### Installation

```common-lisp
(ql:quickload :integral)
```

### Connecting to database

`connect-toplevel` is a function to establish a connection to a database.

```common-lisp
(import 'integral:connect-toplevel)

(connect-toplevel :mysql
                  :database-name "testdb"
                  :username "nitro_idiot"
                  :password "password")
```

Integral is intended to work with MySQL, PostgreSQL and SQLite3. Replace `:mysql` the above by your favorite RDBMS engine name.

### Defining a database table

In Integral, database tables are defined as CLOS classes. A table definition looks like this.

```common-lisp
(import 'integral:<dao-table-class>)

(defclass user ()
  ((name :col-type text
         :initarg :name))
  (:metaclass <dao-table-class>))
```

This `user` class means a "user" table in a database with a single "TEXT" column, "name".

`table-definition` is a function to generate a `CREATE TABLE` SQL for it.

```common-lisp
(import '(integral:table-definition integral:execute-sql))

(table-definition 'user)
;=> "CREATE TABLE `user` (`%oid` SERIAL NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` TEXT)"
;   NIL

(execute-sql (table-definition 'user))

;; Same as the above except ignoring CREATE TABLE if it already exists.
(ensure-table-exists 'user)
```

### Adding records

Table classes can be called with `make-instance` like Common Lisp standard-class.

```common-lisp
(make-instance 'user :name "Eitaro Fukamachi")
;=> #<USER %oid: <unbound>>
```

The instance won't be recorded in a database. Call `save-dao` it to add the record to a database.

```common-lisp
(import 'integral:save-dao)

(save-dao (make-instance 'user :name "Eitaro Fukamachi"))
;=> #<USER %oid: 1>

(save-dao (make-instance 'user :name "Tomohiro Matsuyama"))
;=> #<USER %oid: 2>
```

### Retrieving records

```common-lisp
(import 'integral:select-dao)

(select-dao 'user)
;=> (#<USER %oid: 1> #<USER %oid: 2>)

(mapcar (lambda (row)
          (slot-value row 'name))
        (select-dao 'user))
;=> ("Eitaro Fukamachi" "Tomohiro Matsuyama")
```

`select-dao` takes SxQL clauses. You can specify WHERE, ORDER BY or LIMIT with it.

```common-lisp
(import '(sxql:where sxql:limit))

(select-dao 'user
  (where (:= :name "Eitaro Fukamachi"))
  (limit 1))
;=> (#<USER %oid: 1>)
```

You can also use `find-dao` for retrieving a single row.

```common-lisp
(import 'integral:find-dao)

(find-dao 'user 1)
;=> #<USER %oid: 1>
```

### Updating records

```common-lisp
(let ((user (find-dao 'user 1)))
  (setf (slot-value user 'name) "深町英太郎")
  (save-dao user))
```

### Deleting records

```common-lisp
(import 'integral:delete-dao)

(let ((user (find-dao 'user 1)))
  (setf (slot-value user 'name) "深町英太郎")
  (delete-dao user))
```

### Migration

I introduced Integral generates a table schema from a CLOS class definition. But how can we do when we want to change the table schema after creating it.

Integral has a function to apply the change of the class definition to a table schema. It is generally known as "Migration".

For example, if you want to record a "profile" of users to "user" table, add a slot for it.

```common-lisp
(defclass user ()
  ((name :col-type text
         :initarg :name)
   (profile :col-type text
            :initarg :profile))
  (:metaclass <dao-table-class>))
```

Then call `migrate-table`.

```common-lisp
(import 'integral:migrate-table)

(migrate-table 'user)
;-> ALTER TABLE `user` ADD COLUMN `profile` TEXT AFTER `name`;
;=> NIL
```

All changes of indexes and column types are also followed.

```common-lisp
(defclass user ()
  ((id :col-type serial
       :primary-key t)
   (name :col-type (varchar 64)
         :initarg :name)
   (profile :col-type text
            :initarg :profile))
  (:metaclass <dao-table-class>))
;-> ALTER TABLE `user` DROP COLUMN `%oid`;
;   ALTER TABLE `user` MODIFY COLUMN `name` VARCHAR(64);
;   ALTER TABLE `user` ADD COLUMN `id` SERIAL NOT NULL PRIMARY KEY FIRST;
;=> NIL
```

### Mystique: Auto-migration

In development, class redefinitions are done many times. It's boring to execute `migrate-table` for each single time, isn't it?

Integral has **auto-migration** feature for executing `migrate-table` after redefinitions automatically.

Set `*auto-migration-mode*` T to use the mode.

```common-lisp
(setf integral:*auto-migration-mode* t)
```

### Another Way: define a class from an existing table

If you'd like to administrate a database directly by writing raw SQLs, or wanna use Integral for an existing database, you can generate slot definitions from it.

```common-lisp
(defclass tweet () ()
  (:metaclass <dao-table-class>)
  (:generate-slots t))
```

`:generate-slots` option means slot definitions follow database schema. Note you must establish a database connection before the first `make-instance`.

### inflate/deflate

`inflate` and `deflate` is a feature to convert data between a database and Common Lisp.

```common-lisp
(defclass user ()
  ((name :type string
         :initarg :name)
   (created-at :type timestamp
               :col-type integer
               :initarg :created-at))
  (:metaclass integral:<dao-table-class>))
;=> #<INTEGRAL.TABLE:<DAO-TABLE-CLASS> USER>

(find-dao 'user 1)
;=> #<USER #x302001D9452D>

(slot-value * 'created-at)
;=><PHONE_NUMBER>

;; Define inflate/deflate methods
(defmethod integral:inflate ((object user) (slot-name (eql 'created-at)) value)
  (local-time:universal-to-timestamp value))
(defmethod integral:deflate ((object user) (slot-name (eql 'created-at)) value)
  (local-time:timestamp-to-universal value))

(slot-value (find-dao 'user 1) 'created-at)
;=> @2014-01-19T11:52:07.000000+09:00
```

You can also set `inflate` and `deflate` functions via `:inflate` or `:deflate` keywords in `defclass`.

```common-lisp
(defclass user ()
  ((name :type string
         :initarg :name)
   (created-at :type timestamp
               :col-type integer
               :initarg :created-at
               :inflate #'local-time:universal-to-timestamp
               :deflate #'local-time:timestamp-to-universal))
  (:metaclass integral:<dao-table-class>))
```

### Relations

Although Integral doesn't have a specific feature for relations like `:has-a` and `:has-many`, it can be done with normal methods.

```common-lisp
(defmethod user-config ((user user))
  (find-dao 'user-config (user-id user)))

(defmethod user-entries ((user user))
  (select-dao 'entry (where (:= :user_id (user-id user)))))
```

### Wanna write a raw SQL?

```common-lisp
(import 'integral:retrieve-by-sql)

(retrieve-by-sql "SELECT * FROM user")
;=> ((:%oid 1 :name "深町英太郎"
;     :profile "I love Common Lisp and beer")
;    (:%oid 2 :name "Tomohiro Matsuyama"
;     :profile NIL))
```

`retrieve-by-sql` takes `:as` keyword argument to specify a class of the result record.

```common-lisp
(retrieve-sql "SELECT * FROM user" :as 'user)
;=> (#<USER %oid: 1> #<USER %oid: 2>)
```

## Symbols

### Connections

* connect-toplevel (driver-name &rest args &key database-name &allow-other-keys)
* disconnect-toplevel ()

### Classes

* <dao-class>
* <dao-table-class>
* table-name (class)
* table-definition (class &key (yield t) if-not-exists)
* inflate (object slot-name value)
* deflate (object slot-name value)
* migrate-table (class)
* ensure-table-exists (class)
* recreate-table (class)
* \*auto-migration-mode\*

### SQL

* select-dao ((class <dao-table-class>) &rest expressions)
* insert-dao ((obj <dao-class>))
* create-dao ((class <dao-table-class>) &rest initargs)
* update-dao ((obj <dao-class>))
* delete-dao ((obj <dao-class>))
* execute-sql ((sql string) &optional binds)
* retrieve-by-sql ((sql string) &key binds as)
* save-dao ((obj <dao-class>))
* where
* order-by
* group-by
* limit

### Data types

* serial
* tinyint
* smallint
* mediumint
* bigint
* text
* varchar
* enum
* datetime
* date
* timestamp

### Errors

* <integral-error>
* <connection-not-established-error>
* <unknown-primary-key-error>
* <type-missing-error>
* <migration-error>

## See Also

* [CL-DBI](http://8arrow.org/cl-dbi/) - Database independent interface library.
* [SxQL](http://8arrow.org/sxql/) - SQL builder library.

## Author

* Eitaro Fukamachi<EMAIL_ADDRESS>
## Copyright

Copyright (c) 2014 Eitaro Fukamachi<EMAIL_ADDRESS>
# License

Licensed under the BSD 3-Clause License.

repository: fukamachi/integral

extension: markdown

gha_language: Common Lisp

repo_name: fukamachi/integral


text:
#Days Until Seasons

![Alt text](Design/Days until Seasons - Mockup.png)

Days Until Seasons is a project that I started for some personal reasons.
Sometimes I need to know what is the current season and what is the next, for take care of bonsais and others plants that I really love. For a healthy growth we need to know the season to apply fertilizer correctly.

So I think the focus on this app is show the information on the **Widget** and **Apple Watch** Screen. And that is what I made.

**The app will be on Apple store after the apple review. I will put the link in this page when they aprove it.**

### Technology used in this project

* Writing with Obj-c and Swift
*	Apple Watch
	*	Page-Based Interface
	*	Glance
*	Today Extension (Widget)
*	Create our own Cocoa Touch Framework
*	Core Location (we get the user Localization for defining the current Hemisphere)
*	Internationalization ( as soon as possible )
*	Unit Tests
*	Google Analitycs ( as soon as possible )
*	Facebook Parse and Analitycs ( as soon as possible )
*	CI with Travis ( as soon as possible )
*	Sketch 3 Design ( all arquives from sketch 3 is inside the project )

### Studying about Seasons

To create the app I searched about some information about the World's Seasons and I find some great things.
World's Seasons can be divided into two types: *Meteorological* and *Astronomical*.
Our app will work with **Meteorological Seasons** and with distincting of which *hemisphere the user will be*. Yes, each hemisphere has your on Meteorological seasons. So, if the users location is on Northern Hemisphere, we will set the correctly seasons for that location.

##Contact

Follow @fabintk on Twitter or mail me at<EMAIL_ADDRESS>
##License

Days Until Seasons is available under MIT licence. See the LICENSE file for more info.

repository: heitormaffra/Days-Until-Seasons

repo_name: heitormaffra/Days-Until-Seasons


text:
# FTP protocol

## Overview

** Working branch: ** ftp

** Started date: ** 21/09/2015

** Deadline: ** 26/10/2015

** Developer: ** @luongnv89

** Probe example **: reconstruct file content and extract file information such as: MIME/Type, size, name, ...

## List of tasks

* Study about protocol -> understand packet format specification/ how to classify protocol -> OK

* Create data struct for extracting protocol attributes -> OK

* Study some open-source library (if it exists) to see how do they do -> OK

* Implement classify FTP packet -> OK

* Implement parse FTP packet data -> OK

* Test FTP plugin -> OK

* Merge to MMT-SDK -> Waiting for fixing libntoh

## Contents

[Structure design](/montimage/mmt-sdk/wiki/FTP%20design)

[Test case](/montimage/mmt-sdk/wiki/FTP%20test%20case)

[Documents](/montimage/mmt-sdk/wiki/FTP%20documents)

repository: Montimage/mmt-dpi

gha_language: C

repo_name: Montimage/mmt-dpi


text:
### header makes the page have a top

![](./bess_frans_paring.png)

something **bold as eff**
>>>>>>> small-conflict

something _italic_

```
    some sort of code block
    sometimes i am literal
    this is a haiku
```

and a [link](https://camo.githubusercontent.com/9bb56499161ec0a5c20b6b3a3af674f51072af7c/687474703a2f2f7777772e6e6f727468636173746c652e636f2e756b2f6775696c642f6172742f616e6e615f6c2f6c696e6b312e6a7067)


text:
# Parking Sensor #

Project Description
-------------------

The aim of this project is to implement a park sensor using HC-SR04 ultrasonic sensor, Multifunction Shield and Arduino UNO. The program should provide distance information using the LEDs, Buzzer and 7-Segment display.

Used Components
---------------

*[![Ultrasonic Sensor - HC-SR04](https://cdn.sparkfun.com//assets/parts/1/3/5/0/8/15569-Ultrasonic_Distance_Sensor_-_HC-SR04-01a.jpg)](https://www.sparkfun.com/products/15569))

*[![Arduino UNO](https://store.arduino.cc/arduino-uno-rev3)

*Multifunction Shield

Implementation Overview
-----------------------

The code is implemented using C language and AVR library.

The sensor will be triggered with 10us of trigger signal.

The program will receive an echo signal and calculate the time difference between trigger and echo signals.For this purpose timer overflows will be used to calculate time difference between trigger and and echo signals.

The distance will be calculated using following basic formula:

Distance L = 1/2 × T × C

where L is the distance, T is the time between the emission and reception, and C is the sonic speed. (The value is multiplied by 1/2 because T is the time for go-and-return distance.)

According to calculated distance value, The programm will indicate the distance on 7-Segment display, on LEDs, as well as with buzzer.

Usage
-----

The park sensor should be placed against a surface. The HC-SR04 can measure distances from 2cm up to 4 meters.
The distance will be represented on the 7-Segment display. The buzzer will indicate the distance to user with high pitch sound.


text:
---
title: Filtering
page_title: Filtering
description: Check our "Filtering" documentation article for the RadChart {{ site.framework_name }} control.
slug: radchart-features-filtering
tags: filtering
published: True
position: 26
---

# Filtering

##

>This feature is available in data bound scenarios only!

The __RadChart__ allows you to programmatically filter its data. This is achieved via the __FilterDescriptors__ property of the __RadChart__ or the __FilterDescriptors__ property of the __SeriesMapping__. This collection allows you to use descriptors which define the sorting member and the sorting direction for the data to which the __RadChart__ is bound. As this is a collection you are able not only to add, but also to remove or clear the entries in it, too.

The items in this collection are of type __ChartFilterDescriptor__. It exposes a few important properties:

* __Member__ - defines the field of the data object, by which the data will be filtered.

* __Operator__-  defines the operator, which will be applied to the filtering criteria.

* __Value__ - defines the value that will be compared with the value of the __Member__ property via the __Operator__ property.

Here is an example of a chart without filter descriptors.

![{{ site.framework_name }} RadChart without Filter Descriptors](images/RadChart_Features_Filtering_01.png)

Here is an example of implementing filtering.

>tipTo use the __ChartFilterDescriptors__ in XAML you have to declare the following namespace:

#### __XAML__

{{region xaml-radchart-features-filtering_0}}
	<!--  xmlns:telerikCharting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"  -->
{{endregion}}

#### __XAML__

{{region xaml-radchart-features-filtering_1}}
	<telerik:RadChart x:Name="radChart">
	    <telerik:RadChart.FilterDescriptors>
	        <telerik:ChartFilterDescriptor Member="Quantity"
	                                       Operator="IsLessThanOrEqualTo"
	                                       Value="150" />
	    </telerik:RadChart.FilterDescriptors>
	</telerik:RadChart>
{{endregion}}

#### __C#__

{{region cs-radchart-features-filtering_2}}
	ChartFilterDescriptor descriptor = new ChartFilterDescriptor();
	descriptor.Member = "Quantity";
	descriptor.Operator = FilterOperator.IsLessThanOrEqualTo;
	descriptor.Value = 150;
	this.radChart.FilterDescriptors.Add(descriptor);
{{endregion}}

#### __VB.NET__

{{region vb-radchart-features-filtering_3}}
	Dim descriptor As New ChartFilterDescriptor()
	descriptor.Member = "Quantity"
	descriptor.[Operator] = FilterOperator.IsLessThanOrEqualTo
	descriptor.Value = 150
	Me.radChart.FilterDescriptors.Add(descriptor)
{{endregion}}

Here is a snapshot of the result.
    ![{{ site.framework_name }} RadChart with Filtered Data](images/RadChart_Features_Filtering_02.png)

repository: telerik/xaml-docs

gha_language: JavaScript

gha_license_id: NOASSERTION

repo_name: telerik/xaml-docs


text:
dynamodb-migrations
=================================
[![npm version](https://badge.fury.io/js/dynamodb-migrations.svg)](https://badge.fury.io/js/dynamodb-migrations)
[![license](https://img.shields.io/npm/l/dynamodb-migrations.svg)](https://www.npmjs.com/package/dynamodb-migrations)

This library allows you to manager DynamoDB Migration Files (Which includes your Tables Schema and Seed data) with an simplified template for use in devops.

## This Plugin Requires

* Local Dynamodb Instance or AWS Account with Dynamodb Access Configured

## Features

* Create Migration Templates
* Execute Migration Templates Individually
* Execute All the Migration Templates At Once

## Installation

`npm install --save dynamodb-migrations`

## Usage

Usage example

```
var AWS = require('aws-sdk'),
dm = require("dynamodb-migrations");

/* Note: To configure AWS Credentials refer https://aws.amazon.com/sdk-for-node-js/ */

var dynamodb = {raw: new AWS.DynamoDB() , doc: new AWS.DynamoDB.DocumentClient() };
dm.init(dynamodb, '<myprojectroot>/<migrations>'); /* This method requires multiple dynamodb instances with default Dynamodb client and Dynamodb Document Client. All the other methods depends on this. */
dm.create('sampleTable'); /* Use gulp, grunt or serverless to integrate this with the commandline, modify the created template file with your custom table schema and seed data */
dm.execute('sampleTable', { prefix: 'dev-', suffix: '-sample'}); /* This executes the 'sampleTable' migration. Note: second parameter is optional. With prefix and suffix actual table name e.g dev-<tablename>-sample
```

Note: For dynamodb local you can initialize the dynamodb variable as follows
```
var  options = { region: 'localhost', endpoint: "http://localhost:8000" },
     dynamodb = {raw: new AWS.DynamoDB(options) , doc: new AWS.DynamoDB.DocumentClient(options) };
```

Note: for the 'init' method, the migration directory path should be an absolute path. Following example shows how to refer the adbolute path
```
var path = require('path');
var relPath = 'migrations';
var absolutePath = path.dirname(__filename) + '/' + relPath;
```

Supported methods

```
init(dynamodb, migrationsDir)            To initialize DynamoDB Client Instances to execute queries and to initialize the directory where migration files exists
create(migrationName)                    To create a new template with migrationName included, which you can modify to include other attributes and seed data. More information on migration template is shown in the following section.
execute(migrationName, tableOptions)     To execute a single migration file. This create the tables if they don't exists and runs the seeds defined in the migration file. tableOptions provides, tablePrefix and tableSuffix attributes to be set, if the actual table is different from migration name
executeAll(tableOptions)               To execute all the migration files to create tables and run all the seeds
```

## Migration Template

```json
{
    "Table": {
        "TableName": "TableName",
        "KeySchema": [{
            "AttributeName": "attr_1",
            "KeyType": "HASH"
		}, {
            "AttributeName": "attr_2",
            "KeyType": "RANGE"
		}],
        "AttributeDefinitions": [{
            "AttributeName": "attr_1",
            "AttributeType": "S"
		}, {
            "AttributeName": "attr_2",
            "AttributeType": "S"
		}],
        "LocalSecondaryIndexes": [{
            "IndexName": "local_index_1",
            "KeySchema": [{
                "AttributeName": "attr_1",
                "KeyType": "HASH"
			}, {
                "AttributeName": "attr_2",
                "KeyType": "RANGE"
			}],
            "Projection": {
                "NonKeyAttributes": ["attr_1", "attr_2"],
                "ProjectionType": "INCLUDE"
            }
		}],
        "GlobalSecondaryIndexes": [{
            "IndexName": "global_index_1",
            "KeySchema": [{
                "AttributeName": "attr_1",
                "KeyType": "HASH"
			}, {
                "AttributeName": "attr_2",
                "KeyType": "RANGE"
			}],
            "Projection": {
                "NonKeyAttributes": ["attr_1", "attr_2"],
                "ProjectionType": "INCLUDE"
            },
            "ProvisionedThroughput": {
                "ReadCapacityUnits": 1,
                "WriteCapacityUnits": 1
            }
		}],
        "ProvisionedThroughput": {
            "ReadCapacityUnits": 1,
            "WriteCapacityUnits": 1
        }
    },
    "Seeds": [{
        "attr_1": "attr_1_value",
        "attr_2": "attr_2_value"
    }]
}
```
Before modifying the migration template, refer the Dynamodb Client SDK and Dynamodb Document Client SDK links.

## Links
* [Dynamodb Client SDK](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#createTable-property)
* [Dynamodb Document Client SDK](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#put-property)
* [Dynamodb local documentation](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html)
* [Contact<EMAIL_ADDRESS>* [NPM Registry](https://www.npmjs.com/package/dynamodb-migrations)

## Contributing

We love our contributors! If you'd like to contribute to the project, feel free to submit a PR. But please keep in mind the following guidelines:

* Propose your changes before you start working on a PR. You can reach us by submitting a Github issue. This is just to make sure that no one else is working on the same change, and to figure out the best way to solve the issue.
* If you're out of ideas, but still want to contribute, help us in solving Github issues already verified.
* Contributions are not just PRs! We'd be grateful for having you, and if you could provide some support for new comers, that be great! You can also do that by answering this plugin related questions on Stackoverflow.
You can also contribute by writing. Feel free to let us know if you want to publish a useful guides, improve the documentation (attributed to you, thank you!) that you feel will help the community.

repository: conradperes/serverlessnodedynamodb

repo_name: conradperes/serverlessnodedynamodb


text:
### GET /users [x]

- Query Params
  - ?sortBy
    - popular []
    - recent (people who have recently uploaded a product) [x]
- Must be paginated

### GET /users/{userId} [x]

Get a single user.

### GET /users/{userId}/projects [x]

Projects of a particular user

- Must be paginated

### GET /users/{userId}/votes [x]

### GET /users/{userId}/comments [x]

### GET /hashtags [x]

list of all hashtags

### POST /projects [x]

Create a new project

### GET /projects []

- Query Params
  - ?sortBy
    - new
    - trending
    - popular
  - ?name=X
    - search for projects like %X%
  - ?tag=xxx
    - list all projects of hashtag xxx
- Must be paginated

### GET /projects/{projectId} [x]

Fetches a single project by project id

### POST /projects/{projectId}/vote [x]

```jsx
{
  value: 1;
}
```

### POST /projects/{projectId}/comments [x]

### GET /projects/{projectId}/comments [x]

[] Refactor codebase
[] Write a exception handling class
[] Add salting for password hashing
[] Integrate Sentry for monitoring(logging)
[] Handle edge cases for logout

repository: PranjalAgni/projecthunt-api

gha_language: TypeScript

repo_name: PranjalAgni/projecthunt-api


text:
# Dog-Breed-Classifier
A classifier for detecting dog breeds based on transfer learning.

## Description
This project is originated from Udacity's Deep Learning Nanodegree Project 2. It gives a baseline of Dog Breeds Detecting using transfer learning. The training labeled data is credited to ImageNet while the pretrained network baseline is from Resnet50. I added a basic CNN structure taking bottleneck features from Resnet50 as input, without performing rigorous hyerparameter tuning and finally got around 80% accuracy on training set. Apparantly, such cursory version of Dog Breeds Detecting can be significantly improved through further experimenting and works.

## Sample Output
![Image text](https://github.com/lssml/Dog-Breed-Classifier/blob/master/images/WechatIMG1.jpeg)

repository: lssml/Dog-Breed-Classifier

repo_name: lssml/Dog-Breed-Classifier


text:
# Goal

The tarbus contains projects that run on the bus.

 to together to read parse log file data and send important
data to listing clients.

## Flow

Generator creates data and write this to a file (accessible through VOLUME)

The tailor reads data and picks that data that it finds interesting. Data is send to the vert.x channel.

The gatherer reads information from the channel and persists it.

The publisher

### The generator
One or more generators. Build for speed, so they are [small docker containers](http://blog.docker.com/2013/06/create-light-weight-docker-containers-buildroot/) or
just [start from scratch](https://docs.docker.com/articles/baseimages/)

Or maybe just a simple CentOS box.

NOTE: data is written to the VOL in batches of 4K (need to change ??)
Generation is done
 * using Python
 * on a Volume

Build the image
```
sudo docker build -t register.dev.qsd.nl/generator .
```

And run it
```
sudo docker run -d -P --name generator -v /data:/data:rw register.dev.qsd.nl/generator
```

And run that
```
sudo docker run -d register.dev.qsd.nl/generator
sudo docker run -d -P --name generator -v /data:/data register.dev.qsd.nl/generator

sudo docker run -d -v /data:/data register.dev.qsd.nl/generator
```

## The tailer

# Techniques

* Vert.x
* Docker
* Java 8
* Groovy

# Docker

After the projects are build they need to be deployed on a CoreOS cluster.

## Local

A local CoreOS cluster in Vagrant is used for local development. The cluster also hosts our own Docker registry
(inside a container of course).

# Notes
Add yourself to the docker group!
```
 sudo usermod -a -g docker jeroen
```

## nsenter on 14.04
https://gist.github.com/wangyandong-ningxia/0ba636a0448f24de4c20
http://askubuntu.com/questions/439056/why-there-is-no-nsenter-in-util-linux

PID=$(docker inspect --format {{.State.Pid}} <container_name_or_ID>)
nsenter --target $PID --mount --uts --ipc --net --pid

repository: QSD/tardis

repo_name: QSD/tardis


text:
# Portfolio landing page.
![The Home page](/images/home-page.png)

### Author name: Humphrey mutuma.

#### Project description:
This is a responsive, mobile first personal portfolio showing;

   -  skills.
   -  hobbies
   -  Education background
   -  Previous projects
   -  Location
   -  Social media handles
   -  Contact information.

Project setup instructions: You can clone this projects from GitHub.

### Built with
> HTML & CSS
 ### Development
Want to contribute? Great!

To fix a bug or enhance an existing module, follow these steps:

- Fork the repo

- Create a new branch (git checkout -b improve-feature)

- Make the appropriate changes in the files

- Add changes to reflect the changes made

- Commit your changes (git commit -am 'Improve feature')

- Push to the branch (git push origin improve-feature)

- Create a Pull Request

#### Demo :
Here is the link to live demo [Link to live site here](https://humphrey-mutuma.github.io/portfolio-landing-page/#)

Copyright and license information: This project is licensed under the terms of the MIT license.

repository: humphrey-mutuma/portfolio-landing-page

repo_name: humphrey-mutuma/portfolio-landing-page


text:
# vue-nuxt-vuetify-admin-dashboard-starterkit
Nuxt.js + vue + vuetify material admin boilerplate.

# Nuxt Material Admin

Nuxt.js + [vue-material-admin](https://github.com/tookit/vue-material-admin) boilerplate.

This template is based on Vuetify.

### Project Setup

To use this boilerplate make sure to you have already installed [Vue CLI](https://www.npmjs.com/package/@vue/cli)

```bash
# create project
$ cd my-project

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build

# generate static project
$ npm run generate
```

### Documentation

For more information on how this works, check out [Nuxt.js docs](https://nuxtjs.org) and [Vuetify docs](https://vuetifyjs.com/en/getting-started/quick-start).

### Credit

Thanks to [@Michael Wang](https://github.com/tookit) & [@moeddami](https://github.com/moeddami/nuxt-material-admin)  for this awesome admin template.

### Contributing

All contributions are welcome.

### License

[MIT](https://github.com/moeddami/nuxt-material-admin/blob/master/LICENSE)

branch_name: refs/heads/main


text:
# IfOnly

Flutter conditional (`if`-`else` / `switch`-`case`) helpers to make a more readable and simpler conditional statement code.

## 🏃♂ Getting Started

In your flutter project add the dependency:

```yml
dependencies:
  ...
  ifonly: ^0.1.3
```

## 🧞♂ Usage
#### Importing package
```dart
import 'package:ifonly/ifonly.dart';
```

## 🐋 Why using this?

Have you ever seen a repetitive code like this?

```dart
bool isValid = (username != null && username.isNotEmpty && password != null && password.isNotEmpty && email != null && email.isNotEmpty && phoneNumber != null && phoneNumber.isNotEmpty);
```

or returning widget like this

```dart
return (isValid) ? RaisedButton(child: Text('Click Me!'), onPressed: () => print('Hi!');) : RaisedButton(child: Text('Please fill the empty field first!'), onPressed: null;
```

## 🧙♂ What IfOnly do

With this package, we are trying to make a commonly used code easier to read.

Like making the isValid to this:

```dart
bool isValid = [username, password, email, phoneNumber].isNotNullOrEmpties();
```

And returning widget to this:

```dart
return IfOnly(
    condition: isValid,
    validBuilder: (context) => RaisedButton(child: Text('Click Me!'), onPressed: () => print('Hi!');),
    invalidBuilder: (context) => RaisedButton(child: Text('Please fill the empty field first!'),
),
```

Or like this:

```dart
return IfCaseOnly<bool>(
    value: isValid,
    caseBuilder: {
        true: (BuildContext context) => RaisedButton(child: Text('Click Me!'), onPressed: () => print('Hi!');),
        false: (BuildContext context) => RaisedButton(child: Text('Please fill the empty field first!'),
    },
    defaultBuilder: (context) => Text("Expression's builder is undefined. please input it to caseBuilder."),
),
```
Or even like this:

```dart
return IfCaseOnly<IfCases>(
    value: IfCases(
        cases: [
            IfCaseItem(isValid.isTrue(), (context) => YourValidButton()),
            IfCaseItem(isValid.isFalse(), (context) => YourInvalidButton()),
        ],
    ),
    defaultBuilder: (context) => Text("Expression's builder is undefined. please input it to caseBuilder."),
),
```

### 👨🎨 Custom conditional function

If you need a self defined function like when define isValid,
Use method `isCondition` or `ifCondition` for single data, `isConditions` or `ifConditions` for list:

```dart
bool isValid = [username, password, email, phoneNumber].isConditions((item) => item.isNotNullOrEmpty());
```

### Execute code after conditions are meet

Change the `is` on function to `if`

```dart
Widget nextButton;
[username, password, email, phoneNumber].ifConditions(
    (item) => item.isNotNullOrEmpty(),
    onTrue: (context) => nextButton = RaisedButton(child: Text('Click Me!'), onPressed: () => print('Hi!');),
    onFalse: (context) => nextButton = RaisedButton(child: Text('Please fill the empty field first!'),
);
```

### More detailed explanation

We have inputting comment to all function code, Go check [Repository](https://github.com/agungnursatria/ifonly/tree/master/lib) for more.

## 🙏🏻  Contributions

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an [issue](https://github.com/agungnursatria/ifonly/issues).
If you fixed a bug or implemented a feature, please send a [pull request](https://github.com/agungnursatria/ifonly/pulls).

repository: agungnursatria/ifonly

repo_name: agungnursatria/ifonly


text:
---
order: 7
label: 'Node Trigger'
---

- Use the `nodeTrigger` property to set the node's trigger mode.
- Use the `nodeHoverDelay` property to set the delay trigger time in the `hover` mode.

repository: NG-NEST/ng-nest

gha_license_id: MIT

repo_name: NG-NEST/ng-nest


text:
##Single Page Apps and their backends
- SPAs are a great way to separate concerns
- They need backends that transform and serve data
- Backend of a SPA frontend typically needs to:
	- Serving up JSON data
	- Serving static files (HTML, CSS and Javascript)
	- Calling other HTTP services
	- Looking up things in a database
	- Accessing the disk for other misc. things
- Mostly I/O concerns
- Node can help with I/O and Javascript
- Added benefit of being able to use Javascript both client and server side

Note:
- Alright, quick show of hands. How many of you are building some kind of single page application?

- Ok, so you guys must be familiar with a backend of a frontend then? Alright!

- Since browsers are becoming so much more capable, we are able to just serve up the JSON data to the client and not concern ourselves with rendering on the server-side.

- Backend of a SPA frontend is specialized to do certain things. Lets look at some of these needs.

- All these concerns are I/O concerns. Typically these backends will spend very little time actually processing anything, but rather access data and transform it per the client's needs. Which means, they will just sit and wait for things to be returned to them. This is where Node.js can play an important role. Not only that frontend developers get an already well understood language, but it is really tailored for this purpose as well!


text:
# [TailwindCSS](https://tailwindcss.com)

A less "opinionated" alternative to Bootstrap.

## References

* [How to install TailwindCSS 1.0 with Rails 6+](https://gorails.com/episodes/tailwindcss-1-0-with-rails-6) (April 2019) - Comments suggest that the process in the video may not be entirely debugged.
* [IcaliaLabs/tailwindcss-rails](https://github.com/IcaliaLabs/tailwindcss-rails)
* [justalever/kickoff_tailwind](https://github.com/justalever/kickoff_tailwind)
* [Re-create Airbnb's Home Page with Tailwind CSS](https://www.youtube.com/watch?v=7phZqghhho0) (Oct 2019)

repository: DouglasUrner/Foundation

gha_language: Ruby

repo_name: DouglasUrner/Foundation


text:
# Casic

Casic is a toy language loosely based on BASIC. It's a statically typed language with type inference.

## How to build
```
mkdir build
cd build
cmake ../
make
make libcasic.o
```

## Todo
* Code generation
* I/O
* Standard library
* Functions/procedures
* Includes
### Would be cool
* IR optimization
* Precompiled includes
* Interface with other compiled code (e.g. C/C++)

license: Unlicense

repository: wilfreddv/casic

repo_name: wilfreddv/casic


text:
# AddressSpace

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**addressPrefixes** | **Vector{String}** | A list of address blocks reserved for this virtual network in CIDR notation. | [optional] [default to nothing]

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

gha_language: Julia


text:
---
layout: default
title: "Databases - notes"
tagline: "playground"
#category : notes
tags : [draft, wide]
published: false
---

SchemaSpy : how to & your repo remember ?

Postgresql

## Algorithms

### B-trees, B+ trees

__[Wikipedia : B+ tree](https://en.wikipedia.org/wiki/B%2B_tree)__

* [2014: Oracle B-Tree Index: From the concept to Internals](http://www.toadworld.com/platforms/oracle/w/wiki/11001.oracle-b-tree-index-from-the-concept-to-internals)
via [SO: How to lay out B-Tree data on disk?](https://stackoverflow.com/a/40740893)
* [2014: B+Trees – How SQL Server Indexes are Stored on Disk](http://sqlity.net/en/2445/b-plus-tree/)


text:
# MesaTEE GBDT-RS : a fast and secure GBDT library, supporting TEEs such as Intel SGX and ARM TrustZone

[![Build Status](https://ci.mesalock-linux.org/api/badges/mesalock-linux/gbdt-rs/status.svg)](https://ci.mesalock-linux.org/mesalock-linux/gbdt-rs)
[![codecov](https://codecov.io/gh/mesalock-linux/gbdt-rs/branch/master/graph/badge.svg)](https://codecov.io/gh/mesalock-linux/gbdt-rs)

MesaTEE GBDT-RS is a gradient boost decision tree library written in Safe Rust. There is no unsafe rust code in the library.

MesaTEE GBDT-RS provides the training and inference capabilities. And it can use the models trained by [xgboost](https://xgboost.readthedocs.io/en/latest/) to do inference tasks.

New! The MesaTEE GBDT-RS [paper](gbdt.pdf) has been [accepted by IEEE S&P'19](https://www.ieee-security.org/TC/SP2019/program-posters.html)!

# Supported Task
## Supppoted task for both training and inference
1. Linear regression: use SquaredError and LAD loss types
2. Binary classification (labeled with 1 and -1): use LogLikelyhood loss type
## Compatibility with xgboost
At this time, MesaTEE GBDT-RS support to use model trained by xgboost to do inference.  The model should be trained by xgboost with following configruation:

1. booster: gbtree
2. objective: "reg:linear", "reg:logistic", "binary:logistic", "binary:logitraw", "multi:softprob", "multi:softmax" or "rank:pairwise".

We have tested that MesaTEE GBDT-RS is compatible with xgboost 0.81 and 0.82

# Quick Start
## Training Steps
1. Set configuration
2. Load training data
3. Train the model
4. (optional) Save the model

## Inference Steps
1. Load the model
2. Load the test data
3. Inference the test data

## Example
``` rust
    use gbdt::config::Config;
    use gbdt::decision_tree::{DataVec, PredVec};
    use gbdt::gradient_boost::GBDT;
    use gbdt::input::{InputFormat, load};

    let mut cfg = Config::new();
    cfg.set_feature_size(22);
    cfg.set_max_depth(3);
    cfg.set_iterations(50);
    cfg.set_shrinkage(0.1);
    cfg.set_loss("LogLikelyhood");
    cfg.set_debug(true);
    cfg.set_data_sample_ratio(1.0);
    cfg.set_feature_sample_ratio(1.0);
    cfg.set_training_optimization_level(2);

    // load data
    let train_file = "dataset/agaricus-lepiota/train.txt";
    let test_file = "dataset/agaricus-lepiota/test.txt";

    let mut input_format = InputFormat::csv_format();
    input_format.set_feature_size(22);
    input_format.set_label_index(22);
    let mut train_dv: DataVec = load(train_file, input_format).expect("failed to load training data");
    let test_dv: DataVec = load(test_file, input_format).expect("failed to load test data");

    // train and save model
    let mut gbdt = GBDT::new(&cfg);
    gbdt.fit(&mut train_dv);
    gbdt.save_model("gbdt.model").expect("failed to save the model");

    // load model and do inference
    let model = GBDT::load_model("gbdt.model").expect("failed to load the model");
    let predicted: PredVec = model.predict(&test_dv);
```
## Example code
* Linear regression: examples/iris.rs
*  Binary classification: examples/agaricus-lepiota.rs

# Use models trained by xgboost

## Steps
1. Use xgboost to train a model
2. Use examples/convert_xgboost.py to convert the model
    * Usage: python convert_xgboost.py xgboost_model_path objective output_path
    * Note convert_xgboost.py depends on xgboost python libraries. The converted model can be used on machines without xgboost
3. In rust code, call GBDT::load_from_xgboost(model_path, objective) to load the model
4. Do inference
5. (optional) Call GBDT::save_model to save the model to MesaTEE GBDT-RS native format.

## Example code
* "reg:linear": examples/test-xgb-reg-linear.rs
* "reg:logistic": examples/test-xgb-reg-logistic.rs
* "binary:logistic": examples/test-xgb-binary-logistic.rs
* "binary:logitraw": examples/test-xgb-binary-logistic.rs
* "multi:softprob": examples/test-xgb-multi-softprob.rs
* "multi:softmax": examples/test-xgb-multi-softmax.rs
* "rank:pairwise": examples/test-xgb-rank-pairwise.rs

# Multi-threading
## Training:
At this time, training in MesaTEE GBDT-RS is single-threaded.
## Inference:
The related inference functions are single-threaded. But they are thread-safe. We provide an inference example using multi threads in example/test-multithreads.rs

# SGX usage
Because MesaTEE GBDT-RS is written in pure rust, with the help of [rust-sgx-sdk](https://github.com/baidu/rust-sgx-sdk), it can be used in sgx enclave easily as:

```
gbdt_sgx = { git = "https://github.com/mesalock-linux/gbdt-rs" }
```

This would import a crate named `gbdt_sgx`. If you prefer `gbdt` as normal:

```
gbdt = { package = "gbdt_sgx", git = "https://github.com/mesalock-linux/gbdt-rs" }
```

For more information and concret examples, please look at directory `sgx/gbdt-sgx-test`.

# License

Apache 2.0

# Authors

Tianyi Li @n0b0dyCN<EMAIL_ADDRESS>
Tongxin Li @litongxin1991<EMAIL_ADDRESS>
Yu Ding @dingelish<EMAIL_ADDRESS>
# Steering Committee
Tao Wei, Yulong Zhang

# Acknowledgment

Thanks to @qiyiping for his/her great previous work [gbdt](https://github.com/qiyiping/gbdt). We read his/her code before starting this project.

repository: mesalock-linux/crates-sgx

gha_language: Python

repo_name: mesalock-linux/crates-sgx


text:
# React+Flux Starter Kit

This is a starter kit with "batteries included" to get you up and running with
React and Flux more quickly.

## Usage

Branches:

* [`master`](https://github.com/SirCmpwn/react-starter-kit/tree/master) - empty starter kit
* [`todo`](https://github.com/SirCmpwn/react-starter-kit/tree/todo) - simple Todo list example (you are here)

To start your own React application based on this:

    git clone -b master https://github.com/SirCmpwn/react-starter-kit.git
    mv react-starter-kit my-awesome-app
    cd my-awesome-app
    ./bootstrap.sh

## What you get

* Some no-brainer dependencies:
    * React
    * Flux (dispatcher)
    * Babel (ES6/ES7/JSX transpiling)
    * Underscore
* A base Store class
* An entry point

## Todo Example

This isn't the usual TodoMVC style application. It's very very stripped down so
that there's the minimal amount of code to read to grok it. You can get it like so:

    git clone -b todo https://github.com/SirCmpwn/react-starter-kit.git
    cd react-starter-kit
    npm install
    npm start # run dev server

repository: illblew/react-starter-kit

branch_name: refs/heads/todo

repo_name: illblew/react-starter-kit


text:
# FRC team 3512's 2020 robot

Source code for the 2020 comp robot: Arcadia

Source code also for the 2020 practice robot: Ellinika

- [FRC team 3512's 2020 robot](#frc-team-3512-s-2020-robot)
  * [Setup](#setup)
  * [C++ intellisense in Vim with clangd](#c---intellisense-in-vim-with-clangd)
  * [Documentation](#documentation)
  * [Build options](#build-options)
    + [Build everything](#build-everything)
    + [Build (athena)](#build--athena-)
    + [Deploy](#deploy)
    + [roboRIO imaging](#roborio-imaging)
    + [Test](#test)
    + [Simulation GUI](#simulation-gui)
    + [API documentation](#api-documentation)
    + [Debugger](#debugger)
    + [Address sanitizer](#address-sanitizer)
    + [Thread sanitizer](#thread-sanitizer)
    + [Undefined behavior sanitizer](#undefined-behavior-sanitizer)
  * [Live logging](#live-logging)
    + [OutlineViewer](#outlineviewer)
    + [CSV](#csv)
    + [Glass](#glass)
  * [Simulation logging](#simulation-logging)
    + [Simulation GUI](#simulation-gui-1)
    + [CSV](#csv-1)
  * [Autonomous mode selection](#autonomous-mode-selection)
  * [Game](#game)
  * [Unique features](#unique-features)
  * [Goals of the year](#goals-of-the-year)
  * [Roster](#roster)

## Setup

Install the relevant FRC toolchain for your platform (see
https://github.com/wpilibsuite/allwpilib/releases). Make sure the toolchain is
placed in `~/wpilib/2020/roborio` (Linux) or
`C:\Users\Public\wpilib\2020\roborio` (Windows).

Install the following OS packages.

* gcc >= 7.3.0
* python >= 3.6
* scp (optional, for CSV logging)

Install the following python packages via `pip3 install --user package_name`.

* wpiformat (optional)
  * https://github.com/wpilibsuite/styleguide/blob/main/wpiformat/README.rst

We use the latest version of clang-format with wpiformat for C++ formatting.

## C++ intellisense in Vim with clangd

VSCode's intellisense is occasionally unreliable. Vim + clangd is an alternative
that provides better intellisense because it actually invokes a C++ compiler
frontend. It also generates linting annotations via clang-tidy. Setup is as
follows.

1. Install Node.js. You should have a `node` executable in PATH.
2. Install clangd, which comes with the
   [LLVM compiler](https://releases.llvm.org/download.html)
3. Add `Plugin 'neoclide/coc.nvim'` to your `.vimrc`
4. In vim, run `:CocInstall coc-clangd`
5. Run `./gradlew intellisense`

The clangd indexer will start when a file is opened in Vim. See
https://github.com/clangd/coc-clangd for troubleshooting steps if needed.

## Documentation

The source code and algorithms documentation is located in the [docs](docs)
folder. The overall system architecture is documented
[here](docs/system-architecture.md).

## Build options

### Build everything

* `./gradlew build`

This runs a roboRIO and desktop build and runs the desktop tests. This may take
a while, so more specific builds (see below) are recommended instead.

### Build (athena)

* `./gradlew buildAthena`

This runs a roboRIO build.

### Deploy

* `./gradlew deploy`

This runs a roboRIO build if needed, copies the resulting binary to a roboRIO at
<IP_ADDRESS>, and restarts it.

### Test

Unit tests are useful for ensuring parts of the robot code continue to work
correctly after implementing new features or refactoring existing functionality.

* `./gradlew testDebug`

This runs a debug build of the robot code's unit tests from `src/test`.

* `./gradlew testRelease`

This runs a release build of the robot code's unit tests from `src/test`.

### Simulation GUI

* `./gradlew simulateNative`

This runs a release build of the robot code in the simulation GUI.

### API documentation

* `./gradlew doxygen`

This command generates HTML documentation for the robot code from in-source
Doxygen comments. The results are placed in a `docs/html` folder with an
`index.html` page as the root.

### Debugger

* `./buildscripts/debug_test.py`

This runs a debug build of the tests in GDB. Once the build completes and the
debugger's prompt appears, enter `run` to start the robot program. It may take a
while due to the debugger having to load a lot of symbols. If the robot code
crashes, enter `bt` to get a backtrace.

* `./buildscripts/debug_simulation.py`

This runs a debug desktop build of the robot code and simulation GUI in a
debugger.

* `./buildscripts/gdb-test-ci.sh`

This runs a debug build of the tests in GDB in noninteractive mode. It will
automatically run the program in the debugger and print a backtrace if it
crashes. This is useful for debugging crashes in GitHub Actions.

### Address sanitizer

`./gradlew test -Pasan`

This runs a release build of the tests with the address sanitizer enabled. The
address sanitizer is useful for finding memory corruption and reads from
uninitialized memory so they can be fixed.

### Thread sanitizer

`./gradlew test -Ptsan`

This runs a release build of the tests with the thread sanitizer enabled. The
thread sanitizer is useful for finding race conditions.

### Undefined behavior sanitizer

`./gradlew test -Pubsan`

This runs a release build of the tests with the undefined sanitizer enabled.

## Live logging

Logging can be viewed while the robot is running and in simulation.
**OutlineViewer**, **CSV**, and **Glass** are the main ways to view logs while
the robot is running. ControllerBase supports two logging backends for
high-throughput controller performance data: **CSV** and **Glass**.

### OutlineViewer

OutlineViewer is a WPILib tool to view NetworkTables.

* Make sure to have FRC toolchain from the setup section.
* Open the tools directory `~/wpilib/2020/tools` and run
  `python3 ToolsUpdater.py`.
* Open OutlineViewer by running `./gradlew OutlineViewer` and set the server
  location to <IP_ADDRESS>. The default port will work.

### CSV

This backend writes CSV files to the roboRIO flash storage. After they are
recorded, they can be retrieved with `tools/get_csvs.py` and displayed with
`tools/plot_subsystems.py`.

### Glass

Glass is a WPILib tool that allows for pose visualization and networktable
plotting/visualization while the robot is running. See the
[Glass documentation](https://docs.wpilib.org/en/latest/docs/software/dashboards/glass/introduction.html)
for more details.

* Make sure to have FRC toolchain from the setup section.
* Open the tools directory `~/wpilib/2020/tools` and run
  `python3 ToolsUpdater.py`.
* Open Glass by running `./gradlew Glass` and set the server location to
  <IP_ADDRESS>. The default port will work.

## Simulation logging

Logs can be viewed in real time via NetworkTables in the simulation GUI or
offline via CSV processing.

### Simulation GUI

The simulation GUI is straightforward but can be read more about
[here](https://docs.wpilib.org/en/latest/docs/software/wpilib-tools/robot-simulation/simulation-gui.html).

### CSV

After running the tests, the CSV files will be saved. The backend writes CSV
files to `build/test-results/frcUserProgramTest`. To display the CSVs, run the
following command:

```
./tools/plot_subsystems.py [regexp]
```

`plot_subsystems.py` will display CSVs whose filepaths match the optional
regular expression `[regexp]`. It should be given filepath components after the
`frcUserProgramTest` folder.

To show data for a specific subsystem, include its name in the regular
expression.

```
./tools/plot_subsystems.py Flywheel
```

Specific states, inputs, or outputs can be viewed as well.

```
./tools/plot_subsystems.py "Flywheel states"
```

Other examples:

```
./tools/plot_subsystems.py "DrivetrainTest/ReachesReferenceStraight"
./tools/plot_subsystems.py "AutonomousTests/AutonomousTest/Run/Left Side Shoot Ten/Drivetrain (States|Outputs)"
./tools/plot_subsystems.py "DrivetrainTest/ReachesReferenceCurve/Drivetrain timing"
```

## Autonomous mode selection

Open shuffleboard and select the desired autonomous mode from the dropdown menu.
When the indicator next to the menu turns from a red X to a green checkmark, the
robot has confirmed the selection.

See
[this](https://docs.wpilib.org/en/latest/docs/software/wpilib-tools/smartdashboard/choosing-an-autonomous-program-from-smartdashboard.html)
for details on how the robot side works.

## Game

The game for 2020 is called Infinite Recharge, where teams are tasked with shooting power cells into a low, high outer, and high inner goal. This year, the autonomous period returns and is the standard 15 seconds. Teams earn points in this period from moving off the initiation line and earn double the usual points for scoring in the power cell goals. Tele-op adds access to the control panel, which can be spun 3 to 5 times once the stage 2 capacity has been reached for more points, and can spun to a specified color from the FMS to score more points and earn the alliance a ranking point. Endgame tasks robots to climb a "generator switch" square truss, which may swing to be balanced or unbalanced. A ranking point is given if three robots are able to climb, or if two robots climb and the shield generator is balanced.

## Unique features

This years robot's unique features include:

- Augmented state-space drivetrain controller
- Vectored intake/outtake wheels
- Funnel
- Indexing conveyor
- Turret
- Single-wheel flywheel (similar to 2012)
- Two-stage elevator climbing system
- Raspberry Pi 3 w/ vision processing

## Goals of the year

|Status|Goal|Additional Description|
|------|----|----------------------|
|Yes|Drivetrain State-Space Controller|Following set autonomous trajectories accurately and precisely and using a nonlinear observer for a global pose estimate.|
|Yes|Turret State-Space Controller|Autoaiming at at the goal while the drivetrain moves underneath.|
|Yes|Flywheel State-Space Controller|Maintaining a constant RPM with reasonable recovery time.|
|Yes|Computer Vision|Using Perspective-n-Point to correct nonlinear observer's state estimate.|
|Yes|Unit Tests|Simulations for *everything* to test complicated robot code with no physical robot present.|

## Roster

Mentors: Tyler Veness

Students (2020): William Jin (Lead), Kyle Quinlan, Matthew Santana, Ivy Quach, Adan Silva

Students (2021): Kyle Quinlan (Lead), Matthew Santana, Ivy Quach, Adan Silva, Daniela Elenes


text:
# Microthyrium nigroannulatum J. Webster, 1952 SPECIES

#### Status
SYNONYM

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

#### Published in
Trans. Br. mycol. Soc. 35(3): 208 (1952)

#### Original name
Microthyrium nigroannulatum J. Webster, 1952

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Dothideomycetes/Microthyriales/Microthyriaceae/Lichenopeltella/Lichenopeltella nigroannulata/ Syn. Microthyrium nigroannulatum/README.md

repo_name: mdoering/backbone


text:
The duplicate finder plugin allows global exclusion of dependencies, classes
and resources. Any matching dependency or resource will not be considered
duplicate, no matter how often it appears on the classpath.

This feature is very easy to abuse. Please use with care.

```xml
<configuration>
  <useDefaultResourceIgnoreList>true</useDefaultResourceIgnoreList>
  <ignoredClassPatterns>
    <ignoredClassPattern>...</ignoredClassPattern>
  </ignoredClassPatterns>
  <ignoredResourcePatterns>
    <ignoredResourcePattern>...</ignoredResourcePattern>
  </ignoredResourcePatterns>
  <ignoredDependencies>
    <dependency>
      <artifactId>...</artifactId>
      <groupId>...</groupId>
      <version>...</version>
      <type>...</type>
      <classifier>...</classifier>
    </dependency>
  </ignoredDependencies>
</configuration>
```

#### `useDefaultResourceIgnoreList` flag

By default, the duplicate finder plugin ignores a set of resources on
the classpath which tend to be duplicates all the time.

These resources are specified as standard Java regular expressions. All patterns are case insensitive.

The default resource ignore list [is documented here](default_ignored_elements.html).

Maven command line property: `duplicate-finder.useDefaultResourceIgnoreList` (**Plugin version 1.1.1+**)

Default: **true**

**Warning!** Setting this element to `false` will result in a significant number of false positives.

#### `useDefaultClassIgnoreList` flag

**Available in plugin version 1.2.1 and later.**

By default, the duplicate finder plugin ignores a set of classes on
the classpath which tend to be duplicates all the time.

These resources are specified as standard Java regular expressions. All patterns are case insensitive.

The default class ignore list [is documented here](default_ignored_elements.html).

Maven command line property: `duplicate-finder.useDefaultClassIgnoreList`

Default: **true**

#### `ignoredResourcePatterns` for global resource exclusion

The `ignoredResourcePatterns` element lists standard Java regular expression patterns that are excluded from the duplicate check. All patterns are treated as case insensitive.

Any pattern added here is treated similar to the patterns on the default resource ignore list.

**Note**. Any pattern here is applied to the whole resource path, not
  to sub-components. It is therefore important to anchor a pattern to
  the beginning, the end or a separator (`/`). It is recommended to
  test any regular expression with a
  [regular expression tester](http://www.regexplanet.com/advanced/java/index.html).

##### Examples

Ignore all resources ending in `index.html`:

```xml
<configuration>
  <ignoredResourcePatterns>
    <ignoredResourcePattern>.*index\.html$</ignoredResourcePattern>
  </ignoredResourcePatterns>
</configuration>
```
Ignore all log4j and logback configuration resources:

```xml
<configuration>
  <ignoredResourcePatterns>
    <ignoredResourcePattern>/?[^/]*?log4j\.xml$</ignoredResourcePattern>
    <ignoredResourcePattern>/?[^/]*?log4j\.properties$</ignoredResourcePattern>
    <ignoredResourcePattern>/?[^/]*?logback\.xml$</ignoredResourcePattern>
    <ignoredResourcePattern>/?[^/]*?logback\.properties$</ignoredResourcePattern>
  </ignoredResourcePatterns>
</configuration>
```

#### `ignoredClassPatterns` for global resource exclusion

**Available in plugin version 1.2.1 and later.**

The `ignoredClassPatterns` element lists standard Java regular expression patterns that are excluded from the duplicate check. All patterns are treated as case insensitive.

Any pattern added here is treated similar to the patterns on the default resource ignore list.

**Note**. Any pattern here is applied to the whole resource path, not
  to sub-components. It is therefore important to anchor a pattern to
  the beginning, the end or a separator (`/`). It is recommended to
  test any regular expression with a
  [regular expression tester](http://www.regexplanet.com/advanced/java/index.html).

##### Examples

Ignore all resources starting with `javax`:

```xml
<configuration>
  <ignoredClassPatterns>
    <ignoredClassPattern>javax.*$</ignoredClassPattern>
  </ignoredClassPatterns>
</configuration>
```
Ignore all classes that aren't from my company:

```xml
<configuration>
  <ignoredClassPatterns>
    <ignoredClassPattern>^((?!com[/.]mycompany).*)$</ignoredClassPattern>
  </ignoredClassPatterns>
</configuration>
```

#### `ignoredDependencies` for global dependency exclusion

Sometimes, a dependency is hopeless. It may drag in a large number of
duplicates or it may not have been written to any given standard. For
these very rare cases, it is possible to completely exclude a
dependency and everything that is related to it from the duplication
check. Usually, these dependencies are also in a non-standard scope
(such as `provided` or `system`).

**Warning!** Excluding a dependency globally may make the duplicate
  finder check pass. It will not, however, fix the underlying cause
  for the failure. Ignoring duplicate dependencies can and almost
  always will lead to hard-to-debug runtime problems such as
  hard-to-explain
  [`ClassNotFoundException`](http://docs.oracle.com/javase/8/docs/api/java/lang/ClassNotFoundException.html)
  (or their big sibling
  [`NoClassDefFoundError`](http://docs.oracle.com/javase/8/docs/api/java/lang/NoClassDefFoundError.html))
  problems.

The `ignoredDependencies` section contains [`dependency`](Describing
Dependencies) elements. Each `dependency` can be fully or partially
defined.

Each element listed here will be removed from the list of dependencies
that are checked for duplicates.

##### Example

Remove `org.jruby:jruby-complete` from the duplicate check:

```xml
<!-- jRuby is hopeless -->
<configuration>
  <ignoredDependencies>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-complete</artifactId>
    </dependency>
  </ignoredDependencies>
</configuration>
```

repository: basepom/duplicate-finder-maven-plugin

gha_language: Java

repo_name: basepom/duplicate-finder-maven-plugin


text:
# QUIP Auth Without PathDB

## About this Method and Guide

PathDB is used as both authentication and authorization. In instances where PathDB is not desired, we use a combination of an external identity provider and an internal authorization service. The authorization service consumes Json Web Tokens (JWTs) from the identity provider, and then will issue JWTs which convey both authentication and authorization, which are consumed by the application.

This guide aims to explain how to make a deployment use this method.

## Getting an Identity Provider and Setting up Login

There are many identity providers, but for testing and examples, we have been using auth0.

When selecting, an identity provider, note that we expect it to provide a JWT, and to have a certificate/public key/secret which can be used to verify such JWTs.

The example given in the Distro within config/login.html is set up for auth0; simply change the corresponding variables for your auth0 application if auth0 is used. If using another identity provider, then login.html, or equivalent, needs to, at least, set the JWT to a cookie called "token", and call the auth service's 'check' route, and save a successful result as the token. Follow the guide which your identity provider uses for further guidance.

## Keys/Certificates

Add the following files; by default, they are mounted:

- --./jwt\_keys/certificate or ./jwt\_keys/jwk.json is the certificate/public key/secret or jwk (respectively) from the **identity provider**. (If both are included, the jwk takes precedence).
- --./jwt\_keys/key and ./jwt\_keys/key.pub are used as the signing and check keys for the **auth service**
  - --These can (and should) be generated with ./kwt\_keys/make\_keys.sh

## Deployment Configuration

Turn off disable security under the elevate service to block routes.

## Adding Users to Database

Add users as in ./config/add\_mongo\_users.js. Attributes can be added to deny access to routes (e.g. allow only some users to post and delete)

The name field is the email field (or failing that, sub field) in that priority from the identity provider.

repository: jbalsamo/Distro

repo_name: jbalsamo/Distro


text:
# json-annotations
A Simple example demonstrating the usage of json annotation

This example has implementations for

@JsonIgnore - Ignore a field

@JsonIgnoreProperties - Ignore a set of fields

@JsonIgnoreType - Ignore a nested object

@JsonProperty - json object field name

@JsonPropertyOrder - order the fields in json

@JsonRootName - provide a root entity name for the json

@JsonRawValue - serialize the field as it is

@JsonInclude - helps to eliminate non null, non empty etc

@JsonAutoDetect - helps to visualize fields by controlling using access modifiers

@JsonGetter - map a json value to the getter

@JsonAnyGetter - add multiple different values not defined in the model with the usage of map

@JsonSetter - map a json value to the setter

@JsonTypeInfo - type information for serialization

@JsonSubTypes - sub types associatd with that type

@JsonTypeName - provide a type name for the class


text:
# Loading & Resizing a Bitmap in Xamarin.Android

When working with `Bitmap`s in Xamarin.Android, we need to remember that we are dealing with 2
garbage collectors: one in the Java world and one in the .NET world. Although this may seem like
extra work, it is simple to do.

In the simple case of `Bitmap` processing, we need to be aggressive with the disposal - aka
`Recycle`:

```csharp
// create the bitmap instance
Bitmap myBitmap = BitmapFactory.DecodeFile("path/to/image.jpg");

// do some image processing ...

// let Java know we are finished
myBitmap.Recycle();

// let .NET know we are finished
myBitmap.Dispose();

// optional cleanup
myBitmap = null;
```

After calling `Recycle` we cannot make use of the image anymore, since we actually just deleted
all the data in memory. So, if there is image caching, we can't do this.

Sometimes we need to do a little more, typically when we are accessing the `Bitmap` from an
`ImageView` or some other Java-based reference. We can usually add a `GC.Collect` call, but
we just need to make sure that we don't overdo it as the GC is relatively slow.

```csharp
// get the bitmap
Bitmap myBitmap = anotherObject.Bitmap;

// remove the reference
anotherObject.Bitmap = null;

// clean up
myBitmap.Recycle();
myBitmap.Dispose();
myBitmap = null;

// let the GC know it can run
System.GC.Collect();
```

This can be seen when updating the picture inside an `ImageView`:

```csharp
// clean old image
var oldImage = imageView.Drawable as BitmapDrawable;
if (oldImage != null && oldImage.Bitmap != null)
{
    imageView.SetImageBitmap(null);

    var oldBitmap = oldImage.Bitmap;
    oldBitmap.Recycle();
    oldBitmap.Dispose();
    oldBitmap = null;

    System.GC.Collect();
}

// set new image
imageView.SetImageBitmap(LoadBitmap());
```

More information can be found in the docs:
 - https://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/#Helping_the_GC

Bugzilla:
 - https://bugzilla.xamarin.com/show_bug.cgi?id=3024

repository: mattleibow/LoadAndResizeAndroidBitmap

repo_name: mattleibow/LoadAndResizeAndroidBitmap


text:
---
layout: post
title: My notes for the QA Hangout
---

I participated on a hangout about QA with PHP, you can check it
out [here](https://www.YouTube.com/watch?v=lSP70aT5f2Y). I think
It was a good one, we had even the right of a
[review](http://www.jack.eti.br/hangout-qa-em-php-ferramentas-tecnicas-e-processos/).

The following content is a collections of notes I build to orient
my talk on the event.

## Braimstorm

- Test ONLY business logic;

- Write a new test VS add an assertion in the existing one
    Always reduce to a valuable busiess requirement

- Test the smaller scope possible on your small tests
    If you prove the part you are proving the hole as
    well;

- Start small
    On new features I usually put the test class and the class on
    the same file till I'm encouraged enough by it's features to
    split;

- Avoid databases if you can
    It's slow and Doctrine somethimes trows exceptions so we have to rebuild the
    entire setup;

- Coverage
    Use data structures that make special cases go away - Which is the ideal size to get started with the logic?

- Write only tests that fail

- Tests size
    Google don't divide the tests in unity, integration,etc. They
    use the small, medium and big.
    I use an annotation size to define it

-  At google testing is called engineering of productivity

- Medium tests can be used to test a hole feature
    Convert you browser request into a test when something fails. In
    php there is the var_export funciton that generates an array.

- Make easy the reuse of features on tests
    On Compufácil we use a collection of traits on tests so we can
    avoid the trouble of instanciating may things. The traits
    accept mixed arguments and try to do the best to create the
    entity with only what the developer is wanting to pass to the
    test.

- The refactor is a troublesome step
    If you see you can abstract, maybe your test will be totally
    desintegrated.
    So is nice to dismember the feature you want to test from the
    begining so you avoid some trouble with abstractions.

- Abuse of the concept of factories. If you use a library to
  manage dependencies better, so on the factory you can load
  environments variables and configurations to make your object
  proper to run tests and go in production.

- Don't test what the language can do for you:
php 7 brings scalar types and return types that can assert speed up testing

### PHP7

Scalar types and return types for testing
Expectations - to assert setup code
Anonymous classes;

## Steps TDD
    - Write a test
    - Make it pass with the fewer trouble possible
    - Refactor
    - Start again

### Benefits
    Confident refactoring

### Tools
    php-beautifier and phpcs to check for style problems
    pdepend - to generate statistics
    pyresttest - to test API's
    vfsStream - to test files
    mockery - to create mocks
    phpcop - to change dates

## Books

Test-Driven Development By Example - Kent Beck
How google tests software  - James Whittaker

repository: jeanCarloMachado/blog

gha_language: HTML

repo_name: jeanCarloMachado/blog


text:
# Amsterdam_Metro
Show the metro line of Amsterdam over the years.

## Feedback

*Change after feedback*

[x] Test application in device lab

# Progressive Enhancement
> *Progressive Enhancement (PE) is the principle of starting with a rock-solid foundation and then adding enhancements to it if you know certain visiting user-agents can handle the improved experience.* - [Sam Dwyer](https://www.smashingmagazine.com/2009/04/progressive-enhancement-what-it-is-and-how-to-use-it/)
## Images

__Disabling images__

- Chrome: Settings -> Advanced -> Content Settings -> Do not show any images
- Firefox: about:config -> permissions.default.image -> 2 (all images) of 3 (third-party images)
- Safari: Settings -> Advanced -> Show Develop menu in menu bar -> Develop -> Disable images

__Result__

![result of disabling images](/readme-assets/images-progressive.PNG)

__Change__

When disabling images no images are displayed, also there is no alt text. So what I did is generating alt text in the template engine, so that even if no images are displayed, there is still something to read.

```javascript
let directive = {
    photo: {
        src: function () {
        return this.photo
    },
        alt: function () {
        return this.title
    }
    }
}
```

__Result__

![add alt text](/readme-assets/images-progressive-add-alt-text.PNG)

## Custom font

__Disabling font__

- Chrome: extensie (of --disable-remote-fonts als command line switch)
- Firefox: about:config -> gfx.downloadable_fonts.enabled -> false
- Safari: extensie (https://github.com/lurado/SansFonts, 1Blocker)

__Result__

![result of disabling font](/readme-assets/font-progressive.PNG)

When disabling the font the font somehow doesn't change, this is maybe do though loading the font from a 3rd party (google)

It still works with disabling the font, so I'll will change nothing to the code

## Javacript

The whole site is created in javascript so when disabling this, the whole site is shut down. No result is displayed.

__Change__
The base functionality of the site is showing the tram and metro line. So one solution for this can be fetching the lines from the server.

## Color

__Windows__: You can apply different color filter by going to Settings > Ease of Acces > Color and highcontrast

![Window ease of acces settings](/readme-assets/color-settings-progressive.PNG)

__Gray scale__
![adding gray scale](/readme-assets/color-grey-scale-progressive.PNG)

When enabling gray scale the lines are not easy to differenciate between each other.

__Change__

One thing we can add is a texture on the lines so that even if the colors are the same, there is still something to differenciate between the lines.

__Inverted colors__

!['adding inverted colors'](/readme-assets/color-inverted-progressive.PNG)

When enabling inverting the colors, the lines are still easy to differenciate. So no changes here.

__Protanopia__

>*Protanopia (1% of males): Lacking the red cones for long-wavelength sensitive retinal cones, those with this condition are unable to distinguish between colors in the green–yellow–red section of the spectrum.* - [wikipedia](https://en.wikipedia.org/wiki/Color_blindness#Protanopia)

__Result__

!['Result when protanopia filter is applied'](/readme-assets/color-protanopia-progressive.PNG)

After applying the protanopia filter, the lines are still easy enough to differenciate between each other, so we don't need to apply any changes.

__Tritanopia__

>*Tritanopia (less than 1% of males and females): Lacking the short-wavelength cones, those affected see short-wavelength colors (blue, indigo and a spectral violet) greenish and drastically dimmed, some of these colors even as black. Yellow is indistinguishable from pink, and purple colors are perceived as various shades of red.* - [wikipedia](https://en.wikipedia.org/wiki/Color_blindness#Tritanopia)

__Result__

!['Result when tritanopia filter is applied'](/readme-assets/color-tritanopia-progressive.PNG)

After applying the trianopia filter, we can still differenciate between all the lines, so also no changes here.

## Breedband

__Chrome:__ Open the devloper tool > Network > Slow 3g

!['Network tab in chrome developer tool'](/readme-assets/breedband-throttle-progressive.PNG)

__Result__

!['Network tab in chrome developer tool'](/readme-assets/breedband-result-progressive.PNG)

__Change__

As you can see on the result image, the site is only usable after 17s on slow 3g. This is unacceptable. Also when clickin on a line, the image are very slowly loaded.

What we can do to improve the perceiving speed, is loading the lines first. This is because the lines are our core functionality. Then when we're loading the map, the map should be cached or saved on the local storage, this is to have it load immediately when the user is visiting the site again. As for images, we should load less of them. What we're doing now is loading the whole image galery from the database. What we should do is loading maybe three or four images and then load more images after the user scrolled through all the images.

## Cookie

__Chrome:__ Settings > Advanced > Privacy and security >  Content settings > Cookies > Block 3rd parties

!['disable third parties cookies'](/readme-assets/cookies-disable-progressive.PNG)

__Result__
Because the site is not using any cookies, there is no change to performance of the site. So no changes here.

##  Local storage
__Chrome:__  Developer tool > Application > Local storge > Clear local storage

!['clear local storage'](/readme-assets/local-storage-clear-progressive.PNG)

__Result__

Like the cookies, we're not using any local storage functions, so the site is not affected if we clear the local storage.

## Trackpad
for this test we'll disable the trackpad and only use the keyboard

__Result__

Immediately when we try to navigate through the site, there is no highlight on focus. We can't even select any line with the keyboard. After activating the lines with the keyboard the images are displayed. When trying to navigate through the images there is also no highlight.

__Change__

The lines should've a tab-index or an anchor element to be able to navigate through the lines with an keyboard, also the Images should've a focus state so that the user know where they are when tabbing through the site.

!['added border to images'](/readme-assets/trackpad-focus-progressive.PNG)

## Device lab
The further test this application, the application is also tested in the device lab. The device lab consist of different mobile devices

### result
![Amsterdam metro tested in the device lab](readme-assets/device-lab.jpg)
The application doesn't work as well as firstly intended. As you can see from the photo, some devices display a white background instead of the map. When developing, the application is tested on multiple browser and the application works in the development enviroment, but not on the mobile devices. Somehow the application only works on devices that have __Chrome__ as browser. I don't know the specific reason for this.

### Change
![Amsterdam metro tested in the device lab with the metro lines](readme-assets/device-lab-line.jpg)

The basic functionality of showing the Tram and Metro lines works really well on the devices. When something is too big or to small the user is able to pinch zoom the map.

![Amsterdam metro tested in the device lab with the metro lines](readme-assets/device-lab-detail.jpg)
When clicked on a tram or metro line a collection of photo will be displayed with additional information. But as you can see from the photo above, this section is displayed really big. Also this is very crucial: there is no option to hide the collection of photos. The photo collection is there permanent and this takes a really big portion of the screen. Because of this, the interaction is not enjoyable anymore.

change:
- Make photo collection smaller
- Add additional button to hide collection when needed


text:
## About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:
#config
Directory Permissions
After installing Laravel, you may need to configure some permissions. Directories within the  storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run. If you are using the Homestead virtual machine, these permissions should already be set.

Application Key
The next thing you should do after installing Laravel is set your application key to a random string. If you installed Laravel via Composer or the Laravel installer, this key has already been set for you by the php artisan key:generate command.

Typically, this string should be 32 characters long. The key can be set in the .env environment file. If you have not renamed the .env.example file to .env, you should do that now. If the application key is not set, your user sessions and other encrypted data will not be secure!

#phpstorm for laravel
Use the link's github below to know the functions's laravel to phpstorm

#start laravel
run laravel without create virtual host:
```
php artisan serve
```
in laravel combination tow function var_dump() and die() use dd();
#migration  laravel
run all migration for create table in database set in .env
```
php artisan migrate
```
create new migration
if use name create_nametable_table use for create migration no required use option --create but use format not formal need to use option --create because
can not create function default for class new migration create class by empty  function
```
php artisan make:migration create_nametable_table
```
if need know option use  below command:
```
 php artisan help make:migration

 Options:
       --create[=CREATE]  The table to be created
       --table[=TABLE]    The table to migrate
       --path[=PATH]      The location where the migration file should be created
       --realpath         Indicate any provided migration file paths are pre-resolved absolute paths
   -h, --help             Display this help message
   -q, --quiet            Do not output any message
   -V, --version          Display this application version
       --ansi             Force ANSI output
       --no-ansi          Disable ANSI output
   -n, --no-interaction   Do not ask any interactive question
       --env[=ENV]        The environment the command should run under
   -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

```
after create migration need some change again run migration but not work migration because in status migration get run all migration
you can get status migration use by command :
```
php artisan migrate:status
```
you can rollback migration back to last migration ,and again run migration for do change
```
php artisan  migrate:rollback
```
##ORM (Object relation map) Eloquent
In laravel, there is a system, or in our way, we can map each row's dataBase to an object in the program, for example,
an object of the product , when we query the database, gives us an object from the row of the database.
This kind of m of mvc laravel (models in laravel)
```
php artisan  make:model  Product
```
In the models, their names are singular names. The names of the tables are nouns.
 Each object's model is represented from a table row in our database.
 model create in folder app(namespace app)
The model was an interface layer between us and the database
for create model and migration and controller by one command:
```
php artisan  make:model  Product -m -c
```
   ##tinker
A console that accesses the app
   ```
   php artisan tinker
   ```

   ##blade
   for create layouts you can create folder layouts next create file layout in folder.
   after create layout , you can use layout by below code
      ```
      @extends('Folder_layouts.name_file_layout')
      ```

   create section in layout by @yield('name_section') in file layout and fill in other file use layout
    ```
    @section('name_section')
    @endsection
    ```
    for use in file css or js in webservice ,you can use function asset for example:
        ```
            <link rel="stylesheet" href="{{asset("css/navbar-top-fixed.css")}}">
        ```

repository: apachish/shop

repo_name: apachish/shop


text:
---
layout: post
title: Edward Tufte, Presenting Data and Information
---

Last week I attended
  Edward Tufte's course on data visualization here in Seattle.
For those who don't know him, Tufte is one of the world's top experts on information visualization.
Here is a short description, from his website:

> Edward Tufte has written seven books, including Beautiful Evidence,
> Visual Explanations, Envisioning Information, The Visual Display of
> Quantitative Information, and Data Analysis for Politics and Policy.
> He writes, designs, and self-publishes his books on analytical design,
> which have received more than 40 awards for content and design.
> He is Professor Emeritus at Yale University, where he taught courses
> in statistical evidence, information design, and interface design.
> His current work includes landscape sculpture, printmaking,
> video and a new book.

During the course Tufte made several observations that go against
what some other people in the field recommend.
The most notable from my point of view is to use visualizations
with lots of content.
And instead of trying to simplify the data, let people understand
it on their own.
I believe this can be appropriate in many cases, for example in an

  underground map:

However in some other cases the information overload hides what is
really important. For example in this awful visualization
in
  Forbes about where Americans are moving:

It's impossible to understand everything that is going on.
What I got out of it is that people are moving from the most
economically impacted areas (Southern California, Detroit, Miami, etc.)
and into the least impacted areas (Pacific northwest, Texas, New York,
Washington, etc.). Also I think I saw a minor trend of movement from
colder areas to warmer areas. However with all that clutter it's hard
to understand the overall picture.
It is true that overload in general is a failure of design, not
a problem with information, however it's definitely easier to make
bad designs when one tries to present too much data.

In general the course was interesting, but for the most part it covered
basic content. However they gave us a copy of Tufte's four books in
visualization!
Click on the following images to go to the corresponding Amazon pages:

The Visual Display of Quantitative Information

Envisioning Information

Visual Explanations

Beautiful Evidence


text:
# Votum CSS Media Queries

A collection of CSS media queries and some test files.

**TL;DR:** The file [six-breakpoints-revised.htm](six-breakpoints-revised.htm) contains the final media query definitions.

See the demo files in action using rawgit.com:

* https://rawgit.com/votum/media-queries/master/four-breakpoints-revised.htm
* https://rawgit.com/votum/media-queries/master/six-breakpoints-revised.htm

## Motivation

The goal was to find (initially four) CSS media queries that would work across different mobile devices sizes, OS and browsers. We needed two types of media queries for each breakpoint: One that is active for a single brekapoint only and one that is active from the smallest screen size to the given breakpoint so that CSS property inheritance could be used across multiple breakpoints.

## Research

Before implementing a single line of CSS, Votum as well as Universal Music Germany each had done an analysis of multiple browser statistics from different websites to gather lists of typical screen sizes and resolutions and group the respective devices into "design breakpoints". We will not publish the internal raw data at this point. But you can find an overview poster generated by Votum from public data sources in this repository – [the responsive screensize guide](responsive-screensize-guide.pdf).

## Documentation

We went through some tedious testing on multiple devices. For that purpose I created some simple test files. Three of them are included in this repository. The four-breakpoint-* files are the ones that were the base for the code that is currently in production at [m.universal-music.de](http://m.universal-music.de/). The idea to use only four breakpints is based on the [Twitter Bootstrap](http://getbootstrap.com/) which we used as a base for out development. During testing it got clear that four breakpoints may be not enough to target such different devices as an iMac 24" and an HTC Desire with 4.3" screen. Starting again from our statistical data I defined [the final six breakpints](six-breakpoints-revised.htm) that roughly matches the poster mentioned above.

## Devices used for testing

| Name                 | OS            | Resolution|Display| Browser |
|----------------------|---------------|:---------:|------:|---------|
|Samsung Ativ S        |Windows Phone 8|1280 x 720 |4,8"   |Internet Explorer 10
|Nokia Lumia 625       |Windows Phone 8|800 x 480  |4,7"   |Internet Explorer 10
|Surface 1             |Windows 8.1 RT |1366 x 768 |10,6"  |Internet Explorer 11
|Surface 2             |Windows 8 RT   |1920 x 1080|10,6"  |Internet Explorer ?
|iPod                  |Apple OS 7.0.3 |1136 x 640 |4"     |Safari
|iPad 2                |Apple OS 7.0.3 |1024 x 768 |9,7"   |Safari, Chrome, Mercury, MiHTool
|iPad 3                |Apple OS 6.1.3 |2048 x 1536|9,7"   |Safari
|IPad 4 Retina         |Apple OS 7.0.3 |2048 x 1536|9,7"   |Safari, Chrome, Mercury, Opera Min
|Samsung Galaxy Tab 2  |Android 4.1.2  |1024 x 600 |7"     |Android Native
|Samsung Galaxy Tab 8.9|Android 3.2    |1280 x 800 |8,9"   |Android Native, Firefox, Opera Mobile
|HTC Desire 500        |Android 4.1.2  |800 x 480  |4,3"   |Android Native, Chrome, Firefox, Opera Mini
|Samsung Galaxy Tab 3  |Android 4.2.2  |1280 x 800 |10,1"  |Android Native, Chrome

## Acknowledgements

* [Stephan<EMAIL_ADDRESS>and [Dietrich<EMAIL_ADDRESS>from Universal Music Germany for providing a lot of browser and device statistics data as well as implementing the initial versions of the media queries.
* [Markus<EMAIL_ADDRESS>for generating the screensize guide.
* [Thomas<EMAIL_ADDRESS>for putting this all together, testing it and rewriting the media queries over and over.

repository: turbine-kreuzberg/media-queries

repo_name: turbine-kreuzberg/media-queries


text:
Demo WordPress

  Bare WordPress repo to use for demos

# Setup

This repository uses `docker` for an easy setup. It also provides a `Makefile` for the most common used commands to run the project. Here are the provided commands:

- `make up` to start the project in the background.
- `make up-build` to build the docker image and run the project in the background.
- `make logs` to follow the logs of the WordPress container.
- `make down` to destroy the containers.
- `make restart` to destroy the containers and create new ones in the follow-up.

repository: dixeed/demo-wp

repo_name: dixeed/demo-wp


text:
# Collectd Surfboard

A Perl based Collectd plugin to collect Motorola/Arris Surfboard signal metrics.

## Requirements

* collectd with Perl support
* HTML::TableExtract
* libwww-perl

## Configuration

```
LoadPlugin perl

TypesDB "/usr/share/collectd/types.db"
TypesDB "/usr/share/collectd/sb-types.db"
<Plugin perl>
  IncludeDir "/etc/collectd/lib"
  BaseName "Collectd::Plugins"
  LoadPlugin SurfBoard
</Plugin>
```

You must define the sb-types.db and in doing so will replace the default types.db.
So you must include that back in as well.

 So for the above example the SurfBoard.pm script should
reside in `/etc/collectd/lib/Collectd/Plugins`.

repository: ipstatic/collectd-surfboard

gha_language: Perl

repo_name: ipstatic/collectd-surfboard


text:
# Require defaults to be on top of the model (defaults-on-top)

If defaults are declared on the model, they should be declared as the very first thing to improve readability of the code.

## Rule Details

The following patterns are considered warnings:

```js
Backbone.Model.extend({
    initialize: function() {
        ...
    },
    defaults: {}
});

```

The following patterns are not warnings:

```js

Backbone.Model.extend({
    defaults: {},
    initialize: function() {
        ...
    }
});

```

## Options

This rule accepts an array of strings that would be excluded from the check. For example, if you use `id` or `idAttribute` properties in your Models and would like them to be declared before `defaults`, you can enable this rule with the following options:

```json

"rules" : {
    "backbone/defaults-on-top": [1, ["id", "idAttribute"]],
    ...
}

```

## When Not To Use It

If you never use defaults, there's no reason to enable this rule

## Further Reading

[BackboneJS Documentation](http://backbonejs.org/#Model-defaults)

repository: ilyavolodin/eslint-plugin-backbone

repo_name: ilyavolodin/eslint-plugin-backbone


text:
# Zenject-DynamicObjectInjection

Zenject-DynamicObjectInjection is a tool that allows to automatically inject/bind dependencies into the prefabs instantiated at runtime by the [standard](https://docs.unity3d.com/ScriptReference/Object.Instantiate.html) Unity 3D instantiation flow.

As the additional side product, it's also allow to use all power of [Zenject](https://github.com/modesttree/Zenject) framework in [Service Locator Pattern](#service-locator-pattern) style.

### What it's all about

If you want to instantiate a prefab at runtime and have any MonoBehaviour's automatically injected, Zenject framework [force](https://github.com/modesttree/Zenject/blob/master/README.md#general-guidelines--recommendations--gotchas--tips-and-tricks) you to instantiate game object through [factory](https://github.com/modesttree/Zenject/blob/master/README.md#creating-objects-dynamically) or using the special [DiContainer.InstantiatePrefab](https://github.com/modesttree/Zenject/blob/master/README.md#dicontainer-methods-instantiate) method. In most cases, it works fine, but sometimes especially if you use 3d-party solutions, it can become a problem.

This tool solves this problem allowing you to use standard [Object.Instantiate](https://docs.unity3d.com/ScriptReference/Object.Instantiate.html) method and will ensure any MonoBehaviour's fields that are marked with the ```[Inject]``` attribute are filled in properly, and all ```[Inject]``` methods within the prefab are called as it happens when prefab is instantiated in Zenject recommended way.

As an addition, this tool automatically binds all components configured in ```ZenjectBinding``` MonoBehaviour attached to the instantiated prefabs.

### How to use

To inject dependencies in runtime instantiated prefab you only need to add a ```ZenjectDynamicObjectInjection``` MonoBehaviour to the root game object of the prefab.

After instantiating of the prefab, all dependencies will be automatically resolved, by doing a lookup in the most 'local' container towards to the instantiated game object, and injected on Awake() phase before game object MonoBehaviour's will have their Awake() method called.

Moreover if you also need to bind game object MonoBehaviour's to the Zenject container, you can do this by adding a ```ZenjectBinding``` MonoBehaviour to the prefab and [configuring](https://github.com/modesttree/Zenject/blob/master/README.md#scene-bindings) it in a usual way.

###   Installation

To install the tool you need to follow next steps:

1. [Install](https://github.com/modesttree/Zenject/blob/master/README.md#installation) Zenject framework v5.2.0 or higher.
2. Clone this repo and copy the UnityProject/Assets/Plugins/ZenjectDynamicObjectInjection directory to your own Unity3D project.

##   Service Locator Pattern

_“Dear Friend, the author fully understands that use of the [Service Locator Pattern](https://en.wikipedia.org/wiki/Service_locator_pattern) contradicts ideas of dependency injections but this tool is not positioned as the replacement for the regular Zenject flow but as an opportunity to sometimes cut off a corner and pays more attention to the delivering happiness to players.”_

### Registering services

Service could be registered in a project container

```c#
public class SomeService : MonoBehaviour, ISomeService
{
    private void Awake()
    {
        ZenjectLocator.Container.Bind<ISomeService>().FromInstance(this).AsSingle();
        ...
    }
    ...
}
```

or in the most 'local' container of specified context type to the target scene, game object or component.

```c#
public class SomeService : MonoBehaviour, ISomeService
{
    private void Awake()
    {
        ZenjectLocator.GetContainer(this.gameObject).Bind<ISomeService>().FromInstance(this).AsSingle();
        ...
    }
    ...
}
```

### Locating services

Similarly to services registration service could be located in a project container

```c#
public class Foo : MonoBehaviour
{
    private void OnCollisionEnter(Collision collision)
    {
        ZenjectLocator.Container.Resolve<ISomeService>.PerformTask(this.gameObject);
        ...
    }
}
```

or in the most 'local' container.

```c#
public class Foo : MonoBehaviour
{
    private void OnCollisionEnter(Collision collision)
    {
        ZenjectLocator.GetContainer(collision.gameObject).Resolve<ISomeService>.PerformTask(this.gameObject);
        ...
    }
}
```

###  License
Zenject-DynamicObjectInjection is distributed under the MIT license. Please keep the existing headers.

###  Attribution
Developer Alexandr Pereverzev -<EMAIL_ADDRESS>


text:
Pump Samples
=================================

Examples using io.pump or external tools / libraries

## About

This is a multi-module gradle project `Java/Kotlin/Groovy`
!!
### Еxamples of using tools and libraries located in my repository
- [allure-server](https://github.com/kochetkov-ma/allure-server)
- [kotest-allure](https://github.com/kochetkov-ma/kotest-allure)
- [qa-tools](https://github.com/kochetkov-ma/qa-tools)
- [qa-pump](https://github.com/kochetkov-ma/qa-pump)
- [pump-fw](https://github.com/kochetkov-ma/pump-fw)
- [jdbi-crud](https://github.com/kochetkov-ma/jdbi-crud)
- [koproc](https://github.com/kochetkov-ma/koproc)
- coroutines-sample by [coroutines-overview](https://kotlinlang.org/docs/reference/coroutines-overview.html)

### Tips for using test and development tools

### Other short code snippets

### Experiments with Github Actions

## Content

#### [Kotest + Spring + Allure Reports](kotest-allure-sample/readme.md)

repository: mishin/pump-samples

repo_name: mishin/pump-samples