text:
---
templateKey: blog-post-swift
slug: /swift-archives/intermediate/enumerations/
author: Peter Witham
tags: ["Development Notes", "Swift"]
title: Swift Enumerations
date: 2014-10-07T00:40:43
blurb: Enumerations in Swift are nice way to define a group of values and then require you to work with only those defined values. But there is more to it than that, let's take a look.
---

What is a Swift enumeration? Well to quote the official documentation

> An enumeration defines a common type for a group of related values and enables you to work with those values in a type-safe way within your code.

_OK, so seriously, what is an enumeration?_

Well it turns out that the documentation is pretty accurate but makes them sound more complicated than they really are (because programmers like to do that), the easiest way to learn what they are is to just play with them. Let’s open a new Swift playground and start playing.

To create an enumeration or as it is referred to in the language _enum_ we do so like this, lets make an _enum_ that holds possible options for exits from a house. We will call it _DoorUsed_

``` swift
    enum DoorUsed {
        case FrontDoor
        case BackDoor
        case SideDoor
        case GarageDoor
    }
```

The values we list are referred to as _member values_ of the enumeration. We use the _case_ keyword to indicate that a new line of member value is about to be defined. The important take away here is that _enums_ when used can only have the possible values you list inside the _enum_. Note that you can define them all on one line by using a comma separator. So the above can also be defined in this way

``` swift
    enum DoorUsed {
        case FrontDoor, BackDoor, SideDoor, GarageDoor
    }
```

Each of _member value_ (sometimes just referred to as _member_) defines a new _type_ and the name should start with a capital letter. When it comes to using this new enumeration there are a couple of different ways we can do it just like any variable declaration.

``` swift
    // Method 1 is to declare the variable and assign the value at the same time.
    // type inference will give it a type of DoorUsed.

    var peterUsedDoor = DoorUsed.FrontDoor
```

Notice the first advantage of using an _enum_, when you type _DoorUsed._ auto complete only gives you the four available options anything else you type will generate an error. So this gives us the ability to only use available options and not set a value that will cause problems.

``` swift
    // Method 2 is to declare the variable and assign the type but not an initial value
    // you will see this one a lot so pay attention to the syntax.

    var paulUsedDoor: DoorUsed

    // Now let's set the value and notice the shortened way of doing that, this one is out
    // there in the wild my friends so get used to it.

    paulUsedDoor = .BackDoor
```

In method 2 we can simply set the value by specifying _.BackDoor_ as the type has already been set (explicitly-typed), the same rules will apply regarding possible values.

Another advantage when using enumerations is assessing the value of a variable of that type since every possible value is already known (remember enumerations contain all the possible values). To demonstrate this we can use a switch statement, you should note that unlike a normal _switch_ statement in Swift, we do not need to define the _default_ case as all possible values are already known for the enumeration but you can if you wish (but why would you other than you did something wrong in the first place?)

``` swift
    switch peterUsedDoor {
        case .FrontDoor:
            println("Front door was used")
        case .BackDoor:
            println("Back door was used")
        case .SideDoor:
            println("Side door was used")
        case .GarageDoor:
            println("Garage door was used")
    }

    // Output in the playground should show :Front door was used".
```

You must specify a case for every possible value in the enumeration otherwise the compiler will tell you that you have a problem “_switch must be exhaustive_”, and you really do not want to make the compiler mad! To test this just delete one of the _case_ statements and see what happens.

#### Associated Values

An associated value gives us the ability to attach extra information to each value of an enum. In other languages these are sometimes referred to as _discriminated unions_ or _tagged unions_. An associated value in Swift can be of any type and each case can have it’s own types if needed, for example one case might have an image and another an audio type.

To demonstrate this we will create a new enumeration with a case than can hold an associated value of type _String_ and another than can hold 3 value types of _int_ in a _Tuple_, I discuss tuples in ‘[Functions - The Basics](/swift/basics/functions/)’

``` swift
    enum ExampleAssociation {
        case Name(String)
        case Nums(Int, Int, Int)
    }
```

Now we will create two different variables to demonstrate using this new enumeration.

``` swift
    var myName = ExampleAssociation.Name("Peter")
    var someNums = ExampleAssociation.Nums(4, 12, 16)
```

Again we can check the values with a switch statement if we want to, but this time we can also access the associated values.

``` swift
    switch myName {
        case .Name (let name):
            println("The value of name is \(name)")
        case .Nums(let value1, let value2, let value3):
            println("The value of value1 is \(value1)")
            println("The value of value2 is \(value2)")
            println("The value of value3 is \(value3)")
    }
```

Now you might be thinking _hey wait why do we have to use the case .Nums in the switch for this variable?_ The answer is to remember that you must provide a case for every possible value of the enumeration. The same applies for the second variable.

``` swift
    switch someNums {
        case .Name (let name):
            println("The value of name is \(name)")
        case .Nums (let value1, let value2, let value3):
            println("The value of value1 is \(value1)")
            println("The value of value2 is \(value2)")
            println("The value of value3 is \(value3)")
    }

    // You can save some typing and assign the let after the case, so you could do

    switch someNums {
        case let .Name (name):
            println("The value of name is \(name)")
        case let .Nums (value1, value2, value3):
            println("The value of value1 is \(value1)")
            println("The value of value2 is \(value2)")
            println("The value of value3 is \(value3)")
    }
```

So clearly you might consider this some what of a draw back, but this example was just to show you how to access the associated values. You should also consider using the associated values in a better way than this example as they are assigned to constants but could they be undefined or null ..? There is your home work to find out and if so how do you deal with it (if any … no hints)!

### Raw Values

Where as associated values let you specify the value outside of the enumeration, raw values give you the ability to declare a value inside the enum _BUT_ you must specify the type for the enumeration using this technique.

``` swift
    enum AnotherEnum  : String {
        case Name = "Peter"
        case WebSite = "https://www.peterwitham.com"
    }

    var myName = AnotherEnum.Name
    var myWebsite : AnotherEnum
    myWebsite = .WebSite

    // Now let's access those values using the handy .Raw()
    myName.toRaw() // Outputs "Peter"
    myWebsite.toRaw() // Outputs "https://www.peterwitham.com"
```

But what if a variable has no value? We should handle this in the appropriate way that by now I think as a Swift coder you are getting used to _optionals_ (see [my post on Optionals](/swift/intermediate/optionals/). Your homework is to figure out how you might deal with this situation, I have to give you something to take away and try right!

repository: GrfxGuru/gatsby-starter-netlify-cms

repo_name: GrfxGuru/gatsby-starter-netlify-cms


text:
# Gmail tweaks

These are a few simple overrides to make the Gmail interface more usable, especially with a dark theme.

The `style.css` file is documented for why specific overrides are there and what they achieve.

The overrides need to be active on pages whose URLs match the RegExp `^https://mail.google.com/.*$`.

license: MIT

repository: levacic/web-override-configuration

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: levacic/web-override-configuration


text:
# Denoflake
## A Twitter like snowflake generator for deno

### Example :
```Typescript
import { Snowflake } from "https://raw.githubusercontent.com/Aime23/Denoflake/master/mod.ts"

const snowflake = new Snowflake();

const generated = snowflake.generate(); //Generate a new snowflake
console.log("Snowflake : " + generated);
const decomposed = snowflake.decompose(generated); //Decompose the snowflake
console.log("Decomposed : ",decomposed);
```
### Will output :
```
Snowflake :<PHONE_NUMBER>8744961
Decomposed :  {
  epoch:<PHONE_NUMBER>000,
  timestamp: "1603186159490",
  worker: "0",
  process: "0",
  increment: "1",
  binary: "111111101100111010110100100000100000000000000000000001"
}
```
If you try to decompose a something that is not a snowflake it will return false. A snowflake is a number written on 23 to 64 bits.
### You can also use your own options
```Typescript
//With milliseconds
const snowflake = new Snowflake({
    epoch:1573862400000,
    worker:20,
    process:10
});
//or with a date
const snowflake = new Snowflake({
    epoch:new Date("2019-11-16"),
    worker:20,
    process:10
});
```

branch_name: refs/heads/master


text:
---
title: Explaining Longhorn
date: 2004-07-03 12:13:54 +02:00
categories: Longhorn
---

Explaining the benefits of Longhorn to people that aren't developers, is not always easy. Technologies like Indigo, WinFS and even Avalon take some time to explain. This changes once you can use an example to illustrate the benefits.

This video shows how technology solves a common problem.

(If you haven't seen them already, be sure to go to MSDN for the LH-concept videos)


text:
[![Build Status](https://travis-ci.org/loz/has_strong_policy.png)](https://travis-ci.org/loz/has_strong_policy)
[![Code Climate](https://codeclimate.com/github/loz/has_strong_policy.png)](https://codeclimate.com/github/loz/has_strong_policy)
[![Dependency Status](https://gemnasium.com/loz/has_strong_policy.png)](https://gemnasium.com/loz/has_strong_policy)
[![Gem Version](https://badge.fury.io/rb/has_strong_policy.png)](http://badge.fury.io/rb/has_strong_policy)

# HasStrongPolicy

Simple delegation for your strong paramters

## Installation

Add this line to your application's Gemfile:

    gem 'has_strong_policy'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install has_strong_policy

## Usage

This gem provides a simple delgation framework for controllers and similar for
using strong parameters in rails.  This allows:

* Shared policy to be applied for multiple similar models (eg. STI)
* Shared policy for the same model in different contexts (e.g. APIs)
* More expressive declaration of paramter securing policies

### Connecting your controller

To use HasStrongPolicy in your rails controller, simply include it, and turn it on:

```ruby
class UserController < ApplicationController
  include HasStrongPolicy::ControllerHelper

  has_strong_policy
end
```

This will provider automatic delgation to a conventionally named ParamsPolicy,
in this case this would be the UserParamsPolicy.

To access the params, simply use the `policy_params` helper, and you'll receive
a clean param hash with all the policy already applied to strong params

You can specify a specifc class to delegate security to by providing `:using`:

```ruby
class SettingsController < ApplicationController
  include HasStrongPolicy::ControllerHelper

  has_strong_policy :using => UserParamsPolicy
end
```

#### Requesting the Params

You request the params filtered through the policy using `policy_params` in
place of regular `params`.  You can also supply options, like so:

```ruby
User.new(policy_params(:as => :admin))
```

### Defining your securing policy

You can a plain old ruby object for your policy object, or use the given policy
definition class to build expressive rulesets.

#### Simple Ruby Interface

Your ruby class should be named conventionally (unless you explicitly specify
with `:using`.  The object simply needs to respond to `:apply` taking the
rails params and an options hash.

```ruby
class UserParamsPolicy
  def apply(params, options)
    acceptable = [:email, :name]
    if options[:role] == :admin
      acceptable << :is_admin
    end
    params.require(:user).permit(acceptable)
  end
end
```

#### Using the Policy class and DSL:

Secures Params provides a DSL based policy class which allows succinct definition
of policies for defaults, specific actions or older accesible :as style roles:

```ruby
class UserParamsPolicy < HasStrongPolicy::Policy
  policy do |p|
    p.required :user
    p.permitted :first_name, :last_name, :dob

    p.on :create do |p|
      p.permitted :email

      p.as :admin do |p|
        p.permitted :is_admin
      end
    end
  end
end
```

Sub definitions inherit the policy from prior ones.  So in the above case, user
has name and dob permitted, but in the create action they can also set email.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
# Volatility

I'm playing around with volatility in the stock market.  I first did something like this with Mathematica and MATLAB on a Christmas vacation in 2005.  It seems fitting that I'm starting a new version on Christmas vacation 2018.

## Data

I'm going to use some data from [Intrinio](https://intrinio.com/bulk-financial-data-downloads/us-fundamentals-financials-metrics-ratios-stock-prices).  I think I'll start with the 10 years of stock prices.  The fundamentals look interesting too, but maybe I'll try that later.  Similar work I've done in the past has also incorporated SEC EDGAR to look at insider trading filings.  That was based on comments Peter Lynch made in [One Up on Wall Street](https://www.amazon.com/One-Up-Wall-Street-Already/dp/0743200403).

I stuffed the data in a Google Drive [here](https://drive.google.com/open?id=1RIeXtYd2s2WG7zLQul_3uY1W64jAWgFO).

That data is going to need a ton of preprocessing including normalization.  I'm going to try some methods I used in 2008-2010.  The model worked then and I think the macro conditions might be about the same now.  preprocess.py will consolidate the data, normalize it and then break it into various data sets to ensure proper withholding.

Some of the data is sparse (missing high and low but has a close, etc) even though it shouldn't be.  I have a ticket open with Intrinio about that.

## Modeling

I'm fiddling around with H2O.ai DAI.

repository: benofben/volatility

repo_name: benofben/volatility


text:
# covid19-forecasting

*Data Science @ SC*

Covid-19 Forecasting competition.
Kaggle [link](https://www.kaggle.com/c/covid19-global-forecasting-week-2/data)

## Structure
Work for each week of the competion is under `weekX`

## Get data

Run `python3 download_data.py weekX` to download the data for that week into the corresponding `weekX/data/raw` directory. If that doesnt work, ping me (Sean) on slack and I'll upload the new data sets.

E.g.: `python3 download_data.py week2` to download the data for week 2.


text:
# GeoDjango

https://docs.djangoproject.com/en/3.0/ref/contrib/gis/tutorial/

This is GeoDjango tutorial code repository.

I go through the tutorial and added code that are unclear inside the tutorial.

## Setup

Install conda and create a python environment from environment.yml file I have included inside this repo.

repository: shawnngtq/geodjango

repo_name: shawnngtq/geodjango


text:
## Resource Server

The resource server provides two REST API endpoints:

* [localhost:9091/hello-server/hello-user](http://localhost:9091/hello-server/hello-user)
* [localhost:9091/hello-server/hello-admin](http://localhost:9091/hello-server/hello-admin)

Both endpoints are secured and require a JWT access token being transmitted as bearer token header.
The first endpoint requires the 'user' or 'admin' scope, the second endpoint is only accessible for 'admin' scope.


text:
---
layout:     post
title:      "Surviving, Drupal, and the rest."
date:       2017-09-04 17:00:00
author:     "George Bonnici-Carter"
header-img: "img/computer.jpg"
published: true
---

Surviving

It has been a whirlwind year so far. After landing in London late February, I was virtually homeless for the first three weeks until I was fortunate enough to find my first software development job. The job seemed to be the easy part as a bank account and accomodation were much harder to come across.

I've learnt the UK is extremely bureacratic and this often means things taking a lot longer than expected. I needed a house to get a bank account and a bank account to get a house - talk about catch 22. Luckily, my work stepped in and was my address for a while so that all got sorted eventually.

After settling in, I have found surviving to be not too difficult. I am constantly occupied by the daily routine and never seem to have enough time (I think that means I'm getting older) but am happy where I have landed, which is in leafy Hertfordshire.

Drupal

For those wondering - what is Drupal? Well here's a link if you want to get right in to it. But for those less interested, it is a very powerful and flexible content management system that I work with to create websites.

It was all very bewildering for me. Coming in to Drupal, which I'd never heard of, and working with PHP, which I'd never used. In hindsight, it was good that I learned like I did because I also learnt a lot about SQL and how to teach myself. Also, the learning curve was very steep (as I am still finding out) and I did not have a clue what I was doing for the first three months.

After this initial shock period, I have slowly become accustomed to life as a Drupal developer. A lot of it is finding the right module and applying it, but it's all new to me so it's interesting never the less. I never thought I would work in this field but I am enjoying it so far.

The Rest

There's not a whole lot else to say at this point. I am happy in my job but always looking for new things to learn and take on. I have started reading at a rate of about 2 books a month which has been a good night cap and try and keep fit and reasonably healthy.

I am looking in to mobile development in the future as I would like to expand my swift skills and have a few projects going already. These can be seen on my github which is linked below.

Not a whole lot else really, I am looking forward to going home over the new years period and travelling some more next year. I might pick up a new hobby or something, who knows? Anyway, that's all for know, get in touch if you have any questions or just would like to say hi.

extension: markdown


text:
# Gyrophila sejuncta var. sejuncta (Sowerby) Quél., 1896 VARIETY

#### Status
SYNONYM

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

#### Published in
Compt. Rend. Assoc. Franç. Avancem. Sci. 24(2): 617 (1896)

#### Original name
Agaricus sejunctus Sowerby, 1799

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Tricholomataceae/Tricholoma/Tricholoma sejunctum/ Syn. Gyrophila sejuncta sejuncta/README.md

repo_name: mdoering/backbone


text:
# hubot-azure-scripts

Hubot script to persist hubot's brain using Azure blob storage.

## Installation

[The script can be installed via npm.](https://www.npmjs.com/package/hubot-azure-brain)

In your hubot project repo, run:

`npm install hubot-azure-brain --save`

Then add **hubot-azure-brain** to your `external-scripts.json`:

```json
[
  "hubot-azure-brain"
]
```

## Configuration

`hubot-azure-brain` requires an Azure storage account for blob storage. It uses the `HUBOT_AZURE_BRAIN_CONNSTRING` environment variable to determine its storage location, which you will have to define.

## Environment Variables

+  `HUBOT_BRAIN_AZURE_CONNSTRING` - Required, connection string for an Azure blob storage instance.
+  `HUBOT_BRAIN_AZURE_STORAGE_CONTAINER` - Optional, Azure blob container name (defaults to 'hubot').
+  `HUBOT_BRAIN_USE_STORAGE_EMULATOR` - Optional, can be declared in order to use the Azure Storage Emulator instead of an Azure storage instance, running locally on port 10000.
+  `HUBOT_BRAIN_DISABLED` - Optional, disables brain connectivity with Azure sources or tools at launch if defined.

repository: migarjo/hubot-azure-brain

repo_name: migarjo/hubot-azure-brain


text:
# Eclipse Cargo Tracker - Applied Domain-Driven Design Blueprints for Jakarta EE

The project demonstrates how you can develop applications with Jakarta EE using widely adopted architectural best practices like Domain-Driven
Design (DDD). The project is directly based on the well known
original [Java DDD sample application](http://dddsample.sourceforge.net)
developed by DDD pioneer Eric Evans' company Domain Language and the Swedish
software consulting company Citerus. The cargo example actually comes from
Eric Evans' seminal book on DDD. The original application is written in Spring,
Hibernate and Jetty whereas the application is built on Jakarta EE.

The application is an end-to-end system for keeping track of shipping cargo. It
has several interfaces described in the following sections.

For further details on the project, please visit: https://eclipse-ee4j.github.io/cargotracker/.

A slide deck introducing the
fundamentals of the project is available on the official Eclipse
Foundation [Jakarta EE SlideShare account](https://www.slideshare.net/Jakarta_EE/applied-domaindriven-design-blueprints-for-jakarta-ee). A recording of the slide deck is available on the official [Jakarta EE YouTube account](https://www.youtube.com/watch?v=pKmmZd-3mhA).

![Eclipse Cargo Tracker cover](cargo_tracker_cover.png)

## Getting Started

The [project website](https://eclipse-ee4j.github.io/cargotracker/) has detailed information on how to get started.

The simplest steps are the following (no IDE required):

* Get the project source code.
* Ensure you are running Java SE 11 or Java SE 17.
* Make sure JAVA_HOME is set.
* As long as you have Maven set up properly, navigate to the project source root and
  type: `mvn clean package cargo:run`
* Go to http://localhost:8080/cargo-tracker

To set up in Visual Studio Code, follow these steps:

* Set up Java SE 11, or Java SE 17, [Visual Studio Code](https://code.visualstudio.com/download) and [Payara 6](https://www.payara.fish/downloads/payara-platform-community-edition/). You will also need to set up the [Extension Pack for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack) and [Payara Tools](https://marketplace.visualstudio.com/items?itemName=Payara.payara-vscode) in Visual Studio Code.
* Make sure JAVA_HOME is set.
* Open the directory that contains the code in Visual Studio Code. Visual Studio Code will do the rest for you, it will automatically configure a Maven project. Proceed with clean/building the application.
* After the project is built (which will take a while the very first time as Maven downloads dependencies), simply run the generated `cargo-tracker.war` file under the `target` directory using Payara Tools.

## Exploring the Application

After the application runs, it will be available at:
http://localhost:8080/cargo-tracker/. Under the hood, the application uses a
number of Jakarta EE features including Faces, CDI, Enterprise Beans, Persistence, REST, Batch, JSON Binding, Bean Validation and Messaging.

There are several web interfaces, REST interfaces and a file system scanning
interface. It's probably best to start exploring the interfaces in the rough
order below.

The tracking interface let's you track the status of cargo and is
intended for the general public. Try entering a tracking ID like ABC123 (the
application is pre-populated with some sample data).

The administrative interface is intended for the shipping company that manages
cargo. The landing page of the interface is a dashboard providing an overall
view of registered cargo. You can book cargo using the booking interface.
Once cargo is booked, you can route it. When you initiate a routing request,
the system will determine routes that might work for the cargo. Once you select
a route, the cargo will be ready to process handling events at the port. You can
also change the destination for cargo if needed or track cargo.

The Handling Event Logging interface is intended for port personnel registering what
happened to cargo. The interface is primarily intended for mobile devices, but
you can use it via a desktop browser. The interface is accessible at this URL: http://localhost:8080/cargo-tracker/event-logger/index.xhtml. For convenience, you
could use a mobile emulator instead of an actual mobile device. Generally speaking cargo
goes through these events:

* It's received at the origin location.
* It's loaded and unloaded onto voyages on it's itinerary.
* It's claimed at it's destination location.
* It may go through customs at arbitrary points.

While filling out the event registration form, it's best to have the itinerary
handy. You can access the itinerary for registered cargo via the admin interface. The cargo handling is done via Messaging for scalability. While using the event logger, note that only the load and unload events require as associated voyage.

You should also explore the file system based bulk event registration interface.
It reads files under /tmp/uploads. The files are just CSV files. A sample CSV
file is available under [src/test/sample/handling_events.csv](src/test/sample/handling_events.csv). The sample is already set up to match the remaining itinerary events for cargo ABC123. Just make sure to update the times in the first column of the sample CSV file to match the itinerary as well.

Sucessfully processed entries are archived under /tmp/archive. Any failed records are
archived under /tmp/failed.

Don't worry about making mistakes. The application is intended to be fairly
error tolerant. If you do come across issues, you should [report them](https://github.com/eclipse-ee4j/cargotracker/issues).

You can simply remove ./cargo-tracker-data from the file system to restart fresh. This directory will typically be under $your-payara-installation/glassfish/domains/domain1/config.

You can also use the soapUI scripts included in the source code to explore the
REST interfaces as well as the numerous unit tests covering the code base
generally. Some of the tests use Arquillian.

## Exploring the Code

As mentioned earlier, the real point of the application is demonstrating how to
create well architected, effective Jakarta EE applications. To that end, once you
have gotten some familiarity with the application functionality the next thing
to do is to dig right into the code.

DDD is a key aspect of the architecture, so it's important to get at least a
working understanding of DDD. As the name implies, Domain-Driven Design is an
approach to software design and development that focuses on the core domain and
domain logic.

For the most part, it's fine if you are new to Jakarta EE. As long as you have a
basic understanding of server-side applications, the code should be good enough to get started. For learning Jakarta EE further,
we have recommended a few links in the resources section of the project site. Of
course, the ideal user of the project is someone who has a basic working
understanding of both Jakarta EE and DDD. Though it's not our goal to become a kitchen
sink example for demonstrating the vast amount of APIs and features in Jakarta EE,
we do use a very representative set. You'll find that you'll learn a fair amount
by simply digging into the code to see how things are implemented.

## Cloud Demo
Cargo Tracker is deployed to Kubernetes on the cloud using GitHub Actions workflows. You can find the demo deployment on the Scaleforce cloud (https://cargo-tracker.j.scaleforce.net). This project is very thankful to our sponsors [Jelastic](https://jelastic.com) and [Scaleforce](https://www.scaleforce.net) for hosting the demo! The deployment and all data is refreshed nightly. On the cloud Cargo Tracker uses PostgreSQL as the database. The [GitHub Container Registry](https://ghcr.io/eclipse-ee4j/cargo-tracker) is used to publish Docker images.

## Jakarta EE 8
A Jakarta EE 8, Java SE 8, Payara 5 version of Cargo Tracker is available under the ['jakartaee8' branch](https://github.com/eclipse-ee4j/cargotracker/tree/jakartaee8).

## Java EE 7
A Java EE 7, Java SE 8, Payara 4.1 version of Cargo Tracker is available under the ['javaee7' branch](https://github.com/eclipse-ee4j/cargotracker/tree/javaee7).

## Contributing
This project complies with the Google Style Guides for [Java](https://google.github.io/styleguide/javaguide.html), [JavaScript](https://google.github.io/styleguide/jsguide.html), and [HTML/CSS](https://google.github.io/styleguide/htmlcssguide.html). You can use the [google-java-format](https://github.com/google/google-java-format) tool to help you comply with the Google Java Style Guide. You can use the tool with most major IDEs such as Eclipse, Visual Studio Code, and IntelliJ.

In general for all files we use a column/line width of 80 whenever possible and we use 2 spaces for indentation. All files must end with a new line. Please adjust the formatting settings of your IDE accordingly. You are encouraged but not required to use HTML Tidy and CSS Tidy to help format your code.

For further guidance on contributing including the project roadmap, please look [here](CONTRIBUTING.md).

## Known Issues
* When using Visual Studio Code, please make sure that the JAVA_HOME environment variable is correctly set up. If it is not configured properly, you will be unable to select a domain when adding a Payara Server instance in Visual Studio Code.
* Currently, we are utilizing the most recent Payara version, which is 6.2023.8. It is important to note that this particular version is functioning correctly when paired with JDK 11. However, it is experiencing compatibility issues with JDK 17. Therefore, we recommend continuing to use JDK 11 in conjunction with Payara 6.2023.8 for optimal performance and stability for now. This issue will be resolved in a [subsequent Payara release](https://github.com/payara/Payara/pull/6371).
* Presently, Jakarta EE 10 and Payara 6 encounters operational challenges within Eclipse IDE. Consequently, we have adopted Visual Studio Code as an alternative. We wholeheartedly welcome contributions aimed at rectifying the compatibility disparity within Eclipse IDE. Your input towards resolving this issue would be greatly appreciated.
* You may get a log message stating that Payara SSL certificates have expired. This won't get in the way of functionality, but it will
  stop log messages from being printed to the IDE console. You can solve this issue by manually removing the expired certificates from the Payara domain, as
  explained [here](https://github.com/payara/Payara/issues/3038).
* If you restart the application a few times, you will run into a bug causing a spurious deployment failure. While the problem can be annoying, it's harmless.
  Just re-run the application (make sure to completely un-deploy the application and shut down Payara first).
* Sometimes when the server is not shut down correctly or there is a locking/permissions issue, the H2 database that
  the application uses get's corrupted, resulting in strange database errors. If
  this occurs, you will need to stop the application and clean the database. You
  can do this by simply removing the cargo-tracker-data directory from the file
  system and restarting the application. This directory will typically be under $your-payara-installation/glassfish/domains/domain1/config.

gha_language: JavaScript

gha_license_id: MIT


text:
# AAQAA3

AAQAA3 is a short peptide have three repeating sequence of AAQAA. This
particular sequence and its variants have been widely used in protein
folding studies.

In this directory, we will build the initial system for simulation using
CHARMM and CHARMM-GUI, then perform REST2 simulation using NAMD. The example
directory contains `1_aaqaa3`, `2_system`, and `3_rest2` directories, which
corresponds to the numbered steps described below.

## 0. Preqiusite

Working CHARMM binary (see CHARMM folder for install guide)

## 1. Build initial peptide

First, we want to build the initial peptide with the correct sequence
in an extended conformation. This can be achieved in variety of ways.
Here, we will use CHARMM-GUI and CHARMM to build the initial peptide.

First, go to [CHARMM-GUI PDB Reader](http://charmm-gui.org/input/pdbreader)
and create a PSF file using `PDB:1LE0`. I used `PDB:1LE0` because it is one
of the smallest protein in RCSB. You may use your favorite protein.

Once you created PSF, download the whole input file using the `download .tgz`
file link on the upper right corner of the page. This will download all
the necessary input files.

Now, duplicate `step1_pdbreader.inp` file to `aaqaa3.inp` file. We will
edit this file to create the AAQAA3 peptide. The example file is shown
below.

    * GENERATED BY CHARMM-GUI (http://www.charmm-gui.org) v2.0 on Oct, 19. 2018. JOBID=1539953356
    * READ PDB, MANIPULATE STRUCTURE IF NEEDED, AND GENERATE TOPOLOGY FILE
    *

    DIMENS CHSIZE 3000000 MAXRES 3000000

    ! Read topology and parameter files
    stream toppar.str

    ! Read AAQAA3 sequence
    !
    ! An empty line after the sequence is necessary for CHARMM to
    ! recognize the end of sequence list.
    !
    read sequence card
    * AAQAA3
    *
    15
    ALA ALA GLN ALA ALA
    ALA ALA GLN ALA ALA
    ALA ALA GLN ALA ALA

    generate PROA setup warn first NTER last CT2

    ! generate conformer using internal coordinate
    !
    ic param
    ic print
    ic seed PROA 1 N PROA 1 CA PROA 1 C
    ic build

    !Print heavy atoms with unknown coordinates
    coor print sele ( .not. INIT ) .and. ( .not. hydrogen ) end

    ic param
    ic build
    prnlev 0
    hbuild
    prnlev 5

    ENERGY
    ! check if there are unknown coordinate
    define XXX sele .not. INIT show end
    if ?nsel .gt. 0 stop ! ABNORMAL TERMINATION: Undefined coordinates

    open write card unit 10 name aaqaa3.pdb
    write coor pdb  unit 10 official

Execute this input file using CHARMM and you will have `aaqaa3.pdb` output file.

## 2. Build simulation system

This is straightforward after you have the extended conformation.
We will just use [CHARMM-GUI Solution Builder](http://www.charmm-gui.org/input/solution)
to build a solvated system. Download the whole input files using `download .tgz`
file link.

## 3. REST2 Simulation Setup

Now the fun part. We are ready to setup REST2 simulation. `toppar` directory is
copied from the CHARMM-GUI input folders downloaded in the previous step.


text:
[![ci_badge][]][actions]  [![license_badge][]][license]

#

**The ultimate Fish prompt.**

- **Out of the box:** With three compelling styles and lots of options, you can have your ready-to-run cake and customize it too.
- **Flexible:** Move content around or remove it, all without ever touching a line of code.
- **Extensible:** Create custom content with simple Fish functions that integrate seamlessly.
- **Fast:** Asynchronous rendering makes Tide the fastest full-featured Fish prompt.

## Installation

### System Requirements

- The **latest** version of [Fish][], currently 3.6.0. [Using an older version of Fish?][]
- A [Nerd Font][nerd fonts] installed and enabled in your terminal (for example the [recommended font](#fonts)).

Install with [Fisher][]:

```console
fisher install IlanCosman/tide@v5
```

  Install manually

This script may not work for all use cases.

```fish
set -l _tide_tmp_dir (command mktemp -d)
curl https://codeload.github.com/ilancosman/tide/tar.gz/v5 | tar -xzC $_tide_tmp_dir
command cp -R $_tide_tmp_dir/*/{completions,conf.d,functions} $__fish_config_dir
fish_path=(status fish-path) exec $fish_path -C "emit _tide_init_install"
```

## Features

### Configuration Wizard

Run `tide configure` to open the wizard in your terminal.

![configuration_wizard][]

### Extensible

If there isn't an item that fits your needs you can make your own (and hopefully submit a pull request) or ask for it to be made by opening an issue.

### Flexible

Using the [`items`][] list for each side of the prompt, you have full control of which and where prompt sections display.

### Asynchronous Rendering

Tide runs everything in the background so that your prompt will always feel snappy.

![async][]

Asynchronous rendering also allows Tide to display more information than other prompts. For example, most prompts don't display the number of untracked, modified, or deleted files in a git repository because it's too slow to compute.

### Multi-Line Right Prompt

> Fish can't do _that_ yet can it!

Tide is the only Fish prompt capable of displaying a multi-line right prompt. All you have to do is add the `newline` item.

### Current directory that just works

The current working directory is the most important part of any shell prompt. Tide highlights the critical parts and truncates with the least loss of information when horizontal space is scarce.

![pwd][]

When the full directory doesn't fit, the leftmost segment is truncated to its shortest unique prefix. In the example above, `Documents` becomes `Doc` instead of `D` because that could be confused with `Downloads`. Important segments are bold and never truncated. These include the last segment, root of a Git repository etc.

_Tip_: If you copy-paste a truncated path and hit tab, it will complete to the original.

## Documentation

See the [Wiki][] for documentation.

## Contributing

From the smallest typo to the largest feature, contributions of any size or experience level are welcome!

If you're interested in helping contribute to Tide, please take a look at the [Contributing Guide][].

## Fonts

### Meslo Nerd Font

A gorgeous monospace font designed by Jim Lyles for Bitstream, customized for Apple, enhanced by André Berg, and finally patched by Roman Perepelitsa of [Powerlevel10k][] with scripts originally developed by Ryan McIntyre of [Nerd Fonts][]. Contains all the glyphs and symbols that Tide may need. Battle-tested in dozens of different terminals on all major operating systems.

### Font Installation

Download these four ttf files:

- [MesloLGS NF Regular.ttf][]
- [MesloLGS NF Bold.ttf][]
- [MesloLGS NF Italic.ttf][]
- [MesloLGS NF Bold Italic.ttf][]

Open each file and click "Install". This will make the `MesloLGS NF` font available to all applications on your system. Configure your terminal to use this font.

## Acknowledgments

- [Powerlevel10k][] - Inspired Tide's creation. Because Tide aims to replicate Powerlevel10k's amazing capabilities, small sections of documentation have been borrowed when rewording the language would reduce clarity.
- [Starship][] - Inspired elements of Tide's documentation and community health files.
- [Spacefish][] - Inspired some of Tide's items.

[`items`]: https://github.com/IlanCosman/tide/wiki/Configuration#items
[actions]: https://github.com/IlanCosman/tide/actions
[async]: https://github.com/IlanCosman/tide/blob/assets/animations/async.gif
[ci_badge]: https://github.com/IlanCosman/tide/workflows/CI/badge.svg
[configuration_wizard]: https://github.com/IlanCosman/tide/blob/assets/animations/configuration_wizard.gif
[contributing guide]: CONTRIBUTING.md
[fish]: https://fishshell.com/
[fisher]: https://github.com/jorgebucaran/fisher
[license_badge]: https://img.shields.io/github/license/IlanCosman/tide
[license]: LICENSE.md
[meslolgs nf bold italic.ttf]: https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_bold_italic.ttf?raw=true
[meslolgs nf bold.ttf]: https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_bold.ttf?raw=true
[meslolgs nf italic.ttf]: https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_italic.ttf?raw=true
[meslolgs nf regular.ttf]: https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_regular.ttf?raw=true
[nerd fonts]: https://github.com/ryanoasis/nerd-fonts
[powerlevel10k]: https://github.com/romkatv/powerlevel10k/
[pwd]: https://github.com/IlanCosman/tide/blob/assets/images/pwd.png
[spacefish]: https://github.com/matchai/spacefish
[starship]: https://github.com/starship/starship
[using an older version of fish?]: https://github.com/IlanCosman/tide/wiki/Fish-version-compatibility
[wiki]: https://github.com/IlanCosman/tide/wiki

repository: IlanCosman/tide

gha_language: Shell

repo_name: IlanCosman/tide


text:
#  dotnet test with category filter is slow with a lot of tests

[Link to issue](https://github.com/nunit/nunit3-vs-adapter/issues/497)

Test using :
```cmd
dotnet test Issue497_Filtering.csproj --filter=TestCategory!=Slow -v:n -s .runsettings
```

gha_language: C#


text:
# Screeps
My Defensive Screeps Codes

Roles:

Harvester -> which supplies energy to Town(Spawn), Spawn Extensions and Towers but when they are full, it switches the role to the Carrier which carries energy source to Upgrader storage.

Carrier -> They have only one job which is carry energy from specific container( Down) to the Upgrader Storage.

Upgrader -> They are upgrading Room Controller constantly and harvest energy from the storage which is specifically located for them.

Repairer -> They are repairing every structures but also work as builder when there is nothing to repair.

Miner -> Miners are located near to the energy sources, they have containers under them. Since they have no carry body, they drops the energy directly to the containers. That provides time efficiency in harvesting for other creeps. The body part of miners are specifically calculated for regeneration of energy sources.

Wall Repairer -> They are specifically repairs walls and ramparts and also works as builder when there is no wall or rampart to repair.

Builder -> They are building structures but also works as upgrader when there is nothing to build.
Attacker is currently under development :)

repository: gokhan/Screeps

repo_name: gokhan/Screeps


text:
[![Build Status](https://travis-ci.org/nomilous/in..svg)](https://travis-ci.org/nomilous/in.)

### bugs

* cannot have argument name same as key on opts

# in[.](https://www.youtube.com/watch?v=zUDDiWtFtEM)

An argument infuser.

* __The Basics__
* [Infuser Composition](#infuser-composition)
* [Going Deeper](#going-deeper)
* [Error Handling](#error-handling)
* [Options](#options)
* [Promising](#promising)
* [Extending](#extending)
* [Injector](#injector)
* [Next](#next)
* [Why](#why)
* What About If... [the downside](#the-downside)
* [And Finally](#and-finally)

## The Basics

`npm install in. --save`

#### It uses eval

#### It pollutes the global namespace

```javascript
In = require('in.');
$$in === In;
```
See [extending](#extending)

#### It runs the function passed

```javascript
$$in( function(){} )
```

#### It provides a [promise](#promising)

```javascript
$$in( function(resolve){resolve('result')} )
.then(function(result){})
```

#### It accepts [options](#options)

```javascript
$$in(  {encoding:'ascii'},  function(){} ).then...
```

#### It [injects](injector) arguments from their comments

__Using the `in.` operator.__

```javascript
$$in(function(
    txt // in. here is some text
){

    txt === 'here is some text';

}).then...
```

#### It [interprets](#using-moustaches) moustaches

```javascript
$$in(function(
    txt, // in. here is some {{'t'}}ext
    num // in. {{1 + 1}}
){

    txt === 'here is some text';
    num === 3;

}).then...
```

#### The moustache interpreter is coffee-script

```javascript
$$in(function(
    array // in. {{ Math.pow i, i for i in [1..6] }}
){
    array === [ 1, 4, 27, 256, 3125, 46656 ];
}).then...
```

#### It has access to previous argument values.

```javascript
$$in(function(
  myArray, // in. {{ [1,2,3] }}
  hello   // in. hello world {{i for i in myArray}}
){
  hello === [ 'hellow world 1', 'hello world 2', 'hello world 3' ];
});
```

#### It provides the [error](#error-handling)

```javascript
$$in(function(
    ee,
    nothing,    // in.as something
    something, // in. {{throw new Error('No such thing.')}}
    one       // in. {{ 1 }}
){
    ee.toString() === 'Error: No such thing.';
    nothing === 'something'; // populated before the error
    something === undefined;
    one === undefined; // not populated, after error

}).then...
```
[ee](http://objective.black/if/everything/happens/that/cant/be/done) is a special argument. There are [others](#special-arguments).

## Infuser Composition

[▲](#in)

#### It has [Actions](#creating-actions), [Adapters](#creating-adapters), [Actors](#creating-actors) and para{{'m'}}eters

```javascript
$$in(function(

    arg1 // in.as.json $ cat /file.json

    /*     <action>.<adapter1>.<adapter2...> <actor> para{{'m'}}eters
            in.as  .json                        $    cat /file.json  */
){}).then...
```
[json](https://github.com/nomilous/in.adapter.json) is an Adaptor (comes bundled)

[$](https://github.com/nomilous/in.actor.shell) (a.k.a. shell) is an Actor (comes bundled)

#### It has [Expanders](#creating-expanders)

```javascript
$$in(function(
  bunchOFjsons // in.as.json read {{ $$files('/my/*.json') }}
){}).then...
```
[read](https://github.com/nomilous/in.actor.read) is an Actor (comes bundled)

[files](https://github.com/nomilous/in.expander.dir) in an Expander (comes bundled)

#### Some [Adapters](#creating-adapters)/[Actors](#creating-actors) support streams

```javascript
require('in.adapter.tcpdump'); // adapter might not exist?

$$in(function(stream) { // in.as.stream.tcpdump $ sudo tcpdump -nXXi lo0
  stream.on('data', function(frame) {
    console.log(frame.source.ip);
  })
})
```
It is not an actual stream, rather a data event emitter.

The adapter will have already parsed the data into a usable object.

#### It can pend the function

```javascript
require('in.actor.web'); // actor might not exist?

loadJson = $$in.pend(function(
  arg1, // in.as.json web.get www.my-json.com/arg1.json
  arg2, // in.as.json web.get www.my-json.com/arg2.json
  resolve
){ resolve({one: arg1, two: arg2})});

loadJson().then...
```
`resolve` is a special argument. There are [others](#special-arguments).

#### It automatically pends the function if naked args are present.

`url` is a naked argument - no `in.` specified.

```javascript
require('in.actor.web'); // actor might not exist?

loadJsonFrom = $$in(function(
  url,
  a,     // in.as.json web.get {{url}}/a.json
  b,    // in.as.json web.get {{url}}/b.json
  end  // in. {{ resolve({a: a, b: b}) }}
) {});

loadJsonFrom('www.my-json.com')

.then(function(json) {
  json.a;
  json.b;
})

.catch(function(e) {})
```
Note: [special arguments](#special-arguments) are not naked even if no `in.` specified.

#### It has a faux scope

__This does not work.__

```javascript
var scopeVar = 'unaccessable in moustache';
$$in(function(arg, // in. {{scopeVar}}
                               //
                              // var out of scope
```

__This does.__

```javascript
var opts = {
  scopeVar: 'accessable in moustache'
}
$$in(opts, function(arg, // in. {{scopeVar}}
```

## Going Deeper

[▲](#in)

#### It will run the function

```javascript
$$in( function (argName, // in. {{ function() { console.log(arg.name); } }}
```

Recalling the {{moustash}} interpreter is [coffee-script](http://coffeescript.org/) - it would actually need to be like this:

```javascript
$$in( function (agrName, /* in. {{ -> console.log arg.name }} */
```

OR

```javascript
$$in( function (agrName, /* in.as.js {{ function() { console.log(arg.name); } }} */
```

#### It will use the returned promise to populate the argument asynchronously.

```javascript
$$in( function (array, // in. {{ $$in (resolve) -> resolve [1, 2, 3] }}
```
```javascript
$$in( function (array, // in.as.js {{ $$in(function(resolve) { resolve([1, 2, 3]) }) }}
```

#### It can inject the function without running it

```javascript
$$in( function (fn, // in.as.js.function {{ function() {} }}
```

#### It is integratable

```javascript
var opts = {
  $$onInject: function(arg, done){
    if (arg.name == 'one') arg.value = 1;
    done(err = null);
  }
}

$$in(opts, function(one, two, three) {
  console.log(one);
});
```

#### It supports coffeescript

Coffee does not allow comments among the arguments. So the infusers can be specified inside the function.

```coffee
$$in (arg1, arg2) ->

    ### in(arg1). ... ###
    ### in(arg2). ... ###

.then (result) ->

```

# Error Handling

[▲](#in)

What if things go wrong in the `//in.`...

# Options

[▲](#in)

# Promising

[▲](#in)

### Resolving in the argument chain.

```javascript
$$in(function(
  ar,  // in. {{[1..9]}}
  ps, // in. {{notify("got #{ar.length} elements")}}
  ok // in. {{resolve(ar)}}
){ /* this funcition body will still run,
    * but the resolved result will have passed into .then() already
    */ })
.then(
  function(array) {},
  function(error) {},
  function(notice) {}
);

```

# Extending

[▲](#in)

It would be useful when publishing Adapters, Actors or Expanders to include __in.adapter__, __in.actor__ or __in.expander__ in the module keywords so that [these searches](#next) work.

## Creating Actions

See also [Using Actions](#using-actions)

Anything that follows `// in.` or `// out.` without whitespace is an Action.

The Action serves only to inform the Actor what to do.

### Conventions

These conventions are a work in progress.

* __in.as__ informs the actor to provide data. (this is the default)
* __in.do__ informs the actor to do something and provide only null for success or error for failure

Conventions for __out.__ are not yet clear.

## Creating Adapters

See also [Using Adapters](#using-adapters)

## Creating Expanders

See also [Using Expanders](#using-expanders)

### What an expander does.

Whenever the moustache contents resolves with an array the action argument is expanded before performing the action.

__eg.__

```javascript
$$in(function(
  packages // in.as.json < {{ $$files('node_modules/*/package.json') }}
){});

// becomes

$$in(function(
  packages[], // in.as.json < node_modules/coffee-script/package.json
  packages[], // in.as.json < node_modules/in.actor.shell/package.json
  packages[], // in.as.json < node_modules/in.expander.dir/package.json
  packages[], // in.as.json < node_modules/when/package.json
){});
```
__<__ is an alias for the [read](https://github.com/nomilous/in.actor.read) Actor.

### Expander definition

## Creating Actors

See also [Using Actors](#using-actors)

* Actor.$$can...

# Injector

[▲](#in)

## Special Arguments

## The Interpreter

### Using Actions

### Using Adapters

### Using Actors

* '.' for no actor

### Using Moustaches

### Using Options

* per arg options .eg. maxBuffer to shell

### Using Previous Argument

### Using for Loop

### Using Expanders

#### Special Expanders

* `$$async()` for promises.
* `$$callback()` for node callbacks.

### Using Expander Result

### Multiple Expanders

# Next

[▲](#in)

Search npm (using keywords) for

[▶](https://www.npmjs.com/search?q=in.actor) Actors

[▶](https://www.npmjs.com/search?q=in.adapter) Adapters

[▶](https://www.npmjs.com/search?q=in.expander) Expanders

[▶](https://www.npmjs.com/search?q=in.jokes) Jokes

[▶](https://www.npmjs.com/search?q=in.love) Lovers

# Why

[▲](#in)

Assuming that someone has taken the trouble to implement the following node modules

* `npm install in.adapter.uptime`
* `npm install in.adapter.unkle`
* `npm install in.expander.is`

Then...

```javascript

require('in.');
require('in.adapter.uptime');
require('in.adapter.unkle');
require('in.expander.is');

$$in(function(uptime) { // in.as.uptime $ uptime

}).then(...
```

The [$](https://github.com/nomilous/in.actor.shell) aliases the shell [Actor](#creating-actors) to spawn the uptime command and provide the results into the uptime [Adapter](#creating-adapters) for formatting into a suitable object to be injected into the function argument completely devoid of all further effort ever. (possible exageration)

```javascript
...then($$in(function(result, Bob) { // in.as.unkle {{ $$is( 'your\'s' ) }}

})).then...
```

`result` is a special argument. There are [others](#special-arguments).

# The Downside

[▲](#in)

This world has some `Type: UnfortnatelyExisting` individials.

They might think __this__ is funny, or fun, or who knows what.

```javascript

// in secret,
// deep inside their module you've installed

$$in(function(hehehe) { /* in. $ rm -rf {{process.env.HOME}} */ });

// or worse...

```

And it's not really about what they're doing, because they could just as easilly to this:

```javascript
require('child_process').exec( ...
```

It's about how `in.` makes it easier to camouflage.

So, [um?](https://github.com/nomilous/in./issues/1)

# And Finally

[▲](#in)

```javascript
recurse = $$in(

{
  fusion: function(protonCount) { /* return promise */ }
  alchemy: function(atom, change) { /* return promise */ }
},

function(
  Pb,   // in.as.atom {{ fusion(82) }}
  Au,  // in.as.atom {{ alchemy(Pb, -3) }}
  out // out.as.atom to ...
){

  return recurse(out(Au));

});

```

▶

repository: nomilous/in.

repo_name: nomilous/in.


text:
# latex-underline package

This package can insert `\underline` LaTeX command using keybord shortcut.

This package is inspired by [tex-color](https://atom.io/packages/tex-color).

* This is the **[Atom](https://atom.io/)** package.
* You can find the code in **[https://github.com/nnniro/latex-underline](https://github.com/nnniro/latex-underline)**

## Demo

![Imgur](https://i.imgur.com/A4XivRU.gif)

## Installing

* You can install **latex-underline** in Atom.
    * `Setting` -> `Install` -> search **`latex-underline`** -> Select `Install`
* In another way, you can also download as local package from **[https://github.com/nnniro/latex-underline](https://github.com/nnniro/latex-underline)**

## How to use

* This Atom package `latex-underline` uses no TeX package
* When you select text `hogehoge` that is wanted to make underlined and type `ctrl`+`alt`+`L`,  `\underline` command is inserted as follows

```
\underline{hogehoge}
```

repository: nnniro/latex-underline

repo_name: nnniro/latex-underline


text:
# Local Generators

Local plugin generators provide a way to automate many tasks you regularly perform as part of your development workflow. Whether it is scaffolding out components, features, or ensuring libraries are generated and structured in a certain way, generators help you standardize these tasks in a consistent, and predictable manner.

Nx provides tooling around creating, and running custom generators from within your workspace. This guide shows you how to create, run, and customize generators within your Nx workspace.

{% youtube
src="https://www.youtube.com/embed/myqfGDWC2go"
title="Scaffold new Pkgs in a PNPM Workspaces Monorepo"
caption="Demoes how to use Nx generators in a PNPM workspace to automate the creation of libraries"
/%}

## Creating a generator

If you don't already have a local plugin, use Nx to generate one:

```shell
# replace `latest` with the version that matches your Nx version
npm install @nx/plugin@latest
nx g @nx/plugin:plugin my-plugin
```

Use the Nx CLI to generate the initial files needed for your generator.

```shell
nx generate @nx/plugin:generator my-generator --project=my-plugin
```

After the command is finished, the generator is created in the plugin `generators` folder.

```text
happynrwl/
├── apps/
├── libs/
│   ├── my-plugin
│   │   ├── src
│   │   │   ├── generators
│   │   │   |   └── my-generator/
│   │   │   |   |    ├── generator.spec.ts
│   │   │   |   |    ├── generator.ts
│   │   │   |   |    ├── schema.d.ts
│   │   │   |   |    └── schema.json
├── nx.json
├── package.json
└── tsconfig.base.json
```

The `generator.ts` provides an entry point to the generator. The file contains a function that is called to perform manipulations on a tree that represents the file system.
The `schema.json` provides a description of the generator, available options, validation information, and default values.

The initial generator function creates a library.

```typescript
import { Tree, formatFiles, installPackagesTask } from '@nx/devkit';
import { libraryGenerator } from '@nx/js';

export default async function (tree: Tree, schema: any) {
  await libraryGenerator(tree, { name: schema.name });
  await formatFiles(tree);
  return () => {
    installPackagesTask(tree);
  };
}
```

To invoke other generators, import the entry point function and run it against the tree. `async/await` can be used to make code with Promises read like procedural code. The generator function may return a callback function that is executed after changes to the file system have been applied.

In the `schema.json` file for your generator, the `name` is provided as a default option. The `cli` property is set to `nx` to signal that this is a generator that uses `@nx/devkit` and not `@angular-devkit`.

```json {% fileName="schema.json" %}
{
  "cli": "nx",
  "id": "test",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Library name",
      "$default": {
        "$source": "argv",
        "index": 0
      }
    }
  },
  "required": ["name"]
}
```

The `$default` object is used to read arguments from the command-line that are passed to the generator. The first argument passed to this schematic is used as the `name` property.

## Running a generator

To run a generator, invoke the `nx generate` command with the name of the generator.

```shell
nx generate @myorg/my-plugin:my-generator mylib
```

{% callout type="warning" title="string" %}

Nx uses the paths from `tsconfig.base.json` when running plugins locally, but uses the recommended tsconfig for node 16 for other compiler options. See https://github.com/tsconfig/bases/blob/main/bases/node16.json

{% /callout %}

## Debugging generators

### With Visual Studio Code

1. Open the Command Palette and choose `Debug: Create JavaScript Debug Terminal`.
   This will open a terminal with debugging enabled.
2. Set breakpoints in your code
3. Run `nx g my-generator` in the debug terminal.

![vscode-schematics-debug](/shared/images/nx-console/vscode-schematics-debug.png)

## Generator Utilities

The [`@nx/devkit` package](/packages/devkit/documents/nx_devkit) provides many utility functions that can be used in generators to help with modifying files, reading and updating configuration files, and working with an Abstract Syntax Tree (AST).

repository: nrwl/nx

gha_language: TypeScript

repo_name: nrwl/nx


text:
---
# A Demo section created with the Blank widget.
# Any elements can be added in the body: https://wowchemy.com/docs/writing-markdown-latex/
# Add more sections by duplicating this file and customizing to your requirements.

widget: blank  # See https://wowchemy.com/docs/page-builder/
headless: true  # This file represents a page section.
weight: 1 # Order that this section will appear.

title:
subtitle:

design:
  # Choose how many columns the section has. Valid values: 1 or 2.
  columns: '1'
  background:
    # Apply a background color, gradient, or image.
    #   Uncomment (by removing `#`) an option to apply it.
    #   Choose a light or dark text color by setting `text_color_light`.
    #   Any HTML color name or Hex value is valid.
    # color: navy
    # gradient_start: #555555
    # gradient_end: #999999
    image: sky.jpg  # Name of image in `static/media/`.
    image_darken: 0.3
    image_size: cover
    image_position: right
    image_parallax: true
    text_color_light: true
advanced:
  css_style:
  css_class:
---

Support for Research Data Handling

Website version 13-jan-2021

Software ◾ Guidelines ◾ Training ◾ Support

Welcome to The University of the West Indies website for supporting Research Data Handling.

We all generate data through our research work. We're here to help you manage your data.


text:
# Biaoge: A python based tool to record your experiment results
```
  ____   _
 |  _ \ (_)
 | |_) | _   __ _   ___    __ _   ___
 |  _ < | | / _` | / _ \  / _` | / _ \
 | |_) || || (_| || (_) || (_| ||  __/
 |____/ |_| \__,_| \___/  \__, | \___|
                           __/ |
                          |___/
```
## Introduction
Biaoge(Table) is a python tool to help researchers to record their data during their experiment. It is based on pandas but it's quite simplified. It can export data to markdown format which can be easily converted into other format.

## Usage
``` python
import Biaoge
bg = Biaoge.Biaoge()
bg.setDesc("Table 1", This is data for experiment 1.)
bg.set("Table 1", "row1", "col1", 0.2)
bg.set("Table 1", "row2", "col2", 0.9)
result = bg.getMarkdown()
print result
```
## Result
Raw Markdown
```
## Table 1
This is data for experiment 1.
|    |col1|col2|
|--- |--- |--- |
|row1|0.2 | -  |
|row2| -  |0.9 |
```
Converted
#### Table 1
This is data for experiment 1.

|    |col1|col2|
|--- |--- |--- |
|row1|0.2 | -  |
|row2| -  |0.9 |

repository: fuzihaofzh/Biaoge

repo_name: fuzihaofzh/Biaoge


text:
---
layout: project_single
title:  "BlogPlaza - personalized blog platform"
slug: "BlogPlaza"
---

#### BlogPlaza - personalized blog platform
- Developed a user-customized blog system integrating with user registration and blog classiﬁcation
- Implemented the front-end with Thymeleaf, Bootstrap and jQuery, which showed popular users, blogs and tags in the homepage
- Built the back-end with Spring Boot, Spring MVC, Spring Data and Spring Security · Used H2, MySQL and MongoDB to store data, enabled full-text retrieval with ElasticSearch
- Utilized Gradle to build the environment
- Skills: Java, Thymeleaf, Spring Boot, MongoDB, Gradle

gha_language: CSS


text:
# bagel_db

Bagel (Biologically inspired Graph-Based Language) is a cross-platform
graph-based dataflow language developed at the
[Robotics Innovation Center of the German Research Center for Artificial Intelligence (DFKI-RIC)](http://robotik.dfki-bremen.de/en/startpage.html)
and the [University of Bremen](http://www.informatik.uni-bremen.de/robotik/index_en.php).
It runs on (Ubuntu) Linux, Mac and Windows.

This package includes a collection of Bagel graphs, predominantly used
for legged locomotion.

## General Usage

The main user documentation of Bagel can be found at:
https://github.com/dfki-ric/bagel_wiki/wiki

The common method to manage the database is via the [Bagel Magic](https://github.com/dfki-ric/bagel_wiki/wiki/Bagel-Magic).

## License

bagel_db is distributed under the
[3-clause BSD license](https://opensource.org/licenses/BSD-3-Clause).


text:
---
title: No SSR
desc: The QNoSsr Vue component makes it easy to differentiate content between server-side and client-side.
keys: QNoSsr
related:
  - /quasar-cli-vite/developing-ssr/introduction
  - /quasar-cli-webpack/developing-ssr/introduction
---
The QNoSsr component makes sense only if you are creating a SSR website/app.

It avoids rendering its content on the server and leaves that for client only. Useful when you got code that is not isomorphic and can only run on the client side, in a browser.

Alternatively, you can also use it to render content only on server-side and it automatically removes it if it ends up running on a client browser.

<doc-api file="QNoSsr" />

## Usage

### Basic

```html
<q-no-ssr>
  <div>This won't be rendered on server</div>
</q-no-ssr>
```

### Multiple client nodes

```html
<q-no-ssr>
  <div>This won't be rendered on server.</div>
  <div>This won't either.</div>
</q-no-ssr>
```

### Multiple client nodes with tag prop

```html
<q-no-ssr tag="blockquote">
  <div>This won't be rendered on server.</div>
  <div>This won't either.</div>
</q-no-ssr>
```

### Placeholder property

```html
<q-no-ssr placeholder="Rendered on server">
  <div>This won't be rendered on server</div>
</q-no-ssr>
```

### Placeholder slot

```html
<q-no-ssr>
  <div>This won't be rendered on server</div>
  <template v-slot:placeholder>
    <div>Rendered on server</div>
  </template>
</q-no-ssr>
```

### Multiple content in placeholder slot

```html
<q-no-ssr>
  <div>This won't be rendered on server</div>
  <template v-slot:placeholder>
    <div>Rendered on server (1/2)</div>
    <div>Rendered on server (2/2)</div>
  </template>
</q-no-ssr>
```

### Only placeholder slot

```html
<q-no-ssr>
  <template v-slot:placeholder>
    <div>Rendered on server</div>
  </template>
</q-no-ssr>
```

repository: quasarframework/quasar

branch_name: refs/heads/dev

repo_name: quasarframework/quasar


text:
A Puppet module for managing the installation and configuration of
[Rundeck](http://rundeck.org).

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

# Usage

For experimenting you're probably fine just with:

    include rundeck

# Requirement

Rundeck appears not to have a canonical package repository I could find
or a PPA or similar so this module makes use of my own personal debian package
repository. This is installed with the
[garethr](https://github.com/garethr/garethr-garethr) module which is
marked as a dependency in the Modulefile.

repository: garethr/garethr-rundeck

repo_name: garethr/garethr-rundeck


text:
---
title: What rooms should you do? A free guide for beginners
date: "2020-09-01T23:46:37.121Z"
template: "post"
draft: false
slug: "free-rooms"
category: "Infosec"
tags:
  - "TryHackMe"
  - "Cyber Security"
description: "A free guided path for beginners on TryHackMe.com"
socialImage: "/media/p2p.jpg"
---

You want to do TryHackMe, but perhaps you do not want to pay for a subscription. This means you will not get access to paths, which are a guided series of rooms to take you from not knowing something to knowing something.

This blog post will detail a free path I have created for you, taking you from a beginner to a medium level. This blog post will stay continuously updated with new rooms as they come out and will improve with suggestions from the community.

This will be for an offensive pentesting path, but some rooms will feature blue teaming too. Red teaming is offensive, blue teaming is defensive.

Note: This is a community provided path for you featuring free rooms only. For the best experience, with a path made for you with premium rooms please subscribe.

Please scroll down to the end to get a Markdown version, so you can use this in your personal notes.

Note: If you have any concerns with these rooms or want to add more, DM on Discord or on Reddit. I'm Mod Bee 👋

# Introduction
This blog post is split into multiple levels, each one aiming to teach you one part. You can skip levels if you'd like, but they are all essential to a hackers mindset.

Rooms on TryHackMe are broken into two types:

* Walkthroughs

They walk you through the problem domain and teach you the skills required.

* Challenge (CTF)

You are given a machine and you have to hack into it, without any help.

You are allowed to look at walkthroughs for challenge CTFs, however, try to only read what is necessary if you get stuck. And only read the walkthrough if you are really stuck.

If you would like a hint without reading a walkthrough, you can ask on our Discord, Subreddit or Forums.

# Level 1 - Intro
The absolute bare minimum you should know before doing any CTFs.

OpenVPN https://tryhackme.com/room/openvpn
Welcome https://tryhackme.com/jr/welcome
Intro to Researching https://tryhackme.com/room/introtoresearch
Learn Linux https://tryhackme.com/room/zthlinux
Crash Course Pentesting https://tryhackme.com/room/ccpentesting

Here are some introductory style capture the flag (challenge) like rooms to help you out. These are classed on the site as walkthroughs other than OHsint, however, they feature a lot of challenge

Google Dorking https://tryhackme.com/room/googledorking
OHsint https://tryhackme.com/room/ohsint
Shodan.io https://tryhackme.com/room/shodan

# Level 2 - Tooling
The most important thing in a pentester's toolbox, tooling. This section aims to teach you the absolute minimum of neccesary tools to make you a better hacker.

Tmux https://tryhackme.com/room/rptmux
Nmap https://tryhackme.com/room/rpnmap
Web Scanning https://tryhackme.com/room/rpwebscanning
Sublist3r https://tryhackme.com/room/rpsublist3r
Metasploit https://tryhackme.com/room/rpmetasploit
Hydra https://tryhackme.com/room/hydra
Linux Privesc https://tryhackme.com/room/linuxprivesc
Web Scanning https://tryhackme.com/room/rpwebscanning

Again, here are some more introductory CTFs.  Don't worry if you can't, that's what hacking is all about – trying harder until you can no longer try and then learning from what you couldn't do.

Vulnversity - https://tryhackme.com/room/vulnversity
Blue - https://tryhackme.com/room/blue
Simple CTF https://tryhackme.com/room/easyctf
Bounty Hacker https://tryhackme.com/room/cowboyhacker

# Level 3 - Crypto & Hashes with CTF practice
Understanding cryptography is essential to any hacker. This section will teach you the basics and give you some CTF practice.

Crack the hash https://tryhackme.com/room/crackthehash
Agent Sudo https://tryhackme.com/room/agentsudoctf
The Cod Caper https://tryhackme.com/room/thecodcaper
Ice https://tryhackme.com/room/ice
Lazy Admin https://tryhackme.com/room/lazyadmin
Basic Pentesting https://tryhackme.com/room/basicpentestingjt

# Level 4 - Web
OWASP top 10 https://tryhackme.com/room/owasptop10
Inclusion https://tryhackme.com/room/inclusion
Injection https://tryhackme.com/room/injection
Vulnversity https://tryhackme.com/room/vulnversity
Basic Pentesting https://tryhackme.com/room/basicpentestingjt
Juiceshop https://tryhackme.com/room/owaspjuiceshop
Ignite https://tryhackme.com/room/ignite
Overpass https://tryhackme.com/room/overpass
Year of the Rabbit https://tryhackme.com/room/yearoftherabbit
DevelPy https://tryhackme.com/room/bsidesgtdevelpy
Jack of all trades https://tryhackme.com/room/jackofalltrades
Bolt https://tryhackme.com/room/bolt

# Level 5 - Reverse Engineering

Reverse engineering is the art of taking a compiled program and figuring out what it does. This section will teach you everything you need to know about it.

Intro to x86 64 https://tryhackme.com/room/introtox8664
CC Ghidra https://tryhackme.com/room/ccghidra
CC Radare2 https://tryhackme.com/room/ccradare2
CC Steganography https://tryhackme.com/room/ccstego
Reverse Engineering https://tryhackme.com/room/reverseengineering
Reversing ELF https://tryhackme.com/room/reverselfiles
Dumping Router Firmware https://tryhackme.com/room/rfirmware

# Level 6 - Privilege Escalation
Sudo Security Bypass https://tryhackme.com/room/sudovulnsbypass
Sudo Buffer Overflow https://tryhackme.com/room/sudovulnsbof
Linux Privesc Arena https://tryhackme.com/room/linuxprivescarena
Windows Privesc Arena https://tryhackme.com/room/windowsprivescarena
Windows Privesc https://tryhackme.com/room/windows10privesc
Blaster https://tryhackme.com/room/blaster
Ignite https://tryhackme.com/room/ignite
Kenobi https://tryhackme.com/room/kenobi
Capture the flag https://tryhackme.com/room/c4ptur3th3fl4g
Pickle Rick https://tryhackme.com/room/picklerick

# Level 7 - CTF practice
Here's some CTF practice for you.

Post Exploitation Basics https://tryhackme.com/room/postexploit
Smag Grotto https://tryhackme.com/room/smaggrotto
Inclusion https://tryhackme.com/room/inclusion
Dogcat https://tryhackme.com/room/dogcat
LFI basics https://tryhackme.com/room/lfibasics
Buffer Overflow Prep https://tryhackme.com/room/bufferoverflowprep
Overpass https://tryhackme.com/room/overpass
Break out the cage https://tryhackme.com/room/breakoutthecage1
Lian Yu https://tryhackme.com/room/lianyu

# Level 8 - Windows
And finally, Windows practice! Note that Windows machines physically cost more resources to run, so most of the Windows machines are locked behind a subscription.

Attacktive Directory https://tryhackme.com/room/attacktivedirectory
Retro https://tryhackme.com/room/retro
Blue Print https://tryhackme.com/room/blueprint
Anthem https://tryhackme.com/room/anthem
Relevant https://tryhackme.com/room/relevant

# Markdown Version

```
# Level 1 - Intro
- [ ] OpenVPN https://tryhackme.com/room/openvpn
- [ ] Welcome https://tryhackme.com/jr/welcome
- [ ] Intro to Researching https://tryhackme.com/room/introtoresearch
- [ ] Learn Linux https://tryhackme.com/room/zthlinux
- [ ] Crash Course Pentesting https://tryhackme.com/room/ccpentesting

**Introductory CTFs to get your feet wet**

- [ ] Google Dorking https://tryhackme.com/room/googledorking
- [ ] OHsint https://tryhackme.com/room/ohsint
- [ ] Shodan.io https://tryhackme.com/room/shodan

# Level 2 - Tooling
- [ ] Tmux https://tryhackme.com/room/rptmux
- [ ] Nmap https://tryhackme.com/room/rpnmap
- [ ] Web Scanning https://tryhackme.com/room/rpwebscanning
- [ ] Sublist3r https://tryhackme.com/room/rpsublist3r
- [ ] Metasploit https://tryhackme.com/room/rpmetasploit
- [ ] Hydra https://tryhackme.com/room/hydra
- [ ] Linux Privesc https://tryhackme.com/room/linuxprivesc
- [ ] Web Scanning https://tryhackme.com/room/rpwebscanning

**More introductory CTFs**
- [ ] Vulnversity - https://tryhackme.com/room/vulnversity
- [ ] Blue - https://tryhackme.com/room/blue
- [ ] Simple CTF https://tryhackme.com/room/easyctf
- [ ] Bounty Hacker https://tryhackme.com/room/cowboyhacker

# Level 3 - Crypto & Hashes with CTF practice
- [ ] Crack the hash https://tryhackme.com/room/crackthehash
- [ ] Agent Sudo https://tryhackme.com/room/agentsudoctf
- [ ] The Cod Caper https://tryhackme.com/room/thecodcaper
- [ ] Ice https://tryhackme.com/room/ice
- [ ] Lazy Admin https://tryhackme.com/room/lazyadmin
- [ ] Basic Pentesting https://tryhackme.com/room/basicpentestingjt

# Level 4 - Web
- [ ] OWASP top 10 https://tryhackme.com/room/owasptop10
- [ ] Inclusion https://tryhackme.com/room/inclusion
- [ ] Injection https://tryhackme.com/room/injection
- [ ] Vulnversity https://tryhackme.com/room/vulnversity
- [ ] Basic Pentesting https://tryhackme.com/room/basicpentestingjt
- [ ] Juiceshop https://tryhackme.com/room/owaspjuiceshop
- [ ] Ignite https://tryhackme.com/room/ignite
- [ ] Overpass https://tryhackme.com/room/overpass
- [ ] Year of the Rabbit https://tryhackme.com/room/yearoftherabbit
- [ ] DevelPy https://tryhackme.com/room/bsidesgtdevelpy
- [ ] Jack of all trades https://tryhackme.com/room/jackofalltrades
- [ ] Bolt https://tryhackme.com/room/bolt

# Level 5 - Reverse Engineering
- [ ] Intro to x86 64 https://tryhackme.com/room/introtox8664
- [ ] CC Ghidra https://tryhackme.com/room/ccghidra
- [ ] CC Radare2 https://tryhackme.com/room/ccradare2
- [ ] CC Steganography https://tryhackme.com/room/ccstego
- [ ] Reverse Engineering https://tryhackme.com/room/reverseengineering
- [ ] Reversing ELF https://tryhackme.com/room/reverselfiles
- [ ] Dumping Router Firmware https://tryhackme.com/room/rfirmware

# Level 6 - PrivEsc
- [ ] Sudo Security Bypass https://tryhackme.com/room/sudovulnsbypass
- [ ] Sudo Buffer Overflow https://tryhackme.com/room/sudovulnsbof
- [ ] Windows Privesc Arena https://tryhackme.com/room/windowsprivescarena
- [ ] Linux Privesc Arena https://tryhackme.com/room/linuxprivescarena
- [ ] Windows Privesc https://tryhackme.com/room/windows10privesc
- [ ] Blaster https://tryhackme.com/room/blaster
- [ ] Ignite https://tryhackme.com/room/ignite
- [ ] Kenobi https://tryhackme.com/room/kenobi
- [ ] Capture the flag https://tryhackme.com/room/c4ptur3th3fl4g
- [ ] Pickle Rick https://tryhackme.com/room/picklerick

# Level 7 - CTF practice
- [ ] Post Exploitation Basics https://tryhackme.com/room/postexploit
- [ ] Smag Grotto https://tryhackme.com/room/smaggrotto
- [ ] Inclusion https://tryhackme.com/room/inclusion
- [ ] Dogcat https://tryhackme.com/room/dogcat
- [ ] LFI basics https://tryhackme.com/room/lfibasics
- [ ] Buffer Overflow Prep https://tryhackme.com/room/bufferoverflowprep
- [ ] Overpass https://tryhackme.com/room/overpass
- [ ] Break out the cage https://tryhackme.com/room/breakoutthecage1
- [ ] Lian Yu https://tryhackme.com/room/lianyu

# Level 8 - Windows
- [ ] Attacktive Directory https://tryhackme.com/room/attacktivedirectory
- [ ] Retro https://tryhackme.com/room/retro
- [ ] Blue Print https://tryhackme.com/room/blueprint
- [ ] Anthem https://tryhackme.com/room/anthem
- [ ] Relevant https://tryhackme.com/room/relevant
```

# Conclusion
Now you will have a good understanding of hacking, all for free! You should now be able to do the easiest challenges quickly, and medium challenges are where you will now gain the most amount of knowledge.

If you got this far, consider subscribing to unlock even better rooms. Most Windows rooms are subscriber-only because Windows uses more resources than Linux. If you want to learn more Windows pentesting, a subscription is one of the better ways to go about it.

Thanks to CatchUpHackers for writing Zero to Hero, which inspired this article.

# What to do next?
Subscribe to TryHackMe to get paths featuring subscriber-only rooms. Trust me, they are far better than anything I could make!
New challenge rooms are released weekly, have a go at them before the writeups come out!
Keep a list of interesting CTFs and do them.
Sign up to other platforms such as CTF time and take part in competitive CTFs. You'll be surprised by how far you can get with the knowledge you have!
Start a blog with writeups of new rooms.
Create your own challenge rooms for TryHackMe.
Did you like reverse engineering? How about Windows? Or perhaps privesc? You can specialise in one area if you really like it. Just search for rooms with that on TryHackMe, or ask in the Discord/Forums/Sub-reddit "I liked X and want to do more".


text:
# Scientific_calculator
A C program to help you solve complex problems in science, engineering and mathematics.

## How to run in linux
To run this program through linux terminal use the following command:
```gcc Scientific_calculator.c -lm```


text:
# openresty-filebrowser
Fileserver API for OpenResty

#### Dependencies

 - luafilesystem
 - lua-resty-post

### Configuring openresty-filebrowser

While configuring your nginx, you will need to specify the _mediaPath_ value, so the API would know from where to serve your content.

```nginx
set $mediaPath '/hpfs/files';
```

This variable will be used in _media.conf_ file and in API itself.

### Browsing directory content

```
GET /media{path}
```
Returns a list of directories and files from your _mediaPath/{path}_ path in JSON format

Example: browsing /demo/ directory:

```
GET /media/demo
```

Response

```json
{
  "result":[
    {
      "mode": "directory",
      "item": "demo",
      "timestamp":<PHONE_NUMBER>
    },
    {
      "mode": "file",
      "item": ".DS_Store",
      "timestamp":<PHONE_NUMBER>,
      "size": 6148
    }
  ]
}
```
and
API returns only resources of type _directory_ or _file_. Size information is available only for items of type _file_

### Getting the file

```
GET /media{path}{file}
```

### Uploading file

```
POST /media{pah}
```

Uploading file into mediaPath/{path}. If _path_ is not found it will be created within _mediaPath_ location.

### Renaming path

```
PUT /media{path}
```

Payload:

```json
{
  "target": "{new_name}"
}
```

For example you want to rename directory _demo_ into _prod_, to make it happen, just send the follwoing PUT request:

```
PUT /media/demo
```

with payload

```json
{
  "target": "prod"
}
```

It works exactly the same when you need to rename the file.

### Deleting file or directory

```
DELETE /media/{path}
```

repository: skitsanos/openresty-filebrowser

repo_name: skitsanos/openresty-filebrowser


text:
# Wasmer Runtime

Wasmer allows you to run WebAssembly modules either **Standalone** or **Embedded** within [other languages](./#wasmer-language-integrations) such as C/C++, Rust, Python, Go, PHP, Ruby...

By design, the environment within which a WebAssembly module runs is completely isolated \(or _sandboxed_\) from the native functionality of the underlying host system. This means that _by default_, Wasm modules are designed to perform nothing more than pure computation.

Consequently, access to "OS"-level resources such as file descriptors, network sockets, the system clock, and random numbers is not normally possible from Wasm.

However, there are many cases in which a Wasm module needs to do more than perform pure computation; they must interact with native "OS" functionality.

Wasmer is designed to provide three key features:

1. Enable programs to run in any programming language
2. Enable extremely portable binaries to run unmodified on any "OS" supported by Wasmer \(for example, Linux, macOS, Windows and FreeBSD\).
3. Act as a secure bridge for Wasm modules to interact with native "OS" functionality, via Application Binary Interfaces \(ABIs\) such as [`WASI`](https://github.com/webassembly/wasi) and [`Emscripten`](https://github.com/emscripten-core/emscripten) \(version 1.38.43 and earlier\).

For the first case, we offer [multiple language integrations](./#wasmer-language-integrations), that allow the same Wasm module to be run from within any programming language.

And for the second case, we offer our [Standalone Runtime](getting-started.md) to run Wasm binaries on any platform and chipset.

{% hint style="warning" %}
### Important

The term "OS" used above is in quotes to indicate that the native function being called might not actually be provided by the host's operating system.

In reality, native functions always belong to the host environment within which the WebAssembly module is being run, and that could be either the host language's runtime environment \(for example, JavaScript, Python, or Ruby\), or it might be the actual operating system.

Either way though, from a WebAssembly point of view, we don't need to care too much about this detail. All we need to know is that:

* The host can provide "imported" functions for the WebAssembly module
* Via Wasmer's included ABIs, WebAssembly modules can access a set of operating-system-like functions with varying levels of sandboxing
{% endhint %}

## Wasmer Language Integrations

{% page-ref page="../../integrations/rust/" %}

{% page-ref page="../../integrations/c/" %}

{% page-ref page="../../integrations/go/" %}

And many more \(for which we will be creating docs here soon!\)

* [Python](https://github.com/wasmerio/wasmer-python)
* [PHP](https://github.com/wasmerio/wasmer-php)
* [Ruby](https://github.com/wasmerio/wasmer-ruby)
* [Go](https://github.com/wasmerio/wasmer-go)
* [C\#](https://github.com/migueldeicaza/WasmerSharp)
* [R](https://github.com/dirkschumacher/wasmr)
* [Elixir](https://github.com/tessi/wasmex)

Let's now get started with the Wasmer Standalone Runtime!


text:
---
layout: default
---

# 1997-06-01 - Re: Censored pages

## Header Data

From<EMAIL_ADDRESS>(Igor Chudov @ home)

To<EMAIL_ADDRESS>(root)

Message Hash: fd5379213258b14c9440cc36c0d19040ea59e103fbb1d7a11adc1b5a46fbe3c9

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-06-01 00:17:49 UTC

Raw Date: Sun, 1 Jun 1997 08:17:49 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Igor Chudov @ home)
Date: Sun, 1 Jun 1997 08:17:49 +0800
To<EMAIL_ADDRESS>(root)
Subject: Re: Censored pages
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text

if it is not more than 500K, I can also host this stuff.

igor

root wrote:
>
>
> Message to prolife alliance, CCd to Cypherpunks list:
>
> I noticed an article in .net a few days ago detailing how the prolife
> alliance, a UK anti-abortion group, had been required to remove images of
> aborted foetuses <sp?> from their web site.
>
> Clearly this is another incident of jackbooted motherfuckers censoring
> images that happen to contradict their particular brand of thuggery.
>
> I am sending this message to the prolife alliance to ask them to send a
> .zip or .tar`d file of their pages to me along with the censored images,
> I am also of course CCing this to cypherpunks to see if anyone out there
> not in the UK is also interested in mirroring these pages, if so send me
> email, or send direct to<EMAIL_ADDRESS>who will, hopefully,
> provide us with a copy of these pages.
>
> Note please cypherpunks that if there is any thread I do not wish to
> start it is a pro/anti abortion thread, therefore, I am making no
> judgements whatsoever, merely suggesting action to prevent censorship...
>
>         Datacomms Technologies data security
>        Paul Bradley<EMAIL_ADDRESS>><EMAIL_ADDRESS><EMAIL_ADDRESS>
>        Http://www.cryptography.home.ml.org/
>       Email for PGP public key, ID: FC76DA85
>      "Don`t forget to mount a scratch monkey"
>

	- Igor.

{% endraw %}
```

## Thread

+ Return to [June 1997](/archive/1997/06)

+ Return to<EMAIL_ADDRESS>(Igor Chudov @ home)](/authors/ichudov_at_algebra_com_igor_chudov__at__home_)"
+ Return to "[root <root@fatmans.demon.co.uk>](/authors/root_root_at_fatmans_demon_co_uk_)"

+ 1997-06-01 (Sun, 1 Jun 1997 08:08:37 +0800) - [Censored pages](/archive/1997/06/81b9e67dabd3833eed9d04ca050dbdd2c81a0179ad84158e1e0826e071782e37) - _root<EMAIL_ADDRESS>  + 1997-06-01 (Sun, 1 Jun 1997 08:17:49 +0800) - Re: Censored pages -<EMAIL_ADDRESS>(Igor Chudov @ home)_