text:
---
page_title: "Basic Usage - Synced Folders"
sidebar_current: "syncedfolder-basic"
---

# Basic Usage

## Configuration

Synced folders are configured within your Vagrantfile using the
`config.vm.synced_folder` method. Usage of the configuration directive
is very simple:

```ruby
Vagrant.configure("2") do |config|
  # other config here

  config.vm.synced_folder "src/", "/srv/website"
end
```

The first parameter is a path to a directory on the host machine. If
the path is relative, it is relative to the project root. The second
parameter must be an absolute path of where to share the folder within
the guest machine. This folder will be created (recursively, if it must)
if it doesn't exist.

## Enabling

Synced folders are automatically setup during `vagrant up` and
`vagrant reload`.

## Disabling

Shared folders can be disabled by adding the `disabled` option to
any definition:

```ruby
Vagrant.configure("2") do |config|
  config.vm.synced_folder "src/", "/srv/website", disabled: true
end
```

## Modifying the Owner/Group

By default, Vagrant mounts the synced folders with the owner/group set
to the SSH user. Sometimes it is preferable to mount folders with a different
owner and group. It is possible to set these options:

```ruby
config.vm.synced_folder "src/", "/srv/website",
  owner: "root", group: "root"
```

repository: mprzytulski/vagrant

gha_language: Ruby

repo_name: mprzytulski/vagrant


text:
# Side-by-Side Settings

A Sublime Text plugin for viewing default and user settings side by side in a
new window. It also works for key bindings and plug-in specific settings, making
it much easier to configure Sublime Text.

## Installation

### By Package Control

1. Download & Install **`Sublime Text 3`** (https://www.sublimetext.com/3)
1. Go to the menu **`Tools -> Install Package Control`**, then,
    wait few seconds until the installation finishes up
1. Now,
    Go to the menu **`Preferences -> Package Control`**
1. Type **`Add Channel`** on the opened quick panel and press Enter
1. Then,
    input the following address and press Enter
    ```
    https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json
    ```
1. Go to the menu **`Tools -> Command Palette...
    (Ctrl+Shift+P)`**
1. Type **`Preferences:
    Package Control Settings – User`** on the opened quick panel and press Enter
1. Then,
    find the following setting on your **`Package Control.sublime-settings`** file:
    ```js
    "channels":
    [
        "https://packagecontrol.io/channel_v3.json",
        "https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json",
    ],
    ```
1. And,
    change it to the following, i.e.,
    put the **`https://raw.githubusercontent...`** line as first:
    ```js
    "channels":
    [
        "https://raw.githubusercontent.com/evandrocoan/StudioChannel/master/channel.json",
        "https://packagecontrol.io/channel_v3.json",
    ],
    ```
    * The **`https://raw.githubusercontent...`** line must to be added before the **`https://packagecontrol.io...`** one, otherwise,
      you will not install this forked version of the package,
      but the original available on the Package Control default channel **`https://packagecontrol.io...`**
1. Now,
    go to the menu **`Preferences -> Package Control`**
1. Type **`Install Package`** on the opened quick panel and press Enter
1. Then,
    search for **`SideBySideSettings`** and press Enter

See also:

1. [ITE - Integrated Toolset Environment](https://github.com/evandrocoan/ITE)
1. [Package control docs](https://packagecontrol.io/docs/usage) for details.

## Usage

`{ "keys": ["ctrl+k", "ctrl+s"], "command": "sxs_settings" }`

Side-by-Side Settings adds three new commands to the command palette:

* **Side-by-Side: Select a File** - Opens a panel displaying all of the `.sublime-settings` and `.sublime-keymap` files in the Sublime Text environment
* **Side-by-Side: Sublime Settings** - Opens both default and user Sublime Text settings side by side in a new window
* **Side-by-Side: Sublime Key Bindings** - Opens both default and user Sublime Text key bindings side by side in a new window

#### Select a File Command

The "select a file" command opens a quick panel that displays all of the
`.sublime-settings` and `.sublime-keymap` files that Sublime Text knows about
(note that files located in the `Packages/User` directory are filtered out of
this list; more on why it does this in a second). When a file in the quick panel
is selected, it becomes the "left" panel in the comparison window. The "right"
panel will contain the corresponding user settings file, typically located in
the `Packages/User` directory (hence why files in `User` are filtered out).

Side-by-Side Settings tries to do the correct thing depending on the file you
select in the quick panel. If the file you select is a platform-specific
settings file (e.g. `Default/Preferences (Windows).sublime-settings`), the
corresponding user file that gets opened will be `Preferences.sublime-settings`
(in the `Packages/User` directory). This is due to the fact that platform-
specific files in the `User` directory are ignored by Sublime Text. Likewise, if
you select any `.sublime-keymap` file, the appropriate platform-specific
`.sublime-keymap` file in the `User` directory will be opened.

#### Default Keyboard Shortcut

By default, the key-chord `Ctrl+K, Ctrl+S` is bound to the "select a file"
command. If you wish to bind any of the commands to a different key, here are
the internal command names to use:

* sxs_select_file
* sxs_settings
* sxs_key_bindings

Here's an example key binding:

`{ "keys": ["ctrl+k", "ctrl+s"], "command": "sxs_settings" }`

## Plug-in Settings

Side-by-Side Settings currently supports the following plug-in specific
settings:

**filter_platform**: When enabled, platform specific files that do not match
your current platform are filtered out of the files shown in the file selection
panel. Defaults to true.

**hide_minimap**: Specifies whether the minimap should be displayed or not when
opening a side-by-side session. Defaults to false.

**open_in_distraction_free**: This option allows the side-by-side window to open
in distraction free mode, essentially resulting in a full-screen window. This
option defaults to false.

## Reporting Bugs & Suggesting Features
If you spot a bug in this plug-in, or you have a feature request, please open an
issue over on the [issues page](https://github.com/jgbishop/sxs-settings/issues)
at GitHub.

## License
See the `LICENSE` file under this repository.

## Acknowledgements
My thanks to the following folks:

* Jeremy Bolding for providing several plug-in suggestions.
* Ben Felder for suggesting the filter_platform option.

license: MIT

repository: evandroforks/SideBySideSettings

branch_name: refs/heads/master

extension: md

gha_language: Python

gha_license_id: MIT

license_type: permissive

repo_name: evandroforks/SideBySideSettings


text:
---
title: "Apache Camel 3.20 What's New"
date: 2022-12-21
authors: [davsclaus, essobedo]
categories: ["Releases"]
preview: Details of what we have done in the Camel 3.20 release.
---

Apache Camel 3.20 has just been [released](/blog/2022/12/RELEASE-3.20.0/).

This release introduces a set of new features and noticeable improvements that we will cover in this blog post.

## Camel Core

The Split EIP has been optimized to perform faster and reduced overhead when splitting by a String literal or a regular expression.

When working with EIPs you may want to temporarily disable one or more EIPs. Today you have to comment out code, or remove the EIPs.
We have now introduced the `disabled` option which you quickly can enable on EIPs to turn off.
The Rest DSL also has the new `disabled` option to quickly turn off specific Rest endpoints/verbs.

The _tracer_ now outputs message bodies that are stream caching based, so users can see the content easily.

Routes can now have `prefixId` specified, which is a prefix to assign every node IDs in the route.
This makes it easy to separate node IDs when you have many routes, or are using route templates.

### Data Format DSL

The Data Format DSL is a builder API that allows using type safe construction of Camel Data Formats, .
and is exclusively available as part of the Java DSL.

The DSL can be accessed directly from the `RouteBuilder` thanks to the method `dataFormat()`.

### Language DSL

The Language DSL is a builder API that allows using type safe construction of Camel Languages,
and is exclusively available as part of the Java DSL.

The DSL can be accessed directly from the `RouteBuilder` thanks to the method `expression()`.

## Camel JBang (Camel CLI)

In this release we continue the expansion of Camel CLI.

Camel JBang now uses standard Maven for downloading JARs instead of using the ShrinkWrap project.

We have reduced the configuration summary _logging noise_ when using Kamelets.

Custom type converters are now detected by Camel JBang when downloading new JARs.

Camel JBang makes using `camel-micrometer` work out of the box, by automatic
creating a `MeterRegistry` if none is provided.

When using Rest DSL with api-doc enabled, then Camel JBang will automatically download `camel-openapi-java` if needed.

Camel JBang now has shell completions which can be installed with the `camel completion` command,
to generate bash/zsh scripts.

The `camel export` command now supports Gradle as build-tool instead of Maven.

We have also added new commands to easily get details about:
- metrics
- health-checks
- inflight messages
- blocked messages
- quickly check total message/failure (easily parseable in shell scripting)

The `camel doc main` command shows all the _main_ option in tables.

Camel JBang will now compile `csimple` languages on startup, if in use.

Added `camel run --code='...'` to quickly run some Java DSL code.

There is a lot more that Camel JBang can do, so make sure to read the [Camel JBang documentation](/manual/camel-jbang.html).
It is also a good idea to run `camel --help` to list all available commands.

There you can also find information on how to get JBang installed and how to install the Camel app in JBang.

### Camel Open Telemetry

Camel can now correct associate spans across both synchronous and asynchronous endpoints.

### Camel YAML DSL

The `camel-yaml-dsl` schema now includes error handler and route configuration.

Fixed a bug preventing the intercept EIP to work when used in YAML DSL.

### Camel Kafka

Many bug fixes and smaller improvements.

### New Components

There are 8 new components:

- `camel-etcd3` - Get, set, delete or watch keys in etcd v3 key-value store.
- `camel-influxdb2` - Interact with InfluxDB v2, a time series database.
- `camel-javascript` - Evaluates a JavaScript expression
- `camel-kubernetes` - Perform operations on Kubernetes Events and get notified on Events changes
- `camel-plc4x` - Read and write to PLC devices
- `camel-rocketmq` Send and receive messages from RocketMQ cluster
- `camel-swift` - Encode and decode SWIFT MT/MX messages
- `camel-wal` - Camel WAL component for the Resume API

### Spring Boot

We have upgraded to the latest Spring Boot 2.7 release.

The `camel-micrometer-starter` now have additional auto configuration options,
to easily configure micrometer settings.

## Upgrading

Make sure to read the [upgrade guide](/manual/camel-3x-upgrade-guide-3_20.html) if you are upgrading from a previous Camel version.

## Release Notes

You can find more information about this release in the list of JIRA tickets resolved in the release:

- [Release notes 3.20](/releases/release-3.20.0/)

## Camel 4 is coming

A new major version of Camel is planned for the first half of 2023 with a bunch of amazing main goals such as the support of Spring 6, Spring Boot 3, and Quarkus 3.
It will be proposed as a major version due to the Jakarta migration that brings breaking changes.

Regarding Camel 3, we still plan to release LTS versions twice a year, but be aware that most of our efforts will be focused on Camel 4, so don't expect too many improvements and features inside.

For more information about Camel 4 and the future of Camel 3, stay tuned, a dedicated blog post will be available soon.

repository: apache/camel-website

branch_name: refs/heads/main

gha_language: CSS

repo_name: apache/camel-website


text:
# DownloadsApi

All URIs are relative to *https://localhost/alfresco/api/-default-/public/alfresco/versions/1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**cancelDownload**](DownloadsApi.md#cancelDownload) | **DELETE** /downloads/{downloadId} | Cancel a download
[**createDownload**](DownloadsApi.md#createDownload) | **POST** /downloads | Create a new download
[**getDownload**](DownloadsApi.md#getDownload) | **GET** /downloads/{downloadId} | Get a download

## cancelDownload
> cancelDownload(downloadId)

Cancel a download

**Note:** this endpoint is available in Alfresco 5.2.1 and newer versions.

Cancels the creation of a download request.

**Note:** The download node can be deleted using the **DELETE /nodes/{downloadId}** endpoint

By default, if the download node is not deleted it will be picked up by a cleaner job which removes download nodes older than a configurable amount of time (default is 1 hour)

Information about the existing progress at the time of cancelling can be retrieved by calling the **GET /downloads/{downloadId}** endpoint

The cancel operation is done asynchronously.

### Example

```javascript
import { AlfrescoApi, DownloadsApi} from '@alfresco/js-api';

const alfrescoApi = new AlfrescoApi({
    hostEcm: 'http://<IP_ADDRESS>:8080'
});

const downloadsApi = new DownloadsApi(alfrescoApi);

downloadsApi.cancelDownload(downloadId).then(() => {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **downloadId** | **string**| The identifier of a download node. |

### Return type

null (empty response body)

## createDownload
> DownloadEntry createDownload(downloadBodyCreateopts)

Create a new download

**Note:** this endpoint is available in Alfresco 5.2.1 and newer versions.

Creates a new download node asynchronously, the content of which will be the zipped content of the **nodeIds** specified in the JSON body like this:

JSON
{
    \"nodeIds\":
     [
       \"c8bb482a-ff3c-4704-a3a3-de1c83ccd84c\",
       \"cffa62db-aa01-493d-9594-058bc058eeb1\"
     ]
}

**Note:** The content of the download node can be obtained using the **GET /nodes/{downloadId}/content** endpoint

### Example

```javascript
import { AlfrescoApi, DownloadsApi} from '@alfresco/js-api';

const alfrescoApi = new AlfrescoApi({
    hostEcm: 'http://<IP_ADDRESS>:8080'
});

const downloadsApi = new DownloadsApi(alfrescoApi);

const opts = {
  'fields':  /*  | A list of field names.

You can use this parameter to restrict the fields
returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual
entity or entries within a collection.

If the API method also supports the **include**
parameter, then the fields specified in the **include**
parameter are returned in addition to those specified in the **fields** parameter.
 */
};

downloadsApi.createDownload(downloadBodyCreateopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **downloadBodyCreate** | [**DownloadBodyCreate**](DownloadBodyCreate.md)| The nodeIds the content of which will be zipped, which zip will be set as the content of our download node. |
 **fields** | [**string**](string.md)| A list of field names.

You can use this parameter to restrict the fields
returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual
entity or entries within a collection.

If the API method also supports the **include**
parameter, then the fields specified in the **include**
parameter are returned in addition to those specified in the **fields** parameter.
 | [optional]

### Return type

[**DownloadEntry**](DownloadEntry.md)

## getDownload
> DownloadEntry getDownload(downloadIdopts)

Get a download

**Note:** this endpoint is available in Alfresco 5.2.1 and newer versions.

Retrieve status information for download node **downloadId**

### Example

```javascript
import { AlfrescoApi, DownloadsApi} from '@alfresco/js-api';

const alfrescoApi = new AlfrescoApi({
    hostEcm: 'http://<IP_ADDRESS>:8080'
});

const downloadsApi = new DownloadsApi(alfrescoApi);

const opts = {
  'fields':  /*  | A list of field names.

You can use this parameter to restrict the fields
returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual
entity or entries within a collection.

If the API method also supports the **include**
parameter, then the fields specified in the **include**
parameter are returned in addition to those specified in the **fields** parameter.
 */
};

downloadsApi.getDownload(downloadIdopts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **downloadId** | **string**| The identifier of a download node. |
 **fields** | [**string**](string.md)| A list of field names.

You can use this parameter to restrict the fields
returned within a response if, for example, you want to save on overall bandwidth.

The list applies to a returned individual
entity or entries within a collection.

If the API method also supports the **include**
parameter, then the fields specified in the **include**
parameter are returned in addition to those specified in the **fields** parameter.
 | [optional]

### Return type

[**DownloadEntry**](DownloadEntry.md)

repository: Alfresco/alfresco-js-api

branch_name: refs/heads/develop

gha_language: TypeScript

repo_name: Alfresco/alfresco-js-api


text:
---
meta:
  - name: description
    content: Use ManagementClient
---

# Use ManagementClient

<LastUpdated/>

`ManagementClient` can be  used to manage users, roles, policies, and user defined fields. Any operation you can do in the {{$localeConfig.brandName}} console can be done with this SDK.

The following is the list of clients:：

::: page-ref /en/reference/sdk-for-node/management/UsersManagementClient.md
:::

::: page-ref /en/reference/sdk-for-node/management/RolesManagementClient.md
:::

::: page-ref /en/reference/sdk-for-node/management/PoliciesManagementClient.md
:::

::: page-ref /en/reference/sdk-for-node/management/AclManagementClient.md
:::

::: page-ref /en/reference/sdk-for-node/management/GroupsManagementClient.md
:::

::: page-ref /en/reference/sdk-for-node/management/OrgManagementClient.md
:::

::: page-ref /en/reference/sdk-for-node/management/UdfManagementClient.md
:::

::: page-ref /en/reference/sdk-for-node/management/WhitelistManagementClient.md
:::

::: page-ref /en/reference/sdk-for-node/management/UserpoolManagementClient.md
:::

repository: Authing/docs

gha_language: JavaScript

repo_name: Authing/docs


text:
---
layout: page
title:  "Using MusEEG and SuperCollider Together"
categories: [docs]
comments: false
---

Because of the limited amount of discrete commands MusEEG is able to
send, it may be helpful for users to control higher level musical events
(such as chords, phrases, drum beats, or pre-recorded samples) instead
of singular notes. The SuperCollider programming language facilitates
the creation of such objects, and may act as a dedicated musical server
that responds to OSC commands sent from MusEEG.

OSCdefs
-------

![OSCdefs for MusEEG in SuperCollider ](OSCdefs.png)

OSCdefs are SuperCollider objects that execute a callback function when
a specific OSC message is received. In
(Figure [6.1](#fig:oscdefs)), a distinct callback function is assigned to
each facial expression and band power message, allowing for different
facial expressions to send control commands to user-specified musical
objects.

Using SuperCollider as a MIDI server
------------------------------------

SuperCollider's innately friendly MIDI API makes it a more favorable
option for programming MIDI patterns than Python. Because of this,
MusEEG's MIDI interface
(Figure [5.6](#fig:midi-menu)) simply sends OSC messages containing
information regarding the chord chosen and some additional control
paremeters: arpeggiation, number of repeats, chord duration, and note
scrambling. On the other hand, a SuperCollider script takes care of
receiving the OSC messages and creating the specified MIDI messages.

The playChord function
(Figure [6.3](#fig:playchord)) allows for MIDI messages to be sent in a
quantized manner, allowing asynchronously performed facial expressions
to have a synchronous effect on the music being performed, and thus
rendering a more accessible work flow.

![OSCdefs for MusEEG MIDI](midi-oscdefs.png)

![MIDI performance Routine](playchord.png)

The Pattern System
------------------

SuperCollider's pattern system provides a simple way of sequencing
synthesizer sounds. The MusEEG package includes two examples that
demonstrate ways SuperCollider's pattern system may be used in
conjunction with MusEEG to control higher level musical events.

### A Simple Drum Sequencer

![Facial Expression Controls for Drum
Sequencer](drumsequencer.png)

(Figure [6.1](#fig:oscdefs)) shows the facial expression callback functions
for a drum sequencer pattern in SuperCollider. In this example, the
following facial expression controls are enabled:

-   A smile expression toggles a kick drum sound in a drumbeat.

-   A scrunch expression toggles a hi-hat drum sound in a drumbeat.

-   A hard blink expression toggles a snare drum sound in a drumbeat.

-   A look left expression decreases the beat tempo by 5 bpm.

-   A look right expression increases the beat tempo by 5 bpm.

### A Generative Arpeggio Pattern

![Facial Expression Controls for Arpeggio
Pattern](daisypat.png)

(Figure [6.1](#fig:oscdefs)) shows the facial expression callback functions
for a generative arpeggio pattern in SuperCollider. In this particular
pattern, a note is chosen randomly from a chord array. Once a note is
chosen, the chosen note itself (or one of its overtones) is played
through a synthesizer of the user's choice. This process is then
repeated over time at a certain density.

In this example, the following facial expression controls are enabled:

-   A smile expression randomly chooses a new chord from a pre-existing
    chord bank.

-   A scrunch expression increases the number of overtones to choose
    from.

-   A hard blink expression decreases the number of overtones to choose
    from.

-   A look left expression decreases note density with respect to time.

-   A look right expression increases note density with respect to time.

repository: dqing-zhang/MusEEG

repo_name: dqing-zhang/MusEEG


text:
## ERDDAP Panel for Grafana

![screenshot](https://raw.githubusercontent.com/USF-IMARS/grafana-erddap/master/src/img/screenshot-1.png)

This [grafana](https://grafana.com/) plugin connects to an [ERDDAP](https://coastwatch.pfeg.noaa.gov/erddap/information.html) server display gridded timeseries data in a dashboard panel.

### Installation
1. cd to your grafana plugin dir `cd /var/lib/grafana/plugins/`
1. clone repo `git clone https://github.com/USF-IMARS/grafana-erddap --branch prod ./erddap-panel`
1. restart grafana `service grafana-server restart`
1. check if installed: `grafana-cli plugins ls | grep erddap`
### Development

Using Docker:

1. Clone the repository and `cd` to it
1. install deps `npm install .`
1. Start the "watch" task: `npm run watch`
1. Run a local Grafana instance with the development version of the plugin: `docker run -p 3000:3000 -d --name gf-dev --volume $(pwd)/dist:/var/lib/grafana/plugins/erddap-panel grafana/grafana`
1. Check the logs to see that Grafana has started up: `docker logs -f gf-dev`
1. Open Grafana at http://localhost:3000/
1. Log in with username "admin" and password "admin"
1. Create new dashboard and add the plugin

#### Sanity Checks
1. can grafana find your plugin? `sudo docker exec gf-dev grafana-cli plugins ls`
    * if no: probably malformed `plugin.json`
1. does the output in `./dist/` look right?
1. is your plugin volume mounted properly? `sudo docker exec gf-dev ls /var/lib/grafana/plugins`
1. have you tried restarting the docker container? `sudo docker restart gf-dev`

#### `prod` branch
The `prod` branch is special; it contains only the output normally in `/dist`.
Do not try to merge to this branch as you normally would.
Instead you must copy a build into it manually.
Before doing so update the version numbers & changelogs at:
* ./README.md # Changelog
* ./package.json : version
* ./src/plugin.json : version

steps:
1. build the latest master version into `./dist`
    * the `watch` task does this automatically; stop it before proceeding.
1. switch to `prod` branch: `git checkout prod`
1. merge changes from new build: `cp -R ./dist/* .`
1. use `git status` & `git add` to stage changes
1. `git commit` to the `prod` branch

#### Changelog
##### v0.6.2
- reformat display date

##### v0.6.1
- make request_date table optional

##### v0.6.0
- centered image date
- colorbar key can now be "unified" or "individual"
- fixes #7
- data link included under unified colorbar

##### v0.5.0
- + image date to image title
- + image date table above images
- better layout of legend

##### v0.4.0
- automatic time delta using n-images setting (#2)
- fixes modified this.range side-effect
- colorbar request now uses middle of this.range
- data credit links to data request instead of graph

##### v0.3.0
- + custom color bar formatting
- color bar separated out from images
- images auto-cropped

##### v0.2.0
- + time delta to editor
- other minor panel editor improvements

##### v0.1.1
- fix bugs preventing save & use of configs

##### v0.1.0
- editor options added to config ERDDAP request(s)
- color invert replaces zoom effect on img hover
- img opens in new tab on click
- first actually working version

##### v0.0.2
- editor tab added

##### v0.0.1
- first "working" version

repository: USF-IMARS/grafana-erddap

gha_language: HTML

repo_name: USF-IMARS/grafana-erddap


text:
# Angular2 Dropdown Component

Material-like dropdown component for Angular2.

NB: This repository is currently unmaintained. Please fork or use Angular Material's module, it's better.

## Install

    npm install ng2-material-dropdown --save

## Usage

Once installed, import the directives and use it them your container component:

```html
<ng2-dropdown>
    <ng2-dropdown-button>
        Open Menu
    </ng2-dropdown-button>
    <ng2-dropdown-menu>
        <ng2-menu-item *ngFor="let page of pages">
            {{ page }}
        </ng2-menu-item>

        <div class='ng2-menu-divider'></div>

        <ng2-menu-item>
            With Divider
        </ng2-menu-item>
    </ng2-dropdown-menu>
</ng2-dropdown>
```

```javascript
// import module
import { Ng2DropdownModule } from 'ng2-material-dropdown';

@NgModule({
    imports: [ Ng2DropdownModule ]
    // ..
})
export class MyModule {}
```

## API

`ng2-dropdown`
- **`dynamicUpdate`** - **`[?boolean]`** : option to disable the dynamic update of the position on scroll events (defaults to `true`)
- **`onItemSelected()`** - **`[(onItemSelected($event)]`** : event that emits the currently selected/hovered item
- **`onItemClicked()`** - **`[(onItemClicked($event)]`** : event that emits the item clicked on
- **`onShow()`** - **`[(onItemClicked($event)]`** : event that emits when the dropdown gets shown
- **`onHide()`** - **`[(onItemClicked($event)]`** : event that emits when the dropdown gets hidden

`ng2-dropdown-menu`
- **`focusFirstElement`** - **`[?boolean]`** : by default the first element is immediately focused. You can disable by setting this option to false
- **`width`** - **`[?number]`**: this determines the width of the menu. Possible values are 2, 4 and 6. By default, this is set to 4
- **`offset`** - **`[?string]`**: offset to adjust the position of the dropdown with absolute values
- **`appendToBody`** - **`[?boolean]`** : by default the dropdown is appended to the body, but you can disable this by setting it to `false`

`ng2-dropdown-button`
- **`showCaret`** - **`[?boolean]`** : if present, a caret will be appended to the button's text

`ng2-menu-item`
- **`preventClose`** - `[?boolean]` : if present, this attribute prevents the menu to hide when the menu item is clicked
- **`value` - `[?any]`** : any value that you may want to attach to a menu item. Useful for using this component with other components.


text:
# Thesis
My Thesis work for completion of the Signals & Systems (EE) Master program at Delft University of Technology

This repository contains python code for estimating the shape of a room from acoustic room impulse responses. It is tested for shoe box shaped room using simulated room impulse responses.

See test.ipynb for an example of how to use the code


text:
# OpenFaaS Pro SQS Connector

The SQS connector can be used to invoke functions from an AWS SQS queue.

## Prerequisites

- Purchase a license

  You will need an OpenFaaS License

  Contact us to find out more [openfaas.com/pricing](https://www.openfaas.com/pricing)

- Install OpenFaaS

  You must have a working OpenFaaS installed.

## Configure your secrets

- Create the required secret with your OpenFaaS Pro license code:

```bash
$ kubectl create secret generic \
    -n openfaas \
    openfaas-license \
    --from-file license=$HOME/.openfaas/LICENSE
```

- If not using AWS ambient credentials, create a secret:

```bash
$ kubectl create secret generic -n openfaas \
  aws-sqs-credentials --from-file aws-sqs-credentials=$HOME/sqs-credentials.txt
```

## Configure values.yaml

```yaml
replicas: 1

queueURL: "https://"

# Set to empty string if using AWS ambient credentials
awsCredentialsSecret: aws-sqs-credentials

# Set the region
awsDefaultRegion: eu-west-1

# Maximum time to keep message hidden from other processors whilst
# executing function
visibilityTimeout: 30s

# Time to wait between polling SQS queue for messages.
waitTime: 20s

# Maximum messages to fetch at once - between 1-10
maxMessages: 1
```

## Install the chart

- Add the OpenFaaS chart repo and deploy the `sqs-connector` Pro chart. We recommend installing it in the same namespace as the rest of OpenFaaS

```sh
$ helm repo add openfaas https://openfaas.github.io/faas-netes/
$ helm upgrade sqs-connector openfaas/sqs-connector \
    --install \
    --namespace openfaas
```

> The above command will also update your helm repo to pull in any new releases.

## Install a development version

```sh
$ helm upgrade sqs-connector ./chart/sqs-connector \
    --install \
    --namespace openfaas
    -f ./values.yaml
```

## HTTP Headers

Your function will receive these headers:

* `X-SQS-Message-ID` - the ID of the message being processed.
* `X-SQS-Queue-URL` - the URL of the queue.
* `Content-Type` - if configured for the controller.

## Configuration

Additional sqs-connector options in `values.yaml`.

| Parameter                | Description                                                                            | Default                        |
| ------------------------ | -------------------------------------------------------------------------------------- | ------------------------------ |
| `asyncInvocation`        | For long running or slow functions, offload to asychronous function invocations and carry on processing the stream | `false`   |
| `upstreamTimeout`        | Maximum timeout for upstream function call, must be a Go formatted duration string.    | `2m`                          |
| `rebuildInterval`        | Interval for rebuilding function to topic map, must be a Go formatted duration string. | `30s`                           |
| `gatewayURL`             | The URL for the API gateway.                                                           | `http://gateway.openfaas:8080` |
| `printResponse`          | Output the response of calling a function in the logs.                                 | `true`                         |
| `printResponseBody`      | Output to the logs the response body when calling a function.                          | `false`                        |
| `printRequestBody`       | Output to the logs the request body when calling a function.                           | `false`                        |
| `fullnameOverride`       | Override the name value used for the Connector Deployment object.                      | ``                             |
| `contentType`            | Set a HTTP Content Type during function invocation.                                    | `""`                           |
| `resources`              | Resources requests and limits configuration                               | `requests.memory: "64Mi"`                  |
| `logs.debug`           | Print debug logs                                                                                | `false`                        |
| `logs.format`          | The log encoding format. Supported values: `json` or `console`                                                     | `console`                      |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. See `values.yaml` for the default configuration.

## Removing the sqs-connector

All control plane components can be cleaned up with helm:

```sh
$ helm uninstall -n openfaas sqs-connector
```

repository: openfaas/faas-netes

gha_language: Go

repo_name: openfaas/faas-netes


text:
# Remove support for old Python versions

Python 2.6, 3.2, and 3.3 can no longer be used with VTK.  Python 3.6
or higher is recommended.

repository: JuanYelinger/VTK

repo_name: JuanYelinger/VTK


text:
---
title: Electron & NeDB Todo App
published: true
layout: post
---

Build cross-platform desktop apps with JavaScript, HTML, and CSS. Electron with React enables you to have a consistent look and feel for your application across multiple platforms. It's also dead-simple to build executables and installers with [Squirrel](https://github.com/Squirrel/).

[Electron Todo App Repository](https://github.com/alpinstang/electron-nedb-todo).

> The versatility of electron for desktop development is a perfect complement to my
> React skillset. I look forward to using this in future projects.

![Electron App Screenshot](./screenshot.PNG)

I created MSI and exe installers here: [Installers](https://github.com/alpinstang/alpinstang.github.io/tree/main/content/blog/electron-todo)

There is also a nupkg file.

gha_language: SCSS


text:
# Lehigh Liftoff

## Description

The goal of this website is to allow members within the Lehigh computer science community to connect with each other and collaborate on projects of interest.

## [Live Link](https://liftoff.acm.lehigh.edu/)

## Technologies Used
* Elasticsearch - for text searching project data
* Postgresql - for storing persistent user, group, and project data
* Node.js - for running api web api endpoints
* Express - as a routing framework
* OAuth2.0 - for authentication of users into the site
* Kubernetes - for deployment

## Deployment

Our database configurations comprise a postgreSQL instance on AWS, and elasticsearch (multi-node cluster) and kibana are currently running locally under docker for development/testing. These are short-term temporary solutions, with long-term solutions involving porting to our production Kubernetes cluster which will manage both elasticsearch and kibana.

In order to perform a full production deployment of our application, you will first need to allocate a PostgreSQL instance and an ElasticSearch instance for the application to connect with. PostgreSQL can be deployed via the [official Helm Chart](https://github.com/helm/charts/tree/master/stable/postgresql), and ElasticSearch can be deployed via [its Helm chart](https://github.com/elastic/helm-charts/tree/master/elasticsearch).

1. Once the dependencies are installed, follow these steps to install the application:
2. Package the NPM project by running `npm pack ./`, followed by `mv lehigh-liftoff-*.tgz docker/lehigh-liftoff.tgz`.
3. Build the docker image via `cd docker; docker build -t ${YOUR_REPO}:latest .`. You’ll want to publish the container to your private repository via `docker push ${YOUR_REPO}:latest`.
4. Publish the Helm chart to your private repository. Assuming you’re using Nexus, this can be done via `cd chart; helm package ./; curl -u ${REPO_USER}:${REPO_PASS} https://${REPO_HOST}/repository/${REPO_NAME} --upload-file lehigh-liftoff-*.tgz -v`
5. Modify the `values.yaml` file to match your organization’s infrastructure.
6. Deploy the helm chart by running `helm repo update; helm install -f values.yaml lehigh-liftoff ${YOUR_REPO}/lehigh-liftoff`

## Front-End

Our front-end web UI is written in JavaScript, HTML, and CSS. In the future, we plan to integrate Vue.JS into the front-end codebase in order to provide a more flexible templating solution for the search results page, and also in order to increase the modularity of our frontend code.

## Backend

Our backend uses node.js, express.js, passport.js and a few other technologies to get cool api routes connecting everything together. We also have Google OAuth, so users can't visit pages unless they are logged in. We’ve got routes for users, and routes for groups. We've got routes galore. We also created some fetch functions for the github api, but came across a 60 request limit, limiting our data collection. We plan on using those in future though.

## Contributors
- Alan Zarza<EMAIL_ADDRESS>- Buckley Ross<EMAIL_ADDRESS>- Tal Derei<EMAIL_ADDRESS>- Sam Markovich<EMAIL_ADDRESS>- Nicholas Lembo<EMAIL_ADDRESS>

repository: buck-ross/liftoff

repo_name: buck-ross/liftoff


text:
![Logo](docs/src/main/resources/microsite/img/neotypes.png)

> neotype - a type specimen that is selected subsequent to the description of a species to replace a preexisting type that has been lost or destroyed.

[![Build Status](https://travis-ci.org/neotypes/neotypes.svg?branch=master)](https://travis-ci.org/neotypes/neotypes)
[![Maven Central](https://img.shields.io/maven-central/v/com.dimafeng/neotypes_2.12.svg)](https://maven-badges.herokuapp.com/maven-central/com.dimafeng/neotypes_2.12)
[![Gitter Chat](https://badges.gitter.im/neotypes-neotypes/Lobby.svg)](https://gitter.im/neotypes-neotypes/Lobby)

# neotypes

:warning: The library is under heavy development. Production use is at your own risk and is not recommended. :warning:

For early adopters:

|Supports Scala 2.12 and 2.13||
| ----------------------------------------- |:--------------|
|`"com.dimafeng" %% "neotypes" % version`|core functionality. Supports `scala.concurrent.Future`.|
|`"com.dimafeng" %% "neotypes-cats-effect" % version`|`cats.effect.Async[F]` implementation.|
|`"com.dimafeng" %% "neotypes-monix" % version`|`monix.eval.Task` implementation.|
|`"com.dimafeng" %% "neotypes-zio" % version`|`zio.Task` implementation.|
|`"com.dimafeng" %% "neotypes-akka-stream" % version`|result streaming for Akka Streams.|
|`"com.dimafeng" %% "neotypes-fs2-stream" % version`|result streaming for FS2.|
|`"com.dimafeng" %% "neotypes-monix-stream" % version`|result streaming for Monix Observables.|
|`"com.dimafeng" %% "neotypes-zio-stream" % version`|result streaming for ZIO ZStreams.|
|`"com.dimafeng" %% "neotypes-refined" % version`|support to insert and retrieve refined values.|
|`"com.dimafeng" %% "neotypes-cats-data" % version`|support to insert and retrieve `cats.data` values.|

**Scala lightweight, type-safe, asynchronous driver (not opinionated on side-effect implementation) for neo4j**.

* **Scala** - the driver provides you with support for all standard Scala types without the need to convert Scala <-> Java types back and forth and you can easily add your types.
* **Lightweight** - the driver depends on `shapeless` and `neo4j Java driver`.
* **Type-safe** - the driver leverages [typeclasses](https://blog.scalac.io/2017/04/19/typeclasses-in-scala.html) to derive all needed conversions at the compile time.
* **Asynchronous** - the driver sits on top of [asynchronous Java driver](https://neo4j.com/blog/beta-release-java-driver-async-api-neo4j/).
* **Not opinionated on side-effect implementation** - you can use it with any implementation of side-effects of your chose (scala.Future, cats-effect
 IO, Monix Task, etc) by implementing a simple typeclass. `scala.Future` is implemented and comes out of the box.

The project aims to provide seamless integration with most popular scala infrastructures such as lightbend (Akka, Akka-http, Lagom, etc), typelevel (cats, http4s, etc), twitter (finch, etc)...

## Resources

* [Documentation](https://neotypes.github.io/neotypes/docs.html)
* [Example project (Akka-http + neotypes)](https://github.com/neotypes/examples)

## Showcase

```scala
import org.neo4j.driver.v1._
import neotypes.Async._
import neotypes.implicits._
import shapeless._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future

scala> val driver = GraphDatabase.driver("bolt://localhost:7687", AuthTokens.basic("neo4j", "****"))
Nov 26, 2018 10:42:42 AM org.neo4j.driver.internal.logging.JULogger info
INFO: Direct driver instance 542400040 created for server address localhost:7687
driver: org.neo4j.driver.v1.Driver = org.neo4j.driver.internal.InternalDriver@20545e28

scala> val session = driver.session().asScala[Future]
session: neotypes.Session[scala.concurrent.Future] = neotypes.Session@6f30d4df

import scala.concurrent.Await
import scala.concurrent.duration._

scala> val people = "match (p:Person) return p.name, p.born limit 10".query[(String, Int)].list(session)
people: scala.concurrent.Future[Seq[(String, Int)]] = Future(<not completed>)

scala> Await.result(people, 1 second)
res0: Seq[(String, Int)] = ArrayBuffer((Charlize Theron,1975), (Keanu Reeves,1964), (Carrie-Anne Moss,1967), (Laurence Fishburne,1961), (Hugo Weaving,1960), (Lilly Wachowski,1967), (Lana Wachowski,1965), (Joel Silver,1952), (Emil Eifrem,1978), (Charlize Theron,1975))

scala> case class Person(id: Long, born: Int, name: Option[String], notExists: Option[Int])
defined class Person

scala> val peopleCC = "match (p:Person) return p limit 10".query[Person].list(session)
peopleCC: scala.concurrent.Future[Seq[Person]] = Future(<not completed>)

scala> Await.result(peopleCC, 1 second)
res1: Seq[Person] = ArrayBuffer(Person(0,1975,Some(Charlize Theron),None), Person(4,1964,Some(Keanu Reeves),None), Person(5,1967,Some(Carrie-Anne Moss),None), Person(6,1961,Some(Laurence Fishburne),None), Person(7,1960,Some(Hugo Weaving),None), Person(8,1967,Some(Lilly Wachowski),None), Person(9,1965,Some(Lana Wachowski),None), Person(10,1952,Some(Joel Silver),None), Person(11,1978,Some(Emil Eifrem),None), Person(15,1975,Some(Charlize Theron),None))
```

## Special thanks

* [Luis Miguel Mejía Suárez](https://github.com/BalmungSan)

repository: SumLare/neotypes

repo_name: SumLare/neotypes


text:
Lecture 3:  UNIX
================

## Updating your *astr288p* repo
Any time you need to update your **astr288p** git repo, the **git pull** command will do this:
```
   cd ~/ASTR288P/astr288p      # make sure you are in one of the 'astr288p' directories
   git status                  # first make  sure you don't have anything modified
   git pull                    # warnings are possible here if there are conflicts
```
it would actually warn you if you had modified files that are also modified on the server. It will
attempt a merge and warn you.  Files that you modified and are not modified on the server

## UNIX PATH

Any command typed in the terminal will find this from an executable file along the
directories in the $PATH environment variable:

```
   echo $PATH

   which ls
   which man
   which ds9
```

## UNIX SCRIPTS

recall: a UNIX script is nothing more than a few shell commands in a text file, which you can execute directly using
the shell (the interpreter). You do need to make that text file executable (**chmod +x**)

Recall from the previous lecture:
```
   echo echo hello world > hello
   chmod +x hello
   hello
```
Q3-1:  what happens if you left out the 2nd *echo* in the command that created the script?

Q3-2: the following shell commands do something very convoluted. How would you achieve the same result?
```
   echo '#! /bin/bash' >> hello
   tac hello  > hello1
   mv hello1 hello
   chmod +x hello
```

## PYTHON

The python language often comes natively on your UNIX system.
Try the following commands in **ipython** (or **python** if you don't have **ipython** yet):
```
   LAPTOP> which python
   LAPTOP> which ipython
   LAPTOP> ipython
   In [1]:  import numpy
   In [2]:  import scipy
   In [3]:  import astropy
   In [4]:  import astroML
   In [5]:  import admit
   In [6]:  quit
```
At some point you might see the message **no module named '...'**

## Anaconda and Miniconda

**Miniconda** is a very barebones version of python which you can then tailor to your own needs. See also
http://conda.pydata.org/miniconda.html.
If you need more, download the full **Anaconda** version.
See https://www.continuum.io

### On Linux:
```
  df .
  wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
  bash Miniconda3-latest-Linux-x86_64.sh
```

Make sure you do these commands on a locally mounted disk, not NFS (network) mounted!

### On Mac:
```
  curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > Miniconda3-latest-MacOSX-x86_64.sh
  bash Miniconda3-latest-MacOSX-x86_64.sh
```
and now in common to both Linux and Mac you will answer some questions and at the end
a modification to your **~/.bashrc** file (linux) or **~/.bash_profile** (mac) will be made.
```
  export PATH="$HOME/miniconda3/bin:$PATH"
or
  setenv PATH "$HOME/miniconda3/bin:$PATH"
```
And now make sure your shell is looking at this new python (e.g. **source ~/.bashrc** for your current shell, or open a new shell):
```
  which python
```
Now continue installing some modules that we will need for future lectures
```
  conda install ipython numpy scipy matplotlib notebook ipywidgets networkx
  conda install astropy
  conda install jupyter

```

See what modules you have installed:
```
  conda list
```

Q3-3:  How many modules are now installed (use basic unix tools)

### "Hello World!" in python

```
	echo 'print("Hello World!")' > hello.py
	python hello.py
```

Following on our previous **"#!"** example we can avoid having to type the name **python** :
```
	#! /usr/bin/python
	#
	print("Hello World!")
```
or even more general
```
	#! /usr/bin/env python
	#
	print("Hello World!")
```

Q3-4: What is the difference between the two **#!** versions that *appear* to do the same thing.

### plotting example
Previously we created a small dataset **Data2.txt** in the **ASTR288P** directory. This is how it should plot
on your screen

```
	astr288p/python/tabplot.py Data2.txt
```

### C compiler hello world

```
	cat hello.c

#include <stdio.h>

void main()
{
  printf("Hello World from C!\n");
}

	gcc -o helloc hello.c
	ls -l hello.c
	ls -l helloc
	helloc
	more helloc
	cat helloc

```

Q3-5:  cut and paste the C code into your own hello.c and compile and run this program

Q3-6:  observe the difference between **more** and **cat**


text:
---
layout: post
title: Chatting with Alexa
categories: blog
tags: alexa tts festival github
---
In a [previous post](/blog/2016/02/08/i-have-pi-now-what/) I mentioned my idea of using different triggers for Alexa. In particular, I didn't want to setup a hardware "push-to-talk" button. Now that I had [code](/blog/2016/03/20/alexa-voice-service/) to interact with Alexa Voice Service (AVS), I needed a way to generate the audio commands for the requests (instead of recording my voice for each command).

So I ended up looking for a text-to-speech (TTS) tool that could run on Linux. After a bit of searching on the Internet, I found that [Festival](http://festvox.org/festival/) seemed to be the best option for TTS on Linux.

I am using Ubuntu for my development and testing, and it was very straightforward to install.

    sudo apt-get install festival

As is the usual case, the [Arch Linux wiki](https://wiki.archlinux.org/index.php/Festival) also had a great entry for Festival that offers more details.

What I needed was the `text2wave` command that comes with the `festival` package when it is installed. With this command, you can give a text file as input and it can output the speech as a WAV file.

    text2wave -o <output_wav_file> <input_text_file>

I wrote a simple Python wrapper to execute the command:

{% highlight python %}
def tts(text, save_to=None):
    """Converts text to speech (WAV) file.

    Args:
        text (str): Text to convert
        save_to (str): File path for saving the WAV file. If not
                       provided will save to a `/tmp/simple-tts/`

    Returns:
        Path (str) where the WAV file is saved.
    """
    os.system('mkdir -p {}'.format(TEMP_DIR))
    temp_file = TEMP_DIR + '/{}.txt'.format(uuid.uuid4())
    if not save_to:
        save_to = TEMP_DIR + '/{}.wav'.format(uuid.uuid4())
    with open(temp_file, 'w') as f:
        f.write(text)
    os.system('text2wave -o {out_fn} {in_fn}'.format(
        out_fn=save_to, in_fn=temp_file))
    return save_to
{% endhighlight %}

After some testing, I found that Alexa had some trouble understanding the default voice that is used by Festival. After some more Google-Fu, I was able to find some [information](http://ubuntuforums.org/showthread.php?t=677277) about installing additional voice packs for Festival. I tested several of the voice packs and found that the [CMU Arctic clb (US English female voice)](http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_clb_arctic-0.95-release.tar.bz2) gave the best results.

Here's the [TTS code](https://github.com/ewenchou/simple-tts), and a  [simple example](https://github.com/ewenchou/alexa-tts-demo) that shows how to tie it together with [alexa-client](https://github.com/ewenchou/alexa-client).

<iframe width="560" height="315" src="https://www.youtube.com/embed/9JhDP1F_ho0" frameborder="0" allowfullscreen></iframe>


text:
# Creating Custom Environments with Conda

The authors of the PLOS One paper tell us that their software depends on the following packages:

1. numpy
1. pandas
1. Keras
1. scikit_learn

Package dependency is a major challenge with software and Python has a long history of doing a pretty poor job at it! Anaconda (and conda) largely arose because of the inadequacies in native Python package management.

What do we mean by package dependency? In a nutshell it is this: instead of writing all of our code from scratch using our language of choice (e.g. Python) we are going to use code that someone else has already written (e.g. Pandas) to solve some of what we need our program to do and then write the rest ourselves.

If all the packages we were going to use were written entirely in Python, this would not be particularly challenging. However, often these packages are not written just in Python but are written in C/C++ or Fortran. And the problem here is that Code written in C or Fortran for one type of computer will not necessarily run on another type of computer. So without going into more detail, let's just leave it at: package management is a problem and conda tries to solve that problem.

## What are our package dependencies in detail?

The authors list four dependencies

1. `numpy`: a package for working with large arrays of data
1. `pandas`: a large, complex package for working with tabular data
1. `Keras`: a package for creating deep neural networks (deep learning)
1. `scikit-learn`: a package for doing machine learning

In reality each of these packages depends on other packages not listed and the authors of these packages should have described these dependencies in such a way that when `conda` (or `pip` described later) is installed it installs all the dependencies correctly.

`pandas`, `keras`, and `scikit-learn` all depend on `numpy` so we are probably smarter not to specify `numpy` as a dependency and let `conda` figure out that it needs to install `numpy`? The fact that all of these packages depend on `numpy` is getting to the heart of one of the package management challenges: particular versions of `keras`, `scikit-learn`, and `pandas` may all require different versions of `numpy`. So one task `conda` has, a task that sometimes is quite slow, is figuring out which versions of all the packages need to be installed so that everything we want can in fact be installed.

We are going to specify our Python environment by creating an `environment.yml` file. This is a [YAML](https://yaml.org/) file and we will use it to specify what version of Python, pandas, etc. we will be using.

Here is an example `environment.yml` file for a [simple project](https://github.com/Melbourne-BMDS/signal_detection_theory) I created for one of my classes.

```Yaml
name: mbmds-sdt
channels:
  - defaults
dependencies:
  - python=3.7
  - numpy
  - pandas
  - pip
  - matplotlib
  - seaborn
  - jinja2
  - ipywidgets
  - ipython
  - pip:
    - RISE
```

Here is the basic structure analyzed:

1. __name__: This is going to be the name of the Python environment.
1. __channels__: `conda` has different channels that can be searched for packages
1. __dependencies__: These are the packages we are going to tell `conda` to install. Note that one of the packages we are installing is `pip` which is the default (standard) way of installing packages in Python.
1. __pip__: Not every package we want to install is going to be available with `conda`, so we will use `pip` to install these other packages, which in this case is `RISE`

## Create an `environment.yml` file

Go back to your JupyterLab instance in your browser and from the Launcher create a new text file in the top level directory for the `MIMIC-III-ICU_Readmission_Analysis` repository.

![Create a text file](media/launcher_text.png)

Rename the file `environment.yml`

![Rename a file](media/rename_file.png)

I went to anaconda.org and searched for each of the following packages to see what channels they were in and what the latest versions of the packages were. `keras` is only available in the `conda-forge` (community contributed packages). `Pandas` and `scikit-learn` are available in the default channel (the channel currated by the Anaconda team). The `conda` developers recommend not mixing channels, so we will stick with the `conda-forge` channel. In addition to the software listed as dependencies, I also want to add `seaborn` for making graphs, `jupyterlab` so we can use the environment we are used to and `plaidml`. `plaidml` is not available on `conda` so we will need to install `pip` and use `pip` to install `plaidml`. `plaidml` allows packages like `keras` to use non-NVidia gpus, such as those on Mac computers.

Based on the latest available versions, I created the following `environment.yml` file:

```Yaml
name: mimic3
channels:
  - conda-forge
dependencies:
  - python=3.7
  - pandas=1.1.*
  - keras=2.4.*
  - scikit-learn=0.23.*
  - pip=20.2.*
  - seaborn=0.11.*
  - jupyterlab=2.2.*
  - pip:
    - plaidml==0.7.*
```

__Note__: `conda` uses a single `=` when specifying a version while `pip` uses a double `==`.

To create the environment, in the bash shell I execute the following command from the directory containing `environment.yml`:

```bash
conda env create -f environment.yml
```

__It failed!__

One obvious problem is `pip`. I don't really care what version of `pip` I'm using, so I'm not going to specify the version for `pip` and retry.

__It failed again!__

So I'm going to get rid of all the version numbers and see if conda can manage to create an environment with all the desired software.

__Note__: The repository we cloned is two years old, so they certainly didn't use the latest version anyway. We might need to edit their code or specify older package versions to get everything working anyway.

```Yaml
name: mimic3
channels:
  - conda-forge
dependencies:
  - python=3.7
  - pandas
  - keras
  - scikit-learn
  - pip
  - seaborn
  - jupyterlab
  - pip:
    - plaidml
```

__Now it worked!!__ We can specify versions later when we have verified that all of our code works.

gha_language: Jupyter Notebook


text:
#MeanBlog
Built with Angular, Node, MongoDB, Express, and Passport for Authentication

## Prerequisites
Make sure you have installed all of the following prerequisites on your development machine:
* Git - [Download & Install Git](https://git-scm.com/downloads). OSX and Linux machines typically have this already installed.
* Node.js - [Download & Install Node.js](https://nodejs.org/en/download/) and the npm package manager. If you encounter any problems, you can also use this [GitHub Gist](https://gist.github.com/isaacs/579814) to install Node.js.
* MongoDB - [Download & Install MongoDB](http://www.mongodb.org/downloads), and make sure it's running on the default port (27017).
* Bower - You're going to use the [Bower Package Manager](http://bower.io/) to manage your front-end packages. Make sure you've installed Node.js and npm first, then install bower globally using npm:

## Testing the Application
You can run the full test suite with the test task:

```bash
$ npm test
```
This will run both the server-side tests (located in the `app/tests/` directory) and the client-side tests (located in the `public/modules/*/tests/`).

To execute only the server tests, run the test:server task:

```bash
$ npm run test:server
```

To execute only the server tests and run again only changed tests, run the test:server:watch task:

```bash
$ npm run test:server:watch
```

And to run only the client tests, run the test:client task:

```bash
$ npm run test:client
```

## Running the application with Gulp
To start the development environment:

```bash
$ gulp
```

To run the application with *production* environment configuration, execute gulp as follows:

```bash
$ gulp prod
```

## Credits
Inspired by the great work of [Madhusudhan Srinivasa](https://github.com/madhums/)
The MEAN name was coined by [Valeri Karpov](http://blog.mongodb.org/post/49262866911/the-mean-stack-mongodb-expressjs-angularjs-and).

## License
[The MIT License](LICENSE.md)

repository: mtownsen/MeanBlog

repo_name: mtownsen/MeanBlog


text:
// Copyright 2022 tml104
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

# Lecture 18

## Network protocol

- TCP/IP
- Layering
- AF_INET
- AF_INET6
- TCP
- enet, raknet
- ACK, NAK, SEQ, Timeouts
- 拜占庭问题
- Sliding windows protocol
- go-back-n ARQ
- Forward Error Correction
- XOR
- Reed-Solomon Codes

## Clock Synchronization

- RTT
- NTP

## RPC

## Game Synchronization

- snapshot
- lockstep
- state synchronization


text:
# WebsiteProject_htmlCSSJS
a practice project
ReadMe

These 4 pages of website are developed by Anna Lu
as an application demo for Front-End ###, adopted from website: http://www.humanlongevity.com/products/hliq-whole-genome/.
Related information and pictured were gathered via ### official website.

* the mock-logo used here was designed using this website:
https://www.tailorbrands.com/?utm_source=google&utm_medium=cpc&utm_campaign=769321668&utm_content=47346941984&utm_term=logo%20design&gclid=Cj0KEQjwy4zLBRCOg6-4h6vs3cUBEiQAN-yzfiXBm9ejhCeUDRd_yPY6kYFzZv2UBowYlXMHK7hI7IIaApLn8P8HAQ

Please help me to protect copyright. Cannot thank you more!
I left some inline text of my name to protect myself, apologize a head for any possible interruption.

To view the pages, google chrome is recommended.
(in real working settings, all kinds and versions of main stream browser must be tested before
launching a new website, so people tend to use commercialized theme and then revise it;
while this project is done totally by head-coding).

list of html file:
1. main-demo-page-AnnaXLU.html
	main page, with most real clickable items on it, and linked to other 3 pages.
	real clickable/hoverable elements:
	1) fixed navigation bar with shuffle animation;
	2) links beneath product menu;
	3) links below the head picture (not very precise, need to improve);
	4) links to make call and send email;

2. secondary-demo-tumor-AnnaXRL.html
	less clickable/hoverable elements.
	I chose this part as secondary demo because it is based on steps, which makes
    presenting information much easier.
	displays another design idea by adding and making use of head lines.

3. LanguageProcessing.html
	only nav bar clickable.
	to support the first 2 pages.
4. DNASequencing.html
    only nav bar clickable.
	to support the first 2 pages.

Things to improve:
1. links below the head picture (not very precise, need to improve);
2. scrollable back img cover (do not have it yet);
3. navigation bar can be implemented more neatly;
4. mobile responsiveness (using CSS; do not have it yet;
   in real-life it is included in commercialized theme, so we actually do
   not have to worry about it too much);
5. social media is not connected yet (not hard to implement with accounts);
6. not bilingual (normally commercialized theme and plugins can handle this,
   so no worry);
7. SEO features (normally commercialized theme and plugins can handle this,
   so no worry)
We can always do better!

Design files:
I have them on lucid chart

The thing I like in the reference webpage is the bleeding heading image,
also it implies the company's location;
What I dislike is the theme color, so I changed it from greenish to more blue,
which, for me, is of more energy;
The side picture can be used as a structure for info flow, so I enlarged it
as background;
a search bar is added, because people tend to find answers by themselves,
rather than follow your presentation;
Also the information flow in the reference webpage is somehow overwhelming -
too many information and I did not see the logic flow, but for promotion
purpose, it successfully emphasized the relationship between science and health,
and has enough resource/choices to persuade people to contact.

Thank you.

Anna (Xinrui) Lu
July 10, 2017


text:
---
layout: default
title: Distant Supervision
---

# Distant supervision

Most machine learning techniques require a set of **training data**. A traditional
approach for collecting training data is to have humans label a set of
documents. For example, for the marriage relation, human annotators may label
the pair "Bill Clinton" and "Hillary Clinton" as a positive training example.
This approach is expensive in terms of both time and money, and if our corpus is
large, will not yield enough data for our algorithms to work with. And because
humans make errors, the resulting training data will most likely be noisy.

An alternative approach to generating training data is **distant supervision**.
In distant supervision, we make use of an already existing database, such as
[Freebase](http://www.freebase.com/) or a domain-specific database, to collect
examples for the relation we want to extract. We then use these examples to
automatically generate our training data. For example, Freebase contains the
fact that Barack Obama and Michelle Obama are married. We take this fact, and
then label each pair of "Barack Obama" and "Michelle Obama" that appear in the
same sentence as a positive example for our marriage relation. This way we can
easily generate a large amount of (possibly noisy) training data. Applying
distant supervision to get positive examples for a particular relation is easy,
but [generating negative examples](../basics/generating_negative_examples.html)
is more of an art than a science.


text:
# Expanded Dates

[![Latest Version on Packagist](https://img.shields.io/packagist/v/permafrost-dev/expanded-packages.svg?style=flat-square)](https://packagist.org/packages/permafrost-dev/expanded-packages)
[![Build Status](https://travis-ci.org/permafrost-dev/expanded-dates.svg?branch=master)](https://travis-ci.org/permafrost-dev/expanded-packages)
[![Quality Score](https://img.shields.io/scrutinizer/g/permafrost-dev/expanded-packages.svg?style=flat-square)](https://scrutinizer-ci.com/g/permafrost-dev/expanded-packages)
[![Total Downloads](https://img.shields.io/packagist/dt/permafrost-dev/expanded-packages.svg?style=flat-square)](https://packagist.org/packages/permafrost-dev/expanded-packages)

This package takes an input string of a date (or a Carbon instance,) and expands it into an object containing several common formats, such as relative time and age in seconds, minutes, days, etc.  See below for an example.

## Installation

You can install the package via composer:

```bash
composer require permafrost-dev/expanded-dates
```

## Usage

``` php
    include __DIR__.'/../vendor/autoload.php';
    $dateOne = ExpandedDate::create(Carbon::now()->subSeconds(35));
    print_r($ed1);
```

Expands to an ExpandedDate object:

```
Permafrost\ExpandedDates\ExpandedDate Object
(
    [value] => 2019-08-09T19:43:10-04:00
    [relative] => 35 seconds ago
    [formatted] => Aug 9, 2019
    [time] => 7:43 PM
    [timestamp] =><PHONE_NUMBER>
    [day] => Friday
    [age] => stdClass Object
        (
            [seconds] => 35
            [minutes] => 0
            [hours] => 0
            [days] => 0
            [weeks] => 0
        )

)

```

### Testing

``` bash
composer test
```

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

repository: permafrost-dev/expanded-dates

repo_name: permafrost-dev/expanded-dates


text:
---
permalink: /kaggle-01
title: "My first experience with Kaggle competitions"
header:
  teaser: /assets/images/thumbnails/kaggle.png
comments: true
excerpt: "This post entails my experiences with my first ever Kaggle competition, which was fun, and at the same time, nerve-wracking."
---

<style>
  .center-image{
      margin: 0 auto;
      display: block;
  }
</style>

Sup ya'll. Been a long time since my last post. About a month I guess. Why? I don't know.  Anyway...

I'm doing a 5 month course on deep learning called [PadhAI](https://padhai.onefourthlabs.in). The end goal is to translate text in a picture to another language (Hindi to Tamil and vice versa). Seems pretty simple but it contains a LOT of steps. Kinda daunting at first but once you start understanding the concepts separately, you get a better idea of the big picture. In the first phase of the course, we were supposed to build a like/dislike predictor for mobile phones. The dataset given contained various feature like screen size, battery capacity, RAM... and much more. There were two contests, one using MP Neuron and Perceptron.

After going over the initial hurdles of submitting the sample solution, I was able to successfully implement the MP Neuron model with an initial test categorization accuracy of about 77%. But this was just the basic model. I had not done any modifications to my model to make it more accurate.

So for the next two days, I tried the following:
* binarization of columns using the mean of each column
* binarization of columns using the mean of phones with a positive rating
* feature selection
* a lot more bullshit that I randomnly implemented without thinking and hoping it would boost accuracy. Spoiler alert: It didn't.

But to no avail. Frustrated, I tried other wacky solutions, and one seemed to work. I binarized each column based on the mean of phones with a negative rating. Seems counterintuitive but it worked. For the test data anyway. It boosted the accuracy from 77% to 82%. (this might not seem like a lot but in fact it is, in the world of machine learning). I was ecstatic. My public ranking went from somewhere around 900s, to the #110. I became the top 10% of that contest. Excited, I posted a WhatsApp status thinking I was Einstein or some shit.

![whyidodat](/assets/images/kaggle-01/kaggle-yay.jpg "Woohoo!"){: .center-image .img-responsive}

Later on, I figured out that binarizing by the mean of disliked phones is not the right thing to do, and it just managed to work for the sample test data by luck and will not help when it comes to the training data. So, being the scaredycat I am, changed my code to binarize the columns using the mean of each column of the liked phones. Accuracy dropped back to 77%, but I was willing to take my chances. For those who don't know, the leaderboard is split into public leaderboard and private leaderboard. Public leaderboards uses 30% of the test data but the private leaderboard uses 70% of the test data.)

To my utter dismay, it did not work. I woke up the next day, expected a top 10% score on the leaderboard but no. My rank had shot down *985 places*. I felt so disheartened I didn't look at the course for an entire week, lol.

![i cri everytiem](/assets/images/kaggle-01/kaggle-sad.png "I want to jump off a cliff."){: .center-image .img-responsive}

Thinking back, there might be a few reasons why my rank decreased:
* Wrong implementation of mean binarization
* Failure to do feature selection. Some columns could not have had any effect on the rating of the phones, and dropping them would've increased the accuracy.
* Selective binarization on each column. I still don't know how this works.
 Everytime you submit your model, you cross your fingers and hope that you get a good accuracy. Looking at the leaderboards, it looks like the scoring is based on luck for the most part. I've seen people who have shot up 900 places and people have shot down 900 places. Unfortunately I was among the latter.

I mean, look at this guy:

![impossibru](/assets/images/kaggle-01/kaggle-omg.png "WHY. JUST WHY?"){: .center-image .img-responsive}
![wtf](https://media.giphy.com/media/aZ3LDBs1ExsE8/giphy.gif){: .center-image}

Here's a quora comment that captures my experience:

> There is an art and a science in doing so and experience Kagglers are able to make the most out of it without overfitting. If not done well, that usually lends itself to worse scores on the private LB, sometimes disasters. In general the key is to build a model that generalizes well. Local cross validation is essential for that. But the public LB provides also some signal. Kaggle Masters can use cross validation and public LB to optimize private LB scores.

*I think I get the gist of how Kaggle works. I don't like it, but I kinda like it.*

![wat](https://media.giphy.com/media/pPhyAv5t9V8djyRFJH/giphy.gif){: .center-image}

### Source Code

Meh. I don't like how I coded it. I'm going to post it anyway. My solution is at the bottom section of the notebook. If you can't see the Github Gist below, it's because of browser plugins like Adblock or Privacy Badger. Disable them on my site to see them. Don't worry, it's safe! :)

{% gist 78dd5f64e991e8f22a9e8e77012e3e91 %}

By the time I wrote this, I've finished 2 other contests. I will write another blog post when something exciting happens.

*Till then, it's sayonara.*

From the stars,

FR.


text:
---
layout: post
title: Vaadin 14 - Troubleshooting
---

Sometimes Vaadin 14 fails mysteriously, which is very unfortunate: it now uses
LOTS of JavaScript code, frameworks and tools. Those things are unfamiliar to server-side
guys, and it's really hard to tell what to do, should one of JavaScript toolchain fail.

This article remedies that, by listing a bunch of troubleshooting ideas and FAQs to
follow and check out. We expect a basic knowledge of Vaadin toolchain here, please
read the [Vaadin: the missing guide](../Vaadin-the-missing-guide/) article
and the [Vaadin Plugin under the hood](../Vaadin-Plugin-under-the-hood/) article first.

## What to verify server-side

To remove the possibility of random issues caused by corrupted `node_modules`
or inproper javascript package versions in `package.json` and `package-lock.json`/`pnpm-lock.yaml`,
it's always good to start the bug hunting with the **Vaadin Dance**.

### The Vaadin Dance

Sometimes Vaadin will fail to update `package.yaml` and `package-lock.yaml` with
new versions of npm modules (especially after a Vaadin version update),
or sometimes the `node_modules` becomes corrupted, or `package.yaml` will list
multiple versions of the same thing.

The best thing to do first is to perform the "Vaadin Dance" (akin to [Eclipse Dance](http://underlap.blogspot.com/2011/10/eclipse-dance-steps.html)):
delete all npm-related packages, npm config files and webpack config files and force
Vaadin to start from the clean state. You can achieve this by deleting the following files:

* `node_modules`
* `package-lock.json` (if using npm)
* `webpack.generated.js`
* `pnpm-lock.yaml` (if using pnpm)
* `pnpmfile.js` (if using pnpm)

> Note: You can try to remove the `package.json` as well, however
> for Vaadin 14.6 and newer **it is not recommended to remove the `package.json` file completely**,
> as this can break your project if you have any frontend dependencies that
> have been added directly to it, like is the case with Fusion based views or theming related dependencies.

> Note: With [Vaadin Gradle plugin](https://github.com/vaadin/vaadin-gradle-plugin)
you can simply run the `vaadinClean` task to do this; there's a [feature request for Vaadin Maven Plugin](https://github.com/vaadin/flow/issues/8885)
for the same functionality.

Then run the `prepare-frontend` task, to re-create those files. Note that the `node_modules`
is populated later: either by Vaadin Servlet when running in development mode, or
by `build-frontend` when building for production.

### Webpack build fails

If the failure is as follows:

```
ERROR [dev-webpack] (webpack) Module build failed: Error: ENOENT: no such file or directory, open '......\target\frontend\generated-flow-imports.js'
```

You must run the `prepare-frontend` goal/task before the `build-frontend` goal/task. Please review the
Maven/Gradle stdout log and check that the `prepare-frontend` goal/task has been run.

### Clean pnpm-cache

When using pnpm, performing the Vaadin Dance may not be enough. The thing with pnpm
is that it manages a cache of downloaded javascript libraries (which is good and speeds
up the builds tremendously). However, `node_modules` is then populated not with actual files and folders,
but with symlinks to the pnpm cache instead. If by accident something has been
deleted from `node_modules` in an incorrect manner, it could be that the file got deleted
from the actual cache and the cache got corrupted.

In order to clear the cache and force pnpm to redownload everything, simply delete the
cache folder. The pnpm cache is located at `$HOME/.pnpm-store` on Linux/Mac.
Windows needs per-drive separated caches, since symlinks works only on the same drive.
Therefore, if your project is located on `D:\` , the cache is located at `D:\.pnpm-store`.

After the `.pnpm-store` cache folder has been deleted, perform the Vaadin Dance
and rebuild the app.

### Use npm instead of pnpm

pnpm is supposed to be a faster npm. However, the dependency resolution mechanism
works a bit differently and it may cause issues with Vaadin 14. There are a couple of
related bugs for Vaadin 14.5.x and lower: [#10571](https://github.com/vaadin/flow/issues/10571),
[#10572](https://github.com/vaadin/flow/issues/10572), [#11162](https://github.com/vaadin/flow/issues/11162).

For Vaadin 14, it's recommended to use npm.

### Gradle: use matching version of Vaadin and the Plugin

Please see the Compatibility Chart at [Vaadin Gradle Plugin home page](https://github.com/vaadin/vaadin-gradle-plugin/),
to see which plugin version to use with which Vaadin version.

Gradle Plugin 0.7.0 may not work correctly with Vaadin 14.1.x;
Gradle Plugin 0.6.0 may not work correctly with Vaadin 14.2+ (even though there
are reports from users that it works just fine :-)

### Use newest Vaadin

Use the newest Vaadin 14.x - there are also fixes with respect to the JavaScript
toolchain; for example it could be that at some point Vaadin will be able to detect
all breaks and issues and the Vaadin Dance will be unnecessary.

### Development mode issues

If your webpack or npm is failing with a cryptic error messages, please make sure that
you have the `flow-build-info.json` on your classpath, and the `npmFolder` path
correctly points to your project location, and the `frontendFolder` correctly
points to the `frontend/` folder in your project.

### Production mode issues: make sure the necessary files are present

Make sure that all of the Vaadin files are present in the WAR/EAR/JAR archive, when
built for production mode via the `build-frontend` Plugin task:

* Most importantly, the `flow-build-info.json` file, located on classpath in the
  `META-INF/VAADIN/config/` package.
  * In a WAR archive it's located in the
  `WEB-INF/classes/META-INF/VAADIN/config/` folder; in a SpringBoot JAR it's located
  in `BOOT-INF/classes/META-INF/VAADIN/config/` folder.
  * Make sure that it sets the following properties as follows:
  `"compatibilityMode": false, "productionMode": true, "enableDevServer": false`
  * See [Vaadin: the missing guide](../Vaadin-the-missing-guide/) for an example of
  how the file should look like.
* The `stats.json` file, located on classpath right next to the `flow-build-info.json`,
  in the same package.
* The `META-INF/VAADIN/build/` folder is populated as follows:

```
├── vaadin-2-18d67c4ccff7e93b081a.cache.js
├── vaadin-2-18d67c4ccff7e93b081a.cache.js.gz
├── vaadin-3-b0147df339bf18eb7618.cache.js
├── vaadin-3-b0147df339bf18eb7618.cache.js.gz
├── vaadin-4-ee1d2e45569f7eca4292.cache.js
├── vaadin-4-ee1d2e45569f7eca4292.cache.js.gz
├── vaadin-5-5e9292474e82143d0a27.cache.js
├── vaadin-5-5e9292474e82143d0a27.cache.js.gz
├── vaadin-bundle-19a00eae62ad7cddd291.cache.js
├── vaadin-bundle-19a00eae62ad7cddd291.cache.js.gz
├── vaadin-bundle.es5-b1c1a3cc054c62ad7949.cache.js
├── vaadin-bundle.es5-b1c1a3cc054c62ad7949.cache.js.gz
└── webcomponentsjs
    ├── bundles
    │   ├── webcomponents-ce.js
    │   ├── webcomponents-ce.js.map
    │   ├── webcomponents-sd-ce.js
    │   ├── webcomponents-sd-ce.js.map
    │   ├── webcomponents-sd-ce-pf.js
    │   ├── webcomponents-sd-ce-pf.js.map
    │   ├── webcomponents-sd.js
    │   └── webcomponents-sd.js.map
    ├── custom-elements-es5-adapter.js
    ├── LICENSE.md
    ├── package.json
    ├── README.md
    ├── src
    │   └── entrypoints
    │       ├── custom-elements-es5-adapter-index.js
    │       ├── webcomponents-bundle-index.js
    │       ├── webcomponents-ce-index.js
    │       ├── webcomponents-sd-ce-index.js
    │       ├── webcomponents-sd-ce-pf-index.js
    │       └── webcomponents-sd-index.js
    ├── webcomponents-bundle.js
    ├── webcomponents-bundle.js.map
    └── webcomponents-loader.js
```

**Important:** in the development mode, only the `flow-build-info.json` needs to
be present on the classpath. Vaadin Servlet will internally start a child `webpack`
process and will transfer all other files internally from `webpack`.

## What to verify in your browser

You should at some point learn how to use your browser's dev tools:

* [Firefox Dev Tools Guide](https://developer.mozilla.org/en-US/docs/Tools)
* [Chrome Dev Tools Guide](https://developers.google.com/web/tools/chrome-devtools)

The Dev Tools is an IDE integrated into your browser which you use to:

* Debug javascript if something goes wrong
* Debug CSS layouts if something is positioned in an odd way
* Profile javascript when something is slow (e.g. when making a bug report to Vaadin Grid)

If you do not understand something in the text below, please refer to the Dev Tools
guides above.

### Quick tips

Press F12 in your browser to fire up dev tools, then head to the `Network` tab and reload
the page. It should download a bunch of files with the HTTP 200 OK result code, most importantly
the `webcomponents-loader.js`, `vaadin-bundle-*.js` and `client-*.cache.js`:

![dev_tools_network.png]({{ site.baseurl }}/images/2020-6-26/dev_tools_network.png)

If those files fail to download then Vaadin Client side will not initialize at all. Most
common incorrect HTTP codes are:

* 404 NOT FOUND: VaadinServlet is mapped to a different context root, or not mapped at all, or not activated by the servlet container at all.
* 403 FORBIDDEN: Make sure your Spring Security allows those files to pass through.
* Even on 200 OK, the web server may be lying to you.
  Make sure that the content downloaded is valid; for example a request to `vaadin-bundle.js`
  actually downloads a JavaScript file and not for example a HTML login form.
  This happened to me on WebSphere; the request even succeeded with 200 OK!

If everything looks okay in the "Network" tab, go into the "Console" tab and make sure
there are no "red" errors logged in the console, preventing Vaadin from initializing.
Please see the [Vaadin Troubleshooting - Browser](../Vaadin-troubleshooting-browser/)
article for more details on this.

Then, type this into the "Console" command prompt:

```javascript
customElements.get("vaadin-button")
```

It should print something like `class xyz { constructor }`: that means that the
`vaadin-button` web component is registered properly. However, if it prints
`undefined` then there's something very wrong going on and Vaadin hasn't been initialized
on the client-side properly.

### My component doesn't work

It's a good idea to confirm that your web component was loaded properly, via the
JavaScript Console:

```javascript
customElements.get("my-component")
```

If this prints `undefined` then:
* Verify that at least Vaadin has loaded properly, by trying `customElements.get("vaadin-button")`
  as described above. If Vaadin is not loaded, see above for steps to take.
* Please note that the `@HtmlImport` annotation is completely ignored when Vaadin
  is running in npm mode - you need to use `@NpmPackage()` and `@JsModule()` instead. Also see below
  for tips.
* (Development mode only): It could be that the webpack bundle was not rebuilt
  properly. Try restarting the server - it could cause Vaadin Servlet
  to notice changes, run `npm install` and update the `package.json` and `package-lock.json` files.
  Also try to run the `prepare-frontend` task/goal, to update `package.json` and `package-lock.json` files.
* Try to verify whether the npm module is present in both
  `package.json` and `package-lock.json` files. If it's not,
  maybe Vaadin classpath scanning doesn't discover your `@NpmPackage()`-annotated
  class for some reason - make sure it's on classpath. Alternatively, the
  values of the `@NpmPackage()` annotations are wrong - please double-check the values.
* Try also performing the Vaadin Dance - it will force to re-generate `package.json`
  and `package-lock.json` and the dependency may now appear.
* TODO what else to check in this case?

If the `customElements.get("my-component")` command prints something like
`class a { constructor(args) }` then the web component is registered properly.
You can print the version of the web component, by typing

```javascript
customElements.get("my-component").version
```

To call methods on the web component, simply select the DOM element in the
"Inspector" tab, and you can then reference the selected node via the `$0` expression:

```javascript
$0.click()
```

### `@HtmlImport` doesn't work

Yes, the `@HtmlImport` annotation is completely ignored when Vaadin runs in npm mode.
You either need to run Vaadin in compatibility mode, or simply replace the annotation
with `@NpmPackage`. For example, for `<iron-form>`, the following declaration
is not enough:

```java
@Tag("iron-form")
@HtmlImport("frontend://bower_components/iron-form/iron-form.html")
public class IronForm extends HtmlContainer {}
```

The correct declaration which works both in compatibility mode and in the npm mode:

```java
@Tag("iron-form")
@HtmlImport("frontend://bower_components/iron-form/iron-form.html")
@NpmPackage(value = "@polymer/iron-form", version = "3.0.1")
<EMAIL_ADDRESS>public class IronForm extends HtmlContainer {}
```

### `@HtmlImport`/`@JsModule`/`@JavaScript` don't work as expected

Please see the [Vaadin 14 - difference between `@JsModule` and `@JavaScript` in npm mode](../Vaadin-difference-jsmodule-javascript/) article.

### JavaScript compilation or Webpack fails

Please perform the "Vaadin Dance" as mentioned above - it could be that the `package-lock`
references an incompatible combination of package versions, or obsolete versions of
tools such as Babel.

In addition, try to delete the following folders (if they exist):

* `$HOME/.vaadin`: contains a node.js distro downloaded by Vaadin; maybe it became corrupted?)
* `$HOME/.pnpm-store` (if you're using pnpm): contains pnpm's cache of JavaScript packages,
  maybe they somehow became corrupted)

### Others

Search the [Vaadin Flow Bug tracker](https://github.com/vaadin/flow/issues) for
any issue you will find in the JavaScript console. If the issue is not yet reported,
please report it so that it can be investigated (or Vaadin's error messages can be improved).

Please let me know at<EMAIL_ADDRESS>and I'll add more tips.


text:
# Vacation Suggestions!

#### Vacation Suggester Project, 06.15.2016

#### By Zachary Richards

## Description

This page is a basic survey for suggesting a vacation destination.

## Setup/Installation Requirements

Clone this repository

## Known Bugs

No known bugs to this point.

## Support and contact details

http://zacharyjrich.github.io/project2_vacation_suggester

https://github.com/zacharyjrich/project2_vacation_suggester

## Technologies Used

HTML

CSS

Bootstrap

jQuery

Javascript

### License

Copyright (c) 2016 Zachary Richards

This software is licensed under the MIT license


text:
---
layout: post
title:  "Top 3 Wedding Guest Books"
author: Thomas
categories: [ Wedding ]
image: assets/images/guest-book.jpeg
tags: [featured]
---
Are you getting ready for you Big Day? If so, then perhaps you already know how time-consuming and expensive planning a wedding can be!
Especially, when you're searching for a wedding guest book having thousands of different options to choose from.
That's why we decided to save you time and money and created this compilation of the top 3 wedding guest books that you can purchase online.

## #1 White Dove Publications Wedding Guest Book

If I had to put it in a few words I'd say **this product is astonishing!** Not only does it look elegant but it also comes with a premium pen and table sign. The ink is rich, deep black that won’t ever bleed through the pages. The pen feels good in your hand and stores conveniently in the box it will arrive in. The card stands up, allowing guests to locate this book during Your wedding event.

The product arrived at my house in under 2 days (due to Amazon Prime shipping within the US) packaged in a lovely gold embossed box. I was very pleased with the product!

Product's key features:

You can Buy this lovely wedding guest book [here](https://www.amazon.com/White-Dove-Publications-Hardcover-Signature/dp/B082LVL47N/ref=sr_1_75?crid=8L054ZCGN7E9&keywords=wedding+guest+book&qid=1580904677&sprefix=wedding+guest%2Caps%2C243&sr=8-75).

## #2 Custom Gold Foil Wedding Guest Book

This wedding guest book looks simple yet beautiful, but more importantly it's personalised. Details like names, the place where the wedding is going to take place, dates, and more can be featured on the book's cover and even within the pages!

I really like the idea of featuring names on a wedding guest book's cover as it adds more personal touch to it.

Product's key features:

This wedding guest book is available [here](https://www.etsy.com/listing/458357366/gold-foil-wedding-guest-book-alternative?ga_order=most_relevant&ga_search_type=all&ga_view_type=gallery&ga_search_query=wedding+guest+book&ref=sc_gallery-1-2&plkey=0942c154b9870785d64795e37fcdddb933c892df%3A458357366&bes=1&col=1).

## #3 Personalized Wooden Wedding Guest Book

Last but not least, you might be interested in this personalized wooden wedding guest book. The book's cover looks outstanding and features a big heart and your names right below it. There's different color variations available for the heart (red, pink, golden, silver and white).

However, this seller is based in the UK, so you might have to pay an extra fee for the delivery to the US.

Product's key features:

This wedding guest book is available [here](https://www.ebay.co.uk/itm/Personalised-Wedding-Guest-Book-Scrapbook-Album-Wooden-Mr-Mrs-40-PAGES-/132499299460).

repository: ThomasLech/guest-book-club

repo_name: ThomasLech/guest-book-club


text:
# TL;DR

Setup a demolab with 20 VM's setup for ssh access.

## 1. QuickStart

```
gen3 workon <profile> <name>_demolab
```

Ex.
```
$ gen3 workon cdistest april2019_demolab
```

## 2. Table of content

- [1. QuickStart](#1-quickstart)
- [2. Table of Contents](#2-table-of-contents)
- [3. Overview](#3-overview)
- [4. Variables](#4-variables)
  - [4.1 Required Variables](#41-required-variables)
  - [4.2 Optional Variables](#42-optional-variables)

## 3. Overview

Once you workon the workspace, you may want to edit the config.tfvars accordingly. However, assuming you used the example above, you may not need to. You must check the file nonetheless.

Ex.
```
fauziv1@cdistest_admin ~/cloud-automation
 % cat ~/.local/share/gen3/cdistest/fauziv1_es/config.tfvars
vpc_name   = "april2019_demolab"
```

## 4. Variables

By default the vpc_name would be configured properly at the moment workon is executed. There are no more variables for this module.

repository: uc-cdis/cloud-automation

gha_language: Shell

repo_name: uc-cdis/cloud-automation


text:
# Changelog

All Notable changes to `opening-hours` will be documented in this file

## 1.1.0 - 2016-11-09
- Added timezone support

## 1.0.3 - 2016-10-18
- `isClosedOn` fix

## 1.0.2 - 2016-10-13

- Fixed missing import in `Time` class

## 1.0.1 - 2016-10-13

- Replaced `DateTime` by `DateTimeInterface`

## 1.0.0 - 2016-10-07

- First release

repository: christophrumpel/opening-hours

repo_name: christophrumpel/opening-hours


text:
### Git

Create a new checkpoint

```shell
$ git add .
$ git commit -m "Done with allowing the player to choose a difficulty "
$ git push
```

---

### Trello

This means you finished the card

> "As a player I can choose a difficulty level"

Move the card from the `Doing` list to `Done`

repository: theunicornguild/can-you-remember

repo_name: theunicornguild/can-you-remember


text:
## Decorator Pattern

### Decorator Class Diagram
- ![](imgs/decorator_pattern_03.png)

### Common Interface
- A single core component, several optional wrappers and a "common interface".
- Create a "common interface" that makes all classes interchangeable.
~~~java
public interface IceCream {
    double getPrice();
}
~~~
### Abstract Decorator
- Create Decorator  to support the optional wrapper classes.
- The Decorator class declares a composition relationship to the "common interface", and this data member is initialized in its constructor.
- The Decorator class delegates to the "common interface".
~~~java
public abstract class IceCreamDecorator implements IceCream{
    IceCream iceCream;

    public IceCreamDecorator(IceCream iceCream) {
        this.iceCream = iceCream;
    }

    public double getPrice() {
        return iceCream.getPrice();
    }
}
~~~

### Core Component
- The Core class and Decorator class inherit from the same "common interface".
~~~java
public class ConcreteIceCream implements IceCream {
    public double getPrice() {
        return 1.0;
    }
}
~~~

### Decorator derived classes
- Define a **Decorator derived class** for each optional wrapper.
- **Decorator derived classes**
    - implement their wrapper functionality
    - delegate to the Decorator base class
~~~java
public class Container extends IceCreamDecorator {
    public Container(IceCream iceCream) {
        super(iceCream);
    }
}

public class EdibleConeContainer extends Container {
    public EdibleConeContainer(IceCream iceCream) {
        super(iceCream);
    }

    public double getPrice(){
        return super.getPrice() + 0.40;
    }
}

public class Flavor extends IceCreamDecorator {
    public Flavor(IceCream iceCream) {
        super(iceCream);
    }
}

public class StrawberryFlavor extends Flavor {
    public StrawberryFlavor(IceCream iceCream) {
        super(iceCream);
    }

    public double getPrice(){
        return super.getPrice() + 2.0;
    }
}
~~~

### Client
- The client configures the type and ordering of Core and Decorator objects.
~~~java
public class IceCreamShop {
    public static void main(String[] args) {
        IceCream iceCream = new VanillaFlavor(
                new PlasticCupContainer(
                        new ConcreteIceCream()
                )
        );
        System.out.println(iceCream.getPrice());

        iceCream = new VanillaFlavor(
                new EdibleConeContainer(
                        new ConcreteIceCream()
                )
        );
        System.out.println(iceCream.getPrice());

        iceCream = new VanillaFlavor(
                new EdibleCupContainer(
                        new ConcreteIceCream()
                )
        );
        System.out.println(iceCream.getPrice());

        iceCream = new VanillaFlavor(
                new StrawberryFlavor(
                        new EdibleCupContainer(
                                new ConcreteIceCream()
                        )
                )
        );
        System.out.println(iceCream.getPrice());

        iceCream = new VanillaFlavor(
                new StrawberryFlavor(
                        new EdibleCupContainer(
                                new ChocolateSyrupTopping(
                                        new ConcreteIceCream()
                                )
                        )
                )
        );
        System.out.println(iceCream.getPrice());
    }
}

    Output :

    2.25
    2.4
    2.8
    4.8
    5.3
~~~

### Comparison with other Patterns
- Adapter provides a different interface to its subject.
    - Proxy provides the same interface.
    - Decorator provides an enhanced interface.
- Adapter changes an object's interface,
    - Decorator enhances an object's responsibilities.
    - Decorator is thus more transparent to the client.
    - **Decorator supports recursive composition**, which isn't possible with pure Adapters.
- Composite and Decorator have similar structure diagrams,
    -reflecting the fact that both rely on recursive composition to organize an open-ended number of objects.
- A Decorator can be viewed as a degenerate Composite with only one component.
    - However, a Decorator adds additional responsibilities - it isn't intended for object aggregation.
- Decorator is designed to let you add responsibilities to objects without subclassing.
    - Composite's focus is not on wrapper but on representation.
    - These intents are distinct but complementary.
- Composite could use Chain of Responsibility to let components access global properties through their parent.
    - It could also use Decorator to override these properties on parts of the composition.
- Decorator and Proxy have different purposes but similar structures.
    - Both describe how to provide a level of indirection to another object,
    - Implementations keep a reference to the object to which they forward requests.
- Decorator lets you change the skin of an object.
    - Strategy lets you change the guts.


text:
## How to convert PDF to BMP in VBScript and VB6 using ByteScout PDF Renderer SDK

### The tutorial shows how to convert PDF to BMP in VBScript and VB6

This sample source code below will demonstrate you how to convert PDF to BMP in VBScript and VB6. ByteScout PDF Renderer SDK can convert PDF to BMP. It can be used from VBScript and VB6. ByteScout PDF Renderer SDK is the library that renders PDF into high quality images and thumbnails. Includes various functions like batch processing, PNG, TIFF output. Can be used from web and desktop applications.

The SDK samples like this one below explain how to quickly make your application do convert PDF to BMP in VBScript and VB6 with the help of ByteScout PDF Renderer SDK. In your VBScript and VB6 project or application you may simply copy & paste the code and then run your app! Code testing will allow the function to be tested and work properly with your data.

Free trial version of ByteScout PDF Renderer SDK is available for download from our website. Get it to try other source code samples for VBScript and VB6.

## Get In Touch

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=ByteScout%20PDF%20Renderer%20SDK%20Question)

or send email to [support@bytescout.com](mailto:support@bytescout.com?subject=ByteScout%20PDF%20Renderer%20SDK%20Question)

## Free Trial Download

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)

## Web API (On-demand version)

[Get your free API key](https://pdf.co/documentation/api?utm_source=github-readme)

## API Documentation and References

[Explore ByteScout PDF Renderer SDK Documentation](https://bytescout.com/documentation/index.html?utm_source=github-readme)

[Explore Web API Documentation](https://pdf.co/documentation/api?utm_source=github-readme)

[Check Free Training Sessions for ByteScout%20PDF%20Renderer%20SDK](https://academy.bytescout.com/)

## Video Review

[https://www.youtube.com/watch?v=eenhl7106lA](https://www.youtube.com/watch?v=eenhl7106lA)

url: https://raw.githubusercontent.com/repohoarder/ByteScout-SDK-SourceCode/32dd9367cebb66e3aa16bd803798c026d7dfeed5/PDF Renderer SDK/VBScript and VB6/Convert PDF To BMP/README.md

repository: repohoarder/ByteScout-SDK-SourceCode

repo_name: repohoarder/ByteScout-SDK-SourceCode


text:
# wcfperformancecomparison
WCF bindings and configurations performance comparison

Prerequisites

Port access required. Use ‘Run as Administrator’ or add a url reservation using ‘netsh http add urlacl url=http://+:6766/ user=MYMACHINE/MYACCOUNT’. Mind the tailing slash in the url, and scheme (http or https)

For Https bindings, a certificate is required. Localhost's is OK. It can be set up by 'netsh http add sslcert ipport=<IP_ADDRESS>:7866 certhash=<cert thumbprint> appid={<server assembly guid>>} certstorename=MY'

repository: AlexSeleznyov/wcfperformancecomparison

repo_name: AlexSeleznyov/wcfperformancecomparison