text:
---

[Presentator](https://presentator.io) is design presentation and collaboration platform.

The project is organized in a monorepo and consists of several decoupled packages:

- [starter](https://github.com/presentator/presentator-starter)
- [api](https://github.com/presentator/presentator-api)
- [spa](https://github.com/presentator/presentator-spa)
- [js-client](https://github.com/presentator/presentator-js-client)
- [docker](https://github.com/presentator/presentator-docker)
- [xd](https://github.com/presentator/presentator-xd)
- [figma](https://github.com/presentator/presentator-figma)

## Installation

#### Production

For production environment it is recommended to follow the [starter package instructions](packages/starter).

#### Development

Creating a development environment with Docker is probably one of the easiest way to get started with the project.

> If you don't want to use the Docker dev setup, you can always follow each sub package instructions and install them manually.

1. Make sure that you have installed **[Docker](https://docs.docker.com/install/)** and **[Docker Compose](https://docs.docker.com/compose/install/)**.

2. Clone or download the Presentator repository and execute the following commands:

    ```bash
    # start the docker daemon service (if is not started already)
    sudo systemctl start docker

    # navigate to the project root dir
    cd /path/to/presentator

    # start all project containers in the background
    docker-compose up -d

    # initial api and spa setup (required only the first time you setup the application)
    ./compose/scripts/setup

    # start the application web interface
    ./compose/scripts/spa npm run serve
    ```

**That's it!** You should be able to access the following addresses in your browser:

- http://localhost:8080 - the application web interface
- http://localhost:8081 - the application API server
- http://localhost:8082 - Adminer (light and secure database management GUI tool)

The following helper docker scripts are available:

```bash
# take care for the first-time application setup
./compose/scripts/setup

# run api tests, eg. `./compose/scripts/codecept run`
./compose/scripts/codecept ...

# execute any command within the *api* container, eg. `./compose/scripts/api php yii migrate`
./compose/scripts/api ...

# execute any command within the *spa* container, eg. `./compose/scripts/spa npm run build`
./compose/scripts/spa ...

# execute any command within the *jsclient* container, eg. `./compose/scripts/jsclient npm install`
./compose/scripts/jsclient ...

```

To stop and shutdown every container just run `docker-compose down` while in the project root directory.

## Upgrade from v1

If you have previously installed Presentator v1, please follow the [upgrade instructions](UPGRADE.md).

## Contributing
[Presentator](https://presentator.io) is Open Source project licensed under the [BSD-3 License](LICENSE.md).

You could join our team and help us by:

- [Translate messages](https://www.transifex.com/presentatorio/web-platflorm)
- [Report issues and suggest new features](https://github.com/presentator/presentator/issues)
- [Fix bugs and send pull requests](https://github.com/presentator/presentator/pulls)
- [Donate a small amount via PayPal or Patreon](https://presentator.io/support-us)

repository: presentator/presentator

gha_language: PHP

repo_name: presentator/presentator


text:
+++
authors = []
categories = []
date = "2017-05-31T16:18:17-07:00"
description = "Interesting updates from the past month"
draft = true
socialsharing = false
tags = ["monthly-log"]
title = "May 2017"
aliases = ["/blog/monthly-2017-05/"]

+++

### Articles

- [‘I don’t know who I am without it’: the truth about long-term antidepressant use](https://www.theguardian.com/society/2017/may/06/dont-know-who-am-antidepressant-long-term-use) [The Guardian] -- "Prescriptions have doubled in a decade, but very little is known about the effect of taking SSRIs for years and years. Is it a lifesaver or a happiness trap?" To be fair, this MUST NOT be taken as a case against antidepressants, which are the difference between life and death for many people. What is worth though, is having a better understanding about cases where SSRIs can genuinely help (which I have seen IRL) and those where they just cause side-effects with little relief (which I have also seen IRL).

- [The Hamilton Hustle](https://thebaffler.com/salvos/hamilton-hustle-stoller) [The Baffler] -- I watched Hamilton, the musical this month. It's a terrific work of art, and worth watching at least once if you can make it. That said, I never went in expecting to see an accurate representation of history. Turns out that this is not the case for many people, and as I later learned, Alexander Hamilton's legacy is debated by several scholars. This isn't very personal for me, and I've looked for opinions critiquing the representation of Hamilton in the musical. This article is one of them.

- [The Stubborn Persistence of Confederate Monuments](https://www.theatlantic.com/politics/archive/2016/04/the-stubborn-persistence-of-confederate-monuments/479751/) [The Atlantic] -- Based on a new report by the Southern Poverty Law Center, some 1500 artefacts dedicated to Confederate legacy still exist in the US. This article briefly describes the history of some of the more notable ones, and argues why taking monuments down is not tantamount to "erasing history". Also related is [this NYT article](https://www.nytimes.com/2017/05/22/opinion/white-supremacist-confederate-monuments-nazi.html).

- [We Aren’t Built to Live in the Moment](https://www.nytimes.com/2017/05/19/opinion/sunday/why-the-future-is-always-on-your-mind.html) [The New York Times] -- Quoting "Our emotions are less reactions to the present than guides to future behavior. Therapists are exploring new ways to treat depression now that they see it as primarily not because of past traumas and present stresses but because of skewed visions of what lies ahead."

### Books

- [Proof](https://www.goodreads.com/book/show/150720.Proof) -- Well technically a play by David Auburn, it won the Pulitzer Prize for Drama back in 2001. We had to read it for acting class, and I'm going to perform a scene from it on the final day.

### Arts

I've significantly cut down on watching movies and TV, as I spend more time indulging in performing arts and theater.

- Hamilton Musical (San Francisco) -- Hamilton is the rage these days, and they're on tour in San Francisco. Don't ask how I obtained tickets or how much I had to pay, but I will admit that it was right up there among the best performances I've seen on stage. Highly recommended.

- Monsoon Wedding Musical (Berkeley) -- I loved the Monsoon Wedding movie when I watched it a few years ago. Some of the more serious themes (not giving any spoilers away) particularly stuck with me, and I obviously wanted to go see it when the musical debut was announced at the Berkeley Repertory Theater! What's more, it is directed by Mira Nair herself, and I was lucky to have tickets to opening night. I enjoyed it overall, especially individual performances, and even got to meet the actors (and Mira Nair!) after. While I thought that the overall thing still needed more polish (maybe I was unfairly comparing with Hamilton in my mind), I was happy nonetheless, particularly because I got to learn more about the acting careers of some of the actors. This is something I'm increasingly interested in, given my own interest.

### Movies and TV Shows

- [Dear White People](http://www.imdb.com/title/tt5707802/) -- I kind-of binge watched the TV show that's being talked about a lot. It was interesting because it talks about a lot of the modern American social themes around racism, sexism, etc. while also depicting the underlying conflicts that shape individuals who participate in activism around these issues. I've been told that the movie (of the same name) is better, so I'll have to watch that too.

### Travel

- Zion and Bryce Canyon National Parks, Utah -- Third new state in as many months! It had been a while since I saw remarkably beautiful landscapes like these.

### Music

- Masala Coffee's Malayalam rendition of the Tamil song Kaanthaa is an earworm.

{{< youtube B3hlqsBY0Qk >}}

<br>

### Miscellaneous

- As my acting class nears an end, I decided to sign up for the Intermediate Acting class that will take place at the Berkeley Repertory Theater over the summer.

- Among other personal updates, I now have bright red hair, and I'm quite excited about that.

- [WikiTribune](https://www.wikitribune.com/) is a new kind of news platform that is trying to recreate how news works. Through transparent funding and allowing common citizens to report news that is verified and fact-checked by professional journalists, it tries to bridge the gap between the proliferation of false news and the more traditional journalism done by media houses. I'm curious to see how this works out.

- [a16z AI Playbook](http://aiplaybook.a16z.com/) -- An introductory playbook to help beginners learn about AI.

repository: nishanttotla/hugo-blog-skeleton

branch_name: refs/heads/master

extension: md

gha_language: CSS

gha_license_id: NOASSERTION

license_type: permissive

repo_name: nishanttotla/hugo-blog-skeleton


text:
# Yabeda::Puma::Plugin

Built-in metrics for [Puma](https://github.com/puma/puma) web server monitoring out of the box! Part of the [yabeda](https://github.com/yabeda-rb/yabeda) suite.

## Metrics

Works as the Puma plugin and provides following metrics:
 - `puma_workers` - the number of running puma workers
 - `puma_booted_workers` - the number of booted puma workers
 - `puma_old_workers` - the number of old puma worker

Segmented by the worker (index of the worker):
 - `puma_pool_capacity` - the capacity of each worker: the number of requests that the server is capable of taking right now. More details are [here](https://github.com/puma/puma/blob/0f8b10737e36fc24cdd572f76a739659b5fad9cb/lib/puma/server.rb#L167).
 - `puma_running` - the number of running threads (spawned threads) for any puma worker
 - `puma_max_threads` - preconfigured maximum number of worker threads
 - `puma_backlog` - the number of backlog threads, the number of connections in that worker's "todo" set waiting for a worker thread.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'yabeda-puma-plugin'
```

And then execute:

    $ bundle

## Usage

Add those 2 lines of code to your `config/puma.rb` file:
```ruby
activate_control_app
plugin :yabeda
```
It will activate default puma control application working over the unix socket, and runs the `yabeda` puma plugin, for registering and collecting the metrics.

## Details

In accordance with the [architecture](https://github.com/puma/puma/blob/master/docs/architecture.md) of the puma web server lets look how it works:

![Yabeda::Puma get metrics from puma control app over the unix socket](docs/diagram.png).

For the configuration above, we will have the list of metrics (with help of `yabeda-prometheus` exporter):
```
GET /metrics

puma_backlog{index="0"} 0
puma_backlog{index="1"} 0
puma_running{index="0"} 5
puma_running{index="1"} 5
puma_pool_capacity{index="0"} 1
puma_pool_capacity{index="1"} 5
puma_max_threads{index="0"} 5
puma_max_threads{index="1"} 5
puma_workers 2
puma_booted_workers 2
puma_old_workers 0
```

See also the grafana screenshot of monitoring puma pool size and it's capacity when application is overloaded:

![Monitor puma metrics with grafana](docs/grafana.png).

## Roadmap (TODO or Help wanted)

- Collect also `control-gc` puma metrics

## Development with Docker

Get local development environment working and tests running is very easy with docker-compose:
```bash
docker-compose run app bundle
docker-compose run app bundle exec rspec
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yabeda-rb/yabeda-puma-plugin.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

license: MIT

repository: jwhitcraft/yabeda-puma-plugin

gha_license_id: MIT

repo_name: jwhitcraft/yabeda-puma-plugin


text:
# Advent of Code 2019 Solutions

## About
This is my repository for my solutions for the Advent of Code 2019 event.
Most solutions are written in Python 3 and will take in any problem inputs as a
file named `input.txt`. The main goal for these implementations are to solely
get an accurate output and not for brevity or elegance, so there may be a more optimal
solution than shown here. That being said, please feel free to leave a pull
request if my solutions could be improved.

Here is a [link](https://adventofcode.com/) to the Advent of Code site if you
want to try these coding problems out on your own.

## License
This project is licensed under the MIT License. More infomation can be found on
in the LICENSE text file in the root directory of this repository.


text:
## Week 4

### w4d1
+ **Assessment 6**
+ [Review][w4d1-lecture-notes]

[w4d1-lecture-notes]:./d1/lecture_notes.md

### w4d2
+ [Lecture Notes][w4d2-lecture-notes]
  + JavaScript Class
  + Creating New Classes
  + Creating Instance Variables
  + Creating Methods on Classes
  + [Prototype Modification](./d2/prototype-modification.md)
+ Problem Set
  + [Pokemon Project Part 1][pokemon_1]
  + [Pokemon Project Part 2][pokemon_2]
+ Introduce Additional Practice Problems
  + [Selected Project Euler Problems](../other/project_euler.md)
    + [Solutions](../solutions/w4/projectEuler)
  + [Free Coderbyte Problems](https://coderbyte.com/challenges/)
  + [ReactiveX](http://reactivex.io/learnrx/) (up to problem 20)
  + [Bonus Problems](../bonus_problems)

[w4d2-lecture-notes]:./d2/lecture_notes.md
[pokemon_1]:./d2/pokemon/pokemon.md
[pokemon_2]:./d2/pokemon/battle.md

### w4d3
+ [Lecture Notes][w4d3-lecture-notes]
  + Introduction To HTML
+ [Problem Set](./d3/problem_set.md)

[w4d3-lecture-notes]:./d3/lecture_notes.md

### w4d4
+ [What Makes A Strong Interview?](./d4/interview_prep.md)
+ [Lecture Notes][w4d4-lecture-notes]
  + Test-Driven Development
+ [Problem Set](./d4/problem_set)

[w4d4-lecture-notes]:./d4/lecture_notes.md

### w4d5
+ **Assessment 7**
+ [Review Problems][w4-review-problems]
+ What's Next? [Applying to Bootcamps](../other/whats_next.md)
+ :joy_cat: **Graduation** :joy_cat:

[w4-review-problems]:./d5/review.js


text:
# Config variables

## Initial setup

If you want to override the default values for some config options, then the
file available in this repo (etc/ovn_k8s.conf) must be copied to the following
locations:

- on Linux:
```
/etc/openvswitch/ovn_k8s.conf
```
The following command copies the config file if it is run from inside the repo:
```
cp etc/ovn_k8s.conf /etc/openvswitch/ovn_k8s.conf
```

- on Windows:
```
C:\etc\ovn_k8s.conf
```
The following PowerShell command copies the config file if is run from inside
the repo:
```
Copy-Item ".\etc\ovn_k8s.conf" -Destination (New-Item "C:\etc" -Type container -Force)
```

## Config values

The config file contains common configuration options shared between the various
ovn-kubernetes programs (ovnkube, ovn-k8s-cni-overlay, etc).  All configuration
file options can also be specified as command-line arguments which override
config file options; see the -help output of each program for more details.

### [default] section

The following config option represents the MTU value which should be used
for the overlay networks.
```
mtu=1400
```

The following option affects only the gateway nodes. This value is used to
track connections that are initiated from the pods so that the reverse
connections go back to the pods. This represents the conntrack zone used
for the conntrack flow rules.
```
conntrack-zone=64000
```

The following option only affects ovn-controller. This is the maximum number
of milliseconds of idle time on connection to the server before sending an
inactivity probe message.  As a client connects to the server over TCP, it
may take a while for the kernel to figure out if the connection is
broken.  But the client can overcome this by periodically sending probes over
the TCP connection to make sure that the connection is up.  On the flip side,
when there are hundreds of nodes, the server can get bogged down by client
probe messages.

The default value is set as 100000ms. But can be changed with this config
option

inactivity-probe=600000

### [logging] section

The following config values control what verbosity level logging is written at
and to what file (if any).
```
loglevel=5
logfile=/var/log/ovnkube.log
```

### [cni] section

The following config values are used for the CNI plugin.
```
conf-dir=/etc/cni/net.d
plugin=ovn-k8s-cni-overlay
```

### [kubernetes] section

Kubernetes API options are stored in the following section.
```
apiserver=https://<IP_ADDRESS>:6443
token=TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdC4gQ3JhcyBhdCB1bHRyaWNpZXMgZWxpdC4gVXQgc2l0IGFtZXQgdm9sdXRwYXQgbnVuYy4K
cacert=/etc/kubernetes/ca.crt
```

### [ovnnorth] section

This section contains the address and (if the 'ssl' method is used) certificates
needed to use the OVN northbound database API. Only the the ovn-kubernetes
master needs to specify the 'server' options.
```
address=ssl:<IP_ADDRESS>:6641
client-privkey=/path/to/private.key
client-cert=/path/to/client.crt
client-cacert=/path/to/client-ca.crt
server-privkey=/path/to/private.key
server-cert=/path/to/server.crt
server-cacert=/path/to/server-ca.crt
```

### [ovnsouth] section

This section contains the address and (if the 'ssl' method is used) certificates
needed to use the OVN southbound database API. Only the the ovn-kubernetes
master needs to specify the 'server' options.
```
address=ssl:<IP_ADDRESS>:6642
client-privkey=/path/to/private.key
client-cert=/path/to/client.crt
client-cacert=/path/to/client-ca.crt
server-privkey=/path/to/private.key
server-cert=/path/to/server.crt
server-cacert=/path/to/server-ca.crt
```

repository: ovn-org/ovn-kubernetes

gha_language: Go

repo_name: ovn-org/ovn-kubernetes


text:
Auto web-based graphical check access to network devices
=====================================
Exploiting Genie/pyATS, Flask and Diagrams to Validate/Monitor access to network devices

This use case aims to generates automatically the topology of the entreprise showing if there is an access to the network devices. It leverages the modules [Flask](https://flask.palletsprojects.com/en/2.0.x/) and [Diagrams](https://diagrams.mingrammer.com/) with [Genie/pyATS](https://pubhub.devnetcloud.com/media/genie-docs/docs/cookbooks/index.html) framework.

In summary, this project :
- Periodically attempt access to network devices

- Display the result as a topology with the result displayed below each device name : ___Access Ok___ or ___No Access___

# Important Remarks

1. Please run once the script graphical_check_access.py and please keep refresh priodically the web page of the project (http://<IP_ADDRESS>:5000 for this case).
The project generates for each refresh a new topology and then, a new state based on the access to the network devices. You can automate the refreshing process  by using either some extention such as [Tab Reloader](https://github.com/james-fray/tab-reloader/) or some python module such as [pyautogui](https://pyautogui.readthedocs.io/en/latest/) or [selenium](https://selenium-python.readthedocs.io/getting-started.html)
It is imortant to indicate the part of the script __graphical_check_access.py__ that makes the update in topology for each refresh:

```python
return render_template('index.html', result = Check_Access(testbed))
```
   with __Check_Access(testbed)__ is the function that ensures the access check to the devices throught their management interfaces

2. The image __Topology_Result.png__ containing the result rendening in the web page is overwritten for each refreshing of the web page. The topology is the same as that used in this demo as multi access topology. You can generate a topology according to yours but the goal here is to check access then it is
better to simulate any physical topology as logical multi access topology to avoid modification in the script and to simplify the analyse of result.

## White Paper
Please refer to these white papers:

[Getting started with pyATS](https://developer.cisco.com/docs/pyats-getting-started/)

[Getting started with pyATS Library Genie : Kickoff your Genie experience!](https://pubhub.devnetcloud.com/media/genie-docs/docs/cookbooks/index.html)

[Welcome to Flask’s documentation](https://flask.palletsprojects.com/en/2.0.x/)

[Diagrams - Diagram as Code](https://diagrams.mingrammer.com/)

Here a blog post from [Hank Preston](https://blogs.cisco.com/author/hankpreston) in case of using CML2: [How can I automate device configurations using CML2?](https://blogs.cisco.com/developer/363-askhankcml2-01)

## Related Sandbox

Cisco DevNet Sandbox [Cisco Modeling Labs](https://devnetsandbox.cisco.com/RM/Diagram/Index/45100600-b413-4471-b28e-b014eb824555?diagramType=Topology)

## Solutions on Ecosystem Exchange
How pyATS can be used as an end-to-end DevOps automation ecosystem: [Accelerating your DevOps with pyATS](https://developer.cisco.com/pyats/)

branch_name: refs/heads/main


text:
# LibAssetMap

[![Build status](https://ci.appveyor.com/api/projects/status/k227t4vg9ksici76?svg=true)](https://ci.appveyor.com/project/Olipro/libassetmap)

[**Documentation**](https://olipro.github.io/libassetmap)

LibAssetMap is a library designed to bundle together a hierarchy of files into a singular format. A CLI utility is provided which supports compression, decompression and printing information about an archive. All code is written in C++17.

At compile time, a numeric size must be selected for storing metadata used for seeking to offsets. This defaults to `uint32_t` but can be customised by passing `-DLIBARCHIVEMAP_SIZE_TYPE` to CMake. With the default, you are limited to a total archive size of `2^32` - if you intend to create archives larger than 4GB set it to something bigger. You can freely also drop this to something like `uint16_t` if your archives will be very small. This value is used in `MemOps.h`.

In any case however, exceeding the size type's maximum **will** cause unsigned integer overflow and break things.

Availability of the (officially optional) `uint_Xt` types in `<cstdint>` is assumed. If your platform lacks this, feel free to submit a patch.

Whilst it would be possible to compute perfect hashes of file paths, or potentially even compress file paths themselves, this currently does not happen - although it is planned as an optional feature.

## Overview

In simple terms: let's say you have a directory with a bunch of files in it. You'd like to compress them because either they contain lots of repetitive data which is slow to retrieve from disk or you want to save space. You additionally want the ability to load any file from your generated archive reasonably quickly - this is the tool for you.

## Features

Files are memory-mapped during compression and the archive file itself is memory mapped during decompression. Currently, only Windows and Linux are tested.

Only CityHash and zstd are implemented for hashing & (de)compression.

Once fully initialised, calls to retrieve a file from an archive can be executed concurrently across multiple threads; no form of locking exists and the library class instances must live at least as long as the threads retrieving data.

## Building

The project consists of a couple of git submodules. if your version of git doesn't automatically check them out: `git submodule init && git submodule update`

With the submodules checked out, building the source follows the standard CMake convention. The library is compiled to object files. For an example of how to use these, examine the `assetmapcli` target in `CMakeLists.txt` - you are of course free to compile the object target into a static or shared library via your own `add_library`. `assetmapcli` is also a good code example for how to use the library.

## Usage

`assetmapcli` can be called with `--help` for a list of options. Depending on your purpose, you can select various compression levels, compression strategies, dictionary sizes and bucket sizes.

Depending on filename strings, you can tune and/or experiment with the above parameters to obtain the values that work best for your situation.

There is absolutely no comprehensive verification of archive integrity; if you input a file that happens to have the byte `1` or `0` at the end, it **will** try to process it and result in Undefined Behaviour.

## Future Goals

* Implement logic to identify the ideal bucket size to obtain a particular average or maximum number of entries per bucket.
* Add tail trimming of the bucket table - empty bucket fields above the last used bucket are unnecessary.
* Support alternative hashing algorithms - this is relatively trivial as all you are required to do is implement an interface.
* Implement determining the ideal dictionary size. Currently, you can do this yourself manually through the CLI tool.
* Support perfect hashing. This would require a transformation step, filenames would be destroyed and replaced with a generated source file that symbolises the strings into constants. (e.g. "path/to/file" becomes something `constexpr auto PATH_TO_FILE = <bucket>` or an enum value - undecided; the principle remains the same.)
* Add hugepage support if Linux ever gets around to supporting it for files on common filesystems.
* Add a "fake" `IMemoryMapper` implementation which merely copies bytes from a file stream into memory for platforms which lack the capability to directly map files.

## Non-Goals

* Archive Integrity.
  * If you need to protect an archive from corruption, compute a digest and verify it before access or use a filesystem and/or transmission mechanism that guarantees this for you.
* Malicious Inputs.
  * If you can't trust the input data, compute a cryptographic hash and sign it or use a filesystem and/or transmission mechanism that guarantees this for you.
* Compatibility
  * Archives generated with (for example) `uint64_t` as the desired bucket count, bucket offset and element size are **not** compatible with other sizes. The CLI tool is no exception to this.
    * However, two binaries built with **identical** configuration and source code for **different** CPU architectures is expected to work with the exception of esoteric systems that do not read and write a single `uint8_t` in big-endian (e.g. the byte value 128 should be written as `10000000`)
  * The same will apply to changes in hash algorithm or compression. In short, readability of an archive is deliberately tied to the parameters chosen to compile the source code.
  * Future versions may change the layout significantly; if this occurs, as a trivial sanity mechanism, the final byte of the archive will never be `0` or `1` and older versions will refuse to read such archives.

## Dictionaries

Depending on your data, it may benefit from using a dictionary and then again, it may not. Dictionaries can be re-used after generation. It is recommended that your corpus of input files are related types. Consequently, if your project consists of many varied kinds of data, consider creating multiple different archives with different dictionaries.

If you have many files with fragments of data that is repeated across them rather than just within each individual file, a Dictionary will likely buy you decent savings.

A dictionary is always concatenated to the end of an archive after which a `lam_size_t` and a final `uint8_t` are then appended indicating the size of the dictionary and the flag (`1`) denoting its presence.

## Minutiae

* We assume that the required alignment of a `lam_size_t` is equal to its `sizeof()` - however, reads and writes are encoded as byte-level operations and left to the compiler to optimise if it can. For architectures that do not permit unaligned accesses, this will certainly result in byte-by-byte operations. In future, this can be hinted for optimisation more robustly via `std::assume_aligned` in C++20.
* We assume that Linux/Windows will align the start address of the archive to the size of a memory page (typically 4KB or more) and that consequently, a page is never smaller than `lam_size_t`.
* The `lam_size_t` for the dictionary (if present) may or may not be aligned depending on the size of the dictionary. The field is only read once to load the dictionary; loading the dictionary itself will take far longer than a single unaligned read.
* case-sensitivity of files is respected. Consequently, files with paths that differ only by case will not extract properly into a case-insensitive filesystem. Of course, the main use case is to decompress files directly from the archive into memory which makes the filesystem irrelevant.
* We verify at compile time that a `uint8_t` is an `unsigned char` - if your platform differs, you can remove the check and run the unit tests.
* A workaround is implemented for a deficiency in libstdc++'s std::reduce - namely, we use std::accumulate instead.

## Archive structure

See the comment in `include/DirectoryMetadata.h` for a description and overview of the internal layout.

repository: Olipro/libassetmap

repo_name: Olipro/libassetmap


text:
# Admin Overview

The admin module is meant to facilitate the rapid development of an end-user
administration site.  There are essentially two aspects provided by the module,
the template and the framework.

## Features
 - Template integration, courtesy of Colonel-Rosa
 - Resource handling
 - Access control
 - Automated differentiation between external requests (full layout)
		and internal requests (partial layout)

repository: simshaun/kohana-admin

repo_name: simshaun/kohana-admin


text:
---
title: "Dataset display"
description: "Relation between management bar and dataset visualization."
order: 17
---

### Description

A dataset display is the combination of a [management bar](../management-bar) with one or many data visualization types. The most common visualization types used are [table](../table), [list](../list-groups), and [card](../cards).

### Usage
This pattern is used when the elements of the visualization require colective management, therefore the management bar becomes important as it has to facilitate the tools needed to work with the data set.

### Empty state

It is important to let the user know what happends in empty states and let them know what has happend and how to perform actions to move out from that empty state.

In Lexicon we use our [emoticons library](https://github.com/marcoscv-work/liferay-emoticons) as a visual support together with a text message to help the user. It is very important that this message is clear and let the user understand what to do next.

![animations showing how initial empty state works](/images/lexicon-1/datasetDisplayEmptyExample.gif)

### Empty search state

As stated in the previous case, it is important to help the user understanding what happens in empty states. Here is the example for a empty search result.

![animations showing how an empty search works](/images/lexicon-1/datasetDisplayEmptySearch.gif)

### Invidual actions

Individual actions are all those actions that an element has. This actions are always possible to reach from the element it self throw the actions menu. Some of this actions are also placed in the management bar when only one element fromt the dataset is selected. These actions are always represented by a metaphor, , they are buttons with icon. Only those actions that can be easily represented by an icon will be there. Not all possible represented by an icon must be there, only the ones considered as more relevant.

![individual actions displayed both in management bar and from actions menu](/images/lexicon-1/datasetDisplayIndividualActions.png)

### Colective actions

Colective actions are shown in the management bar when more than one element is selected in the dataset. In case there are  colective actions that don't have an icon representation the can be placed in a dropdown triggered from the actions button.

![colective actions displayed both in management bar and from actions menu](/images/lexicon-1/datasetDisplayColectiveActions.png)

### Drag and drop example

The following animations shows how a drag and drop action works in a list view.

![table drag and drop example](/images/lexicon-1/tableDragDrop.gif)

gha_language: JavaScript


text:
# Rendering
-----------

## Views manage rendering

You can override the [`render`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/core/View.kt#L484)
method to draw a `View`'s contents to the screen. The framework calls this method whenever a View needs a visual update.

```kotlin
class RectView: View() {
    override fun render(canvas: Canvas) {
        canvas.rect(bounds.atOrigin, Blue.paint)
    }
}
```

This `RectView` draws a filled rectangle covering its bounds. The [`paint`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/drawing/ColorPaint.kt#L32)
extension on [`Color`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/drawing/Color.kt#L12)
creates a new [`ColorPaint`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/drawing/ColorPaint.kt#L5).

?> `render` is automatically called on `size` changes and `visible` changing to `true`

## Efficient Rendering

Doodle optimizes rendering to avoid re-applying operations when rendering the same content repeatedly. For example, the `Timer` app
below renders the epoch time every millisecond. However, Doodle only updates the changing regions in the DOM. The text in this case.

?> Doodle uses [Measured](https://nacular.github.io/measured/) for time, angles etc.

```kotlin
class Timer(display: Display, clock: Clock, scheduler: Scheduler): Application {
    init {
        display += view {
            size = Size(200)

            scheduler.every(1 * milliseconds) {
                rerender()
            }

            render = {
                rect(bounds.atOrigin, Stroke(Red))
                text("${clock.epoch}", color = Black)
                rect(bounds.at(y = 20.0), color = Green)
            }
        }
    }

    override fun shutdown() {}
}
```

```doodle
{
    "border": false,
    "height": "200px",
    "run"   : "DocApps.timer"
}
```
---
## Draw with Canvas

The `render` method provides a [`Canvas`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/drawing/Canvas.kt#L24)
onto which a `View` can draw. Canvas offers a rich set of operations for geometric shapes, paths, images, and text. It
also supports different [`Paint`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/drawing/Paint.kt#L4)
types (i.e. [`ColorPaint`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/drawing/ColorPaint.kt#L5),
[`LinearGradientPaint`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/drawing/LinearGradientPaint.kt#L31), and
[PatternPaint](rendering.md?id=pattern-paints)) for filling regions.

The Canvas provided to `render` has a coordinate system anchored to the View's origin, so `0,0` on the View and Canvas are the same point.
The Canvas itself extends in all directions beyond the bounds of the View; but the contents drawn to it will be clipped to the view's
bounds by default.

?> Sub-classes can disable clipping by setting [`clipCanvasToBounds`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/core/View.kt#L123)
to `false`.

### Canvas transforms

```kotlin
class MyView: View() {
    override fun render(canvas: Canvas) {
        canvas.flipHorizontally(around = width / 2) {
            text("hello", Origin, Black.paint)
        }
    }
}
```

Here, the view flips the Canvas horizontally around its mid-point and draws some text. You can apply any [`AffineTransform`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/drawing/AffineTransform.kt#L16)
to a Canvas; these can be nested as well.

### Pattern Paints

Sometimes you need to fill a region with a repeating pattern: often an image. Doodle has the [`PatternPaint`](https://github.com/nacular/doodle/blob/master/Core/src/commonMain/kotlin/io/nacular/doodle/drawing/PatternPaint.kt#L13) to make this easy.
This paint has a "render" body that provides a powerful and familiar way of creating repeating patterns.

You create this paint by specifying a `size` and a `paint` lambda, which has access to the full `Canvas` APIs.

**io.nacular.doodle.drawing.PatternPaint.kt**

```kotlin
fun stripedPaint(stripeWidth : Double,
                 evenRowColor: Color? = null,
                 oddRowColor : Color? = null,
                 transform   : AffineTransform = Identity) =
PatternPaint(Size(if (evenRowColor.visible || oddRowColor.visible) stripeWidth else 0.0, 2 * stripeWidth), transform) {
    evenRowColor?.paint?.let { rect(Rectangle(                  stripeWidth, stripeWidth), it) }
    oddRowColor?.paint?.let  { rect(Rectangle(0.0, stripeWidth, stripeWidth, stripeWidth), it) }
}
```

```kotlin
private inner class MyView: View() {
    val stripeWidth = 20.0
    var paintAngle by renderProperty(0 * degrees)

    override fun render(canvas: Canvas) {
        val paintCenter = Point(canvas.size.width / 2, canvas.size.height / 2)

        canvas.rect(bounds.atOrigin, stripedPaint(
                stripeWidth  = stripeWidth,
                evenRowColor = Red,
                oddRowColor  = White,
                transform    = Identity.rotate(around = paintCenter, by = paintAngle)
        ))
    }
}
```

```doodle
{
    "border": false,
    "height": "300px",
    "run"   : "DocApps.patternPaint"
}
```

This app shows how a `PatternPaint` can be transformed, like rotated around its center for example.

repository: wiltonlazary/doodle

repo_name: wiltonlazary/doodle


text:
Print a 2d array of characters in a spiral

describe what happens when you enter a url

Print out a spiral matrix;
Calculate the 90th percentile with lots of input;
Design a food delivery system (like door dash, grub hub, etc);
Design a java class ;
Given a list of to and from destinations, find the starting destination;

Describe how you are going to make the search results update while the user is typing

Make the element fall, and stop at the bottom of the window. Let the element bounce, then drag the element to let it fall and bounce. This had to be done completely in JavaScript. Make the animation in 30 minutes. Calculations with gravity, velocity and coordinates were required.

Here are 8 functions (some system functions and some to be coded on whiteboard) to make an elevator work. Make an elevator application in 30 minutes.

Questions tested variable scope, understanding of JavaScript functions and Currying (2 questions on currying functions).

Use module design pattern

home assignment it was to build a web snake game in 3 hours

the last part of the interview was to create 2 functions  , one to convert a number to a Romaine number and the other one is to convert from Romaine to numeric

repository: indefinitelee/Interview-Stuff

repo_name: indefinitelee/Interview-Stuff


text:
# IoT: Assessment 3: Frontend
[![license][license-badge]][LICENSE]

This is the frontend of the assessment 3 by ac867, mbla2 and ng341 for the module CO838 at the University of Kent (2017-2018)

Check the [Live Website here](http://iot.4rzael.com).

## :rocket: Getting started

In order to use the project, do the following steps:
1. Download the project
2. Make sure you have node.js (https://nodejs.org/en/) installed
3. Type `npm install` in the source folder where `package.json` is located
4. Type `npm run dev` to start the development server

## :cloud: Build Setup

### install dependencies
`npm install`
### serve at localhost:8000
`npm run dev`
### build for production with minification
`npm run build`
### deploy on the server (requires git push rights)
`npm run deploy`

[LICENSE]: ./LICENSE.md
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg


text:
## CDK Hello World S3

```
import * as cdk from '@aws-cdk/core';
import * as s3 from '@aws-cdk/aws-s3';

export class HelloCdkStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    // This creates the template that makes my bucket
    const bucket = new s3.Bucket(this, 'HelloWorldCDKFuntime');
  }
}
```

## Useful commands

 * `npm run build`   compile typescript to js
 * `npm run watch`   watch for changes and compile
 * `npm run test`    perform the jest unit tests
 * `cdk deploy`      deploy this stack to your default AWS account/region
 * `cdk diff`        compare deployed stack with current state
 * `cdk synth`       emits the synthesized CloudFormation template

### Watch Screencast

* [Watch on YouTube](https://www.youtube.com/watch?v=-AWZAAjtH9o)
* [Watch on O'Reilly](https://learning.oreilly.com/videos/hello-world-iac/10262021VIDEOPAIML/10262021VIDEOPAIML-c1_s0/)


text:
# Dev notes

## Playbook inventory

List of playbooks and their function, prior to Spring 2020 re-factoring. All playbook files have naming convention `playbk-*.yml`

build-otc-ws
- builds the otcetera webservices
- roles: fetch-and-install-restbed, fetch-otcetera-ws, configure-otcetera-ws, build-otcetera-ws

build-synth-pipeline
- gets everything ready to build synth tree (otcetera CLI, propinquity, inputs) but does not actually build synth tree
- roles: fetch-otcetera-cli, configure-otcetera-cli, build-otcetera-cli, fetch-peyotl-synth, fetch-monophyly-tests, fetch-propinquity, fetch-synth-inputs

install-web2py
 - downloads and installs web2py
 - role: unpack-web2py

install-webapp
  - installs the webapp (opentree browser & curator)
  - roles: refresh-opentree, restart-apache

put-server-in-maintenance-mode
 - single put-apache-into-maintenance-mode role to put server in maintenance mode

rebuild-otc-cli
 - builds the otcetera command line tools
 - roles: fetch-otcetera-cli, build-otcetera-cli

rebuild-synth-tree
 - builds a new version of the synthetic tree
 - role: build-synth-tree

rebuild-taxomachine-plugins
 - builds taxomachine plugins (including ot-base and jade)
 - role: build-taxomachine

refresh-synth-runtime
 - sets up everything to run synth (peyotl, propinquity, phylesystem, collections)
 - roles: fetch-peyotl-synth, fetch-monophyly-tests, fetch-propinquity, fetch-synth-inputs

serve-next-tree
 - copies synth tree and OTT to served location, launches ws_wrapper
 - roles: add-ots-ws-links-to-tree-and-taxonomy, launch-otc-ws-app

setup
 - installs os packages, creates opentree user, sets up python envs, creates directory structure
 - roles: users, init, cplusplusdev

take-server-out-of-maintenance-mode
 - takes server out of maintenance mode by writing the non-maintenance apache conf and restarting
 - identical to configure-apache playbook
 - role: configure-apache role

## Components

### Data

- synthetic tree :
  - built using otcetera + propinquity
  - source = flat files on files.opentreeoflife.org
  - served with otcetera

- studies (curated input phylogenies)
  - source = phylesystem repo on github
  - indexed / served by otindex (find methods) and phylesystem-api (get methods)

- amendments
  - source = github repo
  - served by phylesystem-api

- taxonomy (OTT)
  - build using reference-taxonomy
  - source = flat files on files.opentreeoflife.org
  - served by otcetera (taxonomy, TNRS), smasher (taxonomy browser)

- collections (lists of trees used as inputs for synthesis)
  - source = github repo
  - served by phylesystem-api

### APIs and web applications

- otcetera : (C++) serves synthetic tree, taxonomy, taxonomic name resolution
- otindex : (python Pyramid) serves indexed studies; has own ansible deployment
- phylesystem-api : (python Pyramid) serves studies and collections
- opentree : (python web2py) front-end tree browser and study curator
- ws_wrapper : (python Pyramid) routes api calls to correct place

## Hosts

**Named hosts**

Each of these accessible at `*.opentreeoflife.org`:

- tree / devtree = opentree
- api / devapi = ws_wrapper, otcetera; routes calls to other services
- phylesystemapi / devphylesystemapi = phylesystemapi
- otindex / devotindex = otindex
- nexttree = opentree, ws_wrapper, otcetera

**Host groups**

Production = tree + api + otindex + phylesystemapi
Development = devtree + devapi + devotindex + devphylesystemapi
Staging = nexttree (no curation; api and webapp on same server)

Development is where we test new software, and nexttree is production software but with new synthesis data (tree and underlying taxonomy)

## Actions

* build synthetic tree
* deploy synthetic tree
* deploy taxonomy

## Setting up a new AWS machine
Everything other than “tinytree:
Ubuntu
m4. Large
ADD 256 GB storage in AWS
Use OpenTree security group
EJM Used her personal keypair
Login.
Add Mark’s public key to authorized keys

To add swap (following BenRI) run:

sudo swapon --show
sudo fallocate -l 16G /mnt/16GB-manually-added.swap
sudo chmod 600 /mnt/16GB-manually-added.swap
sudo mkswap /mnt/16GB-manually-added.swap
sudo swapon /mnt/16GB-manually-added.swap
sudo swapon --show
sudo cp /etc/fstab /etc/fstab.bak
echo '/mnt/16GB-manually-added.swap none swap sw 0 0' | sudo tee -a /etc/fstab
Authkeys
Copy from admin@ot50.opentreeoflife.org:~/.ssh/authorized_keys  to get the latest and greatest public keys

Making deploy user:

login as admin

sudo apt-get update
sudo adduser deploy sudo
sudo passwd -d deploy
sudo visudo
    add
        deploy     ALL=(ALL) NOPASSWD:ALL

sudo su deploy
cd
mkdir .ssh
chmod 700 ~/.ssh
sudo cp /home/admin/authorized_keys ./.ssh
chmod 644 .ssh/authorized_keys

## Germinator notes

In install-otcetera script :

```
APPS=$HOME/Applications
mkdir -p $APPS

OPENTREE=$APPS/OpenTree
mkdir -p $OPENTREE

TAX_FILE=${TAX_URL##*/}
TAX_DIR=${TAX_FILE%.*}
OTT=$OPENTREE/$TAX_DIR
mkdir -p $OTT

SYNTHPARENT=$OPENTREE/synth-par
mkdir -p $SYNTHPARENT

mkdir -p $APPS/restbed
cd $APPS/restbed
git clone https://github.com/corvusoft/restbed.git

mkdir -p $APPS/otcetera
cd $APPS/otcetera
git clone --recursive https://github.com/OpenTreeOfLife/otcetera
```

peyotl cloned in in `$HOME/repo/peyotl/` and ws_wrapper in `$HOME/repo/ws_wrapper`

In install-web2py-apps script :

```
WEBAPP=opentree
APPROOT=repo/$WEBAPP
```

repository: OpenTreeOfLife/ot-ansible

gha_language: Python

repo_name: OpenTreeOfLife/ot-ansible


text:
# number-words

[![CI Status](https://github.com/andreruffert/number-words/workflows/CI/badge.svg)](https://github.com/andreruffert/number-words/actions?query=workflow%3ACI)
[![npm version](https://img.shields.io/npm/v/number-words.svg)](https://www.npmjs.com/package/number-words)
[![npm](https://img.shields.io/npm/dm/number-words?logo=npm)](https://www.npmjs.com/package/number-words)

> Convert a number into words

## Install

```
$ npm install --save number-words
```

## Usage

```js
const numberWords = require('number-words');

numberWords.convert(42);
//=> 'fourty two'

numberWords.convert(101);
//=> 'one hundred and one'

numberWords.convert(31.41);
//=> 'thirty one'
```

## API

### numberWords.convert(number)

#### number

Type `number`

Number to convert into words.

## License

MIT © [André Ruffert](http://andreruffert.com)

repository: andreruffert/number-words

repo_name: andreruffert/number-words


text:
---
layout: page
title: Getting Started
permalink: /doc/start/
menu: main
weight: 2
---

# Installing

The installation of the major Potassco tools is rather straightforward.
We suggest to start with downloading the most recent [clingo release](https://github.com/potassco/clingo/releases/).

# Learning

For experiencing ASP with [clingo](/clingo/),
we recommend to begin with the [Potassco guide](https://github.com/potassco/guide/releases/).
It contains a light introduction to the input language of clingo, provides easy modeling examples, and discusses its usage.

# Running

To get a quick first impression, you may want to experiment with [running clingo](/clingo/run/) in your browser.

# Doing

In ASP, a problem is described by a set of rules.
For example, the rule

    innocent(Suspect) :- motive(Suspect), not guilty(Suspect).

expresses that a `Suspect` is considered `innocent` *if* she has a `motive` *and* she was not found `guilty`.
The symbols `:-` and `,` stand for *if* and *and*.
The symbol `not` stands for (default) negation.
While `guilty`, `innocent`, and `motive` are user-defined predicates,
`Suspect` provides a user-defined variable that can be replaced by specific terms (representing objects).
Variables start with uppercase letters, predicates and terms (usually) begin with lowercase letters.
Finally, each rule must be terminated with a period `.` to signal the end of the rule.

Facts are rules without any conditions.
This is why the *if* symbol `:-` is omitted.
Example facts are

    motive(harry).
    motive(sally).
    guilty(harry).

Solutions to a problem, or simply answer sets, are given by sets of atomic propositions
that are supposed to be true in the answer set; false propositions are omitted.
A solution to the above rule and the three facts is the answer set
containing all three facts as well as the proposition `innocent(sally)`.
This is because our rule applies to `sally` but not `harry`.

Let us reproduce this result with clingo.
To begin with, we put the above rule along with the three facts in a file called [crime.lp](/files/crime.lp).
The extension `lp` is not necessary but helps to identify the type of file.

The ASP system clingo allows us to compute the aforementioned answer set:

    $ clingo files/crime.lp
    clingo version 4.5.0
    Reading from files/crime.lp
    Solving...
    Answer: 1
    motive(harry) motive(sally) guilty(harry) innocent(sally)
    SATISFIABLE

# Reading

A formal introduction to (a large fragment of) the input language of clingo
and its precise semantics can be found [here](http://www.cs.utexas.edu/users/vl/papers/AG.pdf).
You may also be interested in the [ASP-Core-2](https://www.mat.unical.it/aspcomp2013/files/ASP-CORE-2.03b.pdf) language standard,
a subset of the language of clingo.

The foundations and algorithms underlying the grounding and solving technology used in clingo
as well as various modeling techniques are described in detail in the [Potassco book](/book/).

Teaching material and links to further tutorials can be found in the [teaching](https://teaching.potassco.org) and [tutorials](/doc/tutorials/) sections;
similarly the [video](/doc/videos/) section may find your interest.

# Venturing

Our major tools are listed on the main [Potassco](/) page.
Follow their links for corresponding executables for Linux, MacOS, and Windows as well as sources.
And of course check the available [documentation](/doc/).

Still experimental software is found in the [Labs](/labs/) section,
and may need more care during installation.

# Despairing

If you have a question,
it is a good idea to try at first the [FAQ](/doc/faq/),
which answers the most commonly asked questions about our tools.
Your next best bet is to check the archive of the [potassco-users](https://sourceforge.net/p/potassco/mailman/potassco-users/) mailing list.
If you need further help,
feel free to sign up to the [potassco-users](https://lists.sourceforge.net/lists/listinfo/potassco-users/) mailing list and post your question.

Bug reports and feature requests can be posted in the issue tracker of a system's [github page](https://github.com/potassco/).

For gossip and release announcements,
you may want to follow us on [Twitter](https://twitter.com/potassco) or
the [potassco-announce](https://lists.sourceforge.net/lists/listinfo/potassco-announce) mailing list.

gha_language: HTML


text:
---
title: 'Awesome libs'
keywords:
    - libs
---

For more Awesome libs reference [sorrycc/awesome-f2e-libs](https://github.com/sorrycc/awesome-f2e-libs)

## Nodejs

-   [bcrypt](https://github.com/kelektiv/node.bcrypt.js) - A library to help you hash passwords.
-   [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) - An implementation of JSON Web Tokens.
-   [pm2](https://github.com/Unitech/pm2) - Node.js Production Process Manager with a built-in Load Balancer.

## Url

-   [qs](https://github.com/ljharb/qs) - A querystring parsing and stringifying library with some added security.
-   [Path-to-RegExp](https://github.com/pillarjs/path-to-regexp) - Turn a path string such as `/user/:name` into a regular expression.

## React

-   [usePortal](https://github.com/alex-cory/react-useportal)

## Tools

-   [GACP](https://github.com/vivaxy/gacp)

repository: jolylai/docs

repo_name: jolylai/docs


text:
# Search bar feature - lands
- responds to user input
- filters view of lands

# Data (state/props)
- Does this need state? Y
- Does it need props? Y
- Local or in store? Local
- state in LandsContainer; this.state.search

# Display (rendering / logic JSX)
- Input JSX
- Attributes (MVP): name= , value=, onChange=
- value={this.state.search}
- renderLands()

# Events (listeners / handlers)
- Listen to onChange={ handleChange() } on the <input/>
- When value of input changes, invoke a function - handleChange() - to update the {this.state.search}

# handleChange()
- update the state

# renderLands()
- create function - arrow/regular? arrow
- Why? need access to parent context to get local state; this.state
- access slice of store (state) from line 66 - this.props.lands
- this.props.lands is an array
- iterate through the array to return a new array - query
- see if the elements of this.props.lands includes the value that's in the input (this.state.search)
- if so, render the data
- pass data to props of Lands

* arrow functions to distinguish event handlers / callbacks
* regular functions - render

# Stretch
- render all lands if input is blank
- adjust function to respond to uppercase of lowercase
- respond to error
- implement Bootstrap for style

* turn into blog post

# Refactor
- local state - loading spinner - true
- 'hello'.includes('') /=> true
- test conditions
- filter rides by age/height

repository: cglorious/magic-mouse-frontend

repo_name: cglorious/magic-mouse-frontend


text:
# multi-user-blog
Multi User Blog Project for Udacity's Full Stack Nanodegree

Go to the live version of this project at: http://wishperblog.appspot.com/

To run this code, you must first have the [Google App Engine SDK for Python](https://cloud.google.com/appengine/downloads) installed.

After making sure you have app engine SDK installed. Follow these steps:
* Download or clone repository on your computer.
* Create a secret_code.py file with a string secret code defined like `secret="secret"`. Place this inside base directory.

You can run the code using GAE Launcher or IDE like PyCharm. In Pycharm to run the code set the config as follows:
* Set script as `/usr/local/google_appengine/dev_appserver.py` (path to app engine in your computer)
* Set parameter as `--automatic_restart=no --max_module_instances="default:1" .`

Alternatively you can run the code through the command line
provided you have GAE symlink installed.
  - Navigate to project directory
  - Run `dev_appserver.py ./`

repository: ashutoshpurushottam/wishper-blog

repo_name: ashutoshpurushottam/wishper-blog


text:
## 1 May 2019

### [1.0.0](https://github.com/contexttesting/types/compare/v0.0.0...v1.0.0)

- [feature] Add `TestSuite` and `Test` types.
- [doc] Document the API and give Context example.

### [0.0.0](https://github.com/contexttesting/types/compare/v0.0.0...v1.0.0)

- [package] Publish `v0.0.0` with types and externs.

## 26 October 2018

- Create `@zoroaster/types` with [_My New Package_](https://mnpjs.org)
- [repository]: `src`, `test`

repository: contexttesting/types

repo_name: contexttesting/types


text:
# Move Resource Viewer

Move Resource Viewer is a tool to query [LCS](https://github.com/librastartup/libra-canonical-serialization/blob/master/DOCUMENTATION.md) resources data from blockchain nodes storage (i.e. [dnode](http://github.com/dfinance/dnode) or [diem](https://github.com/diem/diem)) and represent them in JSON or human readable format.

## How does it works?

1. The viewer makes a request to the blockchain node by a sending specific query (address + resource type).
2. The viewer send another request to node and query resource type layout.
3. The viewer restores resources using response data and type layout.

## Installation

Requirements:
- [Rust][] toolchain, the easiest way to get it is to use [Rustup][].

Using cargo:

```bash
cargo install --git https://github.com/pontem-network/move-tools.git move-resource-viewer
```

[Rust]: https://www.rust-lang.org
[Rustup]: https://rustup.rs

### Build with optional features

- `json-schema` - add option to export json schema for output format
- `dfinance_address` - add option to support [DFinance][] node & address format
- `libra_address` - add option to support [Libra/Diem][] address format
- `ps_address` - add option to support Substrate node & [ss58][] address format

These three `.._address` options are mutually exclusive, so they conflicts with each other.

[DFinance]: https://github.com/dfinance
[Libra/Diem]: https://github.com/diem
[ss58]: "https://github.com/paritytech/substrate/wiki/External-Address-Format-(SS58)"

Add several features as list to the command line, like:
```bash
cargo install --git https://github.com/pontem-network/move-tools.git move-resource-viewer \
    --no-default-features \
    --features="json-schema, ps_address"
```

For example, to build Resource Viewer for Polkadot/Substrate use:
```bash
    --no-default-features --features="ps_address"
```

## Usage example

Query the user's ETH balance:

```bash
move-resource-viewer -a wallet1n9w22mvaq7uuswr4j53usd0spd2mznphq3q3zp \
                          -q "0x1::Account::Balance<0x1::ETH::T>" \
                          --api="https://rest.testnet.dfinance.co" \
                          -o=output.json
# optional block number:  --height 42

# Optionally add          --json-schema schema.json
# or just                 --json-schema -
# It exports schema for output format to specified file (schema.json)
# In case of `-` as path, it just prints schema to stdout.
```

### Input parameters

- `-a` / `--account` can be in Dfinance [bech32][] or hex `0x…{16-20 bytes}`, or Substrate's [ss58][] encoding formats
- `-q` / `--query` resource type-path, e.g.:
    - `0x1::Account::Balance<0x1::PONT::T>`
    - `0x1::Account::Balance<0x1::XFI::T>`
    - `0x1::Account::Balance<0x1::Coins::ETH>`
    - In general: `0xDEADBEEF::Module::Struct< 0xBADBEEF::Mod::Struct<...>, ... >`
    - Inner address can be omitted, it's inherited by parent:
	   `0xDEADBEEF::Module::Struct<Mod::Struct>` expands to `0xDEADBEEF::Module::Struct<0xDEADBEEF::Mod::Struct>`
    - Query can ends with index `[42]` for `vec`-resources
- Output options:
    - `-o` / `--output` fs-path to output file
    - `-j` / `--json` sets output format to json. Can be omitted if output file extension is `.json`, so then json format will be chosen automatically.
    - `--json-schema` additional json-schema export, fs-path to output schema file.

For more info check out `--help`.

[dnode]: https://github.com/dfinance/dnode
[bech32]: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki

### Substrate

Additionally if Resource Viewer was built with `ps_address` feature,
[ss58][]-addresses are acceptable for `--account` and `--query` parameters.

### Output

Two output formats supported:

- Move-like text
- JSON

_The structure of the output in JSON is described in the scheme, which can be obtained by calling with the `--json-schema` parameter._

#### Move-like example:

```rust
resource 00000000::Account::Balance<00000000::Coins::BTC> {
    coin: resource 00000000::Dfinance::T<00000000::Coins::BTC> {
        value:<PHONE_NUMBER>u128
    }
}
```

#### JSON example:

```json
{
  "is_resource": true,
  "type": {
    "address": "0000000000000000000000000000000000000001",
    "module": "Account",
    "name": "Balance",
    "type_params": [
      {
        "Struct": {
          "address": "0000000000000000000000000000000000000001",
          "module": "Coins",
          "name": "BTC",
          "type_params": []
        }
      }
    ]
  },
  "value": [
    {
      "id": "coin",
      "value": {
        "Struct": {
          "is_resource": true,
          "type": {
            "address": "0000000000000000000000000000000000000001",
            "module": "Dfinance",
            "name": "T",
            "type_params": [
              {
                "Struct": {
                  "address": "0000000000000000000000000000000000000001",
                  "module": "Coins",
                  "name": "BTC",
                  "type_params": []
                }
              }
            ]
          },
          "value": [
            {
              "id": "value",
              "value": {
                "U128":<PHONE_NUMBER>
              }
            }
          ]
        }
      }
    }
  ]
}
```


text:
Elrond

[Docs](https://valarauca.github.io/elrond/elrond/index.html)

---

### To use

Add this to your `Cargo.toml`

```
[dependencies]
elrond = "1.0.0"
```

---

### Code Example

```rust
extern crate elrond;
use elrond::prelude::*;

let mut v = Vec::with_capacity(4096);
let _ = my_file.read_to_end(v.as_mut_slice())?;
let elf = match elrond::parse_elf(v.as_slice()) {
	Ok(x) => x,
	Err(e) => panic!("Could not read elf file {:?}", e)
};

```

This crate is fairly feature complete and standard conformant.

It doesn't support all the GNU extensions which you'll likely encounter in a modern Linux or
OSX binary. But **MOST** of what you want is here.

Also the some standards documents disagree on if the `HiOS` and `LoOS` are an inclusive range,
or just markers. I'm just treating them as unique markers. Incorrect values are passed as `Unknown`

---

This is still a work in progress but a lot of progress has been made

repository: valarauca/elrond

repo_name: valarauca/elrond


text:
## 0.2.9 - Doc
- Update readme to follow vim-mode's rename from command-mode to normal-mode

## 0.2.8 - Don't use reference style link for atom.io?
## 0.2.7 - Still page didn't shown.
## 0.2.6 - Re-publish to fix atom.io web page issue.
## 0.2.5 - Add `activationCommands`.
## 0.2.4 - FIX
## 0.2.3 - FIX
- [FIX] Infinite loop when setting offset.

## 0.2.2 - NOPE
- Release simply because of atom.io link seem to dead.

## 0.2.1 - Breaking change
- [COSMETIC] repository link was broken

## 0.2.0 - Breaking change
- Rename variable name for consistencies
- Add offset configure option.
- User custom command no longer supported.

## 0.1.3 - Enhance
- Multiple scope argument to @gotoScope(), treated as 'OR' condition.

## 0.1.2 - Doc
- Revise doc

## 0.1.1 - Enhance
- now user can extend by adding custom goto command

## 0.1.0 - First Release


text:
# Liskov Substitution Principle (LSP) Example

### LSP is stating is that every subclass/derived class should be substitutable for their base/parent class.

### For this Example we'll be using Transportation Device as our class Model

### Expectation :
- Our subclass (Bicycle & Car) should substitutable for their parent class

### Wrong Example :
- Our subclass (Bicycle) extends TransportationDevice that has startEngine() which is not realistically capable to do that

### Correct Example :
- We create 2 parent class called VehicleWithoutEngine & VehicleWithEngine that extends TransportationDevice for Bicycle & Car class respectively

repository: rinoarmadiaz/MovieDB-VIPER-iOS

repo_name: rinoarmadiaz/MovieDB-VIPER-iOS


text:
---
layout: paper
title: "Automatically Discovering Mechanical Functions from Physical Behaviors Via Clustering"
year: "2021"
shortref: "Kevin Chiu, David Anderson, and Mark Fuge <i>ASME IDETC</i> 2021"
nickname: BehaviorClustering
journal: "IDETC"
volume:
issue:
pages:
authors: "Kevin Chiu, David Anderson, and Mark Fuge"
image: /assets/images/papers/2021-chiu-behavior-clustering.png
redirect_from:
fulltext:
pdf: /assets/pdfs/2021_Chiu_Anderson_Behavior_Clustering.pdf
pdflink:
github:
doi:
category: paper
published: true
tags: [curve]
---
{% include JB/setup %}

# Abstract

Computational design methods provide opportunities to discover novel and diverse designs that traditional optimization approaches cannot find or that use physical phenomena in ways that engineers have overlooked. However, existing methods require supervised objectives to search or optimize for explicit behaviors or functions — e.g., optimizing aerodynamic lift. In contrast, this paper unpacks what it means to discover interesting behaviors or functions we do not know about a priori using data from experiments or simulation in a fully unsupervised way. Doing so enables computers to invent or re-invent new or existing mechanical functions given only measurements of physical fields (e.g., pressure or electromagnetic fields) without directly specifying a set of objectives to optimize.

This paper explores this approach via two related parts. First, we study clustering algorithms that can detect novel device families from simulation data. Specifically, we contribute a modification to the Hierarchical Density-Based Spatial Clustering of Applications with Noise ("HDBSCAN") algorithm via the use of the silhouette score to reduce excessively granular clusters. Second, we study multiple ways by which we preprocess simulation data to increase its discriminatory power in the context of clustering device behavior. This leads to an insight regarding the important role that a design's representation has in compactly encoding its behavior.

We test our contributions via the task of discovering designs that function as fluidic logic gates. We generate synthetic data that mimics fluidic devices and show that our proposed contributions better discover logic gates, as measured by adjusted Rand score. Specifically, combining the Resolution Selection process and principal component analysis resulted in the highest and tightest spread of adjusted Rand scores on our tested datasets. This opens up new avenues of research wherein computers can automatically explore different types of physics and then derive new device functions, behaviors, and structures without the need for human labels or guidance.

# BibTeX Citation

```
@article{chiu2021BehaviorClustering,
  title={Automatically Discovering Mechanical Functions from Physical Behaviors Via Clustering},
  author={Chiu, Kevin and Anderson, David and Fuge, Mark},
  journal={ASME IDETC},
  year={2021}
}
```


text:
es-info
=======

[![.github/workflows/build.yml](https://github.com/eight04/es-info/actions/workflows/build.yml/badge.svg)](https://github.com/eight04/es-info/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/eight04/es-info/branch/master/graph/badge.svg)](https://codecov.io/gh/eight04/es-info)

Analyze ES module and extract information about imports, exports, and dynamic imports.

Usage
-----

```js
const {Parser} = require("acorn");
const {analyze} = require("es-info");

const code = `
import foo from "foo";
import {bar} from "bar";
import * as baz from "baz";

export default "bar";
export const boo = "boo";
export {bla} from "bla";

if (foo === "doSomething") {
  import("dynamic-imported")
    .then(module => module.doSomething());
}
`;
const ast = Parser.parse(code, {sourceType: "module", ecmaVersion: 2022});

const result = await analyze({ast, subtree: true});
```

Result:

```js
{
  import: {
    foo: {
      default: true,
      named: [],
      all: false,
      used: ["default"]
    },
    bar: {
      default: false,
      named: ["bar"],
      all: false,
      used: []
    },
    baz: {
      default: false,
      named: [],
      all: true,
      used: []
    },
    bla: {
      default: false,
      named: ["bla"],
      all: false,
      used: []
    }
  },
  export: {
    default: true,
    named: ["boo", "bla"],
    all: false
  },
  dynamicImport: ["dynamic-imported"]
}
```

API reference
-------------

This module exports following members.

* `analyze`: A function which can analyze an AST and extract imports, exports information.

### analyze

```ts
async analyze({
  ast,
  subtree?: boolean
}) => {
  import: {
    [importee]: {
      default: boolean,
      named: Array<string>,
      all: boolean,
      used: Array<string>
    }
  }
  export: {
    default: boolean,
    named: Array<string>,
    all: boolean
  },
  dynamicImport: Array<string>
}
```

#### options

* `ast` is an estree object.
* `subtree` - if `true`, the analyzer will analyze the entire tree, otherwise only those top-level nodes (import/export declarations) are analyzed. **You have to set `subtree` to `true` if you want to collect the usage of imported names and to collect dynamic imports**. Default: `false`.

#### result.import

* `result.import` is an `importee` -> `importInfo` object map.
* `result.import[importee].default` - if true then the default member is imported from the `importee` module.
* `result.import[importee].named` contains a list of imported names.
* `result.import[importee].all` - if true then all names are imported from the module i.e. `import * from ...`.
* `result.import[importee].used` is an array of imported names. If a name is included in this array, then it is referenced somewhere in the code. You can use this array to determine which names are actually used when `.all` is true.

  Note that `export {foo} from "bar"` doesn't *use* `foo`.

#### result.export

* `result.export.default` - if true then the module exports a default member.
* `result.export.named` is a list of exported names.
* `result.export.all` - if true then the module exports all members from another module e.g. `export * from "foo"`.

#### result.dynamicImport

* `dynamicImport` is a list of module ID which are imported with dynamic `import()` statement.

Changelog
---------

* 0.4.0 (Aug 8, 2022)

  - Bump dependencies.
  - **Change: `analyze` is now an async function.**
  - Fix: support `ImportExpression`.

* 0.3.0 (Jun 13, 2019)

  - **Breaking: the signature of `analyze()` is changed.**
  - Add: `subtree` option.

* 0.2.1 (Jun 6, 2019)

  - Fix: rename `.scope` to `._esInfoScope` to avoid the conflict.

* 0.2.0 (Jun 6, 2019)

  - **Breaking: drop `options.dynamicImport`. Now the module always analyze the entire tree.**
  - Add: `importInfo.used`. Use it to check which names are used.

* 0.1.1 (Apr 29, 2018)

  - Fix: ClassDeclaration.

* 0.1.0 (Apr 28, 2018)

  - Initial release.


text:
# d3-timeline

Simple d3v4 Timeline

![alt text][logo]

[logo]: https://github.com/pjbrof/d3-timeline/blob/master/img/d3-timeline.png "d3 Timeline Demo"

I built this timeline to display my work history which has been an overlapping mess making my resume dates look practically incomprehensible.

Check out these other great d3 timelines. Neither of these fit my immediate needs hopefully one of these three will suit yours. Happy coding! 😆

* [https://github.com/jiahuang/d3-timeline](https://github.com/jiahuang/d3-timeline)

* [https://github.com/commodityvectors/d3-timeline](https://github.com/commodityvectors/d3-timeline)

## Install

__npm__
```sh
$ npm install
```

## Run

__gulp__
```sh
$ gulp
```

## Usage

```html
<div class="d3timeline"></div>
```

Edit `history` with your own start date, end date, and color of the line (hex format), default is black \#000

`present` is reserved for ongoing dates.

```javascript
var timeline = {
	"timeline": "one",
	"children": [
		{
			"startDate": "2012-08",
			"endDate": "present",
			"color": "#000000"
		}
	]
};
```

External JSON and Excel support for using TSV or CSV coming soon.

## License
[MIT License](LICENSE)


text:
# listenR
Machine Listening Library for ecoacoustics by Dr.Offig

## Install
ListenR requires some external libraries to be present before installation.
- ffmpeg (http://ffmpeg.org). Actually only libavfilter is needed.
- ImageMagick++ (https://imagemagick.org)
- gdal (https://www.gdal.org)
- Proj.4 (http://download.osgeo.org/proj)

Once these external dependencies are installed then from an R console type
```code
> install.packages("devtools")
> devtools::install_github("dr-offig/listenR")
```

license: Unlicense

repository: dr-offig/listenR

repo_name: dr-offig/listenR


text:
# RK_SRC
Radio86RK Assembler sources

* analdiff.as_ - analityc differentiate a symbol formula
* autoload.as_ - write binary segment to tape with auto-run when loading
* calc.as_ - simple formula calculator
* decar.as_ - decimal arithmetics
* getchr.as_ - character input from keyboard - advanced version (more fast and pleasant than standard monitor's subroutine)
* header2.as_ - hear tone from phone line and check for busy status
* laded.as_ - editor for "ladder" game
* mltdiv.as_ - 8 or 32/16 bit division and 16x8 bit multiplication
* modtxt.as_ - don't know for what code modificator
* noise.as_ - white noise generator on Cowox (PA7-PA0 D14)
* organ.as_ - 3-voice electronic piano for VI53 (2 VI53 used - one for 3 tone channels and another for PWM channel's evenlopes)
* outstr.as_ - seems to be copy of modtxt.as_
* paint.as_ - flood fill algorithm for text areas
* play.as_, play3.as_, play31.as_ - various melodies for VI53
* ramtxt.as_ - ram test
* rised.as_ - maze editor (for what game?!)
* sc80titl.as_ - title page for SC80 editor
* scged.as_ - screen graphics editor (very simple)
* time.as_ - determine signal period
* title.as_ - seems to be copy of sc80titl.as_
* turtlegr.as_ - turtle grphics
* xonix.as_ - xonix game


text:
# NumberInput

## Description

A controlled input component for numbers with validation states.

## Installation

```
yarn add @commercetools-uikit/number-input
```

```
npm --save install @commercetools-uikit/number-input
```

Additionally install the peer dependencies (if not present)

```
yarn add react
```

```
npm --save install react
```

## Usage

```jsx
import NumberInput from '@commercetools-uikit/number-input';

const Example = () => (
  <NumberInput
    value="2.5"
    onChange={
      (/** event */) => {
        // alert(event.target.value)
      }
    }
  />
);

export default Example;
```

## Properties

| Props                  | Type                                                                                | Required | Default   | Description                                                                                |
| ---------------------- | ----------------------------------------------------------------------------------------------------------- | :------: | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                   | `string`                                                                                |          |           | Used as HTML id property. An id is auto-generated when it is not specified.                                                                     |
| `name`                 | `string`                                                                                |          |           | Used as HTML name of the input component. property                                                                                |
| `aria-invalid`         | `boolean`                                                                                |          |           | Indicate if the value entered in the input is invalid.                                                                                |
| `aria-errormessage`    | `string`                                                                                |          |           | HTML ID of an element containing an error message related to the input.                                                                         |
| `autoComplete`         | `string`                                                                                |          |           | Used as HTML `autocomplete` of the input component. property                                                                                |
| `placeholder`          | `string`                                                                                |          |           | Placeholder text for the input                                                                                |
| `value`                | `union`
Possible values:
`string , number`                                                          |    ✅    |           | Value of the input component.                                                                                |
| `min`                  | `number`                                                                                |          |           | Value is used as `min` property on input field                                                                                |
| `max`                  | `number`                                                                                |          |           | Value is used as `max` property on input field                                                                                |
| `step`                 | `union`
Possible values:
`number , 'any'`                                                           |          |           | Value is used as `step` property on input field

Use the value `any` for inputs which accept an unpredictable amount of decimals. |
| `onChange`             | `ChangeEventHandler`                                                                                |          |           | Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value.                       |
| `onBlur`               | `FocusEventHandler`                                                                                |          |           | Called when input is blurred                                                                                |
| `onFocus`              | `FocusEventHandler`                                                                                |          |           | Called when input is focused                                                                                |
| `isAutofocussed`       | `boolean`                                                                                |          |           | Focus the input on initial render                                                                                |
| `isDisabled`           | `boolean`                                                                                |          |           | Indicates that the input cannot be modified (e.g not authorized, or changes currently saving).                                                  |
| `isReadOnly`           | `boolean`                                                                                |          |           | Indicates that the field is displaying read-only content                                                                                |
| `hasError`             | `boolean`                                                                                |          |           | Indicates that input has errors                                                                                |
| `hasWarning`           | `boolean`                                                                                |          |           | Control to indicate on the input if there are selected values that are potentially invalid                                                      |
| `horizontalConstraint` | `union`
Possible values:
`, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` |          | `'scale'` | Horizontal size limit of the input fields.                                                                                |

## `onChange`

The `onChange` function is forwarded to `<input type="number" />` as-is. So the default behavior of a number-input applies:

The `onChange` function will be called with an event whose `event.target.value` holds an empty string in case the entered value can not be parsed as a number. Otherwise, `onChange` will be called with an event whose `event.target.value` is a string holding the provided number.

## Formik

If you pass `<NumberInput name="foo" onChange={formik.handleChange} />` then Formik will detect that the event stems from a numeric input and convert the value to a number before storing it in `formik.values.foo`. Formik will store an empty string in case the entered value is not a number. So the only types you have to handle are either an empty string or a valid number. Input like `10e2` will be converted to `1000` on `formik.values.foo`. This means that you can just use a number as the initial value of `NumberInput` as well, no need to convert the number to a string! However, you should still convert `undefined` to an empty string in cases where the inital value might be undefined. You can use `NumberInput.toFormValue()` for this.

If you use `<NumberInput name="foo" onChange={event => formik.setFieldValue('foo', event.target.value)} />` then Formik will not know that it is supposed to convert the value to a number, so a string will be stored on `formik.values.foo`. The string will be empty in case the input can not be parsed to a number, or it will be a string holding the valid number. Input like `10e2` will be be kept as `"10e2"` on `formik.values.foo`.

## Static methods

### `NumberInput.toFormValue`

Converts a number, or `undefined` value to a value the input can work with. It replaces non-numbers with an empty string to make sure the underlying input component never turns into an uncontrolled state.

```js
NumberInput.toFormValue(3); // -> 3
NumberInput.toFormValue('3'); // -> '3'
NumberInput.toFormValue(); // -> ''
NumberInput.toFormValue(undefined); // -> ''
```

### `NumberInput.isEmpty`

Returns `true` when `NumberInput` value passed to the function is empty.

```js
NumberInput.isEmpty(); // -> true
NumberInput.isEmpty(undefined); // -> true
NumberInput.isEmpty(NaN); // -> true
NumberInput.isEmpty(2); // -> false
NumberInput.isEmpty('2'); // -> false
```

### `NumberInput.hasFractionDigits`

```js
NumberInput.hasFractionDigits(); // -> throws
NumberInput.hasFractionDigits(2.2); // -> true
NumberInput.hasFractionDigits('2.2'); // -> true
NumberInput.hasFractionDigits('2'); // -> false
NumberInput.hasFractionDigits(2); // -> false
```

repository: commercetools/ui-kit

repo_name: commercetools/ui-kit


text:
##Converting markdown to html
https://crates.io/crates/hoedown

##Sanitizing html input from users
https://github.com/earthreader/rust-earth

#$Notes
*Window seperator will be based on the extension table
*Many to Many relation is based on the direct table
*All many to many has separate Windows, containing each others window instances
*Linker tables has no windows

##Indirect tables to indirect tables
How far down to the rabbit hole
* Most common table relation has 1 extension table and 1 many relation
* Do we include indirect relation from indirect relation

Notes:
* extension tables will be inlined with the main table.
has many will be inlined when there is only 1 in a table.
* multiple has many table will be listed as tabs with 1 default maybe opened. can be listed ordered by name alphabetically
server request round trips.
defaults will have to do a server round trip since it wouldnt know which record is opened.
* The record of the parent table will be used as filter for the records.
extension tables will be fecthed togehter with the main record since it is sure that there is only 1 extension record.
* If a table is a has many, does it make since to display its own windows, such case is, order_line, category

##Determine which table might contain which record

```sql
select tableoid, (select relname from pg_class where oid = system.record.tableoid) as class, * from system.record
where name like 'A%'
```

## heroku deployment
git clone https://github.com/emk/heroku-rust-cargo-hello.git
cd heroku-rust-cargo-hello
heroku create --buildpack https://github.com/emk/heroku-buildpack-rust.git
heroku login
git push heroku master

## Specify a buildpack for a rust project
$> heroku create --buildpack https://github.com/emk/heroku-buildpack-rust.git
created app calm-plains-3817
$> heroku git:remote -a calm-plains-3817
$> git remote show
heroku
origin
$>git remote show heroku
* remote heroku
  Fetch URL: https://git.heroku.com/calm-plains-3817.git
  Push  URL: https://git.heroku.com/calm-plains-3817.git

$heroku apps:rename iron-curtain --app calm-plains-3817
Renaming calm-plains-3817 to iron-curtain... done
https://iron-curtain.herokuapp.com/ | https://git.heroku.com/iron-curtain.git
Git remote heroku updated

git remote show heroku
* remote heroku
  Fetch URL: https://git.heroku.com/iron-curtain.git
  Push  URL: https://git.heroku.com/iron-curtain.git

## Run the project with loggin
reset && cargo build --release && reset && RUST_LOG=iron_curtain=debug cargo run --release

postgres://postgres:p0stgr3s@localhost:5432/bazaar_v7

repository: ivanceras/curtain

repo_name: ivanceras/curtain


text:
# BI Render Controls

The **org.santedb.bicore** package, when used together with the **org.santedb.uicore** package provide several controls for easily rendering BI reports.

## \<report> Directive

The report directive renders a complete report execution control. This control is a tabbed view where users can set parameters, switch views, and control the rendering of the report.

```markup
<report id="'org.myreport'" view="'chart'"
    parameters="{ 'from-date': '2019-01-01', 'to-date': '2020-01-01' }" />
```

## \<report-view> Directive

The report view directive is used when you want to control the rendering of a specific view and either want to specify your own hard-coded parameters, or feed the report values off of your own controls.

```markup
<report-view id="'org.myreport'" view="'myview'"
     parameters="{ 'from-date': '2019-01-01', 'to-date': '2020-01-01' }" />
```

repository: santedb/dev-doc

repo_name: santedb/dev-doc


text:
# Scala.js typings for rpi-ws281x-native

Typings are for version 1.0

## Library description:
(raspberry-pi *only*) native bindings to control a strip of WS281x-LEDs with node.js

|                    |                 |
| ------------------ | :-------------: |
| Full name          | rpi-ws281x-native |
| Keywords           | raspberry, raspberrypi, ws2811, ws2812, sk6812, led, hardware |
| # releases         | 8 |
| # dependents       | 0.0 |
| # downloads        |<PHONE_NUMBER>3333334 |
| # stars            | 205.0 |

## Links
- [Homepage](https://github.com/beyondscreen/node-rpi-ws281x-native)
- [Bugs](https://github.com/beyondscreen/node-rpi-ws281x-native/issues)
- [Repository](https://github.com/beyondscreen/node-rpi-ws281x-native)
- [Npm](https://www.npmjs.com/package/rpi-ws281x-native)

## Note
This library has been generated from typescript code from [DefinitelyTyped](https://definitelytyped.org).

Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped)

## Usage
See [the main readme](../../readme.md) for instructions.

repository: ScalablyTyped/Distribution

repo_name: ScalablyTyped/Distribution


text:
# Entity-Agnostic Representation Learning for Parameter-Efficient Knowledge Graph Embedding

```
@inproceedings{earl_aaai23,
title = {Entity-Agnostic Representation Learning for Parameter-Efficient Knowledge Graph Embedding},
author = {Chen, Mingyang and Zhang, Wen and Yao, Zhen and Zhu, Yushan and Gao, Yang and Z. Pan, Jeff and Chen, Huajun},
booktitle = {Proceedings of the Thirty-Seventh Conference on Association for the Advancement of Artificial Intelligence (AAAI)},
pages = {4182--4190},
year = {2023}
}
```

links
- [aaai](https://ojs.aaai.org/index.php/AAAI/article/view/25535)
- [arxiv](https://arxiv.org/abs/2302.01849)

gha_language: Jupyter Notebook


text:
---
layout: post
title: Knowing the  questions
subhead: it's impossible to have all the web–dev answers
permalink: /blog/knowing-the-questions/
---

It's never been a more exciting time to be working in web design and development. Web standards support is a dream compared to where we were just 3 years ago,  mobile and ‘always–on’ connectivity is almost ubiquitous and the tools — the software and libraries and frameworks that help us build exciting products  — are numerous and very often given freely.

## A nice problem to have

But whilst the tools and all the information available are what make modern web development interesting, its also one of the issues I struggle with most. What should I read next? what should I try to learn? — there is always something new. Whether you are a specialist or generalist (a brick or the mortar), for people working on the web it's vital to keep up with new developments. Most developers I know have a running ‘to read’ list that gets longer daily — most also accept the fact that some things will just never get read.

If you work in small team, it's likely you'll wear many hats and have multiple areas of responsibility. When faced with the plethora of new information to keep up with, it's tempting and only natural to focus on the areas that are most likely to have an immediate use in your daily work — it makes that reading list seem a little bit more manageable. From time to time though, it can be beneficial to read about a subject that seems only tangentially related to your core role. It will round out your knowledge,   and maybe when a related issue crops up in 6 or 16 or 36 months time, you'll know enough about the topic to understand the questions that need to be asked.

…it's beneficial to read about a subject only tangentially related to your core role…you'll know enough to understand the questions that need to be asked.
me

### A simple example
An example that springs to my mind is GZIP. At some point in the past I read a little about how GZIP works. Not that compression algorithms are a particular area of interest, but I read enough to get an understanding of the way it references repeating strings. I didn't think much more about it at the time, but gradually realised this little snippet of information was starting to inform the way I approach some front end development tasks — creating strings in a way I know will compress well, whilst emphasising human readablity and maintainablity.

## The ‘stalagmite’ skillset
Many people talk about the ‘T–shaped skill set’, but I prefer to think about it as stalagmite. The drip drip drip of snippets of knowledge builds up over time to give a breadth and depth of skills, allowing you to collaborate and contribute across disciplines. I'll probably write more about this soon.


text:
# b3-news-sentiment-analyzer
An application to scrap and storage the main [B3](http://www.b3.com.br/en_us/)'s news.

## Setup you environment

Create a `config.yml` file base on `config.yml.example`

## Running locally

```
pipenv shell
pipenv install

python .\src\cron_job.py
```


text:
# AncestoryParser

Parses geneology.com user tree and exports as GEDCOM file.

An example tree can be found on https://www.genealogy.com/ftm/.

repository: evan-chaney/ancestory-web-parser

repo_name: evan-chaney/ancestory-web-parser


text:
---
layout: layout.pug
navigationTitle:  Local User Login
title: Local User Login
excerpt: Logging in to DC/OS as a local user
render: mustache
model: /mesosphere/dcos/1.13/data.yml
menuWeight: 20
---

<!-- The source repository for this topic is https://github.com/dcos/dcos-docs-site -->

# Logging in using the DC/OS CLI

**Prerequisite:**
- [DC/OS CLI](/mesosphere/dcos/1.13/cli/)

Using the [DC/OS CLI](/mesosphere/dcos/1.13/cli/) one can log in as a local DC/OS user by specifying the `dcos-users` login provider.

1. To log in via the DC/OS CLI, replace `uid` and `password` in the following [auth login](/mesosphere/dcos/1.13/cli/command-reference/dcos-auth/dcos-auth-login/) command:

    ```bash
    dcos auth login --provider=dcos-users --username=<uid> --password=<password>
    ```

1. Display the DC/OS authentication token by executing the following command:

    ```bash
    dcos config show core.dcos_acs_token
    ```

1. Export the DC/OS Authentication token into environment for using it in other commands:

    ```bash
    export TOKEN=$(dcos config show core.dcos_acs_token)
    ```

# Logging in using the IAM API

Local users can log in using [Identity and Access Management (IAM) API](/mesosphere/dcos/1.13/security/oss/iam-api/).

1. To log in to local user accounts, replace `<uid>` and `<password>` in the following command:

    ```bash
    curl -X POST http://<host-ip>/acs/api/v1/auth/login -d '{"uid": "<uid>", "password": "<password>"}' -H 'Content-Type: application/json'
    ```

1. A DC/OS Authentication token similar to the one below will be returned in the HTTP response body:

    ```json
    {
      "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJib290c3RyYXB1c2VyIiwiZXhwIjoxNDgyNjE1NDU2fQ.j3_31keWvK15shfh_BII7w_10MgAj4ay700Rub5cfNHyIBrWOXbedxdKYZN6ILW9vLt3t5uCAExOOFWJkYcsI0sVFcM1HSV6oIBvJ6UHAmS9XPqfZoGh0PIqXjE0kg0h0V5jjaeX15hk-LQkp7HXSJ-V7d2dXdF6HZy3GgwFmg0Ayhbz3tf9OWMsXgvy_ikqZEKbmPpYO41VaBXCwWPmnP0PryTtwaNHvCJo90ra85vV85C02NEdRHB7sqe4lKH_rnpz980UCmXdJrpO4eTEV7FsWGlFBuF5GAy7_kbAfi_1vY6b3ufSuwiuOKKunMpas9_NfDe7UysfPVHlAxJJgg"
    }
    ```

repository: mesosphere/dcos-docs-site

gha_language: SCSS

repo_name: mesosphere/dcos-docs-site


text:
rpc.js
==========

rpc.js is the zepto/jquery version of [dojox.rpc](http://livedocs.dojotoolkit.org/dojox/rpc). RPC, or remote procedure call, is a system for communicating with a backend using a variety of flexible transports, all wrapped around a single class called a Service.

### $.rpc.Service

$.rpc.Service is the foundation of most RPC transportation. To use a Service, you need an SMD. Defining the SMD is a separate discussion, so for now we'll reuse some pre-defined SMD's available in the RPC project's folder.

There are several transports/envelopes that are defined in separate modules to minimize the size of $.rpc.Service. These must also be loaded if they are used by the SMD:

* JSONP Transport
* REST transport
* JSON-RPC-2.0 and JSON-RPC-1.0 envelopes

All of the provided SMDLibrary SMD's are based on JSONP. If you define your own SMD with a local target endpoint, JSONP is not needed.

## Building rpc.js

rpc.js uses the [grunt](http://github.com/cowboy/grunt) build system. Building rpc.js requires node.js and a command line zip program.

Install grunt.

`npm install grunt -g`

Clone the rpc.js git repo.

`git clone git://github.com/torworx/rpc.git`

`cd rpc`

Install node modules.

`npm install`

Run grunt.

`grunt`

## Add Scripts and links to your HTML:

```html
// assuming your /rpc is in js/
<script src="js/lib/jquery.min.js" type="text/javascript"></script>
<script src="js/rpc/rpc.min.js" type="text/javascript"></script>
```

### Using Zepto

By default, rpc.js uses jQuery (last tested against 1.9.1). If you need to use [Zepto.js](http://zeptojs.com/) which has a similar API to jQuery instead, simply replace the jquery.js script above with zepto, and use the zepto version of rpc.js:

## Starting a Service

Service is a constructor, returning a pointer to the API defined in the SMD.

```javascript
var goog = new $.rpc.Service("js/rpc/SMDLibrary/google.smd");
```
or using convenient method:
```javascript
var goog = $.rpc.service("js/rpc/SMDLibrary/google.smd");
```
If the argument passed to new Service() is an object, it is assumed to be the direct service definition:
```javascript
var goog = null;
$.ajax({
   url: "js/rpc/SMDLibrary/google.smd",
   dataType: "json",
   success: function(data){
       goog = $.rpc.service(data);
   }
});
```
## Using a Service

Service works around built in [Deferred](http://sudhirj.github.com/simply-deferred/) system, providing asynchronous communication around a familiar API. Once we've created our Service from an SMD, the methods defined in the SMD are available through the return handle provided.

```javascript
var goog = $.rpc.Service("js/rpc/SMDLibrary/google.smd");
goog.webSearch({ q:"jQuery rpc.js" }).then(function(err, data){
	if (err) {
    	// an error occurred. timeout, bad data, etc.
	} else {
    	// in this particular RPC call, the results you seek are:
        console.log(data.responseData.results);
    }
});
```
This will trigger a web search for the phrase "jQuery rpc.js", and fire your callback function when complete.

## Creating your own SMD
Please see the [SMD specification](http://dojotoolkit.org/reference-guide/1.8/dojox/rpc/smd.html) for a definition of the SMD format and how to define your own.

repository: torworx/rpc

repo_name: torworx/rpc