text:
## soapui-global-headers
SoapUI plugin to enable global HTTP headers, that will be added to all projects in the soapUI workspace.

Possible use case is to add auth headers, client identification (token), logging etc.

### Usage
- download latest release from github releases, add to your local SoapUI installation:
  - copy `request-listeners.xml` to `%SOAPUI_HOME%/bin/listeners/`
  - copy `soapui-header-filter-X.jar` to `%SOAPUI_HOME%/bin/ext/`
  - start SoapUI
  - add global property in Preferences -> Global properties. Name needs to start with
  prefix `header-`, example: `header-X-Token`, will add `X-Token` HTTP header
- it is tested as working for both SOAP & REST projects.

### Compatibility
- should work with any SoapUI 5.x

### Implementation
- implemented soapUI interface `com.eviware.soapui.impl.wsdl.submit.RequestFilter`
- maven project added

repository: kkovarik/soapui-global-headers

repo_name: kkovarik/soapui-global-headers


text:
# How to Report an Issue with an App or Request a New Feature

Have you used a bot or other botengine app that should be improved?
This guide helps you report bugs and communicate ideas for new features.

Improving an app starts with documenting the scenario(s) in which we want the app to behave differently than it did so far. This applies to both fixing bugs and adding features.

These scenarios are the fuel for bot development. Developing these apps is very much an incremental process. A bot evolves as we collect more scenarios describing the desired behavior.

Explaining your use-case in natural language is a good start, but usually, a developer will ask for more data.

## App Session Recording and Archive

The most common way to describe your scenario or use-case is to share a recording of your session using the app.

The artifact of the app session recording allows us to:

+ See which app was used in the session and how it was configured (including app-settings).
+ Travel back in time and see what the bot saw in the past.
+ Understand why our bot did what it did.
+ Create simulations to test new program codes.

In summary, by providing a session recording, you answer a lot of questions from people that want to help you.

### Getting the Session Recording Archive

How do you get a session recording that you can share with others?

By default, the botengine for Windows automatically creates that recording for you, every time you run an app. That means saving the session recording is already taken care of unless you chose to disable it sometime in the past.

After running an app, use the `botengine  devtools` command to get a list of completed sessions:

![Opening DevTools from the command-line](./image/2020-07-18-open-botengine-devtools.png)

You can enter this command, for example, in the 'Command Prompt' app that comes preinstalled with Windows.

Running this command opens a web browser window. From here on, you can continue in the web browser without looking at the command prompt window anymore.

![DevTools - choose a session to inspect](./image/2020-07-18-botengine-devtools-choose-session.png)

On that web page, you find a list of recent app-sessions, the last one at the top.

When you run an app, the engine window also displays the session's name, so you can find it again in this list later, even if you started other sessions in the meantime.

Clicking on one of the names of the sessions brings you into the view of this particular session:

![DevTools - initial view of a session](./image/2020-07-18-botengine-devtools-session-init.png)

You can click the button "Download session archive" to get the session recording bundled in a single file.

### Inspecting a Session and Identifying the Time of Interest

Besides the session archive, a developer might ask you at which time the app should have behaved differently. The longer the session, the more likely you will be asked to clarify this.

A precise way to communicate the time range of interest is to note the app events indices for this range. Each action that a bot sends to a game client belongs to one event in the session timeline.

In the session view, there is a timeline of events in that session. The events are numbered so that we can identify them; each has its index.

A bot session can easily contain thousands of events, and we want to find out what subsequence of events is related to the current problem or feature request.

Clicking on an event in the timeline opens the details for this event. Here you can see what the game looked like at that time and what the bot did. The event details contain the complete app's response to this event, including the inputs to send to a game client.

![DevTools - view of an app session event](./image/2020-07-18-botengine-devtools-session-selected-event.png)

Bot authors often use the status text to inform about what action the bot takes and how it decided to prefer this action. The app generates a new status text for each event. The status texts for consecutive events can be very similar or even the same, especially if the bot was waiting for a process in the game to complete and did not take any action in the event.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
## Installation

### Clone the git repository
`git clone https://github.com/bdunogier/MediapartProxy.git`

So far, the master branch is the stable version.

### Give rights to the web server's user
`chown www-data:www-data MediapartProxy/ -R`

### Run composer
`cd MediapartProxy/`

If you don't have composer installed globally on your system:

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

`php composer.phar install --prefer-dist`

Answer all the questions.

### Check your server's compatibility
`php app/check.php`

### Configure your webserver
Use [symfony's documentation](http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html).

Make sur to create subdomains and aliases to match the proxy you will be using:
- mediapart.myproxy.com
- lmd.myproxy.com

repository: bdunogier/MediapartProxy

gha_language: PHP

repo_name: bdunogier/MediapartProxy


text:
Starling Framework: the GPU powered 2D Flash API
================================================

What is Starling?
-----------------

Starling is an ActionScript 3 library that mimics the conventional Flash display tree architecture. In contrast to conventional display objects, however, Starling "lives" entirely inside the Stage3D environment. That means that all objects are rendered directly by the GPU, which leads to a significant performance boost.

Starling's API is not a direct 1:1 port of the Flash API. The classes were streamlined and optimized for working well with the GPU; common tasks in game development were simplified. Starling hides the Stage3D internals from developers, but makes it easy to access them for those who need to create custom display objects.

Just like its iOS sibling, the [Sparrow Framework][1], Starling aims to be as lightweight and easy to use as possible. As an Open Source project, much care was taken to make the source code easy to read, understand and extend.

Where do I find more information about Starling?
------------------------------------------------

Here are a few starting points:

* [Official Homepage](http://www.starling-framework.org)
* [API Reference](http://doc.starling-framework.org)
* [Support Forum](http://forum.starling-framework.org)
* [Tutorial Book](http://www.bytearray.org/?p=3371)

[1]: http://www.sparrow-framework.org

repository: spmallick/Starling-Framework

repo_name: spmallick/Starling-Framework


text:
# MakeSPC
Python script to convert images to the .SPC format, which is popular on the Amstrad PCW8256 and friends.

You just need to provide a source image in any popular format. Be sure to crop your image to a 4:3 aspect ratio before running this tool though, because it assumes the image is already 4:3 and won't do any cropping.  But it will resize the image appropriately for you.

## Prerequisites
[Python](https://www.python.org/)

[Pillow](https://pillow.readthedocs.io/en/stable/)

## Usage
`python makespc.py <input image filename>`

The script will write out a preview image in the same format as the input, and it will write a .spc file that can be copied to a disk image for viewing on an Amstrad PCW8256 or similar.

repository: OliWright/MakeSPC

repo_name: OliWright/MakeSPC


text:
## Expected

The expected behavior

## Actual

The observed behavior

## Environment

Where did this happen? What characteristics are significant?

## Steps to reproduce

Have you seen this more than once? If so, how did you cause it to happen again?

## Artifacts

Logs, configuration, or any other files helpful in reproducing the issue

repository: aclairefication/gomad

gha_language: Go

repo_name: aclairefication/gomad


text:
---
layout: post
title: Results from my first attempt at making Neapolitan Pizza
---

<img src="https://i.imgur.com/L8lLDjj.jpg"/>

Based off of Kenji's [Hacker Free Neapolitan Pizza](https://www.seriouseats.com/recipes/2010/09/hacker-free-neapolitan-pizza-for-a-home-kitchen-recipe.html) recipe

Couple thoughts:

* This is the closest to neapolitan I've gotten. Thin crust, leopard pattern on the top and bottom.
* It wasn't as chewy as I wanted it to be (the test I use is whether it folds rather than bends when pinched by hand end to end - it'd mostly fold but not as sharply as an american slice).
* I wanted the cheese to burn a little more but that'd mean the crust would overcook. Not quite sure what the solution is here.
* There's a step in the recipe where you leave the dough out to rise. Mine did not rise. Reasons? I think too much hydration + the oil in the bowl sank from the sides to the bottom and engulfed the dough.

Overall, good progress. Took a lot of time (3 days of waiting, ~2.5 hours of labor) but worth it. Couple things to try on the next iteration:

* Kenji recommends a scale for accuracy purposes - might be time to get one to make sure my mix is right.
* I got rise when cooking but it was moderate. I need to find the reason why I'm not getting good, high rise.
* I forgot to take a photo of the cross section for analysis. Will do that next time.
* The flour on the pan to prevent sticking would start burning over time - need to dust it out from pizza to pizza.
* When kneading the dough, I'd mess up and tear it and start from scratch which I imagine hurts something. I want to work on getting this right.


text:
# Django Multifactor Authentication

[![pypi version](https://img.shields.io/pypi/v/django-multifactor-authentication.svg)](https://pypi.org/project/django-multifactor-authentication/)

Flexible authentication for web, mobile, desktop and hybrid apps. Can be used for 1fa, 2fa and mfa scenarios. Easily configurable and extendable with new authentication methods, called `services`. All authenticaton scenarios, called `flows`, are based on `identifiers` and `secrets`, which can be used or not used in multiple combinations:
- username, email, phone, ...
- password, passcode (aka one-time pass or token), hardcode (aka device or card id), ...

Full list of supported services (devices):
- Email
- Phone (as Sms)
- WhatsApp
- Google Authenticator
- Microsoft Authenticator
- Authy, andOTP, etc
- Yubikey (soon)
- ...add yours

and service providers:
- Twilio
- Vonage (Nexmo)
- Amazon SNS
- ...add yours

### Usage

The package creates custom user model, that could be used as is or as inherited. General priniciples for custom user models in Django are respected ([how it works](https://docs.djangoproject.com/en/2.2/topics/auth/customizing/#substituting-a-custom-user-model)).

Base settings (required):
```
AUTH_USER_MODEL = 'multauth.User'
AUTHENTICATION_BACKENDS = (
    'multauth.backends.ModelBackend',
    # ...etc
)

MULTAUTH_FLOWS = (
    # pattern: ('identifier', 'secret1', 'secret2', ...)
    ('phone', 'hardcode', 'passcode'),
    ('email', 'password', 'passcode'),
    ('username', 'password'),
    # ...etc
)
```

Extra settings (optional):
(see built-in [services](./multauth/services), [providers](./multauth/providers) and [templates](./multauth/templates))
```
MULTAUTH_SERVICES = [
  'multauth.services.UsernameService',
  'multauth.services.EmailService',
  'multauth.services.PhoneService',
] # by default

MULTAUTH_DEBUG = True # False by default
MULTAUTH_PASSCODE_LENGTH = 6 # size in digits
MULTAUTH_PASSCODE_EXPIRY = 3600 # time in seconds

MULTAUTH_SERVICE_EMAIL_PROVIDER = 'multauth.providers.MailProvider' # by default
MULTAUTH_SERVICE_PHONE_PROVIDER = 'multauth.providers.TwilioProvider' # by default

MULTAUTH_SERVICE_EMAIL_TEMPLATE_NAME = 'custom'
MULTAUTH_SERVICE_EMAIL_VERIFICATION_VIEWNAME = 'custom'
MULTAUTH_SERVICE_PHONE_TEMPLATE_NAME = 'custom'
```

Provider specific settings (could be required):
```
MULTAUTH_PROVIDER_TWILIO_ACCOUNT_SID = 'SID'
MULTAUTH_PROVIDER_TWILIO_AUTH_TOKEN = 'TOKEN'
MULTAUTH_PROVIDER_TWILIO_CALLER_ID = 'CALLER_ID' # '+15005550006'

MULTAUTH_PROVIDER_VONAGE_API_KEY = 'KEY'
MULTAUTH_PROVIDER_VONAGE_API_SECRET = 'SECRET'
MULTAUTH_PROVIDER_VONAGE_BRAND_NAME = 'BRAND_NAME' # 'Vonage APIs'
```

### Usage more

Custom use cases and how to config or code them.

#### APIs

Package contains full set of [rest api endpoints](./multauth/api/urls.py), but it's optional. To activate it, `djangorestframework>=3.10.3` should be installed and the urls be included:
```
urlpatterns = [
    path(r'^', include('multauth.api.urls')),
]
```

#### User activation

Users are set as "active" on creation.
This behavior is not managed by settings for now (check for further updates).

#### Services verification

By default all services are set as "confirmed" on creation.
To change this behavior extra settings should be added, for example:
```
MULTAUTH_SERVICE_EMAIL_CONFIRMED = False
MULTAUTH_SERVICE_PHONE_CONFIRMED = False
...
```

Non-comfirmed services will automatically be called for verification (token/key to be sent) on creation or idenfier updates. To invoke verification manually, call api endpoints:
- `multauth:signup-verification`

or model methods:
- `user.verify` for all non-confirmed services
- `user.verify_email` for email
- `user.verify_phone` for phone
- ...

And to complete verification process call api endpoints:
- `multauth:signup-verification-phone` to post the token (ie passcode)
- `multauth:signup-verification-email` to post the token (ie passcode)
- `multauth:signup-verification-email-key` as a classic in-email link to pass the key
- ...

gha_language: Python

gha_license_id: MIT


text:
---
layout: post
title:      "Rails Project"
date:       2020-10-25 19:52:31 +0000
permalink:  rails_project
---

This is my rails project I named Rubrary. It's a website built in the MVC framework that allows users to log in using the standard login route, or using their github account. The user can then add books to the website by giving the book a name an a description. The book will then be posted for all users to see, and they can comment on said books.

The models have validation to prevent any invalid data going into database. I also made sure to include association between all the models by using has many through and belongs to. Each book has many comments, and has many users through the comments. Each user has many comments, and has many books through their comments.

Each View with a form has error handling using pluralize. If there is an error submitting the form, the user will be alerted to the error and shown the message as to why the form didn't submit. Each form I created I used the form_with helper method because I thought it looked super clean, as well as seeing form_for was "soft deprecated" on the rails website.

The controllers are where the magic happens. The application controller has many methods that check and make sure a user is logged in. Users controller is used for the standard way users sign up. Sessions controlls creating the session and handling any OAuth logins. Which to be honest was probably the hardest part of this project. I made sure to use a .where ActiveRecord Query method on my comment model to find all the comments where the book id was the same as the book id in the params.

Overall this project was fun to build and has a lot of different, seperate components working together to make one cohesive website. Interesting to see that our favorite websites we use everyday impliment these sorts of practices and we didn't even realize it until now.

extension: markdown


text:
+++
title = "cp"
chapter = false
weight = 102
hidden = false
+++

## Summary
Copy a file from one location to another.

- Needs Admin: False
- Version: 1
- Author: @xorrior

### Arguments

#### source

- Description: Source file to copy.
- Required Value: True
- Default Value: None

#### destination

- Description: Source will copy to this location
- Required Value: True
- Default Value: None

## Usage

```
cp
```

## Detailed Summary

repository: NotoriousRebel/Mythic

gha_license_id: NOASSERTION

repo_name: NotoriousRebel/Mythic


text:
---
title: Select React component
components: Select, NativeSelect
---

# Selects

Select components are used for collecting user provided information from a list of options.

## Simple Select

Menus are positioned over their emitting elements such that the currently selected menu item appears on top of the emitting element.

{{"demo": "pages/demos/selects/SimpleSelect.js"}}

## Native Select

As the user experience can be improved on mobile using the native select of the platform,
we allow such pattern.

{{"demo": "pages/demos/selects/NativeSelects.js"}}

## Multiple Select

The `Select` component can handle multiple selections.
It's enabled with the `multiple` property.

Like with the single selection, you can pull out the new value by accessing `event.target.value` in the `onChange` callback. It's always an array.

{{"demo": "pages/demos/selects/MultipleSelect.js"}}

## With a Dialog

While it's discouraged by the Material Design specification, you can use a select inside a dialog.

{{"demo": "pages/demos/selects/DialogSelect.js"}}

## Text Fields

The `TextField` wrapper component is a complete form control including a label, input and help text. You can find an example with the select mode [in this section](/demos/text-fields#textfield).

## Controlled open Select

{{"demo": "pages/demos/selects/ControlledOpenSelect.js"}}

repository: micimize/material-ui

gha_language: JavaScript

repo_name: micimize/material-ui


text:
---
layout: page
title: "Witness complex"
meta_title: "Witness complex"
teaser: ""
permalink: /witnesscomplex/
---
{::comment}
Leave the lines above as it is required by the web site generator 'Jekyll'
{:/comment}

For more details about the witness complex, please read the [user manual of the package]({{ site.officialurl }}/doc/latest/group__witness__complex.html).

## weak_witness_persistence ##
This program computes the persistent homology with coefficient field *Z/pZ* of a Weak witness complex defined on a set of input points.
The output diagram contains one bar per line, written with the convention:

`p dim birth death`

where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature,
and `p` is the characteristic of the field *Z/pZ* used for homology coefficients.

**Usage**

`weak_witness_persistence [options] <OFF input file>`

**Allowed options**

* `-h [ --help ]` Produce help message
* `-l [ --landmarks ]` Number of landmarks to choose from the point cloud.
* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in standard output.
* `-a [ --max-sq-alpha ]` (default = inf) Maximal squared relaxation parameter.
* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology.
* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals.
* `-d [ --cpx-dimension ]` (default =<PHONE_NUMBER>) Maximal dimension of the weak witness complex we want to compute.

**Example**

`weak_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.006`

N.B.: output is random as the 20 landmarks are chosen randomly.

## strong_witness_persistence ##

This program computes the persistent homology with coefficient field *Z/pZ* of a Strong witness complex defined on a set of input points.
The output diagram contains one bar per line, written with the convention:

`p dim birth death`

where `dim` is the dimension of the homological feature, `birth` and `death` are respectively the birth and death of the feature,
and `p` is the characteristic of the field *Z/pZ* used for homology coefficients.

**Usage**

`strong_witness_persistence [options] <OFF input file>`

**Allowed options**

* `-h [ --help ]` Produce help message
* `-l [ --landmarks ]` Number of landmarks to choose from the point cloud.
* `-o [ --output-file ]` Name of file in which the persistence diagram is written. By default, print in standard output.
* `-a [ --max-sq-alpha ]` (default = inf) Maximal squared relaxation parameter.
* `-p [ --field-charac ]` (default = 11) Characteristic p of the coefficient field Z/pZ for computing homology.
* `-m [ --min-persistence ]` (default = 0) Minimal lifetime of homology feature to be recorded. Enter a negative value to see zero length intervals.
* `-d [ --cpx-dimension ]` (default =<PHONE_NUMBER>) Maximal dimension of the weak witness complex we want to compute.

**Example**

`strong_witness_persistence data/points/tore3D_1307.off -l 20 -a 0.5 -m 0.06`

N.B.: output is random as the 20 landmarks are chosen randomly.

repository: GUDHI/gudhi-devel

repo_name: GUDHI/gudhi-devel


text:
# dashing_time
Dashing widget to show local and utc time

To use this widget:

1. place a copy of moment.js from https://momentjs.com/ in the
assets/javascripts/ directory of your dashing / smashing project
folder.

2. add:

```
  <li data-row="1" data-col="1" data-sizex="2" data-sizey="1">
    <div data-view="Time"></div>
  </li>
```

to the .erb file for the dashboard and restart the dashing /
smashing server.


text:
# Laravel Elastic Email #

A Laravel wrapper for Elastic Email

### Installation ###

Add Laravel Elastic Email as a dependency using the composer CLI:

```bash
composer require zanysoft/laravel-elastic-email
```

Next, add the following to your config/services.php and add the correct values to your .env file

```php
'elastic_email' => [
	'key' => env('ELASTIC_KEY'),
	'account' => env('ELASTIC_ACCOUNT')
]
```

Next, in config/app.php, comment out Laravel's default MailServiceProvider. If using < Laravel 5.5, add the MailServiceProvider and ApiServiceProvider to the providers array

```php
'providers' => [
    /*
     * Laravel Framework Service Providers...
     */
    ...
//    Illuminate\Mail\MailServiceProvider::class,
    ZanySoft\ElasticEmail\MailServiceProvider::class,
    ZanySoft\ElasticEmail\ApiServiceProvider::class,
    ...
],
```

Next, in config/app.php, add the ElasticEmail to the aliases array

```php
'aliases' => [
    ...
    'ElasticEmail' => ZanySoft\ElasticEmail\Facades\ElasticEmail::class,
    ...
],
```

Finally switch your default mail provider to elastic email in your .env file by setting MAIL_DRIVER=elastic_email

### MailService Usage ###

This package works exactly like Laravel's native mailers. Refer to Laravel's Mail documentation.

### Api Usage ###

For documentation visit https://api.elasticemail.com/public/help

```php

    //For contact
    ElasticEmail::Contact()

    //For emails
    ElasticEmail::Email()

```

repository: zanysoft/laravel-elastic-email

repo_name: zanysoft/laravel-elastic-email


text:
---
title: ConEmu | FAQ - Part 8

description: Frequenly asked user questions about ConEmu usage

breadcrumbs:
 - url: TableOfContents.html#conemu
   title: ConEmu

otherlang:
   en: /en/FAQ-8.html
   ru: /ru/FAQ-8.html
---

# Windows Vista  {#q-8-vista}

{% include faq_disclaimer_en.md %}

* [Q. The key combination Ctrl-Win-Alt-Space does not show the RealConsole .](#q-8-1)
* [Q. Other console processes hang in Windows Vista.](#q-8-2)

#### Q. The key combination Ctrl-Win-Alt-Space does not show the RealConsole.   {#q-8-1}

**A.** For some reason, the first Space press is sometimes ignored by Vista.
Without releasing Ctrl-Win-Alt, hit Space once more.

#### Q. Other console processes hang in Windows Vista.   {#q-8-2}

**A.** The fault lies with the ConIme.exe process. It seems to be required for input of hieroglyphs (Chinese etc.) in console windows. Why is it needed, if input is done in a graphical window? Forbid its startup, or simply rename the file, e.g. to 'ConIme.ex1' (Safe Mode only). To forbid its startup, apply the following to your registry and reboot:

~~~
[HKEY_CURRENT_USER\Console]
"LoadConIme"=dword:00000000
~~~

gha_language: HTML


text:
# Wrappers

!> Unless otherwise noted, this is not an official endorsement.

## C\# #

### crapi-csharp-wrapper

C\# wrapper (both async and sync)

- Repo: https://github.com/SoptikHa2/crapi-csharp-wrapper/)
- Author: SoptikHa2
    - Github: http://github.com/SoptikHa2

## Java

### jcrapi

Java wrapper

- Repo: https://github.com/mlieshoff/jcrapi
- Author: mlieshoff (micah)
    - Github: http://github.com/mlieshoff

## Node.js

### croyale

Croyale is a powerful node.js module that allows you to interact with the cr-api very easily.

- Repo: https://github.com/TheLearneer/croyale
- Author: Froosty
    - Github: https://github.com/TheLearneer

## PHP

### clash-royale-php

PHP 5.5+ wrapper

- Repo: https://github.com/firegore2/clash-royale-php
- Author: Firegore
    - Github: https://github.com/firegore2

## Python

### clashroyale

Python Async + Sync wrapper

- Repo: https://github.com/cgrok/clashroyale
- Author: kyb3r
    - Github: https://github.com/kyb3r

## Retired / Invalid /  No longer maintained

Listed here are a list of wrappers that are no longer maintained and in fact no longer works with the latest version of the API. They are included here as our thanks for being an early supporter.

### CrApiCsharp

A C\# wrapper

- Repo: http://github.com/Mahi-Uddin/CrApiCsharp/
- Author: Mahi-Uddin Zihad
    - Github: http://github.com/Mahi-Uddin/

### cr.js

Asynchronous Node.js wrapper

- Repo: https://github.com/madebyKAI/cr.js
- Author: madebyKAI (affinix)
    - Github: https://github.com/madebyKA

### cr-py

Synchoronous Python wrapper

- Repo: https://github.com/kwugfighter/cr.py
- Author: kwugfigher
    - Github: http://github.com/kwugfighter

repository: abin-raj/cr-api-docs

repo_name: abin-raj/cr-api-docs


text:
# Iliad Progamming Language
## About
Iliad is a multi-paradigm language in development.

## Development
Iliad is currently in development. At the moment, it can boot a repl-like enviroment and evaluate
simple expressions.

### Planned features
- Statements
- Functions as first-class citizen
- Classes as first-class citizen

## Documentations
The files contain comments to be read by doxygen in order to Document each class, method, and variable. The Doxyfile is included if you wish to make the docs yourself, or you can visit http://iliadprogramming.com/ for up-to-date documents.

## Resources
- ["Crafting Interpreters"](http://craftinginterpreters.com/) by Bob Nystrom.
- "Compilers: Principles, Techniques, & Tools (Second Edition)" (a.k.a. The Dragon Book) by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffry D. Ullman
- "Modern Compiler Design" by Dick Grune, Henri E. Bal, Ceriel J.H. Jacobs, and Koen G. Langendoen

## Special Thanks
Big thanks to Lynden Shields ([\@LyndenShields](https://twitter.com/LyndenShields)) for all the advice he's given in the creation of this project.

repository: Beidah/Iliad

repo_name: Beidah/Iliad


text:
---
layout: post
header-img: img/default-blog-pic.jpg
author: dbansal
description:
post_id: 18584
created: 2014/07/09 21:58:43
created_gmt: 2014/07/09 16:58:43
comment_status: open
---

# JSONPATH like Navigation in R for JSON Data

According to Wiki:

> R is a free software programming language and software environment for statistical computing and graphics.

However, before any analysis, the input data should be restructured. If the input data is JSON, this restructring becomes very complex and time-consuming. But, if we get some mechanism to navigate through that JSON data using JSONPATH mechanism, it becomes, all the more easy to rearrange JSON data to other formats like table and arrays.

Last week, we had an Innovation Day in our organization, rather project, to be more precise. Everyone was working, mostly in groups, on some or the other ideas. I was also working on an idea proposed by my teammate. When it came to technology, we chose to pick my current love of that time, R as it required some kind of statistical analysis.

Most of us should agree on the fact that the hardest part in any statistical analysis is data munging. That is, bringing the input data in analyzable format. It becomes even harder when the source data is in JSON. JSON is best supported by data transfer or communication. Rather, we should say, data communication or transfer is best supported by JSON ( or XML ? Ok I agree on both, no hard feelings !). But when it comes to Data Analysis, it is, definitely, not the best format. So the main obstacle that I had was to break this JSON data into separate rows and columns i.e. cells of a table or a matrix or a dataframe.

**JSONLITE:**

So, a nursery standard googling took me to R's package for JSON, **JSONLITE**: A smarter JSON encoder/decoder for R. This package is a fork of the RJSONIO package by Duncan Temple Lang. More information about this package can be found [here][1]. It converts your JSON string into a dataframe or list and vice-versa.

## **Problem Scenario:**

I will try to simulate the problem using a dummy [JSON data file][2] that I found on <http://openweathermap.org/current#bulk>. Each line of this file contains a JSON record of the form:

![Selection_009][3]

Each record here shows the weather information of a particular city for every three hours. Each element in the array “_Data_” contains the weather info for a particular timestamp (number of seconds from epoch). Various data fields in each element of “_Data_” consists of _temp, temp_min, temp_max, pressure, weather description_ (nested in “_Weather_” array), _clouds_ data etc.

## **Problem Statement:**

For all the cities in the file I had to get a list of _temp_min_ values at _dt_(timestamp) = “1394863200” (i.e. for datetime -> 2014-03-15 06:00:00). So the JSON structure has to be **drilled down and refined (filtered)** on the basis of a value that persists deep in the structure in an array.

So, we need to use some JSONPATH kind of mechanism to drill down this JSON and filter according to this value. But it is not available (atleast not readily) through any package in R.

## **Solution:**

First lets convert this data to an R object.

To convert the above data into an R object, use _fromJSON()_ method from JSONLITE package:

    allCities <- readLines("hourly_14.json")
    firstCity <- allCities[[1]]
    jsonData<- fromJSON(firstCity)

Now, we have jsonData object in R which contains all the information about the weather of first city in the file. We have to apply some JSONPATH like mechanism on this object to fetch out the precise information from the whole JSON object. JSONLITE, which is wonderful in creating the R object, however, does not provide any mechanism to go inside the document using JSONPATH. So it is the responsibility of R's code to dive into this JSON object to fetch the relevant information denoted by the JSONPATH.

You can use the following custom (read basic) method to get the relevant field by passing the json string and the JSONPATH. It first converts the jsonString into an object in R and then applies the JSONPATH like navigation to that object using jsonPath (the second argument) .

    drillDownJSON <- function (jsonString, jsonPath) {
      jsonData <- fromJSON(jsonString, flatten = T)
      out <- tryCatch({
        for(ele in jsonPath) {
          if (class(ele) == "list") {
            jsonData <- jsonData[[unlist(ele)]]
          }
          else {
            jsonData <- subset(jsonData, eval(parse(text=ele)))
          }
        }
      unname(jsonData)
      }, error = function(cond) {
        print(cond)
        return (NA_character_)
      })
      if (is.null(out))
        return (NA_character_)
      else return (out)
    }

Here: _jsonString -> character : the JSON document_ _jsonPath -> list of (list and strings) : this argument specifies the JSONPATH to search for._

The caveat here is that the second argument should be passed in a specific format viz.,_ _

  * a list with each element either a list of strings or a single string.
  * if it is a list of strings( i.e. the list of json keys) then it will be used to navigate into the document
  * if it is a string then it should be a condition which selects one element from array.
  * obviously the order of elements in the list should be according to the json structure.

In our example, to get the _temp_min_ values at _dt_(timestamp) = “1394863200” (i.e. for datetime -> 2014-03-15 06:00:00), we would pass the second argument as:

    list(list("data"),"dt ==<PHONE_NUMBER>", list("main","temp_min"))

It says:

  * From root of the document, go inside "_data_" field which is an array.
  * Select element from the array which has _dt_'s value as<PHONE_NUMBER>.
  * Now in that go inside  field "_main"_.
  * At last go inside "_temp_min"_ and return its value.
Call to this method for our specific example would be:

    drillDownJSON(jsonString = firstCity, jsonPath = list(list("data"),"dt ==<PHONE_NUMBER>", list("main","temp_min")))

So it returns the _temp_min_ for _firstCity_ at time: “2014-03-15 06:00:00”.

To get the list of these values for all the cities, we can use _sapply _function of R:

    Y <- sapply(x, drillDownJSON, list(list("data"),"dt ==<PHONE_NUMBER>", list("main","temp_min")))
    temp_min_list <- unname(y)

In _temp_min_list_ we have the list of the _temp_min_ values for all the cities.

## **Conclusion**

Using JSONLITE, we can convert a JSON data to an R object and wrap it to write a custom method like above to easily mock a JSONPATH like interface which you can use for other JSON objects. The above method is a very basic implementation which can be extended further to have more drill down and navigational features.

   [1]: http://cran.r-project.org/web/packages/jsonlite/index.html
   [2]: http://<IP_ADDRESS>/sample/hourly_14.json.gz
   [3]: http://xebee.xebia.in/wp-content/uploads/2014/07/Selection_009.png


text:
# swap

**Description** : Swaps the contents of two vectors

**Example**:
```cpp
    //Intializing the vectors
    std::vector<int> vector1 = {1,2,3};
    std::vector<int> vector2 = {4,5,6,6};

    //Function to swap the vectors
    vector1.swap(vector2);

```
**[See Sample code](../snippets/vector/swap.cpp)**
**[Run Code](https://rextester.com/PNR78595)**


text:
---
hrs_structure:
  division: '1'
  volume: '1'
  title: '1'
  chapter: 10H
  section: 10H-1
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0010H-0001
    parent: HRS0010H
    name: 10H-1 Statement of recognition
weight: 19005
title: Statement of recognition
full_title: 10H-1 Statement of recognition
---
**[§10H-1] Statement of recognition.** The Native Hawaiian people are hereby recognized as the only indigenous, aboriginal, maoli people of Hawaii. [L 2011, c 195, pt of §2]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# eLife_2019_OriginAndRole
Code Files to generate figures from Thouvenin et al. Origin and role of the cerebrospinal fluid bidirectional flow in the central canal, eLife 2020;9:e47699. DOI: https://doi.org/10.7554/eLife.47699.
The description of each code can be found in the README files inside all folders.

Parts of the dataset can be found on the corresponding Dryad depository (***)


text:
## Implementation of a hybrid PSO-GA algorithm.

This repository is an implementation of the algorithm described in
the paper "Global Path Planning for Autonomous Robot Navigation Using
Hybrid Metaheuristic GA-PSO Algorithm" by Hsu-Chih Huang and Ching-Chih Tsai.
The program was writen for the "Artificial Intelligence and Expert Systems"
course. This course is part of the "MSc in Computer Science" program in University of Piraeus.

## Instructions
- If not already installed, install the [PyGame Library] (http://www.pygame.org/news.html)
- Place all the source files in the same directory.
- If under Windows OS:
    - Open `__main__.py` with IDLE and run it
- If under UNIX-like system:
    - Open a terminal
    - Move to the proper directory
    - Run the program with `python __main__.py`

#### TODO
- Allow the user to select the starting and goal position
- Allow the user to switch between other searching algorithms

## License

[MIT License] (http://opensource.org/licenses/MIT)

Copyright (c) 2014 Kiriakos Velissariou

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:
Translations
============

The Plugin is translated into several languages:

* Swedish (sv) by @digitalfotografen
* Spanish (es) by @florenciohernandez
* Brazillian Portuguese (pt_BR) by @andtxr
* French (fr_FR) by @jtraulle
* Polish (pl) by @joulbex
* Hungarian (hu_HU) by @rrd108
* Italian (it) by @arturmamedov
* Turkish (tr_TR) by @sayinserdar
* Ukrainian (uk) by @yarkm13
* German (de) by @LordSimal
* Czech (cs_CZ) by @Mapiiik

**Note:** To overwrite the plugin translations, create a file inside your project 'resources/locales//{$lang}/' folder, with the name 'Users.po' and add the strings with the new translations.

Remember to clean the translations cache!

repository: CakeDC/users

repo_name: CakeDC/users


text:
This is the experimental, community-supported Windows port of MicroPython.
It is based on Unix port, and expected to remain so.
The port requires additional testing, debugging, and patches. Please
consider to contribute.

All gcc-based builds use the gcc compiler from [Mingw-w64](mingw-w64.org),
which is the advancement of the original mingw project. The latter is
getting obsolete and is not actively supported by MicroPython.

Build instruction assume you're in the ports/windows directory.

Building on Debian/Ubuntu Linux system
---------------------------------------

    sudo apt-get install python3 build-essential gcc-mingw-w64
    make -C ../../mpy-cross
    make CROSS_COMPILE=i686-w64-mingw32-

Building under Cygwin
---------------------

Install Cygwin, then install following packages using Cygwin's setup.exe:

* mingw64-i686-gcc-core
* mingw64-x86_64-gcc-core
* make

Also install the python3 package, or install Python globally for Windows (see below).

Build using:

    make -C ../../mpy-cross CROSS_COMPILE=i686-w64-mingw32-
    make CROSS_COMPILE=i686-w64-mingw32-

Or for 64bit:

    make -C ../../mpy-cross CROSS_COMPILE=x86_64-w64-mingw32-
    make CROSS_COMPILE=x86_64-w64-mingw32-

Building under MSYS2
--------------------

Install MSYS2 from http://repo.msys2.org/distrib, start the msys2.exe shell and
install the build tools:

    pacman -Syuu
    pacman -S make mingw-w64-x86_64-gcc pkg-config python3

Start the mingw64.exe shell and build:

    make -C ../../mpy-cross STRIP=echo SIZE=echo
    make

Building using MS Visual Studio 2013 (or higher)
------------------------------------------------

Install Python. There are several ways to do this, for example: download and install the
latest Python 3 release from https://www.python.org/downloads/windows or from
https://docs.conda.io/en/latest/miniconda.html,
or open the Microsoft Store app and search for Python and install it.

Install Visual Studio and the C++ toolset (for recent versions: install
the free Visual Studio Community edition and the *Desktop development with C++* workload).

In the IDE, open `micropython-cross.vcxproj` and `micropython.vcxproj` and build.

To build from the command line:

    msbuild ../../mpy-cross/mpy-cross.vcxproj
    msbuild micropython.vcxproj

__Stack usage__

The msvc compiler is quite stack-hungry which might result in a "maximum recursion depth exceeded"
RuntimeError for code with lots of nested function calls.
There are several ways to deal with this:
- increase the threshold used for detection by altering the argument to `mp_stack_set_limit` in `ports/unix/main.c`
- disable detection all together by setting `MICROPY_STACK_CHECK` to "0" in `ports/windows/mpconfigport.h`
- disable the /GL compiler flag by setting `WholeProgramOptimization` to "false"

See [issue 2927](https://github.com/micropython/micropython/issues/2927) for more information.

Running the tests
-----------------

This is similar for all ports:

    cd ../../tests
    python ./run-tests.py

Though when running on Cygwin and using Cygwin's Python installation you'll need:

    python3 ./run-tests.py

Depending on the combination of platform and Python version used it might be
needed to first set the MICROPY_MICROPYTHON environment variable to
the full path of micropython.exe.

Running on Linux using Wine
---------------------------

The default build (MICROPY_USE_READLINE=1) uses extended Windows console
functions and thus should be ran using the `wineconsole` tool. Depending
on the Wine build configuration, you may also want to select the curses
backend which has the look&feel of a standard Unix console:

    wineconsole --backend=curses ./micropython.exe

For more info, see https://www.winehq.org/docs/wineusr-guide/cui-programs .

If built without line editing and history capabilities
(MICROPY_USE_READLINE=0), the resulting binary can be run using the standard
`wine` tool.

repository: pfalcon/pycopy

branch_name: refs/heads/pfalcon

gha_language: C

repo_name: pfalcon/pycopy


text:
# arduino-echoboy-midi-controller
Project of USB-MIDI controller for [EchoBoy](https://www.soundtoys.com/product/echoboy/) (delay effect VST) based on [Arduino Mega 2560](https://www.arduino.cc/en/Guide/ArduinoMega2560).

## Content

1. Overview
2. Layout
3. Electrical calculations
3. Needed parts
4. PCB connections
5. Soldering
6. Testing
7. Code (ready)
8. Box preparation

## Prototype

I turned dreams into reality. No one produces such a machine, so I made it myself from scratch.

After 4 months of soldering, programming, drilling - working prototype is done.

This machine is built based on Arduino Mega 2560, a lot of expanders and AD converters.

Photos of last final steps are listed below.

### Prototype front panel vision

![FrontPanelVision](images/0.png?raw=true "FrontPanelVision")

### Working prototype with extra features like "Sync 1-2 echo time" or "Set Midi all".

Also LCD screen inform us about last values of time/note for Echo 1 & 2.

![FrontPanel](images/1.jpg?raw=true "FrontPanel")

### Back panel

Back side with DIP 4-channel switch to choose MIDI channel. Power switch on the right side.

![BackPanel](images/2.jpg?raw=true "BackPanel")

### Mounting inside box

![MountingBox](images/3.jpg?raw=true "MountingBox")

### Soldering & testing process

Stress memory test on Arduino Uno R3 - which fails, so then I needed Arduino Mega to handle that.

![MemoryTests](images/4.jpg?raw=true "MemoryTests")

repository: koksyn/arduino-echoboy-midi-controller

repo_name: koksyn/arduino-echoboy-midi-controller


text:
Google Singleton Detector (0.7.3)
===============================

Google Singleton Detector (GSD) is an Open Source tool which allows you to
locate singletons and global state inside Java applications.  Ideally, you will
be able to use this information to locate heavily used global state and
remove it.

Downloading
===========

The latest version of GSD is available at

  http://code.google.com/p/google-singleton-detector/downloads/list

and may be downloaded in the following distributions:

  gsd-X.X.X.zip - The complete release containing compiled jars and external
  jars.  Simply unzip the file and run GSD.jar.

  gsd-src-X.X.X.zip - A source only distribution which must be built using
  ant.  Includes precompiled external jars.

Building GSD
============

Building GSD currently requires ant 1.7, available at:

  http://ant.apache.org/

and Java 1.5, available at:

  http://java.sun.com/javase/downloads/index.jsp

To build the project, enter 'ant' into the directory you unzipped the source
to.  This will create the directory 'target' with a gsd-X.X.X.zip file inside.
Other ant commands:

```
  ant clean         - Remove generate files
  ant compile       - Build source
  ant compile-tests - Build tests
  ant test          - Build and run tests
  ant jar           - Build the distributable jar
  ant zip           - Build the distributable zip
```

Usage
=====

Running GSD currently requires Java 1.5, available at:

  http://java.sun.com/javase/downloads/index.jsp

Unzip gsd-X.X.X.zip and run with the following command:

```
  java -jar sd.jar [-(VvshmfoSb)] [-t <threshold>] <classes dir/jar> <output file> [<package>]
   -V       - Print version and exit
   -v       - Enable verbose mode
   -s       - Hide singletons
   -h       - Hide hingletons
   -m       - Hide mingletons
   -f       - Hide fingletons
   -o       - Hide others
   -S       - Print statistics upon completion
   -b       - Add stats banner to the graph
   -t <val> - Threshold (minimum edges required to draw a node)
```

The most important options here are probably s, h, m and f, which when included
prevent the program from finding certain types of _ingletons.

The <class dir/jar> parameter is the directory or jar which contains the
classes you wish to analyze. The <output file> should be a .graphml file to
allow your graph viewer to recognize the format. The <package> parameter may
be included to limit the analyzed classes to a certain package.

Viewing the Graph
=================

Once you have a GraphML file, you'll need yEd to view it (we use yWorks to
specify node color and shape, which can be read by yEd). yEd is a graph viewer
and editor which can handle large graphs and provide custom layouts quickly,
and can be found here:

  http://www.yworks.com/en/products_yed_about.htm

Since the GraphML files produced by this program don't define the size of nodes
or the overall layout, you'll have to do a few things to make it readable.

First, you need to resize the nodes (Tools -> Fit Node to Label).

Then apply some type of layout; I find smart organic to be particularly useful
(Layout -> Organic -> Smart), but circular and hierarchical can be very
effective depending on your graph.

Understanding the Graph
=======================

Once you have a graph open and have applied a layout, you'll see a collection
of colorful nodes and arrows.  If you're running this on a small codebase or
one with little use of global state, hopefully you'll see only a few nodes.
If you see a large tangle of lines and colors, don't worry, yEd makes it easy
to work with.

There are six different types of nodes:

|  Color  |  Class  |                     Description                         |
|---------|---------|---------------------------------------------------------|
|  Red    | Singleton | A class for which there should only be one instance in the entire system at any given time. This program detects singletons which enforce their own singularity, which means they keep one static instance of themselves and pass it around through a static getter method. |
| Orange |  Hingleton | Derived from "helper singleton," a class which turns another class into a singleton by enforcing that class's singularity. |
|  Yellow  | Mingleton | Derived from "method singleton" a class which has any static method that returns some state without taking any parameters. |
|  Green  | Fingleton | Derived from "field singleton," a class which contains a public static field. |
| Light Blue |  Other  | Any class which is directly dependent on a *ingleton. |
|  Blue | -  | Displays statistics about the current codebase.  Is only drawn if the banner option (-b) is passed as a command line argument |

Each node contains two lines of text; the first line is the name of the class
that the node represents, and the second line is the package that class is in
(this saves horizontal space).  If a package was passed as an argument at
runtime, this prefix will be omitted from the package name (again, to save
space).

An arrow is drawn from one node to another if the first class directly uses
the global state of the second.  In the case of singletons and hingletons,
this means that a class calls the getInstance() method of the singleton/
hingleton.  For mingletons and fingletons, this means that a class access the
non-primitive global state of another class.

Additional Information
======================

If you need any more information about GSD, or want to submit a bug or
contribute in any way, check out the Google Code page at:

  http://code.google.com/p/google-singleton-detector/

You can also reach me directly at<EMAIL_ADDRESS>

repository: paul-hammant/java-singleton-detector

gha_language: Java

repo_name: paul-hammant/java-singleton-detector


text:
# _Pig Dice_

#### _An App for Pigs, 06.17.2020_

#### By _**Micheal Hansen & Teresa Rosinski**_

## Description

_An app that can play the game of Pig Dice, a simple die rolling game. In Pig Dice, a player rolls a die and scores the points shown, then decides whether to keep rolling or hold. A player may roll as many times as they like, but if they roll a one, they lose all points scored that turn, and must pass the die. First player to 100 wins the game._

## Specifications

| Spec | Input | Output |
| :-------------     | :------------- | :------------- |
| **Homepage** | User opens index.html | Homepage with game interface |
| **Program defines a game object containing a scorecard and a die** | User input: None necessary | Output: {scorecard, die} |
| **Program defines a scorecard that keeps track of each player's score** | User input: None necessary | Output: {player: 0, computer: 0} |
| **Program can add points to a player's score** | User input: player + 3 | Output: {player: 3, computer: 0} |
| **Program can detect if a player has a winning score of 100** | Program input: {Player: 103, Computer: 87} | Output: Player Wins! |
| **Program defines a die object** | User input: None necessary | Output: {} |
| **Die object has roll method that returns 1-6** | User input: die.roll() | Output: 4 |
| **Program initializes a new game when a player start** | User input: Clicks New Game Button | Output: Game starts |
| **Program determines whether player or computer goes first through random generation** | User input: None necessary | Output: Player Starts |
| **Program allows active player to roll a die and determine results** | User input: Clicks Roll | Output: 4 -> +4 Points |
| **Program keeps track of points scored in a turn** | User input: None necessary | Output: turn points: 4 |
| **Program allows player to decide to hold or roll again, unless a 1 is rolled** | User input: Player rolls | Output: Roll Again or Hold? |
| **Program adds turn points to a players score when they hold** | User input: Clicks Hold | Output: {player: 4, computer: 0} |
| **Program resets turn points to 0 and ends turn if a 1 is rolled** | User input: Rolls 1 | Output: Points=0, end turn |
| **Program loops until a winner is determined** | User input: None necessary | Output: Next Turn |

## Setup/Installation Requirements

Software Requirements
1. Internet browser
2. A code editor like VSCode or Atom to view or edit the codebase.

Open by downloading:
1. Download this repository onto your computer by clicking the 'clone or download button'
2. Double click index.html to open it in your web browser

Open via Bash/GitBash:
1. Clone this repository onto your computer:
`git clone https://github.com/Sudolphus/pig-dice`
2. Navigate into the `pig-dice` directory in Visual Studio Code or preferred text editor
`code .`
3. Open index.html in Chrome or preferred browser:
`open index.html`

#### To see my live website go to https://sudolphus.github.io/pig-dice/!

## Known Bugs

_None Currently Known_

## Support and contact details

_Please reach out through my GitHub account._

## Technologies Used

* _HTML_
* _CSS (including Bootstrap)_
* _JavaScript (including jQuery)_
* _VSCode_

### License

MIT License.

Copyright (c) 2020 **_Micheal Hansen & Teresa Rosinski_**

repository: Sudolphus/pig-dice

repo_name: Sudolphus/pig-dice


text:
# TestOof

[![CircleCI](https://circleci.com/gh/maxbeizer/test_oof.svg?style=svg)](https://circleci.com/gh/maxbeizer/test_oof)

A tiny test helper tool to make sure all your test files run.

 As an idiot, I often will write tests that I think are great
and the whole suite passes and I feel great about myself. Only
later—sometimes much later— do I notice the compiler warning that one of my
beautiful tests has the `.ex` extension and not the `.exs` extenion that
ExUnit requires to run the test.

This package is an attempt to remove that rake I tend to step on.

## How it works
TestOof assumes that all files in your test directory (the location of
which you can override) that end in `_test` are indeed ExUnit test files.
TestOof gathers files matching that criteria and filters that list down to
files whose extension is anything other than `.exs`. If there are any files
left after filter, TestOof raises and lists all offenders.

* Could it be more efficient? Certainly.
* Will it stop me from making the mistake of assuming test are running when the actually aren't? Possibly

## Installation

When [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `test_oof` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:test_oof, "~> 0.2.0", only: :test}
  ]
end
```

Then add the following to your `test_helper.exs`

```elixir
TestOof.ensure_test_files_are_exs!()
```

## Configuration
`test_oof` supports the following options as configuration:
* `test_dir` (string): Path to where the tests live, e.g. `File.cwd!() <> "/test"`
* `ignore` (list): Paths to ignore when checking extensions—false positives., e.g. `["some_cool_test"]`

Documentation can be found at
[https://hexdocs.pm/test_oof](https://hexdocs.pm/test_oof).

## Development
### Run the tests
```
$ mix test
```

Or run the linter and tests combined:
```
$ make test
```

### Run the linter
```
$ make lint
```

## Roadmap
* [ ] Handle umbrella projects
* [x] Make it more configurable
* [ ] Add an option to auto-correct
* [x] Add an option to ignore a list of false positives

## License
MIT. See LICENSE.


text:
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).

# Archer Clicky Game

**Archer Clicky Game is a simple "memory" game that allows user to gain points by clicking on the images. The images shuffle after every click, and the user cannot click on the same image more than once. It was made with React and Bootstrap.**

**Deployed: [https://m-fiks.github.io/archerClicky/]**

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Tech Used](#tech-used)
- [Installation](#installation)
- [License](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Tech Used
- React
- Bootstrap
- Node.js

## Installation
1. `git clone` the repo
2. Open the terminal and type `npm install`
3. Run `npm start` to run locally

## License
[MIT License](#https://github.com/m-fiks/archerClicky/blob/master/README.md)

repository: m-fiks/archerClicky

repo_name: m-fiks/archerClicky


text:
# README_HARDWARE - RE3 (Reproducibility, Reusability, Readability)

## Access our platform here

[re3.ai](https://re3.ai)

## Hardware Report Overview

Our project consists of software only and does not have any hardware required from the user’s end except for a computer to access our website. However, our platform makes use of google cloud instances and google app engine.

### Google App Instances

Since we are very much in the prototype stage, our deployment of the readability model currently works to minimize our cost. Specifically, our server is running on an instance using the instance class B1 containing 256 MB of memory, 600 MHz CPU limit, and Basic Scaling. As of now, basic scaling is set to have a max number of instances of 1 to once again minimize cost.

In order to deploy the readability model on Google App Engine, you must:

clone the repo into the google cloud terminal using:

```
git clone https://github.com/BostonUniversitySeniorDesign/21-05-Re3.git
```

cd into the flask app directory

```
cd Re3-readability/flask_api/app
```

Deploy flask app. The configuration settings are already set up in the app.yaml file.

```
gcloud app deploy
```

## Contributors

- [Andreas Francisco De Melo Oliveira](https://github.com/andoliv1)
- [Ethan Hung](https://github.com/ehungbu)
- [Jyotsna Penumaka](https://github.com/jyotsna-penumaka)
- [Layan Bahaidarah](https://github.com/layanb98)
- [Lukas Rosario](https://github.com/lukasrosario)
- [Ana Trisovic](https://github.com/atrisovic)

branch_name: refs/heads/main


text:
# Accelerate-Notebook

## Accelerating hit acquisition in drug screening, using a simulated docking molecule-target dataset as an example

### Environment set up (note python 3.6 required for RDKit to run smoothly):

conda create -n “env_name” python=3.6 jupyter pandas seaborn matplotlib numpy

conda activate "env_name"

conda install -c conda-forge rdkit

pip install sklearn

python -m ipykernel install --user --name “env_name” --display-name “env_name”

(Data unfortunately not included due to confidentiality)


text:
## Bind-DI version 1.1.3 released

- Configuration can be passed to Container's constructor
- If componentDirs array is passed in config object then container will run load() method during instantiation, will auto-load components from passed directories.

[Get it from NPM](https://www.npmjs.com/package/bind-di)


text:
# Push an App to your new Mantl cluster.

Content goes here

Image example: ![alternate text](assets/images/cisco-live.jpg)

```python
  import sys

  print("hello world")
```

# Taking Mantl Further (Next steps).

repository: klevenstein/mantl-devnet-learninglabs

repo_name: klevenstein/mantl-devnet-learninglabs


text:
---
layout: post
title:      "AB-testing on Northwind database"
date:       2019-08-31 13:25:21 -0400
permalink:  ab-testing_on_northwind_database
---

This post was written as part of a project to statistical study and hypotheses testing on Northwind dataset.

In this post, I would like to show examples of my implementation of the questions raised to the statistical study. Therefore, some technical aspects of the project, such as loading and importing data from SQL, will not be covered.

The post presents 2 examples of hypothesis testing using AB-testing (the first hypothesis), as well as multiple AB-testing and ANOVA model (the second hypothesis). The choice of this or that method is determined by the structure of the initial data.

**1.	First hypothesis. AB-testing**

The basic question posed in the project is how much the discount amount affects the volume of product ordered. From a mathematical point of view, this means comparing two or more density distributions of commodity volume samples, with one sample constructed for goods without a discount, the other or others for goods with discounted prices. If we look at the data on discounts, we can see that the number of possible discount rates is relatively small (10 rates) and varies from 1% to 25%, the total portion of discounted goods is about 38%. The important question is how much the discount size influences the volume of goods in the basket of goods in the presence of statistical dependence.

Before starting to formulate and test statistical hypotheses, I decided to perform a small visual analysis.

*fig 1.*
![figure 1](https://i.imgur.com/7YTJjSs.jpg)

Fig. 1 shows the density of volume distribution depending on the level of discount. At the same time, I would like to note that sub-samples themselves are formed according to the accumulation principle. For example, the discount >=0.01 sample contains all goods for which the discount rate is available in principle, while the discount >= 0.02 sample already has a smaller number of observations. This principle of sub-sampling allows us to study the threshold (critical) values of the discount rate, in which the statistical significance may appear or disappear. The graph shows that the basic density (without discount) is located to the left of the other rates, which indicates the presence of a certain positive effect of the discount on the volume. However, it is more difficult to make a clear distinction between KDEs that include a discount. For example, it seems that their peak values are almost at the same level.

*fig 2.*
![figure 2](https://i.imgur.com/PVdln7T.jpg)

Fig. 2 shows the average values of production volumes depending on the discount rate. Some important explanations should be given here. The upper gross volumes curve was plotted on the samples according to the accumulation principle, as in the previous plot. That is, the plot shows an average increase in the volume of ordered products compared to the base volume (when there is no discount) for each level of the discount rate. The second curve already compares the delta with the increase. For example, the rate of 10% corresponds to the value of product volumes equal to the increase in volumes compared to the 6% rate (the nearest previous rate). Mathematically speaking, the lower curve is a derivative of the upper curve. This graph illustrates that there is a level of rates, after which the incremental effect of the growth of the discount becomes insignificant for the volume of goods.

The statistical test consisted in comparing the average values of the samples being tested with the following parameters and assumptions:
* Assumption: all tested samples are **independent** from each other;
* Null hypothesis: **E( Quantity | no discount ) = E( Quantity | discount )**;
* Testing type: **2-tailed** with alpha = 0.05 (a stricter variant than the one-way test);
* Statistical criteria: **Welch’s t-test** – due to different sample sizes;

Besides Welch's p-value statistics calculations, the effect size (Cohen's D) and test power were also analyzed because, as it can be seen from the previous charts, there may be situations when the effect size value is small, which may lead to a drop in the test power and, as a consequence, to the impossibility of applying the test.

The result of statistical testing is shown in Fig. 3 and Fig. 4. The main difference between them is based on the following:
* Version 1 compares the difference between the base sample (without discount) and the samples (with discount).
* Version 2 takes as the first sample a set of values of discounted volumes of goods below the given discount level (including goods without discount), and as the second sample - goods with a discount equal or higher than the level. Thus, the second version studies the marginal effect of the impact of rates.

*fig 3*
![figure 3](https://i.imgur.com/nNYkvz8.jpg)

*fig 4*
![figure 4](https://i.imgur.com/i0MLWOW.jpg)

The results of the study showed that:
* In general, the presence of a discount to the price increases the volume of goods ordered (Fig. 3).
* At the same time, the marginal effect is significant only in the range of rates of 1%-10%, for higher rates the increase in the rate does not affect the growth of goods, and as a result, falls effect size and test power.

Thus, we can conclude that there is a statistically significant positive effect of the discount rate on the volume of goods within the range from 1% to 10%.

**2.	Second hypothesis. Multiple AB-testing and ANOVA model**

As part of the additional hypothesis, I asked myself what could affect the delay in delivery of goods and tested the impact of Shipper's choice on ShippedDate – RequiredDate. This example illustrates the possibility of using multiple AB testing.

There are only three suppliers in the database: Federal Shipping, Speedy Express and United Packages, with portions of 31%, 30% and 39% of the total order volume, respectively, i.e. the proportions between them are roughly evenly distributed.

The general zero hypothesis for testing the difference is as follows:

Ho: E(Delay | Federal Shipping) = E(Delay | Speedy Express) = E(Delay | United Packages)

Taking into account that the standard AB-test works with only two samples, such a hypothesis splits into 3 separate hypotheses comparing the corresponding sub-samples in pairs. The total number of such hypotheses is equal to the number of combinations of 3 by 2, equal to 3.

The test results were as follows:
* Federal Shipping vs Speedy Express: p-value = 0.55, Cohen’s D = 0.05, test power = 0.09;
* Federal Shipping vs United Package: p-value = 0.10, Cohen’s D = 0.14, test power = 0.34;
* Speedy Express vs United Package: p-value = 0.36, Cohen’s D = 0.08, test power = 0.14.

In general, we can say that there are no significant differences, but the low value of the test power does not allow us to draw an unambiguous conclusion of the study. Therefore, in such cases, a convenient alternative is to perform the test using the ANOVA model.

The ANOVA model is also useful in cases where the number of discrete predictor values (in this case Shipper) increases, which leads to a rapid increase in the number of combinations and complicates the execution of the code in standard AB-testing.

In this case, I tested a simple variation of the model with the formula "Delay ~ C(Shipper)", p-value F-stat was equal to - 0.28, which confirmed the null hypothesis of no influence Shipper on Order Delays.


text:
---
layout: page
title: About me
---

I have started as desktop and backend C++/C# developer. While one part of me enjoyed creating programs, my other passion always was finding cracks and breaking things. After some time I've moved into Information Security field where I feel I found a balance: I enjoy writing security tools and performing technical security assessments. In my free time I like researching security of third party products (both closed and open source).

Open source projects I am or was actively involved:

[Security Code Scan](https://security-code-scan.github.io/) - Security static code analysis for C# and VB.NET.
[Electronegativity](https://github.com/doyensec/electronegativity) - Vulnerability patterns detector for JavaScript/TypeScript Electron applications.

You can find me on [Twitter](https://twitter.com/yarlob), [GitHub](https://github.com/JarLob), [Linkedin](https://www.linkedin.com/in/yarlob/) and you can reach me at jarlob+gh()gmail.com

### Disclosures:
Arbitrary code execution in [Resource.NET](https://fishcodelib.com/Resource.htm) [(not fixed)](/en/blog/dnspy-deserialization-vulnerability)
Arbitrary code execution in [dnSpy](/en/blog/dnspy-deserialization-vulnerability)
Path Traversal in [Aspose.ZIP for .NET](https://docs.aspose.com/display/zipnet/Aspose.ZIP+for+.NET+19.1+Release+Notes)
RCE in [Joplin desktop client](https://github.com/laurent22/joplin/releases/tag/v1.0.109)
SQL injection in [Xataface](https://github.com/shannah/xataface/releases/tag/2.2.3). [(The fix)](https://github.com/shannah/xataface/commit/eb4265e7188b715cc6c886f19f4332fd4b4346ca)
SQL injection in [PHP-MySQLi-Database-Class](https://github.com/ThingEngineer/PHP-MySQLi-Database-Class/issues/823)


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: Green Bank and Effelsberg Radio Telescope Searches for Axion Dark Matter Conversion
  in Neutron Star Magnetospheres
subtitle: ''
summary: ''
authors:
- Joshua W. Foster
- Yonatan Kahn
- Oscar Macias
- Zhiquan Sun
- Ralph P. Eatough
- Vladislav I. Kondratiev
- Wendy M. Peters
- Christoph Weniger
- Benjamin R. Safdi
tags: []
categories: []
date: '2020-01-01'
lastmod: 2020-11-01T13:45:17+01:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-11-01T12:45:17.543958Z'
publication_types:
- '2'
abstract: ''
publication: '*Phys. Rev. Lett.*'
doi: 10.1103/PhysRevLett.125.171301
---

repository: cweniger/personal-website

repo_name: cweniger/personal-website


text:
Let's setup our project with a conventional web app project, with a directory structure like:

```
/app
  /styles
/build
.gitignore
index.html
README.md
```

We'll put source code in the `/app` dir, and compiled code in the `/build` dir.


text:
# OxygenOS Open Beta 5 for OnePlus 7/7 Pro will roll out ‘next week’

Published at: **2019-11-07T13:14:50+00:00**

Author: **Damien Wilde**

Original: [9to5Google](https://9to5google.com/2019/11/07/oxygenos-open-beta-5-oneplus-7-pro/)

Despite pushing out another update at almost the same time, OnePlus has confirmed that the OxygenOS Open Beta 5 for the OnePlus 7 and OnePlus 7 Pro will roll out “next week.”
The update brings a number of upgrades and improvements to both devices — which do have the full stable Android 10 update available already if you prefer. OnePlus noted in the official announcement post that there is currently an issue that needs to be addressed before the rollout can actually begin.
For those of you that were having issues on Beta 4 with touch latency while gaming, a fix is incoming. There are also fixes for privacy alerts and app permission requests, weather app enhancements, optimized adaptive brightness fixes, and even a fix for the navigation bar color when using the native dark mode.

            System

            Weather

            Emergency Rescue

Some people have been able to get hold of the OxygenOS Open Beta 5 OTA file early using apps like Oxygen Updater. It looks to be a rather large update that weighs in at around 2GB in size — one to download when connected to Wi-Fi.
Our advice would be to avoid doing so until OnePlus has confirmed that all issues have been resolved. Of course, this is a beta so while it may be stable for the most part, you may encounter issues and bugs not seen in full OTA releases. Because of that, our advice would be to only install if you are fully aware of any risks and problems.
FTC: We use income earning auto affiliate links. More.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
[![Autobuild Status](https://travis-ci.org/DBaluxa/xjc-documentation-javadoc-plugin.svg?branch=master)](https://travis-ci.org/DBaluxa/xjc-documentation-javadoc-plugin)

XJC plugin to bring XSD descriptions into JavaDoc of generated classes
==========================================================================

Plugin forked from Hubbitus/xjc-documentation-annotation-plugin, because we does not need annonations, only Javadoc in our Java files.
Although adding special tags into the XSD could be another way, to have the XSD documentation as Javadoc in the Java files, it requires XSD files to be changed, which wasn't an option for us.

## What it does: \<annotation>\<documentation> -> Java class JavaDoc

Said we have this object described in XSD:

```xml
  <xs:complexType name="Customer">
    <xs:annotation>
      <xs:documentation>Customer basic data</xs:documentation>
      </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="xs:string">
        <xs:annotation>
          <xs:documentation>Name of the customer</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
```

We run xjc like:

    xjc -npa -no-header -d src/main/generated-java/ -p xsd.generated scheme.xsd

And got class like (getters, setters and any annotations omitted for simplicity):

```java
public class Customer {
  @XmlElement(required = true)
  protected String name;
}
```

**But in my case I want known how to class and fields was documented in source file!**
So it what this plugin do!

So you get:

```java
/**
* Customer basic data
*/
public class Customer {

    /**
     ** Name of the customer
    */
    @XmlElement(required = true)
    protected String name;
}
```

## How to use

### Manual call in commandline
If you want run it manually ensure jar class with plugin in run classpath and just add option `-XPluginDescriptionJavadoc`. F.e.:

    xjc -npa -no-header -d src/main/generated-java/ -p xsd.generated -XPluginDescriptionJavadoc scheme.xsd

### Call from Java/Groovy
```groovy
  Driver.run(
    [
       '-XPluginDescriptionJavadoc'
        ,'-d', generatedClassesDir.absolutePath
        ,'-p', 'info.dbaluxa.generated.test'
        ,'Example.xsd'
    ] as String[]
    ,new XJCListener() {...}
  )
```

See test [XJCPluginDescriptionJavadocTest](src/test/groovy/info/hubbitus/XJCPluginDescriptionJavadocTest.groovy) for example.

### Use from Gradle

With [gradle-xjc-plugin](https://github.com/unbroken-dome/gradle-xjc-plugin):

```gradle
plugins {
  id 'java'
  id 'org.unbroken-dome.xjc' version '1.4.1' // https://github.com/unbroken-dome/gradle-xjc-plugin
}

...

dependencies {
  xjcClasspath 'info.dbaluxa:xjc-documentation-javadoc-plugin:1.0'
}

// Results by default in `build/xjc/generated-sources`
xjcGenerate {
  source = fileTree('src/main/resources') { include '*.xsd' }
  packageLevelAnnotations = false
  targetPackage = 'info.dbaluxa.xjc.plugin.example'
  extraArgs = [ '-XPluginDescriptionJavadoc' ]
}
```
Just run:

    ./gradlew xjcGenerate

## Development:

Build:

    ./gradlew jar

Run tests:

    ./gradlew test

## Licensed under MIT


text:
# Challenge Summary for LinkedLists(CH5, CH6 and CH7)
1.1 This challenge makes new nodes in 3 different way with 3 different methods. It also has 3 methods for: Insert, Includes and ToString
1.2 It now also has a sfunction that finds a node with a value that counts from the end back.
1.3 It now has 3 methods more methods of: Insert, Includes and ToString

## Challenge Description
1.-Append. Adds a new node to the end of the list
2.-insertBefore. Adds a new node before the target node(if the value exists)
3..insertAfter. Adds a new node after the target node(if the value exists)
4.-selectFromEnd. Given a value (k), use that value to find a node starting from the end of the list.
5.-Insert.- inserts a new node into the list.
6.- Includes.- Checks if a certain value is included in the list.
7.- ToStrong.- Turns all the values in a list into a string.

## Approach & Efficiency
The 3 main methods for challenge 5 are there but an unknown system IO error is being thrown. Cant figure it out

## Solution
![Image 1](https://github.com/Alejandroid101/data-structures-and-algorithms-401c/blob/master/assets/CH5-6LinkedLists.jpg?raw=true)

![Image 1](https://github.com/Alejandroid101/data-structures-and-algorithms-401c/blob/master/assets/CH7LinkedLists.jpg?raw=true)

gha_language: C#


text:
# Terminus Plugin Help

Terminus plugin to provide advanced help for plugins

## Installation:

Refer to the [Terminus Wiki](https://github.com/pantheon-systems/terminus/wiki/Plugins).

## Usage:
```
$ terminus plugin help plugin-name-1 [plugin-name-2] ... [--browse | --print]
```
If --browse or --print are not provided, the default is --browse.

## Examples:
```
$ terminus plugin help awesome-plugin
$ terminus plugin help awesome-plugin --browse
```
Get advanced help for the plugin awesome-plugin and open in the default browser
```
$ terminus plugin help awesome-plugin --print
```
Get advanced help for the plugin awesome-plugin and display in the terminal window
```
$ terminus plugin help
```
Get advanced help if within the plugin directory

repository: uberhacker/tph

repo_name: uberhacker/tph


text:
---
title: Polymorphism
headerImg: sea.jpg
---

## Polymorphic Functions

```haskell
doTwice :: (a -> a) -> a -> a
doTwice f x = f (f x)
```

*Operate* on different kinds values

```haskell
>>> double x = 2 * x
>>> yum x = x ++ " yum! yum!"

>>> doTwice double 10
40
>>> doTwice yum "cookie"
"cookie yum! yum!"
```

## QUIZ

What is the value of `quiz`?

```haskell
greaterThan :: Int -> Int -> Bool
greaterThan x y = x > y

quiz = doTwice (greaterThan 10) 0
```

**A.** `True`

**B.** `False`

**C.** *Type* Error

**D.** *Run-time* Exception

**E.** `101`

## With great power, comes great responsibility!

```haskell
>>> doTwice (greaterThan 10) 0

36:9: Couldn't match type ‘Bool’ with ‘Int’
    Expected type: Int -> Int
      Actual type: Int -> Bool
    In the first argument of ‘doTwice’, namely ‘greaterThan 10’
    In the expression: doTwice (greaterThan 10) 0
```

**The input and output types are different!**

Cannot feed the *output* of `(greaterThan 10 0)` into `greaterThan 10`!

## Polymorphic Types

But the **type of** `doTwice` would have spared us this grief.

```haskell
>>> :t doTwice
doTwice :: (a -> a) -> a -> a
```

The signature has a *type parameter* `t`

- **re-use** `doTwice` to increment `Int` or concat `String` or ...

- The first argument `f` must take *input* `t` and return *output* `t` (i.e. `t -> t`)

- The second argument `x` must be of type `t`

- Then `f x` will *also* have type `t` ... and we can call `f (f x)`.

But `f`unction is *incompatible* with `doTwice`

- if its input and output types *differ*

## QUIZ

Lets make sure you're following!

What is the type of `quiz`?

```haskell
quiz x f = f x
```

**A.** `a -> a`

**B.** `(a -> a) -> a`

**C.** `a -> b -> a -> b`

**D.** `a -> (a -> b) -> b`

**E.** `a -> b -> a`

## QUIZ

Lets make sure you're following!

What is the *value* of `quiz`?

```haskell
apply x f = f x

greaterThan :: Int -> Int -> Bool
greaterThan x y = x > y

quiz = apply 100 (greaterThan 10)
```

**A.** *Type* Error

**B.** *Run-time* Exception

**C.** `True`

**D.** `False`

**E.** `110`

## Polymorphic Data Structures

Today, lets see **polymorphic data types**

which **contain** many kinds of values.

## Recap: Data Types

Recall that Haskell allows you to create brand [new data types](03-haskell-types.html)

```haskell
data Shape
  = MkRect  Double Double
  | MkPoly [(Double, Double)]
```

## QUIZ

What is the type of `MkRect` ?

```haskell
data Shape
  = MkRect  Double Double
  | MkPoly [(Double, Double)]
```

**a.** `Shape`

**b.** `Double`

**c.** `Double -> Double -> Shape`

**d.** `(Double, Double) -> Shape`

**e.** `[(Double, Double)] -> Shape`

## Tagged Boxes

Values of this type are either two doubles *tagged* with `Rectangle`

```haskell
>>> :type (Rectangle 4.5 1.2)
(Rectangle 4.5 1.2) :: Shape
```

or a list of pairs of `Double` values *tagged* with `Polygon`

```haskell
ghci> :type (Polygon [(1, 1), (2, 2), (3, 3)])
(Polygon [(1, 1), (2, 2), (3, 3)]) :: Shape
```

### Data values inside special **Tagged Boxes**

![Datatypes are Boxed-and-Tagged Values](/static/img/lec4_boxed.png)

## *Recursive* Data Types

We can define datatypes *recursively* too

```haskell
data IntList
  = INil                -- ^ empty list
  | ICons Int IntList   -- ^ list with "hd" Int and "tl" IntList
  deriving (Show)
```

(Ignore the bit about `deriving` for now.)

## QUIZ

```haskell
data IntList
  = INil                -- ^ empty list
  | ICons Int IntList   -- ^ list with "hd" Int and "tl" IntList
  deriving (Show)
```

What is the type of `ICons` ?

**A.** `Int -> IntList -> List`

**B.** `IntList`

**C.** `Int -> IntList -> IntList`

**D.** `Int -> List    -> IntList`

**E.** `IntList -> IntList`

## Constructing `IntList`

Can *only* build `IntList` via constructors.

```haskell
>>> :type INil
INil:: IntList

>>> :type ICons
ICons :: Int -> IntList -> IntList
```

## EXERCISE

Write down a representation of type `IntList` of the list of three numbers `1`, `2` and `3`.

```haskell
list_1_2_3 :: IntList
list_1_2_3 = ???
```

**Hint** Recursion means boxes *within* boxes

![Recursively Nested Boxes](/static/img/lec4_nested.png)

## Trees: Multiple Recursive Occurrences

We can represent `Int` *trees* like

```haskell
data IntTree
   = ILeaf Int              -- ^ single "leaf" w/ an Int
   | INode IntTree IntTree  -- ^ internal "node" w/ 2 sub-trees
   deriving (Show)
```

A *leaf* is a box containing an `Int` tagged `ILeaf` e.g.

```haskell
>>> it1  = ILeaf 1
>>> it2  = ILeaf 2
```

A *node* is a box containing two sub-trees tagged `INode` e.g.

```haskell
>>> itt   = INode (ILeaf 1) (ILeaf 2)
>>> itt'  = INode itt itt
>>> INode itt' itt'
INode (INode (ILeaf 1) (ILeaf 2)) (INode (ILeaf 1) (ILeaf 2))
```

## Multiple Branching Factors

e.g. [2-3 trees](http://en.wikipedia.org/wiki/2-3_tree)

```haskell
data Int23T
  = ILeaf0
  | INode2 Int Int23T Int23T
  | INode3 Int Int23T Int23T Int23T
  deriving (Show)
```

An example value of type `Int23T` would be

```haskell
i23t :: Int23T
i23t = INode3 0 t t t
  where t = INode2 1 ILeaf0 ILeaf0
```

which looks like

![Integer 2-3 Tree](/static/img/lec4_int23t.png)

## Parameterized Types

We can define `CharList` or `DoubleList`
- versions of `IntList` for `Char` and `Double` as

```haskell
data CharList
  = CNil
  | CCons Char CharList
  deriving (Show)

data DoubleList
   = DNil
   | DCons Char DoubleList
   deriving (Show)
```

## Don't Repeat Yourself!

Don't repeat definitions
- Instead *reuse* the list *structure* across *all* types!

Find abstract *data* patterns by

- identifying the *different* parts and
- refactor those into *parameters*

## A Refactored List

Here are the three types: What is common? What is different?

```haskell
data IList = INil | ICons Int    IList

data CList = CNil | CCons Char   CList

data DList = DNil | DCons Double DList
```

**Common:** `Nil`/`Cons` structure

**Different:** type of each "head" element

### Refactored using Type Parameter

```haskell
data List a = Nil | Cons a  (List a)
```

### Recover original types as *instances* of `List`

```haskell
type IntList    = List Int
type CharList   = List Char
type DoubleList = List Double
```

## Polymorphic Data has Polymorphic Constructors

Look at the types of the constructors

```haskell
>>> :type Nil
Nil :: List a
```

That is, the `Empty` tag is a value of *any* kind of list, and

```haskell
>>> :type Cons
Cons :: a -> List a -> List a
```

`Cons` takes an `a` *and* a `List a` and returns a `List a`.

```haskell
cList :: List Char     -- list where 'a' = 'Char'
cList = Cons 'a' (Cons 'b' (Cons 'c' Nil))

iList :: List Int      -- list where 'a' = 'Int'
iList = Cons 1 (Cons 2 (Cons 3 Nil))

dList :: List Double   -- list where 'a' = 'Double'
dList = Cons 1.1 (Cons 2.2 (Cons 3.3 Nil))
```

## Polymorphic Function over Polymorphic Data

Lets write the list length function

```haskell
len :: List a -> Int
len Nil         = 0
len (Cons x xs) = 1 + len xs
```

`len` doesn't care about the actual *values* in the list
- only "counts" the number of `Cons` constructors

Hence `len :: List a -> Int`

- we can call `len` on **any kind of list**.

```haskell
>>> len [1.1, 2.2, 3.3, 4.4]    -- a := Double
4

>>> len "mmm donuts!"           -- a := Char
11

>>> len [[1], [1,2], [1,2,3]]   -- a := ???
3
```

## Built-in Lists?

This is exactly how Haskell's "built-in" lists are defined:

```haskell
data [a]    = [] | (:) a [a]

data List a = Nil | Cons a (List a)
```

- `Nil` is called `[]`
- `Cons` is called `:`

Many list manipulating functions e.g. in [Data.List][1] are *polymorphic*
- Can be reused across all kinds of lists.

```haskell
(++) :: [a] -> [a] -> [a]
head :: [a] -> a
tail :: [a] -> [a]
```

## Generalizing Other Data Types

Polymorphic trees

```haskell
data Tree a
   = Leaf a
   | Node (Tree a) (Tree a)
   deriving (Show)
```

Polymorphic *2-3* trees

```haskell
data Tree23 a
   = Leaf0
   | Node2 (Tree23 a) (Tree23 a)
   | Node3 (Tree23 a) (Tree23 a) (Tree23 a)
   deriving (Show)
```

## Kinds

`List a` corresponds to *lists of values* of type `a`.

If `a` is the *type parameter*, then what is `List`?

A *type-constructor* that
- takes *as input* a type `a`
- returns *as output* the type `List a`

But wait, if `List` is a *type-constructor* then what is its "type"?

- A *kind* is the "type" of a type.

```haskell
>>> :kind Int
Int :: *
>>> :kind Char
Char :: *
>>> :kind Bool
Bool :: *
```

Thus, `List` is a function from any "type" to any other "type", and so

```haskell
>>> :kind List
List :: * -> *
```

## QUIZ

What is the *kind* of `->`? That, is what does GHCi say if we type

```haskell
>>> :kind (->)
```

**A.** `*`

**B.** `* -> *`

**C.** `* -> * -> *`

We will not dwell too much on this now.

As you might imagine, they allow for all sorts of abstractions over data.

If interested, see [this for more information about kinds](http://en.wikipedia.org/wiki/Kind_(type_theory)).


text:
---
layout: post
title:  "March Newsletter: Continuing to announce Featured Speakers"
date:   2015-02-17 09:00:00
isStaticPost: false
---

Welcome to the March newsletter :) We will be sharing updates with you in this newsletter.

Call For Papers is still open. You can submit a talk from [here]({{ site.baseurl }}/blog/share-your-knowledge-and-experience-in-add/).

We listen to you. What do you want to see at ADD? Please share your ideas with this [this form](https://docs.google.com/forms/d/16RB2PM-ifAxv4HqTOXWO72DlgYEEWc0f9SB921smTBs/viewform).

The number of people requesting participation to ADD has passed **1175**. Hurry up to participate and fill [this form](http://www.eventbrite.com/e/android-developer-days-2015-registration-14846274607).

    As a long time mobile and web developer, Tim Messerschmidt channels his knowledge and experience as Braintree's Head of Developer Relation. He is passionate about startups and served as mentor at multiple incubators and accelerators.
    Prior to joining PayPal, Tim worked with Neofonie Mobile and Samsung focusing on several mobile projects. In his spare time, he leads and creates training classes in all sorts of developer-oriented topics, contributes to Open Source projects and is one of the authors of the Mobile Developer’s Guide to the Galaxy. In addition, he authored numerous articles published in print magazines.

	Abhisek Devkota is the Community Manager and project manager for Cyanogen Inc. The CyanogenMod Project is an openÂsource distribution that is community driven and created in collaboration with volunteers around the world, with the goal to allow users to truly own their phone through customization, functionality and enhanced security over their personal data.

    Besides being a recent GDE for Android, Wiebe Elsinga is also an Android Developer with a passion for UX and design. Co-Founder/Organizer of the Google Developer Group Dutch Android User Group and working at Itude Mobile. Basically a EntrepreNerd.
    Mainly focused on the design and development of mobile applications.

	Markus Eisele is a Developer Advocate at Red Hat and focuses on JBoss Middleware. He is working with Java EE servers from different vendors since more than 14 years and talks about his favorite topics around Java EE on conferences all over the world. He has been a principle consultant and worked with different customers on all kinds of Java EE related applications and solutions. Beside that he has always been a prolific blogger, writer and tech editor for different Java EE related books. He is an active member of the German DOAG e.V. and it's representative on the iJUG e.V. He is well known in the community as a Java Champion.

	Cyril Mottier is Mobile Software Engineer at Capitaine Train and Android Google Developer Expert. Passionate about technology and design, Cyril is an avid lover of Android and a multi-skilled engineer. He is actively involved in the Android community and shares his passion writing blog posts, creating open source librairies and giving talks. His motto: Do less, but do it insanely great.

    Mr. Prajyot Mainkar is the director at Androcid Media Pvt. Ltd, an app engineering firm based out of India. He is the manager of Google's Developer Group - GAUG ( Goa Android users Group) - one of the oldest android developer community in India. Being android developer himself, he has been active in the Android community and been assisting Android developers build new, compelling and well-received apps. He has spoken at several conferences including Droidcon India, GDG DevFest, Silicon India Mobile Conference and many more.

    Orhan Obut is android developer at Rocket-Internet in Berlin. Since he is enthusiastic about android development and open-source, he is trying to learn as much as possible on these topics. He is also a big fan of open-source and constantly supports it. He has been worked on various projects from m-banking applications to m-commerce applications.  He always aims to use the software principles, the best practices and share the knowledge with the community.

The number of [sponsors]({{ site.baseurl }}/sponsors) support ADD has reached 28. Do not miss sponsorship opportunity.

You can support ADD by a blog post or any way you want. Just send us an email and we will put your logo among supporters.

2.indir.com Mobile App Contest finalists will present their apps at Android Developer Days. Application to contest is still open and final date is 20 April. Winners will be announced in a Mobile Event organized by indir.com in Bahcesehir University on 23 May 2015. There are great prizes for the winners. For details click  [here](http://www.indir.com/yarisma/).

The number of GDGs as organizer has reached 57. The [organizers]({{ site.baseurl }}/organizers) of ADD are from the cities of very different countries.

#####Sponsors
Please look at the [Sponsors page]({{ site.baseurl }}/sponsors) to see the latest updates. All sponsors are listed here in e-mail version of this press bulletin.

repository: androiddeveloperdays/addwebsite

repo_name: androiddeveloperdays/addwebsite


text:
# Simple Menu Manager

![Menu](Img/menu.png)

This is an asset in development for having a pre made main menu, fully customizable, which allows to load scenes, change the font, color and text of every text and the action it does.

![Inspector Image](Img/inspector.png)

### Title Text

- Game name: The name showed on the top of the menu.
- Copyright Text: The text shown at the bottom of the menu.
- Text color: The color of the menu text.
- Text Font: The font used for the text.

### Menu Controls

Here goes the inputs for using keys.
- Input Name: What button will activate the button pres.
- Vertical Axis Name: Which axis move the menu.
- Return key: Which button goes back.

### Menu interaction

- Arrow Sprite: If an image is selected, the menu will use an arrow for the selected option.
- Selected Color: If the is no image selected in Arrow Sprite it will use this color to highlight selection.

### Buttons options

* Can be clicked: If deselected the buttons won't react to mouse selection, and the cursor will be hidden.
* Buttons
* * Button Text: The text to show in the button.
* * Button Type: The type of button it is, which define the action.
* * Level Name: If load level was selected, it will load this level (be sure to write it right and to have that scene in the build settings).
* * Custom: A prefab with a script that inherited from SimpleMainMenu.CustomButton must be placed here.
* * Button Color: What color will this button have while it's not highlighted.

## Buttons type

There are 3 types of buttons: **Load Level, Custom or Quit**.

Load Level will simply load a new scene, Quit will execute "Application.Quit()" and Custom will call whatever is written under the method *OnClickAction()*. CustomButton has a text value *buttonText* which can be edited on click, as the example script shows:

    public class ExampleButton : SimpleMainMenu.CustomButton
    {
        int exampleInt = 0;
        public override void OnClickAction()
        {
            exampleInt++;
            buttonText.text = "Example: " + exampleInt;
        }
    }

repository: Bullrich/Simple-Main-Menu

repo_name: Bullrich/Simple-Main-Menu


text:
# Code of Conduct

This project has adopted the [OCaml Code of Conduct](https://github.com/ocaml/code-of-conduct/blob/main/CODE_OF_CONDUCT.md).

# Enforcement

This project follows the OCaml Code of Conduct [enforcement policy](https://github.com/ocaml/code-of-conduct/blob/main/CODE_OF_CONDUCT.md#enforcement).

To report any violations, please contact:

* Riku Silvola <riku [at] tarides [dot] com>
* Shakthi Kannan <shakthi [at] tarides [dot] com>
* Puneeth Chaganti <puneeth [at] tarides [dot] com>
* Ambre Suhamy <ambre [at] tarides [dot] com>

repository: ocaml-bench/sandmark

gha_language: Jupyter Notebook

gha_license_id: Unlicense

repo_name: ocaml-bench/sandmark