text:
---
# An instance of the Blank widget.
# Documentation: https://sourcethemes.com/academic/docs/page-builder/
widget: blank

# Activate this widget? true/false
active: true

# This file represents a page section.
headless: true

# Order that this section appears on the page.
weight: 15

title: Logistics
subtitle:

design:
  columns: "1"
  background:
    image: headers/bubbles-wide.jpg
    image_darken: 0.6
    image_parallax: true
    image_position: center
    image_size: cover
    text_color_light: true
  spacing:
    padding: ["20px", "0", "20px", "0"]

---

## Meeting Links

The meeting will be organized on-line and we will use Zoom.

*We will ask you to connect to the links that we will provide you 15 minutes ahead of the meeting time so that we can solve the usual connection issues.*

### Zoom

We assume that everyone is familiar with Zoom. We will send you the necessary links.

### Klaxoon
For the afternoon sessions, in addition to the Zoom session, we will also use a whiteboard application (Klaxoon). Klaxoon does not require any prior installation, and you will use it in your browser.

To join us on `Klaxoon`, follow these instructions:

1 Open your browser and open the [Klaxoon website](https://klaxoon.com)

2 On the left of the screen, you will see an invitation to enter a code:

3 Enter the code that we will give to you by e-mail

4 If you never used Klaxoon on this browser, a new window will open asking for your email

5 Then to fill your name and surname

6 Once done, click on the Join Button

7 You should have joined the Klaxoon session and see the following screen:

## Language
The language used during the meeting and for presentations will be English.

## Recording
If all participants agree, the discussions will be recorded and later made available to all participants.


text:
# hash-[webpack](http://webpack.github.io)-plugin

> Hash manifest file writer plugin for Webpack.

Do you need to integrate Webpack with your [ExpressJS](http://expressjs.com/) app? Check the [express-hash-webpack](https://github.com/xpepermint/express-hash-webpack) plugin.

## Setup

```js
npm install --save-dev hash-webpack-plugin
```

## Example

```js
...
var HashPlugin = require('hash-webpack-plugin');

module.exports = {
  ...
  plugins: [
    new HashPlugin({ path: './build', fileName: 'hash.txt' })
  ]
};
```

license: MIT

repository: xpepermint/hash-webpack-plugin

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: xpepermint/hash-webpack-plugin


text:
# Frequently Asked Questions:

### How do I use KubernetesClient with IPv6 Kubernetes Clusters?
We're aware of this [issue](https://github.com/fabric8io/kubernetes-client/issues/2632) in Fabric8 Kubernetes Client. Unfortunately, this is caused by the OkHttp transitive dependency. You can check suggested workaround here:

[Using KubernetesClient with IPv6 based Kubernetes Clusters](./KubernetesClientWithIPv6Clusters.md)

### What artifact(s) should my project depend on?
Fabric8 version 6 introduces more options with regards to dependencies.

1. Have compile dependencies on kubenetes-client or openshift-client - this is no different than what was done with version 5 and before.  If you have done custom development involving effectively internal classes, you'll need to still use this option.

2. Have compile dependencies on kubenetes-client-api or openshift-client-api, and a runtime dependency on kubenetes-client or openshift-client.  This option will provide your application with a cleaner compile time classpath.

Further more you will also have choices in the HttpClient that is utilized.

By default kubenetes-client has a runtime dependency on OkHttp (kubernetes-httpclient-okhttp).  If you need to directly manipulate OkHttp, you add a compile dependency to kubernetes-httpclient-okhttp.

If you wish to use another HttpClient implementation typically you will exclude kubernetes-httpclient-okhttp and include the other runtime dependency instead.

repository: rohanKanojia/kubernetes-client

gha_language: Java

repo_name: rohanKanojia/kubernetes-client


text:
# README
## How to install
```
git clone <your-username/alex.git>
cd alex
yarn install
yarn start
yarn react-native run-android
```

## How to Contribute
1) Pick up a task from the [kanban board](https://github.com/fabriziobertoglio1987/hackathon-team/projects/2)
2) Submit pull request with task

## Facebook
[Facebook Dashboard for Alex](https://developers.facebook.com/apps/254305266005405/dashboard)


text:
该项目来源于https://github.com/flipreverse/systemtap-android-app

此处仅是做了一些BUG修复。
A graphical frontend to control SystemTap for Android
=====================================================

Set up the Android project
---------------------------

1. Unpack the Sherlock ActionBar tarball to a directory you want
2. Import it to Eclipse

	File --> Import --> Existing Project into Workspace --> Select root directory

 The list below contains three projects. You will just need the last one, which is the actually library.
 Mark it and click on `Finish`

3. You may need to mark it as libraray project

	Right click on the project --> Properties --> Android --> Mark `Is Library` --> OK

4. Use the steps descried in 2. to import the real project

Updating protobuf definition
----------------------------
1.  Just run the following command:

	protoc --java_out=src/ SystemTapMessage.proto

Build busybox
-------------
1. Make sure you have the recent version of android ndk (current r8)
2. Create a standalone toolchain (see $ndk/build/tools) and add it to your $PATH
3. The currently used busybox binary is based on commit f47ce07b2699134d94dae9320dabc4a91c3c6b83 (git://git.busybox.net/busybox).
4. To build it copy the config file (busybox.config) to the busybox source directory as ".config"
5. Replace the content of CONFIG_SYSROOT by the path where you placed the standalone toolchain including `/sysroot`
6. A simple "make" will do the rest. :-)


text:
---
title: Create a Secondary Index
summary: Learn steps, rules, and examples to create a secondary index.
---

# Create a Secondary Index

This document describes how to create a secondary index using SQL and various programming languages and lists the rules of index creation. In this document, the [Bookshop](/develop/dev-guide-bookshop-schema-design.md) application is taken as an example to walk you through the steps of secondary index creation.

## Before you start

Before creating a secondary index, do the following:

- [Build a TiDB Cluster in TiDB Cloud (Serverless Tier)](/develop/dev-guide-build-cluster-in-cloud.md).
- Read [Schema Design Overview](/develop/dev-guide-schema-design-overview.md).
- [Create a Database](/develop/dev-guide-create-database.md).
- [Create a Table](/develop/dev-guide-create-table.md).

## What is secondary index

A secondary index is a logical object in a TiDB cluster. You can simply regard it as a sorting type of data that TiDB uses to improve the query performance. In TiDB, creating a secondary index is an online operation, which does not block any data read and write operations on a table. For each index, TiDB creates references for each row in a table and sorts the references by selected columns instead of by data directly.

<CustomContent platform="tidb">

For more information about secondary indexes, see [Secondary Indexes](/best-practices/tidb-best-practices.md#secondary-index).

</CustomContent>

<CustomContent platform="tidb-cloud">

For more information about secondary indexes, see [Secondary Indexes](https://docs.pingcap.com/tidb/stable/tidb-best-practices#secondary-index).

</CustomContent>

In TiDB, you can either [add a secondary index to an existing table](#add-a-secondary-index-to-an-existing-table) or [create a secondary index when creating a new table](#create-a-secondary-index-when-creating-a-new-table).

## Add a secondary index to an existing table

To add a secondary index to an existing table, you can use the [CREATE INDEX](/sql-statements/sql-statement-create-index.md) statement as follows:

```sql
CREATE INDEX {index_name} ON {table_name} ({column_names});
```

Parameter description:

- `{index_name}`: the name of a secondary index.
- `{table_name}`: the table name.
- `{column_names}`: the names of the columns to be indexed, separated by semi-colon commas.

## Create a secondary index when creating a new table

To create a secondary index at the same time as table creation, you can add a clause containing the `KEY` keyword to the end of the [CREATE TABLE](/sql-statements/sql-statement-create-table.md) statement:

```sql
KEY `{index_name}` (`{column_names}`)
```

Parameter description:

- `{index_name}`: the name of a secondary index.
- `{column_names}`: the names of the columns to be indexed, separated by semi-colon commas.

## Rules in secondary index creation

See [Best Practices for Indexing](/develop/dev-guide-index-best-practice.md).

## Example

Suppose you want the `bookshop` application to support **searching for all books published in a given year**.

The fields in the `books` table are as follows:

| Field name   | Type          | Field description                                                          |
|--------------|---------------|------------------------------------------------------------------|
| id           | bigint(20)    | Unique ID of the book                                            |
| title        | varchar(100)  | Book title                                                       |
| type         | enum          | Types of books (for example, magazines, animations, and teaching aids) |
| stock        | bigint(20)    | Stock                                                            |
| price        | decimal(15,2) | Price                                                            |
| published_at | datetime      | Date of publishing                                                  |

The `books` table is created using the following SQL statement:

```sql
CREATE TABLE `bookshop`.`books` (
  `id` bigint(20) AUTO_RANDOM NOT NULL,
  `title` varchar(100) NOT NULL,
  `type` enum('Magazine', 'Novel', 'Life', 'Arts', 'Comics', 'Education & Reference', 'Humanities & Social Sciences', 'Science & Technology', 'Kids', 'Sports') NOT NULL,
  `published_at` datetime NOT NULL,
  `stock` int(11) DEFAULT '0',
  `price` decimal(15,2) DEFAULT '0.0',
  PRIMARY KEY (`id`) CLUSTERED
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
```

To support the searching by year feature, you need to write a SQL statement to **search for all books published in a given year**. Taking 2022 as an example, write a SQL statement as follows:

```sql
SELECT * FROM `bookshop`.`books` WHERE `published_at` >= '2022-01-01 00:00:00' AND `published_at` < '2023-01-01 00:00:00';
```

To check the execution plan of the SQL statement, you can use the [`EXPLAIN`](/sql-statements/sql-statement-explain.md) statement.

```sql
EXPLAIN SELECT * FROM `bookshop`.`books` WHERE `published_at` >= '2022-01-01 00:00:00' AND `published_at` < '2023-01-01 00:00:00';
```

The following is an example output of the execution plan:

```
+-------------------------+----------+-----------+---------------+--------------------------------------------------------------------------------------------------------------------------+
| id                      | estRows  | task      | access object | operator info                                                                                |
+-------------------------+----------+-----------+---------------+--------------------------------------------------------------------------------------------------------------------------+
| TableReader_7           | 346.32   | root      |               | data:Selection_6                                                                                |
| └─Selection_6           | 346.32   | cop[tikv] |               | ge(bookshop.books.published_at, 2022-01-01 00:00:00.000000), lt(bookshop.books.published_at, 2023-01-01 00:00:00.000000) |
|   └─TableFullScan_5     | 20000.00 | cop[tikv] | table:books   | keep order:false                                                                                |
+-------------------------+----------+-----------+---------------+--------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.61 sec)
```

In the example output, **TableFullScan** is displayed in the `id` column, which means that TiDB is ready to do a full table scan on the `books` table in this query. In the case of a large amount of data, however, a full table scan might be quite slow and cause a fatal impact.

To avoid such impact, you can add an index for the `published_at` column to the `books` table as follows:

```sql
CREATE INDEX `idx_book_published_at` ON `bookshop`.`books` (`bookshop`.`books`.`published_at`);
```

After adding the index, execute the `EXPLAIN` statement again to check the execution plan.

The following is an example output.

```
+-------------------------------+---------+-----------+--------------------------------------------------------+-------------------------------------------------------------------+
| id                            | estRows | task      | access object                                          | operator info                                                     |
+-------------------------------+---------+-----------+--------------------------------------------------------+-------------------------------------------------------------------+
| IndexLookUp_10                | 146.01  | root      |                                                        |                                                                   |
| ├─IndexRangeScan_8(Build)     | 146.01  | cop[tikv] | table:books, index:idx_book_published_at(published_at) | range:[2022-01-01 00:00:00,2023-01-01 00:00:00), keep order:false |
| └─TableRowIDScan_9(Probe)     | 146.01  | cop[tikv] | table:books                                            | keep order:false                                                  |
+-------------------------------+---------+-----------+--------------------------------------------------------+-------------------------------------------------------------------+
3 rows in set (0.18 sec)
```

In the output, **IndexRangeScan** is displayed instead of **TableFullScan**, which means that TiDB is ready to use indexes to do this query.

The words such as **TableFullScan** and **IndexRangeScan** in the execution plan are [operators](/explain-overview.md#operator-overview) in TiDB. For more information about execution plans and operators, see [TiDB Query Execution Plan Overview](/explain-overview.md).

<CustomContent platform="tidb">

The execution plan does not return the same operator every time. This is because TiDB uses a **Cost-Based Optimization (CBO)** approach, in which an execution plan depends on both rules and data distribution. For more information about TiDB SQL performance, see [SQL Tuning Overview](/sql-tuning-overview.md).

</CustomContent>

<CustomContent platform="tidb-cloud">

The execution plan does not return the same operator every time. This is because TiDB uses a **Cost-Based Optimization (CBO)** approach, in which an execution plan depends on both rules and data distribution. For more information about TiDB SQL performance, see [SQL Tuning Overview](/tidb-cloud/tidb-cloud-sql-tuning-overview.md).

</CustomContent>

> **Note:**
>
> TiDB also supports explicit use of indexes when querying, and you can use [Optimizer Hints](/optimizer-hints.md) or [SQL Plan Management (SPM)](/sql-plan-management.md) to artificially control the use of indexes. But if you do not know well about indexes, optimizer hints, or SPM, **DO NOT** use this feature to avoid any unexpected results.

To query the indexes on a table, you can use the [SHOW INDEXES](/sql-statements/sql-statement-show-indexes.md) statement:

```sql
SHOW INDEXES FROM `bookshop`.`books`;
```

The following is an example output:

```
+-------+------------+-----------------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+-----------+
| Table | Non_unique | Key_name              | Seq_in_index | Column_name  | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Visible | Expression | Clustered |
+-------+------------+-----------------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+-----------+
| books |          0 | PRIMARY               |            1 | id           | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | YES     | NULL       | YES       |
| books |          1 | idx_book_published_at |            1 | published_at | A         |           0 |     NULL | NULL   |      | BTREE      |         |               | YES     | NULL       | NO        |
+-------+------------+-----------------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+-----------+
2 rows in set (1.63 sec)
```

## Next step

After creating a database and adding tables and secondary indexes to it, you can start adding the data [write](/develop/dev-guide-insert-data.md) and [read](/develop/dev-guide-get-data-from-single-table.md) features to your application.

gha_language: Python


text:
## OH_Temperature_Demo ##

Author: Patrick Daniel, Moss Landing Marine Labs

Date: 2017-04-21

### Introduction ###

This demo is used to illustrate the application and afforadability of digital electronics in science and research. The Raspberry Pi being a key example of a cheap (~$35) computers that runs a full Linux distribution is internet enabled and has been adapted for all kinds of 'maker' projects.

In this demo, two 1-wire digital temperature sensors are placed cups of water with different temperatures and the corresponding temperature values are plotted in real time to a plot on computer.

### Hardware setup ###

1-wire probes use the 3.3V power line (RP3 = pin 1) for power (red line), GND (RP3 pin 9) to the black line, and the data line to GPIO4 (RP3 = pin 7). A 4.7K ohm resistor is placed between the dataline and the power line as a pull up resistor.

### Software setup ###

The main program tmp_probe_OH17.py runs creates a Tmp_Probe object of each attached sensor, finding the serial numbers and running some of the setup scripts required for the 1-wire protocol. A simple plot is made using the QT library, as the time this was made there were some issues running more standard plotting libraries like matplotlib on a raspberry pi.


text:
---
title: Slate Coffee Roasters - Finca La Ilusion
author: cale
date: 2016-09-04
template: article.jade
---

As illustrious as the title, Finca La Ilusion (*translation:*"Building the illusion"), this Colombian coffee changed my entire outlook on Colombian coffees.

---

![Finca La Ilusion Coffee](finca_la_ilusion.jpg)
### General Information
**Origin:** Colombia
**Region:** Huila
**Varietal:** N/A
**Elevation:** 1750m
**Process:** Sun Dried Natural
**Producer:** Rosevel Ortiz Escarpeta
**Suggested Notes:** Blood orange, ripe banana, and a long, sweet finish reminiscent of rich caramel.
**Date Roasted:** August 25th, 2016
**Date Brewed:** September 4th, 2016
**Brew Method:** v60
**Price:** $12.50 - (250g)
### Brewing
**Aroma:** Extremely fragrant, lots of citrus
**Thoughts:** Extremely fragrant, lots of citrus and even cocoa aroma. Very light and almost red in color.
### Tasting
**Aroma:** Cocoa, olive, honeydew
**Notes I felt:** Cocoa, orange
**Description:** Slate Coffee Roasters Finca La Ilusion starts strong with immediate notes of juicy orange and deep green tea. The is light and silky, almost tea-like. The finish consists of lingering cocoa and caramel. Overall, an incredibly balanced, light, sweet cup that I will be sure to revisit.
### Conclusion
**Expected:** 7.5/10
**Rating:** 9/10

repository: CaleCrawford/coffee-collectives

repo_name: CaleCrawford/coffee-collectives


text:
# :rocket: MY-CALC CLI in Golang

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

This is the basic addition operation cli built in golang using cobra library.

## :computer: Tech used

1. golang (go version go1.11.5 windows/amd64)
2. cobra

### :blue_book: The complete tutorial is published on [Blog](https://schadokar.dev/posts/how-to-create-a-cli-in-golang-with-cobra/) :confetti_ball:

## Author

#### :wave: [Shubham Chadokar](https://schadokar.dev)
I am a Software Engineer 👓.

I love to write articles and tutorials on Blockchain, Golang, Nodejs and Reactjs. My skill set is Blockchain (Ethereum, Hyperledger Fabric), Golang, Nodejs, Reactjs, Docker, Kubernetes.

## License

This project is open source and available under the [MIT License](LICENSE).

repository: schadokar/my-calc

repo_name: schadokar/my-calc


text:
postgresql
==========

An Ansible role to install and configure PostgreSQL.

Requirements
------------

Assumes RedHat OS family, installing packages from yum.

Role Variables
--------------

Variables that can be passed to this role and their default values are as follows.

    postgresql_data_dir: /data/postgresql

Dependencies
------------

None

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

    - name: Example Playbook
      hosts: dbserver
      roles:
        - name: Install postgresql
          role: postgresql

License
-------

MIT

repository: currycan/ansible-roles

repo_name: currycan/ansible-roles


text:
# Dungeons & Dragons Character Sheet

## To run the program locally

Type yarn install from the root folder in the terminal.

From the client, type yarn start to start the app.
The program will start from the welcome page.

By clicking on the 'create' button the user will be taken to the 'main' page where the player character can be created.

By selecting the different inputs and dropdowns, the app accesses the database to retrieve the specific modifiers for every race or class.
When pressing the buttons to roll the dices, our algorithms will calculate abilities and health points following the official D&D rules.

Once the user is finished filling the form, the information can be printed on the official D&D template by pressing the print button!

## Built With

1. Mongoose
2. React
3. Express
4. Axios
5. Heroku For Deployment

## Authors

1. Javier Latorre Ibanez (https://github.com/Torrespain)
2. Jose Perez (https://github.com/jperez650)
3. Elena Doncheva (https://github.com/Leyni30)
4. Jack Fang (https://github.com/jackfang415)
5. Ricky Feng (https://github.com/Rickyfeng7)

## Deployed App

https://cryptic-mesa-16953.herokuapp.com/

## License

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

## Acknowledgments

* Jerome Chennette (https://github.com/jeromechenette)
* Dani Roxberry (https://github.com/droxey)
* Amber Burroughs (https://www.linkedin.com/in/amber-burroughs-29a69467)
* Abraham Ferguson (https://github.com/abrahamfergie)

Thank you for all of your help with debugging and directing our thought process!

repository: Torrespain/DnD-character-creator

repo_name: Torrespain/DnD-character-creator


text:
Rest API change log
====================

## ?.?.? / ????-??-??

## 1.0.0 / 2018-10-06

* **Heads up**: Deprecated `web.rest.ClassesIn`, which is superseded by
  the new `ResourcesIn` class. See PR #10 for migration guide.
  (@thekid)

## 0.9.0 / 2018-08-29

* Merged PR #9: Extract built-in marshalling to xp-forge/marshalling
  library; see https://github.com/xp-forge/marshalling
  (@thekid)

## 0.8.0 / 2018-07-17

* Implemented content type negotation via the HTTP `Accept` header
  (@thekid)
* Merged PR #5: Accept instances or delegates in RestApi constructor
  (@thekid)
* Merged PR #6: Add support for "application/x-www-form-urlencoded"
  (@thekid)

## 0.7.1 / 2018-07-17

* Fixed unmarshalling when invoking setter methods with an array or map
  (@thekid)

## 0.7.0 / 2018-05-25

* Merged PR #3: Two Bugfixes in Marshalling - @johannes85
* Merged PR #4: Intercept invocations, which allow passing functions or
  `web.rest.Interceptor` instances to `RestApi`s to intercept calls to
  the delegates. Usecases are logging, performance profiling, caching,
  input validation and exception handling, for example.
  (@thekid)

## 0.6.0 / 2018-05-23

* Added support for patterns in path segments, e.g. `/users/{id:[0-9]+}`
  (@thekid)
* Fixed `request` injection when parameter was type-hinted - @thekid
* Fixed marshalling not recursing into value objects - @thekid

## 0.5.0 / 2018-04-10

* Changed dependency on `xp-forge/web` to version 1.0.0 since it has
  been released
  (@thekid)

## 0.4.0 / 2018-02-20

* Added optional `base` argument to RestApi constructor. This way, an
  API instance can be mounted at a given base, e.g. `/api/1.0` without
  having to rewrite all the handlers.
  (@thekid)

## 0.3.1 / 2018-02-20

* Fixed `Link: ... rel="next"` header not being shown for items produced
  by a generator (e.g., `yield`).
  (@thekid)

## 0.3.0 / 2018-02-13

* Added `web.rest.Response::export()` for easier unittest - @thekid
* Merged PR #2: Pagination - @thekid
* Added `@$req: request` to pass complete request object - @thekid

## 0.2.0 / 2018-02-13

* Restored HHVM support - @thekid
* Added support for all traversable data structures like `ArrayIterator`
  or `IteratorAggregate` implementations, not just generator functions.
  (@thekid)

## 0.1.1 / 2018-02-13

* Fixed object fields not being converted to their declared types during
  unmarshalling (e.g., using `/** @var T */`).
  (@thekid)

## 0.1.0 / 2018-02-12

* Hello World! First release - @thekid


text:
# Mathematical formulas :: Arithmetic :: Powers and radicals

1. Power definition:
  - `mⁿ = m ∙ … ∙ m` (n times) and `n ∈ ℕ`
  - right-associative: `a^b^c = a^(b^c)`
  - associative-inequality: `(a^b)^c ≠ a^(b^c)`

2. Edge-case powers where `n ∈ ℤ`
  - Integer to the zeroth power: `n⁰ = 1`
  - Zero to the zeroth power: `0⁰ = 1` (by convention)
  - Zero to the nth power:    `0ⁿ = 0`
  - Integer to the first power:  `n¹ = n`

3. Negative power
  - Inverse: `a⁻¹ = 1/a`
  - Integer to the negative power `a⁻ⁿ = 1/aⁿ`
  - Fraction to the negative power: `(a/b)⁻ⁿ = (b/a)ⁿ = bⁿ/aⁿ`

4. Multiplication with the same bases: `aⁿ ∙ aᵐ = aⁿᐩᵐ`
5. Exponentiation of powers: `(aⁿ)ᵐ = aⁿᵐ = (aᵐ)ⁿ`
6. Mul of powers: `(ab)ⁿ = aⁿbⁿ` where `n ∈ ℤ` and `a,b ∈ ℝᐩ`
7. Fraction to the nth power: `(a/b)ⁿ = aⁿ/bⁿ`
8. Division of powers: `aⁿ/aᵐ = aⁿ⁻ᵐ`
9. Relationship between power and log: `m^(n ∙ log ₘ  a)` = `aⁿ`

https://mathforyou.net/en/formulas/radicals/

license: Unlicense


text:
# External (template)

The `Napi::External` template class implements the ability to create a `Napi::Value` object with arbitrary C++ data. It is the user's responsibility to manage the memory for the arbitrary C++ data.

`Napi::External` objects can be created with an optional Finalizer function and optional Hint value. The Finalizer function, if specified, is called when your `Napi::External` object is released by Node's garbage collector. It gives your code the opportunity to free any dynamically created data. If you specify a Hint value, it is passed to your Finalizer function.

## Methods

### New

```cpp
template <typename T>
static Napi::External Napi::External::New(napi_env env, T* data);
```

- `[in] env`: The `napi_env` environment in which to construct the `Napi::External` object.
- `[in] data`: The arbitrary C++ data to be held by the `Napi::External` object.

Returns the created `Napi::External<T>` object.

### New

```cpp
template <typename T>
static Napi::External Napi::External::New(napi_env env,
                    T* data,
                    Finalizer finalizeCallback);
```

- `[in] env`: The `napi_env` environment in which to construct the `Napi::External` object.
- `[in] data`: The arbitrary C++ data to be held by the `Napi::External` object.
- `[in] finalizeCallback`: A function called when the `Napi::External` object is released by the garbage collector accepting a T* and returning void.

Returns the created `Napi::External<T>` object.

### New

```cpp
template <typename T>
static Napi::External Napi::External::New(napi_env env,
                    T* data,
                    Finalizer finalizeCallback,
                    Hint* finalizeHint);
```

- `[in] env`: The `napi_env` environment in which to construct the `Napi::External` object.
- `[in] data`: The arbitrary C++ data to be held by the `Napi::External` object.
- `[in] finalizeCallback`: A function called when the `Napi::External` object is released by the garbage collector accepting T* and Hint* parameters and returning void.
- `[in] finalizeHint`: A hint value passed to the `finalizeCallback` function.

Returns the created `Napi::External<T>` object.

### Data

```cpp
T* Napi::External::Data() const;
```

Returns a pointer to the arbitrary C++ data held by the `Napi::External` object.

repository: holzschu/a-shell

gha_language: C

repo_name: holzschu/a-shell


text:
# Helpful Linux Commands

### get list of Jupyter Notebook sessions
```
jupyter notebook list
```

### list CPU GPU memory usage:
```
htop
```

### see GPU usage
```
nvidia smi
```

https://www.kaggle.com/devm2024/keras-model-for-beginners-0-210-on-lb-eda-r-d


text:
## Checkbox tree

### This (simple) checkbox tree is made using [Formik](https://github.com/jaredpalmer/formik).

### It has a parent checkbox that allows to auto-select/unselect all children checkboxes.

* A partial selection of the list of children checkboxes will auto-unselect the parent checkbox as could be expected.
* A complete selection of the list of children checkboxes will auto-select the parent checkbox, as could be expected.

I used material-UI for the styling.

A screenshot below :

![Screenshot of the Checkbox tree](./formikforms/public/screenshot.png)


text:
**B610: Potential SQL injection on extra function**

See also

-   <https://docs.djangoproject.com/en/dev/topics/security/#sql-injection-protection>

New in version 1.5.0.

repository: codacy/codacy-bandit

gha_language: Scala

gha_license_id: NOASSERTION

repo_name: codacy/codacy-bandit


text:
# Warguez
---

## Installation
* Clone or download this repository.
```
git clone https://github.com/jovanidash21/warguez.git
```
* Open `index.html` in browser.

## Credit
- [Slider](http://jquery.malsup.com/cycle2/)

## Website
[Live Demo](https://jovanidash21.github.io/warguez/)

## License
Licensed under [MIT](https://opensource.org/licenses/mit-license.php).


text:
Preparing The Raspberry Pis
=================

###### Initial setup

We bought a Cana kit Raspberry Pi Complete Starter Kit for each student. The kit includes the Pi, a case, an SD card, a Wifi adapter, a power supply, and an HDMI cable. Unfortunately, we do not have acess to the university Wifi without registering the MAC addresses of each pi, so all software had to be installed beforehand. In the process of opening each kit to install the cases, we removed the SD card for cloning.

-----------------

###### Cloning the SD cards

We used a [Startech.com USB cloner][1] to clone all the SD cards (though a USB hub and some simple scripting could also work) along with some cheap $1.50 micro SD card reades from Dyso Japan.

![Cloner][2]

[1]: http://www.startech.com/HDD/Duplicators/USB-1-to-2-Standalone-Flash-Drive-Duplicator-Eraser~USBDUP12
[2]: https://raw.githubusercontent.com/FABcamp/SimonGPIO2.0/master/Images/Cloner.jpg

path: /Documentation/Preparing The Pis.md

filename: Preparing The Pis.md


text:
# AndroidKotlinCompilerPluginSample

An Android project which includes a kotlin compiler plugin build.

@ToDiff can be applied to the definition of any data class to transform the output of toString(). The output will instead indicate which fields have not utilized their default values and what the default values are.

```kotlin
@ToDiff
data class Cat(
    val name: String = "Taza",
    val color: String = "Grey",
    val age: Double = 0.2
)

val cat = Cat(
    name = "Neferpitou",
    age = 1.3
)

println(cat)

// without @ToDiff annotation
// Cat(name=Neferpitou, color=Grey, age=1.3)

// with @ToDiff annotation
// Diff$Cat(*name*=Taza->Neferpitou, color=Grey, *age*=0.2->1.3)
```

Please keep in mind that the IR compiler is still experimental and not well documented publicly. :-)

Tested on Android Studio 4.0.1


text:
# ESP32 Keyboard Interface.

Library for interfacing a standard PS2 keyboard with ESP32 using esp-idf.
Keymaps need to be added for keyboards with different languages.

Default keymap = US (adapted from code by Paul Stoffregen<EMAIL_ADDRESS>
#Connections:

CLOCK = GPIO 19 (pulled up)
DATA = GPIO 18 (pulled up)

Interrupt called at NEGEDGE of Clock.


text:
There is two frontend docker images (`Dockerfile.development` and `Dockerfile.production`), the first one is used by docker-compose for development environment and the other one is used by Circle CI for production environment.

The production (backend) docker file is available on [DockerHub - ricardob/chat-app-backend](https://hub.docker.com/r/ricardob/chat-app-backend)

The production (frontend) docker file is available on [DockerHub - ricardob/chat-app-frontend](https://hub.docker.com/r/ricardob/chat-app-frontend)

**Table of Contents**

1. [Requirements](#requirements)
1. [Installation](#installation)
1. [License](#license)

## Requirements

- Git;
- Go; (for development installation)
- Docker; (for development installation)
- Docker Compose; (for development installation)
- nodejs, npm; (for development installation)
- Circle CI account; (for production deployment)

## Development Installation

### Install and run the application locally:

Using Docker Compose:

1. Clone the repository

With SSH
```shell
# git clone git@github.com:ricardobf/chat-app.git
```
or with HTTPS
```shell
# git clone https://github.com/ricardobf/chat-app.git
```

2. Navigate to application folder:
```shell
# cd chat-app
```

3. Run `docker-compose` command:
```shell
# docker-compose up
```

4. On your browser navigate to [localhost:3000](http://localhost:3000)

Obs.: You can change environment varibles inside `docker-compose.yml` file.

## Production Installation

### Running on Circle CI and GitHub

1. Navigate to [github.com/ricardobf/chat-app](https://www.github.com/ricardobf/chat-app) and fork the repository to your own workspace:
![github-fork](./images/github-fork.png)

2. On another tab, navigate to [circleci.com](https://www.circleci.com) and create or login to an existing Circle CI account using GitHub:
![circleci-1](./images/circleci-1.png)

3. On Projects tab, choose the right repository application:
![circleci-2](./images/circleci-2.png)

4. On project settings, create environment variables according to your DockerHub account and image name:
![circleci-envvar](./images/circleci-envvar.png)

4. Wait for the pipeline to run.

## License

This project uses [Apache License](https://github.com/ricardobf/chat-app/LICENSE).

repository: ricardobf/chat-app

repo_name: ricardobf/chat-app


text:
# @angular-package/prism/rxjs

Rxjs Angular 5+ Prism highlighter module.

**Pros(+):**
* **AOT** (Ahead Of Time Compilation) package: *faster rendering*, *fewer asynchronous requests*, *smaller Angular framework download size*, *detect template errors earlier*, *better security*.
* **MIT** License: it can be used commercially.
* Component `changeDetectionStrategy` is set to `OnPush`, It gives better overall __performance__.
* Dynamically change highlight string with `code` input property.
* Interpolate string to highlight with `interpolation` object.
* `@angular-package/reactive/decorator` with `rxjs/Subject` to Subscribe to `code` and `language` property changes.

**Cons(-):**
* Hooks are defined globally.
* No demonstration.

----

* [Demonstration](#demonstration)
* [Installation](#installation)
* [Usage](#usage)
* [PrismComponent](#prismcomponent)
  * [@Input](#input)
  * [Lifecycle Hooks](#lifecycle-hooks)
* [Scripts](#scripts)
* [Git](#git)
  * [Commit](#commit)
  * [Versioning](#versioning)
* [License](#license)
* [Donate](#donate)

----

## Demonstration

Not available

## Installation

To install, run:

```bash
npm install @angular-package/prism --save
```

Add peer dependencies:
```bash
npm i --save<EMAIL_ADDRESS><EMAIL_ADDRESS>```

## Usage

**Step 1.** Import `ApPrismRxjsModule` into your module.

```typescript
// example.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { ApPrismRxjsModule } from '@angular-package/prism/rxjs'; // <--- Here
import { ExampleComponent } from './example.component';

@NgModule({
  declarations: [ ExampleComponent ],
  imports: [ CommonModule, ApPrismRxjsModule ], // <--- here
  exports: [ ExampleComponent ]
})
export class ExampleModule { }
```

**Step 2.** Use prism component with `ng-content`:

```typescript
// example.component.ts
import { Component } from '@angular/core';

@Component({
  selector: 'example-component',
  template: `
    <ngx-prism [language]="language">
      {{content}}
    </ngx-prism>
  `
})
export class ExampleComponent {
  language = 'html';
  content = '<p>test</p>';
  constructor() { }
}
```

or use `PrismComponent` by providing `code` and `interpolation` property in `ExampleComponent`.

```typescript
// example.component.ts
import { Component } from '@angular/core';

@Component({
  selector: 'example-component',
  template: `
    <ngx-prism
      [language] = "language"
      [hooks] = "hooks"
      [code] = "content"
      [interpolation] = "interpolate"
    ></ngx-prism>`
})
export class ExampleComponent {
  content = '<p>test {{language}}</p>';
  hooks = {
    'before-sanity-check': (env) => { console.log(`before-sanity-check`, env); },
    'before-highlight': (env) => { console.log(`before-highlight`, env); },
    'after-highlight': (env) => { console.log(`after-highlight`, env); },
    'complete': (env) => { console.log(`complete`, env); },
    'before-insert': (env) => { console.log(`before-insert`, env); }
  };
  interpolate = {
    language: 'language interpolated'
  };
  language = 'html';
  constructor() { }
}
```

**Step 3.** Import `prismjs` theme files in `@angular/cli` like below.

```css
@import '~prismjs/themes/prism-coy.css';
@import '~prismjs/themes/prism-dark.css';
@import '~prismjs/themes/prism-funky.css';
@import '~prismjs/themes/prism-okaidia.css';
@import '~prismjs/themes/prism-solarizedlight.css';
@import '~prismjs/themes/prism-tomorrow.css';
@import '~prismjs/themes/prism-twilight.css';
@import '~prismjs/themes/prism.css';
```

## PrismComponent

It is designed to use `ng-content` and property `code` separately. You can **NOT** use both the same time.

### @Input

| name | Type | Description |
|----------|----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| async | boolean | Works only with `ng-content`. *"Whether to use Web Workers to improve performance and avoid blocking the UI when highlighting very large chunks of code."* - prismjs |
| callback | (element: Element) => void \| undefined = undefined | *"An optional callback to be invoked after the highlighting is done. Mostly useful when async is true, since in that case, the highlighting is done asynchronously."* - prismjs  |
| code | string | *"A string with the code to be highlighted."* - prismjs |
| **hooks** | Object | Callback with specific execute time and name: `before-sanity-check`, `before-highlight`, `after-highlight`, `complete`, `before-insert`. |
| **interpolation** | Object \| undefined | Data property values to inject.  |
| language | string | *"Valid language identifier, for example 'javascript', 'css'."* - prismjs |

### Lifecycle Hooks

[Angular Lifecycle Hooks](https://angular.io/guide/lifecycle-hooks)

**ngAfterViewInit()**
Performs `highlightElement(element, async, callback)` prismjs method.

**ngOnChanges()**
Detect input property `code` or `language` changes by comparing `currentValue` to `previousValue`.
If yes, set component property `change` to `true`.

**ngOnDestroy()**
Unsubscribe Rxjs.Subject subscription in Object property `subscription.code` and `subscription.language`.

**ngOnInit()**
Initiate subscribes to property `code` and `language` with `@angular-package/reactive/decorator/subscribe` decorator `Subscribe()`.

## Scripts

Clone repository:

```bash
git clone https://github.com/angular-package/angular-package.git
```

Go to just created folder:

```bash
cd angular-package/packages/prism
```

To build a clean package, means before that script removes node_modules, dist folder and install dependencies:

```bash
npm run clean:start
```

To build a package:

```bash
npm start
```

To run karma tests on both `core` and `rxjs` package:

```bash
npm test
```

## GIT

### Commit

- [AngularJS Git Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153)
- [Karma Git Commit Msg](http://karma-runner.github.io/0.10/dev/git-commit-msg.html)

### Versioning

[Semantic Versioning 2.0.0](http://semver.org/)

**Given a version number MAJOR.MINOR.PATCH, increment the:**
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards-compatible manner, and
PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

**FAQ**
How should I deal with revisions in the 0.y.z initial development phase?
>The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release.

How do I know when to release 1.0.0?

>If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backwards compatibility, you should probably already be 1.0.0.

## License

MIT © angular-package

## Donate

[Click to donate](https://donorbox.org/help-creating-open-source-software)

repository: amitic/angular-package

repo_name: amitic/angular-package


text:
# Server-Side Loyalty Rewards Program

## Build instructions:
1) Prior to build bring up a PostgreSQL instance and update the authentication credentials in src/test/resources/jdbc.properties
2) Run maven with `mvn package`

Maven will build, run tests and create a WAR file which can be deployed to any Tomcat instance.

repository: badiozam/concord

repo_name: badiozam/concord


text:
# radicchio
The Radicchio Triple Scorer

Enviroment:
	Python 2.7, Scikit-Learn 0.18, Numpy 1.11.1, Scipy 0.18.1
Execution:
	Change your current path to the src/ folder, and type in "python *.py".
	You may first try with "python main.py".

There are two frameworks - supervised framework and unsupervised framework.  You can inherits the abstract class SupervisedBase/UnsupervisedBase and implements different methods about feature extraction/learning/prediction to start your work. For details, please refer to the code and the comments.

NOTE: The data is too large, so you may download it by yourself. You should have all the data files stored in the data/ folder (try ln -s !!).

Train the models, please first run "main.py".


text:
---
title: "README"
author: "Your name here"
output: html_document
---

# Project template overview

This README gives an overview of what the project template folder structure is. Please customize the folder structure as needed.

After understanding what is written in this README, please delete the text and replace it with instructions of how this project works, so that anyone else can understand and run the code.

Once you are done with the project, please fill out a post summarizing what you've done in the team's project blog, and link copies of the final deliverables into the post.

# `RProj` name

Please ensure that the `RProj` file and main project folder are saved with the following filename  (where `YYYY-MM-DD` is the `RProj` creation date):

`YYYY-MM-DD-descriptive_project_name`

## Project folder structure

This is the basic outline for a typical analysis project. Feel free to delete any of these folders if you do not need them.

`R`: Use the `R` folder to store your functions. One file per function. Use the `fnmate` to help create the functions, if you'd like.

`data`: The `data` folder is for storing raw data files only. `drake` will take care of any intermediate and final values.

`deliverables`: The `deliverables` folder is for any data deliverables, like PDF reports, Excel files, dashboards, etc. If this project will span multiple time periods, put the respective deliverables for each time period as a sub-folder (e.g., `2019`, `2020`).

`reference`: The `reference` folder is for any requirements documents, project charters, email message chains, etc. that may help someone understand the context of this project.

## `git`

Git has been set up for this project. Please use version control with this project and also, please connect it to our Azure DevOps online repository system. Ensure that a coworker completes a code review of this project before it is released.

## `drake`

`drake` is set up with this project. Please use a function-based workflow using `r_make()`. This is what the `packages.R`, `_drake.R` and `R/plan.R` files are for. Please refer to Miles McBain's blog post (https://milesmcbain.xyz/the-drake-post/), the `drake` book (https://books.ropensci.org/drake/), and the `dflow` README on Github (https://github.com/sharleenw/dflow) for more information.

### `packages.R`

This is the file to store all of your library calls. Source this file using the `dflow::loadd_packages()` function.

### `R/plan.R`

This file is where the `drake` plan goes.

### `capsule`

`capsule`, which is a more relaxed wrapper for `renv`, created by Miles McBain, has been initialized for this project (`capsule::create()` has been run with `dflow::use_dflow()`). Please capture snapshots of this project's dependencies using `capsule::recreate()` if your packages change. This will help you in a year from now :).

### Project-specific `.Rprofile`

A project-specific `.Rprofile` has been set up with this project.

It will run the global `.Rprofile`, and will also convert any warnings into errors, so that they are properly dealt with in the code.

repository: sharleenw/dflow

branch_name: refs/heads/cno-version

gha_language: R

repo_name: sharleenw/dflow


text:
# CLib
CLib attempts to make tedious, common tasks in C less tedious.

The documentation for the features of CLib can all be found in their corresponding .h files.

# :rocket: Features
## String
The String type provides methods for manipulating Strings that are not null-terminated.

**Example** : _Formats and splitting_
```C
// Create a String from a format
String contrived = str_format("name: %s, version: %i, url: %s", name, version, url);

// Print out each key value pair in contrived
String keyValue;
String remaining = contrived;
while(str_isValid(remaining)) {
    keyValue = str_splitC(&remaining, ", ");

    // Print out the result
    char * keyValue_nullTerminated = str_c_destroy(keyValue);
    {
        printf("%s\n", keyValue_nullTerminated);
    }
    free(keyValue_nullTerminated);
}

// Destroy the String
str_destroy(&contrived);
```
```
name: CLib
version: 1
url: https://github.com/Sothatsit/CLib
```

_Documentation in [string.h](src/string.h#L63)_

## StringBuilder
StringBuilder provides a way to efficiently build Strings of unknown length by allocating extra space before it is used.

**Example** : _Comma seperated array_

```C
// Create a Builder to build a comma seperated array String
Builder builder = builder_create(32);

// Loop through each fruit in fruits and add it to builder
for(u64 index = 0; index < numFruits; ++index) {
    String fruit = fruits[index];

    if(index != 0)
        builder_appendC(&builder, ", ");

    builder_append(&builder, fruit);
}

// Print out the built String. We'll have to create
// a temporary null-terminated string for printf.
char * arrayNullTerminated = str_c(builder_str(builder));
{
    printf("Fruits: [%s]\n", arrayNullTerminated);
}
free(arrayNullTerminated);

// Destroy the StringBuilder
builder_destroy(&builder);
```
```
Fruits: [Apple, Banana, Cumquat, Dragon fruit, Eggplant]
```

_Documentation in [string.h](src/string.h#L389)_

## Number Types
Provides several number types with unambiguous sizes as well as a few maths functions using these types.

**The number types are:**

_u8_  : Unsigned 8 bit integer

_u16_ : Unsigned 16 bit integer

_u32_ : Unsigned 32 bit integer

_u64_ : Unsigned 64 bit integer

_s8_  : Signed 8 bit integer

_s16_ : Signed 16 bit integer

_s32_ : Signed 32 bit integer

_s64_ : Signed 64 bit integer

_Documentation in [numbers.h](src/numbers.h)_

# :microscope: Testing
## Automatically running tests:
The script [`looptests.sh`](looptests.sh) will automatically re-run the tests when ever any source files change and can be used as follows:
```
cd <CLib base directory>
./looptests.sh
```

## Manually running tests:
The script [`test.sh`](test.sh) will compile and run the tests once and can be used as follows:
```
cd <CLib base directory>
./test.sh
```

## Compiling the test binary:
The binary for the test program is outputted to `buildtest/test` and can be built using:
```
cd <CLib base directory>
make test
```

# :book: License
CLib uses the [MIT](https://choosealicense.com/licenses/mit/) license.

repository: Sothatsit/CLib

repo_name: Sothatsit/CLib


text:
---
keyword: [Alibaba Cloud, SCU, storage package, storage cost, capacity package, pay-as-you-go]
---

# Storage capacity units

You can use storage capacity units \(SCUs\) to offset the pay-as-you-go bills of storage resources such as disks, Object Storage Service \(OSS\), Apsara File Storage NAS \(NAS\), and snapshots. SCUs use the subscription billing method. The all upfront payment option is supported.

## Billing method

SCUs use the subscription billing method, and are billed based on their capacity and validity period. For more information about pricing, see the Pricing tab on the [Storage Capacity Unit](https://www.alibabacloud.com/product/scu/pricing) page.

-   SCU capacity: For the capacity specifications that SCUs support, see [Overview](/intl.en-US/Block Storage/Storage capacity units/Overview.md).
-   Validity period: You can subscribe to an SCU for a period of 1 month, 2 months, 3 months, 6 months, 12 months, 3 years, or 5 years. If you use an annual or multi-year subscription, you can receive some discounts.

SCUs support only the all upfront payment option. You must make a full payment at purchase.

Sum = Validity period × SCU capacity × SCU unit price.Unit: USD.

## Usage rules

After you purchase an SCU, the SCU automatically matches qualified pay-as-you-go storage resources to offset their bills before the SCU expires. When the used capacity exceeds the SCU capacity, the excess capacity is billed on a pay-as-you-go basis.

The amount of storage capacity that an SCU can offset varies based on the types of resources to which the SCU is applied. For more information, see [Usage rules](/intl.en-US/Block Storage/Storage capacity units/Usage rules.md).

## Expiration

After an SCU expires, you cannot use it to offset the bills of pay-as-you-go storage resources. If you have no other SCUs within the same region, those pay-as-you-go resources are billed on a pay-as-you-go basis.

path: /intl.en-US/Pricing/Billing methods/Storage capacity units.md

filename: Storage capacity units.md


text:
---
{
  "title": "Unsupervised Learning of Morphology",
  "date": "2011-06-01",
  "authors": [
    "H. Hammarström",
    "L. Borin"
  ],
  "abstract": "This article surveys work on Unsupervised Learning of Morphology. We define Unsupervised Learning of Morphology as the problem of inducing a description (of some kind, even if only morpheme-segmentation) of how orthographic words are built up given only raw text data of a language. We briefly go through the history and motivation of the this problem. Next, over 200 items of work are listed with a brief characterization, and the most important ideas in the field are critically discussed. We summarize the achievements so far and give pointers for future developments.",
  "links": [
    {
      "resource": "PDF",
      "icon": "pdf",
      "url": "http://aclweb.org/anthology//J/J11/J11-2002.pdf"
    },
    {
      "resource": "Semantic Scholar",
      "icon": "semanticscholar",
      "url": "https://www.semanticscholar.org/paper/46784cdb96bfafddd1452760f167193b4cf7c8ac"
    }
  ],
  "supervision": [],
  "tasks": [],
  "methods": [],
  "thumbnail": "unsupervised-learning-of-morphology-thumb.jpg",
  "card": "unsupervised-learning-of-morphology-card.jpg",
  "s2_paper_id": "46784cdb96bfafddd1452760f167193b4cf7c8ac"
}
---

repository: virtualgraham/unsupervisedpapers

repo_name: virtualgraham/unsupervisedpapers


text:
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

- Switched from nanomsg (Release 1.1.2) to NNG (Release v1.0.1)
- Reverted from NNG back to nanomsg


text:
---
author: gep13
comments: true
date: 2011-12-20 12:50:13+00:00
layout: post
slug: xaml-on-sl5-wp7-win8-and-wpf-training-course
title: XAML on SL5, WP7, Win8 and WPF Training Course
wordpress_id: 3738
categories:
- Blog
- Training
tags:
- Metro
- Silverlight 5
- Windows 8
- WP7
- WPF
---

I have just found out about an interesting training course that is happening in London next year. The full details of the event can be found here:

[http://www.silverlightshow.net/trainings/training_london0212.aspx](http://www.silverlightshow.net/trainings/training_london0212.aspx)

There is an early bird discount available if you order before January 20th 2012.

branch_name: refs/heads/source

extension: markdown


text:
# Contributing to Spectrum

We aim to make contributing to this project as easy and transparent as possible.

## Issues

We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.

## Security Issues

Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue.

## Pull Requests

We welcome pull requests.

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If you've changed or added APIs, update the documentation.
4. Make sure the test suite passes.
5. If you haven't already, complete the [Contributor License Agreement](https://code.facebook.com/cla) ("CLA").

## Our Development Process

Each pull request is first submitted into Facebook's internal repositories by a Facebook team member. Once the commit has successfully passed Facebook's internal test suite, it will be exported back out from Facebook's repository. We endeavour to do this as soon as possible for all commits.

## Contributor License Agreement ("CLA")

In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Facebook's open source projects.

Complete your CLA here: https://code.facebook.com/cla.

## License

By contributing to Spectrum, you agree that your contributions will be licensed under its MIT license.

## Coding Style

Match the style and conventions of the surrounding code. We have automated tools that will enforce style for some files (e.g. the C++ core) once we import your pull request into our internal code reviewing tools.

repository: facebookincubator/spectrum

branch_name: refs/heads/main

repo_name: facebookincubator/spectrum


text:
# Big Data Project 3
This is the project 3 for the Big Data Analytics Course (CIIC 5995-116), Spring 2017 at the University of Puerto Rico, Mayaguez Campus. Implemented real-time sentiment analysis of tweets using Spark, Spark Streaming, SparkSQL, Hive, Kafka, and MLLib. Visualizations were made using plotly, a Python library based on D3.js.

Made by Andrés Hernández

## Visualization

#### Percentage of Positive Tweets about Trump that contained the words Trump, MAGA, Dictator, Drain, Swamp, Impeach, or Comey each hour.


text:
title: SmackJeeves/SFCForestofDreams
url: "/comics/SmackJeeves_SFCForestofDreams.html"
---
Dosage comic SmackJeeves/SFCForestofDreams
-----------------------------------------

Description	A strict, megalomaniacal lioness. A egocentric, muscular vampire. A sarcastic, antisocial eraser. A surprisingly sane blob. A small, mute pikmin. An optimistic, friendly green thing. A stubborn, determined mouse. A curious woman from the future. A meek, brilliant scientist. A calm, fatherly fighter. A serious, taciturn war veteran. A crazy, hyper girl. A confident, eager architect. A savvy, sly chimpanzee. A frustrated, busty teenager. A sad, lonely emo. A fangirlish, lovestruck fairy. A dominant, genius octopus. A loud, grumpy senior citizen. And a sadistic, creepy alien. Who will win the $1,000,000 grand prize?

Website	http://sfcforestofdreams.smackjeeves.com/comics/

Genre	Other

Language	English

Adult content	no

Status	ok on 26.05.2013

Votes	0

[Edit this info](SmackJeeves_SFCForestofDreams_edit.html) or go back to the [comic list](../comic-index.html).

repository: pataluc/dosage

repo_name: pataluc/dosage


text:
### Why state & render model separation

This allows us to keep the view very stupid. Let's say we have a state class such as this

```kotlin
data class State(
  val userInfo: Lce<UserInfo>,
  val saveRequest: Lce<SaveResponse>? = null
)

// UI layer now has to contain logic to process these properties.
fun render(state: State) {
  saveButton.isEnabled = state.userInfo.hasData() &&
    (state.saveRequest == null && !state.saveRequest.isLoading())
}
```

To avoid having such logic in the view, we have created the RenderModel concept.
```kotlin
data class RenderModel(
  val isSaveEnabled: Boolean
)
```

The logic where we do this transformation is encapsulated in the RenderModelGenerator.

```kotlin
class MyRenderModelGenerator: RenderModelGenerator<State, RenderModel> {
  override fun toRenderModel(state: State): RenderModel {
    return RenderModel(
      isSaveEnabled = state.userInfo.hasData() &&
        (state.saveRequest == null && !state.saveRequest.isLoading())
    )
  }
}
```

Now, the UI would receive a RenderModel instead of State. Also, we can now easily unit test that logic separately from the view.

repository: instacart/formula

gha_language: Kotlin

repo_name: instacart/formula


text:
# ResharperJasmineTemplates

## Install

1. Save ResharperJasmineTemplates.DotSettings to your computer.
2. In Visual Studio, on the main menu, choose ReSharper | Tools | Templates Explorer.
3. In the Templates Explorer window that appears, click the Live Templates tab.
4. Click on Import button in the toolbar.
5. In the Open Templates File dialog that appears, locate the ResharperJasmineTemplates.DotSettings file you saved.
6. Click Open.

![Image](media/InstallationTutorial.gif)

## Use

To use a shortcut, type the first few characters as described below and hit tab.

Supported shortcuts
* afterEach
* beforeEach
* desc
* expect
* it

![Image](media/UsageTutorial.gif)


text:
# Simple-RL-Terminal-Environment
This is a simple Reinforcement Learning Terminal Environment. It is made for 2 agents with turn based movements, but it is meant as only a base it can be extended for multiple agents and other game types.

## Getting Started

Clone or download the repo recursively.

You can either include the library in your own Python script

Like this:

```
import World from World

...
```

Or you can run test.py and watch the magic

Like this:

```
python test.py
```

### Prerequisites/Installation

You will need the following python libraries: numpy and time. Which can both be downloaded through pip installation.

For example:

```
sudo pip install <missing pyhton library>
```

## Authors

* **Willie McClinton**


text:
# [1.14.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.13.0...v1.14.0) (2023-01-05)

### Features

* Add options to ignore specific urls and regex  patterns ([#70](https://github.com/alexbrazier/react-native-network-logger/issues/70)) ([5ee6c3e](https://github.com/alexbrazier/react-native-network-logger/commit/5ee6c3e84408d7338e5549e14a5f25d184cc1dee))

# [1.13.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.12.0...v1.13.0) (2022-08-20)

### Features

* Add option to export all logs as HAR ([#36](https://github.com/alexbrazier/react-native-network-logger/issues/36)) ([c3b7dda](https://github.com/alexbrazier/react-native-network-logger/commit/c3b7ddaf56f2714dab07d2b8094b38faf674c1d9))

# [1.12.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.11.0...v1.12.0) (2021-11-02)

### Features

* Add ability to set custom theme ([#60](https://github.com/alexbrazier/react-native-network-logger/issues/60)) ([75598c0](https://github.com/alexbrazier/react-native-network-logger/commit/75598c03e55f3525c58b5bbc945496918e135494))

# [1.11.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.10.1...v1.11.0) (2021-08-24)

### Features

* Warn if the logger doesn't start due to duplicate logger ([#56](https://github.com/alexbrazier/react-native-network-logger/issues/56)) ([35b54e0](https://github.com/alexbrazier/react-native-network-logger/commit/35b54e08c33e4a32ff61d253fecd82697abbca69))

## [1.10.1](https://github.com/alexbrazier/react-native-network-logger/compare/v1.10.0...v1.10.1) (2021-07-29)

### Bug Fixes

* Disable the logger if used on a web project ([#53](https://github.com/alexbrazier/react-native-network-logger/issues/53)) ([800c948](https://github.com/alexbrazier/react-native-network-logger/commit/800c94872219922c35a633fa53046fd43a29a09b))

# [1.10.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.9.0...v1.10.0) (2021-06-27)

### Features

* Add basic support for GraphQL ([#49](https://github.com/alexbrazier/react-native-network-logger/issues/49)) ([6c11bb2](https://github.com/alexbrazier/react-native-network-logger/commit/6c11bb2b7b887fa75aead0fde44523aced84d62b))

# [1.9.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.8.1...v1.9.0) (2021-05-06)

### Features

* Add `ignoredHosts` option to ignore specified hosts ([#47](https://github.com/alexbrazier/react-native-network-logger/issues/47)) ([8eb6dd6](https://github.com/alexbrazier/react-native-network-logger/commit/8eb6dd6c2d953d5bb1f92bab9eac8a1f289af39b))

## [1.8.1](https://github.com/alexbrazier/react-native-network-logger/compare/v1.8.0...v1.8.1) (2020-11-04)

### Bug Fixes

* dont try and update unmounted component ([#38](https://github.com/alexbrazier/react-native-network-logger/issues/38)) ([59af7e9](https://github.com/alexbrazier/react-native-network-logger/commit/59af7e95af79463efe7d7540b76e4110b1af5dca))

# [1.8.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.7.0...v1.8.0) (2020-10-06)

### Bug Fixes

* Request not showing up until response received ([#33](https://github.com/alexbrazier/react-native-network-logger/issues/33)) ([4b3ab62](https://github.com/alexbrazier/react-native-network-logger/commit/4b3ab62d3279d4917f1c0a159f6d1cb03ea70812))

### Features

* Changed inflight status color to text color ([#30](https://github.com/alexbrazier/react-native-network-logger/issues/30)) ([563ac95](https://github.com/alexbrazier/react-native-network-logger/commit/563ac95ba685ecd784379f3cb8656625ea3abd48))

# [1.7.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.6.0...v1.7.0) (2020-09-22)

### Features

* Add search box to filter Requests by URL ([#28](https://github.com/alexbrazier/react-native-network-logger/issues/28)) ([e1cbe9a](https://github.com/alexbrazier/react-native-network-logger/commit/e1cbe9adef14b5297cb5b54584b98c8f9173e64c))
* Grouped the Request and Response Sections ([#25](https://github.com/alexbrazier/react-native-network-logger/issues/25)) ([b3ca2e3](https://github.com/alexbrazier/react-native-network-logger/commit/b3ca2e30cbbc4102b7be1b03d164c8a019226658))

# [1.6.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.5.0...v1.6.0) (2020-09-13)

### Bug Fixes

* Remember scroll position when navigating back to requests ([#22](https://github.com/alexbrazier/react-native-network-logger/issues/22)) ([91e6768](https://github.com/alexbrazier/react-native-network-logger/commit/91e67682c25b562339d28316876b34cf953902a1))
* Request details close button overlap ([#23](https://github.com/alexbrazier/react-native-network-logger/issues/23)) ([7c21317](https://github.com/alexbrazier/react-native-network-logger/commit/7c21317a2073160bdff17fd930ac4ecc27b4c3de))

### Features

* Add option to use existing back button to navigate ([#24](https://github.com/alexbrazier/react-native-network-logger/issues/24)) ([054167f](https://github.com/alexbrazier/react-native-network-logger/commit/054167f67303c1b3cdb18710d477211811c4e760))

# [1.5.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.4.1...v1.5.0) (2020-07-27)

### Bug Fixes

* Issue when sending request with FormData ([1c2ea1c](https://github.com/alexbrazier/react-native-network-logger/commit/1c2ea1ce7aa30f2836c10747033dab6a63215b10))
* Issue when sharing request that isn't json ([202c31d](https://github.com/alexbrazier/react-native-network-logger/commit/202c31dae94f05b0f56f7e74be3c7e0e30f3933a))

### Features

* Add option to change sort order and set default to desc ([#14](https://github.com/alexbrazier/react-native-network-logger/issues/14)) ([3aedb0c](https://github.com/alexbrazier/react-native-network-logger/commit/3aedb0c1effc3d3bd7b5f9c95aac28050f482d5b))

## [1.4.1](https://github.com/alexbrazier/react-native-network-logger/compare/v1.4.0...v1.4.1) (2020-07-16)

### Bug Fixes

* Issue with event listeners ([430eefd](https://github.com/alexbrazier/react-native-network-logger/commit/430eefd79477966edb22c1e395b122aac0f4d8fa))
* Remove type imports/exports to fix for older TS versions ([#17](https://github.com/alexbrazier/react-native-network-logger/issues/17)) ([f4cbefa](https://github.com/alexbrazier/react-native-network-logger/commit/f4cbefa7afe0988818134482b6d0ea46ae77efcd))

# [1.4.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.3.2...v1.4.0) (2020-06-28)

### Bug Fixes

* Issue causing delay to updates when viewing logger page ([427e13c](https://github.com/alexbrazier/react-native-network-logger/commit/427e13ce017137ab6c6be05ac51b647b443ffe86))

### Features

* Add option to clear all requests ([506cd23](https://github.com/alexbrazier/react-native-network-logger/commit/506cd23769f9ef02b4b299abd0a9fd426b0fc628))
* Add option to configure max requests stored and set default to 500 ([c75f926](https://github.com/alexbrazier/react-native-network-logger/commit/c75f926d478323bea46348ba9de77277c3e66fca))
* Show request time on logs ([d9115fd](https://github.com/alexbrazier/react-native-network-logger/commit/d9115fd2b2cbb12b88f885248d6496d4e1cd0888))

## [1.3.2](https://github.com/alexbrazier/react-native-network-logger/compare/v1.3.1...v1.3.2) (2020-06-25)

### Bug Fixes

* Issue with large response not rendering on iOS ([#9](https://github.com/alexbrazier/react-native-network-logger/issues/9)) ([a604d03](https://github.com/alexbrazier/react-native-network-logger/commit/a604d039ed7549e2557d98a902fdf49f279a2048))

## [1.3.1](https://github.com/alexbrazier/react-native-network-logger/compare/v1.3.0...v1.3.1) (2020-06-24)

### Bug Fixes

* curl export to add data and escape characters ([82931b5](https://github.com/alexbrazier/react-native-network-logger/commit/82931b5817714a6c231fdd7d845bc0383a46bd4a))
* Error when viewing request that has error, closes [#7](https://github.com/alexbrazier/react-native-network-logger/issues/7) ([f0bdd3d](https://github.com/alexbrazier/react-native-network-logger/commit/f0bdd3d4735b5329fe844d27e2754783731f3478))
* Improve accessibility with voiceover and talkback ([ed4339b](https://github.com/alexbrazier/react-native-network-logger/commit/ed4339b022279dd0f154343dcc0761e646c88152))

# [1.3.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.2.1...v1.3.0) (2020-06-22)

### Features

* Add share buttons to share part or full requests, including cURL ([3425d7d](https://github.com/alexbrazier/react-native-network-logger/commit/3425d7d8923eebcf815b2dbb93f0fbfef6918c42)), closes [#2](https://github.com/alexbrazier/react-native-network-logger/issues/2)

## [1.2.1](https://github.com/alexbrazier/react-native-network-logger/compare/v1.2.0...v1.2.1) (2020-06-22)

### Bug Fixes

* Typescript declarations path ([4f5bcb4](https://github.com/alexbrazier/react-native-network-logger/commit/4f5bcb40f4a18ec3c20173d06a30cb7cb9b342b8))

# [1.2.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.1.0...v1.2.0) (2020-06-20)

### Features

* Make themeable and add dark theme ([e5fcad6](https://github.com/alexbrazier/react-native-network-logger/commit/e5fcad6492dc5a4e8674bac68a22c8a826018c76))

# [1.1.0](https://github.com/alexbrazier/react-native-network-logger/compare/v1.0.3...v1.1.0) (2020-06-20)

### Bug Fixes

* Parse blob http responses, closes [#1](https://github.com/alexbrazier/react-native-network-logger/issues/1) ([e845a29](https://github.com/alexbrazier/react-native-network-logger/commit/e845a29f6b9a70db2732189167c6ae44d7f5741d))

### Features

* Add duration to request ([f43d3da](https://github.com/alexbrazier/react-native-network-logger/commit/f43d3da45156ecd0fee7d3a33f61cae105176570))
* Redesign ([378bf56](https://github.com/alexbrazier/react-native-network-logger/commit/378bf56b1a11c4934f6e3b424058d704fbb043ab))

## [1.0.3](https://github.com/alexbrazier/react-native-network-logger/compare/v1.0.3...v1.1.0) (2020-06-19)

### Bug Fixes

* Typescript export location ([0e7cbe7](https://github.com/alexbrazier/react-native-network-logger/commit/0e7cbe76be6ef4be013cad27f94997462427d40a))

## [1.0.2](https://github.com/alexbrazier/react-native-network-logger/compare/v1.0.3...v1.1.0) (2020-06-19)

### Bug Fixes

* exported component issue ([098f941](https://github.com/alexbrazier/react-native-network-logger/commit/098f9411115abfe7334647dcd61d0b96107fc4ad))

## [1.0.1](https://github.com/alexbrazier/react-native-network-logger/compare/v1.0.3...v1.1.0) (2020-06-19)

repository: wisnuprama/react-native-network-logger

repo_name: wisnuprama/react-native-network-logger


text:
# Upgrading RabbitMQ

* Current default RabbitMQ version: 3.6.15
* Example target version:3.8.5-1
## Dependency on Erlang Version
* Current default Erlang version: 20.2.2
* Example target version: 23.0.2

Refer to [RabbitMQ Erlang Version Requirements](https://www.rabbitmq.com/which-erlang.html) for more details.
Refer to [RabbitMQ Upgrade documentation](https://www.rabbitmq.com/upgrade.html#rabbitmq-cluster-configuration) for more details.

1. Ensure that the RabbitMQ  config is up to date

    ```
    $ cchq <env> ap deploy_rabbitmq.yml
    ```

2. Update the RabbitMQ version number in `public.yml`

    **environments/<env>/public.yml**
    ```
    rabbitmq_version: 3.8.5-1
    ```
3. Update the Erlang version in `main.yml`

   **src/commcare_cloud/ansible/roles/rabbitmq/defaults/main.yml**
   ```
   erlang: 1:23.0.2-2
   ```

4. Full RabbitMQ Cluster downtime is required to upgrade from 3.6.15 to 3.8.5-1 version.

5. Export the current configuration backup using rabbitmqadmin or from rabbitmq console.

    **Download rabbitmqadmin command from "http://<IP-of-RabbitMQ>:15672/cli/"**
    ```
    $ rabbitmqadmin -u <usernamefromvault> -p <passwordfromvault> -U http://<IP-of-RabbitMQ>:15672 export rabbitmq-backup-config.json
    ```

6. Stop the RabbitMQ service [ if in cluster then stop them in sequence] .

7. Upgrade the RabbitMQ on the first node [ Upgrade the last node that was stopped first , if in cluster ]

8. Update RabbitMQ :

    ```
    $ cchq <env> ap deploy_rabbitmq.yml
    ```

----

## Alternative strategy: migrate to new RabbitMQ instance

If you want to do the migration with no downtime, another method is to set up a new rabbitmq machine
with the target version and gracefully drain the old one while directing traffic to the new one.

1. Set up the new machine using the normal process (make sure it's under [rabbitmq] in the inventory).
2. It will be important at each point in the transition to have a good read on where messages are going
    or accumulating. To do that, run
    ```
    (local) $ cchq production ssh ansible@<machine>
    (server) $ tmux
    (server|tmux) $ sudo watch "rabbitmqctl list_queues -p commcarehq name messages | grep -v '[^0-9]0$' | sort"
    ```
    in a tmux session on each machine (old and new).
3. Assuming you have multiple celery machines, pick some to be the "bridge" machines that
    will read from the old and write to the new, eventually draining them; the remaining machines will get
    all new traffic. In the inventory file, give each of these "bridge" celery machines the variable
    ```
    rabbitmq_migration_bridge=true
    ```
4. Edit public.yml to have
    ```
    AMQP_HOST: "{{ <new rabbitmq ip> }}"  # Maybe "{{ groups.rabbitmq.0 }}"
    OLD_AMQP_HOST: "{{ <old rabbitmq ip> }}"  # Maybe "{{ groups.rabbitmq.1 }}"
    ```
   and run
    ```
    cchq <env> update-config
    ```
   but don't restart services yet.
   Adding `OLD_AMQP_HOST` will make celery machines with `rabbitmq_migration_bridge=true` get different
   broker settings in `localsettings.py` that make it read from the old and write to the new rabbitmq.
5. Check to make sure the connection to the new rabbitmq machine is working by running
    ```
    $ cchq production django-manage shell
    >>> from corehq.celery_monitoring.tasks import *
    >>> heartbeat__analytics_queue.delay()
    ```
    which will trigger a task and should write to the new machine. Check the tmux watch command you have running
    on the new machine to make sure a task went there.
6. Restart services with
    ```
    cchq <env> fab restart_services
    ```
    to pick up the changes from 4 & 5. All machines will now read from and write to the new machine,
    except for the "bridge celery machines" you chose, which will now read from the old and write to the new.
7. Watch the "watch" command on the old machine until all of the queues are fully drained.
8. Finally (make sure you've removed the `OLD_AMQP_HOST` variable), run
    ```
    cchq <env> update-config
    ```
   You can leave `rabbitmq_migration_bridge=true` on the portion of celery machines you added it to
   for the next time, or you can remove it now. When `OLD_AMQP_HOST` is not set, it has no effect.

repository: rameshganne/commcare-cloud

repo_name: rameshganne/commcare-cloud


text:
---
title:  Prerequisites
date:  04/01/2020
---

#### inTro

Read This Week’s Passage: Daniel 2:1–30

Prerequisites

Daniel chapter 1 begins with the theme of temperance and its correlation with spiritual revelations, while chapter 2 contains the theme of prayer and its relationship with spiritual revelation. A crisis has arisen in Babylon, and Daniel and his three friends pray. God’s answer to their prayers affected not just their circumstance but also Christianity’s understanding of prophetic history forever. And it all began in a small-group prayer meeting!

The importance of prayer is often talked about but is seldom practiced beyond the formalities of praying before meals and before one goes to sleep. It has almost become a mere ritual or rite of passage that Christians do out of habit. Thus the organic, authentic, and invigorating potential of prayer is seldom experienced. Furthermore, the transformative power of prayer for the individual as well as the global impact is lost.

We might think of prophecy as an intellectual exercise of the mind. However, the book of Daniel grounds prophetic understanding in physical temperance and spiritual prayer. The book of Daniel does not assume a dualistic approach of the separation between mind, body, and the spiritual nature to understanding. Rather, it necessitates that the entire human being be conditioned for spiritual revelation. Prayer is the prerequisite to spiritual prophetic understanding.

#### inScribe

Write out Daniel 2:1–30 from the translation of your choice. If you’re pressed for time, write out Daniel 2:16–23 from your Bible translation of choice. You may also rewrite the passage in your own words, outline, or mind map the chapter.

``

repository: Adventech/sabbath-school-lessons

branch_name: refs/heads/stage

repo_name: Adventech/sabbath-school-lessons


text:
![](https://www.mbejda.com/content/images/2017/12/Copy-of-oh-javascript--4-.png)
# Plot.ly Chart Export
*PlotlyChartExport* uses Phantom.js to render plot.ly charts on the server. It crops the chart, base64 encodes it and returns the encoded chart in a resolving promise.
It does not rely on the filesystem nor does it rely on graphics libraries like `Cairo` making it an effective chart rendering solution for serverless environments.

- Only 1 Dependency
- Works in Serverless Environments
- Size < 10MB

### Installation
```
npm install plotlychartexport --save
```

### Usage
```javascript
/// include library
const exp = require('plotlychartexport');

/// define plot.ly data properties
let trace1 = {
    x: [1, 2, 3, 4],
    y: [10, 15, 13, 17],
    type: 'scatter'
};
let trace2 = {
    x: [1, 2, 3, 4],
    y: [16, 5, 11, 9],
    type: 'scatter'
};

/// define plot.ly layout
let layout = {
    title: 'Line and Scatter Plot'
};

/// run render command
exp.render([trace1, trace2], layout).then((base) => {
    console.log(base); /// base64
}, (error) => {
    console.error(error);
})

```

## Create a Serverless Chart Export
Checkout this tutorial I made on how to create serverless chart exports on AWS to see the module in action.
[https://www.mbejda.com/creating-serverless-plotly-chart-exports](https://www.mbejda.com/creating-serverless-plotly-chart-exports/)

If you are experiencing any issues with this module open up a ticket and send me a tweet.
[@notMiloBejda](https://twitter.com/notMiloBejda)

repository: studyeverything/plotlychartexport

repo_name: studyeverything/plotlychartexport


text:
# PHF

A simple C++ perfect hash function generator. It is based on the ideas
from this paper:

* Antoine Limasset, Guillaume Rizk, Rayan Chikhi, Pierre Peterlongo.
[Fast and scalable minimal perfect hashing for massive key sets](https://arxiv.org/abs/1702.03154)

The authors of the paper provided their own implementation: [BBHash](https://github.com/rizkg/BBHash).

My implementation provides a different interface and features, It
is not supposed to handle massive key sets. Rather it is oriented
to getting fast and simple lookup tables for moderate key sets.

repository: ademakov/PHF

repo_name: ademakov/PHF


text:
---
layout: post
title: "Storing Game Data in the Cloud: Keeping Data Consistent"
description: You're using Azure Mobile Services to persist your data but things are denormalized. How do you keep data consistent? Find out how. Source code included.
category: Making Games
author: Alex Schearer
slug: consistency-and-azure-mobile-services
---

Last time we looked at how you could [persist your game data using Azure Mobile Services]({%post_url blog/2013-05-22-Azure_Mobile_Services_Game_Data %}).
Because Azure Mobile Services is a NoSQL data store I recommended that you denormalize
your data in order to reduce the number of requests needed to fetch things on the
client. All well and good, but this decision has a consequence. Namely, how do you
keep the duplicated data up to date?

Before continuing, have a look at the data on the server. Notice that we've duplicated
the players' names into the games table. This allows you to fetch all the needed
information for a game in a single query, but if the a player updates her name the
games table will be out of date.

Denormalized Game Data Stored in Azure

So how do you keep your data consistent? For Scramble Legends I evaluated three options:

  1. Run a CRON job or worker thread on the server. Have it test for inconsistencies and fix them
  2. Test for inconsistency on the client or server and update accordingly
  3. Update the game data when updating the player data

### Fix Inconsistency over Time
The first option I considered was to create a second process responsible for
dealing with inconsistencies – be it a CRON script, a worker thread, or a queue
containing a list of objects to update. Azure Mobile Services makes it relatively
easy to write CRON scripts using JavaScript and the rest of Azure has the tools
necessary to do more complex stuff using C#.

For write-heavy games this solution is very practical. The writes won't carry any
extra overhead trying to keep things consistent, and you can always add more CRON
jobs or worker threads as your workload grows. As long as your game can deal with
a little inconsistency, e.g. the player's name being out of date before the CRON
script has run, then there's a lot to like.

With all that said I opted against this approach for Scramble Legends. While I
think using a queue and worker thread to track and propagate changes makes sense
for busier applications I wanted to avoid the cost and overhead associated with
developing and running them. In reality this approach will require you to write
more and more error-prone code, so I would save it for later when you have proven
your game needs the extra performance.

### Fix Inconsistency on Read
Next I considered detecting inconsistencies when reading game data and updating the
game table as necessary. Honestly, this is a terrible solution. In practice it would
require querying the player table every time the game data is read – the entire
reason we denormalized the data was to avoid this query! Furthermore, in the event
of an inconsistency three queries would need to be made: one to load the game data,
one to load the player data, and one to update the game data. Each new query
increases the likelihood for something to go wrong. The goal is to reduce the
chances for failure and the number of queries as much as possible, so this option
is a non-starter.

### Fix Inconsistency when Updating the Player
Despite its drawbacks the last option got me thinking: if fixing things on read is
too expensive what about on write? Using Azure Mobile Services it's possible to
write a script which runs whenever the player data is updated. At that point it's
very likely the player's game data will become inconsistent, so why not proactively
update it? For Scramble Legends this is the approach I took. What's more you can
have the script return control to the client as soon as the player is updated and
then update the player's games without blocking the UI:

~~~ javascript
function update(item, user, request) {
    var gamesTable = tables.getTable('GameData');
    request.execute({
        success: function(result) {
            // Asychronously update games the player is part of
            gamesTable.where(function(player)
                            {
                                return this.OwnerId == player.PlayerId ||
                                       this.OpponentId == player.PlayerId
                            }, item)
                      .read({
                success: function(games) {
                    games.forEach(function(game) {
                        if (game.OwnerId == item.PlayerId) {
                            game.OwnerName = item.Name;
                            game.OwnerAvatar = item.AvatarType;
                        } else {
                            game.OpponentName = item.Name;
                            game.OpponentAvatar = item.AvatarType;
                        }

                        gamesTable.update(game);
                    });
                }
            });

            // Respond to the player immediately so the UI isn't blocked
            request.respond();
        }
    });
}
~~~

### Wrapping Up
There are a number of ways to keep your game's data consistent. Which one is best depends
on the profile of your game. In my opinion it's safe to start with the simpler, less
optimized approach I took for Scramble Legends and then upgrade to a more robust, scalable
solution when you have proven there’s a market for your game.

[Source code for the example in this post.](https://gist.github.com/aschearer/5642193)

{% include windows-8-dev-footer.html %}


text:
---
title: "PinePhone p-boot Setup"
date: 2020-09-13T17:22:43-04:00
draft: false
---

Here's a general walkthrough for setting up a bootloader on the PinePhone.  We're going to use p-boot, which has nice start-times and lets you customize your boot screen with fancy graphics.  SD-card is not supplied with this tutorial, you need to provide your own.

These instructions are for Linux, but should be distribution-agnostic.  At the end, I will be using a Gentoo-specific tool, but it doesn't involve installing p-boot.

First, we need to grab some cross-compilers.  We will need ARM64 and OpenRisk.  Grab the toolchains and add the compiler's to your PATH:

```bash
$ wget https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--musl--bleeding-edge-2020.02-2.tar.bz2
$ wget https://toolchains.bootlin.com/downloads/releases/toolchains/openrisc/tarballs/openrisc--musl--bleeding-edge-2020.02-2.tar.bz2
$ tar xpf aarch64--musl--bleeding-edge-2020.02-2.tar.bz2
$ tar xpf openrisc--musl--bleeding-edge-2020.02-2.tar.bz2
$ export PATH="$(pwd)/aarch64--musl--bleeding-edge-2020.02-2/bin:$PATH"
$ export PATH="$(pwd)/openrisc--musl--bleeding-edge-2020.02-2/bin:$PATH"
```

Now let's retrieve p-boot:

```bash
$ git clone https://megous.com/git/p-boot/
```

First, we need to build the ARM firmware for bootstrapping the system.  Clone these repositories:

```bash
$ cd p-boot/fw
$ git clone https://github.com/ARM-software/arm-trusted-firmware.git atf
$ git clone https://github.com/crust-firmware/crust.git crust
```

The firmware needs some patches:

```bash
$ cd atf && git am ../atf.patch && cd ..
```

Now we need to edit a couple files to use the bootlin cross compilers:

* Edit `build-atf.sh`, set `CROSS_COMPILE` to `aarch64-buildroot-linux-musl-`
* Edit `crust/arch/or1k/Makefile`, set `CROSS_COMPILE` to `or1k-buildroot-linux-musl-`
* Edit `crust/Makefile`, set HOST_COMPILE to `aarch64-buildroot-linux-musl-`

Now build the firmware:

```bash
$ ./build-all.sh
```

If all goes well, you should now have a `fw.bin` file.  Now go into the build directory:

```bash
$ cd ../build
```

Edit `build.ninja`, set `aarch64_prefix` to `aarch64-buildroot-linux-musl-` and build:

```bash
$ ninja
```

You should now have the utilities for installing p-boot on your SD-card.  Before we do that, let's grab a pre-built Linux image to test it.  We'll use an image from the same maintainer as p-boot:

```bash
$ wget https://xff.cz/kernels/5.9/pp.tar.gz
$ tar xpf pp.tar.gz
$ ls pp-5.9/
board-1.0.dtb  board-1.1.dtb  board-1.2.dtb  headers  Image  linux.config  modules
```

As an optional step, you can also create your own splashscreen image.  You need `imagemagick` to do this.  Compile the `argb.c` program in the `theme` directory and run the following commands to convert your image into a format consumable for p-boot:

```bash
gcc -o argb argb.c
convert your-image.png your-image.rgba
./argb your-image.rgba pboot2.rgba
```

You will also need a `off.rgba` file for this.  You can find it in the `theme` directory or a prebuilt one in `example/files/`.  Also note that `pboot2.rgba` is the default image that is displayed when p-boot is loaded.

Now let's make the bootloader configuration:

```bash
$ mkdir config
$ cat > config/boot.conf <<EOF
no=0
  name=Test Linux
  atf=fw.bin
  dtb=board-1.2.dtb
  linux=Image
  bootargs=console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 ro rootwait panic=30 init=/hello
  splash=files/pboot2.argb
EOF
```

The `root` paramter is pointing to the third partition of the SD-card.  Also notice the `init` parameter is set to `/hello`.  More on that at the end...

Copy over the `fw.bin` firmware file.  Also copy the kernel image, `Image`, and the device tree blob for your Phone (`board-1.2.dtb` in my case).

```bash
$ ls config
boot.conf  files  fw.bin  Image  board-1.2.dtb
```

Also make a `files` directory and copy your splash images over:

```bash
$ ls config/files
off.argb  pboot2.argb
```

Now lets create a partition table on your SD-card.  It must be a DOS filesystem table.  Create a dedicated partition for p-boot, set it to Linux and set the bootable flag for it.  For example:

```bash
$ fdisk -l /dev/sdc
Disk /dev/sdc: 29.81 GiB,<PHONE_NUMBER>8 bytes, 62521344 sectors
Disk model: SD  Transcend
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x317e999c

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdc1  *       2048   206847   204800  100M 83 Linux
/dev/sdc2        206848  4401151  4194304    2G 82 Linux swap / Solaris
/dev/sdc3       4401152 62521343 58120192 27.7G 83 Linux
```

`sdc1` is the p-boot partition, `sdc2` is the swap partition, and `sdc3` is the root.

Finally, write the bootloader images to your SD-card.

```bash
$ dd if=p-boot.bin of=/dev/sdX bs=1024 seek=8
$ ./p-boot-conf-native config/ /dev/sdX# # This is going to the boot partition (sdc1 in my case)
```

Now we're done with the booatloader.  For good measure, let's test PID1 (remember the `init=/hello` parameter?).  I set up a compiler with Gentoo's crossdev tool and copied it out to the SD-card.

```bash
$ crossdev -t aarch64-linux-musl
# Wait a million years
$ cat > hello.c <<EOF
#include <stdio.h>
int main() {printf("Hello world\n");}
EOF
$ aarch646-linux-musl-gcc -static hello.c
$ mkfs.ext4 /dev/sdc3
$ mount /dev/sdc3 /mnt
$ cp a.out /mnt/hello
$ umount /mnt
```

Now the moment of truth.  Stick your SD-card in and see if it works.  Here's some pictures capturing the magical p-boot and kernel initialization process on my phone:


text:
# Warped by GroundZero

## Game Info

Warped is a platformer game developed by two students at Universitat Politècnica de Catalunya for the Game Development subject. As of collisions with the environment, the player can walk left or right, jump, and if it falls on a pit, it's sent to the start of the level. The game reads the map and most of the gameplay values from .xml files, and .tmx files generated via Tiled.

DISCLAIMER: The tileset used in this game is copyright free (credit to ansimuz, tileset URL: https://ansimuz.itch.io/warped-caves).
The tileset was edited in Adobe Photoshopc so the original work wont have as many elements in the tileset as ours.
The sprites used for the main character are taken from the 2007 game "Mega Man ZX Advent", developed
by Inti Creates and published by Capcom. We do not own the rights for these sprites, nor we
claim to have made them. All rights belong to Capcom.

##	Innovation

 - Assignment 1: For innovation (doing something that the assignment didn't require), we developed a system that can read all the animations of the player from a .tmx file, so that
animations can later be easily edited from Tiled. The number of animations the player has, and their names, still has to be specified in the code,
but all pushbacks (frame data) are read from the .tmx, and a designer can modify the .png spritesheet, and then set the animations from Tiled.

- Assignment 2: We created a method to load every collider automatically from an Object Layer in the TMX files. It differentiates between each type of possible colliders and sets them
depending on the value given in the TMX file. Pathfinding debug mode.

##	Controls

- A and D: 	Move the character left or right.

- J:		Jump. By inputting again in midair, the player can double-jump before touching ground again.

### Debug Features

- F1:		Start again from the first level of the game.
- F2:		Start again from the beginning of the current level.
- F2:		Start from the beginning of the second level.
- F5:		Save current state of the game. (save file: "save_game.xml")
- F6:		Load state from earlier save.
- F9:		See colliders/hitboxes.
- F10:		Godmode (can walk over pits, can double jump limitless, character changes visually).
- F11:		Enable/disable FPS cap (Capped at 30FPS)
- While in GodMode, you can click on the map twice. If the tiles are walkable, it will create a path from the first click (origin) to its destination, second click.

## Github

As stated on the license, anyone can look at or modify the code of this project.
It can be found here: https://github.com/Scarzard/Game_Development

## Authors

Joel Cabaco Pérez
   - [Joel's GitHub Link](https://github.com/dynamiczero99)

Victor Chen Chen
   - [Victor's GitHub Link](https://github.com/Scarzard)

## Tasklist:

- Victor Chen:
	- Timer and PerfTimer modules added.
	- Pathfinding module.
	- Pathfinding base code. Pathfinding debug mode added.
	- Overhaul of both maps.
	- Brofiler added for basic profiling features.
	- Title with relevant information
	- Framerate cap to 30FPS added.

- Joel Cabaco:
	- UML file creation.


text:
## Core Learning JavaScript

* ES6
* How nodejs Reactor Pattern/Architecture works
* Promises, Async/Await
* Classes, Objects, Arrays, Map and Set, JSON

## Core Learning RN

* React Native Architecture (Thread model, Fabric)
* Lifecycle Events
* Hooks and custom hooks
* Fetch vs Axios
* Navigation
* Deep Linking
* Analytics
* Geolocation
* Internationalization
* Animation
* Routing
* FlatList + Pagination
* Expo
* Offline: AsyncStorage
* Native Modules (IOS and Android)
* Debugging: JavaScript Remotely, React DevTools
* Performance and Profiling

## State Management

* Redux
* Context Api
* MobX

## Testing

* React Native Testing Library
* Jest
* Detox

## Advanced

* flash-list (https://shopify.github.io/flash-list/)
* lottie-web (https://github.com/airbnb/lottie-web)
* Bundle Visualizer (https://github.com/IjzerenHein/react-native-bundle-visualizer)
* Re.Pack (https://github.com/callstack/repack)
* Reactotron (https://github.com/infinitered/reactotron)
* Flipper (https://github.com/facebook/flipper)

## OOAD Challenges

* (1) Build a TAX system where different products have different tax per state and year.
* (2) Build a Logger Builder Router System where you can log into FS, ELK or any other log system where you can configure the logs to be sync or assync using the same API.
* (3) Build Render Template where the same temple can be render in HTML, PDF or CSV.
* (4) Build A Logistic System where you need to calculate different freigth prices based on volume, size and type of transportation i.e boat, truck, rail, prices are dynamic they keep changing.
* (5) Build Restaurant Queue System Capable of telling how long each dish will take.
* (6) Build Guitar Factory System where you can specify details of a guitar and the system creates a
custon guitar for you with OS, Specs, Models. The system should keep track of Inventory.
* (7) Build Ticket system, where you should be able to sell x number of ticker per different shows and
choose the seats number, zone of the venue, date and respect maximun capacity.

## Challenges

* (1) Build your own Wheater App(show the wheater in celcius/fahrenheit, annimations)
* (2) Build your own Trello(Simple Kanban board, create: cards, collumns, move, delete)
* (3) Build your own Netflix(Stream the movies from youtube)
* (4) Build your own Amazon Retail(List product, search, rate, recomendations)
* (5) Build your own Linux Terminal (ls, cat, mkdir, touch, echo, cd)
* (6) Build your own Slack (profile, chat rooms, notifications)
* (7) Build your own Notability (list, make notes)

## Books

* Eloquent JavaScript, 3rd Edition
https://www.amazon.com/Eloquent-JavaScript-3rd-Introduction-Programming-ebook/dp/B07C96Q217/ref=sr_1_1?crid=A87JZI6EYY7&keywords=eloquent+javascript&qid=1656112897&s=digital-text&sprefix=eloquent+javascript%2Cdigital-text%2C117&sr=1-1
* Effective TypeScript
https://www.amazon.com/Effective-TypeScript-Specific-Ways-Improve-ebook/dp/B07Z8HRZZ3/ref=sr_1_1?crid=2R5C4G7OYJIOX&keywords=effective+typescript&qid=1656112919&s=digital-text&sprefix=effective+typescript%2Cdigital-text%2C117&sr=1-1
* Implementation Patterns
https://www.amazon.com/Implementation-Patterns-Addison-Wesley-Signature-Beck-ebook/dp/B004UAALDW/ref=sr_1_1?crid=1A8IS7ZGD9B0J&keywords=implementation+patterns&qid=1656112944&s=digital-text&sprefix=implementation+patterns%2Cdigital-text%2C114&sr=1-1
* Unit Testing Principles, Practices, and Patterns
https://www.amazon.com/Unit-Testing-Principles-Practices-Patterns-ebook/dp/B09782L692/ref=sr_1_1?crid=2BWTGITULWF8K&keywords=unit+testing&qid=1656113183&s=digital-text&sprefix=unit+teesting%2Cdigital-text%2C118&sr=1-1
* Mastering React Native
https://www.amazon.com/Mastering-React-Native-Eric-Masiello-ebook/dp/B01LPRN15M/ref=sr_1_8?crid=3UX6YAQOJ9JV7&keywords=react-native&qid=1656112960&s=digital-text&sprefix=react-nativ%2Cdigital-text%2C129&sr=1-8
* Fullstack React Native: Create beautiful mobile apps with JavaScript and React Native
https://www.amazon.com/Fullstack-React-Native-beautiful-JavaScript-ebook/dp/B07Y8NJGKB/ref=sr_1_6?crid=3UX6YAQOJ9JV7&keywords=react-native&qid=1656112960&s=digital-text&sprefix=react-nativ%2Cdigital-text%2C129&sr=1-6
* React Cookbook
https://www.amazon.com/React-Cookbook-David-Griffiths-ebook/dp/B09CG7HCD8/ref=sr_1_4?crid=1K0XYP76DHUNO&keywords=react&qid=1656113389&s=digital-text&sprefix=reac%2Cdigital-text%2C131&sr=1-4
* 14 Habits of Highly Productive Developers
https://www.amazon.com/14-Habits-Highly-Productive-Developers-ebook/dp/B08BF74RRG/ref=sr_1_1?crid=1GORFEFKK2N3E&keywords=zeno+rocha&qid=1656113275&s=digital-text&sprefix=zeno+rocha%2Cdigital-text%2C124&sr=1-1
* Grokking Algorithms
https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious-ebook/dp/B09781V6F7/ref=sr_1_1?keywords=grokking+algorithms&qid=1656113304&s=digital-text&sprefix=groking+%2Cdigital-text%2C121&sr=1-1
* Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability
https://www.amazon.com/Dont-Make-Think-Revisited-Usability-ebook/dp/B00HJUBRPG/ref=sr_1_2?crid=3ET4QC9V7BL7F&keywords=usability&qid=1656113354&s=digital-text&sprefix=usability%2Cdigital-text%2C119&sr=1-2

repository: diegopacheco/tech-resources

repo_name: diegopacheco/tech-resources