text:
---
layout: page
title: David Au Wei En's Project Portfolio Page
---

## Project: PocketEstate

PocketEstate enables easy organisation of mass clientele property information through sorting of information by price,
location and housing type, that may otherwise be difficult to manage.

I have been tasked with adapting the edit commands, creating the update command as well as be the overall in charge of integration.

Given below are my contributions to the project.

* **Code contributed**: [RepoSense Link](https://nus-cs2103-ay2021s2.github.io/tp-dashboard/?search=&sort=totalCommits%20dsc&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2021-02-19&tabOpen=true&tabType=authorship&tabAuthor=dvdweien&tabRepo=AY2021S2-CS2103T-T13-4%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false)

* **Feature**: Implemented `Edit` commands for `appointment` and `property`.
    * Adapted the `Edit` command in AB3 to fit the needs of PocketEstate
    * PocketEstate has many more attributes than AB3, the `Edit` command has to have support for all of them.
* **Enhancement**: Implemented `update` command.
    * What it does: Allows the user to keep track of which stage the property is in the selling process (Option, Sales, Completion).
    * Justification: The property selling process involves multiple stages where different things need to be done at each stage, knowing which stage of the selling process that the property is in can help the user plan for what to do next.
* **Documentation**:
    * User guide: Updated guides for the usage of `edit property`, `edit appointment`, and `update` commands.
    * Developer guide: Added in some user stories, added in a section explaining how the `update` command works and added instructions for manually testing `edit` commands.
* **Testing**:
    * Wrote unit tests for:
        * `edit property` command and parser

* **Team-based tasks**:
    * Reported bugs as issues for better tracking.
    * Created the team repository.
    * Created product demo videos
* **Review/mentoring**:
    * Helped to review and merge pull requests
    * Implemented several bugfixes.

gha_license_id: NOASSERTION


text:
# project-name

Follow this steps to run this example project:

- have docker instaleld
- run etcd server: https://hub.docker.com/r/bitnami/etcd/
- Build image: docker build -t project-name .
- Run container: docker run --rm --name my_project_container -p 80:80 -e MODULE_NAME="project_name.main" project-name
- go to: http://<IP_ADDRESS>:80
- JUST USE DOCKER COMPOSE.

- to run without docker: uvicorn project_name.main:app --reload

# test etcd
>>> etcd = etcd3.client(host='localhost', port=2379)
>>> etcd.put('/project_name/test_x', 'test x var 123')

license: MIT

repository: rso-school-project/image-handler

branch_name: refs/heads/master

extension: md

gha_language: Python

gha_license_id: MIT

license_type: permissive

repo_name: rso-school-project/image-handler


text:
# Pizza

## Description

This application is a demonstration of constructors and prototypes using JavaScript to create a simple Pizza price calculator

## Specs

Program can create a pizza object on start

Program allows choice of small, medium and large sizes, if you want cheese, 3 different sauces and 7 different toppings

Program shows the next step block when clicking the button next

Program displays your choices by swapping images if applicable
(sauces won't show if cheese is true)

Program adds $1 to total per topping but $2 for bacon

Program will display a final price below based on size and toppings

## Setup

Install orderPizza by cloning this repository.

## Technologies Used

JavaScript and jQuery

### Legal

Copyright (c) 2018 **Epicodus**

This software is licensed under the MIT license.

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

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

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

repository: logmannn/pizzaPrice

repo_name: logmannn/pizzaPrice


text:
# Algebra Tool

A tool for manipulating algebraic expressions and equations.

![screenshot.png](screenshot.png)

## Features

- works with equations and expressions
- basic operations: +, -, *, /
- integers and fractions
- adjust the amount help it gives the student
- undo/redo
- history with descriptions of actions
- hint system (when running the server locally)

## Future

- powers and roots
- absolute value
- trigonometry
- system of equations
- vectors and matrices
- differentiation and integration

## Installation

- `npm install`
- `npm start` (requires node version 4+)
- in another terminal `node api-server.js`
- open [http://localhost:3000](http://localhost:3000) in a browser

## Live Demo

[khan.github.io/algebra-tool](https://khan.github.io/algebra-tool)

- [2x + 5 = 10](https://khan.github.io/algebra-tool/?start=2x+5%3D10&end=x%3D5/2)
- [1/2 + 1/3](https://khan.github.io/algebra-tool/?start=1/2+1/3&end=5/6)
- [12 = 2(x - 1)](https://khan.github.io/algebra-tool/?start=12%3D2(x-1)&end5%3Dx)
- [(4 - x)/3 = 9](https://khan.github.io/algebra-tool/?start=(4-x)/3%3D9&-23%3Dx)

### Supported URL Params

- __start__: URL encoded expression or equation, default: `2x + 5 = 10`
- __end__: URL encoded expression or equation, default: `x = 5/2`
- __eliminateZero__: if an `evaluate` action results in a zero, we will automatically remove it.  TODO: handle division by zero
- __eliminateDivByOne__: if a `cancel` operation results in division by one, we will automatically remove it.
- __autoeval__: compute the result of an `evaluate` action instead of asking the user to input the result.
- __hints__: enables hint system (only works when running locally)

e.g. `localhost:3000/?start=x-1%3D5&end=x%3D6&eliminateZero&eliminateDivByOne&autoeval&hints`

## Contributing

Please report bugs and feature requests to https://github.com/khan/algebra-tool/issues.

repository: Khan/algebra-tool

repo_name: Khan/algebra-tool


text:
# Test keys and accounts

## User accounts

When a user sends a transaction to the blockchain, the transaction needs to be signed with the user's private key. A standard user account includes the following details:

* User public key
* User private key
* User address

## Test accounts for Gamma CLI

Gamma CLI simulates transactions for testing contracts and therefore needs a set of demo user accounts.

When Gamma server is first started, Gamma CLI automatically creates 10 testing accounts and saves their details in a JSON file named `orbs-test-keys.json` in the local directory.

{% hint style="danger" %}
These keys are for testing only and should not be used in secure production environments.
{% endhint %}

Every account is assigned a textual ID, from `user1` to `user10` which can be provided as a command line argument to Gamma CLI to specify that a specific account should sign a transaction.

## Generating new test accounts

To replace the keys with a new batch of 10 accounts run in terminal

```text
gamma-cli gen-test-keys
```

This will override `orbs-test-keys.json` with new data.

## Editing account details manually

The JSON format of `orbs-test-keys.json` is straightforward

{% code title="orbs-test-keys.json" %}
```javascript
  "user1": {
    "PrivateKey": "0x8fc915f55aD5c6EFA5dC9a20F14a1Ec365afa23Ed1E5eB42a7512e2977C6693D77b5D6bFDbFb44A441330d1EDcD7d654240fb6B1b5FfeDAB94695fc70576eCE1",
    "PublicKey": "0x77B5D6bFDbfb44A441330d1eDCD7d654240Fb6B1b5FfEDAb94695Fc70576eCE1",
    "Address": "0xAECf291DA35F40D161B18eA01439CE3173D31AFf"
  },
  "user2": {
    "PrivateKey": "0x09f781c591826F7c2c59905e1Ad3c735DbA4C66611f952BF11eb00f982b1644e4Be27318345a3A3dbb38aC64A603dd573d886EB22B1634B580661fd164467670",
    "PublicKey": "0x4be27318345a3A3dBb38ac64A603DD573d886eB22B1634b580661fd164467670",
    "Address": "0xD66D89bB766745943c1c87062Ca0D3587e7D926B"
  },
  "user3": {
    "PrivateKey": "0x31e9AF96EF98957B966078b3Ea7cB058bFa10282b6A20DF832d817e4302114aa150FBFb587be65E07765a075988fB49e3CeaAe034E5e731aa961fAfc1375142a",
    "PublicKey": "0x150FbfB587BE65e07765a075988fb49e3cEAAe034E5e731aA961faFc1375142a",
    "Address": "0x28E445b353BC8376FD13291583Ec55e3e6140Ec5"
  }
```
{% endcode %}

Feel free to edit the file manually and add your own accounts. "Real-life" accounts are usually created using the [Orbs Client SDK](https://github.com/orbs-network/orbs-client-sdk-go).

The fields are encoded as follows:

* Textual IDs for every account \(eg. `user2`\) can be changed to any string you prefer
* Key and Address fields are encoded in [Base64](https://en.wikipedia.org/wiki/Base64)

repository: orbs-network/docs-contract-sdk

repo_name: orbs-network/docs-contract-sdk


text:
![Text-to-Handwriting](https://user-images.githubusercontent.com/49498445/126910382-dec5e846-db03-4903-9a3b-27015f599b6b.gif)

Text_to_Handwriting-App

 A simple text to handwriting web app using Python and Streamlit

## ![image](images/Description.png) Description

This is a simple web application that transforms text messages entered by the user into a well-formatted handwritten image that can then be saved to your local device.

This project is built using `Python` and `Streamlit`. The text to handwritting conversion is done using [PyWhatKit](https://pywhatkit.herokuapp.com/) library.

## ![image](images/Languages_frameworks.png) Languages and Frameworks

| Name             | Version       |
| :---------------:|:-------------:|
| `Python`         | v3.9.5        |
| `Streamlit`      | v0.84.1       |
| `PyWhatKit`      | v5.0          |

## ![image](images/requirements.png) Requirements

```python
pip install streamlit
pip install pywhatkit
pip install requests
```

## ![image](images/usage.png) Usage

- Clone [Text_to_Handwriting-App](https://github.com/AdiShenz98/Text_to_Handwriting-App) repository.
- Open CMD in working directory.
- Run following command.

  ```
  pip install -r requirements.txt
  ```
- `app.py` is the main python file of Streamlit Web Application.
- To run app, write the following command in `cmd` or in your preferred `IDE terminal`
  ```
  streamlit run app.py
  ```

## ![image](images/Demo.png) Demo
![Demo 1](https://user-images.githubusercontent.com/49498445/126910431-da3f6427-ba1c-4a9f-ac64-5e12c89d5925.gif)
![Demo 2](https://user-images.githubusercontent.com/49498445/126910413-88206f0a-d952-4bdc-9212-06d035501687.gif)
![Demo 3](https://user-images.githubusercontent.com/49498445/126910420-7577b5a5-8c14-4c41-be8f-852b594016a1.gif)

## ![image](images/License.png) License

branch_name: refs/heads/main


text:
# msgexplorer
The msgexplorer application allows you to view a Microsoft Outlook .msg file at any level of detail:
*   The file header

*   The raw sectors

*   The doubly-indirect file allocation table (DIFAT)

*   The File Allocation Table (FAT)

*   The chains of mini sectors in the mini stream

*   The directory (which contains all the fields in the .msg file)
    *   The entry metadata
    *   The entry contents in bytes
    *   The entry contents in text, if the stored data for that entry is a string

This is a JavaFX application written to use Java 11. The generic JavaFX code (as well as the msg library and the voluminouspaginationskin library) are
included in the jar file, but the platform-specific JavaFX libraries need to be installed and in the classpath for it to work.

The published Javadoc covers only public classes, functions, and members, of which there are very few. More interesting Javadoc can be generated via
'''bash
mvn -P doc-dev javadoc:javadoc
'''
This will put the Javadoc for all (private, package-private, protected, and public) entities in the directory target/site/javadoc-dev.

## Running the software
Caveat: This is a JavaFX application, which complicates things. In time, I will release jar files for each major platform (Windows, Mac, Linux) which include the relevant JFX modules, but for this first release, I have not done so, which makes running the software complicated.
1.  Install the required parts of JavaFX, by one of the following mechanisms:
    *   Install the [JavaFX SDK](https://gluonhq.com/products/javafx/)

    *   Download the JavaFX jars for your platform from Maven Central:
        *   [javafx-base-14-win.jar / javafx-base-mac.jar / javafx-base-14-linux.jar](https://mvnrepository.com/artifact/org.openjfx/javafx-base)
        *   [javafx-controls-14-win.jar / javafx-controls-14-mac.jar / javafx-controls-14-linux.jar](https://repo1.maven.org/maven2/org/openjfx/javafx-controls/14/)
        *   [javafx-graphics-14-win.jar / javafx-graphics-14-mac.jar / javafx-graphics-14-linux.jar](https://repo1.maven.org/maven2/org/openjfx/javafx-graphics/14/)

2.  The location of the javafx jar files is the "<module-path>" in the command below

3.  Add msgexplorer to the class path (the msgexplorer jar file already includes the non-JavaFX dependencies)

4.  Run via
    `java --module-path <module-path> --add-modules javafx.controls io.github.jmcleodfoss.msgexplorer.MsgExplorer [msg-file]`

## Releases
### 1.0.0
Initial version
---
*   [View Javadoc](https://javadoc.io/doc/io.github.jmcleodfoss/msgexplorer/1.0.0/io.github.jmcleodfoss.msgexplorer/module-summary.html)
*   [Download from Sonatype OSS Maven Repository](https://repo1.maven.org/maven2/io/github/jmcleodfoss/msgexplorer/1.0.0/msgexplorer-1.0.0.jar)

### 1.0.1
Addresses security and, resource leaks, and code quality issues found by static analysis tools (Codacy and Xanitizer, primarily)
---
*   [View Javadoc](https://javadoc.io/doc/io.github.jmcleodfoss/msgexplorer/1.0.1/io.github.jmcleodfoss.msgexplorer/module-summary.html)
*   [Download from Sonatype OSS Maven Repository](https://repo1.maven.org/maven2/io/github/jmcleodfoss/msgexplorer/1.0.1/msgexplorer-1.0.1.jar)

### 1.0.2
Pick up the latest version of the msg library to get the following fixes
*   Run in non-English locales (Issue #2)
*   Read MSI files (Issue #5)
---
*   [View Javadoc](https://javadoc.io/doc/io.github.jmcleodfoss/msgexplorer/1.0.2/io.github.jmcleodfoss.msgexplorer/module-summary.html)
*   [Download from Sonatype OSS Maven Repository](https://repo1.maven.org/maven2/io/github/jmcleodfoss/msgexplorer/1.0.2/msgexplorer-1.0.2.jar)

repository: Jmcleodfoss/msgreader

gha_language: Java

repo_name: Jmcleodfoss/msgreader


text:
### [CVE-2021-25921](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25921)
![](https://img.shields.io/static/v1?label=Product&message=openemr&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Cross-Site-Scripting&color=brighgreen)

### Description

In OpenEMR, versions 2.7.3-rc1 to 6.0.0 are vulnerable to Stored Cross-Site-Scripting (XSS) due to user input not being validated properly in the `Allergies` section. An attacker could lure an admin to enter a malicious payload and by that initiate the exploit.

### POC

#### Reference
- https://www.whitesourcesoftware.com/vulnerability-database/CVE-2021-25921

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# partnerPicker

## George Washington University Bootcamp Partner Picker

### What is it?
  * Gives the ability to quickly create randomized groups for student to work on activities together
  * Has ability to remove names and add names based on attendence

### To do:
  * Provide option for number of students in groups
  * Add parameters to make sure that no group of students work together multiple times

gha_language: JavaScript


text:
# Stocks

Stocks app with android arch components, rxjava, dagger 2, data binding, retrofit and mote
[](https://play.google.com/store/apps/details?id=com.ap.mobile.stocks)

### Stock Data
All the data is provided for free by [IEX](https://iextrading.com/developer). View [IEX’s Terms of Use](https://iextrading.com/api-exhibit-a/).

## Android Architecture Components

A sample app that fatech data from jsonplaceholder.typicode.com with MVVM and Architecture Components using Data binding, Dagger2, RxJava, Retrofit, OkHttp

* Offline Support
* Repository Pattern

## Libraries, tools used

* [Architecture Components](https://developer.android.com/topic/libraries/architecture/index.html) ([LiveData](https://developer.android.com/topic/libraries/architecture/livedata.html), [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel.html), [Room Persistance](https://developer.android.com/topic/libraries/architecture/room.html))
* [Android Data Binding](https://developer.android.com/topic/libraries/data-binding/index.html)
* [Dagger2](https://github.com/google/dagger) for dependency injection
* [RxJava](https://github.com/ReactiveX/RxJava) & [RxAndroid](https://github.com/ReactiveX/RxAndroid) for composing asynchronous and event-based programming
* [Retrofit](https://github.com/square/retrofit) for a type-safe HTTP client
* [OkHttp](https://github.com/square/okhttp) for HTTP & HTTP/2 client
* [GSON](https://github.com/google/gson) for JSON Serialization
* [Stetho](https://github.com/facebook/stetho) for network inspection
* [LeakCanary](https://github.com/square/leakcanary) for memory leak detection

## Screen shots

# License

    Copyright 2017 Abhishek Prajapati

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

repository: rohitnotes/Stocks

repo_name: rohitnotes/Stocks


text:
# Example Express Server

Example implementation of Express JS server for Auth0 ReactJS samples in TypeScript.

## Usage

```bash
yarn install
yarn start
```

This will install dependencies and run local ExpressJS server on the `3001` port. The server supports token based authentication and authorization using Auth0.

## Author

@peterblazejewicz


text:
So far we have seen several examples of how to generate sounds and simple images (text). Here we'll cover stimulus generation in more detail.

# Sounds

Weber's primary focus is on psychoacoustics, so there are many methods for
generating and manipulating sounds. There are two primary ways to create sound
stimuli: loading a file and composing sound primitives.

## Loading a file

Generating stimuli by loading a file is easy. You simply play the given file, like so.

```julia
addtrial(moment(play,"mysound_file.wav"))
```

!!! note "Sounds are cached"

    You can safely play the same file multiple times: the sound is cached, and will only load into memory once.

If you need to manipulate the sound before playing it, you can load it using [`sound`](@ref).  For example, to remove any frequencies from `"mysound_file.wav"` above 400Hz before playing the sound, you could do the following.

```julia
mysound = lowpass(sound("mysound_file.wav"),400Hz)
addtrial(moment(play,mysound))
```

## Sound Primitives

There are several primitives you can use to generate simple sounds directly in Weber. They are [`tone`](@ref) (to create pure tones), [`noise`](@ref) (to generate white noise), [`silence`](@ref) (for a silent period) and [`harmonic_complex`](@ref) (to create multiple pure tones with integer frequency ratios).

These primitives can then be combined and manipulated to generate more interesting sounds. You can filter sounds ([`bandpass`](@ref), [`bandstop`](@ref), [`lowpass`](@ref), [`highpass`](@ref) and [`lowpass`](@ref)), mix them together ([`mix`](@ref)) and set an appropriate decibel level ([`attenuate`](@ref)). You can also manipulate the envelope of the sound ([`ramp`](@ref), [`rampon`](@ref), [`rampoff`](@ref), [`fadeto`](@ref), [`envelope`](@ref) and [`mult`](@ref)).

For instance, to play a 1 kHz tone for 1 second inside of a noise with a notch from 0.5 to 1.5 kHz, with 5 dB SNR you could call the following.

```julia
mysound = tone(1kHz,1s)
mysound = ramp(mysound)
mysound = attenuate(mysound,20)

mynoise = noise(1s)
mynoise = bandstop(mynoise,0.5kHz,1.5kHz)
mynoise = attenuate(mynoise,25)

addtrial(moment(play,mix(mysound,mynoise))
```

Weber exports the macro `@>` (from [Lazy.jl](https://github.com/MikeInnes/Lazy.jl#macros)) to simplify this pattern. It is easiest to understand the macro by example: the below code yields the same result as the code above.

```juila
mytone = @> tone(1kHz,1s) ramp attenuate(20)
mynoise = @> noise(1s) bandstop(0.5kHz,1.5kHz) attenuate(25)
addtrial(moment(play, mix(mytone,mynoise)))
```

Weber also exports `@>>`, and `@_` (refer to [Lazy.jl](https://github.com/MikeInnes/Lazy.jl#macros) for details).

## Sounds are arrays
Sounds can be manipulated in the same way that any array can be manipulated in Julia, with some additional support for indexing sounds using time units. For instance, to get the first 5 seconds of a sound you can do the following.

```julia
mytone = tone(1kHz,10s)
mytone[0s .. 5s]
```

Furthermore, we can concatenate multiple sounds, to play them in sequence. The
following code plays two tones in sequence, with a 100 ms gap between them.

```julia
interval = [tone(400Hz,50ms); silence(100ms); tone(400Hz * 2^(5/12),50ms)]
addtrial(moment(play,interval))
```

## Stereo Sounds

You can create stereo sounds with using [`leftright`](@ref), and reference their left and right channel sound using `:left` or `:right` as a second index, like so.

```julia
stereo_sound = leftright(tone(1kHz,2s),tone(2kHz,2s))
addtrial(moment(play,stereo_sound[:,:left],
         moment(2s,play,stereo_sound[:,:right]))
```

The functions [`left`](@ref) and [`right`](@ref) serve the same purpose, but can also operate on streams.

## Streams

In addition to the discrete sounds that have been discussed so far, Weber also
supports sound streams. Streams are arbitrarily long: you need not decide when
they should stop until after they start playing. All of the primitives described
so far can apply to streams, except that streams cannot be indexed.

!!! note "Streaming operations are lazy"

    All manipulations of streams are lazy: they are applied just as the stream
    is played. The more operators you apply to a stream the more processing that
    has to occur during playback. If you have a particularly complicated stream
    you may have to increase streaming latency by changing the `stream_unit`
    parameter of [`setup_sound`](@ref), or consider an alternative approach
    (e.g. [`audible`](@ref)).

To create a stream you can use one of the standard primitives, leaving out the
length parameter. For example, the following will play a 1 kHz pure tone until Weber quits.

```julia
addtrial(moment(play,tone(1kHz)))
```

Streams always play on a specific stream channel, so if you want to stop the stream at some point you can request that the channel stop. The following plays a pure tone until the experiment participant hits spacebar.

```julia
addtrial(moment(play,tone(1kHz),channel=1),
         await_response(iskeydown(key":space:")),
         moment(stop,1))
```

Streams can be manipulated as they are playing as well, so if you wanted to have a ramp at the start and end of the stream to avoid clicks, you could change the example above, to the following.

```julia
ongoing_tone = @> tone(1kHz) rampon
addtrial(moment(play,ongoing_tone,channel=1),
         await_response(iskeydown(key":space:")),
         moment(play,rampoff(ongoing_tone),channel=1))
```

!!! warning "Streams are stateful"

    This example also demonstrates the stateful nature of streams. Once some
    part of a stream has been played it is forever consumed, and cannot be
    played again. After the stream is played, subsequent modifications only apply
    to unplayed frames of the stream. *BEWARE*: this means that you cannot
    play two different modifications of the same stream.

Just as with any moment, these manipulations to streams can be precisely timed. The following will turn the sound off precisely 1 second after the space key is pressed.

```julia
ongoing_tone = @> tone(1kHz) rampon
addtrial(moment(play,ongoing_tone,channel=1),
         await_response(iskeydown(key":space:")),
         moment(1s,play,rampoff(ongoing_tone),channel=1))
```

If you wish to turn the entirety of a finite stream into a sound, you can use [`sound`](@ref). You can also grab the next section of an infinite stream using [`sound`](@ref) if you provide a second parameter specifying the length of the stream you want to turn into a sound.

Some manipulations of streams require that the stream be treated as a sound. You
can modify individual sound segments as they play from the stream using
[`audiofn`](@ref). (Calling [`audiofn`](@ref) on a sound, rather than a stream, is the same as applying the given function to the sound directly).

## Low-level Sound/Stream Generation

Finally, if none of the functions above suit your purposes for generating sounds or streams, you can use the function [`audible`](@ref), which can be used to generate any arbitrary sound or stream you want. Please refer to the source code for [`tone`](@ref) and [`noise`](@ref) to see examples of the two ways to use this function.

# Images

Images can also be generated by either displaying a file or generating image primitives.

## Loading a file

Displaying an image file is a simple matter of calling display on that file.

```julia
addtrial(moment(display,"myimage.png"))
```

!!! note "Images are cached"

    You can safely display the same file multiple times: the image is cached, and will only load into memory once.

Analogous to sounds, if you need to manipulate the image before displaying it you can load it using [`visual`](@ref). For example, the following displays the upper quarter of an image.

```julia
myimage = visual("myimage.png")
addtrial(moment(display,myimage[1:div(end,2),1:div(end,2)]))
```

Note that displaying a string can also result in that string being printed to the screen. Weber determines the difference between a string you want to display and a string referring to an image file by looking at the end of the string. If the string ends in a file type (.bmp, .jpeg, .png, etc...), Weber assumes it is an image file you want to load, otherwise it assumes it is a string you want to print to the screen.

## Image Primitives

Support for generating images in Weber comes from [Images.jl](https://github.com/JuliaImages/Images.jl). In this package, images are represented as arrays. For instance, to display a white 100x100 pixel box next to a black 100x100 pixel box, we could do the following.

```julia
addtrial(moment(display,[ones(100,100); zeros(100,100)]))
```

For more information about generating images please refer to the [JuliaImages](http://juliaimages.github.io/latest/) documentation.


text:
# Authentication reactjs with social networks

Using the Firebase API, we create a form of authentication with social networks: Facebook, Twitter and Google.

Using datas like: DisplayName and PhotoURL

## Instalation

### Update dependencies

```bash
yarn install or npm install
```

### Running server

```bash
yarn start or npm start
```

## License

MIT Licensed
Copyright (c) 2017 Mario Moreno

repository: soymariomoreno/react-authentication

repo_name: soymariomoreno/react-authentication


text:
**Reproduction of the problem**

ng2-charts is a port & modification of Chart.js component for Angular 2. Sometimes the issue is related with Chart.js instead of ng2-charts.
To confirm, if the issue shows in a pure Chart.js project, it is a issue of Chart.js.
Pure Chart.js starting template: https://jsfiddle.net/Hongbo_Miao/mvct2uwo/3/

If the issue does not show in a pure Chart.js project, and shows in a ng2-charts project, please try to provide a minimal demo of the problem.
ng2-charts starting template: http://plnkr.co/edit/Ka4NXG3pZ1mXnaN95HX5?p=preview

gha_language: TypeScript


text:
---
title: The environmental damage caused by
tags:
  - May 1992
---

The environmental damage caused by salvor Mel Fisher at Coffins Patch is examined by the federal magistrate.

Newspapers: **Miami Morning News or The Miami Herald**

Page: **1**, Section: **A**


text:
# User Stories

* As a user, I can sign up and log in.
* As a user, I can preform CRUD actions on Games and Wishlist.

# Models

## User

#### Attributes:

* email
* name

#### Associations:

* has_many :games
* has_many :wishlist

## Game

#### Attributes:

* Name
* Release Date
* Developer
* Publisher
* Condition
* Console Format(DMG - GBC - GBA)

#### Associations:

* belongs_to :user

## Wishlist

#### Attributes:

* Name
* Console Format(DMG - GBC - GBA)

#### Associations:

* belongs_to :user

gha_language: Ruby


text:
---
title: Docker 入门
tags:
  - howto
  - docker
categories:
  - howto
date: 2016-01-13 18:00:45
---

## 简介 ##
我从14年年底开始关注docker容器生态的发展，短短两年见识了Docker的几近“燎原之势”，感慨互联网之迅猛之余，想着也该写篇文章来记录一下我的Docker成长之路。一切都将从那个炎热的中午开始...

## 安装 ##
目前docker的最新版本为1.10.3
linux（ubuntu）
```bash
$ sudo apt-get update && sudo apt-get install curl
$ curl -fsSL https://get.docker.com/gpg | sudo apt-key add -
$ curl -fsSL https://get.docker.com | sh
```

windows
可以通过choco包管理器安装[详情](/howto-use-windows-choco.md)
```cmd
cinst docker -y
cinst docker-machine -y
cinst docker-compose -y
可以通过下载[Docker Toolbox](https://github.com/docker/toolbox/releases/download/v1.10.3/DockerToolbox-1.10.3.exe)安装，Toolbox集成了Docker Engine,docker-machine,docker-compose以及Kitematic Beta版
注：安装前，请先安装依赖的virtualbox。

macos
同windows
mac用户可以通过homebrew管理器安装
```bash
$ brew install docker
$ brew install docker-machine
$ berw install docker-compose
```
或者homebrew cask安装Docker Toolbox
```bash
$brew cask install dockertoolbox
```
或者通过下载[Docker Toolbox](https://github.com/docker/toolbox/releases/download/v1.10.3/DockerToolbox-1.10.3.pkg)安装

## 命令概览 ##
```bash
Usage: docker [OPTIONS] COMMAND [arg...]
       docker daemon [ --help | ... ]
       docker [ --help | -v | --version ]

A self-sufficient runtime for containers.

Options:

  --config=~/.docker              Location of client config files
  -D, --debug                     Enable debug mode
  -H, --host=[]                   Daemon socket(s) to connect to
  -h, --help                      Print usage
  -l, --log-level=info            Set the logging level
  --tls                           Use TLS; implied by --tlsverify
  --tlscacert=~/.docker/ca.pem    Trust certs signed only by this CA
  --tlscert=~/.docker/cert.pem    Path to TLS certificate file
  --tlskey=~/.docker/key.pem      Path to TLS key file
  --tlsverify                     Use TLS and verify the remote
  -v, --version                   Print version information and quit

Commands:
    attach    Attach to a running container
    build     Build an image from a Dockerfile
    commit    Create a new image from a container's changes
    cp        Copy files/folders between a container and the local filesystem
    create    Create a new container
    diff      Inspect changes on a container's filesystem
    events    Get real time events from the server
    exec      Run a command in a running container
    export    Export a container's filesystem as a tar archive
    history   Show the history of an image
    images    List images
    import    Import the contents from a tarball to create a filesystem image
    info      Display system-wide information
    inspect   Return low-level information on a container or image
    kill      Kill a running container
    load      Load an image from a tar archive or STDIN
    login     Register or log in to a Docker registry
    logout    Log out from a Docker registry
    logs      Fetch the logs of a container
    network   Manage Docker networks
    pause     Pause all processes within a container
    port      List port mappings or a specific mapping for the CONTAINER
    ps        List containers
    pull      Pull an image or a repository from a registry
    push      Push an image or a repository to a registry
    rename    Rename a container
    restart   Restart a container
    rm        Remove one or more containers
    rmi       Remove one or more images
    run       Run a command in a new container
    save      Save an image(s) to a tar archive
    search    Search the Docker Hub for images
    start     Start one or more stopped containers
    stats     Display a live stream of container(s) resource usage statistics
    stop      Stop a running container
    tag       Tag an image into a repository
    top       Display the running processes of a container
    unpause   Unpause all processes within a container
    update    Update resources of one or more containers
    version   Show the Docker version information
    volume    Manage Docker volumes
    wait      Block until a container stops, then print its exit code

Run 'docker COMMAND --help' for more information on a command.

```

## 常用命令 ##
搜索镜像
docker search image_name
列出本地镜像
docker images
拉取镜像
docker pull [(url:port/)image_name(:tag)]
构建镜像
docker build [Dockerfile目录]
运行镜像
docker run -d image_name
docker run -ti image_name /bin/bash
停止容器
docker stop contain_name
删除容器
docker rm [contain_name]
删除镜像
docker rmi image_name
给镜像打tag
docker tag contain_name tagname

## docker machine ##
### 命令概览 ###
```bash
Usage: docker-machine.exe [OPTIONS] COMMAND [arg...]

Create and manage machines running Docker.

Version: 0.6.0, build e27fb87

Author:
  Docker Machine Contributors - <https://github.com/docker/machine>

Options:
  --debug, -D						Enable debug mode
  -s, --storage-path "C:\Users\Admin\.docker\machine"	Configures storage path [$MACHINE_STORAGE_PATH]
  --tls-ca-cert 					CA to verify remotes against [$MACHINE_TLS_CA_CERT]
  --tls-ca-key 						Private key to generate certificates [$MACHINE_TLS_CA_KEY]
  --tls-client-cert 					Client cert to use for TLS [$MACHINE_TLS_CLIENT_CERT]
  --tls-client-key 					Private key used in client TLS auth [$MACHINE_TLS_CLIENT_KEY]
  --github-api-token 					Token to use for requests to the Github API [$MACHINE_GITHUB_API_TOKEN]
  --native-ssh						Use the native (Go-based) SSH implementation. [$MACHINE_NATIVE_SSH]
  --bugsnag-api-token 					BugSnag API token for crash reporting [$MACHINE_BUGSNAG_API_TOKEN]
  --help, -h						show help
  --version, -v						print the version

Commands:
  active		Print which machine is active
  config		Print the connection config for machine
  create		Create a machine
  env			Display the commands to set up the environment for the Docker client
  inspect		Inspect information about a machine
  ip			Get the IP address of a machine
  kill			Kill a machine
  ls			List machines
  provision		Re-provision existing machines
  regenerate-certs	Regenerate TLS Certificates for a machine
  restart		Restart a machine
  rm			Remove a machine
  ssh			Log into or run a command on a machine with SSH.
  scp			Copy files between machines
  start			Start a machine
  status		Get the status of a machine
  stop			Stop a machine
  upgrade		Upgrade a machine to the latest version of Docker
  url			Get the URL of a machine
  version		Show the Docker Machine version or a machine docker version
  help			Shows a list of commands or help for one command

Run 'docker-machine.exe COMMAND --help' for more information on a command.

```

## docker compose ##
### 命令概览 ###

```bash
Define and run multi-container applications with Docker.

Usage:
  docker-compose [-f=<arg>...] [options] [COMMAND] [ARGS...]
  docker-compose -h|--help

Options:
  -f, --file FILE           Specify an alternate compose file (default: docker-compose.yml)
  -p, --project-name NAME   Specify an alternate project name (default: directory name)
  --verbose                 Show more output
  -v, --version             Print version and exit

Commands:
  build              Build or rebuild services
  config             Validate and view the compose file
  create             Create services
  down               Stop and remove containers, networks, images, and volumes
  events             Receive real time events from containers
  help               Get help on a command
  kill               Kill containers
  logs               View output from containers
  pause              Pause services
  port               Print the public port for a port binding
  ps                 List containers
  pull               Pulls service images
  restart            Restart services
  rm                 Remove stopped containers
  run                Run a one-off command
  scale              Set number of containers for a service
  start              Start services
  stop               Stop services
  unpause            Unpause services
  up                 Create and start containers
  version            Show the Docker-Compose version information
```

### YML文件 ###


text:
# Main Like Module

[![Build Status](https://secure.travis-ci.org/rubyworks/main_like_module.png)](http://travis-ci.org/rubyworks/main_like_module)

__DESCRIPTION__

Did you know `main`? Main is actually the special name Ruby gives
to the toplevel object. This object is very special, it is actually
in part a proxy object for the Object class itself. But it's only
a partial implementation.

I have long argued that the toplevel object should be replaced with
an self extended module, e.g.

    module Toplevel
      extend self
      # ruby is executed here
    end

This would have a couple of significant benefits. First, the toplevel
would no longer pollute every other object in the system. And second,
the toplevel would be a fully operational module context.

Alas, so far, no avail. But there's always hope. In the mean time,
we can at least support the second point by completing the proxy,
making it emulate the Object class context in full. And that's
exactly what Main Like Module does.

__COPYRIGHTS__

Copyright (c) 2009 Rubyworks

Main as Module is distributable in accordance with the BSD-2-Clause license.

See COPYING.md for details.


text:
# TheMovie

![Preview-Screens](screenshotTheMovie.png)

## About Project

This app was developed through a [challenge](file:///C:/Users/rafae/Downloads/Desafio%20M2y%20Android%20%20(1).pdf). In addition to the resources required by the challenge, others were added such as:
- Pull to refresh
- Icon Animated
  * Shape Shifter
  * AnimatedVectorDrawable
- Material Design
  * Snackbars

## API TheMovie DB

This app consumes a API REST, for more information visit the link: https://developers.themoviedb.org/3/getting-started/introduction

## Specifications and Technologies

- 100% Kotlin
- Architecture MVVM
- Clean Architecture
- Design Patterns
- Data Binding
- Android Jetpack
  * Navigation
  * Live Data
- Kotlin Coroutines
- Retrofit 2
  * Interceptor OkHttp3
  * Converter Moshi
- Depedence Injection :syringe: Dagger 2

## Installers

If you want to test the App in the Production mode, the installers are listed below:

[Android.apk installer](https://drive.google.com/file/d/1o3iSaSDMwblOvbk6vJTWFJADyagZUGWq/view?usp=sharing)

## Built With

- [Android-Studio](https://developer.android.com/studio/preview?hl=pt) - Official native android development IDE

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/steniowagner/mindCast/blob/master/LICENSE) file for details

repository: rafaelkapi/TheMovie

repo_name: rafaelkapi/TheMovie


text:
---
published: true
layout: default
title: The Element Menu
---

[table_of_contents]

There are two menu entries [Tile Path](##Tile.Path) and
[Non Linear Transform...](##Non-Linear.Transform...) which are not part of the default
build but which may be configured by modifying `configure-fontforge.h`
before compiling FontForge.

#### Font Info

In all views this brings up the [Font Info dialog](../fontinfo/).

CID keyed fonts can set information on the CID font as a whole (rather
than just the current sub-font, which is what this command does) from
[CID-\>CID Font Info](../cidmenu/#FontInfo).

#### Glyph Info

In the all views this brings up the [Glyph Info
dialog](../charinfo/#Character).

#### MATH Info...

Brings up the [MATH Info dialog](../../reference/math/).

##### BDF Info

If you have bitmaps in your font, then in the font view or bitmap view
this command will bring up the [BDF Info dialog.](../bdfinfo/)

##### Horizontal Baselines...

This [dialog](../baseline/) gives you control over the OpenType 'BASE'
table which allows you to specify different baselines for different
scripts, and how to align those baselines with each other. It also
provides fine control over the inter-baseline spacing (the line height).

##### Vertical Baselines...

This [dialog](../baseline/) gives you control over the OpenType 'BASE'
table which allows you to specify different baselines for different
scripts, and how to align those baselines with each other. It also
provides fine control over the inter-baseline spacing (the column
width).

##### Justification Information...

This [dialog](../justify/) allows you to examine and provide the
information needed for the OpenType JSTF table -- information which
helps layout engines do text justification.

##### Show Dependencies

###### References...

This dialog is not available in the bitmap view. It shows you what
glyphs contain a reference to the current glyph. You can open a window
looking at any of the dependent glyphs by selecting that glyph and
pressing the [Show] button.

###### Substitutions...

Show any glyphs that have substitutions (ligatures, multiple subs, etc.)
which depend on the current glyph. So if you select "i", you might see
that "fi" depended on it as a ligature, and if you select "A.swash" you
might see that "A" depended on it as a 'swsh' alternate subs.

##### Mass Glyph Rename...

![](/assets/img/filemenu-massrename.png)

This allows you to rename a bunch of selected glyphs. It can be used
in two ways, either:

- You want to rename all the selected glyphs by adding a suffix to
  their names (this might be useful if you are working with a small
  caps Type1 font that you wanted to convert to an otf font, where the
  old convention was just to name the glyphs as "a", "b" and so forth
  rather than "a.sc", "b.sc", etc.).
- Or you can select a block of glyphs, and specify another glyph
  somewhere in the encoding, then the selected glyphs would get be
  named by appending the suffix to the sequence of glyphs starting
  with the one identified in the dialog. (This might be useful if you
  wanted to add a small caps collection to an existing font). In this
  case you may also specify a lookup subtable so that the base glyphs
  would get substituted by the appropriate renamed glyphs when that
  subtable was activated (this can't be done in the previous case,
  because there are no longer any base glyphs)

#### Get Info

In the outline view this brings up [one of four different
dialogs](../getinfo/) (Point Info, Image Info, Reference Info, Anchor
Point Info) depending on what is selected.

#### Find Problems...

This command is not present in the bitmap view. It will search for
several common problems. In the glyph view it will select anything that
needs to be fixed, in the font view it will check all selected glyphs
and if any have problems will open them and select the problems. It will
post a message telling you of each problem found. It brings up the [Find
Problem](../problems/) dialog to let you choose what problems to look
for.

#### Validate...

Rather similar to Find Problems, but works with a much smaller set of
things which are definitely errors, and provides an overview of the
problems found in all glyphs of the font. See the [validation
page](../validation/) for more info.

####Bitmap Strikes Available...

This brings up a list of pixel sizes for bitmap fonts.

![](/assets/img/filemenu-bitmapsavail.png)

If you have bitmap fonts this will show their pixel sizes. If you remove
a size that is in the list then that font will be deleted from the sfd
file. If you add a size then that size font will be created and stored
in the sfd file.

FontForge deals in pixel sizes, not point sizes. The conversion between
pixels and points differs on different systems and indeed on different
screens.  Usually pixels range from
about 1/72 of an inch to about 1/144 of an inch. Different systems
support different screen resolutions as "standard", and FontForge tries
to know about these standards.

Some conversions between points and pixels

    Screen Resolution   72dpi   75dpi   96dpi   100dpi  120dpi
    Point Size          Mac     X       Win     X       Win
    10pt                10      10      13      14      17
    12pt                12      12~13   16      17      20
    18pt                18      19      24      25      30
    24pt                24      25      32      33      40

Sadly your screen will probably not match one of the standard screens
precisely. On X the standard resolutions are 75 and 100dpi, on MS
Windows 96 and 120dpi, and on the Mac 72dpi. This dialog provides the
conversion between pixel size and point sizes at these resolutions.

Normally the new glyphs are created by rasterizing the outline font. If
your system has the freetype2 library installed (and you checked the
"Use FreeType" box) then FontForge will use the FreeType rasterizer to
generate bitmaps, otherwise it will use FontForge's built-in rasterizer
(which isn't as good, but involves a little less overhead).

Finally, if you have no outline font then the new glyphs will be created
by scaling the (bitmap) font displayed in the font view.

If you want to generate a blank strike (one containing no glyphs) then
turn off the `[] Create Rasterized Strikes` checkbox.

In CID keyed fonts there will not be a set of bitmaps for each sub font,
instead the entire complex of sub-fonts share bitmaps.

![](/assets/img/filemenu-greymapsavail.png)

FontForge also supports anti-aliased bitmap fonts,
and you can use this dialog to generate them. If you want to generate a
12 point anti-aliased font with 8 bits per pixel you would type 12@8
into the dialog above. FontForge supports 1, 2, 4 and 8 bit per pixel
fonts (a 1 bit per pixel font is a standard bitmap, the others are
greymaps).
 (New greymaps can not be created by scaling old greymaps, if you wish
to generate a greymap font, you must have an outline font).

#### Regenerate Bitmap Glyphs...

If you have changed the outline that a bitmap is based one then you
should (at some point) look into changing the bitmap too. This command
allows you to regenerate a subset of the glyphs in a given bitmap font.
In the font view you can regenerate all selected glyphs, while in the
bitmap and outline views you can regenerate the current glyph. You can
pick what pixel sizes should be regenerated too (unlike the above
command, removing a bitmap size from the regenerate list will not delete
it). As before, if you wish to change a greymap you should refer to it by
`pixel-size@bits-per-pixel`.

#### Remove Bitmap Glyphs...

This command will remove one or several bitmap glyphs from a strike
(while leaving the strike otherwise intact). The dialog is similar to
the above two. Any indicated glyphs will be removed from the specified
strikes.

#### Styles

There are many [standard variations](../Styles/) on Latin (Greek,
Cyrillic) fonts. Some of them apply to other scripts -- making a font
darker (bolder) is common to many scripts, though the actual mechanics
differ from script to script) Others -- such as Italic -- are more
specialized.

##### Change Weight...

This is a simplistic command to make the stems of glyphs darker or
lighter. It sometimes works.

For CJK glyphs it simply expands the strokes of the font outward.

For LCG (Latin, Cyrillic, Greek) glyphs it expands the stroke outward
and then moves everything below a certain point up, and everything above
another point down. This is based on heuristics and will fail if a glyph
is even the slightest bit unexpected.
 For other writing systems FontForge will do something, currently it
will fall into one of the two cases above.
 See the [Change Weight dialog](../Styles/#Embolden).

##### Italic

An italic font is different from and more complex than an oblique font.
Traditionally fonts with serifs are made italic and fonts without serifs
are made oblique. This will change some letterforms, change the serifs,
condense the font and slant things. See the
[Italic dialog](../Styles/#Italic).

##### Oblique

An oblique font is different from and simpler than an italic font.
Traditionally fonts with serifs are made italic and fonts without serifs
are made oblique. This will slant the letters.

##### Condense/Extend

Allows you to change the width of the counters and side bearings of a
glyph. The algorithm only works on simple latin glyphs, and it has
problems with diagonal stems. See the
[Condense/Extend dialog](../Styles/#Condense).

##### Change X-Height

Allows you to change the x-height of a font

##### Change Glyph...

Allows you to make very general changes to a glyph's shape.

##### Add Small Caps

This is a little different from the previous menu items as it does not
change the selected characters themselves. Instead it creates a new
glyph (or reuses an old one) with the appropriate name. So if you
selected "A", "B", and "C" it would create glyphs "a.sc", "b.sc" and
"c.sc". It will create two lookups one bound to 'c2sc' which maps
capital letters to small caps, and the other bound to 'smcp' which maps
lower case letters to small caps. It will build the appropriate small
caps glyphs in the new glyph slots. This only applies to upper and lower
case letters in the latin, greek and cyrillic scripts.
[See the Small Caps dialog](../Styles/#Smallcaps).

##### Add Subscripts/Superscripts

Like the previous command this creates new glyphs based on the selected
ones. The outlines of the selected glyphs will be scaled (with stems
potentially being scaled differently from the glyph as a whole), and
moved vertically. Then a new lookup will be created mapping the original
glyph to the newly created one under control of the appropriate feature.
[See the Subscript/Superscript dialog](../Styles/#SubSuper).

##### Outline

![](/assets/img/filemenu-outlineinline.png)

Changes the selected glyphs so that instead of being a solid block, only
the outline of the glyph is visible. The glyphs' bounding boxes will not
change.

##### Inline

Changes the selected glyphs so that the glyph is surrounded by an
outline. The glyphs' bounding boxes will not change.

##### Shadow

Changes the selected glyphs to give them each a
shadow.

![](/assets/img/filemenu-shadowwireframe.png)

The user has control over the shadow size and angle.

##### Wireframe

Changes the selected glyphs to give them a 3D wireframe look.

#### Transformations

This sub-menu has rather different choices in the bitmap view from the
other views. (Because bitmaps are discrete and the continuous
transformations of splines are not meaningful).

##### Transform...

[In the Font and Outline Views this brings up the transform
dialog](../transform/). This provides the standard linear
transformations you expect to have available (rotation, scaling,
translation, skewing).

##### Point of View Projection

[This dialog](../transform/#PoV)allows you to perform a perspective
transformation on your glyphs. (This is a non-linear transformation)

##### Non-Linear Transform...

[This dialog](../transform/#Non-Linear) allows you to perform a general
transformation (which could be linear or which can be non-linear).
Essentially you provide two equations for how x and y should be mapped.

This command is not available in the default build, you must modify the
file `configure-fontforge.h` and then rebuild FontForge. This command
allows the user to specify a non-linear transformation as a pair of
expressions (the first specifies the transformation for the x
coordinate, the second for the y coordinate). These expressions may be
fairly general functions of x and y. See the
[scripting page](../../scripting/native/scripting-alpha/#NonLinearTransform)
for a description of the syntax.

##### Flip Horizontally

Flips the bitmap horizontally. (Only in bitmap view)

##### Flip Vertically

Flips the bitmap vertically. (Only in bitmap view)

##### Rotate 90° CW

Rotates the bitmap 90° clockwise. (Only in bitmap view)

##### Rotate 90° CCW

Rotates the bitmap 90° counter-clockwise. (Only in bitmap view)

##### Rotate 180°

Rotates the bitmap 180° (Only in bitmap view)

##### Skew

Allows you to specify a ratio by which to skew the bitmap 1:3 means for
every 3 pixel rise in y, skew the bitmap one pixel horizontally. (Only
in bitmap view)

#### Expand Stroke...

Not in the bitmap view. In the font view it applies to all foreground
splines in all selected glyphs. In the outline view it applies to all
paths that have at least one point selected (or if no points are
selected then it applies to all paths).

![](/assets/img/filemenu-twolines.png)
![](/assets/img/filemenu-expandedlines.png)

Above is a simple example of what expand stroke can do. It takes the
two open paths above left and turns them into the two closed paths
right.

![](/assets/img/filemenu-expandstroke.png)

The Expand Stroke dialog gives you control over various aspects of the
expansion process. First you can specify three types of pen nibs:

- A round pen, which is circular by default but may be transformed
  into an ellipse
- A rectangular pen, which is square by default but may be transformed
  into more traditional caligraphic nib shapes
- A polygonal pen -- you can draw almost any convex polygon.

For circular and caligraphic pens you can chose a stroke width, how the
ends of an open path should be drawn, and how the path should look when
two splines (or lines) join which do not have the same slope (ie. at a
corner point).

For closed contours you may also choose to remove either the generated
contour which is inside the original, or that which is outside

*Note: Make sure your glyph is oriented correctly with
[Edit-\>Correct Direction](#Correct) before removing a contour (if
misoriented the wrong contour may be removed).*

[How is this done?](pfaeditmath.html#Stroke)

#### Tile Path

This command is not available in the default build, you must reconfigure
`$ configure --with-tilepath` and then rebuild FontForge. Not available
in quadratic (truetype) fonts. This command brings up a
[dialog](../tilepath/) which allows you to specify a tile to be applied
to any selected contours.

#### Tile Pattern...

Also not available in the default build, also controled by
`$ configure --with-tilepath`. [This command](../tilepath/#Pattern)
allows you to design a pattern which will be layed down on the current
layer m\*n times (where m is the number of horizontal repeats and n the
number of vertical repeats.

#### Overlap

None of these is available in the bitmap view.

##### Remove Overlap

Not in the bitmap view, *not available when the font has quadratic
splines*^[1](#overlap-footnote)^. If two closed paths intersect then
there will be overlap. This will get rid of it, leaving one closed path
behind.

Make sure paths have the correct orientation. Consider the letter "O"
with two contours. If both contours run in the same direction then the
inner path will be removed (because the outer path overlaps it
everywhere), but if the contours run in opposite orientations then the
inner path will be retained. Things get very strange if you have
intersecting paths with different orientations.

![](/assets/img/filemenu-expandedlines.png)
![](/assets/img/filemenu-overlappedlines.png)

This command is probably the buggiest in FontForge. So before FontForge
invokes the command it will save the state to the error recovery file.

**Warning: Splines which are tangent (or nearly so) cause problems.
Points which are close together can cause problems.**

##### Intersect

![](/assets/img/filemenu-exclude-pre.png)
![](/assets/img/filemenu-intersect-post.png)

This will remove everything not in the intersection of two regions.

##### Exclude

![](/assets/img/filemenu-exclude-pre.png)
![](/assets/img/filemenu-exclude-post.png)

This will remove the selected contours from the unselected ones. Only
available in the outline glyph view.

##### Find Intersections

This finds the places where overlapping contours intersect and inserts
points at those locations.

#### Simplify

##### Simplify

Not in the bitmap view. If you have lots of points on a path, some of
which do not materially add to the path's shape, then this command will
remove the extraneous points. (It will not remove points where the slope
at the point is horizontal or vertical as postscript likes to have these
points present).

[How is this done?](pfaeditmath.html#Approximating)

##### Simplify More

This is a variant of the simplify command. It brings up a dialog which
gives you control over what sorts of errors this simplification is
allowed to induce. You can control:

- How far the simplified contour is allowed to stray from the original
- Whether to allow removal of extreme points
- Whether to allow the slope to change at points.
- Whether to make corner points into curve points (by adjusting the
  control points)
- Whether to flatten small bumps off of lines
- Whether to try to simplify straight lines at all

Finally, you may specify whether this set of values should become the
default value for future Simplify commands

##### Cleanup Glyph

This is a special case of the simplify command. In this case if there is
a spline which actually traces out a line but none the less has control
points, then this command will remove the control points. It will also
cleanup zero length splines.

##### Canonical Start Points

This will change the start point of the contour (or of all selected
contours) to be the leftmost point on the contour. If there are several
points with the same horizontal coordinate it will pick the one closest
to the baseline. There are two reasons for doing this:

- In a PostScript Type1 or Type2 font it will (usually) reduce the
  size of the code expressing the glyph slightly. (I don't think it
  can increase the code, but there are certainly cases where the
  optimization will have no effect).
- It will enable FontForge to find more reusable bits of code which it
  can put in subroutines

##### Canonical Contour Order

Order the contours so that the contour with the leftmost point comes
first, then the contour whose leftmost point is a little further right
and so forth. Again, this should decrease the code size slightly in a
Type1 font.

#### Add Extrema

Not in the bitmap view. Both TrueType and Type1 say that there should be
points on the contour where it reaches its extreme horizontal and
vertical values. In the outline view, if any points are selected, this
will add points at all extrema on splines between selected points. In
the font view, metrics view (or if nothing is selected in the outline
view) it will add extrema to a spline if: 1) The spline is longer than
the em-size/32, or 2) the entire contour (rather than just the current
spline) attains its maximum/minimum value at this point. If the added
extrema is extremely close to an already existing point, fontforge may
remove that point to avoid creating tiny splines.

#### AutoTrace

This command is only available if you have downloaded Martin Weber's
[autotrace program](http://sourceforge.net/projects/autotrace/), or
Peter Selinger's [potrace](http://potrace.sf.net/). If you have a
background image in a glyph then autotrace will automagically trace the
outlines of that image. See [the section on autotracing](../autotrace/)
for more information.

#### Align menu

This submenu is only present in the outline view, it allows you to align
points or to space them out along an axis.

##### Average Points

This will look at all the selected points and find the coordinate with
the least change. Then it will average find the median point on that
axis and set all the selected points to have that value for the
appropriate coordinate.

So if you have a line which is almost horizontal, and select its
endpoints and apply this command it will be horizontal.

![](/assets/img/filemenu-constrain2_1.png)
![](/assets/img/filemenu-constrain2_2.png)

(if you select exactly two points, and they lie close to a 45 diagonal,
then they will be forced to the diagonal rather than to horizontal/vertical)

##### Space Points

If you have three or more points selected then FontForge will figure out
the coordinate that has the greatest change and will space the points
out regularly along that axis.

If you select one point (and that point is in the middle of a path)
then (internally) the point's location will be expressed in a coordinate
system which is rotated so that one axis is parallel to the line between
the two points that surround the selected point. The selected point will
be moved mid-way between the two on this axis, while its other
coordinate remains fixed.

That's an extremely complicated way of saying: If the selected point is
connected to two points which are on a horizontal line, then the
selected point's x coordinate will be midway between the two, while its
y coordinate remains unchanged.

![](/assets/img/filemenu-constrain1_1.png)
![](/assets/img/filemenu-constrain1_2.png)

##### Space Regions

This is similar to the above command except that it allows you to make a
rather simple definition of a collection of points which should be moved
together. Each of these regions will be regularly spaced along the
chosen axis. A region is defined as a collection of points, each one of
which is within some maximum distance of at least one other point in the
region. The purpose of this is to allow you to space out the stems of
the letter "m" so that they regularly spaced horizontally. Sadly it
won't work in many cases because in a serifed font the serifs will often
be closer to each other than to their respective stems.

![](/assets/img/filemenu-spacem_1.png)
![](/assets/img/filemenu-spacem_2.png)

##### Make Parallel

If four points are selected, and there are two lines between them, then
FontForge will make those lines parallel. If there are four lines
between them (ie. they form a quadrilateral, then FontForge will turn it
into a parallelogram. (note, this only works on lines, not on curved
splines)

The last point selected will be the one moved (sometimes FontForge
doesn't remember which point was selected last, then it will just pick
one randomly. If you don't want that to happen, select your points and
then single click on the one you want moved).

#### Round

##### Round to Int

Not in the bitmap view. FontForge stores point locations as real numbers
(ie. it retains fractional values). TrueType only supports integral
values (And much of the time you want integral values in Type1 and Type2
fonts also -- using real numbers makes font files bigger), so when
generating the font points are rounded to integral values. This command
will round all selected locations to the closest integer.

##### Round to Hundredths

Not in bitmap or metrics views. FontForge's Type1 output is limited to
hundredths of an em-unit, even when rounding is turned off in the
Generate [Options] dialog.

##### Round to Cluster

Occasionally you want to make sure that coordinates which are close
together have the same value. This command will do that.

#### Order

This changes the order in which contours, references and images are
drawn. It is almost useless because this order of contours and
references does not affect the final appearance of the glyph. The only
relevance it has is when interpolating fonts and in multiple master
fonts. Here similar contours must appear in the same order.

If you have a glyph which contains both contours and references,
FontForge does not specify whether references or contours are drawn
first (or whether the two are intermixed). If this matters to you,
unlink your references.

#### Clockwise

Only in the outline view. If all selected paths have a clockwise
direction then this will be checked. Selecting it will make all paths be
clockwise.

If not paths are selected, or if all selected paths are open this will
be greyed out. I a selected path intersects itself results are
indeterminate.

#### Counter-Clockwise

Only in the outline view. If all selected paths have a counter-clockwise
direction then this will be checked. Selecting it will make all paths be
counter-clockwise.

If not paths are selected, or if all selected paths are open this will
be greyed out. I a selected path intersects itself results are
indeterminate.

#### Correct Direction

Not in the bitmap view. Sets the direction of outermost paths to be
clockwise. The next path crossed will be made counter-clockwise, the
next clockwise, etc.

This command may produce unexpected results if two splines cross.

If a glyph contains a flipped reference, this command will be unable to
correct the contours inside of the reference directly, instead it will
offer to unlink the reference after which it can treat its (former)
contours like any others.

#### Insert Text Outlines...

Upon occasion it is useful to be able to insert text into a glyph. The
[Insert Text Dialog](../InsertTextDlg/) lets you do this.

#### Build

##### Build Accented/Composite Glyph

Not in the bitmap view.

The first menu item will only build accented letters, the second will
build general composite glyphs (fractions, ligatures, digits inside
parens, roman numerals, etc.) as well.

If the current glyph is an accented glyph (and all the base glyphs and
accents have already been created) then this command will delete
anything that is currently in the foreground and put a reference to the
base glyph and another reference to the accent glyph into the
foreground. So if the current glyph were "À" then a reference to "A"
would be added to it, and a reference to "\`" would be centered above
the "A".

If the current glyph is something like "agrave.sc" then it will be
built using the rules of "agrave" but with ".sc" variants. So
"agrave.sc" would contain "a.sc". For accents it will use "grave.sc" if
it exists and "grave" if it does not.

If [Copy From](../editmenu/#Copy.From) is set to All Fonts then any bitmaps
will have a similar process done -- that is bitmap references will be
created (even in the outline glyph view).

A more complete description is given in the section on
[accented glyphs](../accented/).

##### Build Duplicate

Only in the font view.

Consider the letters "Alpha" and "A". Often these may be represented by
the same glyph. This command which change the encoding slightly so that
the encoding for U+0391 will refer to the glyph named "A". Note that
this is subtly different from refering to a glyph named "Alpha" which
refers to another glyph named "A".

Adobe suggests that you use a reference rather than giving to unicode
code points to one glyph, but it is part of the font format.

#### Merge Fonts...

Only in the font view. If you are building a unicode font you will often
want to merge in other fonts. You can, of course, cut and paste from one
to the other, but that can be tedious, while this command will do it all
in one fell swoop.

FontForge does the following when merging CID-keyed fonts:

-   If the font in the window (the mergee) is a normal font and the
    other font (the merger) is a CID keyed font, then the merger font is
    effectively flattened and the result merged into the mergee.
-   If the mergee is a CID keyed font and the merger font is a normal
    font then the merger font will be merged into whichever of the
    mergee's subfonts is currently active.
-   If both are CID keyed fonts, then they should:
    -   Have the same registry and ordering
    -   The supplement number of the mergee should be at least as big as
        that of the merger
    -   The mergee should have at least as many subfonts as the merger.

    If these conditions be met then any CIDs from the merger which are
    not present in the mergee will be merged into the same subfont of
    the mergee as they came from in the merger.

    This strikes me as somewhat problematic, but I can't think of a
    better solution.

FontForge will also copy advanced typographic features, kerning,
ligatures, etc.

If one of the two glyphs of a kerning pair is in the mergee and the
other in the merger then you will be given the option of either ignoring
this kerning pair or adding it to the resultant font. This happens if
both the mergee and the merger contain a glyph, and the kerning pair is
in the merger font -- if that glyph is the same in both fonts then you
would want to include the kerning pair, but if it differs then you
probably don't.

#### Interpolate Fonts...

Only in the font view. If you have a bold font and a light font and
would like to create a medium font, then you can interpolate a font
between the two (or you can extrapolate a font that's even bolder or
lighter). Your two fonts must have the same sets of glyphs, and each
glyph must have the same number of paths (ordered similarly) and each
path must have the same number of points on it, and must have the same
references.

Examples: If you are interpolating from a light font to a bold one, then
a medium font might be 50% between the two, an extra-bold font might be
200% and a thin one -100%.

#### Compare Fonts...

![](/assets/img/filemenu-fontcompdlg.png)

Sometimes it is useful to compare two versions of a
font and see what has changed. This command will allow you to check:

- The addition or removal of glyphs
- Changes to outline glyphs
- Changes to bitmap glyphs
- Changes to the font's names (truetype 'name' table and some
  postscript names)
- Changes to the font's glyph substitutions (ligatures and whatnot)
- Changes to the font's glyph positioning (kerning and whatnot)

You can also use it to compare truetype and postscript versions of the
same font. Normally fontforge checks to make sure all the splines match
exactly, but you can also have it test whether a contour in one font is
always close to the similar contour in another font, or whether a
contour in one font is inside a reference in another (these are common
when comparing PostScript fonts where the format loses references).

Comparing PostScript hintmasks is another somewhat iffy topic. There are
often many equivalent (I think) hint mask possibilities, but I don't
have a good algorithm for saying that they are equivalent -- especially
since Adobe uses hints in ways which I find unexpected.

Finally you can have it place the outlines of each differing glyph from
the second font into the background of the corresponding glyph in the
first font. This can be helpful in correcting discrepancies.

![](/assets/img/filemenu-fontcompresults.png)

#### Compare Layer To Layer...

Only available in the Outline and Font Views. This command allows you to
specify two layers within the current font and then checks that they are
similar. In the outline view a message box pops up to say if the layers
are the same or different. In the Font View, the view will scroll to the
first glyph whch differs, all differing glyphs will be selected and a
message box pops up.


text:
Where you can find Kaggle machine learning tutorial for beginner :

https://www.kaggle.com/m2skills/datasets-and-tutorial-kernels-for-beginners

### Classification
* Iris Species : Simple and Easy
* Mushroom Classification
* Titanic: Machine Learning from Disaster : A lot of great kernels, one can learn a lot by simply exploring other kernels

#### Regression
* Diamond Prices
* NYC Property Sales
* Medical Cost Personal Datasets
* House Sales in King County, USA
* House Prices: Advanced Regression Techniques : Advanced dataset, do some work on above datasets first and then explore this, there are a lot of great kernels for this dataset too.

#### Time series Analysis
* Bitcoin Historical data
* NYC stocks
* Web Traffic Time Series Forecasting

#### Natural Language Processing
* TBDM 5000 Movie Dataset
* Wine Reviews
* Amazon Fine Food Reviews
* Toxic Comment Classification
* Spooky Author Identification

###

'''python

'''


text:
---
author: jeffatwood
comments: true
date: 2011-02-05 20:26:12+00:00
layout: post
redirect_from: /2011/02/suggested-edits-and-edit-review
hero: https://i.stack.imgur.com/TuutP.jpg
slug: suggested-edits-and-edit-review
title: Suggested Edits and Edit Review
wordpress_id: 7114
tags:
- company
- community
- design
- reference
- stackexchange
---

The Stack Exchange engine draws inspiration from a number of sources.

![stackoverflow-venn-diagram](/images/wordpress/stackoverflow-venn-diagram.png)

We continue to be great admirers of Wikipedia, but we've always missed out on one crucial aspect of their system: we never allowed anonymous users to edit content. No, that required [earning privileges through participation](http://blog.stackoverflow.com/2010/10/membership-has-its-privileges/) -- specifically, the retag privilege at 500 reputation and the full editing privilege at  2000 reputation.

Well, as of today, I'm proud to announce that we allow anonymous and new users to edit content in our system! The surface area of this change is _huge_ -- it means **the millions of drive-by anonymous users that visit our sites every day can submit an improvement or correction.** Furthermore, you can earn up to +1000 reputation for submitting valid edits.

We do currently limit anonymous edits to questions and answers more than 10 minutes old (and with some different caveats, wiki pages too). Millions of posts now have that ubiquitous edit link at the bottom. Click it, and you'll be sent to the standard editing interface, albeit with a small disclaimer at the top.

![](/images/wordpress/anon-edit-warning.png)

There are a few additional requirements when submitting an edit suggestion:

  * You must enter a reasonable comment describing your edit.

  * To prevent noise and friction, your change must be more than 6 characters.

After the edit is submitted, it goes into an edit suggestion queue of a fixed size. (If the queue is currently full, we temporarily stop accepting edits.) Users who have earned the editing privilege can now vote to accept -- or reject -- the suggested edit. There are two ways to view suggested edits:

  1. Suggested edits for a post are always visible on the post itself. If edits are pending on a particular post, the post's **edit menu** will have a counter next to it.

![](/images/wordpress/pending-edit-post-menu.png)

Clicking on the edit from a post will show it inline in a floating panel, so you aren't interrupted.

  2. If you have 10,000 reputation, a **counter will appear at the top of the page** showing the size of the edit suggestion queue (if it's greater than zero, of course). Clicking this counter will take you to a [new `/review` tab](http://blog.stackoverflow.com/2011/01/how-to-say-thanks-in-an-answer/) that lists _all_ suggested edits in the queue.

![](/images/wordpress/suggested-edits-indicator.png)

Once you click on a suggested edit, you get a diff view that shows you the original post on the left, and the edited version on the right. All additions and deletions are highlighted. You can also toggle between HTML and Markdown views via the toolbar buttons on the left.

![](/images/wordpress/edit-suggestion-diff.png)

From here, you can approve or reject the edit. **When an edit is approved, the editor receives +2 reputation** -- up to a maximum of +1000 total per user. Contributing good edits is now a nice way to gain reputation and bootstrap less active users into full members of the community.

To keep this post a sane and readable size, I have glossed over a lot of the other rules that we have in place to handle edge conditions with edit suggestions. If you have further questions or want lots more detail, _please_ [read Sam's meta post](http://meta.stackoverflow.com/questions/76251/how-does-peer-review-for-edits-work/76284#76284) before leaving a comment here.

So, in summary:

  * Anonymous, unregistered, and 1 reputation users may now submit suggested edits to most content on our sites.

  * Experienced users with 2,000 reputation or more can review these edits and approve or reject them.

  * When registered users' edits are accepted, they earn +2 rep, up to a maximum of +1000.

I've always _wanted_ to extend some form of editing privileges on our site to everyone on the internet. I just apologize that it took us over two years to figure out how to do it!

repository: bongjovi/stack-blog

extension: markdown

repo_name: bongjovi/stack-blog


text:
[![Build Status](https://travis-ci.org/AAROC/perfsonar-base.svg?branch=master)](https://travis-ci.org/AAROC/perfsonar-base)

# Perfsonar Base

This is a role to prepare a machine for deployment of one of the [PerfSONAR bundles](http://docs.perfsonar.net/install_centos.html#step-2-install-a-bundle).
This role is designed to be applied to all hosts in the perfSONAR mesh, and used in conjunction with other perfsonar "bundles".
This role installs two bundles :

 - `perfsonar-tools`

These are the two underlying packages for the basic creation of a  mesh.
In our use case, the nodes with this role applied will be self-contained: they will store their own data and have access to their web interfaces.

## Notes on deviation from perfsonar documentation

### Idempotence and testing

The perfsonar documentation suggests the execution of scripts provided by their packages for configuring the desired endpoint.
This has a few issues associated:

  1. The execution of a script is likely not to be _idempotent_, which makes it difficult to ensure a desired state.
  1. Failures in scripts are often hard to isolate, since the script simply exits. Breaking up scripts into tasks makes it easier to isolate where the error or issue is and debug it or address it.
  1. Writing tasks in a "plain-language" format like YAML makes it easier for new devs or maintainers to understand what the role does, instead of reading through inscrutable shell scripts.

In principle, _how_ the state is achieved is irrelevant, as long as the _correct_ state is achieved.
We can factor out the

### Security

<!-- todo  -->

## Requirements

This requires only the basic Ansible requirements.

## Role Variables

Role variables are kept in `defaults/main.yml` and `vars/main.yml`. Default variables can be used. Overwrite these if you wish
in the `vars/main.yml` variables file.

## Dependencies

This role does not express any dependencies.

# Example Playbook

If you define a perfsonar-mesh group in your inventory with all of the host groups in the perfSONAR mesh as your children groups, then you can apply this role to them as follows:

    - hosts: perfsonar-mesh
      roles:
         - { role: perfsonar-base, become: true }

## License

Apache-2.0

## Author Information

Bruce Becker CSIR Meraka Institute

repository: AAROC/perfsonar-base

repo_name: AAROC/perfsonar-base


text:
# Engineering - QA Automation Developer
<welcome.snippet/>

## What it's like to be a QA Automation Engineer
In this role you'll to help enable and encourage our developers to design and implement tests in an efficient way by providing them with the right tools, frameworks and infrastructure.  We use cypress.io as our e2e framework and you will help train our developers in the use of this tool and how to structure their work to allow for good e2e tests so they can become capable in this area.  You'll also be responsible for ensuring the build systems runs all our tests in a way that helps our software development process and ensures our product quality.
A percentage of your time will also be building product.   You set aside time each week to learn about new technologies and help less senior programmers get better, though pair programming and knowledge sharing.

<technologies.snippet/>
<basecamp.snippet/>
<distributed.snippet/>

## Why you might like it
You want to build beautiful code that solves complex ecommerce problems.  You want to help a team of smart developers get better at testing and you love being surrounded by motivated people who enjoy sharing and helping each other.

## Why we might like you
You enjoy working with others and helping mentor developers at all skill levels.   You have a keen sense of community and are always looking for new ways to expand the work of others.

<what-you-need.snippet/>

## Skills that are important to this role

<skills>
Testing:2
QA Automation
Architecture
Github:2
Coding:2
Deployments
Cypress.io
Diagrams
Documentation
Presentations
Mentoring
Part of Successful Projects:2
5 of Technical Breadth
</skills>

<inherit doc="engineering-developer.md"/>

<searchspring-overview.snippet/>

<benefits.snippet/>

<equitable-workplace.snippet/>

repository: joram/competencies

repo_name: joram/competencies


text:
---
layout: post
title: freebsd-vm128
excerpt: "Installing FreeBSD 9.1 on a VPS with only 128MB of RAM."
categories: [tech]
tags: [howto]
---

## Installing FreeBSD 9.1 on a KVM VPS with 128MB RAM ##

I have a VPS with 128MB's worth of RAM. It's a KVM so it's as much as I'll ever get. I installed FreeBSD 9.0 on the box a while ago but decided it was time for a fresh start. As I was going through the installation process I came across this:

![out of swap space](../../img/freebsd_vm128/vm128_freebsd9.1_out_of_swap_space.png)

I was stomped. Not enough swap? This was a minimal install and I had just created a 512MB swap partition during the installation process - it was only unpacking the kernel.

A bit of research led to me to understand that even though the swap parition was alive and well, it wasn't being used - and the 128MB of RAM was getting used up in no time.

Now FreeBSD is nothing if not flexible, so here is how I worked around the issue.

When asked about disk paritioning, drop in the shell. If you're used to fancy GUIs it's a bit like a cold shower - but it's really powerful.

![paritioning prompt](../../img/freebsd_vm128/vm128_freebsd9.1_2.png)

First thing first - we remove whatever was left behind and create a brand new label (note there's only one disk, so it simplifies things a bit):

![gpart 1](../../img/freebsd_vm128/vm128_freebsd9.1_5.png)

We then create the partitions. Now YMMV but my needs are pretty simple. I just need a boot partition, a swap one, and one for `/`. Note that I left the `-s` out for the `gptroot` partition so it fills up the remaining space:

![gpart 2](../../img/freebsd_vm128/vm128_freebsd9.1_7.png)

Format `/` using `newfs` and mount it - otherwise the installer will stall with some weird error regarding `user=0`:

![gpart 3](../../img/freebsd_vm128/vm128_freebsd9.1_8.png)

Finish off by enabling the swap parition:

    # swapon /dev/gpt/gptswap

and voila! The installer will continue and use the swap partition as and when required (yep, that was the tricky bit).

Once the install is complete you will be asked whether you want to be dropped into a shell. Again the answer is yes - this time because `/etc/fstab` hasn't been created for you. Just open up `vi` and:

    /dev/gpt/gptswap        none    swap    sw      0       0
    /dev/gpt/gptroot        /       ufs     rw      1       1

Type `exit` once done and restart. all done!

_`gpart` help found from [wonkity](http://www.wonkity.com/~wblock/docs/html/disksetup.html)_


text:
Test Automation using **Java**, **Cucumber**, **JUnit** and **Selenium Automation Test Framework**
---
---
Basic automation test framework following action and page object models, using Selenium to interact with the web browser, Cucumber to frame the tests, and JUnit to provide a standard report on the tests.

---

Framework Architecture
--------------
	Project-Name
		|_drivers
		|_src/test/java
		|	|_pageObjects
		|	|	|_HomePage.java
		|	|	|_FindPage.java
		|	|	|_CityPage.java
		|	|_stepDefinitions
		|	|	|_HomePageSteps.java
		|	|	|_FindPageSteps.java
		|	|	|_CityPageSteps.java
		|	|	|_Hooks.java
		|	|_utilities
		|	|	|_BaseClass.java
		|	|	|_DriverFactory.java
		|	|	|_PropertiesReader.java
		|	|_TestRunner.java
		|	|_TestRunner_parallel.java
		|_src/test/resources
		|	|_features
		|	|	|_SearchCity.feature
		|	|_features_parallel
		|	|	|_SearchCity1.feature
		|	|	|_SearchCity2.feature
		|	|	|_SearchCity3.feature
		|_reports
		|_config.properties
		|_pom.xml

* **drivers** - this package contains webdriver files of multi browsers on the particular platforms. The webdriver file locations are defined in src/test/java/utilities/DriverFactory.java
* **src/test/java/pageObjects** - defines the locators and methods for all Page Objectss
* **src/test/java/stepDefinitions** - you can define step defintion under this package for your feature steps.
* **src/test/java/ultilities** - defines some basic functions can be triggered on many places in Test Suite
* **src/test/java/TestRunner.java** - configure your glue code location (step defintions), define test result output format.(html, json, xml)
* **src/test/resources/features** - all the cucumber features files (files .feature ext) goes here.
* **repors** - HTML reports are separated into several directories named by running time and browser name.
* **config.properties** - user customizes the "url" and "timeout".

---

## Software Requirements

#### 1. Java Development Kit (JDK)
* [Download](https://www.oracle.com/technetwork/java/javase/downloads/index.html) and install JDK
* Setting the system variables

#### 2. Maven
* [Download](https://maven.apache.org/download.cgi) [Maven](https://maven.apache.org/) and install Maven
* Adding maven to the environment path

#### 3. Google Chrome Browser
* Install [Google Chrome](https://sites.google.com/a/chromium.org/chromedriver/) at the new build 94.x

#### 4. Firefox Browser
* Install [Firefox](https://www.mozilla.org/vi/firefox/new/) at the new build 92.x

---

## Running the tests

#### 1. Run the Test
* Suite is ready to test the feature "search weather in your city" in [openweathermap.org](https://openweathermap.org/)
* Run your test using one of the following commands from Terminal:

        mvn clean verify -DbrowserName="firefox"
        mvn clean verify -DbrowserName="chrome"

Browser choices:
* Firefox
* Chrome

Supported platforms:
* Windows
* iOS
* Ubuntu

#### 2. Single or Multi threading choice
There is a customization in the choice between running sequentially or running in parallel.
* Sequence: declare "<include>**/TestRunner.java</include>" at "maven-surefire-plugin" in pom.xml.

        "src/test/java/TestRunner.java" will be triggered.
        In "src/test/resources/features", all scenarios wil run one-by-one sequentially.

* Parallel: declare "<include>**/TestRunner_parallel.java</include>" at  "maven-surefire-plugin" in pom.xml.

        "src/test/java/TestRunner_parallel" will be triggered.
        In "src/test/resources/features_parallel", 1 feature file executes on 1 thread, all threads will be run parallelly.

    ![image1](images/report5.PNG)

#### 3. Test Result
* See the result inside `reports/<Date_time_browser directory>/cucumber-html-reports`
* Open "overview-features" or any html file in your browser
* Click on the site head menu to navigate to other html page
* Some sample of test results
    ![image1](images/report1.PNG)
    ![image1](images/report2.PNG)
    ![image1](images/report3.PNG)
    ![image1](images/report4.PNG)


text:
# socker: A wrapper for secure running of Docker containers on [Slurm](https://slurm.schedmd.com/)

Introduction
-------------
Socker is secure for enabling unprivileged users to run Docker containers. It mainly does two things:
* It enforces running containers within as the user not as root
* When it is called inside a Slurm job, it enforces the inclusion of containers in the [cgroups assigned by Slurm to the parent jobs](https://slurm.schedmd.com/cgroups.html)

Design
-------
Socker is composed of one binary that is a compiled python script. While system administrators can be members of the ``docker`` group, regular users can use Docker via Socker.

Socker operation workflow is below:

Usage
-------
* Install [Nuitka](http://nuitka.net/) with it's prerequisites (python and gcc)
* Compile socker:
```
nuitka --recurse-on socker.py
```
* Change the owner of the binary to root and enable SUID:
```bash
mv socker.exe socker
sudo chown 0:0 socker
sudo chmod +s socker
```
* Create a list of authorized images as root (you need to fix the path to the images file in socker before compiting):
```bash
sudo vim socker-images
```
* Options:
```bash
socker --help

NAME
	socker - Secure runner for Docker containers

SYNOPSIS
	socker run <docker-image> <command>

OPTIONS
	--version
		show the version number and exit
	-h, --help
		show this help message and exit
	-v, --verbose
		run in verbose mode
	images
		List the authorized Docker images (found in socker-images)
	run IMAGE COMMAND
		start a container from IMAGE executing COMMAND as the user

EXAMPLES
	List available images
		$ socker images
	Run a CentOS container and print the system release
		$ socker run centos cat /etc/system-release
	Run the previous command in verbose mode
		$ socker -v run centos cat /etc/system-release

SUPPORT
	Contact<EMAIL_ADDRESS>```

Prerequisites
--------------
* Docker 1.6+
* You MUST have a group ``docker`` and a user ``dockerroot`` who is member of ONLY the ``docker`` group. The ``docker run`` command will be executed as ``dockerroot``. [Here](https://github.com/unioslo/socker/blob/master/install-docker-centos6-beegfs.md) is an installation guide for CentOS 6 and BeeGFS
* Slurm is not a prerequisite, but if you run socker inside a Slurm job, it will put the container under Slurm's control

Support and Bug Reports
-------------------------------
Report an issue on the [issues](https://github.com/unioslo/socker/issues) section or send an email to<EMAIL_ADDRESS>

repository: unioslo/socker

repo_name: unioslo/socker