text:
# coffeescript-concat

**coffeescript-concat** is a utility that preprocesses and concatenates CoffeeScript source files.

It makes it easy to keep your CoffeeScript code in separate units and still run them easily.  You can keep your source logically separated without the frustration of putting it all together to run or embed in a web page.  Additionally, coffeescript-concat will give you a single sourcefile that will easily compile to a single Javascript file.

## **coffeescript-concat performs 4 operations:**

* Automatically puts parent classes in an inheritance chain in the correct order

* Allows you to specify that a class from another file needs to be included before another file.
    When a `#= require Classname` directive is encountered, coffeescript-concat will find the file containing that class, preprocess it, and put it above the including class.

* Allows you to specifiy that a file needs to be included before another file.
    When a `#= require <FileName>` or `#=require <FileName.coffee>` directive is encountered, coffeescript-concat will find the file, preprocess it, and put it above the including class.

* Allows you to refer to external classes that will be available at runtime
	When a `#= extern Classname` directive is encountered, coffeescript-concat
	will assume that class exists.

How does coffeescript-concat find the classes and files?  By specifying include directories, you can tell coffeescript where to look.  If it can't find the needed file in any of the include directories, it will let you know.

## **Using coffeescript-concat:**
Using [npm](http://npmjs.org):
    $ `npm install -g coffeescript-concat`
    $ `coffeescript-concat -I /my/include/directory -I includeDir2 A.coffee B.coffee -o output.coffee`

Using CoffeeScript directly:
    $ `coffee coffeescript-concat.coffee -I /my/include/directory -I includeDir2 A.coffee B.coffee -o output.coffee`

This will preprocess and concatenate This.coffee, That.coffee, and TheOther.coffee along with any classes they require and output the resulting code into output.coffee.  If you don't specify an output file (-o), coffeescript-concat prints the output to stdout so that you can easily write it to a file or pipe it to another utility for further processing.

#### Using grunt:
Check out [grunt-coffeescript-concat](https://www.npmjs.com/package/grunt-coffeescript-concat)

#### Using gulp:
Check out [gulp-coffeescript-concat](https://www.npmjs.com/package/gulp-coffeescript-concat)

## **License:**

ZLIB, see the [LICENSE](./LICENSE) file

license: Zlib

repository: fairfieldt/coffeescript-concat

extension: markdown

gha_language: CoffeeScript

repo_name: fairfieldt/coffeescript-concat


text:
# react-boilerplate
[![Build Status](https://travis-ci.org/Keats/react-boilerplate.svg?branch=master)](https://travis-ci.org/Keats/react-boilerplate)
[![Dependency Status](https://david-dm.org/Keats/react-boilerplate.svg)](https://david-dm.org/Keats/react-boilerplate)

TODO:

- remove lodash dependency
- upgrade to redux 1.0 and react-redux 1.0 when out
- add react component testing
- play with ImmutableJS
- look at ramda

## Install
For those of us with python3 as python:

npm install --python=/usr/bin/python2

license: MIT

repository: agaricus/react-boilerplate

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: agaricus/react-boilerplate


text:
# DiscordBot

Comes with a Youtube module.

## Modules
To write a module simply create a .js file inside the src/modules folder.

The basic structure of a module is
```javascript
'use strict';
const DiscordBotModule = require('../discordBotModule.js');

module.exports = class JokeModule extends DiscordBotModule {
    constructor(discordClient) {
        let commands = ['command'];
        super("[ModuleName]", commands, discordClient);
    }

    command(message, params) {
        // YOUR CODE HERE
        // You can access the discord client via this.discordClient
    }
};
```

### Configs for your modules
Just add any settings you require into the config.json. They will get passed to the module as second parameter.

## Installation
Simply run `npm install`

## Running the bot
Run the bot with `node app.js` or `npm start` after installing the dependencies.

repository: Farami/DiscordBot

repo_name: Farami/DiscordBot


text:
[![GoDoc](https://godoc.org/github.com/mitghi/lfring?status.svg)](https://godoc.org/github.com/mitghi/lfring)

# lfring

Lock-Free MRMW Ring Buffer.  It uses an implementation of Multi-Word Compare-and-Swap atomic operation, removes references by setting the associated slot to `nil` without losing consistency; ensures ordering and garbage collection.

repository: wade-welles/lfring

repo_name: wade-welles/lfring


text:
You want to make the most out of it and drive in the fanciest car you can afford, without spending any out-of-pocket money. There are  `5`  options, from the least to the most expensive:  `"UberX", "UberXL", "UberPlus", "UberBlack"`  and  `"UberSUV"`.

You know the length  `l`  of your ride in miles and how much one mile costs for each car. Find the best car you can afford.

Example

For  `l = 30`  and  `fares = [0.3, 0.5, 0.7, 1, 1.3]`, the output should be
`fancyRide(l, fares) = "UberXL"`.

The cost for the ride in this car would be  `$15`, which you can afford, but  `"UberPlus"`  would cost  `$21`, which is too much for you.

Input/Output

-   **[execution time limit] 4 seconds (js)**

-   **[input] integer l**

    A positive number representing the length of the ride.

    _Guaranteed constraints:_
    `4 ≤ l ≤ 30`.

-   **[input] array.float fares**

    A strictly increasing array of  `5`  elements.  `fares[0]`  stands for dollars per mile in "UberX",  `fares[1]`  is the same for "UberXL", etc.

    _Guaranteed constraints:_
    `0.3 ≤ fares[i] ≤ 5.0`.

-   **[output] string**

    The car that you should choose:  `"UberX"`,  `"UberXL"`,  `"UberPlus"`,  `"UberBlack"`  or  `"UberSUV"`. It is guaranteed that you can afford at least one of them.

repository: M-Ekrim/codeSignal

repo_name: M-Ekrim/codeSignal


text:
---
layout: post
title: "Always show solution in visual studio 2005"
date: 2017-03-29 17:12:00 +0200
comments: true
published: true
categories: ["post"]
tags: ["VS.NET"]
author: Kris van der Mast
---
For some projects I like to start with a blank solution and add several projects to it like a class library, web project, ... Since I installed Visual Studio 2005 Team System for Developers a while ago I wanted to go for this approach for a test project. Unfortunately the solution itself dissapeared after adding the first project.

It turned out to be a setting under Tools | Options, Projects and Solutions where you can check the checkbox **Always show solution**.

[![](http://blog.krisvandermast.com/content/binary/Alwaysshowsolutioninvisualstudio2005_BE94/alwaysshowsolution_small.png)](http://blog.krisvandermast.com/content/binary/alwaysshowsolution.png)

Grz, Kris.


text:
Apollo State Link
---

## What is this?
An Apollo Link to easily manage local state!

**The API of this libray is still in flux, for usage patterns check out the test suite, most importantly the `client` and `advanced` test suite**

## But why?
State management is a problem that nearly every application runs into at some point or another. Application state tends to be a cross of UI interactions and remote data states, this is typically solved by using libraries like [redux]() and [MobX](), but what if you could keep using GraphQL like you do for your remote data. What if you could merge the two together easily?

Now you can! Apollo State Link allows you to declare resolvers for Queries, Mutations, and types (Subscriptions coming) to augment your server schema or create an entirely local one!

## Installation

`npm install apollo-link-state --save`

## Usage
Apollo Link State is an easy way to manage local application state with GraphQL and Apollo. Setting up local state can be done like so:

```js
import { withClientState } from 'apollo-link-state';

const local = withClientState({
  Query: {
    // provide an initial state
    todos: () => [],
  },
  Mutation: {
    // update values in the store on mutations
    addTodo: (_, { message, title }, { cache }) => {
      const current = cache.readQuery({ query, variables });
      const data = {
        todos: current.todos.concat([
          { message, title, __typename: 'Todo' }
        ])
      };
      cache.writeQuery({ query, variables, data });
      return null;
    },
  },
});

// use the local link to create an Apollo Client instance

// usage with query
const query = gql`
  query todos {
    todos @client {
      message
      title
    }
  }
`
const initial = await client.query({ query });
// { data: { todos: [] } }

const mutation = gql`
  mutation addTodo($message: String, $title: String){
    addTodo(message: $message, title: $title) @client
  }
`

// add a todo
client.mutate({
  mutation,
  variables: {
    title: 'hello world',
    message: 'oh what a world this is'
  }
});

const initial = await client.query({ query });
/*
{
  data: {
    todos: [
      { title: 'hello world', message: 'oh what a world this is' }
    ]
  }
}
*/
```

###

repository: peggyrayzis/apollo-link-state

repo_name: peggyrayzis/apollo-link-state


text:
Hack Oregon Data API
# Permits Service

Using this API, you can query building permits in the City of Portland.

### Purpose:

### Usage:

### Methods:
- Get Building Permits - Query building permits in the City of Portland.

### API Reference:
Currently, we only have residential permit data for Portland. We hope to be able to offer commercial permit data soon. This means that when you want spatial data returned, you must always set the **option** parameter to 'residential'.

All parameters are passed in the URL query string and must be correctly URL encoded.
---

#### Method: Get Building Permits:
Returns: A table or GeoJSON feature collection of building permits that satisfy the query. Each permit is returned with a Point feature representing the location (in long/lat decimal degrees) of the corresponding parcel and the following attributes:
- id (unique record identifier)
- address (street address of the parcel)
- issuedate (date the permit was issued
- nbrhood (name of Portland neigborhood)
- value (value in dollars of the change)
- sqft (size in square feet of the change)
- units (number of units being changed)
Response type: use the following file extensions:
- .geojson - return result as a GeoJSON feature collection
- .json - return result as a JSON formatted table

HTTP method: GET
URL endpoint: /services/permits

Not all query types support both data formats.
Parameters:
- **type** (required):
   - specify which type of permits to include in the result.
   - valid format: 'residential'
   - example: `type=residential`
- **bounds** (optional):
   - bounding box of the query. Only permits that are located within this rectangle will be included in the result. The search bounding box is formatted as (x1, y1, x2, y2) in geographic coordinates (longitude, latitude). You should be able pass the output of Leaflet's  `Map.getBounds().toBBoxString()` method. Supply the coordinates as a clockwise oriented rectangle.
   - valid format: 2 comma delimited longitude & latitude pairs representing the lower left & upper right corners of the query rectangle: x1, y1, x2, y2
   - example: `bounds=-122.6,45.5,-122.58,45.51`
   - if not supplied, all permits will be returned. Be aware that this will return upwards of 7Mb of data to your application (which could make your application slow down a lot).
- **startdate** (optional):
   - the starting permit issue date. The result will only contain permits that were issued on or after this date (inclusive).
   - valid format: ISO formatted date (yyyy-mm-dd)
   - example: `startdate=2005-01-01` - return all permits issued on or after Jan 1st, 2005
- **enddate** (optional):
   - the ending permit issue date. The result will only contain permits that were issued on or before this date (inclusive).
   - valid format: ISO formatted date (yyyy-mm-dd)
   - example: `enddate=2005-06-01` - return all permits issued on or before Jun 1st, 2005
- **neighborhood** (optional):
   - a comma delimited list of neighborhoods. The result will contain permits located only in the specified neighborhood(s).
   - example: `neighborhood=richmond,overlook`
   - note: since this limits the spatial extent of the query, be careful when combining this option with the **bounds** option as a permit must be both within the bounds and in one of the specified neighborhoods to be in the result.
- **query** (optional):
   - this parameter is used to return the results of a pre-built query. This specifies the name of query to use.
   - valid formats:
      - 'perNeighborhoodPerYear': return a table of the number of permits grouped by neighborhood by year. You must use the .json file extension as the only currently supported resource this method returns is a JSON formatted table. The result is structured as an object containing a single list of 'rows' each of which is a 3 element array: [count, year, neighborhood-name]. No spatial data is returned with this query.
      - example: `/services/permits.json?&type=residential&query=perNeighborhoodPerYear`
---

### Data Sources:
Residential building permits: City of Portland...

### Appropriate Uses:

### Examples:
1. Return a GeoJSON feature collection of all the residential building permits in the specified bounding box that were issued after Jan 1st, 2015:
```
/services/permits.geojson?type=residential&bounds=-122.6,45.5,-122.58,45.51&startdate=2015-01-01
```
2. Return a GeoJSON feature collection of all residential permits in the Richmond & Sunnyside neighborhoods issues since Jan 1st, 2015:
```
/services/permits.geojson?type=residential&startdate=2015-01-01&neighborhood=richmond,sunnyside
```

###### Documentation ToDo:
- add more JS examples
- add specific leaflet examples?

repository: hackoregon/urbandev-backend

gha_language: Python

repo_name: hackoregon/urbandev-backend


text:
# Web Question Answering

This directory contains a collections of data and models for Web Question Answering.

- For data and models for paper "The Cascade Transformer: an Application for Efficient Answer Sentence Selection", see under [acl2020cascade](https://github.com/alexa/wqa-cascade-transformers/tree/master/acl2020cascade).
- For data for paper our multlingual generative paper, see under [arxiv2021mgqa](https://github.com/alexa/wqa-cascade-transformers/tree/master/arxiv2021mgqa).

## Contact

For help or issues, please submit a GitHub issue.

For direct communication, please contact Luca Soldaini (lssoldai at amazon dot com).


text:
---
layout: post
title: Goto considered harmful
date: 2015-02-23T00:30:11+01:00
---

Dijkstra wrote the [following](http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html). I agree with his reasoning.

However, goto is useful in certain lower level domains.

The difficulty of reading code with goto statements is that it's hard to follow the program flow.

The reasoning can also be applied to programming where you do not use goto.

Consider the following code:

	someMethod(){
		// some state
	  	label 1:
	  		doStuff();
			goto end;
	  	label 2:
		    if (condition){
		      	goto 1;
		    }else{
		    	doOtherStuff();
				goto end;
			}
	  	label 3:
		  	doSomeDifferentThings();
			goto end;
	...
		end:
	}

How do you emulate the above code in a language without goto? You could use a while and a switch.

	someMethod(){
		// some state
		going = true;

		while(going){
		  switch (goTo){
		  case 1: going=false;
		  	doStuff(); break
		  case 2: going=false;
		    if (condition){
		      	going=true; goTo=1;
		    }else{
		    	doOtherStuff();
			}
		    break;
		  case 3: goin =false;
		  	doSomeDifferentThings();
			break;
		...
		  }
		}
	}

How do you emulate the above goto in a language with objects but without switch?

	Object ThatDoesSomeThing{
		// some state
		public someMethod(){
			line_1();
			...
		}

		private line_1(){
			doStuff();
		}
		private line_2(){
		    if (condition){
		      	line_1();
		    }else{
		    	doOtherStuff();
			}
		}
		private l_3(){
			doSomeDifferentThings();
		}
		...
	}

From [stackoverflow](http://stackoverflow.com/questions/1487124/translate-goto-statements-to-if-switch-while-break-etc):

	public someMethod(){
		int goTo=0;
		while(true){
		  switch(goTo){
		  case 0:
		    doSomething();
		    goTo = 1;
		    continue;
		  case 1:
		    doSomethingElse();
		    goTo = 2;
		    continue;
		  case 2:
		    doSomethingDifferent();
		    goTo = 0;
		    continue;
		  default:
		    return;
		  }
		}
	}

This translates into:

	Object ThatDoesSomeThing{
		// some state
		public someMethod(){
			line_0();
		}

		private line_0(){
			doSomething();
			line_1();
		}
		private line_1(){
			doSomethingElse();
			line_2();
		}
		private line_2(){
		    doSomethingDifferent();
			line_1();
		}
	}

The main thing is the usage, not the keyword. Goto is an easy target because it's famous for being bad. This is cargo cult programming. It's easy to write an unreadable mess in many ways. In the above examples it might be due to the fact that it's difficult to follow how the state of the context will be for any line.

The important thing to ask yourself is why is some code harder to read? How do you write readable code? How do you write good texts?

gha_language: CSS

gha_license_id: MIT


text:
# CIE6020-DataCompression
Data Compression Project of CIE6020 Information Theory, 2019 Spring

---
## Instruction
You are given several files which are plain text encoded by ASCII. You are required to write computer programs to compress these files and write a report.
* Each compression program should be able to compress a file f to a compressed version f* and recover f from f*.
* Try each of the following algorithms:
  * Huffman coding for the alphabet of letters
  * Huffman coding for the alphabet of words
  * Lempel-Ziv coding (choose a version by yourself)
* Evaluate your compression ratio as size(f*) over size(f). For Huffman coding, f* should embed the dictionary.
* Compare your programs with common compressors in your computer, e.g., 7zip, RAR.
* Evaluate your program length.
* A bonus will be given if you can find a different algorithm do better than the above ones.
* Small recovery error is allowed, but should be evaluated in your report.
* You can write the program by any programming language, but you should not include any existing library/source of the data compression algorithms.

List of the files:

asyoulik.txt
Encoding: ANSI
Shakespeare
from The Canterbury Corpus,http://corpus.canterbury.ac.nz/descriptions/#calgary

alice29.txt
Encoding: ANSI
English text
from The Canterbury Corpus,http://corpus.canterbury.ac.nz/descriptions/#calgary

lcet10.txt
Encoding: ANSI
Technical writing
from The Canterbury Corpus,http://corpus.canterbury.ac.nz/descriptions/#calgary

plrabn12.txt
Encoding: ANSI
Poetry
from The Canterbury Corpus,http://corpus.canterbury.ac.nz/descriptions/#calgary

bible.txt
Encoding: ANSI
The King James version of the bible
from The Large Corpus, http://corpus.canterbury.ac.nz/descriptions/#calgary

world192.txt
Encoding: ANSI
The CIA world fact book
from The Large Corpus, http://corpus.canterbury.ac.nz/descriptions/#calgary

---

# Report of Data Compression Project

117010285 Chenhao WU

---

### 1 Methodology

#### I. Huffman Coding Based on Letters

***steps to encode***

1. Build a Huffman Tree by continuously scanning the text file. Collect a frequency table of each letter;

2. Traverse the Huffman Tree and assign code words to each node

  For an sample codebook in `bible.txt`:

| character | frequency | codeword |
| --------- | --------- | -------- |
| a         | f(a)      | 01110010 |
| b         | f(b)      | 01010101 |
| c         | f(c)      | 01011011 |
| ...       | ...       | ...      |

3. Output the compressed text according to the codebook;

#### II. Huffman Coding Based on Words

***steps to encode***

1. Transfer the text file to an array of word segments;

   `"In the beginning God created the heaven and the earth..." -> ["In", "\space", "the", ...]`

2. Collect a frequency table of each word;

   For an sample codebook in `bible.txt`:

   | word    | frequency  | codeword       |
   | ------- | ---------- | -------------- |
   | \space  | f(\space)  |<PHONE_NUMBER>0101 |
   | A       | f(A)       |<PHONE_NUMBER>0000 |
   | AA      | f(AA)      |<PHONE_NUMBER>0111 |
   | AAINDEX | f(AAINDEX) |<PHONE_NUMBER>1000 |
   | ABBEY   | f(ABBEY)   |<PHONE_NUMBER>1000 |
   | ABEDA   | f(ABEDA)   |<PHONE_NUMBER>0011 |
   | ...     | ...        | ...            |

3. Output the compressed text according to the codebook;

#### III. Lempel-Ziv Source Coding

***steps to encode***

Example: To encode a string `ABBABBBAAAABBABA`

| Numerical Position | Subsequence | Codeword |
| ------------------ | ----------- | -------- |
| 1                  | A           | 000 0    |
| 2                  | B           | 000 1    |
| 3                  | BA          | 010 0    |
| 4                  | BB          | 010 1    |
| 5                  | BAA         | 011 0    |
| 6                  | AA          | 001 0    |
| 7                  | BBA         | 100 0    |

We can obtain a codebook like above by performing Lempel-Ziv Algorithm, and then encode the source text to `00000001010001010110001010000100`

***steps to decode***

Since that the encoding method is algorithmically invertible, the program can perform corresponding inverse operations to decode the encoded message.

#### IV. Huffman Coding Based on Lexical Analysis

A revised version of Huffman Coding proposed in this project is to analysis the *statistical lexical characteristics* of source text before compression.

As what being discussed in Huffman Coding sections above, the traditional Huffman Coding methods treat the text as a sequence of individual units, which might be letter, word, dual-word, and so on, and assign the prefix code by respective frequency. By using Huffman Coding we can achieve the optimal code since `H(X) <= L(C) <= H(X) + 1` for corresponding distribution. For dual-letter groups in English language, however, if the first letter has been given, with high probability the set we choose the second letter is merely a subset of English Alphabet. For instance, if we have the first letter be *a*, then less-likely the second the letter is also an *a*, so does *k*, *z*,... At the same time, the probability of an *b*, *d*, *s*, *n*... might be higher since we have more words start or end with *ab* *ad*, *as*, *an*...

Based on this understanding, if the letter before is known, the uncertainty of next letter (entropy) will decrease, and therefore we can achieve a better Huffman Code since the entropy has decreased.

A sample code book of `bible.txt` should look like:

| Previous Letter | Consecutive Letter | Codeword |
| --------------- | ------------------ | -------- |
| a               | \space             | 11101    |
|                 | ,                  | 111111   |
|                 | t                  | 110      |
|                 | l                  | 101      |
|                 | ......             | ......   |
| b               | e                  | 00       |
|                 | l                  | 101      |
|                 | o                  | 100      |
|                 | .......            | ......   |

The expected code word length is much fewer than the Huffman Coding before. Notice that since the Huffman Tree is individual from letters to letters, which means the codeword of each *previous letter* is prefixed, but the primitive version of codebook does not guarantee the merged code is also prefixed, i.e. `c(a->b) + c(b->c) + ... + c(x_n->x) = c(a->k)` . Hence, before applying the codebook into compression, the program will examine and modify the conflicts of each codeword.

---

### Result

#### Huffman Coding Based on Letters

| File Name      | Original Size | Compressed Size (Include Dictionary) | Rate   |
| -------------- | ------------- | ------------------------------------ | ------ |
| `alice29.txt`  | 152.1 KB      | 43.8 KB                              | 28.80% |
| `asyoulik.txt` | 125.2 KB      | 37.8 KB                              | 30.19% |
| `bible.txt`    | 4.0 MB        | 1.1 MB                               | 27.5%  |
| `lcet10.txt`   | 426.8 KB      | 125.3 KB                             | 29.36% |
| `plrabn12.txt` | 481.9 KB      | 137.8 KB                             | 28.60% |
| `world192.txt` | 2.5 MB        | 778.7 KB                             | 30.42% |

#### Huffman Coding Based on Words

| File Name      | Original Size | Compressed Size  + Dictionary Size | Rate   |
| -------------- | ------------- | ---------------------------------- | ------ |
| `alice29.txt`  | 152.1 KB      | 5.162 KB + 28.411 KB (dict)        | 22.07% |
| `asyoulik.txt` | 125.2 KB      | 6.014 KB + 32.26 KB (dict)         | 30.57% |
| `bible.txt`    | 4.0 MB        | 58.416 KB + 124.60 KB (dict)       | 4.47%  |
| `lcet10.txt`   | 426.8 KB      | 12.256 KB + 65.11 KB (dict)        | 18.12% |
| `plrabn12.txt` | 481.9 KB      | 11.369 KB + 98.083 KB (dict)       | 22.71% |
| `world192.txt` | 2.5 MB        | 127.94 KB + 194.39 KB (dict)       | 12.59% |

#### Lempel-Ziv Source Coding

| File Name      | Original Size | Compressed Size | Rate   |
| -------------- | ------------- | --------------- | ------ |
| `alice29.txt`  | 152.1 KB      | 58.3 KB         | 38.33% |
| `asyoulik.txt` | 125.2 KB      | 51.1 KB         | 40.81% |
| `bible.txt`    | 4.0 MB        | 1.3 MB          | 32.5%  |
| `lcet10.txt`   | 426.8 KB      | 151.9 KB        | 35.59% |
| `plrabn12.txt` | 481.9 KB      | 177.6 KB        | 36.85% |
| `world192.txt` | 2.5 MB        | 868.6 KB        | 33.92% |

#### Huffman Coding Based on Lexical Analysis

| File Name      | Original Size | Compressed Size (Include Dictionary) | Rate   |
| -------------- | ------------- | ------------------------------------ | ------ |
| `alice29.txt`  | 152.1 KB      | 30.2 KB                              | 19.86% |
| `asyoulik.txt` | 125.2 KB      | 23.8 KB                              | 19.03% |
| `bible.txt`    | 4.0 MB        | 738.8 KB                             | 18.47% |
| `lcet10.txt`   | 426.8 KB      | 89.4 KB                              | 20.95% |
| `plrabn12.txt` | 481.9 KB      | 95.5 KB                              | 19.82% |
| `world192.txt` | 2.5 MB        | 552.6 KB                             | 18.25% |

#### Zip Software on Ubuntu

| File Name      | Original Size | Compressed Size | Rate   |
| -------------- | ------------- | --------------- | ------ |
| `alice29.txt`  | 152.1 KB      | 54.6 KB         | 35.90% |
| `asyoulik.txt` | 125.2 KB      | 49.1 KB         | 39.22% |
| `bible.txt`    | 4.0 MB        | 1.2 MB          | 30.00% |
| `lcet10.txt`   | 426.8 KB      | 145.1 KB        | 34.00% |
| `plrabn12.txt` | 481.9 KB      | 195.5 KB        | 40.57% |
| `world192.txt` | 2.5 MB        | 695.9 KB        | 27.18% |
---

### Discussion

In this data compression project we have wrote programs for each compression method, and then tested the performance by compressing text files. Included methods are *Huffman Coding on letter*, *Huffman Coding on word*, *LZ Coding*, *Huffman Coding on Lexical Anal*, and *System Compression Tool on Ubuntu*.

As shown above, we found that the performance of Huffman Coding on letter are approximately the same for the English language. Huffman Coding on words works slightly better than the former one, and achieved a significant better performance on text with small words set like `bible.txt` .

For Zip and LZ Coding, since they based on the same compression mechanism, the performance of them are very closed. For files with longer length, the lower compression rates can be achieved.

For Huffman Coding based on Lexical Analysis, it can *achieve an lowest average compression rate among these methods*, ranging from 18.25% - 20.95%. Since the key of codebook is based on letter-level lexical rules the dictionary size is also bounded within 5 KB - 10 KB.

---

### Notes

- Programming Language: C++
- Build Method: CMake
- Environment: Ubuntu 18.04
- Compiler Option: g++

- Total Program Size: 19.7 KB
- Encoding/Decoding mode specified by run-time arguments


text:
# Chef Cookbook DIY Github Action
### Workflow Details
[Chef](https://www.chef.io/) is widely used and most popular Infra as code technology in DevOps World..

This specific GitHub Action Workflow has been used for creating DIY deployment for Chef cookbooks.
The below mentioned Continuous Integration aspects are covered in the Workflow,
- It checks-out the code into Workspace
- Performs Cookbook Code Analysis using `cookstyle`
- Executes the cookbook in local mode (`chef-client - z` option)
- Executes the `rspec` unit test cases  (Chef cookbook **B**ehaviour **D**riven **D**evelopment)
- Packages the cookbooks using `Berkshelf` which uses `berksfile`
- Creates tar.gz archive of Cookbook packages
- In case of any workflow failures, it sends out email to respective developers and maintainers of the repository

Here is the link to [Github Action Workflow file](https://github.com/chefgs/dev_github_actions/blob/master/.github/workflows/cookbooks_ci_job.yml)

### Cookbook Details
Cookbook performs below tasks,
- Creates an user group called `chefusers`
- Creates an user called 'bob'
- Creates a directory `cheftest` in '/tmp'
- Creates a file `chef.txt` inside `cheftest` and assigns user 'bob' and group 'chefusers' to the file


text:
---
title: "Difference between Subject and BehaviorSubject in Angular"
date: "2022-01-18"
cover: ""
pageDescription: "In this article, I explain the difference between Subject and BehaviorSubject observables in Angular."
pageKeywords: "angular, subject, behaviorsubject, replaysubject, observables"
tags: ["angular"]
---

While working on an application yesterday, I struggled with observables and `Subject`s. After much research, it finally made sense.

In this article, I'll use a basic application to explain the difference between `Subject`s and `BehaviorSubject`s.

## TLDR:

With `Subject`s, you're saying, "Heyy producer... I'd love to subscribe for your future newsletters" but with `BehaviorSubject`s, you're saying, "Heyy producer... I'd love to subscribe to your future newsletters, but I'd still love to receive the last newsletter you sent"

With `Subject`s, you only receive the next values in the stream of values from the time of subscription. With `BehaviorSubject`s, you receive **the last value** as at the time of subscription as well as the next values in the stream.

If the TLDR is not enough, walk with me as I'll explain the difference in detail.

## Realizing that Subject was the solution to my problem

Early yesterday, I found myself repeating logic in an Angular application. It was a basic app, so I wasn't concerned until I wanted to "react to a change". At that point, I figured that since I'd like to react to it in a lot of places, I'd do so many more repetitions, and that would make the codebase unreadable. So I thought...Observables.

It was a hard search online learning how to create observables as I already knew how to subscribe to them. Until I found one way, and I implemented it. But I got stuck trying to add another data to the stream.

I did another search and discovered that subjects were what I needed. Long story short, I found myself debugging and debugging as I wasn't getting the data I subscribed to. Later on, I figured I was supposed to use `BehaviorSubject` and not `Subject` for my particular use case.

The TLDR section already concisely explains the difference, but I'll use an application to explain it more.

## Setting up the application

You can jump to the [using subjects section](#using-subjects) if you don't care about the application setup.

Ensure you have [Node.js](https://nodejs.org/en/) [Angular](https://angular.io/) installed globally on your system to follow along.

Set up a new project with the following command on your terminal:

"`bash
ng new subject-app

```

You can do without routing, and you can use any stylesheet of your choice. We won't be needing those.

Go into the project directory and start your application with the following command:

"`bash
cd subject-app
ng serve
```

## Creating a service for shared data

We'll use two files to understand the difference between `Subject`s and `BehaviorSubject`s--the `app.component.ts` (which already exists) and the `user.service.ts` (which we'll create).

To create that service file, go into your terminal and run the following command:

"`bash
ng g service user

````

`ng g service` is an angular command that generates a service file and a spec file for you. Using this, I have `/app/user.service.ts` to be:

```ts
import { Injectable } from "@angular/core"

@Injectable({
  providedIn: "root",
})
export class UserService {
  constructor() {}
}
````

So let's jump to the subjects now.

## Using subjects

This `user` service will have a `users$` observable, which the `app.component.ts` can be subscribed to. So let's update the users service to the following:

```ts
import { Injectable } from "@angular/core"
import { Subject } from "rxjs" // hightlight-line

// hightlight-start
const users = [
  {
    id: 1,
    name: "John Doe",
    username: "johndoe",
  },
  {
    id: 2,
    name: "Jane Doe",
    username: "janedoe",
  },
  {
    id: 3,
    name: "Janet Doe",
    username: "janetdoe",
  },
]
// hightlight-end

@Injectable({
  providedIn: "root",
})
export class UserService {
  users$ = new Subject<any>() // hightlight-line

  constructor() {
    this.users$.next(users) // hightlight-line
  }
}
```

From the above, we have the `users$` subject. And in the constructor, we add the users data to the observable stream.

Let's update `app.component.ts` to the following:

```ts
import { Component } from "@angular/core"
import { UserService } from "./user.service"

@Component({
  selector: "app-root",
  templateUrl: "./app.component.html",
  styleUrls: ["./app.component.scss"],
})
export class AppComponent {
  title = "subject-tutorial"
  users: any[] = [] // highlight-line

  // highlight-start
  constructor(private user: UserService) {
    console.log("Application constructor")
    this.user.users$.subscribe(users => {
      this.users = users
      console.log(users)
    })
  }
  // highlight-end
}
```

We access the `users$` observable from the constructor and subscribe to it. But let's see what happens in our console when we run the application:

![Showing the browser console](./showing-the-console.png)

From the image above, you'd notice that "Application constructor" is logged, but the callback function argument for the subscribe function is not evoked. That's because with `Subject`s, we're only subscribing to the next value in the stream. Not the last value. The previous value is the `users` array which was added to the stream after declaring the service (`private user: UserService`).

To get the next data in the stream, let's update our service with the following:

```ts
@Injectable({
  providedIn: "root",
})
export class UserService {
  users$ = new Subject<any>()

  constructor() {
    this.users$.next(users)
  }

  // hightlight-start
  updateUsers() {
    this.users$.next([users[0]])
  }
  // hightlight-end
}
```

We've added a method that allows us to manually add data to the stream (an array of the first object in the user's array). Let's call this method on `app.component.ts` using the following:

```ts
export class AppComponent {
  title = "subject-tutorial"
  users: any[] = []

  constructor(private user: UserService) {
    console.log(">>> Application constructor")
    this.user.users$.subscribe(users => {
      this.users = users
      console.log(users)
    })

    this.user.updateUsers() // hightlight-line
  }
}
```

From the above, after subscribing to the observable, we manually add the `next` data to the stream, and we can confirm from the image below that the subscription now gets new "newsletters":

![Showing the console with the next value](./showing-the-console-with-the-next-value.png)

Now, how does `BehaviorSubject`s come in? We don't have to "wait" for the next value with this type of subject. We can subscribe and also have access to the last value. Let's update the service to the following:

```ts
// previous imports
import { BehaviorSubject } from "rxjs" // hightlight-line

@Injectable({
  providedIn: "root",
})
export class UserService {
  users$ = new BehaviorSubject<any>(undefined) // hightlight-line

  constructor() {
    this.users$.next(users)
  }

  // updateUsers() {
  // this.users$.next([users[0]])
  // }
}
```

We've replaced `Subject` with `BehaviorSubject,` and we also passed a default value of `undefined` to the subject (because subscriptions would also have access to the "last" value).

And we update the `app.component.ts` to the following:

```ts
export class AppComponent {
  title = "subject-tutorial"
  users: any[] = []

  constructor(private user: UserService) {
    console.log(">>> Application constructor")
    this.user.users$.subscribe(users => {
      this.users = users
      console.log(users)
    })

    // don't need this anymore
    // this.user.updateUsers()
  }
}
```

And we'd have this in the console:

![Showing the console with the last value](./showing-the-console-with-the-last-value.png)

## Wrap up

I believe this clearly explains how these two types of Subjects work. There's also [`ReplaySubject`s](https://rxjs.dev/api/index/class/ReplaySubject), which are like `BehaviorSubject`s, but the key difference is, they have access to previous values. The keyword here is plural **values**. Behavior has access to the last value on subscription, while Replays has access to all previous values. Which means they could take two, three, or even more of the earlier values.

It just depends on what you're trying to subscribe to. If it's something where you need the last value in your subscription, then use `BehaviorSubject`. But if you're only concerned about future values, use `Subject`. I'm not sure about the disadvantages of using one over the other.

This is not a complete guide on the differences between these subjects. There's probably more to it, but this was what helped me yesterday, and I hope it clarifies things for you too.

gha_language: TypeScript


text:
---
layout: post
title: "Don 2"
description: "Having conquered the Asian underworld, Don (Shah Rukh Khan) now has his sights set on European domination. In his way are the bosses of the existing European underworld and all law enforcement agencies. The action shifts from Kuala Lumpur to Berlin as Don must avoid assassination or arrest, whichever comes first, in order for his plan to succeed..."
img: 1285241.jpg
kind: movie
genres: [Action,Crime,Thriller]
tags: Action Crime Thriller
year: 2011
imdb_rating: 7.1
votes: 48480
imdb_id: 1285241
netflix_id: 70224999
color: 2c6e49
---
Director: `Farhan Akhtar`

Cast: `Shah Rukh Khan` `Priyanka Chopra` `Boman Irani` `Lara Dutta` `Kunal Kapoor`

5 years ago, Don (Shahrukh Khan) succeeded in taking over the Asian underworld. He now wishes to take over the European underworld.  Later, Don returns to Malaysia and surrenders to Malik (Om Puri) and Roma (Priyanka Chopra). Don is sentenced to jail where he meets his old rival Vardhan (Boman Irani) whom he had put in jail 5 years ago. Don and Vardhan agree to work together in stealing money plates from Germany worth a fortune. They succeed in escaping jail and travel to Europe.  The gang manage to steal the plates from Germany. However, just as they do Don is betrayed.::Anonymous

repository: meparth/BongNetflix

repo_name: meparth/BongNetflix


text:
auraxis-governed
================

PlanetSide 2 command tool

http://auraxis-governed.herokuapp.com/

[![Build Status](https://travis-ci.org/samitheberber/auraxis-governed.png)](https://travis-ci.org/samitheberber/auraxis-governed)
[![Code Climate](https://codeclimate.com/github/samitheberber/auraxis-governed.png)](https://codeclimate.com/github/samitheberber/auraxis-governed)
[![Dependency Status](https://gemnasium.com/samitheberber/auraxis-governed.png)](https://gemnasium.com/samitheberber/auraxis-governed)
[![Coverage Status](https://coveralls.io/repos/samitheberber/auraxis-governed/badge.png)](https://coveralls.io/r/samitheberber/auraxis-governed)

repository: samitheberber/auraxis-governed

repo_name: samitheberber/auraxis-governed


text:
# Algo Builder DAO

A decentralized autonomous organization (DAO) is an entity with no central leadership. Decisions get made from the bottom-up, governed by a community organized around a specific set of rules enforced on a blockchain. DAOs are internet-native organizations collectively owned and managed by their members. They have built-in treasuries that are only accessible with the approval of their members. Decisions are made via proposals the group votes on during a specified period.

In this template, We are going to implement a DAO, where the members are defined by ASA holding (1 ASA = 1 voting power): each token holder is a DAO member and can participate equally in the governance.

Every DAO has the following parameters:

-  `deposit` — a deposit amount in `gov_tokens` required to make a proposal.

-  `min_support` — a minimum number of `yes` power votes (other votes like `abstain` and `no` are not counted) to validate the proposal.

-  `min_duration` — minimum voting time (in number of seconds) for a new proposal.

-  `max_duration` — maximum voting time (in number of seconds) for a new proposal.

-  `url` — a link with more information about the DAO. We don’t need a hash as this document is meant to evolve and provide more details together with the DAO evolution.

### Use Cases

We use functional notation to describe use cases we will implement.

-  `initialize(deposit_amount, min_support, min_duration, ..)` — Creates a DAO app and records all above parameters in it’s global state except the gov. Transaction composition:
	+ *tx0*: `deployer.deployApp` transaction with *appArgs:* [deposit, min_support, min_duration, max_duration, url].

-  `add_proposal(url: string, ..)` — Records proposal in lsig (local state). One lsig can have maximum one active proposal. If a proposal is not active any more we can reuse the lsig to record a new proposal. Transaction composition:
	+ *tx0*: Call to DAO App with *daoParams*.
	+ *tx1*: Deposit *gov_tokens* to *depositLsig*.

-  `deposit_vote_token(amount)` — User can only vote with the deposited tokens (to avoid double voting by sending tokens to someone else). User can vote with the “same” tokens for multiple proposals. Transaction composition:
	+ *tx0*: Call to DAO App with *appArg* == "deposit_vote_token".
	+ *tx1*: Deposit *gov_tokens* to *depositLsig* (each token == 1 vote).

-  `withdraw_vote_deposit(amount)` — This is used to unlock the deposit and withdraw tokens back to the user. To protect against double vote, user can only withdraw the deposit after the latest voting he participated in ended. Transaction composition:
	+ *tx0*: Call to DAO App with *appArg* == "withdraw_vote_deposit".
	+ *tx1*: Withdraw *gov_tokens* from *depositLsig* (ASA transfer).

-  `vote(proposalLsig, voteType)` — Records vote by voterAcc in proposal (vote can be one of `yes`, `no`, `abstain`).  Transaction composition:
	+ *tx0*: Call to DAO App with *appArg* == ["register_vote", *vote_type*]. `proposalLsig.address()` is passed as first external account.

	**Note1**: User can vote only once for a given proposal and he will vote with all tokens he deposited before casting the vote.
	**Note2**: User can only vote on 14 active proposals at a time.

-  `execute()` — Executes a proposal. NOTE: anyone is able to execute a proposal (this way we protect from a situation that a proposer will not be satisfied from the result and will not execute it). Transaction composition:
	+ *tx0*: Call to DAO App with *appArg* == "execute".
	+ *tx1*: As per proposal instructions (ALGO transfer/ASA transfer/none)

-  `clear_vote_record(proposal_lsig)` — Clears Sender local state by removing a record of vote cast from a not active proposal. Transaction composition:
	+ *tx0*: Call to DAO App with *appArg* == ["clear_vote_record"]. `proposalLsig.address()` is passed as first external account.

-  `clear_proposal()` — Clears proposal record and returns back the deposit. Sender must be an account with a recorded proposal. Transaction composition:
	+ *tx0*: Call to DAO App with *appArg* == "clear_proposal".
	+ *tx1*: Withdraw *gov_tokens* from *depositLsig* back to *proposalLsig* (ASA transfer).

## Spec document

Algo Builder DAO [specification](https://paper.dropbox.com/doc/Algo-Builder-DAO--BRlh~FwufNzIzk4wNUuAjLTuAg-ncLdytuFa7EJrRerIASSl).

## Deploy script

We created a deploy script in `scripts/deploy`, This script deploys initial Gov token, deploys DAO app, fund lsig's, saves deposit_lsig address to DAO app, and does initial distribution of ASA (Gov token).

## Scripts

Please read the spec document (linked above) for more details about each use case. The scripts provide only a sample code to show how to use the template. For you private needs, you will have to modify the scripts directory to adjust the parameters (eg voting time, execution time etc...) and the proposals.

To add proposal (`{voting_start, voting_end}` is set as `{now + 1min, now + 3min}`):

	yarn run algob run scripts/run/add_proposal.js

To deposit votes:

	yarn run algob run scripts/run/deposit_vote_token.js

To vote for a proposal (using deposited tokens):

	yarn run algob run scripts/run/vote.js

To execute a proposal (`execute_before` is set as 7min from the time of proposal creation):

	yarn run algob run scripts/run/vote.js

To withdraw deposited votes (withdrawn from depositLsig to voter account):

	yarn run algob run scripts/run/withdraw_vote_deposit.js

To clear vote record (from voter's account), fails if the proposal is still in progress:

	yarn run algob run scripts/run/clear_vote_record.js

To clear proposal record (from proposal_lsig as a sender), fails if the proposal is still in progress:

	yarn run algob run scripts/run/clear_proposal.js

repository: Standaa/algo-builder

repo_name: Standaa/algo-builder


text:
{
  "date" : "2021-08-04",
  "author" : {
    "display_name" : "Kashif Iqbal"
  },
  "draft" : "false",
  "toc" : true,
  "title" : "EDGE - Adobe Edge Project File",
  "description":"Learn about EDGE file format and APIs that can create and open EDGE files.",
  "linktitle" : "EDGE",
  "menu" : {
    "docs" : {
      "parent" : "web"
    }
  },
  "lastmod" : "2021-08-04"
}

## What is an EDGE file?

A file with .edge extension is Adobe Edge Project file that is created when a project is created and saved with Adobe Edge. Adobe Edge lets web designers to create interactive [HTML](/web/html/) animators for web, digital publishing, and rich media advertising for both desktop and mobile browsers. This is achieved using HTML/HTML5, [JavaScript](/web/js/), and [CSS3](/web/css/). Edge files are generated as plain text files and can be opened with several different applications such as Microsoft Notepad, Apple TextEdit, and Notepad++.

## EDGE File Format

EDGE files are saved in a plain text format and uses jQuery for enabling the animation. An alternative of EDGE animation was Flash files that are no more supported. EDGE file is saved alongside the HTML, JavaScript, and CSS files. Upon opening the EDGE file, the web page i.e. the HTML file is opened.

## References

* [Adobe Edge](https://www.adobe.com/sea/products/edge-animate.html)

gha_language: Mathematica


text:
## Direct Debit (SEPA)

For the payment upon direct debit (SEPA) _isaac10_ offers two different methods:

-   integration of Micropayment: `"payment_method": "elv_micropayment"`
-   creation of SEPA-XML files, which you can deposit yourself at the bank: `"payment_method": "elv_dtaus"`. This method is traditionally known as "garage clearing".

> Parameters for request body / params when Micropayment is used

> _(full request body / params depend on request)_

```json
{
  "payment_method": "elv_micropayment",
  "account_holder": "name of account holder",
  "iban": "the IBAN"
}
```

> Response values for payment data when Micropayment is used

> _(full response depends on request)_

```json
{
  "payment_data": {
    "payment_method": "elv_micropayment",
    "account_holder": "name of account holder",
    "iban": "the IBAN"
  }
}
```

> Parameters for request body / params when garage clearing is used

> _(full request body / params depend on request)_

```json
{
  "payment_method": "elv_dtaus",
  "addr_name": "name of account holder",
  "bank_iban": "the IBAN"
}
```

> Response values for payment data when garage clearing is used

> _(full response depends on request)_

```json
{
  "payment_data": {
    "payment_method": "elv_dtaus",
    "account_holder": "name of account holder",
    "iban": "the IBAN"
  }
}
```

### Params

Parameter | Description
----------|-------------
**account_holder** or **addr_name**  |

required

**iban** or **bank_iban** |

required

must be an existing IBAN

### Integration with JavaScript library

Account holder and IBAN can be called directly and be transferred to the respective JavaScript function. The transfer to Micropayment (elv_micropayment) will be made by _isaac10_ on the server side. Regarding SEPA-XML files (elv_dtaus), data will be stored by _isaac10_ itself.


text:
# Mirantis Container Cloud Lens Extension

![CI](https://github.com/Mirantis/lens-extension-cc/workflows/CI/badge.svg?branch=master&event=push)

This [Lens](https://k8slens.dev/) Extension adds a status bar item, and a menu item, that makes it easy to connect Lens to a Mirantis Container Cloud instance and add its clusters to Lens.

ℹ Requires Lens `>= 4.2.4`.

![Extension UI](./docs/screen-shot.png)

## 🚨 Version 2.x of this extension will be the last one to support basic authentication

As of the next major release of this extension (v3.0.0), basic auth (entering the username and password in the extension itself) will no longer be supported. Your instance will need to be configured to use Container Cloud's built-in Keycloak service for authentication and authorization.

> Keycloak-based authentication/authorization is much more secure than basic username/password authentication. Consider migrating your Container Cloud instance to it if you haven't already.

As there are major changes coming in Lens 5.0 as well, when we update this extension to drop basic auth, it will coincide with the Lens 5.0 release, and any prior versions of this extension will no longer work with Lens 5.0. You will need to install an older version of Lens in order to use an older version of this extension.

## Installing

Installation is very easy! Just make sure Lens 4.2.4 or later is running, and follow these simple steps:

1. Switch to the Extensions view (`CMD+SHIFT+E` on macOS).
2. Enter the name of this extension, `@mirantis/lens-extension-cc`, into the Install Extension box.
3. Click on the Install button.

![Extension UI](./docs/ext-install-by-name.png)

You should now be able to choose the new `File > Add Cloud Clusters` menu item, or click on the `Mirantis Container Cloud` status bar icon (far right side of the status bar at the bottom of the app), to get started.

> 💬 These instructions will help you install the extension for direct use with Lens. Follow the [development](#development) instructions below if you intend to work on the extension to improve it.

## Upgrading

To upgrade to a newer release, go to the Extensions view (`CMD+SHIFT+E` on macOS), [uninstall](#uninstalling) the extension, and then [re-install](#installing) it again.

## Uninstalling

Go to the Lens Extensions view (`CMD+SHIFT+E` on macOS) and click the Uninstall button next to this extension.

## SSO support

Mirantis Container Cloud instances that use third-party SSO authentication via __Keycloak__ are supported.

### Keycloak Configuration

Since the integration leverages the `lens://` URL protocol handling feature for extensions, __Lens 4.2__ (or later) is required, and the __Keycloak Client__ of the instance must be configured as follows:

-   Allow the following redirect URI: `lens://extensions/@mirantis/lens-extension-cc/oauth/code`

> 💡 Be sure to make these configuration adjustments __on every Keycloak Client__ (`kaas` for the management cluster, and `k8s` for child clusters, by default) that manages clusters you will want to add. The extension does not know ahead of time whether you have given it the appropriate access, and adding clusters without this configuration will result in an error.

> 💬 __Mirantis Container Cloud 2.9__ configures the above for you __automatically__ so you should not have to do this if you're using 2.9 or later.

### Authentication flow

The extension will automatically detect when an instance uses SSO (upon clicking the __Access__ button).

If that's the case, Lens will open the instance's SSO authorization page in the system's default browser.

Once authorized, Keycloak will redirect to the `lens://...` URL, triggering the browser to ask permission to open the Lens app to process the request (unless permission was granted previously with the _always allow_ check box for your SSO ID Provider, e.g. `accounts.google.com`):

![Lens protocol permission - always allow](docs/lens-protocol-permission.png)

> ⚠ Even if you check the "Always allow" box, your browser may still continue to show a popup message waiting for you to click on an "Open Lens.app" button. This is a built-in security feature. Please be on the look out for this popup in your browser whenever accessing your Container Cloud instance, or adding clusters to Lens.

Whether the permission was already given, or upon clicking __Open Lens.app__, Lens will receive focus again, and the extension will then read the list of namespaces and clusters as it normally would when using basic (username/password) authentication.

The temporary browser window used for SSO authorization will likely still be open, and should now be closed manually.

### Single cluster limitation

Due to technical issues with generating a unique kubeConfig per cluster, when the Container Cloud instance uses SSO authorization, cluster selection is __limited to a single cluster__:

![Single cluster SSO limitation](docs/sso-single-cluster-warning.png)

We hope to overcome this limitation in the future.

## Supported protocol requests

[Lens 4.2](https://medium.com/k8slens/lens-4-2-released-f1c3268d3f95) introduced a new __custom Lens protocol handler__. This means Lens can now respond to `lens://` URL requests made in the browser, and this extension can now support some interesting requests that enable tighter integration between Mirantis Container Cloud instances and Lens.

> Note that this integration is a one-way street: Container Cloud -> Lens. It does not work the other way around. _Reverse_ integration is achieved simply by making Container Cloud API requests from Lens, which is much easier to achieve, and has been used by this extension since its inception.

The __base URL__ for requests that this extension can respond to is:

```
lens://extensions/@mirantis/lens-extension-cc
```

The following APIs are currently supported by this extension, from the base URL above:

### Protocol - Activate cluster

Activates a cluster __already added__ to Lens.

```
GET /activateCluster
  ?cloudUrl={string}
  &namespace={string}
  &clusterName={string}
  &clusterId={string}
```

- `cloudUrl`: URL to the instance, e.g. `https://container-cloud.my-company.com`
- `namespace`: ID of the Container Cloud namespace containing the cluster to activate.
- `clusterName`: Name of the cluster to activate.
- `clusterId`: ID of the cluster (in `namespace`) to activate.

### Protocol - Add one cluster

Adds a __single__ cluster to Lens (if it hasn't already been added) by providing a pre-configured kubeConfig JSON object for the cluster. As such, this endpoint does not require the extension to perform any authentication/authorization requests. It simply stores the kubeConfig on disk and tells Lens where to find it.

```
GET /kubeConfig
  ?cloudUrl={string}
  &namespace={string}
  &clusterName={string}
  &clusterId={string}
  &kubeConfig={string}
```

- `cloudUrl`: URL to the instance, e.g. `https://container-cloud.my-company.com`
- `namespace`: ID of the Container Cloud namespace containing the cluster to activate.
- `clusterName`: Name of the cluster to activate.
- `clusterId`: ID of the cluster (in `namespace`) to activate.
- `kubeConfig`: JSON-stringified, Base64-encoded kubeConfig payload.

### Protocol - Add multiple clusters

Allows the user to add __one or more__ clusters to Lens by telling the extension where to find them. Unlike [adding one cluster](#add-one-cluster), it does not automatically add any clusters to Lens. It simply triggers the extension to immediately list all available clusters, and then lets the user choose which ones to add.

```
GET /addClusters
  ?cloudUrl={string}
  &username={string}
  &tokens={string}
  [ &keycloakLogin={boolean} ]
  [ &namespaces={string} ]
```

- `cloudUrl`: URL to the instance, e.g. `https://container-cloud.my-company.com`
- `username`: Username associated with the `tokens`.
- `tokens`: JSON-stringified, Base64-encoded OAuth2 tokens for the user.
- `keycloakLogin` (Optional): `false` (default) if the instance in `cloudUrl` uses basic (username/password) authentication; `true` if the instance in `cloudUrl` uses SSO authorization.
- `namespaces` (Optional): Comma-delimited list of namespace IDs to restrict the list of clusters presented by the extension (i.e. a filter on namespaces). Only clusters in these namespaces will be listed.

### Protocol - SSO OAuth Code

Allow the extension to use the system's default browser to broker an OAuth authorization code with a Keycloak client in a Container Cloud instance. This is used both for general access (to list clusters) as well as specific cluster access to generate kubeConfig files to add to Lens.

```
GET /oauth/code
  ?code={string}
  [ &state={string} ]
  [ &error={string} ]
  [ &error_description={string} ]
```

- `code`: Temporary authorization code to exchange for API tokens.
- `state` (Optional): Used to differentiate between requests for general access and specific access. The value is generated by the extension as part of the request and should come back as part of the response.
- `error` (Optional): OAuth error message, if an error occurs.
- `error_description` (Optional): OAuth error description, if an error occurs.

## FAQ

- Why are management clusters not selected by default?
    - The extension purposely doesn't not add management clusters to the default/initial set of selected clusters after retrieving clusters from a Mirantis Container Cloud instance because they are typically of less interest than workload clusters.
- I get an error, "Invalid redirect_uri", when I attempt to access or add my clusters.
    - Make sure you have properly [configured](#keycloak-configuration) all your Keycloak clients for use with the extension.
- Why can I only selected one cluster to add at a time?
    - See [Single cluster limitation](#single-cluster-limitation) when using SSO.
- I was able to add my cluster to Lens, but Lens fails to show it because of an authentication error.
    - Check if the cluster is only accessible over a private network (i.e. VPN) connection, and try opening it in Lens once connected to the network. Even though you can see the cluster in Container Cloud, as well as in the extension, accessing the cluster's details may still require a VPN connection in this case.

## Development

> __Yarn 1.x is required__

First, quit Lens if it's currently running.

Then, clone the repository wherever you prefer to have your code, and then link to it:

```bash
$ git clone https://github.com/Mirantis/lens-extension-cc.git /your/src/path
$ mkdir -p ~/.k8slens/extensions
$ ln -s /your/src/path ~/.k8slens/extensions/lens-extension-cc
$ cd /your/src/path
$ yarn       # install dependencies
$ yarn start # start dev build in watch mode
```

This will put the development build into watch mode.

Restart Lens and go to the Extensions View (`CMD+SHIFT+E` on macOS) to enable it, which will cause it to load for the first time.

Now, as you make source changes, the build will run, and all you need to do is __reload the Lens window__ (`CMD+R` on macOS) to see your changes.

You can also run a one-off development build with `yarn dev`.

> Note these steps will get much easier once [this Lens issue](https://github.com/lensapp/lens/issues/1741) is fixed.

### Dev - Uninstalling

Go to the Lens Extensions View (`CMD+SHIFT+E` on macOS) and use the UI to uninstall it.

This will simply remove the symlink [you created](#development) in `~/.k8slens/extensions` and leave your linked directory intact.

### Dev - Publishing

First, __update the CHANGELOG__:

- Make sure everything in __UNRELEASED__ is accurate
- Change `UNRELEASED -> vX.Y.Z` (version that will be published)

Then __use NPM__:

```bash
$ npm version <patch|minor|major>
$ npm publish --access public        # <- NOTE the '--access public' part!
$ git push && git push --tags
```

> By default, packages published to an NPM scope/org are __private__. Use the `--access public` option to publish it as a public package instead. You can also [configure NPM](https://docs.npmjs.com/configuring-your-npm-client-with-your-organization-settings#setting-package-visibility-to-public-for-a-single-package) to always publish that single package publicly by running `npm config set access public` within the repository root directory (i.e. package root).

The `prepublishOnly` script will automatically produce a production build in the `./dist` directory, which will be published.

repository: doytsujin/lens-extension-cc

repo_name: doytsujin/lens-extension-cc


text:
# idris-llvm

This is a LLVM backend for Idris.

## Installing

Idris-llvm uses llvm-hs to bind to LLVM, it requires that a recent LLVM (at the moment LLVM 4.0) is installed in a location that GHC knows about. Required C libraries are the Boehm GC (it could be called "libgc" or "gc") and GMP.

If the prerequisites are met `cabal install` should be sufficient to build and install idris-llvm.

## Usage

There needs to be a clang executable available to build the programs. gcc will not work as the input files to clang are LLVM files.

How to build an executable:
```
idris myprog.idr --codegen llvm -o myprog
```

repository: oberblastmeister/idris-llvm

repo_name: oberblastmeister/idris-llvm


text:
# Data Preprocessing

*This part of the repository is in C++, due to legacy issues. I intend to change it to python somewhere in the future, to simplify the project.*

The contents of this folder were created to convert the variable-length raw output data from the Wireless InSite simulator
(1 data entry per received ray, variable number of rays per position) into fixed-size data (the PDP for each BF, per receiver position).

## What is this parsing doing?

If you open the raw outputs from Wireless InSite, you'll see something like:
```
85 4
1 155.272 2.9115e-06 -197.45
2 52.8623 1.8076e-06 -205.537
3 -132.509 1.9267e-06 -212.885
4 59.7084 1.81392e-06 -217.744
86 4
1 -61.6042 2.91135e-06 -197.37
2 105.881 1.8082e-06 -205.538
3 14.7594 1.92537e-06 -213.009
4 -117.474 1.81451e-06 -217.765
87 3
1 11.2384 1.80882e-06 -205.537
2 84.6592 1.92404e-06 -213.131
3 -80.4554 1.81511e-06 -217.785
```

The file format is as follows:
1. There are two types of rows -- type 1, containing two integers, and type 2, containing an integer and three floating-point numbers;
2. Type 1 row values depict the antenna index (in this case, com 1 to 160801) and the number of simulated rays received by that antenna;
3. Each file in CIR_32 contains Type 1 rows sorted by antenna index;
4. When a type 1 row indicates N received simulated rays, it is immediately followed by N type 2 rows, each containing information for 1 received ray;
5. Type 2 row values depict the index of the received ray (from 1 to N) for the receiver in question, the phase of the signal in the ray (in degrees), the time from the start of the transmission (in seconds), and the ray's power (in dBm). Please keep in mind that all transmitter/receiver gain is applied after the ray-tracing simulations -- you can see them in the data processing scripts before training the ML model, in the code repository.

The parsing code in this folder converts this data into the PDP for each transmitted beamformning/receiver position combination, at a fixed sampling frequency. Because we have the phase of the received signal, constructive/destructive interference can be applied. The code has plenty of comments, please check it if you'd like to know the individual steps applied. To load this data, please check the loading script example in Python (which starts [here](https://github.com/gante/mmWave-localization-learning/blob/master/bff_positioning/data/data_preprocessing.py#L111))

The shared dataset file (`final_table`) already contains a preprocessed dataset, with a sampling frequency of 20 MHz.
This is the only parameter that can't be changed later on. If a different sampling frequency is desired, the instructions bellow must be followed.

## Running Sequence

- Download `CIR_32.zip` and unzip the `cir_\*.txt`;
- Edit the `SAMPLE_FREQ` in `general_includes.hpp` to the desired frequency;
- Edit `main.cpp` at line 111, with the dowloaded files location;
- Compile using the makefile and run. A new file should be present in the `\data_processed` folder (`final_table`).

repository: gante/mmWave-localization-learning

repo_name: gante/mmWave-localization-learning


text:
# bpqcrypto

## Test
```
python3 -m bpqcrypto.test
```

## Install

### Windows
```
pip3 install bpqcrypto-1.0.2-py3-none-win_amd64.whl
```

### Linux
```
pip3 install bpqcrypto-1.0.2-py3-none-linux_amd64.whl
```

repository: bitcoinpostquantum/bpqcrypto

repo_name: bitcoinpostquantum/bpqcrypto


text:
---
title: |
    118 Kind are the words that Jesus speaks - Hymns and Tunes 1876
metadata:
    description: |
        Hymns and Tunes 1876 118.  To cheer the drooping saint; My grace sufficient is for you, Though nature’s powers may faint.
    keywords:  |
        Hymns and Tunes 1876, adventhymnals, advent hymnals, Kind are the words that Jesus speaks, To cheer the drooping saint;,
    author: Brian Onang'o
---

#### Advent Hymnals
## 118. Kind are the words that Jesus speaks
####  Hymns and Tunes 1876

```txt
^Meter:^ ^CM^
1. Kind are the words that Jesus speaks
To cheer the drooping saint;
My grace sufficient is for you,
Though nature’s powers may faint.

2. My grace its glories shall display,
And make your griefs remove;
Your weakness shall the triumphs tell
Of boundless power and love.

3. O thou, my Saviour and my Lord,
’Tis good to trust thy name;
Thy power, thy faithfulness and love,
Will ever be the same.

4. Weak as I am, yet through thy grace
I all things can perform,
And, smiling, triumph in thy name
Amid the raging storm.
```

repository: GospelSounders/adventhymnals

repo_name: GospelSounders/adventhymnals


text:
# MMpy - Smart (utils) for your python life

Searching together util-level python implementations created in the past,
while repeadetly encountering the every same challenges and trying to not re-invent the wheel every time.

You might either directly take one of the `.py` files into your sources, or submodule it into your repo:
```
git submodule add git@github.com:daringer/mmpy_snips.git mmpy
```

## Overview table:
tbd once most are collected

repository: daringer/mmpy

repo_name: daringer/mmpy


text:
# Subprocess::Terminate method

Terminates the child process and all of its threads.

### Syntax

```
int Terminate(
  IN Integer ExitCode = 0
)
```

### Parameters

###### ExitCode

The exit code to be used by the process and threads terminated as a result of this call.

### Return value

If the method succeeds, the return value is nonzero.

If the method fails, the return value is zero. To get extended error information, check `A_LastError`.

### References

- [TerminateProcess function | Microsoft](https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-terminateprocess).

license: Unlicense

repository: fightsthumbs/Library-AutoHotkey

repo_name: fightsthumbs/Library-AutoHotkey


text:
---
title: Kleine Zinne, Yellow Edge (VI+)
date: 2010-8-5
blurb: with Jesse
category: climbing
layout: post
location: Drei Zinnen
guests: Jesse
---

* Kleine Zinne, "Yellow Edge" (VI+, 14 pitches)

We slept in the Trevisio Hut and hiked down in the morning. Suddenly it
was Thursday. We were running out of time! We wanted to do something "big,"
and finally a more stable weather pattern was supposed to arrive, or already
be here. We thought about a variety of objectives, but finally settled
on the Grosse Zinne (Cima Grande), via the Comici North Face. Friday would
be the best weather forecast so far. We drove north, having lunch along
the way somewhere. At Lake Misurina I grew so tired of driving (or being
in the car) that I had to get out and read a few hours. I'd passed up an
opportunity for gas in Cortina, and now realized I really needed it. We
had to drive up to Dobbiaco for a station, some water and another forecast
check. Eventually we were settled in the Rifugio Aronzo, all set to wake
up early and climb.

{% image /cmaimages/2010/approaching-the-big-wall_4812842318_o.jpg %}

In the morning everything went smoothly. We made the approach, and in
the last few minutes two parties came running up behind us. One of them
did another climb, but the other was pleased to set his foot at the base
of the route a few seconds before me, feeling that he'd "claimed his place."
Looking up, we saw the route was already crowded. This kind of sucked.
Rather mad, I soloed the first pitch (easy, loose terrain) and brought
Jesse up, ignoring this smug running fellow (turns out he's the "lead guide,"
Jesse saw his picture in the Aronzo hut). Later the running man threaded
his rope through another party on the second pitch, pulling on their rope
and tugging on the protection! (it was a nut that could easily fall out
with such activity).

{% image /cmaimages/2010/so-close-but-not-to-be_4812844804_o.jpg %}

Jesse and I sat at our place in line at the top of the first pitch, realizing
it would be at least 2 hours before we could move. Starting at pitch 3,
the route is grade VII- for many pitches. So it's a very slow single file
affair. There were even people hidden on a ledge above that we hadn't seen.
And we were the last in line. We waited about 45 minutes, then climbed
down, unwilling to sit there the whole morning.

Somewhat disgusted with the whole situation, and maybe ourselves for not
having foreseen this particular difficulty, we stomped away and formed
a new plan. I'd run back to the car and get the topo for "The Yellow Edge,"
then we'd climb that. I slipped twice on steep scree and cut my wrist enough
to cover my hand and helmet in blood. An alarmed Jesse gave me some tape
to wrap it up. No way I'm not climbing cuza that!

A strange fog rolled in, making my jog to the car and back monotonous.
We humped up to the base of the route, really happy to see that there was
only one party 3 pitches above.

{% image /cmaimages/2010/the-yellow-edge_4812252395_o.jpg %}

Jesse got the first pitch (30 m), rather intimidating for it's V+ or VI-
grade because the holds are small and polished. I continued for pitch 2,
a VI or VI- crack with a brief but exciting overhanging section. The main
problem there was feeling like your feet might blast off of a polished
slope like ice. I felt every microscopic movement and torqued hard on the
jams. Happily, polish doesn't disturb a good hand jam too much.

{% image /cmaimages/2010/michael-on-the-first-pitch_4812846970_o.jpg %}

{% image /cmaimages/2010/jesse-follows-pitch-2_4812223091_o.jpg %}

We were happy to be done with those pitches, often described as the real
crux despite some VI+ moves higher up that are without polish. Now we followed
four long pitches right of the crest, mostly on easy terrain with several
lines available. We slavishly followed our topo, not wanting to miss the
spot where we make a hard left traverse to reach the edge (doesn't make
sense to call it a ridge...it's totally vertical the whole way). This short
traverse was easy but thrillingly exposed. I led a very enjoyable face
climb (V+) past some pitons right on the edge to a nice stance below the
crux pitch.

{% image /cmaimages/2010/in-the-middle_4812224329_o.jpg %}

{% image /cmaimages/2010/michael-at-a-crest-belay_4812226535_o.jpg %}

I moved the belay from the one suggested on the topo so I could watch
Jesse climb the pitch. He did a great job, passing a lower VI- section
that had a short vertical wall but good hands in a crack. Then the real
meat of the pitch came, in an overhanging yellow corner with good handholds
but outrageous exposure (VI+). He beefed up the 3-piton belay with a cam
and a sling, understandably nervous hanging way out in space, nothing but
air around, and people with binoculars watching him from the Lavaredo Hut.
This was a joyous pitch to climb. It felt very well protected (if you trust
pitons :)), and the moves were athletic but secure. Between this and the
next pitch, another thrilling traverse followed by 20 meters of steep face
climbing (V+), this route became elevated to something mythic. Two more
pitches of incredibly exposed face climbing had us laughing and continuously
amazed at the greatness of this climb.

{% image /cmaimages/2010/jesse-finishing-crux-moves_4812853002_o.jpg %}

{% image /cmaimages/2010/the-overhang_4812231519_o.jpg %}

{% image /cmaimages/2010/jesse-on-the-yellow-edge_4812280957_o.jpg %}

{% image /cmaimages/2010/michael-rounds-a-corner_4812859188_o.jpg %}

{% image /cmaimages/2010/on-the-prow_4812237917_o.jpg %}

A final "ordinary" pitch, because it was somewhat sheltered from the exposure
we'd grown to love, and then we stood at the top of the "edge." I was so
impressed with the climb, I didn't even think about going on to the true
summit of the Kleine Zinne (not hard), only now I wish I had. But if there
is one climb to repeat in a lifetime, it's this one, for sure.

We scrambled ledges to a point above the notch between the Kleine and
Grosse Zinne. We made two double rope rappels then several single rope
rappels to reach the notch, then descended unpleasant hard, dirty snow
for quite a while. Eventually, very muddy and with frozen fingers (and
me with some blood from my wound), we escaped the gully and retrieved our
pack at the base of the climb.

We'd salvaged the day really well. Holy cow, that was fun!

{% image /cmaimages/2010/on-top-again_4812864780_o.jpg %}

{% image /cmaimages/2010/more-exposed-descent_4812241829_o.jpg %}

{% image /cmaimages/2010/long-way-down_4812868822_o.jpg %}

{% image /cmaimages/2010/michael-on-the-snow_4812871562_o.jpg %}

{% image /cmaimages/2010/lost-and-found_4812872812_o.jpg %}

Funny story with the photo above. We'd dropped this carabiner on pitch
10, and found it laying on the trail right below the wall. Woo hoo!  I think I'll climb you again in this life!

{% image /cmaimages/2010/home-for-dinner_4812874592_o.jpg %}

repository: ripsawridge/site

gha_language: JavaScript

repo_name: ripsawridge/site


text:
---
title: Color Theme Generator
page_title: Color Theme Generator
description: Color Theme Generator
slug: common-styling-color-theme-generator
tags: theme, color, generator
published: True
position: 7
---
# Color Theme Generator

The **Crystal**, **Fluent**, **Material**, **Office2016Touch**, **Office2016**, **Green**, **VisualStudio2013**, **Office2013**, **Windows8Touch** and **Windows8** themes are fully customizable using the available brushes to adjust each color.

For seamless color customization and faster palette creation that looks great and matches all controls, we created the **Color Theme Generator**.

## What is the Color Theme Generator?

The **Color Theme Generator** enables you to tweak theme colors and immediately see the results. The tool contains a few predefined palettes for each of the themes, making it easier to choose the right colors for your application.

It only takes a few simple steps:

* Change the color settings of brushes on the right
* Immediately see the effect on the left
* Go through all available controls from the tab on the right to see how each control looks
* When satisfied with the results, copy the code of the generated palette to the clipboard and simply paste it in your application.

You can always hit the reset button to start over.

The source code of the application can be found in the downloads section of your **Telerik** account.

>important You can check the **Color Theme Generator** application on the following page {% if site.site_name == 'Silverlight' %}[Silverlight Color Theme Generator](https://demos.telerik.com/silverlight/Themesgenerator){% endif %}{% if site.site_name == 'WPF' %}[WPF Color Theme Generator](https://demos.telerik.com/wpf/colorthemegenerator){% endif %}

gha_license_id: NOASSERTION


text:
# Contributing Guide

## Pull Request Guidelines

- Never push anything to `ot-builder` repository directly.
- Create your fork and make pull requests.
- Make sure `npm test` passes. We have automation to ensure all the tests passes.
- Make sure you have change files included. Create them with `npm run change`.
- If you are implementing a new feature (like supporting a new table), add unit tests.

## Development Environment Setup

* Make sure that you have a GitHub account.
* Install [Node.JS LTS 12](https://nodejs.org/en/) or newer.
* Install [Git](https://git-scm.com/).
* For code editing we like Visual Studio Code.
  * The following plugins are recommended:
    * [AutoLaunch](https://marketplace.visualstudio.com/items?itemName=philfontaine.autolaunch)
    * [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
    * [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
    * [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
    * [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)

## Verify Your Environment Works

* Run `node -v` to check your Node.JS version. It should be `12.x.x` or newer.
* Run `npm -v` to check your NPM version. If your version is below `5.x.x`, run `npm install -g<EMAIL_ADDRESS>(literal "x" characters here) to update it.
* Go to a folder and run `code .` to open the folder in VS Code. If you don't have VS Code in your path, you can open VS Code and press `F1` or `ctrl+shift+P` (`cmd+shift+P`), type `path`, and select the `Install 'code' command in PATH` option.
* Run `git --version` to make sure you have Git installed.

## Making Changes – Source

* Create a new branch to work with. Do not use `master`.

* Create an initial build:

  * `npm run init` to install the dependencies and set everything up.
  * `npm run build` to create the initial build.

* Make your changes:

  * Use `npm run watch` to start background building.
    * If you have Visual Studio Code and AutoLaunch plugin installed, it will run this at background so you could have automatic background building.
  * If you implemented a new feature (like supporting a new Table), add unit tests.
  * If you added a new package or changed the dependency, run `npm run rebuild` to create a new build.
    * Make sure that you terminated all `watch` background tasks (including Visual Studio Code session that has `npm run watch` running in background) before running it.

  * Run `npm test` to validate your change.

* Make a pull request:

  * Run `npm run change` to create change files. The change files will decide the version of next publish and create change logs automatically.
  * Run `npm run lint` to check your code style.
  * Send pull request to `ot-builder` repository.

## Project Structure

- **`.github`**: Configuration for GitHub automation.
- **`.vscode`**: Configuration for Visual Studio Code plugins.
- **`change`**: Collected change files. It will be cleared when a new version is published.
- **`doc`**: The documentations.
- **`packages`**: The source code packages.
  - Unit tests are also here, lies side-by-side with the source code. The unit tests are named in `*.test.ts` pattern and uses Jest to test them.
  - The `ft-*` packages defines the data type of OpenType structures, usually tables.
  - The `io-bin-*` packages defines the procedure of reading and writing OpenType binaries for the corresponded `ft-*` types.
  - The `test-util` package contains utility functions for writing unit tests, including functions to compare font data structures. Introduce it as a dev-dependency of the packages need it – usually font IO packages or font manipulation packages.
- **`scripts`**: The utility scripts used for building this repository.
- **`test-fonts`**: The fonts used for testing.

repository: ot-builder/monorepo

repo_name: ot-builder/monorepo


text:
---
layout: post
title: Understanding Elixir Types
author: Kiran
---

Before working on any programming language, you'll need to understand the basic types that it provides. Coming from the world of C++, Java and JavaScript, the basic types in Elixir are a bit strange and peculiar so here I would like to cover them in an easy to understand way for those who have a similar background.

## Value Types

### Atoms
Atoms are constants where their name is its own value and it is universally same on any Erlang runtime system (BEAM). Atoms in Elixir begins with a colon `:` and can be followed by a Atom word *(Sequence of letters, digits, _ and @ signs. It may end with an exclamation point or a question mark)* or an Elixir operator.

Atoms are similar to `Symbols` in other languages.

##### examples:
{% highlight elixir %}
:name
:address
:"func/3"
:"this is crazy name"
{% endhighlight %}

### Booleans
One has the standard `true` and `false` boolean datatypes to hold the value of conditional expressions.

##### Note:
`true` and `false` are atoms of the name `:true` and `:false` respectively.

### Integers
Integers in Elixir are arbitrary sized, implying it can grow till any size until the Erlang Virtual Machine runs out of memory. That makes it different from what integers or longs are from in the world of Java, JavaScript.

Integer literals can be written in decimal, hexadecimal, octal and binary formats using its respective convention and digits can be separated by _ for brevity just like in Java.

##### examples:
{% highlight elixir %}
5232
-223232
32487394872348973247823409324098230498309483204803248065765765765765767657
0xbadfec
0o17423
0b101010
{% endhighlight %}

### Floating point numbers
Floating-point numbers are written using a decimal point and there must be at least one digit after and before the decimal point.

Floats are IEEE754 double precision, giving them about 16 digits of accuracy and a maximum exponent of around 10^308.

This is equivalent of double in Java and floating point numbers in JavaScript easy to follow. But do not use them for currency related calculations due to the loss in accuracy.

### Ranges
Ranges are represented as `start..end`, where *start* and *end* can be values of any type.

##### Note:
However, if one wants to iterate over the values in a range, the two extremes must be integers.

##### examples:
{% highlight elixir %}
1..10
10..-10
-100..1000000
'a'..'z'
"a".."z"
{% endhighlight %}

## Other Types

### PIDs
A PID is a reference to a local or remote process. PID of the current process is available by calling the `self` function.

Processes are fundamental to large Elixir/Erlang applications and PIDs are references through which one process can communicate with another process via Message passing.

##### examples:
{% highlight elixir %}
#PID<0.59.0>
#PID<1.123.0>
{% endhighlight %}

## Collection Types
Elixir collections can hold values of any type, including other collections.

### Tuples
Tuple is an ordered collection of values. Once created, a tuple cannot be modified. A tuple is written as a series of values between braces, separated with commas.

##### examples:
{% highlight elixir %}
{1,2,3,4}
{1,4,9,16}
{:ok, "Hello"}
{:ok, false, {:ok, "Hi"}}
{% endhighlight %}

It is pretty common to return tuples from functions since they can be used in pattern matching in powerful ways, one of them being to return multiple values from a function.

### Lists
List is effectively a linked data structure and may either be empty or consist of a head and a tail list. Because of their implementation, lists are easy to traverse linearly, but they are expensive to access in random order.

Lists are also immutable in nature so any mutating action of list will return a new list.

##### examples:
{% highlight elixir %}
[1,2,3,4]
[1,4,9,16]
['h', 'e', 'l', 'l', 'o']
{% endhighlight %}

> TODO: Keyword Lists, Dicts, Maps, Binaries, Regular Expressions


text:
# IP-Info-Aggregator
Collection of IP recon sites presented in a single page

To use, append "?ip=X", where X is the public IP you want to investigate (ie. ipinfo.html?ip=<IP_ADDRESS>). To improve workflow, consider adding this file as an option to the Context Menu Search chrome extension (ie. file:///C:/Users/notmyrealusername/Desktop/ipinfo.html?ip=%s)

The variable "jiradomain" needs to be set to your specific Jira FQDN

A Chrome extension is available thaty allows Chrome to display iframes by dropping X-Frame-Options and Content-Security-Policy HTTP response headers (https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe?hl=en-US). As this opens some security concerns at the browser level, it is recommended to disable this extension when not necessary.

repository: ReaganShort/IP-Info-Aggregator

repo_name: ReaganShort/IP-Info-Aggregator


text:
## How to run codebase

### User Input for a, b, c, and n to solve their choice of matrix pertaining to this situation.
```
python main.py
```

### To run selected test cases (as requested by prompt)
```
python testing.py
```

All data will be available in /results

### To plot x versus u(x) for each algorithm
```
python plotting.py
```

All plots will be in /results/plots


text:
# TimezoneJS Testing

If you wish to test with TimezoneJS, you'll need to set a few things up first.  Create the lib
folder where you need to download date.js from the [TimezoneJS GitHub page](https://github.com/mde/timezone-js) and
jquery.js from the [jQuery Site](http://jquery.com).  The files are not included in this archive due to the
volatility of such libraries.

    mkdir lib

Then you'll need to put the timezone files (instructions on the TimezoneJS site) into the 'tz' folder.

    mkdir tz

That should be it.  Then you can run the 'jasmine:withTZ' test option.

repository: bfattori/js-date-fiddler

repo_name: bfattori/js-date-fiddler


text:
# :warning: Repository not maintained :warning:

Please note that this repository is currently archived, and is no longer being maintained.

- It may contain code, or reference dependencies, with known vulnerabilities
- It may contain out-dated advice, how-to's or other forms of documentation

The contents might still serve as a source of inspiration, but please review any contents before reusing elsewhere.
# special-source
A very, very special source for very generic use cases.

repository: dfds/special-source

gha_language: TSQL

repo_name: dfds/special-source


text:
# squidward
A research project at Lund University investigating IoT protocols and the energy cost of added security.
The protocols analyzed are CoAP and MQTT with and without (D)TLS, using both PSK and PKI.

Applications for different tests are located in the `src` folder.

# Set up

## Install ESP32 SDK
Follow the ESP32 "Get Started" guide and install IDF version 3.3.

Set the environment variable `SQUIDWARD_PATH` to point to the root folder of this repo.

## Install Patches
To support DTLS in the stable branch, some files need to be patched, as described next.

In the `$IDF_PATH/components/coap/libcoap` folder, checkout a newer version of the library by running

`git checkout 98954eb`.

In the `$IDF_PATH/components/coap/libcoap/ext/tinydtls` folder run

`git checkout 7f8c86e`.

Copy `patch/libcoap/coap_io.c` and replace `$IDF_PATH/components/coap/libcoap/src/coap_io.c`.

Copy all files and folders in `patch/coap` and replace the files in `$IDF_PATH/components/coap`.

Copy `patch/mbedtls/esp_timing.c` to `$IDF_PATH/components/mbedtls/port/`.

# Build
Running `make builds` in the top folder will generate all configured binary files.
To generate binaries for a specific application, run `make builds` inside an application folder in src.

repository: Noxet/squidward

repo_name: Noxet/squidward