text:
# Front-End Customization

Custom JavaScript and CSS can be added to the web app using a [webapp plugin](../back-end/webplugins.md).

```js
app.registerJavaScript("plugin.js");
app.registerCss("plugin.css");
```

JavaScript can also be added to the web application, but not loaded immediately by passing `false` as an optional second parameter.

```js
app.registerJavaScript("myCustomComponent.js", false);
```

# Extension Points

Extension points are places built into Visallo that can define additional behavior. Custom plugins can also define extension points that can be implemented by other plugins.

An extension point is simply a mapping from a string – the namespaced extension point name – to a JavaScript object. What kind of object is defined by the consumer of the extension point.

All registered extension points are viewable in the admin panel, under `UI Extensions`

## Register an extension point

To register some custom behavior, require the `registry` module.

```js
require(['configuration/plugins/registry'], function(registry) {
    registry.registerExtension([extension point name], [extension point object])
})
```

For example, to add an item to the menubar:

```js
registry.registerExtension('org.visallo.menubar', {
    title: 'New'
    identifier: 'org-visallo-example-new',
    action: {
        type: 'full',
        componentPath: 'example-new-page'
    },
    icon: '../img/new.png'
});
```

Visallo plugins can also define extension points. They do not need to be defined ahead of time, simply ask the registry for all registered extensions using a unique point name.

```js
registry.extensionsForPoint([extension point name]);
// Returns array of registered objects
```

It is good practice to define some documentation for your new extension point. Documenting provides a validation function, and a description shown in the admin panel under UI Extensions. Document the extension point prior to requesting `extensionsForPoint`.

```js
registry.documentExtensionPoint('org.visallo.menubar',
    'Add items to menubar',
    function validator(e) {
        return ('title' in e) && ('identifier' in e) && ('action' in e) && ('icon' in e);
    }
);
```

This documentation appears in the admin pane under UI Extensions. Add an external documentation URL using an optional 3rd parameter.

```js
registry.documentExtensionPoint('com.example.point',
    'Description...',
    function () { return true; },
    'http://example.com/docs'
);
```

repository: bings/visallo

repo_name: bings/visallo


text:
# Record parsing and requirements

## Record validation and normalization

Nanotube checks every record it receives, if it consists of three fields. If not, it logs a warning.

It is possible to turn on record normalization with the `NormalizeRecords` option in general configuration. It is on by default. Normalizations performed are mainly for backward compatibility with `carbon-c-relay`, namely:

- Double or more subsequent dots in path are converted to a single dot: `a.b..c` -> `a.b.c`
- Prefix and trailing dots in path are removed: `.a.b.c.` -> `a.b.c`
- Spaces in record are normalized to a single space character: `a.b.c␣␣␣1.23\t1234567` -> `a.b.c␣1.23␣1234567`
- Characters not in the set `[0-9a-zA-Z-_:#]` are replaced with `_`.

## Parsing algorithm

Here's how we parse the records in Graphite line protocol.

1. Record is broken into 3 tokens separated by any combination of spaces `' '` or `'\t'`.
2. If normalization is enabled, the first token - which is the path - gets normalized:
   1. Leading and trailing dots `.` are removed.
   2. Duplicated dots are merged, e.g. `a...b` becomes `a.b`.
   3. If character is not one of `a-zA-Z0-9` or `:_-#.`, it is replaced by `_`.

## Requirements for the records

* All records have to be in ASCII.
* On top of that, only characters `a-zA-Z0-9` or `:_-#.` are permitted.
* When sending to TCP or UDP, records have to be separated by `\n`.
* When sending via UDP, records cannot be split between datagrams.

repository: bookingcom/nanotube

branch_name: refs/heads/master

extension: md

gha_language: Go

license_type: permissive

repo_name: bookingcom/nanotube


text:
---
layout: post
title: Panther
date: 2017-06-05
description:
icon: /assets/img/robots/panther/panther-200.jpg
image: /assets/img/robots/panther/panther.jpg
introduction: Panther is an outdoor tracked robot, with a ZED stereocamera and an NVIDIA Jetson TX2, this robot can interact with all objects around it.
main-class: 'ground'
color: '#266099'
tags:
- 'diff-drive'
- 'ground'
- 'mobile robot'
- 'outdoor'
- 'research'
twitter_text: Checkout the Panther
website: http://rnext.it/panther/
wiki_homepage: http://wiki.ros.org/Robots/Panther
---

## Panther

Panther (Powerful Autonomous eNTity High-End Robot) is an outdoor tracked robot, with a ZED stereocamera and an NVIDIA Jetson TX2, this robot can interact with all objects around it.

This robot can climbs little rocks and little bumps. it is heavy with 9kg and with the big size 42cm with, 40cm deep and 30cm height, have a ground clearance of 7cm. The tracks have a particular damping system, with three different dampers to absorbe all vibration when the robot drift on the grass.

### Characteristics:
* Dimensions: 42 x 40 x 30 cm
* Ground clearance: 7cm
* Weight: 11 Kg
* Electronics and sensors:
  * NVIDIA Jetson TX2
  * unav board or roboteq SDC2130
  * ZED stereloabs camera
  * 2x encoder 1024 CPR
  * LIDAR (upgrade coming soon)
* Motors:
  * 2x P2052416 - 52.8W - 150Ncm
* Battery:
  * 6S1P LiPo battery 22.2V - 5Ah
* Materials:
  * Makerbeam's frame
  * Cover and Tracks in transparent PVC
* Other:
  * 2 speakers
  * 2 microphones
  * OLED strips

Project author: Raffaello Bonghi

## Videos

license: MIT

branch_name: refs/heads/gh-pages

gha_language: HTML

gha_license_id: NOASSERTION


text:
# deltaspike-test-sample
Example of how to test a CDI application with DeltaSpikes CdiTestRunner.
It tests beans which are
@RequestScoped,
@SessionScoped or
@WindowScoped.
The setup based on the documentation from
[DeltaSpike](https://deltaspike.apache.org/documentation/test-control.html).

Run the test with OpenEJB, OpenWebBeans or Weld:

```
mvn -Popenejb clean install
```
or
```
mvn -Popenwebbeans clean install
```
or
```
mvn -Pweld clean install
```

The tests works with Java 8 with all 3 implementations and OpenWebBeans and Weld
are working with all current Java versions:

|                    | Java 8 | Java 9 | Java 10 | Java 11 | Java 12 | Java 13 |
|--------------------|--------|--------|---------|---------|---------|---------|
| OpenEJB 7.0.2      |    ✓   |        |         |         |         |         |
| OpenWebBeans 1.7.6 |    ✓   |    ✓   |    ✓    |    ✓    |    ✓    |    ✓    |
| Weld 2.4.8.Final   |    ✓   |    ✓   |    ✓    |    ✓    |    ✓    |    ✓    |

gha_language: Java


text:
# Telemetry

Slipstream emits telemetry events for both processes: the client process and
the connection process.

Telemetry for the connection process is very low-level: information about
each message and before-and-after states for the connection. This telemetry
aides in debugging failure-states of Slipstream and can be useful for
development, but is likely not worth ingesting for average Slipstream users.

Client process telemetry is similar to the telemetry emitted by
`Phoenix.Channel`s and is recommended for consumption by average Slipstream
users.

## Client-process Telemetry

Clients emit telemetry in two categories:

- basic channel connection and topic join events
- callback events

The first emulate two-of-three events emitted by `Phoenix.Channel`s (at time
of writing):

- `[:slipstream, :client, :connect]` - dispatched at the end of a successful
  client connection to a remote websocket host
    - metadata
      ```elixir
      %{
        start_time: DateTime.t(),
        configuration: Slipstream.Configuration.t(),
        socket: Slipstream.Socket.t(),
        # emitted only on the stop event:
        response_headers: [{String.t(), String.t()}]
      }
      ```
- `[:slipstream, :client, :join]` - dispatched at the end of a successful
  join onto a topic
    - metadata
      ```elixir
      %{
        start_time: DateTime.t(),
        socket: Slipstream.Socket.t(),
        topic: String.t(),
        params: Slipstream.json_serializable(),
        # emitted only on the stop event:
        response: Slipstream.json_serializable()
      }
      ```

The second is emitted for any callback defined by the `Slipstream` module. Each
of these events are emitted under the event name of
`[:slipstream, :client, callback]`, where `callback` is any callback defined
by `Slipstream`, e.g. `:handle_message`. The metadata for these events is as
follows:

```elixir
%{
  client: module(),
  callback: atom(),
  arguments: [any()],
  socket: Slipstream.Socket.t(),
  start_time: DateTime.t(),
  # emitted only on the stop event
  response: any()
}
```

Note that all client-process events emulate `:telemetry.span/3` in naming and
in measurements, and in the case of callback events, the events are emitted
by `:telemetry.span/3`. This means that each of the above-described events
are actually prefixes, and each event name below represents messages of
`event_prefix ++ [:start]` and `event_prefix ++ [:stop]`, with exceptions
being emitted as `event_prefix ++ [:exception]`.

Client authors are encouraged to only subscribe to the callbacks they are
interested in (e.g. `:handle_message` or `:handle_reply`).

Note: events will _not_ be emitted for any messages handled by the `await_*`
family of synchronous functions.

## Connection-process Telemetry

Slipstream currently emits telemetry for each message received in its
`Slipstream.Connection` process. This aides in low-level debugging when one
desires to see the entire event-history of a connection.

A connection can be pieced together by the `:trace_id` and `:connection_id`
keys emitted in the metadata of these telemetry events. One
`Slipstream.Connection` process is guaranteed to only use one `:trace_id` and
one `:connection_id`.

The trace-id acts as a identifier which groups together all requests belonging
to that `Slipstream.Connection` process. Because the life-cycle of the GenServer
which runs the `Slipstream.Connection` process and the actual connection to a
remote websocket are the same, there doesn't appear to be much difference
between the `:trace_id` and the `:connection_id`, however, the `:connection_id`
can be considered the parent-ID for all spans, where each subsequent message
to the connection process is considered a span.

The `Slipstream.Connection` telemetry event prefixes are as follows:

`[:slipstream, :connection, :connect]`: an event which is executed at the
start and stop of the connection process's life-cycle.

The metadata contains:

```elixir
%{
  state: %Slipstream.Connection.State{},
  connection_id: String.t(),
  trace_id: String.t(),
  # UTC date-time stamp of start-of-connection
  start_time: DateTime.t()
}
```

`[:slipstream, :connection, :handle]`: an event executed for each message
received by the connection process.

Metadata contains:

```elixir
%{
  start_state: %Slipstream.Connection.State{},
  connection_id: String.t(),
  trace_id: String.t(),
  # unique to this message handle
  span_id: String.t(),
  # UTC date-time stamp of start-of-handling
  start_time: DateTime.t(),
  raw_message: term(),
  # included on the `event_prefix ++ [:stop]` events:
  message: term(),
  events: [%{type: atom(), attrs: map()}],
  built_events: [struct()],
  return: tuple(),
  end_state: %Slipstream.Connection.State{}
}
```

Each of these events follows the `:telemetry.span/3` pattern in measurements
and in names: `event_prefix ++ [:start]` and `event_prefix ++ [:stop]` events
are emitted using each of the above event prefixes.

Note: connection telemetry will _not_ be emitted for any connections simulated
in a `Slipstream.SocketTest`.

repository: fhunleth/slipstream

branch_name: refs/heads/main

repo_name: fhunleth/slipstream


text:
---
title: "Exporting and importing neurons"
linkTitle: "Exporting and importing neurons"
weight: 300
description: >
    How to export and import neurons from/to Horta
---

In this tutorial, we'll go over how to export and import traced neurons from/to Horta.

## Prerequisites

- You should be able to log into HortaCloud and launch the Horta application, as detailed in the first tutorial.
- You should be able to open a workspace in 3D and navigate the data, as detailed in the second tutorial.
- You should be able to create and add points to a neuron, as detailed in the third tutorial.

## Steps

### Open the workspace

Launch HortaCloud and open the workspace created in the previous tutorial, or any other workspace that you can trace in.

### Exporting neurons as SWC files

Once you've finished tracing a neuron, you will probably want to export the data for analysis or visualization in another piece of software. Horta supports import and export to the standard SWC file format. Details of the SWC format can be found in the "Reference" section.

To export a traced neuron:

1. Right click on its name in the neuron list and choose "Export SWC File". A file dialog box will open.
2. Name the file whatever you like. An extension of ".swc" is strongly recommended. The two options on the right are discussed in the "Basic Operations" section. The defaults are appropriate almost all of the time.
3. Choose the export location. For desktop, choose any location you like on your hard drive. For HortaCloud, we need to save to an intermediate location first. At the top of the dialog box, click the "Save in" drop-down menu and choose "Temporary Files".

{{< imglink src="../images-import-export/export-dialog.png" link="../images-import-export/export-dialog.png" alt="export neurons dialog" >}}

4. Click "OK". A "Background Tasks" window will open with a progress bar. This operation is very fast, and you may not even see the bar before it's filled. For desktop Horta, you're done after this step.
5. For HortaCloud users, you now need to download your file(s) from the "Temporary Files" location on AppStream. The AppStream toolbar appears at the top of the browser's content window, above the top of the Horta main window. Click the third icon from left, which has a tooltip of "My Files".
6. In the new dialog box that opens, click "Temporary Files". This is a web view into the folder where you exported your neuron. At the right end of the row for each file in this directory is a downward facing chevron. Click it and choose "Download" from the drop-down menu. Depending on your browser, you may be prompted to choose a location, or the file may be downloaded to your default downloads location. Also depending on your browser, you may need to authorize or confirm the download from the AppStream site.

{{< imglink src="../images-import-export/temporary-files-download.png" link="../images-import-export/temporary-files-download.png" alt="download from temporary files" >}}

{{% alert title="Safari" color="primary" %}}
File downloads seem not to work in Safari. Use Firefox or Chrome on Mac if you need to download from "Temporary Files". (Strangely, uploading files to the same location _does_ work in Safari.)
{{% /alert %}}

{{% alert title="Temporary means temporary!" color="primary" %}}
The name "Temporary Files" is accurate! The files in this location will be deleted when your session ends. You _must_ download any exported neurons to your local computer in the same session in which you exported them.
{{% /alert %}}

### Importing neurons from SWC files

Importing neurons from SWC files is basically the same as exporting, in reverse. Again, the HortaCloud procedure involves an intermediate location.

If you've been using the Janelia `2021-03-17` sample for your test, you can [download a test neuron to import](..//images-import-export/test-neuron.swc) (right-click and download the linked file). If you don't have access to the Janelia sample we're using in these tutorials, you can test importing a neuron into your own sample and workspace by simply exporting any neuron (as in the previous section), deleting the neuron using the "-" button under the neuron list, and then reimporting the same neuron.

To import a traced neuron:

1. Open a workspace that corresponds to the same sample the neuron was exported from. In other words, the exported neuron's SWC file must be using the same coordinate system and same scale as the target sample. If not, the imported neuron will not lie on top of the neuron signal in the images. In many cases, it will be imported somewhere in space far from the brain imagery.
2. (HortaCloud only) Upload the SWC file to AppStream. Click the "My Files" icon on the AppStream toolbar (third from left). Click "Temporary Files". You can drag files directly to this dialog box, and they will be uploaded. Alternately, click "Upload files" and choose the files from the file dialog that opens.
3. In Horta, click the gear menu under the workspace information area, above the neuron list. Choose "Import SWC file as separate neurons".
4. Desktop users may choose any neuron on their hard disk at this point. HortaCloud users should again navigate to the "Temporary Files" area by using the drop-down menu called "Look in" at the top. Either way, choose a neuron SWC file and then click "Open".
5. The "Background Tasks" window will again open, and the neuron will appear in the neurons list, and in the 2D or 3D views, if you have them open.

Once the neuron has loaded, it will be visible in the 3D view, the 2D view (if it's open), and the neuron list. If you select the test neuron in the neuron list, you'll see a large number of branch points and endpoints in the annotation list.

{{< imglink src="../images-import-export/test-neuron-import.png" link="../images-import-export/test-neuron-import.png" alt="imported test neuron" >}}

### Bulk import/export

See the "Basic Operations" section for more information on exporting multiple neurons at once, and on importing multiple neurons either interactive or in a offline batch process.

## What's next

After finishing these tutorials, you may want to read the "Basic Operations" section of the User Manual. This section will cover much of the same material discussed in these tutorials, with a few more details and a few more operations described. The "Features" section lists many less-commonly used tools. The "Reference" section contains details on, for example, file formats. Typically users will rarely need to consult that section.

repository: JaneliaSciComp/hortacloud-website

repo_name: JaneliaSciComp/hortacloud-website


text:
iLovePDF Api - NodeJS Library
--------------------------

NodeJS library for [iLovePDF Api](https://developer.ilovepdf.com)

You can sign up for a iLovePDF account at https://developer.ilovepdf.com .

Develop and automate PDF processing tasks like Compress PDF, Merge PDF, Split PDF, convert Office to PDF, PDF to JPG, Images to PDF, add Page Numbers, Rotate PDF, Unlock PDF, stamp a Watermark and Repair PDF. Each one with several settings to get your desired results.

## Requirements

Requirements to use this library are:

1. NPM - Package built with version @6.14.5 .
2. NodeJS - Package built with version @12.18.2 .

You cand download them [here](https://nodejs.org/en).

## Install

You can install the library via [NPM](https://www.npmjs.com). Run the following command:

```bash
npm install @ilovepdf/ilovepdf-nodejs
```

## Getting Started

### Using public URLs

```js
import ILovePDFApi from '@ilovepdf/ilovepdf-nodejs';

const instance = new ILovePDFApi('<PUBLIC_KEY>', '<SECRET_KEY>');

// Public and secret key can be found in your developer panel
// at https://developer.ilovepdf.com/user/projects .
const task = instance.newTask('merge');

// Promise-based way to use ILovePDFApi.
task.start()
.then(() => {
    return task.upload('<FILE_URL>');
})
.then(() => {
    return task.upload('<FILE_URL>');
})
.then(() => {
    return task.process();
})
.then(() => {
    return task.download();
})
.then((data) => {
    console.log('DONE');
});
```

### Using ILovePDFFile class

```js
import ILovePDFApi from '@ilovepdf/ilovepdf-nodejs';
import ILovePDFFile from '@ilovepdf/ilovepdf-nodejs/ILovePDFFile';

const instance = new ILovePDFApi('<PUBLIC_KEY>', '<SECRET_KEY>');

const task = instance.newTask('merge');

task.start()
.then(() => {
    const file = new ILovePDFFile('<FILE_PATH>');

    return task.upload(file);
})
.then(() => {
    return task.upload('<FILE_URL>');
})
.then(() => {
    return task.process();
})
.then(() => {
    return task.download();
})
.then((data) => {
    console.log('DONE');
});
```

### Use sync calls

Thanks to be a promise-based API it is possible use the `await` JavaScript operator in order to call Task methods. Here you have an example:

```js
    let task = instance.newTask('merge');
    task = await task.start();
    task = await task.upload('<FILE_URL>');
    task = await task.upload('<FILE_URL>');
    task = await task.process();

    const data = await task.download();
```

## Documentation

Please see https://developer.ilovepdf.com/docs for up-to-date documentation.


text:
Deblur
======

[![Build Status](https://travis-ci.org/biocore/deblur.png?branch=master)](https://travis-ci.org/biocore/deblur)
[![Coverage Status](https://coveralls.io/repos/biocore/deblur/badge.png?branch=master)](https://coveralls.io/r/biocore/deblur)

Deblur is a greedy deconvolution algorithm based on known read error profiles.

Code Development Note
=====================

Some of the code in the package deblur has been derived from [QIIME](http://qiime.org).
The contributors to these specific QIIME modules have granted permission
for this porting to take place and put under the BSD license.

repository: davideflo/deblur

repo_name: davideflo/deblur


text:
# Image2Palette

Small python app that will return a colour palette based on the 10 main colours of an image

#### Examples

![example](https://github.com/ja-bravo/image2palette/blob/master/examples/2.png)
![example](https://github.com/ja-bravo/image2palette/blob/master/examples/1.png)

#### How to use

Run the following commands
```
$ docker build . -t jabravo/image2palette
$ docker run -p 5000:5000 jabravo/image2palette
```
Go to your browser and open localhost:5000

gha_license_id: MIT


text:
#HID key reporting

Standard HID keyboard report is a byte array [1][1]:
```
[modifier, reserved, key1, key2, key3, key4, key5, key6]
```
This array indicates one single event (up to 6 keys pressed simultaneously).

Pressing the key `a` would produce a following report:
```
[0, 0, 4, 0, 0, 0, 0, 0]
```
This sends a code 4 corresponding to a key `a`.
All the keycodes are available at [2][2] (Section 10: Keyboard/Keypad page).

Upon key release, the keyboard sends a zero report:
```
[0, 0, 0, 0, 0, 0, 0, 0]
```

The first byte contains a bitmap reserved to modifier keys.
Bitfields are assigned as follows:
```
bit 0: left control
bit 1: left shift
bit 2: left alt
bit 3: left GUI (Super, Meta, Win)
bit 4: right control
bit 5: right shift
bit 6: right alt
bit 7: right GUI
```

So a keypress of `A` would produce the following report:
```
[2, 0, 4, 0, 0, 0, 0, 0]
```

## Sources

[1]:https://docs.mbed.com/docs/ble-hid/en/latest/api/md_doc_HID.html
[2]:http://www.usb.org/developers/hidpage/Hut1_12v2.pdf


text:
# Workshop dataset

The data for this workshop is from a real research project into honeybee behaviour that was solved with machine learning.

## Classifying Honeybee Tags

To explore honeybee behaviour bees were individually tagged with reflective markers. They were then filmed using an infrared light for 24 hours a day for over two weeks. Three different types of tag were used:

Tag Number             |  Pattern   | Details
:-------------------------:|:-------------------------: | :-------------------------:
1  |  Rectangle | 100 bees that were the control group
2  |  Circle    | 100 bees that were treated with caffeine
3  | Blank      | Single queen in the colony received this tag

This is what the tags looked like before we added them to the colony:

Control Tags             |  Treatment Tags
:-------------------------:|:-------------------------:
![control tags](images/tag1.jpg)  |  ![Treatment Tags](images/tag2.jpg)

Queen Tag             |
:-------------------------:|
![](images/queen.jpg)  |

This is how the tags appeared in the video we filmed over the course of the experiment

Experiment Footage             |
:-------------------------:|
![](images/beehive.png)  |

Ultimately the aim of this experiment was to examine honeybee behaviour by:

1. Identifying locations of bees in individual video frames.
2. Determining whether the located bees were in the control or treatment groups based on the image of the tag on their back.
3. Tracking the location of the bees over time.

We're interested in distinguishing the three tagged groups of bees in the footage from this experiment. There are far too many videos and bees to be able to do this manually, so we'll try to train a machine learning algorithm to perform this classification task for us.

For this workshop we will focus on step 2: identifying the tags on the back of the bee. The dataset consists of 730 24x24 pixel images cropped from video frames like the above. Example crops are shown below. Each image has been labelled with the type of tag visible. Our job is to automatically identify what the tag is from the content of the image itself.

![](images/example_images.png)

repository: alistairwalsh/MLD

gha_language: Jupyter Notebook

repo_name: alistairwalsh/MLD


text:
# Oral Presentation for AI for Social Good Workshop ICML

## Detecting Waterborne Debris with Sim2Real and Randomization

We'll be presenting our [work](https://aiforsocialgood.github.io/icml2019/proposals.htm) in ICML this June.

Special thanks to everyone working on this project:

Jie Fu (MILA, Polytechnic Montréal); Ritchie Ng (National University of Singapore); Mirgahney Mohamed (The African Institute for Mathematical Sciences); Yi Tay (Nanyang Technological University); Kris Sankaran (Montreal Institute for Learning Algorithms); Shangbang Long (Peking University); Alfredo Canziani (New York University); Chris J Pal (MILA, Polytechnique Montréal, Element AI); Moustapha Cisse (Google Research)

Cheers,
<br />Ritchie

repository: ritchieng/deep-learning-wizard

repo_name: ritchieng/deep-learning-wizard


text:
SlmMail
=======

[![Build Status](https://travis-ci.org/juriansluiman/SlmMail.png?branch=amazon-ses-exceptions)](https://travis-ci.org/juriansluiman/SlmMail)
[![Latest Stable Version](https://poser.pugx.org/slm/mail/v/stable.png)](https://packagist.org/packages/slm/mail)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/juriansluiman/SlmMail/badges/quality-score.png?s=a9ce359ccf0362f8ffe6cff3644af2e065748eb0)](https://scrutinizer-ci.com/g/juriansluiman/SlmMail/)
[![Dependencies Status](https://d2xishtp1ojlk0.cloudfront.net/d/2834272)](http://depending.in/juriansluiman/SlmMail)

Created by Jurian Sluiman and Michaël Gallego

> Note that API calls are not currently unit-tested (although we have properly test them manually). Therefore, you
are encouraged to test your API usage before going into production.

Introduction
------------

SlmMail is a module that integrates with various third-parties API to send mails. Integration is provided with the
API of those services. It does not handle SMTP.

Please note that SlmMail only supports Transactional services. Services for campaign marketing emails (like MailChimp
or MailJet) are out-of-the scope of this module.

Here are the currently supported services:

* [Amazon SES](http://aws.amazon.com/ses) (nearly complete, [attachments are missing](https://github.com/juriansluiman/SlmMail/issues/44))
* [Elastic Email](http://elasticemail.com) (complete)
* [Mailgun](http://www.mailgun.com) (complete)
* [Mandrill](http://mandrill.com) (complete)
* [Postmark](https://postmarkapp.com) (complete)
* [Postage](http://postageapp.com) (complete)
* [Send Grid](http://sendgrid.com) (nearly complete)

Requirements
------------

* PHP 5.6
* [Zend Framework 2](https://github.com/zendframework/zf2)
* [Amazon AWS ZF 2 Module](https://github.com/aws/aws-sdk-php-zf2): only if you plan to use Amazon SES service

Installation
------------

Add `"slm/mail"` to your `composer.json` file and update your dependencies. Enable `SlmMail` in your
`application.config.php`. To use one of the transport layers, see the documentation in the [docs](https://github.com/juriansluiman/SlmMail/tree/master/docs) folder.

If you do not have a `composer.json` file in the root of your project, copy the contents below and put that into a
file called `composer.json` and save it in the root of your project:

```
{
    "require": {
        "slm/mail": "~2.0"
    }
}
```

Then execute the following commands in a CLI:

```
curl -s http://getcomposer.org/installer | php
php composer.phar install
```

Now you should have a `vendor` directory, including a `slm/mail`. In your bootstrap code, make sure
you include the `vendor/autoload.php` file to properly load the SlmMail module.

### Amazon SES

If you want to use Amazon SES, you need to install the official AWS ZF 2 module. Please refer to the documentation
of Amazon SES in the [docs](https://github.com/juriansluiman/SlmMail/tree/master/docs) folder.

Documentation
-------------

Documentation for SlmMail is splitted for each provider:

* [Amazon SES](/docs/Ses.md)
* [Elastic Email](/docs/ElasticEmail.md)
* [Mailgun](/docs/Mailgun.md)
* [Mandrill](/docs/Mandrill.md)
* [Postage](/docs/Postage.md)
* [Postmark](/docs/Postmark.md)
* [SendGrid](/docs/SendGrid.md)

Cook-book
---------

### How to send an HTML email ?

Every email providers used in SlmMail allow to send HTML emails. However, by default, if you set the mail's content
using the `setBody` content, this content will be considered as the plain text version as shown below:

```php
$message = new \Zend\Mail\Message();

// This will be considered as plain text message, even if the string is valid HTML code
$message->setBody('Hello world');
```

To send a HTML version, you must specify the body as a MimeMessage, and add the HTML version as a MIME part, as
shown below:

```php
$message = new \Zend\Mail\Message();

$htmlPart = new \Zend\Mime\Part('<html><body><h1>Hello world</h1></body></html>');
$htmlPart->type = "text/html";

$textPart = new \Zend\Mime\Part('Hello world');
$textPart->type = "text/plain";

$body = new \Zend\Mime\Message();
$body->setParts(array($textPart, $htmlPart));

$message->setBody($body);
```

> For accessibility purposes, you should *always* provide both a text and HTML version of your mails.

### How to configure HttpClient with http_options and http_adapter

By defaut the adapter is Zend\Http\Client\Adapter\Socket but you can override it with other adapter like this in your slm_mail.*.local.php

```php
'slm_mail' => array(
        // Here your email service provider options

        'http_adapter' => 'Zend\Http\Client\Adapter\Proxy' // for example
    )
```

If you want to change some options of your adapter please refer to you adapter class in var $config [here](https://github.com/zendframework/zf2/tree/master/library/Zend/Http/Client/Adapter) and override these in your slm_mail.*.local.php like this :

```php
'slm_mail' => array(
        // Here your email service provider options

        // example for Socket adapter
        'http_options' => array(
            'sslverifypeer' => false,
            'persistent' => true,
        ),
    )
```

### Which provider should I choose?

We won't answer you :-)! Each provider has their own set of features. You should carefully read each website
to discover which one suits your needs best.

However, for convenience purpose, we [have wrapped a pricing table](/docs/Pricing.md) for each email provider!

repository: jackdpeterson/SlmMail

repo_name: jackdpeterson/SlmMail


text:
<!-- @format -->

# Laravel Env Ribbon

[![GitHub Workflow Status](https://github.com/perspikapps/laravel-envribbon/workflows/Run%20tests/badge.svg)](https://github.com/perspikapps/laravel-envribbon/actions)
[![styleci](https://styleci.io/repos/CHANGEME/shield)](https://styleci.io/repos/CHANGEME)

[![Packagist](https://img.shields.io/packagist/v/perspikapps/laravel-envribbon.svg)](https://packagist.org/packages/perspikapps/laravel-envribbon)
[![Packagist](https://poser.pugx.org/perspikapps/laravel-envribbon/d/total.svg)](https://packagist.org/packages/perspikapps/laravel-envribbon)
[![Packagist](https://img.shields.io/packagist/l/perspikapps/laravel-envribbon.svg)](https://packagist.org/packages/perspikapps/laravel-envribbon)

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

[![Buy me a coffee](https://badgen.net/badge/buymeacoffe/tomgrv/yellow?icon=buymeacoffee)](https://buymeacoffee.com/tomgrv)

This package displays a top-left corner ribbon with APP_ENV value & version number on all pages

## Installation

Install via composer

```bash
composer require perspikapps/laravel-envribbon
```

### Publish package assets

```bash
php artisan vendor:publish --provider="Perspikapps\LaravelEnvRibbon\EnvRibbonServiceProvider"
```

## Usage

Version is handled by [avto-dev/app-version-laravel](https://github.com/avto-dev/app-version-laravel) package: fill in `VERSION` file at project root.

Fill in configuration according to your needs:

```php
return [

    'enabled' => env('APP_RIBBON', true),

    'environments' => [

        'production' => [
            'visible' =>
            env('APP_DEBUG', false),
            'color' => 'limeGreen',
        ],

        'staging' => [
            'visible' => true,
            'color' => 'darkorange',
        ],

        '*' => [
            'visible' => true,
            'color' => 'crimson',
        ]
    ]

];
```

## Security

If you discover any security related issues, please email
instead of using the issue tracker.

## Credits

-   [tomgrv](https://github.com/tomgrv/laravel-envribbon/graphs/contributors)

repository: tomgrv/laravel-envribbon

repo_name: tomgrv/laravel-envribbon


text:
# Codr: Portfolio Theme

Welcome to Codr, a minimalistic and versatile portfolio theme built using the Bootstrap framework

![Preview Image](http://pranavrele.github.io/codr/img/dist/codr_preview.png)

[Live Demo](http://pranavrele.github.io/codr/)

## Table of Contents

1. Get Started - without Grunt

2. Get Started - with Grunt

	2.1 Grunt Setup

3. Home Section

4. About Section

	4.1 Skills Section

5. Work Section

	5.1 Work Carousel

6. Contact Section

7. Optimization

8. Credits

9. Contact & Issues

10. Copyright

### 1. Get Started - without Grunt

The optimizations done within Codr depend on Grunt. If you choose NOT to use Grunt you may delete the following:

	a. index.html
	b. css/dist - only /dist directory within /css
	c. js/dist - only /dist directory within /js
	d. img/dist - only /dist directory within /img
	e. Gruntfile.js

Once this is done rename the alt_index.html file to index.html.

If you are not using Grunt it is strongly advised you use some other optimization tool to concatenate and minify for faster load times. If you choose this method you may need to alter the reference statements to the css and javascript files in the newly renamed index.html accordingly.

### 2. Get Started - with Grunt

If using Grunt please familiarize yourself with the Gruntfile provided and its working. This file can be left largely untouched unless you need to minify project images in which case reference 5.1 Work Carousel. Furthermore, you may delete the alt-index.html file if using Grunt.

#### 2.1 Grunt Setup

You will need to install [Grunt](http://gruntjs.com/getting-started) first. Follow the instructions provided at their page to get set up with Node.js, npm and Grunt.

Once Grunt is installed globally, install it within your project directory via:

```shell
npm install grunt --save-dev
```
Depending on your system user account type, you may need to use sudo for shell commands.

Next setup the following Node Modules:

No need to edit the Gruntfile here, simply install these modules into the project directory via the terminal.

concat
```shell
npm install grunt-contrib-concat --save-dev
```
uglify
```shell
npm install grunt-contrib-uglify --save-dev
```
cssmin
```shell
npm install grunt-contrib-cssmin --save-dev
```
imagemin
```shell
npm install grunt-contrib-imagemin --save-dev
```
imagemin-mozjpeg
```shell
npm install --save imagemin-mozjpeg
```
watch
```shell
npm install grunt-contrib-watch --save-dev
```
Once all modules are successfully installed give the following command to test if the setup was successful:

```shell
grunt
```
It should run successfully with no errors.

### 3. Home Section

To change the background image of the Home section navigate to img/src/general. Delete background.jpg that exists in the folder and place your image there renaming it background.jpg. Please note images that are too large may cause slower load times. The advised image size is 2560px wide.

To change the text in this section navigate to the following with index.html:

```html
	<!-- START HEADER -->
	<header id="home" class="hero parallax-yes">
		<div id="parallax-1" class="parallax">
			<div class="bcg skrollable skrollable-between" data-anchor-target="#parallax-1" data-center="background-position: 50% 0px;" data-top-bottom="background-position: 50%" data-bottom-top="background-position: 50% 100px;">
				<div class="hero-body">
					<div class="hero-text text-center">
						<h1 class="small">
							>_&nbsp<span class="text-accent">cd</span> Codr <span class="blinker"></span>
						</h1>
						<h1>Front-End <span class="text-accent"> Developer</span></h1>
					</div>
					<div class="mouse-icon">
						<div class="wheel"></div>
					</div>
				</div>
			</div>
		</div>
	</header>
	<!-- ENDER HEADER -->
```

### 4. About Section

To add your image to the About section navigate to img/src/general. Delete profile.jpg that exists in the folder and place your image there renaming it profile.jpg. Please note that landscape images work best here.

To alter the text in this section navigate to the following with index.html:

```html
<!-- START ABOUT -->
	<section id="about" class="section">
		<div class="container section-wrapper">
			<div class="section-content">
				<div class="row">
					<div class="col-md-5 match-height pp-wrapper">
						<div class="profile-picture style-profile">
							<img src="/img/dist/general/profile.jpg" alt="profile picture" class="img-responsive"/>
						</div>
					</div>
					<div class="col-md-7 match-height">
						<div class="profile-text padding-left-yes">
							<div class="row">
								<div class="col-md-12">
									<h2 class="section-title uppercase text-grey">I am Codr</h2>
									<p class="section-subtitle text-grey">A portfolio theme created by Pranav Rele.</p>
									<span class="divider"></span>
									<p class="text-dark">Codr is a minimalistic and versatile theme for creating your portfolio site. This theme is open-source and free to use. Codr is a single page solution to help anyone define their skill set and display their portfolio.</p>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
```

#### 4.1 Skills Section

To alter the icons and text in this section find the following within index.html:

```html
<section id="skills" class="section bg-grey">
		<div class="container section-wrapper">
			<div class="section-content">
				<div class="row text-center content-row">
					<div class="col-md-3 col-sm-6 match-height wow fadeIn" data-wow-delay=".2s">
						<div class="about-content">
							<i class="fa fa-code fa-4x text-accent"></i>
							<h3 class="text-dark">Web Development</h3>
							<p class="text-grey">Built using HTML5 and CSS3 under Bootstrap 3 framework</p>
						</div>
					</div>
					<div class="col-md-3 col-sm-6 match-height wow fadeIn" data-wow-delay=".4s">
						<div class="about-content">
							<i class="fa fa-mobile fa-4x text-accent"></i>
							<h3 class="text-dark">Mobile Friendly</h3>
							<p class="text-grey">Employs responsive web design to accomodate any screen size</p>
						</div>
					</div>
					<div class="col-md-3 col-sm-6 match-height wow fadeIn" data-wow-delay=".6s">
						<div class="about-content">
							<i class="fa fa-pencil fa-4x text-accent"></i>
							<h3 class="text-dark">UI/UX</h3>
							<p class="text-grey">Minimalistic layout that can be adapted to the needs of the project</p>
						</div>
					</div>
					<div class="col-md-3 col-sm-6 match-height wow fadeIn" data-wow-delay=".8s">
						<div class="about-content">
							<i class="fa fa-rocket fa-4x text-accent"></i>
							<h3 class="text-dark">Optimized</h3>
							<p class="text-grey">Lower CSS and JS footprint using Grunt for faster load times</p>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
	<!-- END ABOUT -->
```

The icon pack used is [Font-Awesome](http://fortawesome.github.io/Font-Awesome/icons/). Consult the link provided to see what's available.

Animations are derived from [animate.css](https://daneden.github.io/animate.css/). Consult the link provided to see what's available.

### 5. Work Section

To alter the text in this section navigate to the following with index.html:

```html
	<section id="work" class="section">
		<div class="container-fluid section-wrapper">
			<div class="section-content">
				<div class="row">
					<div class="col-md-12 text-center">
						<h2 class="section-title uppercase text-grey">My Work</h2>
						<p class="section-subtitle text-grey">
							Edge to edge carousel that makes your accomplishments the focal point.
						</p>
						<span class="divider center"></span>
					</div>
				</div>
			</div>
		</div>
	</section>
```

#### 5.1 Work Carousel

Find the following within index.html:

```html
<section class="work-carousel wow fadeIn">
```

Within this section are 2 item classes. Each item class represents a project:

```html
		<div class="item" style="background-image: url('/img/dist/projects/project1/background.jpg')">
			<div class="container-fluid">
				<div class="row">
					<div class="col-md-4 col-md-push-8">
						<div class="project-details">
							<span class="project-name">Project 1</span>
							<span class="project-description">
							Tag line for Project 1</span>
							<span class="divider"></span>
							<a href="#" class="btn btn-outline-light">Live Demo <i class="fa fa-long-arrow-right fa-fw"></i></a>
							<a href="#" class="btn btn-outline-light">Source <i class="fa fa-code fa-fw"></i></a>
						</div>
					</div>
					<div class="col-md-8 col-md-pull-4 hidden-xs">
                        <img src="/img/dist/projects/project1/image.png" class="img-responsive work-image" alt="">
                    </div>
				</div>
			</div>
		</div>
```

Alter the details of each item to reflect your project. The /img/ directory will depend on whether you are using Grunt or not. Regardless when adding new project images add them to the /img/src directory. If using Grunt however, reference the /img/dist directory in index.html in order to use the optimized version of your images. To add more projects copy and paste this format within the work-carousel section class.

For project images create a directory for each project within the img/src/projects directory. This format is especially important if using Grunt. Furthermore, if using Grunt then optimize the images by finding the following within Gruntfile.js:

```javascript
imagemin: {                          // Task
	    static: {                          // Target
	      options: {                       // Target options
	        optimizationLevel: 1,
	        svgoPlugins: [{ removeViewBox: false }],
	        use: [mozjpeg()]
	      },
	      files: {                         // Dictionary of files   // 'destination': 'source'
	        'img/dist/favicon.png': 						'img/src/favicon.png',
	        'img/dist/favicon_180.png': 					'img/src/favicon_180.png',
	        'img/dist/general/background.jpg': 				'img/src/general/background.jpg',
	        'img/dist/general/profile.jpg': 				'img/src/general/profile.jpg',
	        'img/dist/projects/project1/background.jpg': 	'img/src/projects/project1/background.jpg',
	        'img/dist/projects/project1/image.png': 		'img/src/projects/project1/image.png',
	        'img/dist/projects/project2/background.jpg': 	'img/src/projects/project2/background.jpg',
	        'img/dist/projects/project2/image.png': 		'img/src/projects/project2/image.png'
	      }
    	}
    },
```

If you only have 2 projects to present use the existing directories and add your images to them by deleting the existing images. Then rename your images to the same name as the deleted images that correspond. However when adding new projects, the corresponding images should be referenced above in the Gruntfile so that they may be optimized. Note, edit within /src but deploy optimized versions to /dist.

Each project has buttons that correspond with it. You may change these by finding the following in each item class:

```html
	<a href="#" class="btn btn-outline-light">Live Demo <i class="fa fa-long-arrow-right fa-fw"></i></a>
	<a href="#" class="btn btn-outline-light">Source <i class="fa fa-code fa-fw"></i></a>
```
The icon pack used is [Font-Awesome](http://fortawesome.github.io/Font-Awesome/icons/). Consult the link provided to see what's available.

You may add as many projects to the carousel as you'd like.

### 6. Contact Section

To add your contact details find the following within index.html:

```html
	<!--  END CONTACT -->
```

The icon pack used is [Font-Awesome](http://fortawesome.github.io/Font-Awesome/icons/). Consult the link provided to see what's available.

Animations are derived from [animate.css](https://daneden.github.io/animate.css/). Consult the link provided to see what's available.

### 7. Optimization

If you are using Grunt simply type the following within the shell once you have filled in all your information:

```shell
grunt
```

If you'd like to monitor your progress as you work use:

```shell
grunt watch
```
Once complete however simply run grunt one last time to ensure all went well. Please note that if using Grunt reference files and images within /dist directory for any section. If not using Grunt then reference /src. However it is strongly recommended that you use another optimization tool if not using Grunt in order to put less stress on the server.

NOTE: Remove the Google Analytics script in the head of index.html and replace it with your own if you'd like prior to deployment.

### 8. Credits

#### Images

* [Hero](https://unsplash.com/alejandroescamilla)
* [Profile](https://unsplash.com/patryksobczak)
* [Project 1 Background](https://unsplash.com/nadirbalcikli)
* [Project 2 Background](https://unsplash.com/negativespace)
* [Project 1 & 2 Mockups](https://www.behance.net/gallery/FREE-Flat-Apples-Devices-Mockup/13493563)

#### Packages

* [jQuery](https://jquery.com/)
* [Bootstrap](http://getbootstrap.com/)
* [Modernizr](http://modernizr.com/)
* [jPreloader](http://www.inwebson.com/jquery/jpreloader-a-preloading-screen-to-preload-images/)
* [Font-Awesome](http://fortawesome.github.io/Font-Awesome/)
* [Animate.css](https://daneden.github.io/animate.css/)
* [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/)
* [Owl Carousel](http://owlgraphic.com/owlcarousel/)
* [Detect Mobile Browser](http://detectmobilebrowsers.com/)
* [jQuery Easing](http://gsgd.co.uk/sandbox/jquery/easing/)
* [jQuery Sticky](http://stickyjs.com/)
* [jQuery Match Height](http://brm.io/jquery-match-height/)
* [WOW.js](http://mynameismatthieu.com/WOW/)
* [Skrollr](https://github.com/Prinzhorn/skrollr)

#### Support

* [Grunt](http://gruntjs.com/)
* [npm](https://www.npmjs.com/)
* [Node.js](https://nodejs.org/)

### 9. Contact & Issues

If you've found a bug feel free to [Open an issue](https://github.com/pranavrele/codr/issues) here Github. This is the fastest way to reach me about possible bugs that may need to be resolved.

If you would like to request new additions please feel free to send me an<EMAIL_ADDRESS>or send me a message via [Twitter](https://twitter.com/pranavrele).

### 10. Copyright

Copyright 2015 Pranav Rele. Code released under the Apache 2.0 license.

repository: pranavrele/codr

gha_language: JavaScript

repo_name: pranavrele/codr


text:
# Compost Carma API Implementation

This project aims to provide a native and easy-to-use PHP API for Compost Marketing Carma platform. Compost Carma is an email marketing platform mainly used for newsletter generation and recipients lists management.

This API is built on the existing REST API provided by Compost (documentation available [here](http://www5.carmamail.com/mail/swagger#!/)).

*This project is still in early development - please do not use this in your project just yet*

### Configuration/Authentification

Use the `RESTAPIConfig` along the `RESTBasicAPIAuthentification` for now to authenticate with a valid API Username/Password combination.

``` php
<?php
use CarmaAPI\config\RESTAPIConfig;
use CarmaAPI\config\RESTBasicAPIAuthentification;
use CarmaAPI\CarmaAPI;

$cfg = new CarmaAPI\config\RESTAPIConfig("<server no>", "<customer id>");
$cfg->setAuthentification(new RESTBasicAPIAuthentification("<api username>", "<api password>"));
$api = new CarmaAPI($cfg);

```

### Endpoints

The API uses a series of endpoint as a mechanism to facilitate the overall use of the API. An endpoint represents a valid REST resource in Carma's API where some operations are available (list, create, delete, update, etc; your basic CRUD methods are generally present). Methods in the endpoints may have two purposes (*for now*):

- output model instances representing the actual data;
- another endpoint instance used to create a logical navigation between endpoints.

#### Current endpoints available

* `ContactEndpoint` - used for operations on a single contact in a recipient list
* `ContactsListEndpoint` - used for operations on contacts lists
* `RecipientListEndpoint` - used for operations on a single recipient list
* `RecipientsListsEndpoint` - used for operations on recipients lists

### Examples

#### Getting all the recipients lists

``` php
<?php
// ... configure & login to api and stuff ...
$lists = $api->lists()->getAll();
// $lists = array(\CarmaAPI\models\ListDto)
```

#### Iterating over all contacts of a list

``` php
<?php
foreach($api->lists()->getById(1)->contacts()->iterator(CarmaAPIConstants::CONTACTS_LIST_ITERATOR_UNSUBSCRIBED) as $unsubscribed_contact) {
  // $unsubscribed_contact = \CarmaAPI\models\ContactDto
  echo "I am unsubscribed :(";
}

foreach($api->lists()->getById(1)->contacts()->iterator(CarmaAPIConstants::CONTACTS_LIST_ITERATOR_BOUNCED) as $bounced_contact) {
  // $bounced_contact = \CarmaAPI\models\ContactDto
  echo "I bounced :(";
}

foreach($api->lists()->getById(1)->contacts()->iterator() as $contact) {
  // $contact = \CarmaAPI\models\ContactDto
  echo $contact->firstName . " " . $contact->lastName;
}
```

#### Getting messages of a given contact

``` php
<?php
$msgs = $api->lists()->contacts()->getByOriginalId("<originalid>")->messages();
// $msgs = array(\CarmaAPI\models\MessagesDto)

```

### Models

TODO


text:
# Meteor Haxe Externs

Externs and tools to build [meteor](https://www.meteor.com/) applications using [Haxe](https://www.haxe.org) language.

Current version is used in production but the externs might not be complete, also some of the workflows/concepts are subject to change.

Currently up-to-date:

- Meteor <IP_ADDRESS>
- Haxe 3.4.2

## How it works
Meteor.js has a very specific workflow designed for javascript language, some of its features are slightly modified or workaround when using Haxe.

Check out the [example](/examples) folder

- **File Structuring**

Meteor applications distribute client and server code in many source files or a single one for small apps, haxe uses classes that can be compiled to a single file or a client and a server file containing all the application logic. The examples folder contain different approaches.

- **Context / namespace**

In Meteor, the `this` keyword has a different context and properties in callbacks like: `Meteor.publish(), Meteor.method(), template.helpers(), Router.route()`:

```javascript
Template.myTemplate.helpers = {
	firstId:function () {
		return this.firstNode().id;
	}
}

Router.route('/', function () {
  this.render('MyTemplate');
});
```

To mimic these namespaces in a typed manner, context objects like `TemplateCtx`, `PublishCtx`, `MethodCtx` and `RouterCtx` are provided. The example above becomes:

```haxe
Templace.get('myTemplate').helpers = {
	firstId:function () {
		return TemplateCtx.firstNode().id;
	}
}

Route.route('/', function () {
	RouterCtx.render('MyTemplate');
});
```

* **Exposing collections**

In meteor it's common to assign global variables when creating collections, these collections become then available from the browser console.

```javascript
Players = new Mongo.Collection("players");
```

In Haxe its harder to create global variables, a workaround is to assign the collections to the window object.

```haxe
var collection = new Collection("players");
untyped js.Browser.window["Players"] = untyped collection._collection;
```

# Haxelib

How to install Haxe Meteor externs for javascript

```bash
haxelib install hxmeteor
```

Besides using Haxelib, you can use this git repos as a development directory:

```bash
haxelib dev hxmeteor path/to/folder
```

or use git directly

```bash
haxelib git hxmeteor https://github.com/MatthijsKamstra/hxmeteor.git
```

don't forget to add it to your build file

```haxe
-lib hxmeteor
```

### haxelib extra

When you install hxmeteor via haxelib you will also have access to project scaffolding.

You need to have meteor installed for this to work!

Type in you terminal:

```bash
haxelib run hxmeteor
```

It will generate a Haxe / Meteor folder structure most of the examples are based upon: [scaffold example](/examples/scaffold/)

- `.vscode` folder (no Flashdevelop/Haxedevelop config files yet... )
- `src` and `www` folder (with all the folderstructure to make both of them work)
- an empty meteor project is generated (`meteor create --bare`)
- build (debug/release) files for Haxe and VSCode
- package.json for automatic compilation on save (don't forget to `npm install` before you start)
- some files to get you started

I am pritty sure you should do this only once!

# Haxe macros

A very powerfull feature of Haxe are [macros](https://haxe.org/manual/macro.html) ([API](http://api.haxe.org/haxe/macro/)).

> Macros are without a doubt the most advanced feature in Haxe. They are often perceived as dark magic that only a select few are capable of mastering, yet there is nothing magical (and certainly nothing dark) about them.

### Template name list

With the help of macros you have access to the template names.

Okay, this is an example of an template file in `meteor`:

```html
<template name="foobar">
	...
</template>
```

We want to know the name of this template: "foobar".

Normally you would make a file with static references to the (template)filename:

```haxe
public static inline var FOOBAR : String = "foobar";
```

This works, but the templates names list can become long very fast.
So let a computer do that for use!

> If you want to read more indepth about this type of macro read: [Haxe Macros: Code completion for everything | Blog Mark Knol](http://blog.stroep.nl/2014/01/haxe-macros/)

All you need to create / copy is a `TemplateNames.hx` file (in this repo `src/shared/TemplateNames.hx`):

```haxe
package;
@:build(meteor.macro.TemplateNamesBuilder.build("www/client/templates/"))
class TemplateNames{}
```

And point to the correct template folder, in this case

`"www/client/templates/"`

Type `TemplateNames.` and Visual Studio Code (or HaxeDevelop) will auto complete the template name.

Every time the autocomplete is activated, this macro is executed.
And it will check if the template file has a name.

BIG advantage is:

- autocompletion on "hidden" templates (when two templates included in one file)
- removing files will create an error if that file is used in your code
- renaming templates will create an error
- changing filenames will have no effect (javascript is flexible like that)
- TemplateNames will always be up to date
- warning for double templatesname before runtime

### Automatic generation of html template

With the help of macros we generate templates based on Haxe Classes.

Lets create a Haxe class in the folder `src/client/templates/`:

(the macro only works in the `/client/templates` folder btw)

```haxe
package templates;
import meteor.Template;
class PageOne {

	public static function init()
	{
		var _template = Template.get("pageone");
		_template.onCreated(function onCreated() {
		});
		_template.helpers({
			test:function (){
				return '**PageOne**';
			}
		});
		_template.events({
			'click .testBtn':function (event){
				// Prevent default browser form submit
				event.preventDefault();
				trace("click 'PageOne'");
			}
		});
	}
}
```

We need an template with that (in this case 'pageone');

Lets build that automaticly, add this to your build file:

```
--macro meteor.macro.AutomaticTemplate.build()
```

Now everytime you do a build (or use automatic build) this macro will read folder `src/client/templates/*` (and its subfolders) for classes and will check if folder `www/client/templates/*` has a file corresponding to that class.

In our case it will generate in folder `www/client/templates/*`

```html
<template name="pageone">
	<div class="container">
		<h1>PAGEONE</h1>
		<p>template for PageOne.hx</p>
	</div>
</template>
```

BIG advantage is:

- you know you have to make a template, that is done for you
- file name of the html is related to the Haxe file (Foobar.hx -> foobar.html)
- template name is based upon Haxe file ((Foobar.hx -> `<template name="foobar">`))
- folderstructure is "visible" in template name (`templates/admin/Login.hx` -> -> `<template name="admin_login">`)
- renaming class will automaticly generate a new `.html` template (don't forget to update)
- changing package will automaticly generate a new `.html` template (don't forget to update)
- in combination with previous macro, make your life a little easier
- add more sanity to the template html and js (don't worry you still can fuck everything up!)

# TODOS
Some ideas for macros and utilities that may improve the haxe-meteor workflow in the future:

* **Typed Collections** like in [haxe-mongoose externs](https://github.com/clemos/haxe-js-kit/blob/master/test/MongooseTest.hx).

* **Expose Collections** to the browser automatically on creation.

* **Context Object** provided in callbacks, (this objects would need to be removed during compile-time using macros) example:

```haxe
Templace.get('myTemplate').helpers = {
	firstId:function (ctx:TemplateCtx) {
		return ctx.firstNode().id;
	}
}

Route.route('/', function (ctx:RouterCtx) {
	ctx.render('MyTemplate');
});
```

* **Templates List** showing available templates and type-check them using macros, something like [in this article](http://blog.stroep.nl/2014/01/haxe-macros/). DONE!

* **ES6 modules** output with [modular-js](https://github.com/kevinresol/modular-js)

repository: MatthijsKamstra/hxmeteor

repo_name: MatthijsKamstra/hxmeteor


text:
# ImageSocket_Python
[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg?maxAge=2592000)]()
[![Packagist](https://img.shields.io/badge/Stable-1.0.0-brightgreen.svg)]()

The python plugin to receive the image socket

Abstract
---------------------
        This project provide a new class `ImageSocket`. As the usual, you can easily transfer the string.
But It's not easy to transfer the image with a few code. On the Android platform, Google provide
TCP & UDP two WiFi method to pass information. One the other hand, the python platform provide
socket pachage to receive the infomation. This project build a basic API that the developer can
transfer the image in a easy way!

        This project provide Internet( TCP & UDP ) and bluetooth methodology to reach the goal.

Motivation
---------------------
It's wild to use RTP to transfer the video streaming. There's some situation that the phone would transfer the image to PC. The computation of phone is weaker than the PC. This project use this property to receive the image and reassemble.
There are other projects that do the similar things. (For example: PC to android or Android to Android) So this project wouldn't implement these direction now.

Example
---------------------
TCP:
```python
   sock = ImageSocket.ImageSocket()
   sock.socket(socket.AF_INET, socket.SOCK_STREAM)
   sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
   sock.bind (("", port))
   sock.listen(1)
   sock.settimeout(20)
   opSock, address = sock.accept()
   img = opSock.recv(2000000)
```
UDP:
```python
   sock = ImageSocket.ImageSocket()
   sock.socket(socket.AF_INET,socket.SOCK_DGRAM)
   sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
   sock.bind (("", port))
   img = sock.recvfrom(2000000)
```
Bluetooth:
```python
   sock = ImageSocket.ImageSocket()
   sock.socket(RFCOMM)
   sock.bind(("",PORT_ANY))
   sock.listen(1)
   client_sock, client_info = sock.accept()
   img = client_sock.recv(2000000)
```

Get Start
---------------------
The following is the environment of development. Don't garentee it would work normally if you didn't have the proper edition of other package.
* OpenCV 2.4.0+
* Numpy 1.10.4+
* Python 2.7
* pybluez if you want to use bluetooth transfer

The command to install:
```
sudo pip install "https://github.com/sunnerli/ImageSocket_Python/tarball/1.0.0"
```
or
```
sudo pip install ImageSocket --update
```
The end number above is the version of this plugin.
The edition number of this project would show at the top. (green small image)

Usage Detail
---------------------
Check the Wiki to get the more detail.
- [Wiki](https://github.com/SunnerLi/ImageSocket_Python/wiki/Home)

Developed By
---------------------

* SunnerLi -<EMAIL_ADDRESS>

License
---------------------
    The MIT License (MIT)
    Copyright (c) 2016 - SunnerLi

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

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

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


text:
---
title: "Inspect Teacher Characteristics by School Poverty"
output:
  html_document:
    theme: simplex
    css: styles.css
    highlight: NULL
    keep_md: true
    toc: true
    toc_depth: 4
    toc_float: true
    number_sections: false
---

[OpenSDP Analysis](http://opensdp.github.io/analysis) / [Human Capital Analysis: Placement](Human_Capital_Analysis_Placement.html) / Inspect Teacher Characteristics by School Poverty

![](Teacher_Char_by_School_Poverty.png)

###Preparation
####Purpose

Examine the distribution of teachers across school characteristics.

####Required analysis file variables

 - `tid`
 - `school_year`
 - `school_poverty_quartile`
 - `t_node`
 - `t_black`
 - `t_latino`
 - `t_white`
 - `t_newhire`
 - `t_adv_degree`
 - `t_certification_pathway`
 - `t_experience`

####Analysis-specific sample restrictions

 - Keep only employees whose job code is "teacher".
 - Keep only years for which new line information is available.

####Ask yourself

 - What supports could your agency offer to high-poverty schools with large shares of novice and early-career teachers?
 - Does your agency have a strategy for placing effective teachers in high-needs schools? What initiatives would support this goal?

####Potential further analyses

- Other teacher characteristics to add to the table if data are available include: attended a competitive postsecondary institution; master teacher, instructional mentor, other teacher leadership role. You may wish to explore to what extent these teacher characteristics are associated with value-added estimates of teacher effectiveness.

###Analysis

####Step 1: Load data.

```stata
use "${analysis}\Teacher_Year_Analysis.dta", clear
isid tid school_year
```

####Step 2: Restrict the sample.

```stata
keep if t_is_teacher == 1
keep if !missing(school_poverty_quartile)
```

####Step 3: Review variables.

```stata
tab school_year school_poverty_quartile, mi row
bysort school_code school_year: gen tag = _n == 1
tab school_year school_poverty_quartile if tag, mi
drop tag
foreach var of varlist t_male t_black t_latino t_white t_newhire ///
	t_adv_degree t_certification_pathway {
	tab school_poverty_quartile `var', mi row
}
table school_poverty_quartile, c(mean t_experience)
```

####Step 4: Create binary variables for each school poverty quartile.

```stata
tab school_poverty_quartile, gen(school_poverty_q)
```

####Step 5: Create a binary variable for alternative certification.
Create variable for grade-by-year fixed effects.

```stata
gen t_alternative_certification = (t_certification_pathway > 1 & ///
	t_certification_pathway != .)
tab t_alternative_certification t_certification_pathway, mi
```

####Step 6: Get overall sample size.

```stata
summ tid
local teacher_years = string(r(N), "%9.0fc")
preserve
	bysort tid: keep if _n == 1
	summ tid
	local unique_teachers = string(r(N), "%9.0fc")
restore

```

####Step 7: Define row titles for the table.

```stata
local t_male "Percent Male"
local t_black "Percent African American"
local t_latino "Percent Latino"
local t_white "Percent White"
local t_newhire "Percent New Hires"
local t_adv_degree "Percent with Advanced Degree"
local t_alternative_certification "Percent with Alternative Certification"
local t_experience "Average Teacher Experience"
```

####Step 8: Open output file.

```stata
putexcel set ${graphs}\Teacher_Char_by_School_Poverty.xlsx, sheet(Sheet1) replace
```

####Step 9: Create local row number variable.

```stata
local rownum = 1
```

####Step 10: Create overall and column titles.
Write title on 1st row, increment row, and write column titles with appropriate settings.

```stata
putexcel A`rownum':F`rownum' = "Teacher Characteristics by School Poverty Level", merge hcenter vcenter bold font(calibri, 20, black)
local rownum = `rownum' + 1
putexcel B`rownum' = "Agency Average", bold txtwrap hcenter
putexcel C`rownum' = "High Poverty Schools", bold txtwrap hcenter
putexcel D`rownum' = "Low Poverty Schools", bold txtwrap hcenter
putexcel E`rownum' = "Difference between High and Low Poverty Schools", bold txtwrap hcenter
```

####Step 11: Start a loop through row variables.
Increment rownum variable at the start of each iteration.

```stata
foreach rowvar of varlist t_male t_black t_latino t_white t_newhire ///
	t_adv_degree t_alternative_certification t_experience {

	local rownum = `rownum' + 1
```

####Step 12: Calculate quartile averages and difference.

```stata
  reg `rowvar' school_poverty_q4 school_poverty_q1, robust
  estimates store `rowvar'
  local highpov = _b[school_poverty_q4] + _b[_cons]
  local lowpov = _b[school_poverty_q1] + _b[_cons]
  local diff = _b[school_poverty_q4] - _b[school_poverty_q1]
```

####Step 13: Determine difference significance.
Get significance for difference between top and bottom quartile.

```stata
  test school_poverty_q4 = school_poverty_q1
  gen star = ""
  replace star = "*" if r(p) < .05
```

####Step 14: Calculate agency average.

```stata
  quietly summ `rowvar', meanonly
  local agencyavg = r(mean)
```

####Step 15: Add row values to table.
Write values for high, low, difference, and significance for each row variable. Close loop.

```stata
  putexcel A`rownum' = "``rowvar''", bold
  putexcel B`rownum' = `agencyavg'*100, nformat("###.#")
  putexcel C`rownum' = `highpov'*100, nformat("###.#")
  putexcel D`rownum' = `lowpov'*100, nformat("###.#")
  putexcel E`rownum' = `diff'*100, nformat("###.#")
  putexcel F`rownum' = "`:di %3s star'"
  drop star
}
```

####Step 16: Write footnotes.

```stata
#delimit ;
putexcel A`rownum':F`rownum' = "*Difference is statistically significant at the 95 percent
confidence level.", nobold merge;
local rownum = `rownum' + 1;
putexcel A`rownum':F`rownum' = "Notes: Sample includes teachers in the 2006-07 through 2010-11
school years, with `teacher_years' teacher years and `unique_teachers' unique teachers.
High (low) poverty schools are in the top (bottom) quartile of schools each year based
on the share of students receiving free or reduced price lunch.", merge txtwrap;
#delimit cr
```

####Step 17: Format excel cells.
Use mata to fit column widths and row heights to fit text.

```stata
mata
b = xl()
b.load_book("${graphs}\Teacher_Char_by_School_Poverty.xlsx")
b.set_sheet("Sheet1")
b.set_column_width(1,1,33) //make title column widest
b.set_column_width(2,7,15) //make each column fit title
b.set_colunm_width(5,5,18) //make difference column wider to fit title
b.set_row_height(1,1,55) //make title row bigger
b.set_row_height(11,11,70) //make footnote text fully show
```

####Step 18: Close file.

```stata
b.close_book()
end
```

---

Next Analysis: [Examine Student Prior Achievement and Teacher Experience](Prior_Ach_by_Exp.html)

repository: OpenSDP/human-capital-stata

gha_language: Stata

repo_name: OpenSDP/human-capital-stata


text:
# WM/LPA/PDE Parameter Screen

Code for SIMPLE RHO GTPASE DYNAMICS GENERATE A COMPLEX REGULATORY LANDSCAPE ASSOCIATED WITH CELL SHAPE

Cole Zmurchok, William R. Holmes

**Please note that the code provided is not very well documented. It's currently set up to run on ACCRE, the computer cluster at Vanderbilt. Please contact me with any questions, I'd be happy to discuss.**

[cole.zmurchok<EMAIL_ADDRESS>or
[zmurchok.github.io](zmurchok.github.io)

## Prerequisites

* Matlab (I used version 2018b locally and 2018a on ACCRE).
* matcont (https://sourceforge.net/projects/matcont/).
* FEniCS (for 2D simulations https://fenicsproject.org/)
* Python (I use python 3 available via Anaconda)

## License

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

## Acknowledgments

* [ACCRE at Vanderbilt University](https://www.vanderbilt.edu/accre/)

## Files and what they do!

### Parameter Screen

I split the 10^6 parameter sets up into 20 blocks of 50000 for parallel computing. This is the workflow:

1. X.mat: Latin Hypercube sample of parameter space
2. newX.m: used to make X1-X20.mat from X.mat. Generated from LatinHypercubeSample.m
3. X1-X20.mat: LHS of parameter space. X1-20 used for parallelized computation.
4. main1-20.m: WM/LPA parameter sweep file. main1-20.m runs the parameter screen on block 1-20.
5. Parameterscreen.slurm: the scheduler file that calls 20 jobs on ACCRE to each run one of main1-20.m
6. main1-20.mat: output from each one of the 20 main1-20.m jobs
7. rebuildX.mat: take all output and build the data set. output of WM and LPA screens saved as **data.mat**
8. The WM and LPA screens need the following supporting files: global_odes.m, local_odes.m, lpa_jacobian.m, ParameterScreen.m, FindSteadySates.m
9. ParameterScreen_counts.m: post-processes the WM and LPA screen data, saves data as **data_counted.mat**
9. checkfortwos.m: checks for problems with the LPA screen... 2's are bad! They indicate that the LPA perturbations ended up at another HSS instead of a new local branch. It turns out that I didn't find any twos! See ParameterScreen.m for more detail. These troublesome points would have to be dealt with.
10. LPAscreen_table.m: provides numbers for Table 1
11. ParameterScreen_plots.m: makes plots used in the first row of Figure 5
19. tristable_stability.m: makes last row of plots used in Figure 5.
12. PDEscreen.slurm: run the PDE screen on the server
13. PDEscreen.m: solves the PDEs for each block of 50000 parameters.
14. The PDE screen requires the following supporting files: solvethepdes.m, solvethepdes_noise.m, and data_counted.mat (so the WM and LPA screens need to happen first!)
15. rebuildPDEScreen.m: takes PDE screen output files and complies the data into one file: **data_PDEscreen.mat**.
16. PDEScreen_counts.m: post-processes the PDE screen data, saves data as **data_PDE_screen_counted.mat**
17. PDEscreen_table.m: provides numbers for Table 1
18. PDEscreen_plots.m: makes plots used in the middle row of Figure 5.

### Supporting Files:

#### Figures:

1. Fig3.m: generates Fig 3. Needs Fig3a_functions.m and Fig3b_functions.m
2. Fig4.m: generates panels (a) to (f) of Fig 4. Needs solver.m.
3. Fig5x.py: generates data for panel (x) of Fig 5. Requires FEniCS. The data in Fig4d was collected from simulations shown in Fig 5a-c. pub_plotter.py makes the panels for the figure, and plotter.py makes the SI Movies. Data for (d) is collected in Fig5_data.csv and plotted with Fig5d.py.
3. Figure 6 is produced in the screening above, with ParameterScreen_plots.m, PDEscreen_plots.m, and tristable_stability.m.
4. Figure 7 is produced with Fig7.m and Fig7a_driver.m, Fig7b_driver.m, and Fig7c_driver.m

#### Other Files:

4. solver.m: Needed for Fig 3.
5. millon_parameter_data.mat: datafile containing the results of the parameter screen!
6. seaborncolors.m: contains colors from the seaborn package from python.
7. lpa_jacobian.m: contains the Jacobian of the LPA system, evaluated symbolically
8. global_odes.m: well-mixed ODEs
9. local_odes.m: LPA ODEs
10. ParameterScreen.m: main file for the WM and LPA parameter screen
11. FindSteadyStates.m: file that finds the steady-states of the WM systems
12. is_polarized.m: checks if a PDE solution is polarized

repository: zmurchok/WM-LPA-PDE-Parameter-Screen

repo_name: zmurchok/WM-LPA-PDE-Parameter-Screen


text:
---
layout: post
title: Parameter Passing
categories: C# Programming
---

 By value: allows the variable to be used within the subroutine, however the final value will not be retained. The value will revert to the previous value from when the subroutine wasa called.

 This can be written like this:

 ```csharp
  static void SquareIt(int x)
        {

            x *= x;
            Console.WriteLine("The value inside the method: {0}", x);

        }

static void Main()
        {
            int n = 5;
            Console.WriteLine("The value before calling: {0}", n);

            SquareIt(n);
            Console.WriteLine("The value after calling: {0}", n);

            Console.ReadLine();
        }

 ```

 By reference: allows the variable to be used within the subroutine and the final value in the subroutine will be retained after the subroutine is completed. The value as the subroutine was called will be overwritten with the new value from the subroutine.

 This can be written like this:

 ```csharp
   static void SquareIt(ref int x)
        {
            x *= x;
            Console.WriteLine("The value inside the method: {0}", x);

        }

static void Main()
        {
            int n = 5;
            Console.WriteLine("The value before calling: {0}", n);

            SquareIt(ref n);
            Console.WriteLine("The value after calling: {0}", n);

            Console.ReadLine();
        }

 ```


text:
Object
======

In SurgeScript, all objects are also instances of `Object`. This means that the properties and functions listed below are available for all objects:

Properties
----------

#### parent

`parent`: object, read-only.

Reference to the parent object.

#### __name

`__name`: string, read-only.

The name of the object.

#### __active

`__active`: boolean.

Indicates whether the object is active or not.

Objects are active by default. Whenever an object is set to be inactive, its state machine is paused. Additionally, the state machines of all its descendants are also paused.

#### __functions

`__functions`: [Array](/reference/array) object, read-only.

The functions of this object represented as a collection of strings.

#### __timespent

`__timespent`: number, read-only.

The average time spent in the current state (measured in seconds).

#### __file

`__file`: string, read-only.

The source file of this object.

*Available since:* SurgeScript 0.5.3

#### __children

`__children`: [Array](/reference/array) object, read-only.

The children of this object.

*Available since:* SurgeScript 0.5.4

*Returns*

A new array featuring all the children of this object. If there are no children, an empty array is returned.

#### __childCount

`__childCount`: number, read-only.

The number of children of the object.

*Available since:* SurgeScript 0.5.5

*Note:* prior to SurgeScript 0.5.5, you would use `object.childCount` instead. That form is now obsolete.

Functions
---------

#### spawn

`spawn(objectName)`

Spawns an object named `objectName`.

*Arguments*

* `objectName`: string. The name of the object to be spawned / instantiated.

*Returns*

A new object of the desired name. Note that the newly created object will be a child of `this`.

#### destroy

`destroy()`

Destroys the object.

#### child

`child(childName | childId)`

Looks for a child named `childName` (or matching `childId`).

*Arguments*

* `childName`: string. The name of the desired child.
* `childId`: number. The id of the desired child, an integer between `0` and `childCount - 1`, inclusive.

*Returns*

The desired child, or `null` if there is no such object.

#### children

`children(childName)`

Finds all children named `childName`. Since this function spawns a new array at each call, it's recommended to cache its return value.

*Available since:* SurgeScript 0.5.4

*Arguments*

* `childName`: string. The name of the desired children.

*Returns*

A new array containing all children named `childName`. If no such children are found, an empty array is returned.

#### childWithTag

`childWithTag(tagName)`

Finds a child tagged `tagName`.

*Available since:* SurgeScript 0.5.4

*Arguments*

* `tagName`: string. The name of a tag.

*Returns*

A child tagged `tagName`, or `null` if there is no such object.

#### childrenWithTag

`childrenWithTag(tagName)`

Finds all children tagged `tagName`.

*Available since:* SurgeScript 0.5.4

*Arguments*

* `tagName`: string. The name of a tag.

*Returns*

A new array containing all children tagged `tagName`. If there are no such children, an empty array is returned.

#### sibling

`sibling(siblingName)`

Looks for a sibling named `siblingName`. Two objects are siblings if they share the same parent.

*Arguments*

* `siblingName`: string. The name of the desired sibling.

*Returns*

A sibling of name `siblingName`, or `null` if there is no such object.

#### findObject

`findObject(objectName)`

Finds a descendant (child, grand-child, and so on) named `objectName`. Since this function traverses the [object tree](/tutorials/object_tree), it's recommended to cache its return value. Do not use it in loops or states, as it might be slow.

*Arguments*

* `objectName`: string. The name of the desired object.

*Returns*

A descendant named `objectName`, or `null` if there is no such object.

*Example*

```cs
object "TestObject"
{
    // will search for SomeOtherObject in the Application
    obj = Application.findObject("SomeOtherObject");

    state "main"
    {
        if(obj != null)
            Console.print("Found the object.");
        else
            Console.print("Object not found.");

        destroy();
    }
}
```

#### findObjects

`findObjects(objectName)`

Finds all descendants named `objectName`. Since this function traverses the [object tree](/tutorials/object_tree), it's recommended to cache its return value. Do not use it in loops or states, as it might be slow.

*Available since:* SurgeScript 0.5.4

*Arguments*

* `objectName`: string. The name of the objects to be found.

*Returns*

A new array containing all descendants named `objectName`. If no such descendants are found, an empty array is returned.

#### findObjectWithTag

`findObjectWithTag(tagName)`

Finds a descendant tagged `tagName`. Since this function traverses the [object tree](/tutorials/object_tree), it's recommended to cache its return value. Do not use it in loops or states, as it might be slow.

*Available since:* SurgeScript 0.5.4

*Arguments*

* `tagName`: string. The name of a tag.

*Returns*

A descendant tagged `tagName`, or `null` if there is no such object.

#### findObjectsWithTag

`findObjectsWithTag(tagName)`

Finds all descendants tagged `tagName`. Since this function traverses the [object tree](/tutorials/object_tree), it's recommended to cache its return value. Do not use it in loops or states, as it might be slow.

*Available since:* SurgeScript 0.5.4

*Arguments*

* `tagName`: string. The name of a tag.

*Returns*

A new array containing all descendants tagged `tagName`. If no such descendants are found, an empty array is returned.

#### toString

`toString()`

Converts the object to a string. This function is designed to be overloaded by your own objects.

*Returns*

A string.

#### equals

`equals(otherObject)`

Compares `this` object to `otherObject`. This function is designed to be overloaded by your own objects.

*Arguments*

* `otherObject`: object. An object to compare `this` to.

*Returns*

Returns `true` if the objects are equal; `false` otherwise.

#### hasFunction

`hasFunction(functionName)`

Checks if the object has a function named `functionName`.

*Arguments*

* `functionName`: string. The name of the function.

*Returns*

Returns `true` if the object has a function named `functionName`.

#### hasTag

`hasTag(tagName)`

Checks if the object has been tagged with `tagName`.

*Arguments*

* `tagName`: string. The name of the tag.

*Returns*

Returns `true` if the object has been tagged with `tagName`.

#### __invoke

`__invoke(functionName, paramsArray)`

Invokes function `functionName`, passing the parameters specified in `paramsArray`. The number of elements of `paramsArray` must be the same as the number of parameters required by the function to be invoked.

*Available since:* SurgeScript 0.5.2

*Arguments*

* `functionName`: string. The name of the function to be called.
* `paramsArray`: [Array](/reference/array). The parameters to be passed to the function.

*Returns*

Returns the value returned by the invoked function.

*Example*

```cs
// The program below will print:
// 12
// 12
// true

object "Application"
{
    state "main"
    {
        Console.print(this.sum(5, 7));
        Console.print(this.__invoke("sum", [5, 7]));
        Console.print(sum(5, 7) == __invoke("sum", [5, 7]));
        Application.exit();
    }

	fun sum(a, b)
	{
		return a + b;
	}
}
```

#### __arity

`__arity(functionName)`

Returns the number of arguments of function `functionName`, if it's defined. If it's not defined, zero will be returned.

*Available since:* SurgeScript 0.5.4

*Arguments*

* `functionName`: string. The name of a function.

*Returns*

The number of arguments of the specified function, or zero if the function is not defined.

repository: alemart/surgescript

gha_language: C

repo_name: alemart/surgescript


text:
![](demo/preview.gif)

# Demonstration done by [DistroTube](https://www.youtube.com/channel/UCVls1GmFKf6WlTraIb_IaJg)

[![](demo/youtube.png)](https://www.youtube.com/watch?v=mBNLzHcUtTo&t=5m22s)

# Devour: Window Manager agnostic swallowing feature for terminal emulators

Devour hides your terminal window before launching an external program and unhides it after quitting.

Devour is the successor to
[BSPWM_Swallow](https://github.com/salman-abedin/bspwm_swallow)
and a fork of
[sw](https://github.com/ronniedroid/.dotfiles/blob/master/Scripts/sw) by
[ronniedroid](https://github.com/ronniedroid)

## Dependencies

-  sed, [xdo](https://github.com/baskerville/xdo)

## Installation

```sh
git clone https://github.com/salman-abedin/devour.git && cd devour && sudo make install
```

## Usage

```sh
devour CMD/ALIAS ... SAFE FILE ...
devour CMD/ALIAS ... -- SAFE FILE/UNSAFE FILE
```

## Pro Tip

**Devour from your file explorer instead of the shell.**

Watch my demo and notice how seamless it is compared to devouring from the shell.

**Hint:** If you are one of those unfortunate souls who uses **xdg-open** instead of
[a custom launch script](https://gist.github.com/salman-abedin/6f52c52e465d89d489f9ea8d891c7332),
then go to your **~/.local/share/applications** directory and modify the applications you launch from your file explorer like below and enjoy the true devouring experience.

```
[Desktop Entry]
Type=Application
Name=PDF Reader
Exec=/usr/local/bin/devour /usr/bin/zathura %U
```

## Uninstallation

```sh
sudo make uninstall
```

## Patches

-  **21/06/20**:- Added support for names with spaces

-  **07/07/20**:- Added support for shell aliases

-  **24/07/20**:- Added support for names with spaces in alias mode

## Contributors

-  [agnipau](https://github.com/agnipau)

-  [HawaiinPizza](https://github.com/HawaiinPizza)

-  [sbuller](https://github.com/sbuller)

-  [AriaMoradi](https://github.com/AriaMoradi)

-  [durcor](https://github.com/durcor)

---

## Repos you might be interested in

| Name                                                    | Description                     |
| ------------------------------------------------------- | ------------------------------- |
| [bolt](https://github.com/salman-abedin/bolt)           | The launcher wrapper            |
| [uniblocks](https://github.com/salman-abedin/uniblocks) | The status bar wrapper          |
| [tide](https://github.com/salman-abedin/puri)           | Minimal Transmission CLI client |
| [puri](https://github.com/salman-abedin/puri)           | Minimal URL launcher            |
| [crystal](https://github.com/salman-abedin/crystal)     | The transparent setup           |
| [Magpie](https://github.com/salman-abedin/magpie)       | The dotfiles                    |
| [Alfred](https://github.com/salman-abedin/alfred)       | The scripts                     |

## Contact

<EMAIL_ADDRESS>


text:
---
layout: single
title: What's New in Windows PowerShell 4.0
excerpt:
permalink: /2013/06/whats-new-in-windows-powershell-40.html
tags:
- desired state configuration
- documentation
- powershell
- powershell 4.0
- technet
- windows server 2012
published: true
comments: true
---
Microsoft just updated the page "What's New in PowerShell" to include information about Windows PowerShell 4.0. They also added a page about Desired State Configuration.

You can try PowerShell 4.0 by either downloading the Windows Server 2012 R2 Preview which has been release just a few hours ago, or by doing the Desired State Configuration Lab from Channel9.

I highly encourage you to check-out this documentation. From my point of view, the following features are very interesting:

* Windows PowerShell Desired State Configuration (DSC) which is a new management system in Windows PowerShell 4.0 that enables the deployment and management of configuration data for software services, and the environment in which these services run. For more information about DSC, see Get Started with Windows PowerShell Desired State Configuration.

* VIDEO: Desired State Configuration in Windows Server 2012 R2 PowerShell

* LAB: Desired State Configuration in Windows Server 2012 PowerShell

* Article from Don Jones on Redmondmag.com

* The default Execution Policy on Windows Server 2012 R2 Preview is RemoteSigned

* A new common parameter, PipelineVariable that lets you save the results of a piped command (or part of a piped command) as a variable that can be passed through the remainder of the pipeline.

* #Requires statements now let users require Administrator access rights, if needed.

* The Import-Csv cmdlet now ignores blank lines.

* A UserName property has been added to Get-Process output objects.

* Check-out the Complete list...

gha_language: CSS


text:
# sunbird-perf-tests
Data preparation scripts, JMX files, JMeter scripts for performance testing

# Perf testing summary

### **Environment Details**

A new environment was created for this test. Here are the VMs and their configurations from the test.

![Infra View](https://github.com/Sunbird-Ed/sunbird-perf-tests/blob/master/images/LoadTestInfra.jpg)

### Benchmarking Details

Please click on the below links to get details on the benchmark results
1. [Consumption APIs - 2019](consumption-api.md)
2. [User Management APIs - 2020](user-management-apis.md)
3. [Jmeter Installation](jmeter-installtion.md)
4. [Running the Consumption APIs](run-consumption-api.md)
5. [Running the User Management APIs](run-user-mgm-api.md)
6. [Consumption APIs in Kubernetes - 2020](consumption-api-kube.md)
7. [APIs with OPA and Envoy Sidecar - 2021 ](apis-opa-envoy.md)

repository: Sunbird-Ed/sunbird-perf-tests

repo_name: Sunbird-Ed/sunbird-perf-tests


text:
# Change Log
All notable changes to the "beeware" extension will be documented in this file.

## Version 0.0.2
- Add support for debugging of MacOS and Linux applications [#1](https://github.com/pybee/vscode-beeware/issues/1), [#4](https://github.com/pybee/vscode-beeware/issues/4)
- Display progress indicator when installing python packages [#2](https://github.com/pybee/vscode-beeware/issues/2)
- Fixes issue to that cause the command `Build for iOS` not to appear [#8](https://github.com/pybee/vscode-beeware/issues/8)

## Version 0.0.1
- Initial release

repository: beeware/vscode-beeware

gha_language: TypeScript

repo_name: beeware/vscode-beeware


text:
# Jenny

A scalable Python based Mirai honeypot built for easy setup & use.

## Requirements

* Python 2.7

## Usage

To run the listener
```
python run.py
```

To run the c2
```
python c2.py
```

## Future features

* Capture attempted commands executed
* Extract loader server IP

## Known issues

* socket.error: [Errno 98] Address already in use
```
Solution: sudo fuser -k 23/tcp
```

## Authors

Richard Payne, 3rd year Cyber security student.

```
@TheRichPayne
```

## License

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


text:
# Hgk.Zero [![Build Status](https://travis-ci.com/psmay/Hgk.Zero.svg?branch=master)](https://travis-ci.com/psmay/Hgk.Zero) [![MIT (Expat) license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)

This is a library primarily for use with C# that provides utilities I
generally don't want to be without. Currently, this consists of:

*   [Hgk.Zero.Options](xref:Hgk.Zero.Options), which provides
    LINQ-enabled enumerable containers which contain zero elements or
    one element, enabling a more fluent alternative to
    `TryGetValue`/`TryParse` methods and
    `ElementAt`/`First`/`Last`/`Single` filters.
*   [Hgk.Zero.Strings](xref:Hgk.Zero.Strings), which makes the
    functionality of the static `String.Concat()` and `String.Join()`
    methods available as extension methods on strings and enumerables.

## Ulterior motives

As much as this project is about the stated functionality, it's also
intended to serve as an exercise for me in documenting code, writing
unit tests, utilizing CI/CD technologies, and, ultimately, supporting
the software for anyone with the bravado to actually use it.

# LICENSE

You may use this software under the terms of the Expat License (aka the
MIT License, as published by OSI). Refer to the file LICENSE for the
exact terms.

gha_language: C#


text:
# Available actions

This page lists the available actions.

## Remove selected text

Removes the selected part of the file.

If you have selected a position, this action will do nothing.

![Remove selected text](images/action_remove.jpg)

## Add free text

Adds your own text to the selection.

![Free text](images/action_free_text.jpg)

## Add digits sequence

Adds a number.

With the default settings, it starts with `0` and is incremented one by one.

If needed, you can specify your own starting number and step:

![Digits sequence](images/action_digits_sequence.jpg)

## Update text case

Modifies the case of the selection.

![Update text case](images/action_case.jpg)

## Add creation date

Writes the date of creation of each file, in the desired format.

Available date parts are listed in the *Format* field.

![Add creation date](images/action_creation_date.jpg)

Please note that the *Format* field is free, you can type the text you want in addition to the special chars such as `YYYY` or `MM`.

## Add modification date

Writes the date on which the file was modified, in the desired format.

![Add modification date](images/action_modification_date.jpg)

## Add file size

Gets the size of each file, in the appropriate format (`Kb`, `Mb`, `Gb`...)

![Add file size](images/action_filesize.jpg)

repository: guangminglion/namagic

repo_name: guangminglion/namagic