text:
# README - ECE140A Lab 5

## Introduction

In lab 5, we will use components and concepts from previous labs (with a few
more additional components) to make our JetBots participate in a relay race
autonomously. The lab will be divided into five (six) stages:

0. **Setup**. Getting the lab 5 code on your JetBots.
1. **Pre-processing**. The participants perform calibration.
2. **Discovery**. The participants discover each other.
3. **Consensus**. The participants will decide where each of them should start the
   race.
4. **Race**. Self-explantory.
5. **Post-processing**. The participants aggregate the information obtained during
   the race to generate a "map" of the tracks.

> Note: This lab will have checkpoints/deliverables corresponding to every stage
> that must be demonstrated on the specified lab session dates.

> Note: If the TAs find that the lab is easier or harder than expected then they
> may increase or decrease the complexity of some of the stages (yay modularity!), so keep your
> eyes peeled for their Piazza posts.

## Setup

Perform the following steps for the setup stage.

1. Get the `140A-lab-5` repo (if you're reading this then you already have it).
2. Make sure that you have the MQTT and ML stuff on you JetBot from the previous labs.
3. Copy your repo on to your JetBot.

### Deliverables

1. The lab 5 repo copied to your JetBot.
2. Brief demonstration of your ML behaviors. Even if you couldn't get them to
   work perfectly for lab 2, you have a chance to improve them now.

## Pre-processing

The main objective of the pre-processing step is to come up with a frame of reference that will be used for navigation.
In subsequent steps, as you delve deeper into the problem, you will be required to know the position of the bot in a defined coordinate system.
You will also be required to extrapolate the position of the bot given that it has travelled in a certain direction with a certain velocity. The measurement will be done in m/s and cm/s. The speed that will be used on the bot is 0.2 which is approximately 25cm/s.
However, you are expected to calculate this for your specific JetBots since there may be variability between them. Similar calibration can also be done for the angular movement as well, however, whether you will be required to calibrate for angular movement will be intimated later depending on the complexity and the progress everyone is making.

The pit-stops where the three bots are placed will be demarcated in the space. The students will be required to calculate the coordinates of the pit-stops and start points and configure their bots to go to the start points from the pit-stops.

### Deliverables
1. A python function/method to make the bot go to point B, given that the position of self is known.

### Checkpoints
1. Configure bot to go to start point from pitstop

## Discovery

This stage is *very* similar to problem 1 from lab 4. First, the TAs will
arbitrarily pick three teams to participate in a race. These teams must discover
each other using MQTT communication.

1. Each team publishes information about themselves on the topic
   `lab5/discovery` with the [appropriate message
   format](messages/team_discovery.json).
2. Each team must maintain a dictionary of all the participating teams(including
   self). This dictionary should not contain any duplicates.
3. Each then team subscribes to the topic `lab5/<own_teamname>/in` and should
   publish to `lab5/<teamname>/in` to send messages to team `<teamname>`.

### Deliverables

1. A python method that publishes the team information.
2. Demonstration that you are indeed subscribed to `lab5/<own_teamname>/in`.

## Consensus

In an IoT or a distributed environment, it is essential that different parties
have some mechanism for achieving consensus concerning decisions that affect
them all. It turns out that, in general, this is a very difficult problem to solve.
However, by making some assumptions we can make it significantly more tractable. For
this stage, first we will operate under the assumption that no (malicious)
adversaries exist. Then we will relax that assumption a bit by saying that the
majority of the players are not adversaries.

The main task at hand here is to get from a "pit-stop" position to the nearest
(for each team) starting point.

### Assumption 1: No adversaries

Under this assumption, all that is needed for successful behavior is that a
majority of the players have "correct" behavior. This is how we proceed:

1. The TAs will assign a "pit-stop" position to each team. Each pit-stop has an
   associated number (1, 2 or 3) associated with it. They will also assign a
   team to be the "leader" randomly (more on this later).
2. The teams must subscribe to topics `lab5/consensus/pitstop_coordinates/<i>`, where
   `<i> = 1, 2, 3`. The message you receive is of the [given format](messages/coordinates.json).
   Then they place their JetBots in the appropriate locations.
3. For these pit-stops, each team needs to make its way to the nearest starting
   point. The coordinates of each starting point can be found by subscribing to
   `lab5/consensus/start_coordinates/<i>`, where `<i> = 1, 2, 3`. The message
   format is the [same as above](messages/coordinates.json).
4. Now that each team has access to all the pit-stop and starting coordinates,
   to demonstrate your understanding of the problem, you need to compute the
   distance between each of the pit-stops to each of the starting points.
   Convert this computed information in a serialzed JSON object (by using
   `json.dumps` or similar) and send it as a message to the topic
   `lab5/consensus/understanding`. [See here](messages/understanding.json) for
   the message format.
5. Each team verifies the correctness of every other team's calculation and
   publishes [a message](messages/ok.json) accordingly to
   `lab5/consensus/understanding/ok`.
> Make sure to have a threshold for distance computation verification. That is,
> if the calulation of other teams is within 0.1 of your calculation, consider
> it to be valid.

6. They leader team must check the `lab5/consensus/understanding/ok` topic and
   see that every team has been verified.
   1. If everything is okay, then the leader sends [a
      message](messages/init.json) to all the teams (including itself) on
      `lab5/<teamname>/in` and each of them start moving to the start points.
   2. If not, the leader publishes a [failure message](messages/fail.json) to `lab5/consensus/fail`. The TAs will then step in.

### Assumption 2: With two adversaries

> Note: This is not a part of the lab currently, but could be included later.

Steps 1-4 are exactly the same as when operating under assumption 1. But now,
there will be two adversarial players (read: the TAs) that are impersonating
some teams. They will publish incorrect distance calculations.

### Deliverables

1. A python function that calulates the euclidean distance between two points.
2. A python method that uses the above function to calculate the distance
   between the pit-stops and starting points, and publishes this.
3. Demonstration of correct message publishing and subscribing.
4. A python method that verifies the distance calulations against their own calculations.
5. A python method that does the verification (as done by the leader).

### Checkpoints

1. A successful run-through of the above scenario.

## Race

Finally! The JetBots are at the three starting points. This proceeds as follows:

1. The leader is subscribed to the topic `lab5/race/go`.
2. As soon as the leader receives [a message](messages/go.json) on that topic,
   it sends [a message](messages/go_1.json) to all its teammates to their 'in'
   topics.
> This [message](messages/go_1.json) will enable to you to know the identity of
> the leader.

3. When the team on start position 1 receives a message from the leader, it starts moving
   using the road following ML behavior.
4. It continues to move until its collision avoidance detects an obstacle (the
   next JetBot).
> Note: there will be no other obstacles on the track, so the first obstacle to
> be detected should be the next JetBot (or an obstacle signifying the goal).

5. During the race, each team logs the coordinates of the points they passed
   through.

6. The first JetBot then stops and sends [a message](messages/go_2.json) to all
   its teammates. It also publishes its logged path as [a message](messages/path.json) to
   `lab5/race/path`.

7. The second JetBot moves until it detects an obstacle (next JetBot). It then
   stops and sends [a message](messages/go_3.json) to all its teammates. Like
   the first bot, it also publishes its logged path as [a message](messages/path.json) to `lab5/race/path`.

8. Similary, when the third team completes the race, it also publishes its logged path as [a  message](messages/path.json). This marks the end of the race.

### Deliverables

1. Good road following behavior. Improved from before if it wasn't robust.
2. Good collision avoidance behavior (especially at detecting other JetBots).

### Checkpoints

1. A successful run-through of the race.

## Post-processing

The key objective of post-processing is to visualize the path that was transversed by the bots.
The aggregated data will be sent to a REST server and be stored on the rest server.
The three teams collaborating for the race will be when interacting with the rest server, getting the data
and visualizing it in the browser using a javascript library.

The code for visualization is given below.

```html
<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Canvas Tile Map</title>
		<style>
			#canvas{
				border: 0px solid black;
			}
		</style>
	</head>
	<body>
		<canvas id="canvas" height="400px" width="800px"></canvas>
		<script>
			var canvas = document.getElementById("canvas");
			var context = canvas.getContext("2d");
			var mapArray=[
				[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
				[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
			];

			var path = new Image();
			var background = new Image();

			// Add the appropriate png file
			path.src= '/home/muditj/Desktop/path.png';
			// Add the appropriate png file
			background.src = '/home/muditj/Desktop/background.png';

			var posX=0;
			var posY = 0;

			path.onload = function (){
			background.onload = function (){
			for(var i=0; i < mapArray.length; i++){
				for(var j=0; j < mapArray[i].length; j++){
					if(mapArray[i][j]==0){
						context.drawImage(path,posX, posY, 25, 25);
					}
					if(mapArray[i][j]==0){
						context.drawImage(background,posX,posY,25,25);
					}
					posX+=25;
				}
				posY+=25;
				posX=0;
			}
		}
	}

		</script>
	</body>
</html>
```

Note: Right now the code written translates an 8m * 4m track into 800 * 400 pixels on the browser. The track is plotted with a granularity of 25cms.


text:
\##~TRIANGLE-TRACKER~
By Mwangi Nyambura.
\###~Description~
This is a site where individuals can be able to differentiate types of triangles using their dimensions.
\##Known Bugs
none
\###~Technologies used~
I used:HTML.
       CSS.
       JAVASCRIPT.
\###SETUP INSTRUCTIONS
A user should enter dimensions of a triangle in the input fields provided then click on the submit button to find out the type of triangle you've created.
\###Contact
<EMAIL_ADDRESS>
\##~BDD~

\#What is Triangle TRACKER
This is an application in identifying a particular triangle based on its value dimensions.

A triangle has three dimensions which are length,width and height.

So in out code we will have three values based on these dimensions.

We will differentiation these triangles based on its properties.

There are four different types of triangles.
Which are scalene, isosceles, equilateral and non-triangle.

so in our code snipped based on the JavaScript side, there is logic based on differentiating the triangles.

scalene - all sides are unequal
isosceles  two sides side are equal
equilateral - all sides are equal
non-triangle - not a triangle

In our code we will have input fields based on length, width ad height so as to identify these triangles.

\###LICENSE

_MIT_
copyright (c) 2019

license: MIT

repository: mwanginyambura/triangle-tracker

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mwanginyambura/triangle-tracker


text:
---
title: arrow-body-style
rule_type: suggestion
---

Arrow functions have two syntactic forms for their function bodies.  They may be defined with a *block* body (denoted by curly braces) `() => { ... }` or with a single expression `() => ...`, whose value is implicitly returned.

## Rule Details

This rule can enforce or disallow the use of braces around arrow function body.

## Options

The rule takes one or two options. The first is a string, which can be:

* `"always"` enforces braces around the function body
* `"as-needed"` enforces no braces where they can be omitted (default)
* `"never"` enforces no braces around the function body (constrains arrow functions to the role of returning an expression)

The second one is an object for more fine-grained configuration when the first option is `"as-needed"`. Currently, the only available option is `requireReturnForObjectLiteral`, a boolean property. It's `false` by default. If set to `true`, it requires braces and an explicit return for object literals.

```json
"arrow-body-style": ["error", "always"]
```

### always

Examples of **incorrect** code for this rule with the `"always"` option:

:::incorrect

```js
/*eslint arrow-body-style: ["error", "always"]*/
/*eslint-env es6*/
let foo = () => 0;
```

:::

Examples of **correct** code for this rule with the `"always"` option:

:::correct

```js
let foo = () => {
    return 0;
};
let foo = (retv, name) => {
    retv[name] = true;
    return retv;
};
```

:::

### as-needed

Examples of **incorrect** code for this rule with the default `"as-needed"` option:

:::incorrect

```js
/*eslint arrow-body-style: ["error", "as-needed"]*/
/*eslint-env es6*/

let foo = () => {
    return 0;
};
let foo = () => {
    return {
       bar: {
            foo: 1,
            bar: 2,
        }
    };
};
```

:::

Examples of **correct** code for this rule with the default `"as-needed"` option:

:::correct

```js
/*eslint arrow-body-style: ["error", "as-needed"]*/
/*eslint-env es6*/

let foo = () => 0;
let foo = (retv, name) => {
    retv[name] = true;
    return retv;
};
let foo = () => ({
    bar: {
        foo: 1,
        bar: 2,
    }
});
let foo = () => { bar(); };
let foo = () => {};
let foo = () => { /* do nothing */ };
let foo = () => {
    // do nothing.
};
let foo = () => ({ bar: 0 });
```

:::

#### requireReturnForObjectLiteral

> This option is only applicable when used in conjunction with the `"as-needed"` option.

Examples of **incorrect** code for this rule with the `{ "requireReturnForObjectLiteral": true }` option:

:::incorrect

```js
/*eslint arrow-body-style: ["error", "as-needed", { "requireReturnForObjectLiteral": true }]*/
/*eslint-env es6*/
let foo = () => ({});
let foo = () => ({ bar: 0 });
```

:::

Examples of **correct** code for this rule with the `{ "requireReturnForObjectLiteral": true }` option:

:::correct

```js
/*eslint arrow-body-style: ["error", "as-needed", { "requireReturnForObjectLiteral": true }]*/
/*eslint-env es6*/

let foo = () => {};
let foo = () => { return { bar: 0 }; };
```

:::

### never

Examples of **incorrect** code for this rule with the `"never"` option:

:::incorrect

```js
/*eslint arrow-body-style: ["error", "never"]*/
/*eslint-env es6*/

let foo = () => {
    return 0;
};
let foo = (retv, name) => {
    retv[name] = true;
    return retv;
};
```

:::

Examples of **correct** code for this rule with the `"never"` option:

:::correct

```js
/*eslint arrow-body-style: ["error", "never"]*/
/*eslint-env es6*/

let foo = () => 0;
let foo = () => ({ foo: 0 });
```

:::

repository: eslint/eslint

branch_name: refs/heads/main

gha_language: JavaScript

gha_license_id: MIT

repo_name: eslint/eslint


text:
---
title: Crepis tectorum (Narrowleaf hawksbeard)
image:
  caption: 'Image credit: [**Martin Adams**](https://unsplash.com/@martinadams?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)'
  placement: 3
markup: mmark
authors:
- admin
tags: [Asteraceae, weed, identification]
categories: [weed id]
date: "2019-02-05T00:00:00Z"
---
## Identification tips

![general](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/geral.jpg?raw=true)

**Tip #1:** The genus Crepis derives from the Greek krepis, which means "slipper" or "sandal", possibly in reference to the shape of the fruit. The species came from the Latin tectưr: wall decorator, plasterer, painter.

![name](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/name.jpg?raw=true)

![plow](https://media.giphy.com/media/royWz0pLyeG9q/giphy.gif)

## Plant shape

**2º Identification tip:** this plant is commonly confused with dandelion, being also biannual, forming rosette in the first year and forming flowers and stem in the second year. Being differentiated from dandelion by 2 characteristics that, combined, separate it from other dandelion weeds: presence of auricles in some of the leaves of the stem and the inner surface of the bracts are covered with hair, although an enlargement may be necessary to see them clearly.

![overview2](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/overview3.jpg?raw=true)

![overview](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/overview.jpg?raw=true)

![overview2](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/overview2.jpg?raw=true)

## Leaves

**3º Identification tip:** leaves change shape as they "rise"" on the stem. The basal leaves form the rosette with coarse teeth, a pointed tip and short stem. The basal leaves wilt mainly as the plant matures. The lower leaves of the stem have more irregular teeth or are divided with pointed lobes, wavy edges and, most often, without stem and the upper leaves are thin and have auricle at the base of the leaf.

![leaf](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/leaf.jpg?raw=true)

![leaf](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/leaf3.jpg?raw=true)

![leaf](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/leaf4.jpg?raw=true)

## Stem

**4º Identification tip:** the stems are branched and have short hairs.

![stems](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/stems2.jpg?raw=true)

**Ligule detail**

![stems](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/stems.jpg?raw=true)
## Flowers

**5º Identification tip:** the flowers are yellow and the petals have small teeth at the tip. Flowers can be solitary or in groups.

![flower](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/flower.jpg?raw=true)

![flower](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/2flower.jpg?raw=true)

![flower](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/flower3.jpg?raw=true)

## Seeds

**6º Identification tip:** the seeds are brown and have white hair.

![seeds](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/seeds.jpg?raw=true)

## Seedlings - the terror of all
![terror](https://media.giphy.com/media/fnqOs8SULCF8I/giphy.gif)

**8º Identification tip:** seedlings are difficult to identify and have round cotyledons with true leaves of short petiole and diamond-shaped limbo with teeth at the edges.

![seedling1](https://github.com/vitoranunciato/academic-kickstart/blob/master/content/pt/post/crepis%20tectorum/image/seedling2.jpg?raw=true)

[Control](https://www.youtube.com/watch?v=2S8APvkUiu4&list=PLdTdglZPyaglMcCmnDfkGdt-qnJ_IJJ57&index=34&t=0s)

[More images](https://calphotos.berkeley.edu/cgi/img_query?where-lifeform=any&rel-taxon=contains&where-taxon=Crepis+tectorum&rel-namesoup=matchphrase&where-namesoup=&rel-location=matchphrase&where-location=&rel-county=eq&where-county=any&rel-state=eq&where-state=any&rel-country=eq&where-country=any&where-collectn=any&rel-photographer=contains&where-photographer=&rel-kwid=equals&where-kwid=&max_rows=24)

[Other Uses](https://pfaf.org/user/Plant.aspx?LatinName=Crepis%20tectorum)

##References
https://extension.umass.edu/landscape/weeds/crepis-tectorum

https://www.minnesotawildflowers.info/flower/narrow-leaf-hawksbeard

repository: vitoranunciato/serialweedkiller

repo_name: vitoranunciato/serialweedkiller


text:
# ST7735 driver

There are multiple devices using the ST7735 chip, and there are multiple versions ST7735B, ST7735R & ST7735S. Two apparently identical displays might have different configurations. The most common issues are:

* Colors are inverted (black is white and viceversa), invert the colors with display.InvertColors(true)
* Colors are not right (red is blue and viceversa, but green is ok), some displays uses BRG instead of RGB for defining colors, change the mode with display.IsBGR(true)
* There is noise/snow/confetti in the screen, probably rows and columns offsets are wrong, configure them with st7735.Config{RowOffset:XX, ColumnOffset:YY}

If nothing of the above works, your device may need a different boot-up process.

repository: tinygo-org/drivers

branch_name: refs/heads/release

gha_language: Go

repo_name: tinygo-org/drivers


text:
# js-sorting-algorithms
Package provides the javascript implementation of sorting algorithms for array

[![Build Status](https://travis-ci.org/cschen1205/js-sorting-algorithms.svg?branch=master)](https://travis-ci.org/cschen1205/js-sorting-algorithms) [![Coverage Status](https://coveralls.io/repos/github/cschen1205/js-sorting-algorithms/badge.svg?branch=master)](https://coveralls.io/github/cschen1205/js-sorting-algorithms?branch=master)

# Features

In terms of usage, the user has the following benefit of using the sorting algorithms:

* Customizable comparer function for the sorting function
* Allow user to sort a sublist of an array starting and ending at the user-defined indices

In terms of supported algorithms for sorting:

* Selection Sort
* Insertion Sort
* Merge Sort
* Quick Sort
* 3-Ways Quick Sort
* Heap Sort
* Shell Sort

# Install

Run the following npm command to install

```bash
npm install js-sorting-algorithms
```

# Usage

To sort an array "a" using any of the sorting algorithms:

```javascript
jss.insertionSort(a);
jss.selectionSort(a);
jss.shellSort(a);
jss.mergeSort(a);
jss.quickSort(a);
jss.threeWaysQuickSort(a);
jss.heapSort(a);
```

Additionally user can specify the range in "a" to do the sorting as well as customized comparer:

```javascript
var comparer = function(a1, a2){
    return a1 - a2;
};

jss.insertionSort(a, lo, hi, comparer);
```

Sample code is available at [playground](https://runkit.com/cschen1205/js-sorting-algorithms-playground)

### Using with nodejs

```javascript
jssort = require('js-sorting-algorithms');

//====================Simple====================//

var a = [3, 4, 5, 1, 2, 4, 6, 8, 9, 3, 4, 67, 34, 53, 44, 2];
jssort.insertionSort(a);
console.log(a);

//====================Sort with custom comparer function====================//
var a = [[3, 2.3], [4, 3.1], [5, 1.1], [1, 4.2], [2, 4.2], [4, 5.3], [6, 7.4], [8, 5.1], [9, 1.9], [3, 1.2], [4, 3.4], [67, 6.7], [34, 3], [53, 5], [44, 4.2], [2, 0]];
jssort.insertionSort(a, undefined, undefined, function(a1, a2){
         return a1[1] - a2[1];
});
console.log(a);

//====================Sort sub-arrray a[3:10] ====================//
var a = [3, 4, 5, 1, 2, 4, 6, 8, 9, 3, 4, 67, 34, 53, 44, 2];
jssort.insertionSort(a, 3, 10);
console.log(a);

```

### Using with HTML page

repository: gdg/js-sorting-algorithms

repo_name: gdg/js-sorting-algorithms


text:
# Breaking Change Solution

This problem is difficult without two key insights:

1. If a coin system is "broken", that is, if the greedy algorithm fails to always produce the optimal change, then there is an upper bound on the smallest test value that breaks that system.
2. Testing whether this smallest value can be optimally produced with the greedy algorithm does not, in fact, involve finding an optimal solution.

## Finding an upper bound

(Warning, long sloppy proof ahead)

For the first key insight, let's assume a coin system made up of the coins `1, c_2, ..., c_m, c_n` is in sorted order, and does not have the property that the greedy algorithm produces an optimal change.

By construction, there exists some value `x >= c_m + c_n` which we can represent optimally using a non-greedy algorithm. Assume (falsely as we'll see) that for all values `y` under `x`, that the greedy algorithm does produce an optimal solution.

An optimal solution for `x` will have some combination of coins that is different from that produced by the greedy algorithm.

We know immediately that the greedy algorithm will have at least as many `c_n`'s as an optimal solution by definition of the greedy algorithm. We're only interested in the case where the coins in the representation is actually different. For every `c_n` in `x` that is in the optimal representation, we can remove it from both the optimal and greedy representations and be left with a uncompromised example. If `x` breaks our coin system, it will do so even after removing however many `c_n`'s as there are in its optimal representation.

Now consider the case for a coin `c_i` that is not `c_n` in the optimal representation of `x`. The greedy algorithm for `x` includes `c_n` because `x > c_n`. Thus, the greedy algorithm for `x - c_n` uses one less coin than the greedy algorithm for `x`.

Since `x - c_n` is less than `x`, the greedy algorithm for `x - c_n` is also optimal. What happens when we remove `c_i` from this value? We don't know if `x - c_n` contains `c_i`, but we do know that the optimal representation of `x - c_n - c_i` removes at least one coin from `x - c_n`.

This places an upper bound on the number of coins in the greedy representation of `x`. It can't be more than two coins larger than the optimal representation `x - c_n - c_i`. By definition, the optimal representation of `x - c_n - c_i` can't be larger than the greedy representation of `x - c_n - c_i`. Since this representation is greedy, we can remove `c_n`, the largest value, and still have a greedy representation, this time of `x - c_i`. So the greedy representation of `x` is no more than one coin larger than the greedy representation of `x - c_i`

Hang in there! We assumed that all `y` under `x` is optimal under the greedy algorithm, so this representation of `x - c_i` is optimal as well. Interesting! The greedy representation of `x` is no more than one coin larger than the optimal representation of `x - c_i`. Now's a good time to remember what `c_i` was in the first place.

Hint, it's some coin in the optimal representation of `x`. Adding it back into `x - c_i` increases our coin count by one, but also gives us `x` back. Here's the sweet reward for your patience: the greedy algorithm for `x` produces a representation that is no larger than the optimal representation of `x`.

But the greedy algorithm also produces a representation that is no smaller than the optimal one. If it's not smaller, and it's not larger, then it must be the **same**! Here's the ultimate conclusion:

> Either the greedy algorithm always produces the optimal change, or there's some test value below `c_m + c_n` that it fails to produce it for.

The clear benefit of this insight is that we have an immediate outer loop that is bounded by the size of the largest coin. We test all values (there's actually a lower bound, but that should be easy to figure out) up to the upper bound, and if they all check out, we know the coin system cannot be broken.

## A quick and dirty test

Finding the optimal representation in an arbitrary coin system is a hard problem. The good thing is that testing whether a value breaks a coin system doesn't involve finding any optimal representations.

For a value `x`, if the greedy representation `x` minus one coin is strictly larger than the greedy representation of `x - c` for all `c < x`, then `x` is a value that breaks the coin system. In math-y terms, if `f(x)` is the number of coins in the optimal representation of `x`, and `g(x)` is the greedy one, this condition is identical to:

```
g(x) - 1 > g(x - c)
g(x) > g(x - c) + 1
```

To see why, let's say we have an optimal representation of `x`. This representation is no more than one coin larger than the optimal representation of `x - c`:

```
f(x) <= f(x - c) + 1
```

which is by definition a lower bound on the greedy representation of `x - c`:

```
f(x - c) <= g(x - c)
```

so:

```
f(x) <= g(x - c) + 1
```

Combine this with the condition on `g(x)` we assumed and we have:

```
f(x) < g(x)
```

which proves irrevocably that the optimal representation is strictly better than the greedy one.

What's the payoff here? Well we only have to compute greedy algorithms, which is easy and best of all, cheap. In fact, we can precompute all greedy values between `1` and `c_n` and it will take just `O(c_n * n)`.

Checking the condition for whether a value breaks the coin system is an `O(n)` procedure after precomputing greedy solutions since there are `n` coins to loop through for an `x`. And since we only need to test up to `c_m + c_n` values, this will take us, again, just `O(c_n * n)`.

And that's it! An upper bound combined with a simple test condition make this a pretty simple solution when it's all said and done. Here's [my solution](https://github.com/whoshuu/weekly-noodler/tree/master/solutions/breaking-change/breaking-change.cpp).

license: Unlicense

repository: whoshuu/weekly-noodler

repo_name: whoshuu/weekly-noodler


text:
---
id: plugin-json
title: pluginJSON
---

## Usage

By default all the exports are not using `default`.

You don't need to add this plugin. It's already a part of the core, unless you want to manually handle it and override
the way the JSON is exported

```ts
import { fusebox, pluginJSON } from 'fuse-box';
fusebox({
  plugins: [pluginJSON('configs/.*', { useDefault: true })],
});
```

repository: MichaelMULLER/fuse-box

repo_name: MichaelMULLER/fuse-box


text:
Frequently Asked Questions
========

[TOC]

### How does Dogeparty work?

Dogeparty embeds data into regular Dogecoin transactions. To a regular Dogecoin client, these transactions look like normal Dogecoin transactions. A Dogeparty node (which runs the Dogecoin client along with [the Dogeparty client software](https://github.com/DogepartyXDP/dogeparty-lib)) will recognize and interpret the data in these Dogecoin transactions based on specific rules. From this, it constructs its own ledger of Dogeparty transactions that it has seen on the Dogecoin network.

To better help understand this, [here](https://dogeparty.xchain.io/tx/3515b1da00d86731c5e38a30176ca464bbcba785bc11155afa6c748a155bd218) is a record of a Dogeparty transaction where one address is sending 1 JDOG token to another address. [Here](https://chain.so/tx/DOGE/3515b1da00d86731c5e38a30176ca464bbcba785bc11155afa6c748a155bd218) is what this transaction looks like to chain.so, a popular Dogecoin block explorer. You can see that while it is indeed a Dogecoin transaction, the amount of Dogecoin moved is small. In reality, the DOGE spent is just enough to compensate the Dogecoin miners to include the transaction in a block. Essentially, the user that sent the transaction is paying the Dogecoin network to record and secure this embedded Dogeparty data.

### So Dogeparty is not its own Blockchain, but "rides on top of" Dogecoin?

Yes. Another way to think of it is similar to a [Russian nesting doll](https://en.wikipedia.org/wiki/Matryoshka_doll), where the bigger doll would be the Dogecoin transaction, and the next doll (inside of it) would be a Dogeparty transaction.

This embedding method is technically known as **embedded consensus**.

### Is Dogeparty "polluting" the Dogecoin blockchain, then?

No. 99%+ of Dogeparty transactions utilize a data encoding method called `OP_RETURN`, which is fully "prunable", meaning that the data may be safely discarded by Dogecoin nodes which wish to do so. For the remaining 1% of transactions, an different encoding method is utilized that produces fully "spendable" outputs. These outputs do not stick around in the critical list of unspent outputs (the "UTXO set").

On top of this, every Dogeparty transaction pays a fair fee to the network for inclusion.

### Are Dogeparty transactions less secure than Dogecoin transactions?

As Dogeparty transactions _are_ Dogecoin transactions, their data is proably just as secure as any other Dogecoin transaction.

### How do the Dogeparty nodes stay in sync? What's to stop one node from disagreeing with another?

As all Dogeparty nodes run the same code, and all receive the same Dogecoin transaction data, the ledgers across each node match exactly. Dogeparty nodes are not like Dogecoin nodes in that they don't communicate with each other: they simply connect to the Dogecoin software and download transactions from it, decoding each one as they go along. In this way, the immense security and computing power behind Dogecoin is leveraged as the "transport network" for Dogeparty data.

Given the above, there is no "Dogeparty peer to peer network" like there is a "Dogecoin peer-to-peer network": Dogeparty-aware nodes comprise a subset of the Dogecoin full nodes in existance.

### What about Sidechains?

Dogeparty is optimal for mainly lower value transactions and greatly benefits from the speed and cost of the main chain. However, if sidechains are ever released for dogecoin, there is no reason that they couldn't be made to work with Dogeparty. This is the beauty of Dogeparty's embedded consensus technology -- it can work with just about any blockchain out there, including sidechain designs.

### What kind of addresses does Dogeparty use?

_Exactly_ the same Dogecoin addresses we all know and love. As such, Dogeparty tokens (such as XDP, JDOG, BACON, and more) may be sent to _any_ Dogecoin address.

### What is XDP?

XDP is the native token of Dogeparty. It is a technical necessity for adding advanced features to Dogeparty, which by nature require a protocol aware currency. Dogecoin can only be aware of DOGE, while Dogeparty can be aware of both DOGE and XDP itself. This makes it possible to escrow funds, trade in a decentralized manner, and harness the full potential of programmable money.

*To learn more about XDP, see [about XDP](FAQ-XDP.md).*

### Can I secure my XDP and tokens in cold storage?

Yes. You can make a regular Dogecoin paper wallet and store them there. Later, you can sweep the funds into a [Dogeparty wallet](https://dogeparty.net/wallets/), like Dogewallet.

### Is a 51% attack against Dogeparty possible?

As every Dogeparty transaction is a Dogecoin transaction, to do a "51% attack" on Dogeparty you would have to do a 51% attack on Dogecoin.

### Besides a 51% attack, what are the other risks to consensus?

The Dogeparty network could be effectively "forked" by a sizable number of people running different versions of the Dogeparty client that had different "consensus sensitive code" (i.e. protocol code). In this case, if a transaction was read in from the Dogecoin client software, the differing code may cause two different interpretations of the data, and thus, two different ledger states.

As long as all participants run software that has the same protocol rules (even if it is different Dogeparty client implementations), this situation will not happen. The reference client includes extensive safeguards that help detect and prevent this from happening.

That being said, [the Dogeparty client](https://github.com/DogepartyXDP/dogeparty-lib) is completely open-source. Anyone is able to copy the code and make their own modifications. They can then run their modified version of the software, which technically may generate a different ledger than everyone else. This is similar to Dogecoin itself. However, to have any impact, that person would have to get others to run it, who would have to trust this individual more than they trust the Dogeparty development team. This new ledger would not be "Dogeparty". It would be a separate ledger with its own protocol rules. Services built on this ledger (such as a block explorer) would not agree with similar services built on the Dogeparty ledger.

### So can the Dogeparty Team rewrite the Dogeparty ledger’s history, in an emergency or by decree? How does that compare to the same risks with Dogecoin Core devs?

It’s identical to the case with Dogecoin. The Dogecoin core devs could publish a copy of Dogecoin Core that does anything, but no one would download it.

Dogeparty is 100% open source, with [a list of code changes](https://github.com/DogepartyXDP/dogeparty-lib/releases) from one release to the next visible for all to see and inspect.

### What about support for other blockchains instead of Dogecoin?

Dogeparty is built on Dogecoin. That has always been the case and we do not see it changing, ever. For other blockchains, there are "forks" of the Dogeparty software. Examples would be Counterparty for Bitcoin, Monaparty for Monacoin, and Dogeparty for Dogecoin. We generally encourage forks on other blockchains, especially if they help contribute back bug fixes and enhancements to the main Dogeparty codebase.

### What is Dogecoin fails or becomes co-opted?

In the event of a catastrophic failure of the Dogecoin network, Dogeparty _does_ have the technical capability of "freezing" balances and migrating to another blockchain, like Litecoin for instance, with relative ease.

### What happens if and when OP_RETURN data is auto-pruned?

Dogeparty only needs some Dogecoin full nodes somewhere to have an unpruned copy of the blockchain. As every Dogeparty full node is also a Dogecoin full node, this is easily done.

### How are blockchain reorganizations ("reorgs") handled by Dogeparty?

Blockchain reorganizations are essentially handled by Dogeparty the same way they are handled by Dogecoin. If the Dogeparty software detects that a reorganization has occurred, it will utilize an internal "undolog" to quickly undo (roll back) transactions up to the point of the chain branching, and then process new transactions on the now-longest chain.

### How can a thin client trustlessly lookup the Dogecoin public address associated with the OSTOCK asset name?

You can use a local copy of the blockchain just fine. The only difference between Dogeparty and Dogecoin here is that Dogeparty doesn’t support SPV.

repository: persisty/Documentation

repo_name: persisty/Documentation


text:
# SoX Noise

Noise generator GUI powered by [Sound eXchange](http://sox.sourceforge.net/)

Requires: SoX, Python, & GTK3
Install: `python -m pip install git+git://github.com/thann/sox-noise --user`
Run: `sox-noise`

![screenshot](https://github.com/Thann/sox-noise/raw/master/screenshot.png)

repository: wbrewer/sox-noise

repo_name: wbrewer/sox-noise


text:
# Film Forage · [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/AibSyed/advicely/pulls) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/AibSyed/film-forage/blob/master/LICENSE)

![Film Forage Gif](https://media.giphy.com/media/dByGRZREAyMBneeqnH/giphy.gif)

> Movie data (images, titles, ratings, release dates, descriptions) fetched from [TMDb](https://www.themoviedb.org/) as JSON.

## Usage example

To use, visit (https://filmforage.netlify.app/) - Simply enter film name in search bar and get your results.

### Technologies Used

Create React App Boilerplate, React-Icons, Styled-Components

### Lessons Learned

Querying API data with input parameters, displaying results based on input query, conditionally changing layout elements based on events

### Meta

Shoaib (Aib) Syed – [@LinkedIn](https://www.linkedin.com/in/aib-syed/) –<EMAIL_ADDRESS>
[https://github.com/AibSyed](https://github.com/AibSyed/)

## Contributing

1. Fork it (<https://github.com/AibSyed/film-forage/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

repository: AibSyed/film-forage

repo_name: AibSyed/film-forage


text:
## How to implement de-duped collections in archivekit?

* Store a content hash in the manifest and traverse to find
  duplicates (too slow, too mutable).
* Make local copies of the data, generate a content hash, upload
  by hash ID.

Sources:

    * From file name
    * From URL
    * From fileobj

Options:

    * Content hashed
    * Move or copy?


text:
# PSQueue (Promises Sync Queue)

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cgadam/psqueue?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![dependencies](https://david-dm.org/cgadam/psqueue.png)](https://david-dm.org/cgadam/psqueue)

### Getting async ducks in a row.

Have you ever find yourself dealing with this problem: you need to execute async operations (encapsulated in Q promises)
in order. The bad thing is that those async operations are dynamically generated and therefore it's not trivial
to chain Q promises with then, then, then.

If this is your case, then this module is for you.

## How to use it?

1. Create a PSQueue.
2. Create your function that returns a Q promise.
3. Add the function to the queue (indicating the parameters)
4. Repeat steps 2 and 3 as many times as you want.
5. Call PSQueue's method resolveAllSync() which will return a Q promise too.

The promise returned by resolveAllSync() will be resolved once ALL the Q promises in the
queue are solved. The good part is that the sync queue resolves all the promises in ORDER: ONE AT THE TIME! :)

The resolved value the promise returned by resolveAllSync() will contain an array with the resolved values of
all the other synchronously executed promises of the queue.

You can optionally define a *torch* object and pass it to resolveAllSync function. The object will be systematically passed between the functions in the queue.
Functions can then modify the value and pass it to the following functions in the queue. You need to be sure that your function will actually proccess this parameter.

Example:

**Q.all** resolves all the promises *asynchronously*. So, in this example:

```javascript
    var Q = require('q');

    var timestamp = (new Date()).getTime();
    var arr = ['A', 'B', 'C'];

    function doPromiseToItem(item) {
      var deferred = Q.defer();
      var randomFactor = 10000 * Math.random()
      setTimeout(function (rand) {
        console.log(item + ' solved after random ' + (Math.round((rand / 1000) * 100) / 100) + ' secs.');
        deferred.resolve(item);
      }, randomFactor, randomFactor);
      return deferred.promise;
    }

    var promises = [];

    for (var i = 0; i < arr.length; i++) {
      var item = arr[i];
      var promise = doPromiseToItem(item);
      promises.push(promise);
    }

    Q.all(promises).then(function (arrResults) {
      var duration = Math.round(((((new Date()).getTime()) - timestamp) / 1000) * 100) / 100;
      console.log('ALL SOLVED in ' + duration + ' seconds.');
      console.log('Results are:\n' + arrResults.join('\n'));
    });
```
If you execute it:

```bash
    $ cd demos
    $ node QAllTest.js
```
This is one possible output you might get:

```bash
    C solved after random 3.03 secs.
    B solved after random 5.09 secs.
    A solved after random 5.45 secs.
    ALL SOLVED in 5.46 seconds.
    Results are:
    A
    B
    C
```

As you can see *all of the promises ran in parallel* (not in a specific order -> C,B,A) and the time it took to complete
all of them is nothing but the time it took for the latest one to finish.

**PSQueue** runs all the promises *in order* and *one at the time*:
(Example using a torch value)

```javascript
    var Q = require('q'),
      PSQueue = require('../psqueue'),
      timestamp = (new Date()).getTime(),
      arr = ['A', 'B', 'C'],
      promisesQueue = new PSQueue();

    function doPromiseToItem(item, torch) {
      var deferred = Q.defer();
      var randomFactor = 10000 * Math.random();
      setTimeout(function (rand) {
        console.log(item + ' solved after ' + torch.text + ' taking random ' + (Math.round((rand / 1000) * 100) / 100) + ' secs.');
        torch.text = (torch.text === 'BEGGINING OF TIME' ? item : (torch.text + ',' + item));
        deferred.resolve(item + ':OK');
      }, randomFactor, randomFactor);
      return deferred.promise;
    }

    for (var i = 0; i < arr.length; i++) {
      var item = arr[i];
      promisesQueue.addPromise(doPromiseToItem, item);
    }

    promisesQueue.resolveAllSync({
      text: 'BEGGINING OF TIME'
    }).then(function (arrResults) {
      var duration = Math.round(((((new Date()).getTime()) - timestamp) / 1000) * 100) / 100;
      console.log('ALL SOLVED in ' + duration + ' seconds.');
      console.log('Results are:\n' + arrResults.join('\n'));
    });
```
If you execute it:

```bash
    $ cd demos
    $ node PSQueueTest.js
```
This is one possible output you might get:

```bash
    A solved after BEGGINING OF TIME taking random 9.6 secs.
    B solved after A taking random 5.55 secs.
    C solved after A,B taking random 1.1 secs.
    ALL SOLVED in 16.3 seconds.
    Results are:
    A:OK
    B:OK
    C:OK
```

As you can see no matter how much time each individual promise took to be solved, all of them are executed
in order (A,B,C) and the total time is the sum of the time of each of them. Also you can see how the torch value is modified from function to function appening
the name of the item that was previosuly executed. The result of the promises is then returned in an array (arrResults).

**What if a promise in the queue fails?**

If one promise in the queue fails, then the following promises in the queue are not executed and the rejection value is used for rejecting the queue's promise.

Example:

```javascript
    var Q = require('q'),
      PSQueue = require('../psqueue'),
      timestamp = (new Date()).getTime(),
      arr = ['A', 'B', 'C', 'D'],
      promisesQueue = new PSQueue();

    function doPromiseToItem(item, torch) {
      var deferred = Q.defer();
      var randomFactor = 10000 * Math.random();
      setTimeout(function (obj) {
        if (obj.item === 'C') {
          console.log(item + ' NOT solved after random ' + (Math.round((obj.rand / 1000) * 100) / 100) + ' secs.');
          deferred.reject(obj.item);
          return;
        }
        console.log(item + ' solved after random ' + (Math.round((obj.rand / 1000) * 100) / 100) + ' secs.');
        torch.push(item);
        deferred.resolve();
      }, randomFactor, {
        "rand": randomFactor,
        "item": item
      });
      return deferred.promise;
    }

    for (var i = 0; i < arr.length; i++) {
      var item = arr[i];
      promisesQueue.addPromise(doPromiseToItem, item);
    }

    var partialResult = [];

    promisesQueue.resolveAllSync(partialResult).fail(function (err, arrResults) {
      var duration = Math.round(((((new Date()).getTime()) - timestamp) / 1000) * 100) / 100;
      console.log('FAILED because I found ' + err + ' after ' + duration + ' seconds.');
      console.log('Partial result is: ' + partialResult.join(','));
    });
```

If you execute it:

```bash
    $ cd demos
    $ node PSQueueTestFail.js
```
This is one possible output you might get:

```bash
    A solved after random 7.35 secs.
    B solved after random 5.06 secs.
    C NOT solved after random 4.76 secs.
    FAILED because I found C after 17.2 seconds.
    Partial result is: A,B
```

As you can see **D** was never executed and the torch object has been used to obtain a possible partialResult.

### Alias for resolveAllSync
You can use *all* and *allSync* as alias of resolveAllSync

repository: cgadam/psqueue

repo_name: cgadam/psqueue


text:
---
published: false
title: b02
layout: post
author: Yu
categories: v28
hidden: true
---

| Item | Detail | Link |
|---:|---|---|
| Reviewers | Markus  Schmidberger| |
| Title |Introduction to Machine Learning and Bioinformatics | [download](http://www.jstatsoft.org/v28/b02/paper) |
| Reference |Vol. 28, Book Review 2, Nov 2008 | |
| | Submitted 2008-11-04, Accepted 2008-11-04| |
| Type | Book Review| |
| Book's authors | Sushmita Mitra, Sujay Datta, Theodore Perkins, and George Michailidis| |
| Book's title | Introduction to Machine Learning and Bioinformatics| |
| Book's publisher | Chapman & Hall/CRC| |
| ISBN | 978-1-58488-682-2| |
| Year | 2008| |
| Paper | Introduction to Machine Learning and Bioinformatics  (application/pdf, 132.9 KB)| [download](http://www.jstatsoft.org/v28/b02/paper) |
| Resources | [BibTeX](http://www.jstatsoft.org/v28/b02/bibtex) [OAI](http://www.jstatsoft.org/oai?verb=GetRecord&identifier=oai.jstatsoft/v28/b02&prefix=oai_dc)| |
| |  | [返回卷目录]({{site.baseurl}}/volume/v28.html) |

repository: yulijia/jstatsoft

repo_name: yulijia/jstatsoft


text:
# Profile Folder

The Profile Folder can contain the following files

* flamegraph.html - the interactive flamegraph
* isolate-0x103000600-3866-v8.log - a v8 profiling log file
* isolate-0x103000600-3866-v8.json - the profile log file processed into JSON
* meta.json - additional meta data captured via processing
* stacks.3866.json - only with `--tree-debug` flag: a JSON tree representing the captured stacks

The hex address in the isolate log files (0x103000600) is set according
to V8 internals, and will (most likely) differ each time a process is profiled.

When used with the [`--kernel-tracing`](#--kernel-tracing) flag the Profile Folder won't
contain the isolate V8 log or JSON files, but will contain the following:

* .stacks.3866.out - pre-processed captured stacks via kernel tracing
* stacks.3866.out - post-processed captured stacks via kernel tracing


text:
---
title: Products Price Manager
description: Zen Cart Products Price Manager Admin Page
category: admin_pages
weight: 30
---

This page contains a variety of settings for handling product pricing (and other product features) including price,
[special price](/user/admin_pages/catalog/specials/) and
[per-product quantity discounts](/user/products/quantity_discounts/).

repository: AmoureuseDesetoiles/documentation

repo_name: AmoureuseDesetoiles/documentation


text:
<img align="right" src="docs/img/eno-logo.png" alt="Eno logo"/>

# Eno – Questionnaire generator

[![Build Status](https://travis-ci.org/InseeFr/Eno.svg?branch=master)](https://travis-ci.org/InseeFr/Eno)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/fr.insee.eno/eno-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/fr.insee.eno/eno-core)

## Introduction

Eno is a tool that generates survey questionnaires starting from their formal description in [DDI](http://ddialliance.org/).

Due to its modular design, Eno can create questionnaires in different formats from the same DDI description. Currently, Eno generates XForms web questionnaires that can be executed on [Orbeon Forms Runner](http://www.orbeon.com/). PDF questionnaires is under development.

## Principles :

The generation of XForms forms is performed using a number of XSLT transformations from a DDI input managed by a Ant script.

### With Java

Use the maven dependency to provide the Jar from maven central

`

	<dependency>

		<groupId>fr.insee.eno</groupId>

		<artifactId>eno-core</artifactId>

		<version>1.0.0</version>

	</dependency>
`

See examples in `src/test/resources`

### With Ant

The main Ant build file is [/src/main/scripts/build_non_regression.xml] and its main target is "full".

This file includes the name forms to generate.

The DDI input and configuration are found in a subdirectory of [/questionnaire/] with the same name.

Generic Ant properties which drive the transformations are stored in [/src/main/scripts/build_configuration.xml]

The generated XForms output will be located in a subdirectory of [/questionnaire/].

## Getting Started

### Prior for Ant usage:

 * Apache Ant. You can download Ant from Apache, see also : [Ant Apache](http://ant.apache.org/)

 * Source code from github.com.

Then you have to donwload Java Libraries :

* Ant-Contrib 0.6 or higher (collection of tasks for Apache Ant), see also : [Ant contrib](http://ant-contrib.sourceforge.net/)
* Saxon HE 9.X or higher (The XSLT and XQuery Processor), see also : [Saxon](https://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE)
* Saxon-unpack, included as standard in each Saxon edition
* Common lang 3 or higher (for the non regression test only), see also : [Apache Commons lang](https://commons.apache.org/proper/commons-lang/)

Paste the ".jar" file in a "/lib/" folder at the Eno project root.

### Example :

You can find on the subdirectory [/questionnaire/], the questionnaire example "Simpsons" specified in the DDI format.

To generate the XForms form, execute the main ant build file [/src/main/scripts/build_non_regression.xml]

The generated XForms form should be created in [/questionnaire/simpsons/Xforms/v1/] folder.

### Non regression test :

The expected XForms form file for the Simpsons questionnaire is present in [/questionnaire/simpsons/] folder, a specific ant target : "full-with-test" generates Xform file and calculates the difference with the expected Xforms file.

The difference file [questionnaire/simpsons/Xforms/v1/diff.txt] specifed, if there has, index at which the file begins to differ and the difference beetwen the generated Xform file and the expected Xform file.

## Road Map

New output format : PDF for paper questionnaire

gha_language: XSLT


text:
# EDUCoins
Educational Credits as Digital Currency: Application of the Blockchain Technology

## Locations

All reports and source code can be found here:

[Homepage](http://vitali.dettling.xyz/) </br>
[Bachelor Thesis](http://vitali.dettling.xyz/?page_id=153) </br>
[Project Part 1](http://vitali.dettling.xyz/?page_id=149) </br>
[Project Part 2](http://vitali.dettling.xyz/?page_id=248)

repository: Vitali-Dettling/EDUCoins

repo_name: Vitali-Dettling/EDUCoins


text:
# ruetueta-web

[![Build Status](https://drone.ctfl.space/api/badges/chaostreff-flensburg/ruetueta-web/status.svg)](https://drone.ctfl.space/chaostreff-flensburg/ruetueta-web)

<!-- ## Development

Pushing to master is restricted. Please work in a `feature/` or `bug/` branch and create a pull request. Merging requires the CI passing, an approved review and the branch being up to date. -->

## Build Setup

```bash
# install dependencies
$ npm install

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

# build for production
$ npm run build
```

### Code Style

This project uses [Prettier](https://prettier.io) to format code. Prettier should be run before creating a pull request. You can run it with the default settings from your editor. For more information, refer to the [official documentation](https://prettier.io).

## Frameworks

For detailed explanation on how things work, checkout the [Vuepress docs](https://vuepress.vuejs.org/).

---

Made with ♡ at [Chaostreff Flensburg](https://twitter.com/chaos_fl) | [CI & CD](https://drone.ctfl.space/chaostreff-flensburg/ruetueta-web) | [License](./LICENSE)

repository: yksflip/ruetueta-web

repo_name: yksflip/ruetueta-web


text:
# How to contribute to messytables

## Contributing a feature

You are very welcome to submit code features or doc changes for review and merge into the central git repository:

* Create an issue
* Create a git branch with the format `ISSUE_NUMBER-brief-one-line-synopsis-of-the-work`
* Commit and push your changes and write tests for your code
* Use [PEP8](http://www.python.org/dev/peps/pep-0008/), where possible
* Make sure all tests are passing
* Add a note to the `CHANGELOG.md`
* Send a pull request and have someone to review it

For small changes and doc changes, it is not necessary to file a pull request.

## Running the tests

```bash
source pyenv/messytables/bin/activate
pip install -r requirements-test.txt
nosetests
```

## Merging a pull request

If you're reviewing a pull request for messytables, when merging a branch into master:

* Use the `--no-ff` option in the `git merge` command

## Making a release

If you want to release a new version:

* Make sure everything works as expected and all features are reasonably stable
* Tag the HEAD using [semantic versioning](http://semver.org/) and push them (`git push --tags`)
* Push to PyPi

repository: scraping-xx/messytables

repo_name: scraping-xx/messytables


text:
# demo-TD1
 Twitter Project Day 1

![Login.html](https://github.com/jadedragon21/demo-TD1/blob/main/src/main/resources/static/images/Screenshot_2021-02-16%20Log%20in(1).png)

Twitter Day 2ish

![Feed.html](https://raw.githubusercontent.com/jadedragon21/demo-TD1/main/src/main/resources/static/images/Screenshot_2021-02-24%20Feed.png)
--To Do: Make the follow and unfollow buttons work, get the tags to work, and spruce up the css background of the card using an image of something not gray.
Maybe make the background a bit darker to be easier on the eyes.--


text:
Lumen
=====

https://tallys.github.io/lumen/sassdoc/

Lumen is a
practical color-theory toolkit
for people who code.

Based on the [website](http://tallys.github.io/color-theory/)
by [Natalya Shelburne](https://twitter.com/natalyathree).

Development
-----------

`npm install` to intall
the testing, linting, and documentation dependencies.

`gulp sasslint` to lint changes in the Sass.

`gulp test` to run the tests with True.

Documentation
-------------

Clone the repo into an (ignored) sub-folder
named `gh-pages`,
and then make sure that sub-repo is on the `gh-pages` branch:

```
git clone git@github.com:tallys/lumen.git gh-pages
cd gh-pages
git checkout gh-pages
cd ../
```

Run `gulp sassdoc` to re-generate the documentation
in the `gh-pages` folder.
Then commit the changes
and push to the gh-pages branch on github:

```
cd gh-pages
git add --all
git commit -m 'Update documentation'
g push
cd ../
```

repository: oroodie/lumen

repo_name: oroodie/lumen


text:
# Kanye

> Smash your keyboards with ease

Browser support includes every sane browser and **IE7+**.

# Install

From `npm`

```shell
npm install kanye --save
```

From `bower`

```shell
bower install kanye --save
```

# API

Kanye exposes a few methods for interacting with keyboard events.

## `kanye.on(combo, options?, listener)`

Adds an event listener `listener` to the registry. This event listener will fire only when the user input is `combo`, and it can be optionally filtered by a `filter` selector.

The `combo` is expected to be a human-readable keyboard input string such as `cmd+a` or `cmd+shift+b`. If the conditions are satisfied, `listener` will be invoked passing the `event` as an argument. Options are outlined below and they can be omitted.

- `filter` allows you to filter out the event target based on a selector or a DOM element
- `context` allows you to group different shortcuts together, making them easier to remove on the future

## `kanye.off(combo, options?, listener)`

Removes an event listener previously registered by `kanye.on`. You'll need to specify the options again to make sure that the event listener is correctly removed.

## `kanye.clear(context?)`

Remove all event listeners previously added with `.on` to `context`. If a `context` is not provided, every single event listener ever registered with Kanye will be removed.

# License

MIT

repository: bevacqua/kanye

extension: markdown

repo_name: bevacqua/kanye


text:
# Steam Economy Enhancer

Enhances the Steam Inventory and Steam Market.

This script adds the following features to the Steam Market:

*    Detect overpriced and underpriced items.
*    Select all (overpriced) items and remove them all at once.

This script adds the following features to the Steam Inventory:

*    Sell all (selected) items automatically. You can  select multiple items simultaneously with *Shift* and *Ctrl*.
*    Sell your trading cards all at once.
*    Market sell and buy table added to item details.
*    Quick sell buttons to sell an item without confirmations.

All pricing is based on the lowest listing, price history and your own minimum and maximum prices.

**Download**

[Install Steam Economy Enhancer](https://raw.githubusercontent.com/Nuklon/Steam-Economy-Enhancer/master/code.user.js)

*Greasemonkey or Tampermonkey is required to install.*

**Screenshots**

*    [Market overview](http://i.imgur.com/PIkDmor.png)
*    [Market delete](http://i.imgur.com/iFoVRhZ.png)
*    [Inventory buttons](http://i.imgur.com/i3xQ6gl.png)
*    [Inventory item details](http://i.imgur.com/9qrrcTP.png)
*    [Inventory multiple items](http://i.imgur.com/FzNN8Q8.png)

repository: nikop/Steam-Economy-Enhancer

repo_name: nikop/Steam-Economy-Enhancer


text:
raspi-dashboard
===============

raspi-dashboard is a script to modify a Arch Linux installation running on a Raspberry Pi that automatically boots into a minimalistic, frameless browser when started

Please note that this project does not include any webserver or storage to save data to be shown. The data to be shown must be accessible over the network, provided by a different device or service, for example:

 - [Status Board at Panic](http://www.panic.com/blog/the-panic-status-board/)
 - [Geckoboard](http://www.geckoboard.com/)
 - [Shopify's dashing](http://shopify.github.io/dashing/)

Installation
------------

Create the package and install it using

    makepkg -si

Customization
-------------

    /home/display/.xinitrc

contains a line `dwb -R http://www.google.com/`. The URL in this line will be loaded by the browser upon booting. Insert your URL here.

Readonly filesystem
-------------------

To protect your SD card against wear and tear, see [`arch-overlayroot`](https://github.com/nils-werner/arch-overlayroot) for a simple overlay based readonly file system solution.


text:
---
layout: post
title:  "Function Help: LiquidCrystal constructor"
date:   2015-07-08 15:37:30
categories: others
---

	LiquidCrystal constructor

	LiquidCrystal(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);

This is the constructor for the LCD object; it creates a new one an initalizes it. You shoudl only ever make one of these.
For our shield, you'll always want to call it with the following arguments. They are the pin assignments for the shield.

Usage:

	LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

gha_language: CSS


text:
DataTemplateSelector
====================

This sample demonstrates using a `DataTemplateSelector` to select a `DataTemplate` at runtime per item in a `ListView`.

For more information about the sample see [Data Template Selector](http://developer.xamarin.com/guides/xamarin-forms/templates/data-templates/selector/).

Author
------

David Britch

repository: rsinohara/xamarin-forms-samples

repo_name: rsinohara/xamarin-forms-samples


text:
# Solution Implementation

This solution is built on Clean/Onion Architecture principles.

It uses certain terminology to achieve this architecture.
	1. Domain layer
	Contains the models, enumerations and interfaces that are used
	to define the infrastructure of the solution.

	2. Services layer (Can be one or many projects)
	Each Project implements a single responsibility task such as
	Email tasks, Database Context, Calls to external api' etc.

	3. Infrastructure layer
	Contains the implementation of the interfaces defined in the Domain.

	4. Presentation layer (Can be one or many projects)
	Contains the UI interface to the solution. This can be anything like a
	Website, Console App, Windows App or simply an Api Service.

## Build.ps1

Use this file to complete a full build of the solution.
This file can implement other solution resources such as

* npm installs
* webpack build etc.

### Package.ps1

Use this file to complete a full build of the solution and to create
a package to deploy to another environment.

This is useful if you are building a deployment package from
with npm/webpack builds.

### Run.ps1

Use this file to run the application. This is useful
if you have multiple startup projects. (i.e React/Webpack server etc)

### add-react-project.ps1

Adds a react project to the solution using https://github.com/DatacomNZ/create-react-project-cli.
It updates the build.ps1/package.ps1 and run.ps1 to include the react project.

## Notes
This is a boilerplate solution. It can be customised entirely to suit the requirements of the project.

repository: DatacomNZ/common-dotnet-cli-templates

gha_language: C#

repo_name: DatacomNZ/common-dotnet-cli-templates


text:
This directory will contain the firmware (embedded software) for
our microcontroller (attiny1614 at time of writing)

Required to compile
-------------------

To compile these, you need a avr-gcc compiler configured for the
attiny1614.

Old instructions are here:
https://github.com/vladbelous/tinyAVR_gcc_setup

A newer script I've written is here:
https://github.com/MarkR42/robotbits/tree/master/avr_toolchain

To flash the firmware, you need a suitable flashing utility.

pyupdi can be used with a simple serial cable + 1 resistor.

See https://github.com/mraardvark/pyupdi/

Useful examples:

https://github.com/chromia/attiny1614example


text:
# Building and Running Unit Tests

Contributions will need to pass our continuous integration unit tests before merging. To test your contributions against these tests, you'll first need to install Eigen and gtest:

``` bash
sudo apt install libgtest-dev libeigen3-dev cmake
```

## Compile gtest
You just downloaded a bunch of source files, which you now have to go build

``` bash
sudo apt install cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
```

Copy the archive files you just built to the `/usr/lib` directory so CMake can find them later:

``` bash
sudo cp *.a /usr/lib
```

## Run the Test Script

The simplest way to run the unit tests is to use the testing script.
This script first checks that the firmware compiles, then runs the unit tests.
This is the same script used on the continuous integration server, so this is a great way to check that your code will pass the tests before opening a pull request.
Run the test script with

```bash
cd <firmware_directory>
./scripts/run_tests.sh
```

## Manually Build and Run the Unit Tests

If you want to manually build and run the unit tests, first build them with the following commands:

``` bash
cd <firmware_directory>/test
mkdir build
cd build
cmake ..
make
```

Then run them with:

``` bash
./unit_tests
```


text:
# fun-with-events
This is an ongoing exploration of [CQRS](http://martinfowler.com/bliki/CQRS.html), [Event Sourcing](http://martinfowler.com/eaaDev/EventSourcing.html), [Pub/Sub](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern) and [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection) in the context of [ES6/7](http://www.ecma-international.org/publications/standards/Ecma-262.htm) and a variation of [S.O.L.I.D.](http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod) principles applied to functions rather than classes.

## Setup
Clone from GitHub:
``` bash
git clone git@github.com:jonatanpedersen/fun-with-events.git
```
Install dependencies:

``` bash
npm install
```

## Usage
Start the services:
``` bash
sudo npm start
```

Open the user interface https://localhost

Note: You need RabbitMQ and MongoDB. The application connects to ```amqp://guest:guest@localhost:5672``` and ```mongodb://localhost:27017/test``` by default.

### Responsibilities

#### write api
 * Listens for commands and dispatches them to handlers that read and append events from and to event streams. The event streams persists events to storage and publishes events to a message queue

#### read api
 * Listens for events and dispatches them to handlers that update view models
 * Listens for queries and dispatches them to handlers that serve view models

#### ui
 * Serve static html files
 * Send commands to the write api
 * Send queries to the read api

#### command
Something that describes a desired mutation of a domain object. Consists of a name and some parameters.

``` js
{
  name: 'createTask',
  params: {
    taskId: 1,
    description: 'Get ducks in a row'
  }
}
```

Actions are always named with a verb followed by the name of the domain object. e.g. ```createTask``` or  ```acceptOrder``` .

#### event
Something that tell us that a domain object has mutated. Consists of a name and some data describing the mutation.

``` js
{
  name: 'taskCreated',
  data: {
    taskId: 1,
    description: 'Get ducks in a row'
  }
}
```

#### query
Something that describes a view on the read side. Contains a name and optional parameters.

``` js
{
  name: 'tasks',
  params: {
    order: 1
  }
}
```

#### dispatch
Dispatches a ```command```, ```event``` or  ```query``` to the appropriate ```handle``` function.

``` js
async function dispatch(thing) {
}
```

#### handle
Handles a ```command``` by mutating a domain object on the write side.
Handles an ```event``` by updating a view on the read side.
Handles a ```query``` by returning a view from the read side.

``` js
async function handle(thing) {
}
```

#### validate
Validates a ```command```, ```event``` or  ```query``` and throws an error if necessary.

``` js
async function validate(thing) {
}
```

#### composition root
The applications ```main()``` function is the composition root, and it is composed primarily of ```functions```.

#### dependency injection
All functions should have their dependencies injected during creation.

``` js
function create(dependency1, dependency2) {
  return async function (arg1, arg2) {
      // call dependency1
      // call dependency2
  }
}
```

## Licence
The MIT License (MIT)

Copyright (c) 2015 Jonatan Pedersen https://www.jonatanpedersen.com

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

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

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

repository: jonatanpedersen/fun-with-events

repo_name: jonatanpedersen/fun-with-events


text:
# Code and Data for Paper "Vision-Language Navigation with Multi-granularity Observation and Auxiliary Reasoning Tasks"

## A updated version of AuxRN

## Environment Installation
Download Room-to-Room navigation data:
```
bash ./tasks/R2R/data/download.sh
```

Download image features for environments:
```
mkdir img_features
wget https://www.dropbox.com/s/o57kxh2mn5rkx4o/ResNet-152-imagenet.zip -P img_features/
cd img_features
unzip ResNet-152-imagenet.zip
```

Download object features [here](https://drive.google.com/drive/folders/1u5cSqFOKaleQWc9puv3hzRPqKLi43R_c?usp=sharing)

Python requirements: Need python3.6 (python 3.5 should be OK since I removed the allennlp dependencies)
```
pip install -r python_requirements.txt
```

Install Matterport3D simulators:
```
git submodule update --init --recursive
sudo apt-get install libjsoncpp-dev libepoxy-dev libglm-dev libosmesa6 libosmesa6-dev libglew-dev
mkdir build && cd build
cmake -DEGL_RENDERING=ON ..
make -j8
```

## Code

### Link Data
```
ln -s <image feature path> img_features
ln -s <object feature path> obj_features
```

### Train Speaker
```
bash run/speaker.bash 0
```
0 is the id of GPU. It will train the speaker and save the snapshot under snap/speaker/

### Train Baseline
```
bash run/baseline.bash 0
```

### Train MG-AuxRN
```
bash run/mg-auxrn.bash 0
```

### Top-down Visualization
![bird_view](./visualizations/bird_view.png)


text:
# Guidelines for Contributors

The MSWH software is open to contributions from the coder community around the world.

The contributors should comply with the
[University of California Standards of Ethical Conduct](https://policy.ucop.edu/doc/1100172/EthicalValuesandConduct).

The contribution can be a bug fix, an improvement to an existing feature, or a fully new feature. If you wish to contribute any of those please follow this workflow:

1. Fork the MSWH repository.
1. Create a new issue using the [MSWH issue tracker](https://github.com/LBNL-ETA/MSWH/issues) which briefly describes your intended contribution.
1. Await a response from a person responsible for code maintenance.
1. Discuss whether there is a need to address this issue and ways in which the issue could be best addressed.
1. Once an agreement is reached on how to address the issue, develop the code on a new branch on your forked repository. It is highly recommended that the branch includes the MSWH software repo issue number for easier tracking.
1. When you are happy with your code that addresses the issue, and after you confirm that all tests are passing, create a [pull request](https://github.com/LBNL-ETA/MSWH/compare) against the `master` branch of the MSWH repository.
1. Notify the person that was discussing the issue with you using `@githubname` that the feature/fix/improvement is now ready for review.
1. Conduct iterations of receiving review and addressing it until the reviewer approves the PR.
1. The reviewer will then thank you and merge the PR.
1. Now you can start utilizing the updated code!

In addition, if you have questions on how to best apply the existing code for your particular purpose, you may pose those using the [MSWH issue tracker](https://github.com/LBNL-ETA/MSWH/issues).

Thank you for your interest in contributing to our open source MSWH repository!

Milica

repository: LBNL-ETA/MSWH

gha_language: Jupyter Notebook

gha_license_id: NOASSERTION

repo_name: LBNL-ETA/MSWH


text:
# [<img<EMAIL_ADDRESS>width="48" height="48" />cwRsync (Free Edition)](https://chocolatey.org/packages/rsync)

[![Software license](https://img.shields.io/badge/License-Simplified%20BSD-green.svg)](https://itefix.net/simplified-bsd-license)
[![Maintenance status](https://img.shields.io/badge/maintained%3F-yes-green.svg)](https://gitHub.com/dgalbraith/chocolatey-packages/graphs/commit-activity)
[![AppVeyor build](https://img.shields.io/appveyor/ci/dgalbraith/chocolatey-packages)](https://ci.appveyor.com/project/dgalbraith/chocolatey-packages)
[![Software version](https://img.shields.io/badge/Source-v6.2.9-blue.svg)](https://www.itefix.net/cwrsync?qt-cwrsync_client=1&qt-cwrsync=1#qt-cwrsync)
[![Chocolatey package version](https://img.shields.io/chocolatey/v/rsync?label=Chocolatey)](https://chocolatey.org/packages/rsync)

Rsync is a fast and extraordinarily versatile file copying tool for both remote and local files.

Rsync uses a delta-transfer algorithm which provides a very fast method for bringing remote files into sync. It does
this by sending just the differences in the files across the link, without requiring that both sets of files are at one
of the ends of the link beforehand. At first glance this may seem impossible because the calculation of diffs two files
normally requires local access to both files.

<EMAIL_ADDRESS>
## Notes

* cwRSync uses the Windows user profile directories as home
* Current versions of rsync are only provided as a 64-bit version
* If support for 32-bit Windows is required use the legacy version [rsync <IP_ADDRESS>90204](https://chocolatey.org/packages/rsync/<IP_ADDRESS>90204).

  ```powershell
  choco install rsync --version <IP_ADDRESS>90204
  choco pin add -n=rsync --version <IP_ADDRESS>90204
  ```

* This package is automatically updated using the [Chocolatey Automatic Package Update Model (AU)](https://github.com/majkinetor/au/blob/master/README.md).
  If you find it is out of date by more than a day or two, please contact the maintainer(s) and let them know the package is no longer updating correctly.

repository: dgalbraith/chocolatey-packages

gha_language: PowerShell

repo_name: dgalbraith/chocolatey-packages


text:
---
title: Ranges
page_title: Ranges
description: Linear Gauge for Blazor - Ranges.
slug: linear-gauge-ranges
tags: telerik,blazor,linear,gauge,ranges
published: True
position: 10
---

## Linear Gauge Ranges

You can highlight specific value ranges by providing one or more instances of the `<LinearGaugeScaleRange>` to the `<LinearGaugeScaleRanges>` collection, child tag of the `<LinearGaugeScale>`. You can customize them by using the parameters exposed on the `<LinearGaugeScaleRange>`:

* [From and To](#from-and-to)

* [Color](#color)

* [Opacity](#opacity)

## From and To

* The `From` (`double?`) parameter controls the lowest point in the range.

* The `To` (`double?`) parameter controls the highest point in the range.

>caption Use the From and To parameters to provide a range. The result from the code snippet below.

![From and To parameters example](images/from-to-range.png)

````CSHTML
@* Use the From and To parameters to provide a range on the scale. *@

<TelerikLinearGauge>
    <LinearGaugeScales>
        <LinearGaugeScale>
            <LinearGaugeScaleRanges>
                <LinearGaugeScaleRange From="10" To="20" Color="red"></LinearGaugeScaleRange>
            </LinearGaugeScaleRanges>
        </LinearGaugeScale>
    </LinearGaugeScales>

    <LinearGaugePointers>

        <LinearGaugePointer Value="10">
        </LinearGaugePointer>

        <LinearGaugePointer Value="20">
        </LinearGaugePointer>

        <LinearGaugePointer Value="30">
        </LinearGaugePointer>

    </LinearGaugePointers>
</TelerikLinearGauge>
````

## Color

The `Color` (`string`) parameter controls the color of the range. It accepts **CSS**, **HEX** and **RGB** colors.

If you do not define the `Color` parameter the range will not be visually rendered.

>caption Use an RGB colors for the ranges in the linear gauge. The result from the code snippet below.

![Color parameter screenshot](images/color-parameter-ranges.png)

````CSHTML
@* Change the color of the ranges *@

<TelerikLinearGauge>
    <LinearGaugeScales>
        <LinearGaugeScale>
            <LinearGaugeScaleRanges>
                <LinearGaugeScaleRange From="0" To="10" Color="rgb(0,128,0)"></LinearGaugeScaleRange>
                <LinearGaugeScaleRange From="10" To="20" Color="rgb(255,255,0)"></LinearGaugeScaleRange>
                <LinearGaugeScaleRange From="20" To="30" Color="rgb(255, 0, 0)"></LinearGaugeScaleRange>
            </LinearGaugeScaleRanges>
        </LinearGaugeScale>
    </LinearGaugeScales>

    <LinearGaugePointers>

        <LinearGaugePointer Value="10">
        </LinearGaugePointer>

        <LinearGaugePointer Value="20">
        </LinearGaugePointer>

        <LinearGaugePointer Value="30">
        </LinearGaugePointer>

    </LinearGaugePointers>
</TelerikLinearGauge>
````

## Opacity

The `Opacity` (`double`) parameter controls the of the range. The value passed to it should be between **0** and **1**.

>caption Change the opacity of a range. The result from the code snippet below

![Mirror the linear gauge](images/opacity-parameter-ranges.png)

````CSHTML
@* Make a range more opaque *@

<TelerikLinearGauge>
    <LinearGaugeScales>
        <LinearGaugeScale>
            <LinearGaugeScaleRanges>
                <LinearGaugeScaleRange From="0" To="10" Color="rgb(0,128,0)"></LinearGaugeScaleRange>
                <LinearGaugeScaleRange From="10" To="20" Color="rgb(255,255,0)" Opacity="0.5"></LinearGaugeScaleRange>
                <LinearGaugeScaleRange From="20" To="30" Color="rgb(255, 0, 0)"></LinearGaugeScaleRange>
            </LinearGaugeScaleRanges>
        </LinearGaugeScale>
    </LinearGaugeScales>

    <LinearGaugePointers>

        <LinearGaugePointer Value="10">
        </LinearGaugePointer>

        <LinearGaugePointer Value="20">
        </LinearGaugePointer>

        <LinearGaugePointer Value="30">
        </LinearGaugePointer>

    </LinearGaugePointers>
</TelerikLinearGauge>
````

## See Also

* [Live Demo: Linear Gauge](https://demos.telerik.com/blazor-ui/lineargauge/overview)
* [Live Demo: Linear Gauge - Scale Ranges](https://demos.telerik.com/blazor-ui/lineargauge/scale-ranges)
* [Linear Gauge: Overview]({%slug linear-gauge-overview%})
* [Linear Gauge: Overview]({%slug linear-gauge-scale%})
* [Linear Gauge: Pointers]({%slug linear-gauge-pointers%})

repository: telerik/blazor-docs

repo_name: telerik/blazor-docs


text:
# Problem Formulation

Since `acados` mainly aims on providing SQP type methods for optimal control, it naturally needs optimal control structured nonlinear programming formulations (OCP NLP) and quadratic programming (QP) formulations to tackle the subproblems within SQP.

## Optimal control structured NLP (OCP NLP)

The problem formulation targeted by `acados` OCP solver is stated here:
[https://github.com/acados/acados/blob/master/docs/problem_formulation/problem_formulation_ocp_mex.pdf](https://github.com/acados/acados/blob/master/docs/problem_formulation/problem_formulation_ocp_mex.pdf)

## QP formulations (dense and OCP structured)

`acados` relies on `HPIPM` for reformulating QP problems via (partial) condensing and expansion routines.
In order to use them efficiently, we use the flexible QP formulations from `HPIPM`.
Those are the optimal control structured quadratic programming formulation (OCP QP) and the
dense QP formulation.

Both problem formulations are documented in the [`HPIPM guide`](https://github.com/giaf/hpipm/blob/master/doc/guide.pdf).

repository: acados/acados

gha_language: C

repo_name: acados/acados


text:
---
name: "\U0001F914 Ask a Question"
about: I want to ask a question.
title: ''
labels: Question
assignees: ''

---

## General Question

<!--
Before asking a question, make sure you have:
- Baidu/Google your question.
- Searched open and closed [GitHub issues](https://github.com/PaddlePaddle/PaddleSpeech/issues?q=is%3Aissue)
- Read the documentation:
  - [Readme](https://github.com/PaddlePaddle/PaddleSpeech)
  - [Doc](https://paddlespeech.readthedocs.io/)
-->

branch_name: refs/heads/develop

gha_language: Python


text:
%%  tags:: #concept %%
# Synthesis
 The combining of separate elements or substances to form a coherent whole.

 Related: [[Convergence]]

### Example Usage, Keywords, Concepts, and Metaphors
- Thesis. Antithesis. Synthesis [[201408190641]] - ie Hegelian dialectic [[MOCs are Dialectics]]
- Chinese culture and Confucianism - Chinese civilization is the longest living because of its ability to synthesize disparate entities, like it's doing currently with Communism and Capitalism.
- The Borg - via assimilation

repository: JuliadeBerga/obsidian

path: /LYT Kit/Umami/Synthesis.md

repo_name: JuliadeBerga/obsidian


text:
---
layout: post
title: Set Up Spark on Windows
---

You just need to point IntelliJ to wherever Spark is located which you can do by adding them as External Libraries, to do this,

1. go to the mynewproject folder we created in the video

2. Right Click on it and go to Module Settings (Shortcut for this is just F4)

3. On the left had side panel under Project Settings click on Libraries

4. Click on the plu sign to add a new library and then select Scala SDK and then choose Browse

5. Go to where Spark is installed on your Computer (it should be under C://Spark if you installed it on Windows, or under a hidden folder like bin/Cellar for a MAC Homebrew install)

6. Then go to Spark/jars/ and select all the .jar files there (you don't actually have to pick them all, its just easier then manually selecting only the ones you need)

7. Then hit Ok and Apply these new external libraries

8. You should now be able to write out Spark libraries on IntelliJ, keep in mind though, using Spark with Scala Worksheets instead of just s normal Scala script can be cumbersome/buggy because of the restriction of being able to only have one Spark Context open at a time, and the interactive nature of the worksheet may constantly be calling new SparkContexts over and over again leading to error notices.

Here is a video on Youtube that actually walks through this (but note he uses Maven):

https://www.youtube.com/watch?v=GGf6OqjaGw4

http://stackoverflow.com/questions/38127062/java-lang-nosuchmethoderror-scala-predef-arrowassocljava-lang-objectljava-l


text:
---
layout: post
title: "GSoC: Update Week-6"
tags:
  - GSoC
  - SymPy
---

Midterm evaluations are complete. I got to say Google was fairly
quick in mailing the results. It was just after a few minutes
after the deadline, I received a mail telling me I had passed. Yay!

Here's my report for week 6.

<!-- excerpt -->
### Highlights:

#### 1. Formal Power Series:

For the most of the week I worked towards improving the implementation for the second part of the algorithm.
I was able to increase the range of admissible functions.
For this I had to write a custom solver for solving the RE of [hypergeometric](/2015-06-16-gsoc-update-week-3/#RE) type.
It's lot faster and better in solving the specific type of RE's this algorithm generates in comparison to
just using ``rsolve`` for all the cases. However, it still has some issues.
It's currently in testing phase and probably will be PR ready by the end of this week.

The code can be found [here](https://github.com/leosartaj/sympy/tree/hyper2).

While working on it, I also added some more features to ``FormalPowerSeries``([\#9572](https://github.com/sympy/sympy/pull/9572)).

Some working examples.
(All the examples were run in isympy)

```
In [1]: fps(sin(x), x)
Out[1]: x - x**3/6 + x**5/120 + O(x**6)
In [2]: fps(cos(x), x)
Out[2]: 1 - x**2/2 + x**4/24 + O(x**6)
In [3]: fps(exp(acosh(x))
Out[3]: I + x - I*x**2/2 - I*x**4/8 + O(x**6)
```

#### 2. rsolve:

During testing, I found that ``rsolve`` raises exceptions
while trying to solve RE's, like ``(k + 1)*g(k)``
and ``(k + 1)*g(k) + (k + 3)*g(k+1) + (k + 5)*g(k+2)`` rather
than simply returning ``None`` which it generally does
incase it is unable to solve a particular RE.
The first and the second RE are formed by functions ``1/x`` and
``(x**2 + x + 1)/x**3`` respectively which can often come up in practice. So, to solve
this I opened [\#9615](https://github.com/sympy/sympy/pull/9615). It is still under review.

#### 3. Fourier Series:

[\#9523](https://github.com/sympy/sympy/pull/9523) introduced ``SeriesBase`` class and ``FourierSeries``.
Both ``FormalPowerSeries`` and ``FourierSeries`` are based on ``SeriesBase``.
Thanks [@flacjacket](https://github.com/flacjacket) and [@jcrist](https://github.com/jcrist)
for reviewing and merging this.

```
In [1]: f = Piecewise((0, x <= 0), (1, True))
In [2]: fourier_series(f, (x, -pi, pi)
Out[2]: 2*sin(x)/pi + 2*sin(3*x)/(3*pi) + 1/2 + ...
```

#### 4. Sequences:

While playing around with sequences, I realized periodic
sequences can be made more powerful. They can now be used for
periodic formulas([\#9613](https://github.com/sympy/sympy/pull/9613)).

```
In [1]: sequence((k, k**2, k**3))
Out[2]: [0, 1, 8, 3, ...]
```

#### 5. Others:

Well I got tired with ``FormalPowerSeries``(I am just a human), so
I took a little detour from my regular project work and opened
[\#9622](https://github.com/sympy/sympy/pull/9622) and [\#9626](https://github.com/sympy/sympy/pull/9626)
The first one deals with inconsistent diff of Polys while
while the second adds more assumption handler's like ``is_positive``
to ``Min/Max``.

### Tasks Week-7:

* Test and polish [hyper2](https://github.com/leosartaj/sympy/tree/hyper2) branch. Complete the algorithm.
* Add sphinx docs for ``FourierSeries``.
* Start thinking on the operations that can be performed on ``FormalPowerSeries``.

That's it. See you all next week. Happy Coding!


text:
![Expose logo](Expose.png)

A V package that helps you to scrap web pages. It shows you a lot of information about the page.

# V Programming Language
If you don't know about V please [check this out](https://github.com/vlang)

## Installation

Use the package manager [VPM](https://vpm.vlang.io/) to install VExpose.

```bash
v install joao2391.vexpose
```

## Usage

After install the package:

```v
import joao2391.vexpose
```

Return total of links in the html page
```v
mut map_links := vexpose.get_links_from_url('url')
```

Return total of CSS files referenced in the html page
```v
mut count_css := vexpose.count_css_from_url('url')
```

Return total of JS files referenced in the html page
```v
mut count_js := vexpose.count_js_from_url('url')
```

Return total of Html Elements
```v
mut count_html_elements := vexpose.count_html_elements_from_url('url')
```

Return total of META elements
```v
mut count_meta_tags := vexpose.count_meta_from_url('url')
```

Return all the JS content
```v
mut js_content := vexpose.get_jscontent_from_url('url')
```

Return all the CSS content
```v
mut css_content :=  vexpose.get_css_content_from_url('url')
```

Return all the CSS references
```v
mut css_reference :=  vexpose.get_css_ref_from_url('url')
```

Return the total of onclick events in all elements in the html
```v
mut count_onclick_events := vexpose.count_js_events_from_url('url')
```

Return the total of Forms in html page
```v
mut count_forms := vexpose.count_forms_from_url('url')
```

Return the Action and HttpMethod from Form
```v
mut form_info := vexpose.get_form_info_from_url('url')
```

Return the size in Kb of the page
```v
mut page_size := vexpose.get_page_size_from_url('url')
```

Return the onclick values
```v
mut onclick_values := vexpose.get_onclick_values_from_url('url')
```

Return the JSON with the amount of info found
```v
mut report := vexpose.generate_report('url')
```

Return True/False
```v
mut has_ajax_calls := vexpose.has_ajax_calls_in_url('url')
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)


text:
# Deploy to iTunes Connect with Shenzhen

__WARNING: This step is deprecated, use [deploy-to-itunesconnect-deliver](https://github.com/bitrise-io/steps-deploy-to-itunesconnect-deliver) step instead. Will be removed by 2018-09-20.__

The new Deploy to iTunes Connect with Shenzhen step.

Can be run directly with the [bitrise CLI](https://github.com/bitrise-io/bitrise),
just `git clone` this repository, `cd` into it's folder in your Terminal/Command Line
and call `bitrise run test`.

*Check the `bitrise.yml` file for required inputs which have to be
added to your `.bitrise.secrets.yml` file!*

gha_language: Shell


text:
# RecyclerView ItemDecorations
[![Circle CI](https://circleci.com/gh/bleeding182/recyclerviewItemDecorations/tree/master.svg?style=shield)](https://circleci.com/gh/bleeding182/recyclerviewItemDecorations/tree/master)

This project is about showcasing and trying out ItemDecorations for RecyclerViews. There's some blog posts on this topic already [Here](http://bleeding182.blogspot.co.at/2015/11/separator.html) and [Here](http://bleeding182.blogspot.co.at/2015/11/animations-and-decorations.html) covering the basics on how to use decorations.

* Tried adding some CardLayout like Decoration to a RecyclerView.
* Made a lightweight header decoration with shadow and / or parallax effect

![Header Decoration](/readme/headerdecoration.gif)

* Added a decoration for dismissing items to draw in the background like gmail

![Dismissing items](/readme/dismiss.gif)

* Added some Parallax Like effect on a header

![Screenshot](/readme/animation.gif)


text:
# Kinect Pressure test with Age and Gender recognition

### Version and Requirement
- python -> [3.5.4](https://www.python.org/downloads/release/python-354/)
- opencv -> [3.4.2](https://pypi.org/project/opencv-python/<IP_ADDRESS>/)
- pykinect2 -> [0.1.0](https://github.com/Kinect/PyKinect2)
- pyqt5 -> [5.11.3](https://pypi.org/project/PyQt5/)
- requests -> [2.18.4](https://pypi.org/project/requests/2.18.4/)
- ConfigParser -> [3.5.0](https://pypi.org/project/configparser/)

### Introduce
Before you used this project,
you should install some package like opencv-python version, pyqt5, requests for api, pykinect2, and so on.
Furthermore, you also add the url of api in the API folder's config file.

### How to run
1. Open API folder and Add api url in client.py
2. Have a kinect v2
3. Open cmd and type
```bash
python app.py
```


text:
# mapper

Simplified and simple usage of DynamoDB. Mapper assumes you've already defined reasonable marshaling of your class
to and from JSON, and simply persists objects to DynamoDB tables as records with structure that reflects the objects'
JSON representation.

This allows you to use libraries like [FreeBuilder](https://github.com/google/FreeBuilder) and
[AutoValue](https://github.com/google/auto/tree/master/value) to get clean Java classes with immutable instances
and minimal boilerplate, while still maintaining the simple DynamoDB persistence afforded by the
[DynamoDB object mapper](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.html).

## Examples

Mapper supports the version attribute for [optimistic locking](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.OptimisticLocking.html):

```java
@FreeBuilder
@JsonDeserialize(builder = SimpleFreeBuiltVersioned.Builder.class)
@DynamoDBTable(tableName = "simple_free_built_versioned")
interface SimpleFreeBuiltVersioned {
    @DynamoDBHashKey(attributeName = "hashKey")
    String getHashKey();
    String getStringValue();
    @DynamoDBVersionAttribute(attributeName = "version")
    Optional<Integer> getVersion();

    class Builder extends SimpleFreeBuiltVersioned_Builder {}
}
```

Note that the example above also uses `Optional<T>` -- empty optionals are omitted from the JSON by Jackson, so they are
safely round-tripped to DynamoDB.

Mapper also supports specifying a range key:

```java
@FreeBuilder
@JsonDeserialize(builder = HashAndRange.Builder.class)
@DynamoDBTable(tableName = "hash_and_range")
interface HashAndRange {
    @DynamoDBHashKey(attributeName = "hashKey")
    String getHashKey();
    @DynamoDBRangeKey(attributeName = "rangeKey")
    String getRangeKey();

    class Builder extends HashAndRange_Builder {}
}
```

If the hash or range key needs to be autogenerated, you can use the `@DynamoDBAutoGeneratedKey` annotation on a method
and Mapper will provide a UUID if a value is omitted; this only works for fields of type `String` or `Optional<String>`.

And in most cases vanilla Java objects will continue to work with Mapper, just like they do with the
[SDK's built-in `DynamoDBMapper`](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.html).

The API of mapper is simply the class `JsonDynamoMapper`:

```java
public <T> PutItemResult save(T item) throws MappingException {}
public <T> Optional<T> load(Class<T> clazz, String hashKey) throws MappingException {}
public <T> Optional<T> load(Class<T> clazz, String hashKey, String rangeKey) throws MappingException {}
public <T> ScanResultPage<T> scan(Class<T> clazz) throws MappingException {}
public <T> ScanResultPage<T> scan(Class<T> clazz, @NotNull DynamoDBScanExpression scanExpression) throws MappingException {}
public <T> T convert(Class<T> clazz, Map<String, AttributeValue> attributeValueMap) throws MappingException {}
public <T> Map<String, AttributeValue> convert(T item) throws MappingException {}
```

The basics of `save`, `load` and `scan` are effectively the same as the built-in object mapper. More DynamoDB operations
can be implemented by using the simple `convert` methods in conjunction with the
[DynamoDB SDK's low-level API](http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/dynamodbv2/AmazonDynamoDBClient.html).

repository: scopely/mapper

gha_language: Java

repo_name: scopely/mapper


text:
# Square’s Cash App Sold $150M Worth of Bitcoin in Q3: 250% YoY Growth

Published at: **2019-11-06T21:40:34+00:00**

Author: ****

Original: [NewsBTC](https://www.newsbtc.com/2019/11/06/squares-cash-sold-150m-worth-bitcoin-q3/)

Once again, fintech giant Square has shocked the Bitcoin industry with its latest earnings report; the company’s flagship product, the Cash App, sold $148 million worth of BTC in fiscal Q3 of 2019. This marks significant retail interest in cryptocurrency from Square’s American clientele.
Crypto analyst Kevin Rooke pointed out that this is the sixth straight quarter of growth for this facet of Square’s business. Rooke also noted that Bitcoin revenues at Square are now growing by a jaw-dropping 244% year-over-year, despite the fact that BTC remains over 50% below its previous all-time high of $20,000.

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported