text:
Home

Docs

    A Python 2 Tutorial for Beginners

    Very Simple Programs

Very Simple Programs
====================

OK! We have Python installed, now what? Well, we program!

And it is that simple (at least for now!). Python makes it easy to run single
lines of code -- one-liner programs. Let's give it a go.

Opening IDLE
------------

Run the program labelled **IDLE** (IDLE stands for **I**ntegrated
**D**eve**l**opment **E**nvironment). Now you are in the IDLE environment. This
is the place you will be spending most time in. Here you can open a new window
to write a program, or you can simply mess around with single lines of code,
which is what we are going to do.

Type the following and press Enter. Don't type the `>>>` part, as it
will already be there. Also note that in Python 2 the parentheses are optional
after `print` but in Python 3.0 they are required.

#### Code Example 1: Hello, World! ####

```python
>>> print ("Hello, World!")
```

What happened? You just created a program, that prints the words 'Hello,
World!'. The IDLE environment that you are in immediately compiles whatever you
have typed in. This is useful for testing things, e.g., defining a few
variables, and then testing to see if a certain line will work. That will come
in a later lesson though.

Math in Python
--------------

Now try the following examples. The lines that start with `#` are comments, and
they are used to explain the code that follows them.

#### Code Example 2: Math ####

```python
>>> # These are additions:
>>> 1 + 1
2
>>> 20 + 80
100
>>> 18294 + 449566
467860
>>>
>>> # This is a subtraction:
>>> 6 - 5
1
>>>
>>> # A multiplication:
>>> 2 * 5
10
>>>
>>> # An exponential, this is 5 squared:
>>> 5 ** 2
25
>>> # A print statement, that writes something onscreen. Notice that
>>> # 1 + 2 is not evaluated:
>>> print ("1 + 2 is an addition")
1 + 2 is an addition
>>>
>>> # You can print sums and variables in a sentence. The commas
>>> # separating each section are a way of	separating clearly
>>> # different things that you are printing:
>>> print ("One kilobyte is 2^10 bytes, or", 2 ** 10, "bytes.")
One kilobyte is 2^10 bytes, or 1024 bytes.
>>>
>>> # Note how Python ignores remainders/decimals in divisions:
>>> 21 / 3
7
>>> 23 / 3
7
>>>
>>> # This time, since the numbers are decimals themselves, the answer
>>> # will be a decimal:
>>> 23.0 / 3.0
7.666666666666667
>>>
>>> # The remainder from a division:
>>> 23 % 3
2
>>> 49 % 10
9
```

As you can see, there is a comment that explains the code that follows it, then
there is the code, and finally the result of that code. These are the basic
commands of Python, and what they do. Here is a table to clarify them:

      Command
      Name
      Example
      Output

      +
      Addition
      4 + 5
      9

      -
      Subtraction
      8 - 5
      3

      *
      Multiplication
      4 * 5
      20

      /
      Division
      19 / 3
      6

      %
      Modulo
      19 % 3
      1

      **
      Exponent
      2 ** 4
      14

Remember that thing called **order of operations** that they taught in maths?
Well, it applies in Python, too. Here it is, if you need reminding:

1.  parentheses ()
2.  exponents **
3.  multiplication *, division /, and remainder %
4.  addition + and subtraction -

Order of Operations
-------------------

Here are some examples that you might want to try, if you're rusty on this:

#### Code Example 3: Order of operations ####

```python
>>> 1 + 2 * 3
7
>>> (1 + 2) * 3
9
```

In the first example, the computer calculates 2 * 3 first, then
adds 1 to it. This is because multiplication has the higher
priority (at 3) and addition is below that (at a lowly 4).

In the second example, the computer calculates 1 + 2 first, then
multiplies it by 3. This is because parentheses (brackets, like the ones that
are surrounding this interluding text) have the higher priority (at 1), and
addition comes in later than that.

Also remember that the math is calculated from left to right, *unless* you put
in parentheses. The innermost parentheses are calculated first. Watch these
examples:

#### Code Example 4: Parentheses ####

```python
>>> 4 - 40 - 3
-39
>>> 4 - (40 - 3)
-33
```

In the first example, 4 - 40 is calculated,then - 3
is done.

In the second example, 40 - 3 is calculated, then it is subtracted
from 4.

Comments, Please
----------------

The final thing you'll need to know to move on to multi-line programs is the
**comment**. You should always add comments to code to show others who might be
reading your code what you've done and why. Type the following (and yes, the
output is shown):

#### Code Example 5: Comments ####

```python
>>> #I am a comment.  In Python, you make something a
comment by putting a hash (<code>#</code>) in front of it. A hash comments
everything after it in the line, and nothing before it. So you could type this:

#### Code Example 6: Comment examples ####

```python
>>> print ("food is very nice") #eat me
food is very nice
```

…then you only get the output of <code>print</code>, without the
comment. However when you type the following:

```python
>>> # print "food is very nice"
```

…then nothing happens, because the code was after a comment.

Comments are important for adding necessary information for another programmer
to read, but not the computer; for example, an explanation of a section of
code, saying what it does, or what is wrong with it. You can also comment out
bits of code if you don't want them to compile, but can't delete them because
you might need them later.

      ← Previous: Installing Python

      Next: Variables and Scripts →


text:
# Server Message API

This is reference about the message API of the server.

## Message

Message is fixed size binary data to communicate between server and client.

There are three types of message.

- Request: A message from a client which requires one or more replies from the server
- Notice: A message from a client which doesn't require a reply from the server
- Reply: A message from a server to response to the request message from a client

## Communication Flow

To communicate with the server, you should follow below flow.

1. [Client] Connect to the server by TCP
1. [Client] Send authentication request
1. Message roop
    1. [Client] Send requests or notices
    1. [Server] Reply to the request with one or more messages
    1. [Client] Process reply

In below situation, the server forces to close the connection immediately without any reply.

- Send invalid message type
- Send not authentication request at first time after connection
- Server internal error occured

## Message Structure

All messages consist of header and body.
The sizes of all messages are in less than or equals 256 bytes.

There are two types of header.

- Request Header: A header for request message and notice message
- Reply Header: A header for reply message

If errors occured while handling messages, the server returns only reply message header with error code.

## Message Header Structure

### Request/Notice Header

The size is 1 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|message_type|8 bits unsigned integer|1|A type of message.|

Options of `message_type` are below.

|Name|Category|Value|
|:---|:---|---:|
|authentication|request|0|
|create_room|request|1|
|list_room|request|2|
|join_room|request|3|
|update_room_status|notice|4|
|connection_test|request|5|
|random_match|request|6|
|keep_alive|notice|7|

### Reply Header

The size is 2 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|message_type|8 bits unsigned integer|1|A type of message.|
|error_code|8 bits unsigned integer|1|An error code.|

Options of `message_type` are same as one used in request header.

Options of `error_code` are as below.

|Name|Value|Explanation|
|:---|---:|:---|
|ok|0|Request is processed successfully.|
|server_error|1|Server internal error.|
|operation_invalid|2|The operation is invalid in current state.|
|room_not_found|3|Indicated room is not found.|
|request_parameter_wrong|4|Wrong parameters which must be rejected in the client is passed for request.|
|room_password_wrong|5|Indicated password of room is not correct.|
|room_full|6|The number of player reaches limit.|
|room_permission_denied|7|Request is rejected because indicated room is the room which you are not host of or closed.|
|room_count_exceeds_limit|8|The number of room reaches limit.|
|client_already_hosting_room|9|Request is failed because the client is already hosting room.|

## Message Body Structure

### Authentication Request

A request to authenticate.

#### Parameters

The size is 74 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|api_version|16 bits unsigned integer|2|An API version number the client requires.|
|game_id|24 byte length UTF-8 string|24|A game ID of the client.|
|game_version|24 byte length UTF-8 string|24|A game version number of the client.|
|player_name_t|24 byte length UTF-8 string|24|A name of player. This must not be empty.|

#### Reply

The size is 29 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|result|8 bits unsigned integer|1|A result of authentication.|
|api_version|16 bits unsigned integer|2|An API version number of the server.|
|game_version|24 byte length UTF-8 string|24|A game version the server accepts.|
|player_tag|16 bits unsigned integer|2|A tag number of player to avoid duplication of player name.|

Options of `result` are as below.

|Name|Value|Host Identifier|Explanation|
|:---|---:|:---|:---|
|success|0|Authentication is succeeded.|
|api_version_mismatch|1|An API version of server is different from what the client required.|
|game_id_mismatch|2|Client game id doesn't match to the acceptable value in the server.|
|game_version_mismatch|3|Client game version doesn't match to the version the server required.|

Note that authentication failure are not treated as error.
If authentication is failed, the server closes the connection immediately after reply.

#### Error Codes

|Name|Condition|Continuable|
|:---|:---|:---|
|ok|The request is processed succesfully.|yes|
|request_parameter_wrong|A player name is empty.|no|
|operation_invalid|Authentication request is send more than twice.|no|

### Create Room Request

A request to create room.

#### Parameters

The size is 84 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|password|16 byte length UTF-8 string|16|A password of room you create. If this is empty, the room is created as a public room.|
|max_player_count|8 bits unsigned integer|1|A limit of player count in the room. This must not exceeds the limit which is defined in server setting.|
|connection_establish_mode|8 bits unsigned integer|1|A way how to establish P2P connection.|
|port_number|16 bits unsigned integer|2|A port number which is used for game host. 49152 to 65535 is available. This is used when `connection_establish_mode` is `builtin`.|
|external_id|64 elements byte array.|64|An id where clients connect using external service like Steam Networking. This is used when `connection_establish_mode` is not `builtin`. This is left justified and big endien.|

Options of `connection_establish_mode` are as below.

|Name|Value|Host Identifier|Explanation|
|:---|---:|:---|:---|
|builtin|0|`port_number` property|Use builtin method.|
|steam|1|`external_id` property containing SteamID64 as 64bits unsigned integer|Use Steam relay service.|
|others|255|`external_id` property|Use other external service.|

#### Reply

The size is 4 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|room_id|32 bits unsigned integer|4|An id of the room created.|

#### Error Codes

|Name|Condition|Continuable|
|:---|:---|:---|
|ok|The request is processed succesfully.|yes|
|client_already_hosting_room|Failed to host new room because the client already hosting room.|yes|
|room_count_exceeds_limit|The number of room exceeds limit.|yes|
|request_parameter_wrong|Max player count exceeds limit. Or indicated port number is invalid.|yes|

### List Room Request

A request to get room informations which matches to requested parameters.

#### Parameters

The size is 30 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|start_index|16 bits unsigned integer|2|A start index of room data which will be replied from search results.|
|count|16 bits unsigned integer|2|The number of room data which will be replied from search results.|
|sort_kind|8 bits unsigned integer|1|A sort kind of result.|
|search_target_flags|8 bits unsigned integer|1|A flags to indicate search target.|
|search_full_name|player_full_name|24|A query to search room by the room's host player name.|

Options of `sort_kind` are as below.

|Name|Value|
|:---|---:|
|name_ascending|0|
|name_descending|1|
|create_datetime_ascending|2|
|create_datetime_descending|3|

`search_target_flags` are treated as bit flags.
Options are as below.

|Name|Value|
|:---|---:|
|public_room|1|
|private_room|2|
|open_room|4|
|closed_room|8|

`player_full_name` is 24 bytes data as below.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|name|24 byte length UTF-8 string|24|A name of player.|
|tag|16 bits unsigned integer|2|A tag of player to avoid name duplication.|

#### Reply

The size is 246 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|total_room_count|16 bits unsigned integer|2|The number of rooms existing in the room group in the server.|
|matched_room_count|16 bits unsigned integer|2|The number of rooms which match to the query of the room.|
|reply_room_count|16 bits unsigned integer|2|The number of rooms which is included in reply messages.|
|room_info_list|A 6 elements array of room_info|240|A result room info list.|

`room_info` is 40 bytes data as below.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|room_id|32 bits unsigned integer|4|An id of the room.|
|host_player_full_name|player_full_name|24|A name of player who is hosting the room.|
|setting_flags|8 bits unsigned integer|1|A flags which indicate a setting of the room.|
|max_player_count|8 bits unsigned integer|1|Player capability of this room.|
|current_player_count|8 bits unsigned integer|1|The number of player which joins the room currently.|
|create_datetime|64 bits unsigned integer which indicates unix time|8|A datetime the room created.|
|connection_establish_mode|8 bits unsigned integer|1|A way how to establish P2P connection in the room.|

`setting_flags` are treated as bit flags.
Options are as below.

|Name|Value|
|:---|---:|
|public_room|1|
|open_room|2|

Multiple reply messages are sent if there are more rooms than rooms one reply message can send.
You can obtain the number of reply message (separation) by below expression.

```cpp
separation = floor((reply.reply_room_count + 5) / 6);
```

#### Error Codes

|Name|Condition|Continuable|
|:---|:---|:---|
|ok|The request is processed succesfully.|yes|
|request_parameter_wrong|sort_kind is invalid.|yes|

### Join Room Request

A request to get the information to join the room.

#### Parameters

The size is 21 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|room_id|32 bits unsigned integer|4|An id of the room you want to join.|
|connection_establish_mode|8 bits unsigned integer|1|An expected way how to establish P2P connection in the room.|
|password|16 byte length UTF-8 string|16|A password of the room you want to join. This is only refered when indicated room is private.|

#### Reply

The size is 82 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|game_host_endpoint|endpoint|18|An endpoint of game host which is hosting the room you want to join.|
|game_host_external_id|64 elements byte array.|64|An id to connect to the host using external service like Steam Networking. This is left justified and big endien.|

`game_host_endpoint` is 18 bytes data as below.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|ip_address|A 16 elements array of 8 bits unsigned integer|16|A IP address by big endian. In IPv4, IPv4-Mapped IPv6 is used. (example, `::ffff:<IP_ADDRESS>`)|
|port_number|16 bits unsigned integer|2|A port number.|

#### Error Codes

|Name|Condition|Continuable|
|:---|:---|:---|
|ok|The request is processed succesfully.|yes|
|room_not_found|Indicated room doesn't exist.|yes|
|room_permission_denied|Indicated room is closed.|yes|
|room_password_wrong|Indicated password is wrong.|yes|
|room_full|The number of player reaches limit.|yes|
|room_connection_establish_mode_mismatch|Connection establish mode of the room host doesn't match expected one in the client.|yes|

### Update Room Status Notice

A notice to inform new status of the room the client hosts.

#### Parameters

The size is 7 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|room_id|32 bits unsigned integer|4|An id of the room you want to join.|
|status|8 bits unsigned integer|1|A new status of the room.|
|is_current_player_count_changed|boolean|1|A flag which indicates if playr count is updated.|
|current_player_count|8 bits unsigned integer|1|A new player count.|

Options of `status` are as below.

|Name|Value|
|:---|---:|
|open|0|
|close|1|
|remove|2|

#### Error Conditions

Notice message is ignoreed if there are some errors in processing message.

|Condition|Continuable|
|:---|:---|
|Indicated room doesn't exist.|yes|
|The host of indicated room is not you.|yes|
|The number of new player count is invalid.|yes|
|The `status` parameter is invalid.|yes|

### Connection Test Request

A request to check the client is reachable from the internet.

#### Parameters

The size is 3 bytes.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|protocol|8 bits unsigned integer|1|A transport prptocol to use for connection test.|
|port_number|16 bits unsigned integer|2|A port number to use for connection test. 49152 to 65535 is available.|

Options of `prptocol` are as below.

|Name|Value|
|:---|---:|
|TCP|0|
|UDP|1|

#### Reply

The size is 1 byte.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|succeed|boolean|1|Whether the connection test is succeeded.|

#### Error Codes

|Name|Condition|Continuable|
|:---|:---|:---|
|ok|The request is processed succesfully.|yes|
|request_parameter_wrong|Indicated protocol or port number is invalid.|yes|

### Random Match Request

Not implemented now.

### Keep Alive Notice

A notice to notice alival of the client.

#### Parameters

The size is 1 byte.

|Name|Type|Size|Explanation|
|:---|:---|---:|:---|
|dummy|8 bits unsigned integer|1|Dummy data.|

#### Error Conditions

The server does nothing for this notice so there are no errors.

license: MIT

repository: CdecPGL/PlanetaMatchMaker

branch_name: refs/heads/master

extension: md

gha_language: C#

gha_license_id: MIT

license_type: permissive

repo_name: CdecPGL/PlanetaMatchMaker


text:
Gust
====

Gust is a set of GPU extensions for Breeze.

Please refer to the [wiki](https://github.com/piotrMocz/gust/wiki) for information about requirements, installation and some usage instructions.

repository: piotrMocz/gust

repo_name: piotrMocz/gust


text:
# Introduction

This folder contains artifacts required to deploy the app either
using docker-compose or kubernetes helm charts.

The [vishnu](vishnu) folder contains the helm chart for the app.

## Helm

### Install

Run from this directory

```
helm install vishnu --name=vishnu --namespace=vishnu --set postgresql.password="real password"
```

### Upgrade

```
helm upgrade vishnu --set postgresql.password="real password"
```

You can also run Skaffold for upgrade. Set the following env:

- POSTGRES_PASSWORD
- INGRESS_HOST

Then run below from the base directory of project.

```
skaffold run --namepsace=vishnu
```

## Docker compose

Instructions are in [README](deployment/docker/README.md) under deployment

repository: vsujeesh/tempcheck

repo_name: vsujeesh/tempcheck


text:
---
author: Benoît "badetitou" Verhaeghe
layout: project
title:  "Casino - GWT to Angular"
date:   2019-06-07 12:00:00 +100
categories: casino _ignore
---

## How to use Casino for the GWT to Angular project

### Summary

- Download Moose
- Download Casino
- Import GWT
- Export Angular

### Download Moose

To download Moose, the first step is to download the last version of Pharo Launcher.
It is downloadable at [https://pharo.org](https://pharo.org).

Once the Pharo Launcher is downloaded, we have to create an image from the latest build of Moose 7.0.

![Install Moose](../img/mooseInstall.png){: .center-image }

Select the image, and press the green arrow to run Pharo.

## Download Casino

To use Casino for the migration, we must download two projects.

The importer (in this tutorial it's the GWT importer)
The exporter (in this tutorial it's the Angular exporter)
The importers and exporters are hosted on [Github](https://github.com/search?q=user:badetitou+Casino).

### Iceberg

To download project in Pharo, the easiest way is to use Iceberg. This project proposes us a User Interface to download projects and their dependencies.

To download the GWT importer:

- Open Iceberg with Ctrl+O+I or on the menu with Tools>Iceberg :
- Add a repository
- Enter the project localization
- Install the default baseline

Now, the project Casino and the GWT importer should be loaded in the Image. You can save your image with `Ctrl+Shift+S`.

To access the code of the importer, we can use the Browser of Pharo. To do so, go on `Tools>System Browser` or press `Ctrl+O+B`.

Then, browse the repositories to Casino-Model-CoreWeb-Importer

## Import GWT

To migrate your application you have to migrate:

- The User Interface
- The Behavioral Code
- The Business Code

### User Interface

In Silverlight, the user interface is fully written in a xml file. To import a user interface into a Casino UI model, the importer visits its xml file. To do so, it parses the file with the XMLParser of Pharo, then it extends the XMLNodeVisitor. For each node, the visitor creates one or multiple entities in the UI model.

There are two major kinds of nodes:

Document which represents a Page in the UI model.
Element which represents a Widget in the UI model.
The element node may have attributes. Those attributes are transposed as Attribute or Action in the UI model by the silverlight importer.

To detect which widget corresponds to which node in the xml, the importer implements a factory. For each kind of xml tag, there is one corresponding entity in the UI meta-model. The binding between is done through the name of the xml tag for easy cases.

For example: a BLUIButton corresponds to a tag <Button>.

We can find the same strategy for the binding of the attributes.

### Behavioral Code

WIP -- The behavioral code is not currently handled.

### Business Code

WIP -- The business code is not currently handled.

### Run

To run the import, you can execute these lines on a playground (`Ctrl+Shift+W`):

```smalltalk
SmalltalkImage current garbageCollect.

"Generate BlApp"
gwtMooseModel := MooseModel importFromMSEStream:  'D:\Developpement\mse\verveineJ5\KitchenGWT.mse' asFileReference readStream.
gwtMooseModel rootFolder: 'D:\Developpement\mse\verveineJ5'.

"Generate Bl Model"
gwtModel := MooseModel new name: 'Showroom';
    metamodel:
        (MooseModel
            metamodelComposedOf:
                {CSNLayoutMetamodelGenerator metamodel}); yourself.
CSNMooseModelCreatorAngular runOn: gwtModel fromSourceModel: gwtMooseModel and:  'D:\Developpement\mse\KitchenGWT\BLCoreIncubatorGwt\src\fr\bl\application.module.xml'.

CSNModelExporterAngularBLSpecific export: gwtModel.
```

branch_name: refs/heads/source

gha_language: JavaScript


text:
# 8-point
A set of 8 point grid classes.

## Why

[8-point grid](https://spec.fm/specifics/8-pt-grid) is a thing.
It's a good thing at that.

8 has a lot of advantages as a number.
It's chief adavntage is that it bifurcates evenly.
So devices that do any type of strange scaling don't end up with half-values.

This is good.

This lib just offers a set of classes for using an 8-point soft grid with the css box model. It incluedes classes for `margin`, `padding`, `TRBL`, `width`, `height`, and "size".

## Anatomy

The class names break down like this:

```txt
{acronymized CSS property}-{n × 8px}
```

For example:

```css
.p-1 { padding:  8px }  /* 1 × 8px */
.p-2 { padding: 16px } /* 2 × 8px */
.p-3 { padding: 24px } /* 3 × 8px */
```

You can use side-specific properties as well:

```css
.mt-1 { margin-top: 8px }
.mr-1 { margin-right: 8px }
.mb-1 { margin-bottom: 8px }
.ml-1 { margin-left: 8px }

/* x and y added for convenience */

.my-1 { margin-top: 8px; margin-bottom: 8px }
.mx-1 { margin-right: 8px; margin-left: 8px }
```

## Legend

#### properties

```txt
m  = margin
mt = margin-top
mr = margin-right
mb = margin-bottom
ml = margin-left
my = margin-top; margin-bottom
mx = margin-right; margin-left

p  = padding
pt = padding-top
pr = padding-right
pb = padding-bottom
pl = padding-left
py = padding-top; padding-bottom
px = padding-right; margin-left

t = top
r = right
b = bottom
l = left

lh = line-height

w = width
h = height

s = width; height
```

#### values

```txt
1 = 8px
2 = 16px
3 = 24px
4 = 32px
5 = 40px
6 = 48px
7 = 56px
8 = 64px
```

## Install
NPM:
`npm i -S 8-point`

## Use
```html
<div class="m-1 p-3">
  This has 8px margin and 24px padding.
</div>

<img
  src="./path/img.ext"
  class="s-8"
  alt="this img is 64px high and wide"
/>
```

## License

MIT License

Copyright (c) 2016 Michael Chan


text:
# Orlando Event API

Provides data via json endpoints about events in downtown Orlando.  Current endpoints:
* "/events/{YYYY}/{MM}" returns events in requested month
* "/events/{YYYY}/{MM}/{DD}" returns events in requested day

## Getting Started

This package is built on node.js, with numerous JavaScript libraries. It is designed to deploy to Heroku with environment
variables preset (see deployment), a postgresql database, and scheduler to keep that database up to date.

### Prerequisites

This package requires node and npm to be installed on the development machine.
Having git would also be a good idea.
If you want to deploy to Heroku, having the Heroku cli tools is a must.
All other prerequisites can be installed once the project is on a machine with these tools.

### Installing

For development, the best practice would be to fork the project into your personal repository and then git clone the project to your development machine.
Once those dependencies are met and the project has been cloned to your machine, running "npm install --dev" will install the remaining dependencies.
Running npm start will start a server on your localhost for testing.

## Running the tests

Tests can be run via "npm test" in the project root directory

## Deployment

In the application root on your development machine

* Start a Heroku dyno == heroku create
* Start a Heroku Postgresql instance == heroku addons:create heroku-postgresql:hobby-dev (hobby-dev == free)
* Set Heroku environmental variables
  * heroku config:set PGDATABASE=[Database Name]
  * heroku config:set PGHOST=[Database Host]
  * heroku config:set PGPORT=[Database Port]
  * heroku config:set PGUSER=[Database User Name]
  * heroku config:set PGPASSWORD=[Database Password]
* Commit changes if any == git commit -a
* Push changes to heroku == git push heroku master

## Built With

* [Git](https://git-scm.com/downloads)
* [heroku-cli](https://devcenter.heroku.com/articles/heroku-cli)
* [npm](https://www.npmjs.com/get-npm)
* [express](https://expressjs.com/)
* [express-promise-router](https://www.npmjs.com/package/express-promise-router)
* [heroku-logger](https://www.npmjs.com/package/heroku-logger)
* [pg](https://node-postgres.com/)
* [mocha](https://mochajs.org/)
* [rewire](https://github.com/jhnns/rewire)

## Contributing

Please read [Contribuiting to Code for Orlando projects](http://www.codefororlando.com/) for details on our code of conduct, and the process for submitting pull requests to us.

## Authors

* **Travis Konarik** - *Api/code clean up* - [travis-konarik](https://github.com/travis-konarik)

See also the list of [brigadeers](http://www.codefororlando.com/) who participate with Code for Orlando.

## License

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

## Acknowledgments

repository: travis-konarik/EventParking-API

repo_name: travis-konarik/EventParking-API


text:
Create a new repo titled 'wirefame-exercise', making sure to configure it with index.html, style.css, and reset.css (use Eric Meyer's reset).

You will be building a professional-style wireframe document, to a provided spec, using just HTML and CSS. This workflow is similar to what you would encounter in an environment where there is a designer on the team: the designer creates a design comp (short for comprehensive) that shows you what the final version should look like, plus, a document with annotations about specific sizes and features.

Note: All of the images in this document are in the adjacent images/ directory

Here is the comp (a little smaller here to provide an overview):

Wireframe Design Comp

Here is the annotated version (a little larger here to give details):

Wireframe Annotated

Notice how the comp is very professional and business-like, in black, white, and grays, with image dimensions clearly labeled. The comp was created using image placeholders from placehold.it, which provides dimensions and makes it easy to style the color of the placeholder images by appending a hex color code to the URL. For instance, the code <img src="https://placehold.it/200x300/ddd" /> produces the following image, with a width of 200 pixels, a height, of 300 pixels, and color of #DDD, which is a light gray:

There are a lot of image placeholder services out there, and although the temptation to build a wireframe with placeholder images of kittens or puppies or zombies is strong, you should resist. The same goes for using flamboyant color schemes on wireframes. Sure, it's fun, but does it come across as professional? You be the judge:

Non-professional wireframe buildout

As for text, the industry standard for placeholder text is plain old "Lorem ipsum" rather than all of the fun ipsum variants on the internet.

Wireframe Process
Up to this point you've probably been building HTML pages (like the ones in the About Me and the Cookie Stand projects) like this:

Put some content into the HTML and apply markup
Apply some CSS to the HTML to try to get it to look the way you want.
Repeat Steps 1 and 2 some number of times until all content is in place.

"Oh no, I forgot, I better push this to GitHub!" and make your first ACP.
Basically, this happens:

Peter Griffin

This is NOT AT ALL how pros do it.

Let's look at a professional approach to setting up a web document, or more specifically, the look and feel of an application.

Have a design concept and a plan completely ready to go before you write the first line of code.
Wireframe showing all document dimensions
Know where images will go and how big they will be
Use placeholder images during the setup process
Know where text will go and use placeholder lorem ipsum text
Set up the project repository, scaffold the files, and make sure they are wired together.
ACP (Add, Commit, Push)
Build out all of the HTML without applying any classes or IDs
ACP
Working top to bottom in the document, put elements into place with CSS, using the structure of the HTML to create selectors wherever it is possible. Seek to limit use of classes and IDs to only where they are needed.
ACP
Apply color, backgrounds, borders, text styling, etc., to the specifications of the design.
ACP
Done!
With this wireframe in place, you can now present it to the designer and/or client for review, make any requested edits, and once there is a signoff on the wireframe, then it is time to start entering the actual content.


text:
---
title: Minimum Viable Samples
date: 2016-04-10
tags: devrel
icon: Code
migrated: true
---

> TL;DR - Code samples are important for teaching developers how to use a technology. Use the Minimum Viable Sample checklist below to avoid common mistakes.

Explaining to developers how to use your software or service is important - wether you are working in developer relations or as an open source developer. During my time as a developer advocate at PayPal [I wrote a lot of code samples](https://github.com/braintreedev?utf8=%E2%9C%93&query=sample) and came up with the idea of the Minimum Viable Sample.

Code samples are a great way to teach developers how your product works. They go by many names - demos, examples, quickstart apps - but what sets them apart from tutorials and documentation is that they provide developers with a different way to assimilate the same content. It's important to remember that developers, like most people, have different preferred ways of learning. Samples are just one of those.

## Samples as a learning technique

The purpose of a good code sample is to allow a developer to see a fully integrated example of your technology in action. They can download, run, experience, and then break down your sample to see how it works and how it fails. At the essence samples allow for "Learning By Breaking" (or "Learning By Taking Apart").

Additionally samples also allow developers to get a full context for  your documentation. Often tutorials or documentation can skip important details that seem obvious to the experts but can confuse a beginner.

## The sample flow

To understand why samples can fail to help a developer let's break down how samples tend to work in practice.

1. A developer discovers a sample
2. They download the sample to a development machine
3. They install the dependencies for the sample
4. They compile or build the sample
5. They run the sample
6. They interact with the sample
7. They look at the code and change or remove things
8. Back to 6.

For a simple [Sinatra](http://www.sinatrarb.com/) app this would look something like this:

1. Head to Github
2. `git clone` the sample
3. Ensure Ruby and Bundler are installed
4. `bundle install` the dependencies for the app
5. `ruby app.rb` to run the Sinatra app
6. Open the browser, fill in a URL, click a button, type in some account details, etc.
7. Change an API call paramater
8. Back to 6.

## Why samples fail

A lot of things can go wrong when writing a good sample. Here's a few of the main concerns to keep an eye out for.

### Missing or Incorrect Documentation

The simplest mistake to make is to not document the steps above. Especially steps 3, 4, and 6 require a lot of detail to help out a beginner. Any steps missing can be confusing to anyone new to your product (or the language or platform).

### Unnecessarily Complicated Code

When you are trying to show how to use your product on platform X (e.g. Express) then that should be __the only learning objective__ for that sample. Don't add in unnecessary dependencies or technologies. _Just because you use them in all your products doesn't mean a beginner knows what they are._

For example, when you want to show off your product on Express, don't also add in React if not needed. Instead you can provide a series of samples that add more technology to the stack in each sample. In this example you'd have an Express sample followed by a Express+React sample.

### Unnecessary Configuration

Ideally a developer should never need to configure a sample. If your product uses API keys then try to provide test credentials for them to play with. Try to infer all other values from the system environment if possible.

If you really want to provide some flexibility through configuration then ensure that you have sensible defaults for people to get started with. The important thing is to provide an out-of-the-box experience.

### Unidiomatic Code

As a Ruby developer I can often tell when a sample (or an SDK) has been written by a Java developer. Whether it's the use of `CamelCase` instead of `snake_case`, the use of incorrect build tools, or the excessive use of trailing semi-colons.

It is important your code reflects current coding styles and design patterns used by the developers you're trying to target. If your code isn't idiomatic you can alienate the experts and confuse a beginner.

### Unmaintained Code

We all want to write samples once and then leave them behind. Sadly SDKs get updated, APIs change, and even a language's best practices (see Unidiomatic Code) changes. Trying to keep up with these changes can be hard but if these samples are important to your business then maintaining them is important as well.

The real danger of unmaintained samples is that a developer might download it and fail to get it working. At this point their impression of you has been lowered or ruined, possibly leading them to abandon your product.

### Untested

One thing that can help with Unmaintained Code is to provide tests for your samples. I've personally found tests very useful to quickly assess if the SDKs/APIs/sample are still working. It allows me to quickly tell a developer if it's them or us.

One danger of tests is that they can create Unnecessarily Complicated Code in your sample. Be aware of this as finding the right balance is important.

## The Minimum Viable Sample

Based on the problems above I wrote a little checklist for a Minimum Viable Sample (or a Minimum Viable Demo as I used call it). I've used this idea at PayPal for our samples and I intend to use this in the future again.

I intentionally use the term Minimum Viable here as I think I showed above that staying minimalistic is extremely important. Often when I write samples (or review them) I will chip away at the code until only the bare essence of the sample remains.

---

A __Minimum Viable Sample__ ensures that:

1. The sample only has __one (new) learning objective__
1. The code is of __minimal complexity__
1. The code is __idiomatic__
1. The code is __maintained__
1. The code is __tested__
1. The documentation is __complete__ and __correct__
1. The configuration is __minimal__ or non existent

---

To see some good code samples have a look at the [BraintreeDev GitHub page](https://github.com/braintreedev?utf8=%E2%9C%93&query=sample). Although these samples are currently no longer maintained they are what inspired this checklist.

One thing we learned from these samples is that it can be hard to find the right balance. Especially the ones that involved the Mobile SDKs were particularly hard. In these we had to combine the mobile and server-side code into one sample, essentially breaking our first and second rules.

I'd love to know what your approach is to code samples and if you think I missed any rules. I also think a lot of these rules can probably (to a certain degree) be applied to documentation and tutorials as well. Leave me your thoughts in the comments.


text:
FlatSQL
=======

/**
* @author Bastian Christoph
*
* This project implements a SQL helper class that is basically designed
* in order to simplify the SQL notation.
*
* The fact should not be changed, that the SQL formulation is
* kept as flat as possible with a low degree of abstraction
* in order to develop effective methods for bottleneck-identification
* and performance-improvements for database-related applications.
*
* Using the padding character '_' in the names we want to ensure
* intuitive formatting- alignment in the notation.
*
* Intuitively the SQL-clauses should be expandable over IDE-recommendation
*
*/

repository: bchristoph/FlatSQL

repo_name: bchristoph/FlatSQL


text:
Svelte Typescript Postcss Template
====

Template for building basic applications with Svelte, integrated with typescript and postcss.

Build via rollup.

### Get Started

```shell
npm install
npm start

# build
npm run build
```


text:
## General shop management

Discussion of sales-related functions:

![image](https://github.com/EscolaLMS/Cart/assets/108077902/2e130fd5-d336-4c9b-a0e2-c7bb5f1dc220)

**Orders**
After filtering by calendar (date range from and to), product name, or platform user, you can review the order history here, including their status and details such as the amount, exact date of the transaction, etc.

**Payments**
By filtering through the calendar (date range from and to), status, or the option of who the invoice should be created for, similar to the Orders tab, you can view the details of payments processed in the admin panel when a customer makes a purchase of courses, webinars, consultations, etc.

**Vouchers**
These are discounts that can be applied to individual courses or product bundles. More information on this topic is available in a separate section dedicated solely to Vouchers.

**Products**
This is the general category of ALL items eligible for purchase. This means that a created product is something that can be bought (or redeemed for free if it has a price of 0 PLN) and transactions can be carried out through the shopping cart and payments. When adding a course, webinar, or consultation, the administrator has the ability to declare the existence of the aforementioned items as things available for customers to acquire through the Product tab.

## Orders

The Orders tab is located in the expanded Sales list in the menu on the left side. In this section, you can review the list of orders made on the platform.
The view after clicking on Orders looks as follows:

![image](https://github.com/EscolaLMS/Cart/assets/108077902/ff15bef9-9a99-4f57-8913-1ce4ec04eaf7)

Displaying the list of Orders based on criteria:

![image](https://github.com/EscolaLMS/Cart/assets/108077902/e5d0fd78-7cea-41d5-bb59-38099b49d740)

In the Orders tab, there are four options available for filtering the list when you expand the "Expand" section. The options include Date Range, User, Product, and Status.

The Date Range option allows you to view the order history within a specific time range (e.g., the last three weeks).

![image](https://github.com/EscolaLMS/Cart/assets/108077902/b51431c7-6be3-4237-ad13-7481f1cf3503)

The User option displays the order history of a specific platform user.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/95896060-a026-4fc8-9073-6299bba27b49)

The Product option shows the order history of a specific purchased product.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/e98d8ba0-70ef-49ec-ac40-27d4fb9b514c)

The Status filter allows you to search for orders based on their status.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/dc7965f2-db74-4e3a-ac9b-b7930973ac33)

The white Reset button clears the filter fields and shows all groups. The blue Query button initiates the search based on the specified filter parameters. ![image](https://github.com/EscolaLMS/Cart/assets/108077902/28a824fb-da9d-4525-8d19-0343d029453b)

In the Orders view, the following categories are displayed:

![image](https://github.com/EscolaLMS/Cart/assets/108077902/2988f7ca-b051-4f88-b62f-cc6d351bb635)

* ID: The order number
* Created: The date when the order was created
* Subtotal: The net amount paid for the product
* Tax: The VAT tax rate (already provided in PLN, not as a percentage)
* Total: The gross amount paid for the product
* Items: Displays a clickable button with the Product ID: X, indicating the purchased product

![image](https://github.com/EscolaLMS/Cart/assets/108077902/67df8ee8-9909-4510-a986-acd9d6524a70)

* User: Similar to the above, it displays a button with the User ID who made the purchase

![image](https://github.com/EscolaLMS/Cart/assets/108077902/34bdade3-45af-4e6e-b770-9358a05c835f)

* Status: It can have values of **PAID** and **CANCELLED**

## Payments

The next tab after Orders is Payments. In this section, you can review the list of payments made within the platform system.

The view after clicking on Payments is as follows:

![image](https://github.com/EscolaLMS/Cart/assets/108077902/db4c514c-f616-478d-9ae5-5ee0c7e1a78a)

The window is quite similar to the Users and Orders windows.

The Date Range - as mentioned above, allows setting a time range, specifically for payments.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/94312620-dcc9-45fc-97c9-5adcd3ac4949)

Status - we distinguish five statuses: new, paid, canceled, failed, redirect.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/7a9800ed-a3b2-4a43-b45e-ecb09a8efb80)

Additionally, it is possible to sort the results in ascending or descending order using small arrows next to the Payment categories. The categories in Payments are:
* ID - assigned payment number
* Created - date of registering the payment in the admin panel
* Updated - any updates made to this payment on a specific date
* Amount - the nominal amount of the payment
* Currency - the currency name (e.g., PLN, USD)
* Status - can take the values "paid" or "redirect"
* Paid For - indicates the path to which product the payment belongs. Clickable button with the ID of the product for which the payment was made.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/168190ac-0e09-4b2a-ad70-3a430f173269)

## Products

Displaying a list of Products based on criteria

After logging into the Admin Panel, navigate to the Products tab in the left sidebar menu.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/21cc00c0-428c-4ad0-b23b-23ea26f015d9)

Above the area for the list of potential products, there are three display options: Name, Item, Type. There are two additional filters - For Sale and Free. To show them, simply click on the blue "Show more" link.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/6265d1f9-e6f0-47c1-a6b3-ade50ca8b3a8)

Name - this filter works similarly, searching for products containing the entered phrase.
Item - it searches for a specific product from the list based on which PACKAGE it belongs to. We will discuss what a package is in a moment.
Type - it allows filtering either individual products or packages that contain products.
For Sale - it takes values True and False. If a product is added and marked as For Sale in its properties, it should appear on the list when filtering by True.
Free - it also takes values True and False. If no price is specified, the product is considered free and will be displayed when filtered by True.

A single product record is presented as follows:

![image](https://github.com/EscolaLMS/Cart/assets/108077902/b5a9eb2b-4fb4-4b0b-a18c-90b35b3ced29)

* ID, Name - function in the same way as discussed earlier, representing the sequential number of the item and its name.
* Price - the current price of the product.
* Old Price (strikethrough) - an option mentioned during the creation of a Course. It is used to present the product as a promotion after a price reduction.
* Tax Rate - indicates the percentage of VAT included in the product. VAT can be changed to any legally required value.
* Type - takes the value of Single or Package.
* For Sale - discussed above in relation to filters - shows whether the product is available for purchase by customers.
* Items - IDs assigned to a particular product, such as Webinar ID, Course ID, etc.
* Options - editing and deleting products.

## Creating a new product

To add a new product, click on the blue "+ New" button ![image](https://github.com/EscolaLMS/Cart/assets/108077902/5b297c54-0010-46df-b993-e77c66ddd1d1). However, the Admin Panel is designed in such a way that it is much more convenient to add a new Course, Webinar, Consultation, etc. and then the option to add it as a product will appear after confirming such an educational element (it's called a widget - a kind of shortcut in the program).

The process of adding a new product follows a similar structure as described earlier for Courses:

![image](https://github.com/EscolaLMS/Cart/assets/108077902/f2488486-01ce-4a8d-8c7e-a92cf3176b18)

If we add a product from this place instead of using the widget when directly adding a Course, Consultation, etc., there is a new option called "Object assigned to the product." From the list, we can select the educational element that will become a purchasable product.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/2e23df45-c0ce-4683-81be-f0e414b056a5)

After adding multiple individual products to a product bundle, you will see a list of items at the bottom that provides their ID, Name, Type, and the optional quantity that can be set for each item in the bundle.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/a59da947-3952-4448-abdf-6546ab664d15)

The rest of the options are filled out similarly to what was described for the predefined Course. After confirmation, additional tabs will appear, including "Media for the Cart," "Product Categories and Tags," "User Enrollment," "Save User Without an Account," and "Templates." These options are already familiar to us as they were discussed in the context of Courses.

![image](https://github.com/EscolaLMS/Cart/assets/108077902/c65c190c-400c-4c5c-bece-a3503b638af8)

When you want to edit an existing product, you can click on the blue edit button ![image](https://github.com/EscolaLMS/Cart/assets/108077902/3e541d86-9397-46ef-ba39-08131f9f5ac2). The form for editing the product is filled out in the same way as setting the price for an individual item. You can update the product details, such as its name, type, price, tax rate, and other relevant information. The editing process for a product follows the same format as when creating a new product, allowing you to make any necessary changes to the product's configuration.

repository: EscolaLMS/Cart

branch_name: refs/heads/main

gha_language: PHP

repo_name: EscolaLMS/Cart


text:
Nested Editor
=============

Pedigree editor component for [React](http://facebook.github.io/react/).

Actual rendering is done by [Madeline 2.0 PDE](http://madeline.med.umich.edu/).

Example usage:

```javascript
var Nested = require('nested-editor');
var React = require('react');
var ReactDOM = require('react-dom');

var Example = React.createClass({
  componentDidMount: function() {
    this.refs.editor.openDocument('... [ some pedigree ] ...', 'ped');
  },
  render: function() {
    <Nested ref="editor" />
  }
});

ReactDOM.render(<Example />, document.getElementById('content'));
```

Development
-----------

First install [Node.js](https://nodejs.org/). Then install package
dependencies with NPM:

    npm install

A live-reloading development webserver serves an example application when
running:

    npm run dev

Deployment
----------

To compile the component to a bundle, install the package dependencies as
above and run:

    npm run dist

The bundle can now be found in the `dist` subdirectory.

*Warning:* You most probably don't want to use the bundle. Instead, use the
 source package and your own bundling. In the future, the bundle may be a
 simple way to embed the editor in websites without using React.

Style guide
-----------

For JavaScript, we follow the
[Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript). An
ESLint configuration for it can be found in `.eslintrc`.

We transpile JSX and ES6 constructs using Babel. For now, do not use any ES6
features not mentioned below.

### JSX: Multiline JSX

Multiline JSX elements should be in brackets and only have a single indent:

```
return (
  <OverlayTrigger placement="bottom" overlay={tooltip}>
    <Button key="undo" onClick={this.undo}><Icon name="undo" /></Button>
  </OverlayTrigger>
);
```

### ES6: Arrow functions

- Use `function` in the global scope and for `Object.prototype` properties.
- Use `class` for object constructors.
- Use `=>` everywhere else.

Rationale: http://stackoverflow.com/a/23045200

### ES6: Enhanced object literals

Use `{a, b, c}` instead of `{a: a, b: b, c: c}`.

### ES6: Computed property names

Objects with computed property names can directly be written as object
literals:

```
var i = 0;
var a = {
  ["foo" + ++i]: i,
  ["foo" + ++i]: i,
  ["foo" + ++i]: i
};
```

### ES6: Template strings

Use template strings instead of concatentation:

```
var name = "Bob", time = "today";
`Hello ${name}, how are you ${time}?`
```

### ES6: Destructuring assignment

Use simple destructuring patterns for unpacking objects and arrays (including
function arguments) and multiple return values. Some simple examples:

```
var [a, b] = [1, 2];

var o = {p: 42, q: true};
var {p, q} = o;

function g({name: x}) {
  console.log(x);
}
```

This is also the prefered way of importing several module attributes:

```
var {Someting, AnotherThing} = require('definitions/Things');
```


text:
# D3TableFilter - Performance

[D3TableFilter](https://github.com/ThomasSiegmund/D3TableFilter) is a table widget for Shiny built on the [HTML Table Filter Generator](http://tablefilter.free.fr/)  (*TableFilter*) JavaScript library and [D3.js](http://d3js.org/). It tries to be useful for many different applications. In contrast to other widgets, e.g. [DT](http://rstudio.github.io/DT/) it does not provide support for server side paging. Thus it may be not the best choice for large tables where the rendering of the table layout alone is too slow. Tables of up to some ten thousands of cells seem to OK, but your milage may vary, depending on systems used. This app allows you to test different table sizes.

Please check also the other D3TableFilter demo apps:

* [Basic features](https://thomassiegmund.shinyapps.io/basic/)
* [Advance TableFiler features](https://thomassiegmund.shinyapps.io/features/)
* [Colorful tables](https://thomassiegmund.shinyapps.io/colour/)
* [Interactive features](https://thomassiegmund.shinyapps.io/interaction/)
* [Mixed sorting](https://thomassiegmund.shinyapps.io/mixedsort/)

Learn more about the D3TableFilter widget on [github](https://github.com/ThomasSiegmund/D3TableFilter).


text:
JAMES
=====

[![Build Status](https://img.shields.io/travis/hdbeukel/james.svg?style=flat)](https://travis-ci.org/hdbeukel/james)
[![Coverage Status](http://img.shields.io/coveralls/hdbeukel/james.svg?style=flat)](https://coveralls.io/r/hdbeukel/james)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.jamesframework/james/badge.svg?style=flat)](http://search.maven.org/#search%7Cga%7C1%7Corg.jamesframework)

JAMES is a modern object-oriented Java framework for discrete optimization using local search metaheuristics. A wide range of generic optimization algorithms are provided that can be applied to any user-defined problem by plugging in a custom solution type and corresponding neighbourhood. Predefined components are included for subset selection.

### Modules

The JAMES framework consists of several modules (managed as separate git submodules):

 - [JAMES Core Module][core-module]: this module contains the core of the framework. It includes general components for both problem specification and search application. A wide range of generic local search algorithms are provided out-of-the-box, including random descent, steepest descent, tabu search, variable neighbourhood search and parallel tempering. Moreover, the core module contains implementations of specific components for subset selection as well as some specific subset sampling heuristics.

 - [JAMES Extensions Module][extensions-module]: this module extends the core with additional tools for advanced problem specification and search customization. It also provides specific components for some other problem types besides subset selection (e.g. permutation problems) and an automated analysis workflow. Analysis results can be studied and visualized in R using the [JAMES Analysis R package][analysis-R-package].

 - [JAMES Examples Module][examples-module]: this module provides a series of example problem implementations as described at the [website][examples-website].

Dependencies
============

JAMES requires Java 8 or later.

To perform logging, JAMES depends on the [Simple Logging Facade for Java (SLF4J)][slf4j] which is a general
logging API that provides bindings for several popular Java logging frameworks including log4j, JDK 1.4 logging
and logback. To send all log messages generated by JAMES to your favorite logging framework, simply include
the appropriate binding on your classpath as described in the [SLF4J user manual][slf4j-manual]. If no binding is
found, a warning

```
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
```

is printed to the console and all log messages are silently discarded.

Download and install
====================

To get started with JAMES, read the instructions on the [website][getstarted].

Building from source code
=========================

To clone the project including submodules run

```
git clone --recursive https://github.com/hdbeukel/james.git
```

Alternatively, perform a regular non-recursive clone followed by

```
cd james
git submodule init
git submodule update
```

to fetch the submodules. JAMES is built using [Maven][maven], so compiling the source code should be as easy as running

```
mvn install
```

from inside the `james` subdirectory

```
|-- ...
|-- james
  |-- james-core
  |-- james-examples
  |-- james-extensions
  |-- pom.xml
|-- ...
```

assuming that [Maven][maven] has been installed on your computer. This will compile the code, create jar packages and install them in your local Maven repository so that they can be added as dependencies in any other Maven project. After building JAMES, you can also grab the created jar packages from the `target` directory within each module.

For the examples module, an additional jar including all dependencies is created in `james-examples/bin`.
To print an overview of the implemented examples and the corresponding usage information, execute

```
$ cd james-examples/bin
$ java -jar james-examples.jar
```

Documentation
=============

More information, user documentation and examples of how to use the framework are provided at the [website][james-website]. Additional developer documentation is posted on the [wiki][james-wiki].

License and copyright
=====================

All modules of the JAMES framework are licensed under the Apache License, Version 2.0, see http://www.apache.org/licenses/LICENSE-2.0 and the LICENSE and NOTICE files included with each module.

User forum
==========

Users may post questions on the [forum][james-forum]. Instructions for participating without a Google account are available at the [website][james-contact].

Developers
==========

The JAMES framework is developed and maintained by

 - Herman De Beukelaer<EMAIL_ADDRESS>
Please use the forum instead of directly mailing the developers whenever possible, so that others may benefit from or contribute to the discussion as well.

[core-module]:        https://github.com/hdbeukel/james-core
[extensions-module]:  https://github.com/hdbeukel/james-extensions
[examples-module]:    https://github.com/hdbeukel/james-examples
[analysis-R-package]: https://github.com/hdbeukel/james-analysis-R
[examples-website]:   http://www.jamesframework.org/examples
[slf4j]:              http://www.slf4j.org
[slf4j-manual]:       http://www.slf4j.org/manual.html
[maven]:              http://maven.apache.org
[getstarted]:         http://www.jamesframework.org/getstarted/
[james-website]:      http://www.jamesframework.org
[james-wiki]:         http://github.com/hdbeukel/james/wiki
[james-forum]:        https://groups.google.com/forum/#!forum/james-users
[james-contact]:      http://www.jamesframework.org/contact/

repository: brunoguic/james

repo_name: brunoguic/james


text:
# RESS
> Rusty EcmaScript Scanner

[![travis](https://img.shields.io/travis/FreeMasen/RESS.svg)](https://travis-ci.org/FreeMasen/RESS)
[![appveyor](https://img.shields.io/appveyor/ci/FreeMasen/RESS.svg)](https://ci.appveyor.com/project/FreeMasen/sitebuilder)
[![crates.io](https://img.shields.io/crates/v/ress.svg)](https://crates.io/crates/ress)
[![last commit master](https://img.shields.io/github/last-commit/FreeMasen/RESS.svg)](https://github.com/FreeMasen/RESS/commits/master)

A scanner/tokenizer for JS written in Rust

## Usage
There are two main interfaces for using `ress` in your Rust code.

The first is the very simple function `tokenize`, this takes in a `String` and outputs a `Vec<Token>`.

```rust
extern crate ress;

use ress::tokenize;

static &str JS = include_str!("index.js");

fn main() {
    let tokens = tokenize(JS);
    it !tokens.iter().any(|t| t.is_punct_with(";")) {
        panic!("No semi-colon!? You nave!");
    } else {
        println!("At least you are sane at one point");
    }
}

```

The other option is to create a `Scanner`, an iterator over the `Item` struct. `Item` has two fields `token` for the `Token` found and `Span` for the position in the string.
```rust
extern crate ress;

use ress::{Scanner};

const &str JS = include_str!("index.js");

fn main() {
    let s = Scanner::new(JS);
    for token in s {
        if token.is_punct_with(";") {
            panic!("A semi-colon!? Heathen!");
        }
    }
    println!("Good show! Why use something that's optional?")
}
```

In either method the major construct that you would be dealing with is a `Token` enum. This enum represents the 10 different tokens defined in the ECMAScript specification.

### ES Tokens
- Boolean Literal
- End of File
- Identifier
- Keyword
- Null Literal
- Numeric Literal
- Punctuation
- String Literal
- Regular Expression Literal
- Comment

In its current state it should be able to tokenize any valid JavaScript (I believe the testing is all currently done on ES3 packages). Keep in mind that keywords have been moving around a lot in JS between ES3 through ES2019 so you might find some items parsed as keywords in the ES2019 context that are not in the ES3 context and since my goal is keep this scanner context free this should be dealt with at a higher level. A good example of this is `yield` which is sometimes a keyword and sometimes an identifier, this package will always parse this as a Keyword.

For each of the token cases there is either a struct or enum to provide additional information with the exception of `NullLiteral` and `EoF` which should be self explanatory. The more complicated items do implement `ToString` which should get you back to the original js text for that token. The `Token` enum also provides a number of helper functions for building that picture without pulling the inner data our of the enum. Using the `Punct` case as an example the helper functions look like this
```rust
fn is_punct(&self) -> bool;
fn matches_punct(&self, p: Punct) -> bool;
fn matches_punct_str(&self, s: &str) -> bool;
```
A similar set of functions are available for each case. Be aware that some `_str` implementations panic if the wrong string is provided meaning these would also panic.
```rust
let p = Token::Punct(Keyword::This);
if p.matches_keyword_str("junk") {
    // panic!
}
if p.matches_keyword(Keyword::This) {
    // Don't panic!
}
```

Like all `Iterators` the `Scanner` has a `next`, I have also implemented a `look_ahead` method that will allow you to parse the next value without advancing. Using this method can be a convenient way to get the next token without performing a mutable borrow, however you will be incurring the cost of parsing that token twice. All `Iterators` implement `Peekable` that will convert them into a new iterator with a `peek` method, this will allow you to look ahead while only paying the cost once however `peek` performs a mutable borrow which means it needs to be in a different scope than a call to `next`.
```rust
// look_ahead
let js = "function() { return; }";
let mut s = Scanner::new(js);
let current = s.next();
let next = s.look_ahead();
let new_current = s.next();
assert_eq!(next, new_current);
// peekable (fails to compile)
let p = Scanner::new(js).peekable();
let current = s.next(); // <-- first mutable borrow
let next = p.peek(); // <-- second mutable borrow
```

For more intense lookahead scenarios `Scanner` makes available the `get_state` and `set_state` methods. These methods will allow you to capture a snapshot of the current position and any context, and then later reset to that position and context.

```rust
let js = "function() {
    return 0;
};";
let mut s = Scanner::new(js);
let start = s.get_state();
assert_eq!(s.next().unwrap().token, Token::Keyword(Keyword::Function));
assert_eq!(s.next().unwrap().token, Token::Punct(Punct::OpenParen));
assert_eq!(s.next().unwrap().token, Token::Punct(Punct::CloseParen));
s.set_state(start);
assert_eq!(s.next().unwrap().token, Token::Keyword(Keyword::Function));
```

## Why?
Wouldn't it be nice to write new JS development tools in Rust? The (clear-comments)[https://github.com/FreeMasen/RESS/blob/master/examples/clear-comments/src/main.rs] example is a proof of concept on how you might use this crate to do just that. This example will take in a JS file and output a version with all of the comments removed. An example of how you might see it in action is below (assuming you have a file called in.js in the project root).
```sh
$ cargo run --example clear-comments -- ./in.js ./out.js
```

Ideally this project will be the starting point for building a full JS Abstract Syntax Tree (AST) in Rust. The next step would be to build a companion crate that will raise the tokens into a full (AST) ([work in progress](https://github.com/freemasen/resp)). And once we have an AST building JS dev tools in rust would be significantly easier.

# Performance
I am sure there are a lot of low hanging fruit in this area.
The below stats are from running `cargo +nightly bench` on a Dell XPS 13 9350 (2.3ghz i5-6200U & 8bg RAM).

|Lib           |Size     |Time     |+/-     |
|---           |---      |---      |---     |
|Angular 1.5.6 |1.16mb   |333.33ms |17.29ms |
|jquery        |271.75kb |171.48ms |73.16ms |
|React         |59.09kb  | 24.60ms | 4,83ms |
|React-dom     |641.51kb |288.60ms |25.61ms |
|Vue           |289.30kb |187.04ms |60.05ms |

If you are interested in getting an idea about performance without waiting for `cargo bench` to complete you can run the following command.

```sh
$ cargo run --example major_libs
```

# Contributing

[see contributing.md](https://github.com/FreeMasen/RESS/blob/master/CONTRIBUTING.md)

repository: tommilligan/RESS

repo_name: tommilligan/RESS


text:
# data_explorer_service

DataExplorerService - JavaScript client for data_explorer_service
API Service that reads from Elasticsearch.
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 0.0.1
- Package version: 0.0.1
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/),
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install data_explorer_service --save
```

#### git
#
If the library is hosted at a git repository, e.g.
https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:

```shell
    npm install GIT_USER_ID/GIT_REPO_ID --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var DataExplorerService = require('data_explorer_service');

var api = new DataExplorerService.DatasetApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.datasetGet(callback);

```

## Documentation for API Endpoints

All URIs are relative to *https://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DataExplorerService.DatasetApi* | [**datasetGet**](docs/DatasetApi.md#datasetGet) | **GET** /dataset |
*DataExplorerService.ExportUrlApi* | [**exportUrlPost**](docs/ExportUrlApi.md#exportUrlPost) | **POST** /exportUrl |
*DataExplorerService.FacetsApi* | [**facetsGet**](docs/FacetsApi.md#facetsGet) | **GET** /facets |
*DataExplorerService.SearchApi* | [**searchGet**](docs/SearchApi.md#searchGet) | **GET** /search |

## Documentation for Models

 - [DataExplorerService.DatasetResponse](docs/DatasetResponse.md)
 - [DataExplorerService.ExportUrlRequest](docs/ExportUrlRequest.md)
 - [DataExplorerService.ExportUrlResponse](docs/ExportUrlResponse.md)
 - [DataExplorerService.Facet](docs/Facet.md)
 - [DataExplorerService.FacetsResponse](docs/FacetsResponse.md)
 - [DataExplorerService.SearchResponse](docs/SearchResponse.md)
 - [DataExplorerService.SearchResult](docs/SearchResult.md)

## Documentation for Authorization

 All endpoints do not require authorization.

repository: DataBiosphere/data-explorer

repo_name: DataBiosphere/data-explorer


text:
# Hubitat Apps and Device Handlers for X-10 Devices using Mchad or Heyu with Node Red bridge
![Image of Logo](https://github.com/enishoca/SmartThingsX/raw/master/x1oredb.png)

This solution allows 2-way communication between Hubitat and X-10 devices using Node Red and Mochad.  You can control your X-10 devices from within HE and use various automation solutions within HE.  You can also use X-10 remotes and motion sensors to control other devices.   X-10 equipment is fairly inexpensive and  readily available on E-Bay etc.

In this solution all X-10 settings and device mappings are done using the Hubitat app. Only a couple of one-time settings need to be made on the Node Red flow.

Hubitat Community page
https://community.hubitat.com/t/release-x-10-devices-using-mchad-or-heyu-with-node-red-bridge/14628

Orginal ST page for details and user discussions
https://community.smartthings.com/t/release-node-red-bridge-for-x-10-devices-switches-modules-remotes-motion-sensors/116909

 ***Changes from ST Version***
 * Uses telnet connections for more robust connectivity between node red server and HE.  The default TCP port is 1025, you may need to change it, if its not available on the machine where you are running the node red server
 * Device P-15 is reserved for pinging the system to maintain connectivtiy every 30 minutes.  If you need to use this device for something else you can change it in x-10-node-red-mochad-device.groovy
* *Heyu functionality has **NOT** been tested,* since I don't have a heyu device. For ST a heyu user worked with me to do the implementation. If anyone is interested ping me, if you can compare it code and make the changes yourself, feel free to send me a PR

***Supported Devices and Functionality***
* X-10 Switches and Modules -  on/off and dimming are supported
* X-10 Motion Senors and Remote buttions -  on/off funtions supported from devices sending housecode/unitcode on/off commands
* X-10 Security Devices

Please note: Dimmer functions are a bit wonky - don't rely too much on percentage just treat them like up/down buttons becaue that's what is available on physical X-10 devices.  You can get percentages almost right, if you caliberate by setting to 0 and physically dimming to dark, but it remains dicey, there is no good solution to it.

**Requirements**

Raspberry Pi

These instructions are for Raspberry Pi, but they can be easily adapted to any Linux variant

Mochad and CM15A or CM19A USB Devices

Mochad exposes a TCP interface to X-10 commands, and can run on any linux system including Raspberry PI. It uses CM15A or CM19A USB devices to communicate with X-10 over RF or powerline. Using these devices you are not limited to a single house code, you can use any of the 15 house code with any x-10 device.
https://bfocht.github.io/mochad/
https://bfocht.github.io/mochad/mochad_reference.html

Node Red

Node-RED is a programming tool for wiring together hardware devices, APIs and online services using a browser-based editor.  Node Red is very simple to deploy and is very light-weight. Requires very little effort to setup and run
https://nodered.org/
https://nodered.org/docs/hardware/raspberrypi

Setup
-------------------------------------
**Step 1: Install Mochad on Raspberry Pi**

Follow any number of tutorials to setup your Raspberry Pi using your favorite distro, make sure you install the development tools. On Raspbian you can do this using the following command

> sudo apt-get install build-essential

***Build mochad***

* Install libusb-1.0.0 development files. mochad will not build without this.

  > $ sudo apt-get install libusb-1.0-0-dev

* Get mochad source code and unpack it.

  > $ wget -O mochad.tgz http://sourceforge.net/projects/mochad/files/latest/download
  > $ tar xf mochad.tgz
  > Now build mochad.
  > $ cd mochad*
  > $ ./configure
  > $ make
  > $ sudo make install

* Edit /etc/udev/rules.d/91-usb-x10-controllers.rules change the following line to :

  > RUN+="/usr/local/bin/mochad &"

  This ensures that mochad will load whenever the usb device is detected, include when Raspberry pi reboots

 ***Blink a lamp***

  * Plug in a CM15A, CM19A, or CM15Pro into a Raspi USB port.  Connect a lamp to X10 module set for address A1.
* If using a CM15A or CM15Pro try the following power line (pl) commands.
    > $ echo "pl a1 on" | nc localhost 1099
    > $ echo "pl a1 off" | nc locahost 1099

* If using a CM19A try the following radio frequency (rf) commands.
  > $ echo "rf a1 on" | nc localhost 1099
  > $ echo "rf a1 off" | nc localhost 1099

  At this point you should make a list of commands that you need to turn your X-10 devices on and off, you will need this later.

  ***credit - http://x10linux.blogspot.com/2012/08/installing-mochad-on-raspberry-pi.html***

**Step 2: Install & Setup Node Red**

 ***Install Node Red***
Follow the instructions on this page to install Node Red on your Pi https://nodered.org/docs/hardware/raspberrypi
Play around a little bit to get the hangs of the basics

 ***Setup Node Red***

* [For Mochad] Copy the contents of hubitat-x10.mochad.flow.json to the clipboard from https://raw.githubusercontent.com/enishoca/Hubitat/master/X-10Bridge/node-red-flows/hubitat-x10-mochad.flow.json

* [For Heyu - untested] Copy the contents of hubitat-x10.heyu.flow.json to the clipboard from https://raw.githubusercontent.com/enishoca/Hubitat/master/X-10Bridge/node-red-flows/hubitat-x10-heyu.flow.json

* Browse to the Node Red page on your browser

* Click on the menu to right and select Import->Clipboard

* Copy the contents of the clipboard in the edit box, select 'new flow' and import it

* Verify the listening port 1025 is free on the node-red machine, if not change the port in the first node to any other free port, you will need to configure ths in the Hubitat app later

* Edit the flow and put the hostname for the mochad server, and the file path for the settings file.  If you are running node red as user pi and mochad is running on the same machine, you wouldn't need to make any changes.

* Next Deploy the flow to activate it.

**Step 3: Add the Apps and Drivers Code in Hubitat**
You will need to install the following Apps and Drivers in the appropriate sections - make sure you install all of them

* [App] x-10-node-red-bridge.groovy - https://raw.githubusercontent.com/enishoca/Hubitat/master/X-10Bridge/apps/x-10-node-red-bridge.groovy
* [App] x-10-node-red-button-child.groovy - https://raw.githubusercontent.com/enishoca/Hubitat/master/X-10Bridge/apps/x-10-node-red-button-child.groovy
* [App] x-10-node-red-switch-child.groovy - https://raw.githubusercontent.com/enishoca/Hubitat/master/X-10Bridge/apps/x-10-node-red-switch-child.groovy
* [App] x-10-node-red-security-child.groovy - https://raw.githubusercontent.com/enishoca/Hubitat/master/X-10Bridge/apps/x-10-node-red-security-child.groovy
* [Driver] x-10-node-red-device.groovy - https://github.com/enishoca/Hubitat/blob/master/X-10Bridge/drivers/x-10-node-red-device.groovy
* [Driver] x-10-node-red-mochad-device.groovy - https://raw.githubusercontent.com/enishoca/Hubitat/master/X-10Bridge/drivers/x-10-node-red-mochad-device.groovy

**Step 4: Add App to Hubitat and configure  X-10 devices**

* Add the X-10 Node Red Bridge Parent App in the Apps section in Hubitat IDE using 'Add Usser App' functionality.  You will need to select the hub and configure IP address and port for the Node Red server - this should be the same IP address you use to connect to Node Red on the browser. Port is specified in the first node in the flow, it defaults to 1025 - ensure that you are using the same port on both sides

* You can then add X-10 devices in Hubitat and set their X-10 addresses.
Once you add a switch you should be able to turn it on and off.  You can map remote buttons and motion sensor address to any device that supports on/off function and control it.

repository: enishoca/Hubitat

repo_name: enishoca/Hubitat


text:
---
title: FAQs
permalink: /wphl/owph-faq
third_nav_title: All Other Work Pass Holders Employed by Companies, and Their Dependants
---

## Frequently Asked Questions

### 1. My pass holders have recovered from COVID-19, when can I bring them into Singapore?

For pass holders who have recovered from COVID-19, they should only depart for Singapore at least 21 days after their first positive COVID-19 polymerase chain reaction (PCR) test. Otherwise, they will be denied boarding on flights to Singapore.

If the pass holder’s first positive COVID-19 PCR test was taken on 1 March 2021, he/she can only depart for Singapore from 22 March 2021.

Pass holders should not travel if feeling unwell.

### 2. Who is responsible for the costs of the work pass holder’s entry approval requirements, including COVID-19 tests, transport and SHN accommodation, as applicable?

    Type of employee
    Purpose of travel
    Who is responsible for the costs

    Existing work pass holders returning from overseas
    Left Singapore for work
    Employers must bear the costs in full and are not allowed to pass on any cost to the employees.

    Left Singapore for personal reasons
    Employers and employees should come to a mutual agreement on who bears the costs or how to share them. This also applies to employees coming in under the Periodic Commuting Arrangement (PCA) scheme.

New work pass holders on in-principle approvals
Plan to enter Singapore for employment
For Work Permit holders, employers must bear the costs in full and are not allowed to pass on any cost to the employees.

For other work passes, employers and employees should come to a mutual agreement on who bears the costs or how to share them.

### 3. My pass holders have obtained an entry approval to enter Singapore. However, I wish to change their arrival date or no longer want to bring them in. Can I ask for a refund of the charges paid?

For us to consider a refund, please submit a request to cancel the entry approval at least 7 days before the pass holder's approved arrival date to Ministry of Manpower (MOM) using the relevant link below.

Note: The approved arrival date is the middle date stated on the entry approval letter or email. E.g. if the pass holder is allowed to enter Singapore from 1 May to 3 May, the approved arrival date is 2 May.

Foreign employees employed by companies and their dependants

Work Holiday Pass holders

Personalised Employment Pass holders (without employers) and their dependants

EntrePass holders (without Corppass) and their dependants

Once the entry approval is cancelled, you can submit another entry application with a new arrival date to bring them in. The new application will be subject to the prevailing entry controls.

### 4. What should I do if my pass holder falls sick during their SHN?

    If your pass holder is serving SHN at a
    You should

    Dedicated SHN facility

 Inform the staff there to assist in making the necessary arrangements.

 If your pass holder develops a fever or acute respiratory infection, get them to inform MOM using the FWMOMCare app.

    Another place

(For non-emergency medical situations) Get your pass holder to call the SafeTravel Helpline at 6812 5555.

(For medical emergencies) Get your pass holder to call 995.

 If your pass holder develops a fever or acute respiratory infection, get them to inform MOM using the FWMOMCare app.

### 5. Can MOM extend or renew work passes nearing expiry if the foreign employees cannot return to Singapore because of the travel restrictions?

We advise employers to submit a new work pass application for such workers after the situation stabilises.

### 6. Can employers get a levy waiver if their Work Permit or S Pass holder is quarantined?

Employers can get a levy waiver for Work Permit or S Pass holders who are given quarantine orders by MOH, as it is a form of hospitalisation leave.

Apply for levy waiver

### 7. Can employers get a levy waiver for Work Permit or S Pass holders who went on home / overseas leave?

For employees on home or overseas leave, employers can apply for levy waiver (for up to 60 days) when the employees return to Singapore.

### 8. Can employers send their pass holders for any issuance-related procedures (e.g. medical examination, finger-printing, Settling-In-Programme or safety courses) during the SHN?

No, pass holders must complete their SHN before their employers can send them for any of the above-mentioned issuance-related procedures. If their Short-Term Visit Passes (STVP) are expiring soon, for:

Employment Pass, S Pass, Dependant’s Pass or Long Term Visit Pass holders, please request for time to do the issuance while the pass holders serve SHN. Submit your request within 1 week before the STVP expires.

Work Permit holders, the validities of their STVPs and in-principle approvals will be automatically extended by 2 weeks. Please note that no letters will be issued for this extension.

MOM will not hesitate to take enforcement measures against any parties who do not comply with the SHN requirements. Measures include criminal proceedings, work pass revocations and withdrawal of work pass privileges.

### 9. My pass holders intend to travel out of Singapore. What risks should I consider and how should I advise them?

Please discourage your pass holder from going overseas as the country he/she is visiting may have travel restrictions. Thus, there could be significant delays before he/she can return to Singapore.

For all pass holders, new and existing, entering Singapore from 1 January 2021, the Government will no longer cover their treatment costs if they develop COVID-19 symptoms or test positive within 14 days of arrival in Singapore. This is regardless of when they left Singapore.

Find out who is responsible for the treatment costs.

### 10. I encountered technical issues when completing the application form. What should I do?

Please refer to the common troubleshooting FAQ here.

If the troubleshooting FAQ does not address your queries, you can contact us here.

### 11. I did not receive the entry application outcome for my pass holder. What should I do?

Please check your spam and junk folders in case the outcome was sent there.

Contact us here if you cannot find the outcome email in these folders.

repository: nyp-fionalim/govtech-stp

repo_name: nyp-fionalim/govtech-stp


text:
# serum-level

A very simple drug blood serum level calculator, written in Flask.

An instance should be available at http://serum-level.herokuapp.com/

# Disclaimer

I am not a doctor. This is just a quick-and-dirty approximate thing which should only be used for informational purposes and does not constitute medical advice.

# Running locally

```bash
pipenv --three install
pipenv run flask run
```

then point your browser to http://localhost:5000

repository: fluffy-critter/serum-level

gha_language: HTML

repo_name: fluffy-critter/serum-level


text:
![](https://www.hedera.com/logo-capital-hbar-wordmark.jpg)

# Overview

Welcome to the Hedera Partner Program. By partnering with Hedera, you can build and grow a successful business and deliver customer success.

Build ecosystem tools and solutions that integrate with Hedera or offer consultation services to help your customers reach their full potential.

This handbook offers information and resources to ensure all Hedera partners bring value to customers and grow their business.

To join the Hedera partner program, fill out this form. The Hedera partnerships team will reach out to schedule onboarding
and enablement meetings with you and your team.

## Decentralization memorandum

Being a public DLT network, one of Hedera's superpowers lies in the power of its community.

We believe that together we can deliver a future where decentralized technologies reach their potential through community contribution.

In the spirit of this ideology, we call for your support in building the best Partner onboarding experience.

This guide is a living document that evolves with the community. We encourage you to give us feedback on this document and contribute to it.

# What makes a successful Hedera Partner?

Our most successful SI Partners build a Hedera-centric services practice, which Hedera customers can leverage to allow customers to get the most value out of Hedera.

The long-term success of Hedera Partners lies in two main areas - the development of strong service capabilities and participation in the Hedera community ecosystem.

# Partner Definitions

The official partner program consists of 3 partner categories:

- **Systems Integrators**: Systems integrators offer consulting and implementation services to support clients using Hedera Hashgraph across a wide range of application use cases. Hedera is committed to making it as easy as possible for systems integrators to build a profitable business through the implementation of Hedera Hashgraph.
- **Technology Partners**: Technology Partners help further decentralize the development of tools and services within the Hedera ecosystem. This includes features and functionalities found in the Hedera Services Code, as well as complementary tools that support application development, ease of use, network interoperability, and more.
- **Enterprise Applications**: Enterprise organizations are embracing disruption by incorporating Hedera Hashgraph into their ERP, CRM, EAM, HCM, and other SaaS offerings to deliver the benefits of decentralization. Join Hedera as an Enterprise Application Partner for exclusive access to technical development and architectural support, marketing, and thought leadership opportunities through the Hedera Enterprise Alliance.

# What is the Hedera Opportunity for Partners?

Hedera is the most used enterprise-grade public network with hundreds of thousands of users and 1.5 billion mainnet transactions processed to date. Hedera is more than just a DLT platform. It's a movement aiming to reinvent decentralized governance at scale.

As Partners develop their relationship with the Hedera ecosystem, they get numerous opportunities to take advantage of:

- Sales Support
- Technical Enablement
- Lead Sharing
- Personalized Demos
- Badges and Certification
- Sales Enablement
- Partner Directory listing
- Hedera User Group access
- Hedera Partner Discord access
- Council introductions
- Case studies build support
- Go-to-market initiatives (account planning, marketing events, and campaigns, conferences, etc.)

Our Business Development and Developer Advocacy teams are here to help you accelerate your services business centered around Hedera.

# Developing a Hedera Services Practice

Professional Services can become a major source of revenue for Partners as they help the Hedera ecosystem deploy, integrate and optimize their Hedera-based solutions.

Hedera heavily invests in expanding the ecosystem and raised awareness about the benefits and use-cases for its platform. We see many new organizations joining the Hedera ecosystem daily, and they require support, implementation consultancy, and hands-on technical skills to enable their solutions.

Below are the three steps Partners should take to get started with developing their Services practice:

## Step 1: An introduction to Hedera Hashgraph

Here's a quick list of resources to get started with Hedera:

### General information:

- What is Hedera?
- Learn about Hedera mission and values
- How it works
- Hashgraph Consensus Algorithm
- Hedera Services
- Ecosystem Overview
- Hedera Wallets
- Hedera Roadmap
- Explore our Github

### Documentation, tutorials, and demos:

- Create testnet accounts for you and your team
- Follow the Introduction tutorial
- Learn more about Hedera Testnets, Mainnet and Mirrornet
- See Hedera in practice in our Demo Applications
- Go through more advanced tutorials to further develop your capabilities or check out our starter projects to start building your Hedera-based solution

## Step 2: Onboarding call with your Developer Advocate and Business Development representatives

Schedule a time that works for you and your team - we would love to get to know you better! Reach out to<EMAIL_ADDRESS>to set up a meet and greet session.

## Step 3: Technical enablement and support channels

- Sign up for YouTube and Twitter updates
- Join our Discord server
- Missing a feature or have some product feedback? Learn about Hedera Improvement Proposals process
- For any other questions - reach out at<EMAIL_ADDRESS>
## Advancing your Hedera development capabilities

- Hedera Consensus Service (HCS)
  - Documentation: Hedera SDK
- Hedera Token Service (HTS)
  - Documentation: Hedera SDK
  - Integrating a HTS Token tutorial
  - One-click HTS Demo
- Hedera File Service (HFS)
  - Documentation: Hedera SDK
- Mirror Nodes
  - Documentation
  - Community Mirror Nodes

## Advancing your Hedera sales capabilities

### Sales tools

Repo with presentations/sales materials for Hedera and its services

### Partner and product case studies

### Functional use cases

- Data Integrity
- Decentralized Identity
- Fungible Tokenization (FT)
- Non-Fungible Tokenization (NFT)
- Payments
- CBDC
- Permissioned Blockchain
- DAO
- DLT Interoperability

### Areas of focus

- Advertising
- Agriculture
- Collectables
- Data & Privacy
- Developer Tools
- Education
- Energy
- Financial Services
- Gaming
- Gig Economy
- Government
- Healthcare
- Identity
- Internet of Things
- Multimedia & Entertainment
- Network Explorer
- Oracles
- Regulation
- Retail
- Security
- Social Media
- Social Good
- Sports
- Supply Chain
- Sustainability

### Fee estimator tool

Hedera's fee schedule is set by the Hedera Governing Council and always based in US Dollars,
paid in HBAR - this makes it easy to estimate the cost of API calls. Use the Transaction Fee Estimator
to set your parameters and estimate the cost of transactions on the Hedera network.

## Stay up-to-date

- Join our Developer Discord to engage with the developer community and Hedera engineering
- Attend our monthly Virtual Meetup and Engineering Insights webinar
- Read the Hedera Blog
- Watch presentations and product announcements on the Hedera YouTube Channel
- Follow us on Twitter @Hedera
- Marketing support: Hedera is here to help promote your completed projects. Ask one of our DAs about how to get your success highlighted in Hedera ecosystem!

## Marketing

- Brand Guidelines

## Contribution

Please help us make this guide better! If you see some improvements or additional information that should be published in this handbook - please create a new issue and/or create a new PR.

# License

[Apache License 2.0](https://github.com/hashgraph/partners-handbook/blob/main/LICENSE)

repository: hashgraph/partners-handbook

repo_name: hashgraph/partners-handbook


text:
# Backbone Retry Sync

Backbone Retry Sync is a plugin for [Backbone.js](http://backbonejs.org/) that allows models and collections to retry failed sync operations up to a configurable limit.

## Requirements

* Backbone.js 1.1.2+
* jQuery 2.1.3+

## Installation

It is recommended to use [Bower](http://bower.io/) for installation as follows:

```
    bower install --save backbone-retry-sync
```

## Usage

By default, Retry Sync will attempt to use Backbone.Sync with limit of 3 requests per instantiated model/collection.

This is configurable by setting annotations in your model/collection's initialize function.

Two annotations are currently supported:

* "retrySyncEngine" - Allows you to specify a custom sync function. If unspecified, then the default is Backbone.sync.

* "retrySyncLimit" - Allows you to specify the maximum number of times to retry a sync operation. If unspecified, then the default is 3.

For example:

```
var MyFancyModel = Backbone.Model.extend({
    initialize: function() {
        this.retrySyncEngine = MyFancySyncLibrary.sync;
        this.retrySyncLimit = 3;
    },
    sync: Backbone.RetrySync,
});
```

## Contributions

Contributions and feedback are welcome! Please open an issue or send a pull request.

repository: walterscarborough/backbone-retry-sync

repo_name: walterscarborough/backbone-retry-sync


text:
Pattern: Malformed indentation for access modifier

Issue: -

## Description

Modifiers should be indented as deep as method definitions, or as deep
as the `class`/`module` keyword, depending on configuration.

## Examples

```ruby
# EnforcedStyle: indent (default)

# bad
class Plumbus
private
  def smooth; end
end

# good
class Plumbus
  private
  def smooth; end
end

# EnforcedStyle: outdent

# bad
class Plumbus
  private
  def smooth; end
end

# good
class Plumbus
private
  def smooth; end
end
```

## Default configuration

Attribute | Value
--- | ---
EnforcedStyle | indent
SupportedStyles | outdent, indent
IndentationWidth |

## Further Reading

* [RuboCop - Layout/AccessModifierIndentation](https://docs.rubocop.org/rubocop/cops_layout.html#layoutaccessmodifierindentation)
* [https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected](https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected)

repository: Adroiti/docs-for-code-review-tools

repo_name: Adroiti/docs-for-code-review-tools