text:
![Phrase Hunter](Art/logo.png)
###### *This game is entirely console/terminal based.*
![Preview](Art/SS.png)

## Information:
*Starting with 5 ♥'s you must avoid being eliminated.*

Phrase-Hunter is a genetic Hangman simulator with a touch of old-school ASCII graphics.

>Enter "quit" as a guess to exit the program.

        Created By: Carlos A. Marin - July 2019
![Preview](Art/bottom.png)

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: Python

gha_license_id: MIT

license_type: permissive


text:
## Private IOTA Testnet

When you want to perform some test/auditing against the IOTA Reference implementation (IRI), you probably want to test your assumptions against your own testnet (for some scenarios one node is enough, other require more nodes). Using the public testnet has the disadvantage that you are not alone on your tangle, so somebody else might confirm your transactions you like to stay unconfirmed, or breakpoints you add inside IRI can trigger by transactions done by others thyn you. Currently you will face some obstacles when trying to do so:

- The official wallet will not connect to any node which has not received at least one milestone from the coordinator
- As IOTA is not mineable, your accounts will start with 0 IOTA, and you cannot change this by mining some

To get around these obstacles, you need to perform these steps

- Build your own Snapshot.txt and recompile IRI to use it
- Once your recompiled IRI is started (or later whenever you want the milestone index to increase), run a testnet coordinator that will create a new milestone for you

This repository contains tools (written in Java) to build your own Snapshot and to run a coordinator once to create a new milestone.

## Step by step instructions

Get [iota.lib.java](https://github.com/iotaledger/iota.lib.java/) and install it into your local Maven repository:

    mvn install

Then get and compile this ([private-iota-testnet](https://github.com/schierlm/private-iota-testnet)) repository

    mvn package

Now it is time to build your own Snapshot. First decide how you want to split the 2 779 530 283 277 761 available IOTA to addresses, and which of them should belong to the same wallet.

Then start the interactive process:

    java -jar target/iota-testnet-tools-0.1-SNAPSHOT-jar-with-dependencies.jar SnapshotBuilder

It will ask you about the IOTA you want to assign (you can also use suffixes like Gi or Pi). Once you have assigned all IOTA, it will write a `Snapshot.txt` (to be compiled into iri) and a `Snapshot.log` (for you to remember the seeds to the addresses).

Get [iri](https://github.com/iotaledger/iri/) if you do not already have it.

Copy `Snapshot.txt` to iri/`src/main/resources`.

Comment out the [part that validates the snapshot signature](https://github.com/iotaledger/iri/blob/3ce0b5bbf737c37ce721af5bfa1ae7f246cbb2ae/src/main/java/com/iota/iri/Snapshot.java#L52-L72). It would also be possible to recreate the signature with a different signing key, but then you have to replace the signing key in the source code instead. So I think it is not worth the hassle and just decided to comment out the signature verification (The nodes will be only used by yourself, won't they?).

Compile and run iri as usual. When starting iri, make sure to include the `--testnet` switch, and that the current directory does not contain any `testnetdb` files from previous runs.

    java -jar iri.jar --testnet -p 14700

Before you can connect to your iri with your wallet, you need to run the coordinator to create the first milestone

    java -jar target/iota-testnet-tools-0.1-SNAPSHOT-jar-with-dependencies.jar Coordinator localhost 14700

After that you can use your wallet, log into one of your seeds, and attach addresses until you see your full balance.

In case you want a new milestone, just run the coordinator again.

***Have fun!***

## Reducing PoW

Testnet by default requires PoW for minWeightMagnitude=13. When performing larger scale tests, you might want to decrease this. To do so, you will have to
patch iri at [two](https://github.com/iotaledger/iri/blob/6e23c046ec2232ca2031018a6bbee4abaad7d9a7/src/main/java/com/iota/iri/conf/Configuration.java#L97-L98) [places](https://github.com/iotaledger/iri/blob/64b3d723331bfdfa14ed883de447eb2363d3821b/src/main/java/com/iota/iri/TransactionValidator.java#L54-L56) and recompile it. To build the package use `mvn package -Dmaven.test.skip=true` to prevent that tests will terminate the building process.

When using the official wallet, you also have to patch this. If you (like me) have trouble recompiling the Windows wallet, you can instead patch it in-place. Have a look at `AppData\Local\Programs\iota\resources\ui\js\ui.update.js` (search for `connection.minWeightMagnitude`) and `AppData\Local\Programs\iota\resources\app.asar` (search for `var minWeightMagnitudeMinimum`). Note that the second file is a binary file, so when patching it make sure not to destroy any control characters (use a hex editor or an editor like Notepad++ that can keep them intact), and to keep the file size the same. Custom code usually passes the minWeightMagnitude as a parameter anyway.

In most cases, however, it is enough to make sure you use minWeightMagnitude=13 instead of 14 and it will be "fast enough".

repository: laubsauger/private-iota-testnet

repo_name: laubsauger/private-iota-testnet


text:
# grunt-jsduck

Grunt task to compile [JSDuck](https://github.com/senchalabs/jsduck) documentation

## Getting Started

### Installation

At the moment the task works with either `~0.4.0` or `~0.3.0`.

You need to have Ruby and JSDuck installed. Refer to project homepage for installation instructions.

Install this grunt plugin next to your project's [grunt.js gruntfile](http://gruntjs.com/getting-started) with: `npm install grunt-jsduck`

Then add this line to your project's `grunt.js` gruntfile:

```javascript
grunt.loadNpmTasks('grunt-jsduck');
```

### Configuration

Inside your `grunt.js` file add a section named `jsduck`.
Read the [JSDuck Guide](https://github.com/senchalabs/jsduck/wiki/Guide) for an overview of its features.

#### src

Input directories containing JavaScript code to document.

#### dest

Output directory for generated documentation.

#### options

Additional options that will be passed to jsduck.  Run `jsduck --help` for a full list.

### Example configuration

```javascript
jsduck: {
    main: {
        // source paths with your code
        src: [
            'ext-4.1.1/src',
            'project1/js',
            'project2/js'
        ],

        // docs output dir
        dest: 'docs',

        // extra options
        options: {
            'builtin-classes': true,
            'warnings': ['-no_doc', '-dup_member', '-link_ambiguous'],
            'external': ['XMLHttpRequest']
        }
    }
}
```

### Running

Running the jsduck [multitask](https://github.com/gruntjs/grunt/wiki/Configuring-tasks) without additional parameters will execute it with all specified targets:

```
grunt jsduck
```

Running

```
grunt jsduck:main
```

will execute the task with `main` target.

Sometimes it's useful to override the output directory at compile time. You can pass it as a second argument like this:

```
grunt jsduck:main:/var/www/my-awesome-project/docs
```

## Contributing

Please follow the existing coding style. Respect the [`.editorconfig`](http://editorconfig.org) and [`.jshintrc`](https://github.com/jshint/jshint/#within-your-projects-directory-tree) files.

## License

Copyright (c) 2012-2013 Dmitry Pashkevich, contributors. Licensed under the MIT license.

repository: noikiy/magix

repo_name: noikiy/magix


text:
# Gemini load and plot data

The default file format for Gemini is HDF5.
NetCDF4 file IO is [optionally available](./Readme_cmake.md).
Raw file output was the original Gemini format, but does not support all features, is not tested and not recommended.

## Default plotting

To produce the default style plots for simulation run (python):

```sh
gemini_plot /tmp/mysim
```

The MATLAB version of this script can be invoked by starting MATLAB and running:

```matlab
direc='~/simulations/mysim'
gemini3d.vis.plotall(direc,{'png','eps'})
```
where the latter argument specifies the file type to which matlab will print the plots.

The script reads a sequence of files from a simulation.
This script saves a copy of the output plots into the simulation output directory.

## Loading simulation data

To load output data from a GEMINI simulation, e.g. for purposes of custom plotting or additional calculation, a `loadframe` API is provided.  Loadframe APIs work with any type of GEMINI file output, viz. with binary, hdf5, or netcdf output.

In python:

```sh
MH - please add commands to load variables into python workspace or whatever it is called.
```

In MATLAB:

```matlab
dat = gemini3d.loadframe(direc, "time", time)
```
This will load into the structure dat all of the plasma information from the simulation frame corresponding to output directory `direc` on time=datetime().  The time variable must be a MATLAB datetime structure; one can be built out of a datevec as follows:

```matlab
time=datetime([year,month,day,hour,minute,second])
```

The remaining arguments are optional and are mainly present to prevent the code from having to reload, e.g. the grid, if it is called repeatedly for different time frames in the same simulation.  The output dat contains fields `dat.ne,dat.Te,dat.Ti,dat.v1` etc. corresponding to different calculated variables of interest (see descriptions below).

By default the `loadframe` API will not load the grid or simulation configuration information; these require separate calls to gemini3d.readgrid and gemini3d.read_config.

To load the simulation information:

In Python:

```sh
MH - please add commands to load variables into python workspace or whatever it is called.
```

In MATLAB:

```matlab
cfg = gemini3d.read_config(path)
```

To load the grid a `readgrid` function is provided:

In Python:

```python
MH - please add commands to load variables into python workspace or whatever it is called.
```

In MATLAB

```matlab
xg = gemini3d.readgrid(path);
```
Here `path` is the path to the grid data file.

## Output file content

The particular format of the output files is specified by the user in the input config.nml file.  There are three options:

1. full output (`flagoutput=1` in the config.nml file) - output all state variables; very large file sizes will results, but this is required for building initial conditions and for some analysis that require detailed composition and temperature information.  Selecting full output will require a large amount of disk space  - *up to several terabytes per simulation*.  The other use for full output is that it is needed for any kind of simulation milestone/restart functionality.
2. average state parameter output (`flagoutput=2`) - species averaged temperature and velocity; electron density.  Probably best for most uses not requiring a full output of the plasma state.
3. density only output (`flagoutput=3`) - only electron density output.  Best for high-res instability runs where only the density is needed and the output cadence is high.  This choice for output saves an enormous amount of disk space.

MKSA units are used throughout.

## Time variables

`simdate` - a six element vector containing year, month, day, UT hour, UT minute, and UT seconds of the present frame

## Grid variables

<!--x1,x2,x3 - x1 is altitude (z in plots), x2 is east (x in plots), x3 north (y in plots); the sizes of these variables are stored in lxs.-->

All three dimensional arrays have dimensions ordered as `x1,x2,x3`, i.e. the first dimension corresponds to the *field-line* coordinate.

structure xg - members `xg.x1,2,3` are the position variables, `xg.h*` are the metric factors, `xg.dx*` are the finite differences.  For Cartesian coordinates x1 is altitude, x2 is eastward distance, x3 is northward distance (all meters).

`xg.glat,glon` are the latitudes and longitudes (degrees geographic) of each grid point, `xg.alt` is the altitude of each grid point.

`xg.r,theta,phi` - for each grid point:  radial distance (from ctr of Earth), magnetic colatitude (rads.), and magnetic longitude (rads.).  The magnetic pole and moment is hard coded into the grid generation scripts.

### Temperature variable

`Ts` (first three dimensions have size lxs; 4th dimension is species index:  1=O+,2=NO+,3=N2+,4=O2+,5=N+, 6=H+,7=e-)

### Density variable

`ns` (same indexing as temperature)

### Parallel to **B** (x1) Drifts

`vs1` (same indexing as temperature)

x2-drift component:  `v2` (same for all species, so this is just size lxs and is a 3D array)
x3-drift component:  `v3`

### Electromagnetic variables

current density:  `J1, J2, J3`
potential:  `Phitop` (EFL potential)

Note that the electric field is not included in the output file, but that it can be calculated from this output by taking -vxB at an altitude above about 200 km or by differentiating the top boundary electric potential 'Phitop' with respect to the x2 and x3 variables; however, note that if a curvilinear grid is used the derivatives must include the appropriate metric factors.

## Computing total electron content (TEC)

TEC and magnetic field variations can be calculated as a post-processing step in which the simulation data are read in and interpolated onto a regular geographic grid and then integrated accordingly using scripts in the './vis' directory - see `TECcalc.m`.
An example of how to plot TEC computed by this script is included in `TECplot_map.m` in Gemini-matlab repo

## Computing magnetic field perturbations

Magnetic field perturbations for a given simulation can be computed, after the fact, using a separate fortran mpi program, magcalc.
Detailed instructions are included in the magcalc readme, [./Readme_magcalc.md](./Readme_magcalc.md).

branch_name: refs/heads/main


text:
# Gaphor on macOS

The latest release of Gaphor can be downloaded from the [Gaphor download page](https://gaphor.org/download#macos). Gaphor can also be installed as a [Homebrew cask](https://formulae.brew.sh/cask/gaphor).

Older releases are available from [GitHub](https://github.com/gaphor/gaphor/releases).

[CI builds](https://github.com/gaphor/gaphor/actions/workflows/full-build.yml) are also available.

## Development Environment

To setup a development environment with macOS:
1. Install [Homebrew](https://brew.sh)
1. Open a terminal and execute:
```bash
brew install python3 gobject-introspection gtk4 gtksourceview5 libadwaita adwaita-icon-theme graphviz
```
Install [Poetry](https://python-poetry.org) using [pipx](https://pypa.github.io/pipx/):
```bash
pipx install poetry
```

[Clone the
repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository).
```bash
cd gaphor
poetry config virtualenvs.in-project true
poetry install
poetry run gaphor
```

If PyGObject does not compile and complains about a missing `ffi.h` file, set the following
environment variable and run `poetry install` again:
```bash
export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
poetry install
```

### Debugging using Visual Studio Code

Before you start debugging you'll need to open Gaphor is VSCode (the folder
containing `pyproject.toml`). You'll need to have the Python extension installed.

Create a file `.vscode/launch.json` with the following content:

```json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Gaphor UI",
            "type": "python",
            "request": "launch",
            "module": "gaphor",
            "justMyCode": false,
        }
    ]
}
```

## Packaging for macOS

In order to create an exe installation package for macOS, we utilize
[PyInstaller](https://pyinstaller.org) which analyzes Gaphor to find all the
dependencies and bundle them in to a single folder.

1. Follow the instructions for settings up a development environment above
1. Open a terminal and execute the following from the repository directory:
```bash
poetry install --with packaging
poetry run poe package
```

repository: amolenaar/gaphor

repo_name: amolenaar/gaphor


text:
# endiom

English idioms services

This is a collection of common idioms used in English.

Service implemented with:

- MySQL 5.7

- TypeORM

repository: khaind/endiom

gha_language: TypeScript

repo_name: khaind/endiom


text:
---
title: Create a new Oracle database
uid: create_oracle_db
description: Create a new Oracle database for SuperOffice onsite
author: {github-id}
keywords: database
so.topic: howto
so.envir: onsite
# so.client:
---

# Create a new Oracle database

Are you going to run SuperOffice on an Oracle database, follow these steps to set up the target database.

## Oracle - setting up the server

Please refer to the documentation provided by Oracle for a description of how to install the Oracle server.

### Considerations

If your Oracle server is going to serve other databases than the SuperOffice database, you might want to create an own Oracle instance (SID) for the SuperOffice database, or it will be enough to just place the SuperOffice data into a separate tablespace. What you decide on depends on how your server is going to be maintained, and we don't have any preferences one way or another. We do recommend that you at least create a separate tablespace for the SuperOffice data.

There are some parameters that you only can set during the installation of the server (or creation of the SID), and these should be considered changed during the installation of your Oracle server. The best examples of this are:

* National Language Support
* Code page or Character sets
* Database Block size

## Preparing the Oracle database

Because customers are sure to have database policies and opinions that we don’t know about, installation on an Oracle server should be done by the customers’ resident DBA. However, if a SuperOffice consultant does do the installation, it is recommended to use the Database Configuration Assistant (DCA).

In the DCA, choose the **Custom Database** template to avoid installing numerous options and sample data. Then specify passwords, file storage, and so forth. Turn off Oracle Text, OLAP, Spatial, Data Mining, Ultra Search, and other unused things, unless you specifically need them. These options take up disk space, ram, CPU, and can decrease overall database performance.

In step 10, 4 tabs, you get to the interesting parts. As for **Memory** and **Sizing**, set those to what you think is best.  For character sets, Oracle has two character set concepts: database character set and national character set. When you need to set up Unicode on Oracle, please read this first. The default is Code page 1252 ISO-Latin.

To support Unicode, select the **Use Unicode (AL32UTF8)** option. Choose **AL16UTF8** as the National character set. If you choose UTF8, you may run into problems when storing long Chinese texts in appointment descriptions. Please also take note of how the representation surfaces. VARCHAR is limited to 4000 bytes, which is 2000 characters in UTF16, or anywhere from 4000 to 1300  in UTF8. You could choose the **Custom** option for the database character set, but you risk being told (later on) that your choice was illegal.

## Creating the SuperOffice tablespace

Create a tablespace with a descriptive name such as `SuperOffice_DATA` and create a data file called *SUPEROFF.ORA* (or some other descriptive name). The size should be 200 Mb, and we recommend that you turn on the **auto-extend** options.

### Creating the CRM7 user

You now have to create the user who is going to be the owner of all tables used by SuperOffice.

> [!WARNING]
> If you delete this user after SuperOffice is installed, all SuperOffice data will be deleted.

1. Set the following values on the **General** tab:

    | Parameter | Value |
    |-----------|-------|
    | Name | CRM7 |
    | Profile | Default |
    | Password | YourSecurePassword |
    | Default tablespace | `SuperOffice_DATA` |
    | Temporary tablespace | `TEMPORARY_DATA` |
    | Status | Unlocked |

    > [!NOTE]
    > You may call the CRM7 user anything you want, this is just an example.

2. Move to the **Roles/Privileges** tab and grant the following roles:

    * CONNECT with Admin Option
    * DBA with Admin Option

### Set Open Cursors

The maximum number of Open Cursors depends on the memory available. To run SuperOffice, Open Cursors must be at least 1000.

To set the number of open cursors: `OPEN_CURSORS = 1000`

### Tuning Parameters

There are many opinions on how to tune your Oracle server to perform optimally. Our opinion is that in general the more memory installed and allocated to your Oracle server, the better it will perform.

These parameters can be set using the **Oracle Enterprise Manager Console**.

**Parameters optimal for a normal SuperOffice installation:**

| Parameter | Value |
|-----------|-------|
| Open_cursors | 1000 |
| Shared_pool_size | 9000000 |
| Db_block_size | 4096 |
| Db_block_buffer | 200  Db_block_size |
| Log_buffer | 32768 |
| Dml_locks | 250 |
| Sort_area_size | 65536 |
| Processes | 150|
| Db_file_multiblock_readcount | 16 |

> [!NOTE]
> `Db_block_size` can only be set when the database is created.

### Table spaces

Temporary tablespace is hard-coded to be: `TEMPORARY_DATA`
Default tablespace is not hard-coded. Give the name you want.

Make sure the CRM7 user has this as "Default tablespace".

All Oracle users created by SuperOffice will have Default and Temporary tablespace set to `SYSTEM`. The fact that Temporary tablespace is set to *system* for a huge amount of users, may result in that the tablespace `SYSTEM` will eventually go full. To avoid this please update the tablespace settings for each Oracle-user that is created, using the Storage Manager.

A tablespace with this name has to exist to run SuperOffice.

1. Save and close the file.
2. Restart **Oracle Service** and **Oracle Start** to initialize the new settings.
3. To check the new settings, start **Instance Manager** and look into **Initialization Parameters**.

### When configuring an Oracle database using DbSetup/ServerSetup

The configuration program reads Default and Temp TableSpace names from *SUPEROFFICE.INI*

```text
[Oracle]
DefaultTableSpace=USERS
TemporaryTableSpace=TEMP
```

This is useful if you have a non-standard Oracle database server.

Users created by the setup program (and the web maintenance client later on) will use these settings to define the Oracle tablespace names that the users are granted access to.

### Oracle 18c compatibility

[!include[ALT](../../compatibility/includes/oracle-18c-drivers.md)]

Please refer to the manufacturers' web pages for more information.

***

[Previous][12] | [Next][11] | [Back to guide][13]

<!-- Referenced links -->
[11]: ../iis/index.md
[12]: ../server/prepare.md
[13]: ../guide.md

repository: ArildEik/superoffice-docs

repo_name: ArildEik/superoffice-docs


text:
#The articles of the faith of the Church of Christ, or, Congregation meeting at Horsley-down Benjamin Keach, pastor, as asserted this 10th of the 6th month, 1697.#

##Keach, Benjamin, 1640-1704.##
The articles of the faith of the Church of Christ, or, Congregation meeting at Horsley-down Benjamin Keach, pastor, as asserted this 10th of the 6th month, 1697.
Keach, Benjamin, 1640-1704.

##General Summary##

**Links**

[TCP catalogue](http://www.ota.ox.ac.uk/tcp/)  •
[HTML](http://tei.it.ox.ac.uk/tcp/Texts-HTML/free/A47/A47381.html)  •
[EPUB](http://tei.it.ox.ac.uk/tcp/Texts-EPUB/free/A47/A47381.epub) •
[Page images (Historical Texts)](https://data.historicaltexts.jisc.ac.uk/view?pubId=eebo-12424917e&pageId=eebo-12424917e-61805-1)

**Availability**

This keyboarded and encoded edition of the
	       work described above is co-owned by the institutions
	       providing financial support to the Early English Books
	       Online Text Creation Partnership. This Phase I text is
	       available for reuse, according to the terms of Creative
	       Commons 0 1.0 Universal. The text can be copied,
	       modified, distributed and performed, even for
	       commercial purposes, all without asking permission.

**Major revisions**

1. __2005-04__ __TCP__ *Assigned for keying and markup*
1. __2005-07__ __SPi Global__ *Keyed and coded from ProQuest page images*
1. __2005-08__ __Emma (Leeson) Huber__ *Sampled and proofread*
1. __2005-08__ __Emma (Leeson) Huber__ *Text and markup reviewed and edited*
1. __2005-10__ __pfs__ *Batch review (QC) and XML conversion*

##Content Summary##

#####Front#####

1. To the Congregation with whom I am a Member (and the unworthy Overseer) who are in God the Father, and in our Lord Jesus Christ; Grace, Mercy and Peace be multiplied.
That the following Articles contain what the foresaid Church believes concerning those Truths assert
#####Body#####
Of God, and of the Holy Trinity.I. WE do believe,Joh. 4.24. Job 11.7, 8, 9. Psal. 90.2. Jam. 1.17. E
    _ Of God, and of the Holy Trinity.

    _ Of the Decrees of God.

    _ Of Creation.

    _ Of God's Providence.

    _ Of the holy Scriptures.

    _ Of Original Sin.

    _ Of Man's Free-will.

    _ Of Christ the Mediator.

    _ Of the Offices of Christ.

    _ Of Christ's Humiliation and Exaltation.

    _ Of effectual Calling.

    _ Of Justification.

    _ Of Adoption.

    _ Of Sanctification.

    _ Of the Souls of Men at Death.

    _ Of the Law.

    _ Of Faith and Repentance.

    _ Of the Means of Grace.

    _ Of Baptism.

    _ Of a true Church.

    _ Of Laying on of Hands.

    _ Of the Lord's Supper.

    _ Of Church-Officers.

    _ Of Prayer.

    _ Of singing of Psalms, &c.

    _ Of the Christian Sabbath.

    _ Of Ministers, and their Maintenance.

    _ Of the First Covenant.

    _ Of the New and Second Covenant.

    _ Of Election.

    _ Of final Perseverance.

    _ Of the Resurrection.

    _ Of Eternal Judgment.

    _ Of Marriages.

    _ Of Civil Magistrates.

    _ Of lawful Oaths.

    _ Of Personal Propriety.

1. POSTSCRIPT.

**Types of content**

  * Oh, Mr. Jourdain, there is **prose** in there!

There are 14 **ommitted** fragments!
 @__reason__ (14) : illegible (14)  •  @__resp__ (14) : #OXF (14)  •  @__extent__ (14) : 1 letter (11), 1 span (2), 3 letters (1)

**Character listing**

|Text|string(s)|codepoint(s)|
|---|---|---|
|General Punctuation|•…—|8226 8230 8212|
|Geometric Shapes|▪|9642|
|CJKSymbolsandPunctuation|〈〉|12296 12297|

##Tag Usage Summary##

###Header Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__author__|2||
|2.|__availability__|1||
|3.|__biblFull__|1||
|4.|__change__|5||
|5.|__date__|8| @__when__ (1) : 2005-12 (1)|
|6.|__edition__|1||
|7.|__editionStmt__|1||
|8.|__editorialDecl__|1||
|9.|__extent__|2||
|10.|__idno__|6| @__type__ (6) : DLPS (1), STC (2), EEBO-CITATION (1), OCLC (1), VID (1)|
|11.|__keywords__|1| @__scheme__ (1) : http://authorities.loc.gov/ (1)|
|12.|__label__|5||
|13.|__langUsage__|1||
|14.|__language__|1| @__ident__ (1) : eng (1)|
|15.|__listPrefixDef__|1||
|16.|__note__|4||
|17.|__notesStmt__|2||
|18.|__p__|11||
|19.|__prefixDef__|2| @__ident__ (2) : tcp (1), char (1)  •  @__matchPattern__ (2) : ([0-9\-]+):([0-9IVX]+) (1), (.+) (1)  •  @__replacementPattern__ (2) : http://eebo.chadwyck.com/downloadtiff?vid=$1&page=$2 (1), https://raw.githubusercontent.com/textcreationpartnership/Texts/master/tcpchars.xml#$1 (1)|
|20.|__projectDesc__|1||
|21.|__pubPlace__|2||
|22.|__publicationStmt__|2||
|23.|__publisher__|2||
|24.|__ref__|2| @__target__ (2) : https://creativecommons.org/publicdomain/zero/1.0/ (1), http://www.textcreationpartnership.org/docs/. (1)|
|25.|__seriesStmt__|1||
|26.|__sourceDesc__|1||
|27.|__term__|2||
|28.|__textClass__|1||
|29.|__title__|3||
|30.|__titleStmt__|2||

###Text Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__closer__|1||
|2.|__date__|1||
|3.|__dateline__|1||
|4.|__desc__|14||
|5.|__div__|42| @__type__ (42) : title_page (1), dedication (1), approbation (1), body_of_text (1), article (37), postscript (1)|
|6.|__g__|227| @__ref__ (227) : char:EOLhyphen (224), char:punc (3)|
|7.|__gap__|14| @__reason__ (14) : illegible (14)  •  @__resp__ (14) : #OXF (14)  •  @__extent__ (14) : 1 letter (11), 1 span (2), 3 letters (1)|
|8.|__head__|40||
|9.|__hi__|492||
|10.|__item__|50||
|11.|__list__|1||
|12.|__note__|140| @__place__ (140) : margin (140)|
|13.|__opener__|1||
|14.|__p__|74| @__n__ (47) : 1 (3), 2 (4), 3 (2), 4 (2), 5 (2), 6 (1), 7 (1), 8 (1), 9 (1), 10 (1), 11 (1), 12 (1), 13 (1), 14 (1), 15 (1), 16 (1), 17 (1), 18 (1), 19 (1), 20 (1), 21 (1), 22 (1), 23 (1), 24 (1), 25 (1), 26 (1), 27 (1), 28 (1), 29 (1), 30 (1), 31 (1), 32 (1), 33 (1), 34 (1), 35 (1), 36 (1), 37 (1), 38 (1), 39 (1)|
|15.|__pb__|50| @__facs__ (50) : tcp:61805:1 (2), tcp:61805:2 (2), tcp:61805:3 (2), tcp:61805:4 (2), tcp:61805:5 (2), tcp:61805:6 (2), tcp:61805:7 (2), tcp:61805:8 (2), tcp:61805:9 (2), tcp:61805:10 (2), tcp:61805:11 (2), tcp:61805:12 (2), tcp:61805:13 (2), tcp:61805:14 (2), tcp:61805:15 (2), tcp:61805:16 (2), tcp:61805:17 (2), tcp:61805:18 (2), tcp:61805:19 (2), tcp:61805:20 (2), tcp:61805:21 (2), tcp:61805:22 (2), tcp:61805:23 (2), tcp:61805:24 (2), tcp:61805:25 (2)  •  @__rendition__ (1) : simple:additions (1)  •  @__n__ (38) : 3 (1), 4 (1), 5 (1), 6 (1), 7 (1), 8 (1), 9 (1), 10 (1), 11 (1), 12 (1), 13 (1), 14 (1), 15 (1), 16 (1), 17 (1), 18 (1), 19 (1), 20 (1), 21 (1), 22 (1), 23 (1), 24 (1), 25 (1), 26 (1), 27 (1), 28 (1), 29 (1), 30 (1), 31 (1), 32 (1), 33 (1), 34 (1), 35 (1), 36 (1), 37 (1), 38 (1), 39 (1), 40 (1)|
|16.|__salute__|1||
|17.|__signed__|1||
|18.|__trailer__|2||


text:
akka-lift-ml
=========================

[![travis-ci.org](https://travis-ci.org/innFactory/akka-lift-ml.svg?branch=master)](https://travis-ci.org/innFactory/akka-lift-ml)
[![codecov.io](https://img.shields.io/codecov/c/github/innFactory/akka-lift-ml/master.svg?style=flat)](https://codecov.io/github/innFactory/akka-lift-ml)
[![Version](https://img.shields.io/badge/License-Apache2-blue.svg)]()
[![Version](https://img.shields.io/badge/Version-0.2-brightgreen.svg)]()
[![Version](https://img.shields.io/badge/Status-beta-red.svg)]()

## Info
Repository for an akka microservice that lift the trained spark ml algorithms as a actorsystem with http endpoints.

### Description
akka-lift-ml helps you with the hard data engineering part, when you have found a good solutions with your data science team.
The service can train your models on a remote spark instance and serve the results with a small local spark service.
You can access it over http e.g. with the integrated swagger ui. To build your own system you need sbt and scala.
The trained models are saved to AWS S3 and referenced in a postgres database, so can scale out your instances for load balacing.

### Requirements
* JDK8 [http://www.oracle.com/technetwork/java/javase/downloads/index.html](http://www.oracle.com/technetwork/java/javase/downloads/index.html))
* sbt([http://www.scala-sbt.org/release/docs/Getting-Started/Setup.html](http://www.scala-sbt.org/release/docs/Getting-Started/Setup.html))
* docker for dockerbuild ([https://www.docker.com/community-edition/](https://www.docker.com/community-edition/))
* aws account if you want to use a cognito userpool for authentifaction ([https://aws.amazon.com/de/](https://aws.amazon.com/de/))
* enough memory for spark

### Implemented Microservice Features

* Integration of *swagger-ui* ```localhost:8080/v1/swagger/index.html```
* Autogenerated swagger doc from routes as yaml / json ```localhost:8080/v1/api-docs/swagger.yaml``` or ```localhost:8080/v1/api-docs/swagger.json```
* CRUD Repositorys via *slick-repo*
* CORS Support via *akka-http-cors*
* Implemented Authentication with AWS Cognito (JWK) and JWT Token via *nimbusds* (in *Java*)
* Test coverage with *ScalaTest* and *scoverage* code coverage report
* Ready for *Docker* deployment and *CloudFormation* deployment
* Config file with optional runtime parameters
* In-Memory Postgres SQL database for tests
* Flyway database migration
* *HikariCP* as connection pool
* Logging via *Log4j* with a xml template

### Supported ML Algorithms
- Collaborative Filtering with ALS (Alternating-Least-Squares), even when the user is not in the rating

### Planned Feature ##
- Easy cleaning of data.
- More spark mllib features
- Add more and better tests

## Configuration & QuickStart Guide
- Prepare your data with 3 columns user,product,retaing - sample can be found in test resources (retail-raiting.csv)
- If you want to train remote and not on your local machine, first start your Spark Cluster ([Spark Cluster with 1x Master & 3x worker via Docker](https://github.com/innFactory/docker/tree/master/spark-master-worker))
- Checkout the source code from github
-Start a PostgreSQL Database via RDS, Docker or locally
- Make related config changes to application.conf or docker.conf
- If you use AWS be sure that the s3 Bucket is not in EUROPE!! Spark 2.1 can not write/read data then
- create a jar as a spark driver ```sbt package``` - be sure the path in application.conf is set correctly.
- run ```sbt run```
- go to [Swagger UI](http://localhost:8283/swagger/index.html) (http://localhost:8283/swagger/index.html)
- send your request to the service
- after successfull training you get the result via http get
- run ```sbt docker:publishLocal``` to create a docker container image

For more details and instructions read the wiki.

### Environment variables
- `SQL_URL` - database url by scheme `jdbc:postgresql://host:port/database-name`
- `SQL_USER` - database user
- `SQL_PASSWORD` - database password
- `NIC_IP` - IP Address bounded to the http service default is <IP_ADDRESS>
- `NIC_PORT` - TCP Port used for the http service default is 8080
- `USER_POOL` - Define an other cognito user pool than the preconfigured userpool

## Run application
To run application, call:
```
sbt run
```

### Run in Docker
For launching application in Docker, you must configure database docker instance and run docker image, generated by sbt.

Generating application docker image and publishing on localhost:
```
sbt docker:publishLocal
```

Example of running, generated docker image:
```
docker run --name akkaHttp -m 6g -e SQL_USER=dbuser -e SQL_PASSWORD=dbpass -e SQL_URL=jdbcURL -d -p 8283:8283 APPLICATION_IMAGE
```
- `APPLICATION_IMAGE` - id or name of application docker image

look at ```--link``` parameter if the database is also a docker container

## Test
To run tests, call:
```
sbt test
```

To run all tests, with codecoverage, call:

```sbt clean coverage test```

To generate a coverage report afterwars the testrun, call:

```sbt coverageReport```

## Contributers ##

Tobias Jonas

## Other ##
akka-lift-ml is licensed under Apache License, Version 2.0.

Commercial Support [innFactory Cloud & DataEngineering](https://innfactory.de)

repository: innFactory/akka-lift-ml

repo_name: innFactory/akka-lift-ml


text:
# Twitter Clone Frontend

## Project Description

My own take on a Twitter web app. Built with NextJS and TailwindCSS and works with my FASTApi backend that I built here (https://github.com/dericf/twitter-clone-server-fastapi).

## Overview

This is built to work on desktop and mobile (with some bugs surely expected on mobile)

Everything was written in Typescript from the start and uses `async`/`await` wherever possible.

I did not try and actually "clone" twitter and all of its functionality or designs. Instead, I designed my own take on it from scratch.

### User Authentication/Authorization

The server is set up to handle JWT Tokens via http-only cookies or Authorization header.
Cookies are used to keep things simple.

Every `fetch` request that requires auth sends the `credentials: "include"` option.

Authorization is very basic - there is only 1 user type and the server ensures users only ever access/modify/delete resources they actually own.

### Tweets

A user can create, edit and delete tweets, as well as see tweets posted by other users. Currently the tweets only support text. Rich text, images, live link previews, etc. might be implemented in the future.

### Tweet Likes

A user can like and un-like any tweet (including your own for simplicity)

### Comments

A user can create, edit and delete comments on any tweet (including your own)

### Comment Likes

A user can like and un-like any comment (including your own for simplicity)

### Following

A user can follow and un-follow other users and see a list of users they are currently following

### Followers

a user can see a list of all users that currently follow them

### Chat

I implemented a real-time chat using websockets and react hooks/context. It currently doesn't support group chats but that may be implemented in the future.
The chat is modal-based so it doesn't interupt your flow at all, simply open/close the chat modal from any page without ever redirecting.

### Schema

I used Typescript to define a strict schema for data flowing to and from the server.

An example of a schema is as follows for a tweet

```Typescript
import { APIResponse } from "./API";
import { EmptyResponse } from "./General";

export interface Tweet {
  tweetId: number;
  userId: number;
  username: string;
  content: string;
  createdAt: string;
}

export interface TweetCreateRequestBody {
  content: string;
}

export interface TweetUpdateRequestBody {
  newContent: string;
}

export type TweetResponse = APIResponse<Array<Tweet>>;
export type TweetCreateResponse = APIResponse<Tweet>;
export type TweetUpdateResponse = APIResponse<EmptyResponse>;
export type TweetDeleteResponse = APIResponse<EmptyResponse>;

```

`interface APIResponse<T>` is a custom generic interface that each response returns - replacing
the generic type `T` with the appropriate return type of that endpoint in a property
called `value`.

For Example:

```Typescript
// T could be something like Array<CommentLike> or EmptyResponse
export interface APIResponse<T> {
  value?: T;
  error?: APIResponseError;
}
```

`class APIResponseError` is a wrapper class that gets instantiated only when there
is an error (non-200 response status or a TypeScript Error was thrown). The class
provides an object method `.errorMessageUI` to have the appropriate text to show the
user in a toast notification or popup.

`interface EmptyResponse` is only used to represent the return type of endpoints which are defined
to explicitly not return anything - usually after deleting or updating a record.
I could have probably just used `null` but I wanted to be explicit
and to eliminate any guessing.

---

## Testing

### Component Testing

TODO

## Technologies

### NextJS

[https://nextjs.org/](https://nextjs.org/)

### TailwindCSS (with JIT)

[https://tailwindcss.com/](https://tailwindcss.com/)

### Moment

[https://momentjs.com/](https://momentjs.com/)

### react-toast-notifications

[https://github.com/jossmac/react-toast-notifications](https://github.com/jossmac/react-toast-notifications)

## react-select
[https://github.com/jedwatson/react-select](https://github.com/jedwatson/react-select)

## Local Development

create a `.env` file and add the following variable:

```
NEXT_PUBLIC_API_URL="http://localhost:<SERVER_PORT>"
NEXT_PUBLIC_API_WS_URL="ws://localhost:<SERVER_PORT>/ws"
```

run `npm install` then run `npm run dev` to start the next development server

Make sure your backend server is running (default port 8001)

## Deploy

Easiest way to deploy is on Vercel.
Just create a new Vercel project linked to the git repo and add the `NEXT_PUBLIC_API_URL` and `NEXT_PUBLIC_API_WS_URL` that points to your hosted API server.

To deploy a new version just git push to master/main for a production deployment or push to any non-master/main branch for a preview/staging deployment.

Eventually I'd like to develop a smooth workflow for deploying the NextJS with docker. It should be straightforward since no serverless functions are currently being used.

repository: dericf/twitter-clone-frontend

repo_name: dericf/twitter-clone-frontend


text:
---
layout: post
category: leetcode
title: 115. Distinct Subsequences
tags: leetcode
---

## title
[problem link](https://leetcode.com/problems/distinct-subsequences/)

Given two strings `s` and `t`, return *the number of distinct subsequences of `s` which equals `t`*.

A string's **subsequence** is a new string formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (i.e., `"ACE"` is a subsequence of `"ABCDE"` while `"AEC"` is not).

It's guaranteed the answer fits on a 32-bit signed integer.

**Example 1:**

```
Input: s = "rabbbit", t = "rabbit"
Output: 3
Explanation:
As shown below, there are 3 ways you can generate "rabbit" from S.
rabbbit
rabbbit
rabbbit
```

**Example 2:**

```
Input: s = "babgbag", t = "bag"
Output: 5
Explanation:
As shown below, there are 5 ways you can generate "bag" from S.
babgbag
babgbag
babgbag
babgbag
babgbag
```

**Constraints:**

- `0 <= s.length, t.length <= 1000`
- `s` and `t` consist of English letters.

## solution

```python
class Solution:
    def numDistinct(self, s: str, t: str) -> int:
        n1, n2 = len(t), len(s)
        dp = [[0] * (n2 + 1) for _ in range(n1 + 1)]
        for j in range(0, n2+1):
            dp[0][j] = 1 # 为什么有这个？ 因为单个字符dp计算不对，比如aaa，a的情况
        for i in range(1, n1 + 1):
            for j in range(1, n2 + 1):
                if t[i - 1] == s[j - 1]:
                    dp[i][j] = dp[i-1][j-1]+dp[i][j-1]
                else:
                    dp[i][j] = dp[i][j-1]
        return dp[n1][n2]
```

gha_language: HTML


text:
---
layout: project_page
title: Contributing with HaTeMiLe for Java
permalink: /projects/hatemile_for_java/contributing/
---

First off, thank you for considering contributing to HaTeMiLe for Java.

### Code contribution

If you want submit your code to HaTeMiLe for Java you need follow the code conventions, [see our code contribution section in GitHub](https://github.com/hatemile/hatemile-for-java/blob/master/CONTRIBUTING.md#code-contribution).

### Reporting bugs

This section guides you through submitting a bug report for HaTeMiLe for Java.

Before submitting a bug report check if you're using the latest version of HaTeMiLe for Java and [ensure the bug was not already reported](https://github.com/hatemile/hatemile-for-java/issues).

If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/hatemile/hatemile-for-java/issues/new).

### Request new feature

This section guides you through request new feature for HaTeMiLe for Java.

Before submitting a request feature check if you're using the latest version of HaTeMiLe for Java and [ensure the feature was not already requested](https://github.com/hatemile/hatemile-for-java/issues).

If you're unable to find an open issue requesting this feature, [open a new one](https://github.com/hatemile/hatemile-for-java/issues/new).

### Translating

[To translate the HaTeMiLe you must access our project in Zanata](https://translate.zanata.org/project/view/hatemile), you will need a account to translate.

### Donate

If you'd like to monetarily support HaTeMiLe for Java development, [see our donate page](/donate/).


text:
# JavaScript Validation
A simple validation library that requires jQuery, Bootstrap 2+ (w/ Modal JS) and FontAwesome 3+

[![](https://data.jsdelivr.com/v1/package/npm/javascript.validation/badge)](https://www.jsdelivr.com/package/npm/javascript.validation)

## Specifying Bootstrap and FontAwesome Versions
The library references two global variables which it uses to build the modal and rendering icons. The variables are `BootstrapVersion` which defaults to 3 and `FontAwesomeVersion` which defaults to 4. If using an earlier versions simply create the global variables in your document as follows.
```javascript
   var BootstrapVersion = 2,
       FontAwesomeVersion = 3;
```

## How to use
You can add validation to any form by adding either of the following classes.
* `simple-validation` => opens a modal
* `simple-validation-alert` => opens an alert

The form looks for input fields with a `required` class or if it is a child of a container with a `required` class. The example below shows a required email field. I tend to use the `required` class in the parent element as it allows be to style the `label` as I choose using CSS but this would also work if you simply added the `required` class to the input. Also, since the type of the field is `email`, the library will know to validate as an email (this can also be done on text elements by adding a class of `email`).
```html
<div class="form-group required">
	<label for="emailaddress" class="control-label">Email</label>
	<input type="email" class="form-control" id="emailaddress" placeholder="Enter email" data-title="Please enter a valid Email">
</div>
```

## Modals
The library also includes some modal building functions that will create a regular modal and an action modal that can contain a call back based on the user's response. These functions are `openDialog` and `openActionDialog`. Below are some simple examples on how to use.
```javascript
// a simple dialog
openDialog({
	message:'Hello World'
});
// an action dialog with a callback
openActionDialog({
    noerror     : true,
    message     : 'Are you sure you want to process the callback?',
 	callback : function(theModal){
    	alert('Something could happen in here.');
    	theModal.modal('hide');
  }
});
```

## Example @ CodePen
You can play with this [CodePen](http://codepen.io/GiancarloGomez/pen/PZBvBN)

## Support
I know my read me does not give much insight to the library as a whole but it is quite easy to read thru the code and see what it can and can not do. Regardless, if you have a question feel free to contact me.

gha_language: JavaScript


text:
# Agola Color Schemes
Color schemes for TextMate & Sublime Text editors.

[ Test Drive for Agola Dark ]

----------
##### Agola Dark :: (Screenshots)

----------
##### Agola White :: (Screenshots)

----------
##### Agola Green :: (Screenshots)

----------
##### Agola Nimbus :: (Screenshots)

----------
##### Agola Light :: (Screenshots)

## Installation

### TextMate
 - Download a .tmTheme file
 - Copy the file to ~/Library/Application Support/TextMate/Themes

----------
### Sublime Text
##### Manual Installation
- Download a .tmTheme file
- Browse Packages from the Command Palette (Ctrl+Shift+P on Windows/Linux, ⇧⌘P on OS X)
- Copy the .tmTheme file to Packages

##### Or via Package Control
- Make sure you already have Package Control installed
- Choose Install Package from the Command Palette (Ctrl+Shift+P on Windows/Linux, ⇧⌘P on iOS)
- Select "Agola Color Schemes" and press Enter

##### Recommended Font;

Monaco

repository: demidovakatya/Agola-Color-Schemes

repo_name: demidovakatya/Agola-Color-Schemes


text:
# home-automation

**Home Automation**

Welcome to my implementation of connected home automation devices. The goal is to have:
- Various home automation devices (such as automated thermostats, automated lighting, home monitoring systems etc.)
- A server that drives communication between the devices and the outside world
- Applications for Command/Control from the outside world (android app, web portal)

Here are my requirements
- Devices must have both physical controls and IOT remote controls
- Everything must have a backup plan. (in case of no internet, no power)
- Software must be scalable for ease of additions of new devices and configurability
- Interfaces must be modern both physically and in software (no hacky electronics, bad UI)

In Progress
- Dual Control thermostat
- Server

To Do
- Android Application C2 Interface, with scheduling and monitoring
- Remote light switch
- Home network modifications

Maybes
- Motion aware/tracking device
- Automated outdoor spicket control (gardening etc)
- Enhanced energy usage & monitoring
- Machine learning

repository: owenmcgrath/home-automation

repo_name: owenmcgrath/home-automation


text:
### What is this repository for? ###
ROS driver for [Lightware SF-40/C](http://www.lightware.co.za/shop/en/products/45-sf40c-100-m.html). (Official doc of the scanner is in the link in the "Download" tab)

### Set up ###
First please ensure you're in MMI mode via Minicom. `Esc` switches b/w HMI and MMI modes

```
catkin_make
rosrun lightware_sf40_ros sf40_node <device-name> <baud-rate> "argument"
rosrun rviz rviz
```
<device-name> is the name of the device e.g. /dev/ttyUSB0 and <baud-rate> is the baud rate e.g. 115200
Now, "argument" is any MMI command mentioned in the Lightware doc(linked above). If you want a map spanning 360 degrees, with 0 degrees as the forward direction, the most common use case, then "argument" is ?TM,360,0

`rosrun lightware_sf_40_ros sf40_node /dev/ttyUSB0 115200 ?TM,360,0`

In rviz, change frame name to "map", and listen to the `laser_scan` topic. The laser scan should show up.

The time stamp of message is fake, it just uses a `ros::Time::now()`. ~~Syncing with the encoder is a TODO at the time of writing~~ clock sync/slaving the laser to a cam isn't possible

### How to change spinning rate, other stuff mentioned in the Lightware doc and debug, etc ###
Yeah, so it's not a complete driver in that sense. I just use [minicom](http://linux.die.net/man/1/minicom) to change these things. `Esc` in minicom will switch b/w MMI and HMI modes.
An alternative is to write a publisher for the specific MMI/HMI command you want. Find this line in `sf40_node.cpp`
`size_t bytes_wrote = my_serial.write(test_string + "\r\n");`
Note here `\r\n` is basically the CRLF suffix for MMI mode, for HMI commands just change to
`size_t bytes_wrote = my_serial.write(ENTER_YOUR_HMI_STRING_HERE);`

### Info ###
This wrapper depends on [serial library](https://github.com/wjwwood/serial) by William Woodall


text:
## Security Vulnerabilities [Back](../README.md)

This chapter mainly focuses on vulnerabilities in web applications, and to note some common cases around them with their solutions at the same time. To make the knowledge more reliable, I have referred to some well known security communities like [**OWASP**](https://www.owasp.org/), [**CVE**](https://cve.mitre.org/), etc.

In order to bring awareness to what threatens the integrity of websites, I would like to start a series of post on the **OWASP top 10 security risks** firstly:

1. [**Injection**](./injection/injection.md)
2. [**Broken Authentication**](./broken_authentication/broken_authentication.md)
3. [**Sensitive Data Exposure**](./sensitive_data_exposure/sensitive_data_exposure.md)
4. [**XML External Entities (XXE)**](./xxe/xxe.md)
5. **Broken Access control**
6. **Security misconfigurations**
7. **Cross Site Scripting (XSS)**
8. **Insecure Deserialization**
9. **Using Components with known vulnerabilities**
10. **Insufficient logging and monitoring**

Such a list should be updated every three to four years by **OWASP**, and the last released year is 2019.

branch_name: refs/heads/docs


text:
---
layout: post
title:  "Perl Weekly Challenge 45: encoded messages and self-source-code-printing"
author: Luca Ferrari
tags:
- raku
- perl-weekly-challenge
permalink: /:year/:month/:day/:title.html
---
My personal solutions to the Perl Weekly Challenge.

# Perl Weekly Challenge 45: encoded messages and self-source-code-printing

One way to let me improve my knowledge about Raku (aka Perl 6) is to implement programs in it.
Unluckily, I don't have any production code to implement in Raku yet (sob!).
So, why not try solving the [Perl Weekly Challenge](https://perlweeklychallenge.org/){:target="_blank"} tasks?

In the following, the assigned tasks for [Challenge 45](https://perlweeklychallenge.org/blog/perl-weekly-challenge-045/){:target="_blank"}.

My official solutions are available [on the GitHub repository](https://github.com/fluca1978/perlweeklychallenge-club/tree/master/challenge-045/luca-ferrari){:target="_blank"}.

## PWC 45 - Task 1

The task asks to get a message, remove all the spaces and distribute the message across an eight column matrix. Finally, print the message by columns instead of rows. This is called *the squate secret code*.

To better understand, let's consider the following example:

```shell
% perl6 ch-1.p6 --message="The quick brown fox jumps over the lazy dog"
Your original message is
The quick brown fox jumps over the lazy dog
and encoded results:

  t h e q u i c k
  b r o w n f o x
  j u m p s o v e
  r t h e l a z y
  d o g

  that leads to

 tbjrdhrutoeomhgqwpeunslifoacovzkxey
```

First of all, I need to get a matrix with all non spaces chars:

```perl6
for $message.lc.comb( / \w / )  {
    @matrix[ $row ].push: $_ if @matrix[ $row ].elems < $columns;
    $row++ if @matrix[ $row ].elems == $columns;
}
```

The `comb` method extracts only the letters (non-spaces) from the string `$message`, then I `push` every single letter into `@matrix[ $row ]`, that is an array of array (indexed by `$row`) up until `$columns` (i.e., 8 columns). Once I hit the `$columns` (i.e., 8) upper limit, I change the matrix row.

Now it's time to print the matrix by columns:

```perl6
for 0 .. $columns -> $start {
    ( @matrix[ $_ ][ $start ] // '' ).print for 0 .. $row;
}
```

I loop over the `$columns` first, and then I do print the current position between all the matrix rows (i.e., between `0 .. $row`, with the latter being increased by the preceeding loop).
Please note that the matrix could have the last line not completed, so I print a char or an empty char if nothing is defined in that matrix position.

### A Smaller Solution

I was not satisfied about the above solution, and after a while I remembered that strange method that I seldom use: `rotor`. This method splits a list into sublists of the specified size, and with the `:partial` adverb, can include also lists that are not complete. Therefore, the whole first loop can be reduced to:

```perl6
my @matrix = $message
               .lc
               .comb( /\w/ )
               .rotor: 8, :partial;
```

that produces the very same `@matrix` as the loop before, and moreover, the<EMAIL_ADDRESS>corresponds to the number of rows the matrix has. From the above, the printing loop becomes:

```perl6
for 0 .. $columns -> $start {
    ( @matrix[ $_ ][ $start ] // '' ).print for 0 .. @matrix.elems;
}
```

## PWC 45 - Task 2

This has been very easy, a single line script: provide a program that prints its own source code.
Since in Raku, the dynamic variable `$*PROGRAM` olds an `IO` object, I can simply loop over the `lines` and print them out.

```perl6
  .say for $*PROGRAM.lines;
```

Either this has been too simple, or I didn't understand the task assignment!


text:
# words_memorizer
Simple script to memorize foregin language words and phrases.

## Run

`./memwords.py <file with words>`

Example:
`./memwords.py  espanol_numerales.mem`

## How to do exercises

You need to inpute translation of asked word or phrase.

```
ask    |  tres
answer |  три
       |  ok - 1
-------+------------------------------
ask    |  восемь
answer |
```

## Support

We can support you<EMAIL_ADDRESS>
And you can support us:  `paypal<EMAIL_ADDRESS>


text:
kineticGFR
==========

The calculator combines a calculator for eGFR-MDRD (1,2,3) and a calculator for kineticGFR (4).

Please try a Demo of the kinetic GFR calculator at http://www.konsil.at/kinetic/

## DESCRIPTION ##

* Choice of GFR estimator affects GFR calculations. MDRD was used in reference to Chen et al. (4).
* According to the National Kidney Foundation, laboratories should now be using a creatinine method that has been standardized or tracable to isotope dilution mass spectrometry (IDMS). The way creatinine levels are calibrated affects the GFR estimating equation. (3)
* The creatinine measurement unit (μmol/L versus mg/dL) affects the GFR estimating equation. Creatinine levels in μmol/L are converted to mg/dL in our calculator by dividing them by 88.4. (5)
* The value maximal rise in plasma creatinine per day is ambiguous. See Chen et al. for a discussion of this topic. (4)

## References ##

1. A more accurate method to estimate glomerular filtration rate from serum creatinine: a new prediction equation. Modification of Diet in Renal Disease Study Group. Levey AS, Bosch JP, Lewis JB, Greene T, Rogers N, Roth D. Ann Intern Med. 1999 Mar 16;130(6):461-70. PMID: 10075613 [PubMed - indexed for MEDLINE]
2. Levey A, Greene T, Kusek J, Beck G, Group MS. A simplified equation to predict glomerular filtration rate from serum creatinine. J Am Soc Nephrol 2000;11:155A
3. Expressing the Modification of Diet in Renal Disease Study equation for estimating glomerular filtration rate with standardized serum creatinine values. Levey AS, Coresh J, Greene T, Marsh J, Stevens LA, Kusek JW, Van Lente F; Chronic Kidney Disease Epidemiology Collaboration. Clin Chem. 2007 Apr;53(4):766-72. Epub 2007 Mar 1. PMID: 17332152 [PubMed - indexed for MEDLINE]
4. Retooling the creatinine clearance equation to estimate kinetic GFR when the plasma creatinine is changing acutely.</b> Chen S. J Am Soc Nephrol. 2013 May;24(6):877-88. doi: 10.1681/ASN.2012070653. Epub 2013 May 23. PMID: 23704286 [PubMed - indexed for MEDLINE]
5. http://en.wikipedia.org/w/index.php?title=Renal_function&oldid=624916087

## Disclaimer ##

All information is provided for educational purposes only.
This information should not be used for the diagnosis or treatment of any health problem or disease.
THIS INFORMATION IS NOT INTENDED TO REPLACE CLINICAL JUDGMENT OR GUIDE INDIVIDUAL PATIENT CARE IN ANY MANNER.

repository: maxpli/kineticGFR

repo_name: maxpli/kineticGFR


text:
# Hypoxylon dumontii J.D. Rogers & Samuels, 1985 SPECIES

#### Status
SYNONYM

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

#### Published in
Mycotaxon 22(2): 367 (1985)

#### Original name
Hypoxylon dumontii J.D. Rogers & Samuels, 1985

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Sordariomycetes/Xylariales/Xylariaceae/Hypoxylon/Hypoxylon ochraceum/ Syn. Hypoxylon dumontii/README.md

repo_name: mdoering/backbone


text:
# IpHelper

[![Twitter](https://img.shields.io/badge/contact-@GiordanoScalzo-blue.svg?style=flat)](http://twitter.com/giordanoscalzo)
[![Version](https://img.shields.io/cocoapods/v/IpHelper.svg?style=flat)](http://cocoapods.org/pods/IpHelper)
[![License](https://img.shields.io/cocoapods/l/IpHelper.svg?style=flat)](http://cocoapods.org/pods/IpHelper)
[![CocoaPods](https://img.shields.io/cocoapods/v/IpHelper.svg?style=flat)](https://github.com/giordanoscalzo/IpHelper)

## Description

IpHelper is a nanoFramework to get the IP address programmatically in a iOS/OSX app.

## Usage

To run the example project, clone the repo, and run `pod install` from the Example directory first.

```objc
NSLog(@"%@", [IpHelper ipAddressIPV4:YES]);
NSLog(@"%@", [IpHelper ipAddressIPV4:NO]);
NSLog(@"%@", [IpHelper ipAddresses]);
```

## Installation

IpHelper is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "IpHelper"
```

## Credits

Based on the code of [David H](dhoerl.wordpress.com) in this [Stack Overflow question](http://stackoverflow.com/questions/7072989/iphone-ipad-osx-how-to-get-my-ip-address-programmatically)

## Author

giordano scalzo<EMAIL_ADDRESS>
## License

IpHelper is available under the MIT license. See the LICENSE file for more info.

repository: gscalzo/IpHelper

repo_name: gscalzo/IpHelper


text:
---
title: Porting an EDMX-Based Model | Microsoft Docs
author: rowanmiller
ms.author: rowmil
manager: rowanmiller
ms.date: 10/27/2016
ms.topic: article
ms.assetid: d52aeaea-87fd-4dc7-a7d5-cdd65db09d13
ms.technology: entity-framework
ms.prod: entity-framework-core
uid: core/efcore-vs-ef6/porting/port-edmx
---

> [!WARNING]
> This content has moved to [efcore-and-ef6/porting/port-edmx](../../../efcore-and-ef6/porting/port-edmx.md)


text:
# cammUtils-vTigerNetApi

A library written in C# which allows easy access to the VTiger CRM webservice (for VTiger V6 or later).
It is capable to use every aspect of the VTiger-Webservice as is. [![NuGet VTigerNetApi](https://img.shields.io/nuget/v/VTigerNetApi.svg?label=VTigerNetApi)](https://www.nuget.org/packages/VTigerNetApi/) ![Travis CI build status](https://travis-ci.com/CompuMasterGmbH/cammUtils-vTigerNetApi.svg?branch=master)

## Short example of using the VTiger .NET API

The following code is a brief example of how to use the VTiger .NET API to access the VTiger CRM database.

``` C#
// Create the VTiger object and set the destination URL for the VTiger-webservice
VTiger vtigerApi= new VTiger("http://localhost:8888");

// Process login with a username and it's matching authentication-key (see NOTE 1)
vtigerApi.Login("admin", "oQJ4I0h89gpir0zG");

// Query some elements (see NOTE 2)
DataTable dt = vtigerApi.Query("SELECT id, invoice_no FROM Invoice WHERE invoice_no='INV1';");

if (dt.Rows.Count > 0)
{
      // Retrieve all data of the entity from VTiger
      VTigerInvoice invoiceData = vtigerApi.Retrieve<VTigerInvoice>((string)dt.Rows[0]["id"]);

      // Display some of that data
      MessageBox.Show("Invoice INV1 has a grand-total of " + invoiceData.hdnGrandTotal.ToString());
}
```

### Notes
Please also review https://www.vtiger.com/docs/rest-api-for-vtiger and https://community.vtiger.com/help/vtigercrm/developers/third-party-app-integration.html for general notes on using the VTiger Webservice API.

**NOTE 1** about VTiger-Login:
In order to log in, you need the authentication-key which can be found in user's profile-settings.

**NOTE 2** about VTiger-Queries:
Due to restrictions in the VTiger-webservice, neither "not" nor parenthesis work in queries.
If larger select-statements need to be constructed you can use the VTigerQueryWriter-class included in the project (recommended).

**NOTE 3** about VTiger-Update:
There is a problem caused by vtiger being unable to update some tables because they seem not to be indended to be updated. Nonetheless vtiger throws no error when trying to update those tables **resulting in corrupted entries**. For now we know that this is the case for the tables **quotes and sales-orders**. Because of that we highly recommend not updating that table and consider it as read-only.

### Some important information regarding VTiger-Queries
The VTiger-queries are NOT processed by SQL, but instead of a special parser inside VTiger and then rebuilt as SQL query for the actual VTiger database!
Because of that there are some kind of restrictions like the one described in NOTE 2.

### Trouble shooting
If you have any trouble building queries or you have problems regarding the data returned by VTiger you should first try using the VTigerManagerDemo and see what VTiger returnes and what queries can be executed.

## About
This project started as part of an internship and at last, this API would have never existed, if our trainee didn't get that chance by having an internship.

## VTiger demo portals
To connect your application with a running instance quickly, you might consider using a public VTiger demo portal. Here is a list of external vendors providing a public VTiger demo poral:

* https://demo.vtiger.com/
* https://www.vtexperts.com/vtiger-7-0-open-source-demo/
* https://www.bitco4you.de/vtiger-crm/unser-demosystem-fuer-vtiger-6-5
* https://simplesistemas.com/demo-de-vtiger-crm

## Other useful links
* http://sourceforge.net/projects/vtigercrm/ The previous vtiger project website
* https://wiki.vtiger.com The official VTiger Wiki
* http://www.vtiger-crm.it/dotnetnuke/Progetti/NTigerNetAPI/tabid/68/Default.aspx Another .NET library for vtiger - let us know your feedback or recommendations!
* https://hub.docker.com/r/pimuzzo/vtiger/ Quick guide for a VTiger V6 docker setup to run this tool against a test instance

## VTiger Version Support
* V5: supported
* V6: supported
* V7: supported

repository: landlogicit/cammUtils-vTigerNetApi

gha_language: C#

repo_name: landlogicit/cammUtils-vTigerNetApi


text:
# PythonBuddy 🖊 🐍
Online Python 2.7 Programming with Live Pylint Syntax Checking!
![](ScreenshotPythonBuddy.gif)

###Usage
1) Fetch from repo:
  ```
  git clone https://github.com/ethanchewy/PythonBuddy.git
  ```
2) Create virtualenv based on your own system:
  ```
  mkvirtualenv --python=/usr/bin/python2.7 venv
  ```
3) Activate vitrual environment:
  ```
  source venv/bin/activate
  ```
4) Pipe requirements to venv folder:
  ```
  pip install -r requirements.txt
  ```
5) Set FLASK_APP variable:
  ```
  export FLASK_APP=app.py
  ```
6) Run flask app:
  ```
  flask run
  ```
###Customize
1) Fork github repo

2) Edit app.py to change any linting features

###Current Features:

Live Syntax Checking

Uses Pylint as checker (only prints out errors and warnings)

Live Error Table with Additional Help Suggestions

Syntax Highlighting

Python 2.7 Complilation

Search Within Code

###Future Goals:
- Make easily embeddable for MOOCs like edX and other education platform
- Lower CPU usage

###FAQ:
Why did you make this?

I wanted to create an open source live python syntax checker to help beginning python programmers jump into python programming courses on MOOCs like edX without setting up a complicated python IDE.

Has anyone created anything like this before?

There has never been a live syntax checker for python online. Similar projects that are not "live" are http://pep8online.com/ and http://antares.sip.ucm.es/cesar/pylint/

Has can I contribute?

You can 🌟 star my repo, fork my repo, submit a pull request, and/or open issues!

Where's the code for embedding it in MOOCs?

I'm currently working on this over here (for edx specifically): https://github.com/ethanchewy/pybuddy2.0

I want the code to actually compile and run in a certain way?
If you want to actually execute the python look at my XBlock code: https://github.com/ethanchewy/pybuddy2.0 . Remember to sandbox the code with RestrictedPython or something.

###Credits:
This was made by Ethan Chiu as a research project under the guidance of Wellesley College professor Eni Mustafaraj.

repository: aqusmen/PythonBuddy

repo_name: aqusmen/PythonBuddy


text:
# Oatmeal Balls

> Based on [https://www.blessthismessplease.com/8-no-bake-oatmeal-energy-balls/](https://www.blessthismessplease.com/8-no-bake-oatmeal-energy-balls/)

<!-- {cts} rating=1; (User can specify rating on scale of 1-5) -->

Personal rating: :fontawesome-solid-star: :fontawesome-solid-star: :fontawesome-solid-star: :fontawesome-solid-star: :fontawesome-regular-star: :fontawesome-regular-star: :fontawesome-regular-star: :fontawesome-regular-star:

<!-- {cte} -->

<!-- {cts} name_image=oatmeal_balls.jpg; (User can specify image name) -->

![oatmeal_balls.jpg](./oatmeal_balls.jpg){: .image-recipe loading=lazy }

<!-- {cte} -->

## Ingredients

- [ ] 1 cup rolled oats (quick or old fashioned)
- [ ] 1/2 cup chocolate chips (mini or normal)
- [ ] 1/4 cup peanut butter
- [ ] 1/4 cup maple syrup (or honey)
- [ ] 2 tbsp cocoa powder (optional)

## Recipe

- Combine all ingredients into one bowl, form into balls, and freeze

## Notes

- More tasty [no-bake energy bites from tasty.co](https://tasty.co/compilation/no-bake-energy-bites)

repository: KyleKing/recipes

repo_name: KyleKing/recipes


text:
---
layout: post
title: Alien Dictionary
subtitle: Leetcode Daily Challenge
date: 2021-07-24
author: Haoran
header-img: img/post-bg-2015.jpg
catalog: true
tags:
  - Leetcode
  - Algorithm
  - Daily Challenge
---

## Problem
There is a new alien language that uses the English alphabet. However, the order among the letters is unknown to you.

You are given a list of strings words from the alien language's dictionary, where the strings in words are sorted lexicographically by the rules of this new language.

Return a string of the unique letters in the new alien language sorted in lexicographically increasing order by the new language's rules. If there is no solution, return "". If there are multiple solutions, return any of them.

A string s is lexicographically smaller than a string t if at the first letter where they differ, the letter in s comes before the letter in t in the alien language. If the first min(s.length, t.length) letters are the same, then s is smaller if and only if s.length < t.length.

## Constraints
1 <= words.length <= 100\
1 <= words[i].length <= 100\
words[i] consists of only lowercase English letters.\

## Thinking
* Kind of like prerequisite. If we can form a graph, we can check if such order is possible by going over and detect if there is any loop

* Create a graph, then do a topological sort

* First create a hashmap with mapping from letter to graph node

* Second create the graph by iterating through all the words in list

* Third do a topological sort for all the nodes in graph
    * Iterate through the keys in hashmap
    * Using BFS to do topological sort
        * create a queue for node to be visited, for each node in current queue, add it in the result array (they come after the parent node)
    * Keep a set to store visited node

* Just use a hashmap with letters as keys,

* Correction: Use DFS is more intuitive than using BFS. Using DFS we can start on a random node, but using BFS we have to start at node having in-degree 0.
    * Always visit child node and when finish, put current node to the first, so that to make sure that parent node is before child node.
    * Checking loop is easy, for each dfs, we maintain a stack to track current visited node. It's also more intuitive.

* I literally take one day to finish writing this. Although I know I should use topological sort and have the letters turned into a graph. It's so hard to write a bugless typological sort.
  Let alone there are tricky corner cases.

```python
from typing import List
from collections import deque, defaultdict

def alienOrder(words: List[str]) -> str:
    letter_next_map = defaultdict(set)
    letter_set = set()

    # add all character into set
    for word in words:
        letter_set.update(set(word))
    for i in range(len(words) - 1):
        letter_differ = False
        word_one = words[i]
        word_two = words[i+1]
        for j in range(min(len(word_one), len(word_two))):
            if word_one[j] != word_two[j]:
                letter_next_map[word_one[j]].add(word_two[j])
                letter_differ = True
                break
        if len(word_one) > len(word_two) and not letter_differ:
            return ""

    alien_order = deque()
    letter_visited = set()

    def helper(letter, visited):
        if letter in letter_visited:
            return False
        letter_visited.add(letter)

        letter_next_set = letter_next_map[letter]
        visited.add(letter)
        for next_letter in letter_next_set:
            # detect loop
            if next_letter in visited:
                return True

            visited.add(next_letter)
            if helper(next_letter, visited):
                return True
            visited.remove(next_letter)

        alien_order.appendleft(letter)
        return False

    for letter in letter_set:
        if helper(letter, set([letter])):
            return ""
    return "".join(alien_order)

if __name__ == "__main__":
    print(alienOrder(["abc", "ab"]))
```