text:
Mnemosynewas the personification of memory in Greek mythology.

She transform:
```
C(1:N) = 1.d0
C(N+1) = 0.d0

B(2:N+1) = C(2:N+1)
B(1) = B(N+1)

A(1:N) = B(1:N) + C(1:N)
```

into:

![Dot](https://raw.githubusercontent.com/TApplencourt/Mnemosyne/master/example/simpl.png)

# Requirement

- python 3.x
- [IntervalTree](https://github.com/chaimleib/intervaltree)
## Optional

- [grahviz](http://www.graphviz.org/)

## Advice

The easiest way to install the dependency on a cluster (without root but with internet acess) is to use [conda](https://conda.io/miniconda.html):

- Get conda installer for x86 and python 3 `wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh`
- Install `bash Miniconda3-latest-Linux-x86_64.sh`
- Change your `$PATH` accordingly
- Install Interval tree `pip install -r requirement.txt`
- Optional: Install graphviz `conda install -c anaconda graphviz=2.38.0`

# Tutorial
  Mmemosyne take two main argument: One are an `fortran90` like file reprensenting the relationship between array (look at `example/*.dat` for an example of such file). The other are a dictionary to perform the translation form the symbolic value to the numerical one.

  To reproduce the `png` file show in the example folder do:

- f90 -> DOT `./mnemosyne.py example/simpl.dat '{"N": 21}' -e > icule.dot`
- DOT -> png `dot -Tpng icule.dot -o icule.png`
- If you have X you can visualize the png `open icule.png`


text:
#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
#define SDL_DISABLE_ANALYZE_MACROS 1
#endif

#include "../SDL_internal.h"

#if defined(__WIN32__)
#include "../core/windows/SDL_windows.h"
#endif

#include "SDL_stdinc.h"

#if defined(__WIN32__) && (!defined(HAVE_SETENV) || !defined(HAVE_GETENV))
/* Note this isn't thread-safe! */
static char *SDL_envmem = NULL; /* Ugh, memory leak */
static size_t SDL_envmemlen = 0;
#endif

/* Put a variable into the environment */
/* Note: Name may not contain a '=' character. (Reference: http://www.unix.com/man-page/Linux/3/setenv/) */
#if defined(HAVE_SETENV)
int
SDL_setenv(const char *name, const char *value, int overwrite)
{
    /* Input validation */
    if (!name || SDL_strlen(name) == 0 || SDL_strchr(name, '=') != NULL || !value) {
        return (-1);
    }

    return setenv(name, value, overwrite);
}
#elif defined(__WIN32__)
int
SDL_setenv(const char *name, const char *value, int overwrite)
{
    /* Input validation */
    if (!name || SDL_strlen(name) == 0 || SDL_strchr(name, '=') != NULL || !value) {
        return (-1);
    }

    if (!overwrite) {
        char ch = 0;
        const size_t len = GetEnvironmentVariableA(name, &ch, sizeof (ch));
        if (len > 0) {
            return 0;  /* asked not to overwrite existing value. */
        }
    }
    if (!SetEnvironmentVariableA(name, *value ? value : NULL)) {
        return -1;
    }
    return 0;
}
/* We have a real environment table, but no real setenv? Fake it w/ putenv. */
#elif (defined(HAVE_GETENV) && defined(HAVE_PUTENV) && !defined(HAVE_SETENV))
int
SDL_setenv(const char *name, const char *value, int overwrite)
{
    size_t len;
    char *new_variable;

    /* Input validation */
    if (!name || SDL_strlen(name) == 0 || SDL_strchr(name, '=') != NULL || !value) {
        return (-1);
    }

    if (getenv(name) != NULL) {
        if (overwrite) {
            unsetenv(name);
        } else {
            return 0;  /* leave the existing one there. */
        }
    }

    /* This leaks. Sorry. Get a better OS so we don't have to do this. */
    len = SDL_strlen(name) + SDL_strlen(value) + 2;
    new_variable = (char *) SDL_malloc(len);
    if (!new_variable) {
        return (-1);
    }

    SDL_snprintf(new_variable, len, "%s=%s", name, value);
    return putenv(new_variable);
}
#else /* roll our own */
static char **SDL_env = (char **) 0;
int
SDL_setenv(const char *name, const char *value, int overwrite)
{
    int added;
    int len, i;
    char **new_env;
    char *new_variable;

    /* Input validation */
    if (!name || SDL_strlen(name) == 0 || SDL_strchr(name, '=') != NULL || !value) {
        return (-1);
    }

    /* See if it already exists */
    if (!overwrite && SDL_getenv(name)) {
        return 0;
    }

    /* Allocate memory for the variable */
    len = SDL_strlen(name) + SDL_strlen(value) + 2;
    new_variable = (char *) SDL_malloc(len);
    if (!new_variable) {
        return (-1);
    }

    SDL_snprintf(new_variable, len, "%s=%s", name, value);
    value = new_variable + SDL_strlen(name) + 1;
    name = new_variable;

    /* Actually put it into the environment */
    added = 0;
    i = 0;
    if (SDL_env) {
        /* Check to see if it's already there... */
        len = (value - name);
        for (; SDL_env[i]; ++i) {
            if (SDL_strncmp(SDL_env[i], name, len) == 0) {
                break;
            }
        }
        /* If we found it, just replace the entry */
        if (SDL_env[i]) {
            SDL_free(SDL_env[i]);
            SDL_env[i] = new_variable;
            added = 1;
        }
    }

    /* Didn't find it in the environment, expand and add */
    if (!added) {
        new_env = SDL_realloc(SDL_env, (i + 2) * sizeof(char *));
        if (new_env) {
            SDL_env = new_env;
            SDL_env[i++] = new_variable;
            SDL_env[i++] = (char *) 0;
            added = 1;
        } else {
            SDL_free(new_variable);
        }
    }
    return (added ? 0 : -1);
}
#endif

/* Retrieve a variable named "name" from the environment */
#if defined(HAVE_GETENV)
char *
SDL_getenv(const char *name)
{
    /* Input validation */
    if (!name || SDL_strlen(name)==0) {
        return NULL;
    }

    return getenv(name);
}
#elif defined(__WIN32__)
char *
SDL_getenv(const char *name)
{
    size_t bufferlen;

    /* Input validation */
    if (!name || SDL_strlen(name)==0) {
        return NULL;
    }

    bufferlen =
        GetEnvironmentVariableA(name, SDL_envmem, (DWORD) SDL_envmemlen);
    if (bufferlen == 0) {
        return NULL;
    }
    if (bufferlen > SDL_envmemlen) {
        char *newmem = (char *) SDL_realloc(SDL_envmem, bufferlen);
        if (newmem == NULL) {
            return NULL;
        }
        SDL_envmem = newmem;
        SDL_envmemlen = bufferlen;
        GetEnvironmentVariableA(name, SDL_envmem, (DWORD) SDL_envmemlen);
    }
    return SDL_envmem;
}
#else
char *
SDL_getenv(const char *name)
{
    int len, i;
    char *value;

    /* Input validation */
    if (!name || SDL_strlen(name)==0) {
        return NULL;
    }

    value = (char *) 0;
    if (SDL_env) {
        len = SDL_strlen(name);
        for (i = 0; SDL_env[i] && !value; ++i) {
            if ((SDL_strncmp(SDL_env[i], name, len) == 0) &&
                (SDL_env[i][len] == '=')) {
                value = &SDL_env[i][len + 1];
            }
        }
    }
    return value;
}
#endif

#ifdef TEST_MAIN
#include <stdio.h>

int
main(int argc, char *argv[])
{
    char *value;

    printf("Checking for non-existent variable... ");
    fflush(stdout);
    if (!SDL_getenv("EXISTS")) {
        printf("okay\n");
    } else {
        printf("failed\n");
    }
    printf("Setting FIRST=VALUE1 in the environment... ");
    fflush(stdout);
    if (SDL_setenv("FIRST", "VALUE1", 0) == 0) {
        printf("okay\n");
    } else {
        printf("failed\n");
    }
    printf("Getting FIRST from the environment... ");
    fflush(stdout);
    value = SDL_getenv("FIRST");
    if (value && (SDL_strcmp(value, "VALUE1") == 0)) {
        printf("okay\n");
    } else {
        printf("failed\n");
    }
    printf("Setting SECOND=VALUE2 in the environment... ");
    fflush(stdout);
    if (SDL_setenv("SECOND", "VALUE2", 0) == 0) {
        printf("okay\n");
    } else {
        printf("failed\n");
    }
    printf("Getting SECOND from the environment... ");
    fflush(stdout);
    value = SDL_getenv("SECOND");
    if (value && (SDL_strcmp(value, "VALUE2") == 0)) {
        printf("okay\n");
    } else {
        printf("failed\n");
    }
    printf("Setting FIRST=NOVALUE in the environment... ");
    fflush(stdout);
    if (SDL_setenv("FIRST", "NOVALUE", 1) == 0) {
        printf("okay\n");
    } else {
        printf("failed\n");
    }
    printf("Getting FIRST from the environment... ");
    fflush(stdout);
    value = SDL_getenv("FIRST");
    if (value && (SDL_strcmp(value, "NOVALUE") == 0)) {
        printf("okay\n");
    } else {
        printf("failed\n");
    }
    printf("Checking for non-existent variable... ");
    fflush(stdout);
    if (!SDL_getenv("EXISTS")) {
        printf("okay\n");
    } else {
        printf("failed\n");
    }
    return (0);
}
#endif /* TEST_MAIN */

/* vi: set ts=4 sw=4 expandtab: */

redpajama_set_name: RedPajamaGithub


text:
package org.drools.benchmarks.common;

public class ConstraintPattern {
    private final String variableName;
    private final String constraint;

    public ConstraintPattern(final String variableName, final String constraint) {
        this.variableName = variableName;
        this.constraint = constraint;
    }

    public String getVariableName() {
        return variableName;
    }

    public String getConstraint() {
        return constraint;
    }
}


text:
using TimeLog.Api.Documentation.Models.RestDocumentationHelpers.Core;

namespace TimeLog.Api.Documentation.Models.RestDocumentationHelpers;

public class RestMethodParam
{
    #region Constructor

    public RestMethodParam(string name, string description, RestType type, RestRefSchema refSchema)
    {
        Name = name;
        Description = description;
        Type = type;
        RefSchema = refSchema;
    }

    #endregion

    #region Variables

    public string Name { get; }
    public string Description { get; }
    public RestType Type { get; }
    public RestRefSchema RefSchema { get; }

    #endregion
}


text:
using System.ComponentModel.Composition;
using DevExpress.CodeRush.Common;

namespace CR_RemoveOuterBlock
{
  [Export(typeof(IVsixPluginExtension))]
  public class CR_RemoveOuterBlockExtension : IVsixPluginExtension { }
}


text:
from caldavclientlibrary.protocol.webdav.copymovebase import CopyMoveBase

class Copy(CopyMoveBase):

    def __init__(self, session, url_old, absurl_new, overwrite=False):
        super(Copy, self).__init__(session, url_old, absurl_new, overwrite=overwrite, delete_original=False)


text:
<?php namespace hlin\attribute;

interface Configurable {

	# public $confs;

	/**
	 * @return static $this
	 */
	function confs_are(\hlin\archetype\Configs $confs);

} # interface


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=struct.ValueTypeSet.html">

Redirecting to struct.ValueTypeSet.html...


text:
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^api/', include('coc_war_planner.api.urls')),
    url(r'^rest-auth/', include('rest_auth.urls')),
    url(r'^rest-auth/registration/', include('rest_auth.registration.urls')),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name="logout"),
    url(r'^login/$', 'django.contrib.auth.views.login', name='login'),
    url(r'^', include('coc_war_planner.www.urls')),
]

if settings.DEBUG:
    from django.conf.urls.static import static
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    from django.views.generic import TemplateView

    # Serve static and media files from development server
    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


text:
"""Reads presentation data.

Retrieves a presentation and extracts the placeholders and the presentation's
title.
"""
import re

class PresentationReader(object):

    def __init__(self, slides_service, presentation_id):
        self._slides_service = slides_service
        self._presentation_id = presentation_id
        self._presentation = None

    def _InitPresentation(self):
        if not self._presentation:
            self._presentation = self._slides_service.presentations().get(
                presentationId=self._presentation_id).execute()

    def GetTitle(self):
        self._InitPresentation()
        return self._presentation.get('title')

    def GetAllPlaceholders(self):
        self._InitPresentation()
        slides = self._presentation.get('slides')
        placeholders = []
        for slide in slides:
            elements = slide.get('pageElements')
            for element in elements:
                shape = element.get('shape')
                table = element.get('table')
                # Skip page elements that aren't shapes or tables since they're
                # the only types that support text.
                if not shape and not table:
                    continue
                if shape:
                    placeholders += self._GetPlaceholdersFromText(
                        shape.get('text'))
                elif table:
                    rows = table.get('tableRows')
                    for row in rows:
                        cells = row.get('tableCells')
                        for cell in cells:
                            placeholders += self._GetPlaceholdersFromText(
                                cell.get('text'))
        # Return the unique placeholders
        seen = set()
        return [p for p in placeholders if not (p in seen or seen.add(p))]

    def _GetPlaceholdersFromText(self, text):
        if not text:
            return []
        placeholders = []
        elements = text.get('textElements')
        for element in elements:
            if element.get('textRun'):
                content = element.get('textRun').get('content')
                placeholders += re.findall('{.*?}', content)
        return placeholders


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NDifference.SourceFormatting
{
	public interface ICoded
	{
		// syntax tree of objects
		string ToXml();

        string ToPlainText();
    }
}


text:
<?xml version="1.0"?>
<Document>

	<Sentence>
		<value>Reifenstein syndrome is a disease that occurs in boys when their body cannot respond the right way to the male sex hormones (androgens).</value>
		<pattern_crowdsource> [[Reifenstein syndrome|C0268301]] is a [[disease|C0012634]] that occurs in [[boys|C0870221]] when their body cannot respond the right way to the male [[sex hormones|C0036884]] ([[androgens|C0002844]]).		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Reifenstein syndrome</surface-form>
				<RDF-ID>C0268301</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>disease</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>boys</surface-form>
				<RDF-ID>C0870221</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>right</surface-form>
				<RDF-ID>C0205090</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>sex hormones</surface-form>
				<RDF-ID>C0036884</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>androgens</surface-form>
				<RDF-ID>C0002844</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0268301 ISA C0012634</triple>
			<triple>C0002844 ISA C0036884</triple>
			<triple>C0012634 OCCURS_IN C0870221</triple>
			<triple>C0268301 OCCURS_IN C0870221</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Testosterone is a male sex hormone.</value>
		<pattern_crowdsource> [[Testosterone|C0039601]] is a male [[sex hormone|C0036884]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Testosterone</surface-form>
				<RDF-ID>C0039601</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>sex hormone</surface-form>
				<RDF-ID>C0036884</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0039601 ISA C0036884</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>This disorder is a type of androgen insufficiency syndrome.</value>
		<pattern_crowdsource> This [[disorder|C0012634]] is a type of androgen insufficiency [[syndrome|C0039082]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>disorder</surface-form>
				<RDF-ID>C0012634</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>type</surface-form>
				<RDF-ID>C1547052</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>androgen</surface-form>
				<RDF-ID>C0002844</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>insufficiency</surface-form>
				<RDF-ID>C0231179</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>syndrome</surface-form>
				<RDF-ID>C0039082</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0039082 ISA C0012634</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>As a male baby grows in the womb, male hormones are made.</value>
		<pattern_crowdsource> As a [[male baby|C0419384]] grows in the [[womb|C0042149]], male hormones are made.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>male baby</surface-form>
				<RDF-ID>C0419384</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>womb</surface-form>
				<RDF-ID>C0042149</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>hormones</surface-form>
				<RDF-ID>C0019932</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0042149 LOCATION_OF C0419384</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>At birth, the baby may have ambiguous genitals, which leads to confusion over the baby's sex.</value>
		<pattern_crowdsource> At [[birth|C0005615]], the baby may have ambiguous genitals, which leads to [[confusion|C0009676]] over the baby's sex.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>birth</surface-form>
				<RDF-ID>C0005615</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>baby</surface-form>
				<RDF-ID>C0021270</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>genitals</surface-form>
				<RDF-ID>C0017420</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>confusion</surface-form>
				<RDF-ID>C0009676</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>over</surface-form>
				<RDF-ID>C0205136</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>baby's</surface-form>
				<RDF-ID>C0021270</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0005615 AFFECTS C0009676</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Women are not affected but may carry the gene.</value>
		<pattern_crowdsource> [[Women|C0043210]] are not affected but may carry the [[gene|C0017337]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Women</surface-form>
				<RDF-ID>C0043210</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>not</surface-form>
				<RDF-ID>C1518422</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>gene</surface-form>
				<RDF-ID>C0017337</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0017337 PART_OF C0043210</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Males who inherit the gene from their mothers will have the condition.</value>
		<pattern_crowdsource> Males who inherit the [[gene|C0017337]] from their [[mothers|C0026591]] will have the condition.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>Males</surface-form>
				<RDF-ID>C0024554</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>gene</surface-form>
				<RDF-ID>C0017337</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>mothers</surface-form>
				<RDF-ID>C0026591</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>condition</surface-form>
				<RDF-ID>C0348080</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0026591 LOCATION_OF C0017337</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>There is a 50% chance that a male child of a mother with the gene will be affected.</value>
		<pattern_crowdsource> There is a 50% chance that a male child of a [[mother|C0026591]] with the [[gene|C0017337]] will be affected.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>chance</surface-form>
				<RDF-ID>C0237506</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>child</surface-form>
				<RDF-ID>C0008059</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>mother</surface-form>
				<RDF-ID>C0026591</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>gene</surface-form>
				<RDF-ID>C0017337</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0017337 PART_OF C0026591</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>The syndrome is estimated to affect 1 in 99,000 people.</value>
		<pattern_crowdsource> The [[syndrome|C0039082]] is estimated to affect 1 in 99,000 [[people|C0027361]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>syndrome</surface-form>
				<RDF-ID>C0039082</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>people</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0039082 PROCESS_OF C0027361</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>The health care provider will perform a physical exam.</value>
		<pattern_crowdsource> The [[health care provider|C0018724]] will perform a [[physical exam|C0031809]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>health care provider</surface-form>
				<RDF-ID>C0018724</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>physical exam</surface-form>
				<RDF-ID>C0031809</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0031809 ADMINISTERED_TO C0018724</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>People with Reifenstein syndrome can have a normal lifespan and be totally healthy, but they may have difficulty conceiving a child.</value>
		<pattern_crowdsource> [[People|C0027361]] with [[Reifenstein syndrome|C0268301]] can have a normal lifespan and be totally healthy, but they may have [[difficulty|C1299586]] conceiving a child.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>People</surface-form>
				<RDF-ID>C0027361</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Reifenstein syndrome</surface-form>
				<RDF-ID>C0268301</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>normal</surface-form>
				<RDF-ID>C0205307</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>healthy</surface-form>
				<RDF-ID>C0018684</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>difficulty</surface-form>
				<RDF-ID>C1299586</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>child</surface-form>
				<RDF-ID>C0008059</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0268301 PROCESS_OF C0027361</triple>
			<triple>C1299586 PROCESS_OF C0027361</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>In the most severe cases, boys with outer female genitals or an extremely small penis may have psychological or emotional problems.</value>
		<pattern_crowdsource> In the most severe cases, [[boys|C0870221]] with outer [[female genitals|C0017421]] or an extremely small penis may have [[psychological|C1306597]] or [[emotional problems|C0677660]].		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>most</surface-form>
				<RDF-ID>C0205393</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>severe</surface-form>
				<RDF-ID>C0205082</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>cases</surface-form>
				<RDF-ID>C0868928</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>boys</surface-form>
				<RDF-ID>C0870221</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>outer</surface-form>
				<RDF-ID>C0205101</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>female genitals</surface-form>
				<RDF-ID>C0017421</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>small penis</surface-form>
				<RDF-ID>C0240701</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>psychological</surface-form>
				<RDF-ID>C1306597</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>emotional problems</surface-form>
				<RDF-ID>C0677660</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0017421 PART_OF C0870221</triple>
			<triple>C1306597 PROCESS_OF C0870221</triple>
			<triple>C0677660 PROCESS_OF C0870221</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>These problems may occur:  - Breast development in men  - Infertility and failure to develop normal male genitals  - Psychological problems, such as depression</value>
		<pattern_crowdsource> These problems may occur:  - [[Breast development|C0518181]] in men  - [[Infertility|C0021359]] and failure to develop normal male genitals  - Psychological problems, such as depression		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>problems</surface-form>
				<RDF-ID>C1546466</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Breast development</surface-form>
				<RDF-ID>C0518181</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>men</surface-form>
				<RDF-ID>C0025266</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Infertility</surface-form>
				<RDF-ID>C0021359</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>normal</surface-form>
				<RDF-ID>C0205307</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>male genitals</surface-form>
				<RDF-ID>C0017422</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>Psychological problems</surface-form>
				<RDF-ID>C0848067</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>depression</surface-form>
				<RDF-ID>C0344315</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0518181 COEXISTS_WITH C0021359</triple>
		</triples>
	</Sentence>
	<Sentence>
		<value>Call your health care provider if you, your son, or a male family member has infertility or incomplete development of male genitals.</value>
		<pattern_crowdsource> Call your health care provider if you, your [[son|C0037683]], or a male [[family member|C0086282]] has [[infertility|C0021359]] or incomplete development of male genitals.		</pattern_crowdsource>
		<annotations>
			<annotation>
				<surface-form>health care provider</surface-form>
				<RDF-ID>C0018724</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>son</surface-form>
				<RDF-ID>C0037683</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>family member</surface-form>
				<RDF-ID>C0086282</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>infertility</surface-form>
				<RDF-ID>C0021359</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>incomplete development</surface-form>
				<RDF-ID>C0020636</RDF-ID>
			</annotation>
			<annotation>
				<surface-form>male genitals</surface-form>
				<RDF-ID>C0017422</RDF-ID>
			</annotation>
		</annotations>
		<triples>
			<triple>C0021359 PROCESS_OF C0086282</triple>
			<triple>C0021359 PROCESS_OF C0037683</triple>
		</triples>
	</Sentence>

</Document>


text:
<?php
/**
 * AdminLTE v2 Template
 *
 * @author OanhNN <oanhnn@rikkeisoft.com>
 * -----------------------------------------------------------------------------
 *
 */
$bodyClass = isset($bodyClass) ? $bodyClass : config('adminlte.skin', 'skin-blue') . ' sidebar-mini';
?>
<!DOCTYPE html>
<html lang="{{ config('app.locale', 'en') }}">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- Tell the browser to be responsive to screen width -->
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

        @section('meta')
        @show

        <title>{{ config('adminlte.title') }} | @yield('title')</title>

        @include('adminlte::partials.css')

        @section('css')
        @show

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
            <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
            <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body class="{{ $bodyClass }}">

        @section('body')
        @show

        @include('adminlte::partials.js')

        @section('js')
        @show
    </body>
</html>


text:
<!DOCTYPE html>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Connecting to your Database — CodeIgniter 3.0.0
	documentation</title>

<link rel="shortcut icon" href="../_static/ci-icon.ico" />

<link
	href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic'
	rel='stylesheet' type='text/css'>

<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />

<link rel="top" title="CodeIgniter 3.0.0 documentation"
	href="../index.html" />
<link rel="up" title="Database Reference" href="index.html" />
<link rel="next" title="Queries" href="queries.html" />
<link rel="prev" title="Database Configuration"
	href="configuration.html" />

				 CodeIgniter

					<form id="rtd-search-form" class="wy-form" action="../search.html"
						method="get">
						<input type="text" name="q" placeholder="Search docs" /> <input
							type="hidden" name="check_keywords" value="yes" /> <input
							type="hidden" name="area" value="default" />
					</form>

Welcome to CodeIgniter

Installation Instructions

Downloading CodeIgniter

Installation Instructions

Upgrading From a Previous
									Version

Troubleshooting

CodeIgniter Overview

Getting Started

CodeIgniter at a Glance

Supported Features

Application Flow Chart

Model-View-Controller

Architectural Goals

Tutorial

Static pages

News section

Create news items

Conclusion

General Topics

CodeIgniter URLs

Controllers

Reserved Names

Views

Models

Helpers

Using CodeIgniter Libraries

Creating Libraries

Using CodeIgniter Drivers

Creating Drivers

Creating Core System Classes

Creating Ancillary
									Classes

Hooks - Extending the Framework
									Core

Auto-loading Resources

Common Functions

Compatibility
									Functions

URI Routing

Error Handling

Caching

Profiling Your Application

Running via the CLI

Managing your Applications

Handling Multiple
									Environments

Alternate PHP Syntax for
									View Files

Security

PHP Style Guide

Libraries

Benchmarking Class

Caching Driver

Calendaring Class

Shopping Cart Class

Config Class

Email Class

Encrypt Class

Encryption Library

File Uploading Class

Form Validation

FTP Class

Image Manipulation Class

Input Class

Javascript Class

Language Class

Loader Class

Migrations Class

Output Class

Pagination Class

Template Parser Class

Security Class

Session Library

HTML Table Class

Trackback Class

Typography Class

Unit Testing Class

URI Class

User Agent Class

XML-RPC and XML-RPC Server
									Classes

Zip Encoding Class

Database Reference

Quick Start: Usage Examples

Database Configuration

Connecting to a
									Database

Running Queries

Generating Query Results

Query Helper Functions

Query Builder Class

Transactions

Getting MetaData

Custom Function Calls

Query Caching

Database Manipulation with Database Forge

Database Utilities Class

Database Driver Reference

Helpers

Array Helper

CAPTCHA Helper

Cookie Helper

Date Helper

Directory Helper

Download Helper

Email Helper

File Helper

Form Helper

HTML Helper

Inflector Helper

Language Helper

Number Helper

Path Helper

Security Helper

Smiley Helper

String Helper

Text Helper

Typography Helper

URL Helper

XML Helper

Contributing to CodeIgniter

Writing CodeIgniter
									Documentation

Developer’s Certificate of Origin 1.1

				 CodeIgniter

Docs »

Database Reference »

Connecting to your Database

								Connecting to your Database¶

There are two ways to connect to a database:

									Automatically Connecting¶

The “auto connect” feature will load and
									instantiate the database class with every page load. To enable
									“auto connecting”, add the word database to the
									library array, as indicated in the following file:

application/config/autoload.php

									Manually Connecting¶

If only some of your pages require database connectivity you
									can manually connect to your database by adding this line of
									code in any function where it is needed, or in your class
									constructor to make the database available globally in that
									class.

											$this->load->database();

									If the above function does not contain any
									information in the first parameter it will connect to the group
									specified in your database config file. For most people, this
									is the preferred method of use.

										Available Parameters¶

The database connection values, passed either as an array
											or a DSN string.

TRUE/FALSE (boolean). Whether to return the connection ID
											(see Connecting to Multiple Databases below).

TRUE/FALSE (boolean). Whether to enable the Query Builder
											class. Set to TRUE by default.

										Manually Connecting to a Database¶

										The first parameter of this function can optionally
										be used to specify a particular database group from your
										config file, or you can even submit connection values for a
										database that is not specified in your config file. Examples:

To choose a specific group from your config file you can do
										this:

												$this->load->database('group_name');

Where group_name is the name of the connection group from
										your config file.

To connect manually to a desired database you can pass an
										array of values:

												$config['hostname'] = 'localhost';
$config['username'] = 'myusername';
$config['password'] = 'mypassword';
$config['database'] = 'mydatabase';
$config['dbdriver'] = 'mysqli';
$config['dbprefix'] = '';
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
$config['cache_on'] = FALSE;
$config['cachedir'] = '';
$config['char_set'] = 'utf8';
$config['dbcollat'] = 'utf8_general_ci';
$this->load->database($config);

										For information on each of these values please see the configuration
												page.

Note

For the PDO driver, you should use the
											$config[‘dsn’] setting instead of
											‘hostname’ and ‘database’:

$config[‘dsn’] =
												‘mysql:host=localhost;dbname=mydatabase’;

Or you can submit your database values as a Data Source
										Name. DSNs must have this prototype:

												$dsn = 'dbdriver://username:password@hostname/database';
$this->load->database($dsn);

To override default config values when connecting with a DSN
										string, add the config variables as a query string.

												$dsn = 'dbdriver://username:password@hostname/database?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir=/path/to/cache';
$this->load->database($dsn);

									Connecting to Multiple Databases¶

If you need to connect to more than one database
									simultaneously you can do so as follows:

											$DB1 = $this->load->database('group_one', TRUE);
$DB2 = $this->load->database('group_two', TRUE);

Note: Change the words “group_one” and
									“group_two” to the specific group names you are
									connecting to (or you can pass the connection values as
									indicated above).

By setting the second parameter to TRUE (boolean) the
									function will return the database object.

Note

When you connect this way, you will use your object name to
										issue commands rather than the syntax used throughout this
										guide. In other words, rather than issuing commands with:

$this->db->query();

$this->db->result();

etc...

You will instead use:

$DB1->query();

$DB1->result();

etc...

Note

You don’t need to create separate database
										configurations if you only need to use a different database on
										the same connection. You can switch to a different database
										when you need to, like this:

$this->db->db_select($database2_name);

									Reconnecting / Keeping the Connection Alive¶

If the database server’s idle timeout is exceeded while
									you’re doing some heavy PHP lifting (processing an image,
									for instance), you should consider pinging the server by using
									the reconnect() method before sending further queries, which
									can gracefully keep the connection alive or re-establish it.

											$this->db->reconnect();

									Manually closing the Connection¶

While CodeIgniter intelligently takes care of closing your
									database connections, you can explicitly close the connection.

											$this->db->close();

							Next

							 Previous

© Copyright 2014 - 2015, British Columbia Institute of
								Technology. Last updated on Mar 30, 2015.

						Built with Sphinx using a theme
						provided by Read the Docs.


text:
import configparser
import datetime
import logging
import os
import socket
import sys
import threading
import time
from queue import Queue

from fritzconnection import FritzConnection

from fritzBackwardSearch import FritzBackwardSearch
#from fritzBot import FritzBot
from fritzCallsDuringAbsense import FritzCallsDuringAbsense
from fritzWLAN import FritzWLANStatus

"""

Fritzbox Call Monitor

Adopted from here: http://dede67.bplaced.net/PhythonScripte/callmon/callmon.html

 - The thread (worker1) receives the CallMonitor messages from the Fritzbox and writes them to the fb_queue.

 - The thread (worker2) receives from the fb_queue and calls the FritzBackwardSearch class, which updates the Fritzbox phonebook

 - The message from the Fritzbox has the following flow:
   	- Message is received in thread runFritzboxCallMonitor()
   	- Message gets passed via self.fb_queue to the thread runFritzBackwardSearch()
   	- Message is received in runFritzBackwardSearch()
	 	- split message
	 	- call of the FritzBackwardSearch instance with passing the caller number
	- Message is received in runFritzCallsDuringAbsense()
		- if incoming call has't been accepted a telegram message with the callers name, number and phonemessage will be sent
	- A telegram BOT gets started for retrieving the phone messages, and doing backward search
"""

logger = logging.getLogger(__name__)

class CallMonServer():

	def __init__(self):
		fname = os.path.join(os.path.dirname(__file__), 'fritzBackwardSearch.ini')
		if os.path.isfile(fname):
			self.prefs = self.__read_configuration__(fname)
		else:
			logger.error('{} not found'.format(fname))
			exit(1)
		self.__init_logging__()
		# initialize FB connection
		if self.prefs['password'] == '':
			logger.error('No password given')
			exit(1)
		self.connection = FritzConnection(
			address=self.prefs['fritz_ip_address'],
			port=self.prefs['fritz_tcp_port'],
			user=self.prefs['fritz_username'],
			password=self.prefs['password'])
		self.fb_queue = Queue()  # Meldungs-Übergabe von runFritzboxCallMonitor() an runFritzBackwardSearch()
		self.fb_absense_queue = Queue()

		self.FBS = FritzBackwardSearch()
		self.FCDA = FritzCallsDuringAbsense(self.connection, self.prefs)
		self.FWLAN = FritzWLANStatus(self.connection, self.prefs)
		self.startFritzboxCallMonitor()

#		self.FCDA.set_unresolved('067351648')
#		self.FCDA.set_unresolved('067351550')
#		self.FCDA.get_unresolved()

	def __init_logging__(self):
		numeric_level = getattr(logging, self.prefs['loglevel'].upper(), None)
		if not isinstance(numeric_level, int):
			raise ValueError('Invalid log level: %s' % self.prefs['loglevel'])
		logging.basicConfig(
			filename=self.prefs['logfile'],
			level=numeric_level,
			format=('%(asctime)s %(levelname)s [%(name)s:%(lineno)s] %(message)s'),
			datefmt='%Y-%m-%d %H:%M:%S',
		)

	def __read_configuration__(self, filename):  # read configuration from the configuration file and prepare a preferences dict
		cfg = configparser.ConfigParser()
		cfg.read(filename)
		preferences = {}
		for name, value in cfg.items('DEFAULT'):
			if name == 'status_to_terminal':
				preferences[name] = cfg.getboolean('DEFAULT', 'status_to_terminal')
			else:
				preferences[name] = value
		return preferences

	# ###########################################################
	# Empfangs-Thread und Verarbeitungs-Thread aufsetzen.
	# Funktion verändert:
	#   startet zwei Threads
	# ###########################################################
	def startFritzboxCallMonitor(self):
		worker1 = threading.Thread(target=self.runFritzboxCallMonitor, name="runFritzboxCallMonitor")
		worker1.setDaemon(True)
		worker1.start()

		worker2 = threading.Thread(target=self.runFritzBackwardSearch, name="runFritzBackwardSearch")
		worker2.setDaemon(True)
		worker2.start()

		worker3 = threading.Thread(target=self.runFritzCallsDuringAbsense, name="runFritzCallsDuringAbsense")
		worker3.setDaemon(True)
		worker3.start()

#		worker4 = threading.Thread(target=self.runFritzBot, name="runFritzBot")
#		worker4.setDaemon(True)
#		worker4.start()

		worker5 = threading.Thread(target=self.runFritzWLANStatus, name="runFritzWLANStatus")
		worker5.setDaemon(True)
		worker5.start()

	# ###########################################################
	# Running as Thread.
	# Make connection to Fritzbox, receive messages from the Fritzbox and pass over to queue
	# ###########################################################
	def runFritzboxCallMonitor(self):
		while True:  # Socket-Connect-Loop
			self.recSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
			try:
				self.recSock.connect((self.prefs['fritz_ip_address'], int(self.prefs['fritz_callmon_port'])))
			except socket.herror as e:
				logger.error("%s %s" % ("socket.herror", str(e)))
				time.sleep(10)
				continue
			except socket.gaierror as e:
				logger.error("%s %s" % ("socket.gaierror", str(e)))
				time.sleep(10)
				continue
			except socket.timeout as e:
				logger.error("%s %s" % ("socket.timeout", str(e)))
				continue
			except socket.error as e:
				logger.error("%s %s" % ("socket.error", str(e)))
				time.sleep(10)
				continue
			except Exception as e:
				logger.error(str(e))
				time.sleep(10)
				continue
			logger.info("The connection to the Fritzbox call monitor has been established!")

			while True:  # Socket-Receive-Loop
				try:
					ln = self.recSock.recv(256).strip()
				except:
					ln = ""

				if ln != "":
					self.fb_queue.put(ln)
					self.fb_absense_queue.put(ln)
				else:
					logger.info("The connection to the Fritzbox call monitor has been stopped!")
					self.fb_queue.put("CONNECTION_LOST")
					break   # back to the Socket-Connect-Loop

	# ###########################################################
	# Running as Thread.
	# Make connection to Fritzbox, do backwardsearch for callers number
	# ###########################################################
	def runFritzBackwardSearch(self):
		while True:
			time.sleep(0.01)
			msgtxt = self.fb_queue.get()
			if not (msgtxt == "CONNECTION_LOST" or msgtxt == "REFRESH"):
				msg = msgtxt.decode().split(';')
				if msg[1] == "RING":
					self.FBS.runSearch(s=msg[3])
				if msg[1] == "CALL":
					self.FBS.runSearch(s=msg[5])

	# ###########################################################
	# Running as Thread.
	# Make connection to Fritzbox and retrieve the answering machine message, and inform via Telegram
	# ###########################################################
	def runFritzCallsDuringAbsense(self):
		call_history = {}
		while True:
			time.sleep(0.01)
			msgtxt = self.fb_absense_queue.get()
			logger.info(msgtxt)
			if not (msgtxt == "CONNECTION_LOST" or msgtxt == "REFRESH"):
				# RING;ID;CALLER;CALLED;
				# CONNECT;ID;PORT;CALLER;
				# DISCONNECT;ID;SECONDS;
				type, id, caller_or_port = msgtxt.decode().split(';')[1:4]
				if type == "RING":
					call_history[id] = caller_or_port
					logger.info(call_history)
#				elif type == "CONNECT":
#					logger.info(call_history)
				elif type == "DISCONNECT":
					logger.info(call_history)
					if id in call_history:
						logger.info('calling FCDA '+call_history[id])
						self.FCDA.set_unresolved(call_history[id])
						del call_history[id]

	# ###########################################################
	# Running as Thread.
	# Start fritzBot
	# ###########################################################
#	def runFritzBot(self):
#		FritzBot().startBot()

	# ###########################################################
	# Running as Thread.
	# Start fritzWLANStatus
	# ###########################################################
	def runFritzWLANStatus(self):
		while True:
			now = datetime.datetime.now()
			if now.minute % 2 == 0 and now.second == 0:
				self.FWLAN.get_active_devices()
			time.sleep(1)

	# ###########################################################
	# Start fritzCallMon Server
	# ###########################################################
	def runServer(self):
		self.srvSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
		self.srvSock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
		try:
			self.srvSock.bind(("", int(self.prefs['callmon_server_socket'])))
			self.srvSock.listen(5)
		except Exception as e:
			logger.error("Cannot open socket {} : {}".format(self.prefs['callmon_server_socket'], e))
			return

		while True:
			try:
				self.srvSock.listen(5)
				time.sleep(0.01)
			except:
				logger.info('fritzCallMon has been stopped')
				sys.exit()

			now = datetime.datetime.now()
			if now.minute % 1 == 0 and now.second == 0:
				self.FCDA.get_unresolved()
				time.sleep(1)

if __name__ == '__main__':
	CallMonServer().runServer()


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
DefaultElementLocatorFactory
</TITLE>

<META NAME="date" CONTENT="2010-02-03">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.openqa.selenium.support.pagefactory

Class DefaultElementLocatorFactory

java.lang.Object
  org.openqa.selenium.support.pagefactory.DefaultElementLocatorFactory

All Implemented Interfaces:
ElementLocatorFactory

public final class DefaultElementLocatorFactory
extends java.lang.Object
implements ElementLocatorFactory

Constructor Summary

DefaultElementLocatorFactory(WebDriver driverRef)

Method Summary

 ElementLocator
createLocator(java.lang.reflect.Field field)

          When a field on a class needs to be decorated with an
 ElementLocator this method will be called.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultElementLocatorFactory

public DefaultElementLocatorFactory(WebDriver driverRef)

Method Detail

createLocator

public ElementLocator createLocator(java.lang.reflect.Field field)

Description copied from interface: ElementLocatorFactory

When a field on a class needs to be decorated with an
 ElementLocator this method will be called.

Specified by:
createLocator in interface ElementLocatorFactory

Returns:

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
#ifndef __rp_measurementMENT_H__
#define __rp_measurementMENT_H__

#include "ruby_prof.h"

extern VALUE mMeasure;

typedef double (*get_measurement)(rb_trace_arg_t* trace_arg);

typedef enum
{
    MEASURE_WALL_TIME,
    MEASURE_PROCESS_TIME,
    MEASURE_ALLOCATIONS,
    MEASURE_MEMORY
} prof_measure_mode_t;

typedef struct prof_measurer_t
{
    get_measurement measure;
    prof_measure_mode_t mode;
    double multiplier;
    bool track_allocations;
} prof_measurer_t;

/* Callers and callee information for a method. */
typedef struct prof_measurement_t
{
    double total_time;
    double self_time;
    double wait_time;
    int called;
    VALUE object;
} prof_measurement_t;

prof_measurer_t* prof_get_measurer(prof_measure_mode_t measure, bool track_allocations);
double prof_measure(prof_measurer_t* measurer, rb_trace_arg_t* trace_arg);

prof_measurement_t* prof_measurement_create(void);
void prof_measurement_free(prof_measurement_t* measurement);
VALUE prof_measurement_wrap(prof_measurement_t* measurement);
prof_measurement_t* prof_get_measurement(VALUE self);
void prof_measurement_mark(void* data);

void rp_init_measure(void);

#endif //__rp_measurementMENT_H__


text:
- [x] Initial Commit
- [ ] Compile successfully
- [ ] Generalise the code
- [ ] Provide sample data intents and utterance

Features that have a checkmark are complete.

# Change log

These are the changes to each version that has been released.

## 0.1

- [x] Initial commit


text:
using System;
using System.Linq;
using System.Numerics;
using BitcoinLite.Crypto;
using BitcoinLite.Encoding;
using NUnit.Framework;

namespace BitcoinLite.Tests.Crypto
{
	[TestFixture(Category = "Address,Bitcoin,Crypto")]
	public class AddressTests
	{
		[Test]
		public void CannotCreateInvalidAddress()
		{
			Assert.Throws<FormatException>(
				()=>Base58Data.FromString("8ApqRi7vWrh3gR4jJ6LXhAXRKWTu55mrqP"));
		}

		[Test]
		public void CannotCreateAddressxxxx()
		{
			Network network;
			DataTypePrefix type;
			var data = Base58Data.FromString("1ApqRi7vWrh3gR4jJ6LXhAXRKWTu55mrqP", out network, out type);
			var bytes = new byte[] { 0xff, 0xff}.Concat(data).ToArray();
			Assert.Throws<FormatException>(() => Address.FromString(Encoders.Base58Check.GetString(bytes)));
		}

		[Test]
		public void CannotCreateAddressEmpty()
		{
			Network network;
			DataTypePrefix type;
			Assert.Throws<FormatException>(()=>Base58Data.FromString("", out network, out type));
		}

		[Test]
		public void CannotCreateAddressFromUnsupportedDataType()
		{
			Network network;
			DataTypePrefix type;
			var data = Base58Data.FromString("1ApqRi7vWrh3gR4jJ6LXhAXRKWTu55mrqP", out network, out type);
			var bytes = network.GetPrefixBytes(DataTypePrefix.ExtPrivateKey).Concat(data).ToArray();
			Assert.Throws<NotSupportedException>(() => Address.FromString(Encoders.Base58Check.GetString(bytes)));
		}
	}

	[TestFixture(Category = "Address,Bitcoin,Crypto")]
	public class PubKeyHashAddressTests
	{
		[Test(Description = "Create PubKey Address: key.PubKey.ToAddress")]
		public void CanCreateAddress()
		{
			var hash = Hashes.SHA256(new byte[] { 0x01 });
			var privateKey = new Key(hash);
			var publicKey = privateKey.PubKey;
			var address = publicKey.ToAddress(Network.BitcoinMain);
			var str = address.ToString();
			Assert.AreEqual("1ApqRi7vWrh3gR4jJ6LXhAXRKWTu55mrqP", str);
		}

		[Test(Description = "Create PubKey Address: Address.FromString(wif)")]
		public void CanCreateAddress2()
		{
			var address = Address.FromString("1ApqRi7vWrh3gR4jJ6LXhAXRKWTu55mrqP");
			Assert.AreEqual(Network.BitcoinMain, address.Network);
			Assert.AreEqual("1ApqRi7vWrh3gR4jJ6LXhAXRKWTu55mrqP", address.ToString());
		}

		[Test(Description = "Create PubKey Address: key.PubKey.ToAddress")]
		public void CanCreateAddress3()
		{
			var priv = Key.Parse("KzmL119KUWwg7XkeznvFwHo1qnyLZ4Ap9S326HsomBq9H3PmicRN");
			var addr = priv.PubKey.ToAddress(Network.BitcoinMain);
			Assert.AreEqual("1NHAEjTe38z73XKJBndNd4Y2s3m1WTFe2V", addr.ToString());
		}
	}

	[TestFixture(Category = "Address,Bitcoin,Crypto")]
	public class ScriptHashAddressTests
	{
		[Test(Description = "Create Script Address: key.PubKey.ScriptPubKey.Hash.GetAddress")]
		public void CanCreateAddress()
		{
			var hash = Hashes.SHA256(new byte[] { 0x01 });
			var privateKey = new Key(hash);
			var address = privateKey.PubKey.ScriptPubKey.Hash.GetAddress(Network.BitcoinMain);
			Assert.AreEqual("31xfAbnULrmQH5wyjtgjbrTP47PJ48MY3T", address.ToString());
		}

		[Test(Description = "Create Script Address: Address.FromString(wif)")]
		public void CanCreateAddress2()
		{
			var address = Address.FromString("1ApqRi7vWrh3gR4jJ6LXhAXRKWTu55mrqP");
			Assert.AreEqual(Network.BitcoinMain, address.Network);
			Assert.AreEqual("1ApqRi7vWrh3gR4jJ6LXhAXRKWTu55mrqP", address.ToString());
		}

		[Test(Description = "Create Script Address: key.PubKey.ToAddress")]
		public void CanCreateAddress3()
		{
			var priv = Key.Parse("KzmL119KUWwg7XkeznvFwHo1qnyLZ4Ap9S326HsomBq9H3PmicRN");
			var addr = priv.PubKey.ToAddress(Network.BitcoinMain);
			Assert.AreEqual("1NHAEjTe38z73XKJBndNd4Y2s3m1WTFe2V", addr.ToString());
		}
	}

}


text:
package main

import (
	"context"
	"encoding/json"
	"io"
	"os"
	"os/exec"
	"sync"

	"go.chromium.org/luci/common/errors"
	"go.chromium.org/luci/common/flag/nestedflagset"
	log "go.chromium.org/luci/common/logging"
	"go.chromium.org/luci/common/system/environ"
	"go.chromium.org/luci/common/system/exitcode"
	"go.chromium.org/luci/logdog/client/bootstrapResult"
	"go.chromium.org/luci/logdog/client/butler"
	"go.chromium.org/luci/logdog/client/butler/streamserver"

	"github.com/maruel/subcommands"
)

var subcommandRun = &subcommands.Command{
	UsageLine: "run",
	ShortDesc: "Bootstraps an application, passing its output through the Butler.",
	LongDesc:  "Bootstraps an application to stream through the Butler.",
	CommandRun: func() subcommands.CommandRun {
		cmd := &runCommandRun{}

		cmd.Flags.StringVar(&cmd.resultPath, "result-path", "",
			"If supplied, a JSON file describing the bootstrap result will be written here if the bootstrapped process "+
				"is successfully executed.")
		cmd.Flags.StringVar(&cmd.jsonArgsPath, "json-args-path", "",
			"If specified, this is a JSON file containing the full command to run as an "+
				"array of strings.")
		cmd.Flags.StringVar(&cmd.chdir, "chdir", "",
			"If specified, switch to this directory prior to running the command.")
		cmd.Flags.BoolVar(&cmd.attach, "attach", true,
			"If true, attaches the bootstrapped process's STDOUT and STDERR streams.")
		cmd.Flags.BoolVar(&cmd.stdin, "forward-stdin", false,
			"If true, forward STDIN to the bootstrapped process.")

		// "stdout" command-line option.
		stdoutFlag := new(nestedflagset.FlagSet)
		cmd.stdout.addFlags(&stdoutFlag.F)
		cmd.Flags.Var(stdoutFlag, "stdout", "STDOUT stream parameters.")

		// "stderr" command-line option.
		stderrFlag := new(nestedflagset.FlagSet)
		cmd.stderr.addFlags(&stderrFlag.F)
		cmd.Flags.Var(stderrFlag, "stderr", "STDERR stream parameters.")

		return cmd
	},
}

type runCommandRun struct {
	subcommands.CommandRunBase

	// If not empty, write bootstrap result JSON here.
	resultPath string

	// jsonArgsPath, if not empty, is the path to a JSON file containing an array
	// of strings, each of which is a command-line argument to the bootstrapped
	// command.
	jsonArgsPath string

	// chdir, if not empty, is the directory to switch to before running the
	// bootstrapped command.
	chdir string

	// attach, if true, automatically attaches the subprocess's STDOUT and STDERR
	// streams to the Butler.
	attach bool
	stdin  bool
	stdout streamConfig // Stream configuration for STDOUT.
	stderr streamConfig // Stream configuration for STDERR.
}

func (cmd *runCommandRun) Run(app subcommands.Application, args []string, _ subcommands.Env) int {
	a := app.(*application)

	if cmd.jsonArgsPath != "" {
		if len(args) > 0 {
			log.Errorf(a, "Cannot supply both JSON and command-line arguments.")
			return configErrorReturnCode
		}

		err := error(nil)
		args, err = cmd.loadJSONArgs()
		if err != nil {
			log.Fields{
				log.ErrorKey: err,
				"path":       cmd.jsonArgsPath,
			}.Errorf(a, "Failed to load JSON arguments.")
			return configErrorReturnCode
		}

		log.Fields{
			"args": args,
			"path": cmd.jsonArgsPath,
		}.Debugf(a, "Loaded arguments from JSON file.")
	}

	if len(args) == 0 {
		log.Errorf(a, "A command must be specified.")
		return configErrorReturnCode
	}

	// Resolve
	streamServer, err := streamserver.New(a, "")
	if err != nil {
		log.WithError(err).Errorf(a, "Invalid stream server URI.")
		return configErrorReturnCode
	}

	// Get the actual path to the command
	commandPath, err := exec.LookPath(args[0])
	if err != nil {
		log.Fields{
			log.ErrorKey: err,
			"command":    args[0],
		}.Errorf(a, "Failed to identify command path.")
		return runtimeErrorReturnCode
	}
	args = args[1:]

	// Verify our current working directory. "cwd" is only used for validation and
	// logging.
	cwd := cmd.chdir
	if cwd != "" {
		fi, err := os.Stat(cwd)
		if err != nil {
			log.Fields{
				log.ErrorKey: err,
				"path":       cwd,
			}.Errorf(a, "Failed to stat `chdir` directory.")
			return runtimeErrorReturnCode
		}

		if !fi.IsDir() {
			log.Fields{
				"path": cwd,
			}.Errorf(a, "Target `chdir` path is not a directory.")
			return runtimeErrorReturnCode
		}
	} else {
		// Just for output.
		cwd, _ = os.Getwd()
	}

	// Get our output.
	of, err := a.getOutputFactory()
	if err != nil {
		log.WithError(err).Errorf(a, "Failed to get output factory instance.")
		return runtimeErrorReturnCode
	}
	output, err := of.configOutput(a)
	if err != nil {
		log.WithError(err).Errorf(a, "Failed to create output instance.")
		return runtimeErrorReturnCode
	}
	defer output.Close()

	// Update our environment for the child process to inherit
	bsEnv := output.URLConstructionEnv()

	// Configure stream server
	streamServerOwned := true
	log.Fields{
		"url": streamServer.Address(),
	}.Infof(a, "Creating stream server.")
	if err := streamServer.Listen(); err != nil {
		log.WithError(err).Errorf(a, "Failed to connect to stream server.")
		return runtimeErrorReturnCode
	}
	log.Infof(a, "listening on %q", streamServer.Address())

	defer func() {
		if streamServerOwned {
			streamServer.Close()
		}
	}()

	bsEnv.StreamServerURI = streamServer.Address()

	// Build our command environment.
	env := environ.System()
	bsEnv.Augment(env)

	// Construct and execute the command.
	procCtx, procCancelFunc := context.WithCancel(a)
	defer procCancelFunc()

	proc := exec.CommandContext(procCtx, commandPath, args...)
	proc.Dir = cmd.chdir
	proc.Env = env.Sorted()
	if cmd.stdin {
		proc.Stdin = os.Stdin
	}

	// Attach STDOUT / STDERR pipes if configured to do so.
	//
	// This will happen in one of two ways:
	// - If no stream name is provided, we will not create a Butler stream for
	//   this output; instead, we will connect them directly to the bootstrapped
	//   process.
	// - If a stream name is provided, we will create a Butler stream for this
	//   output, and tee as necessary.
	//
	// When connecting the stream to the Butler, we track them with a
	// sync.WaitGroup because we have to wait for them to close before reaping the
	// process (see exec.Cmd's StdoutPipe method).
	//
	// In this case, we will hand them to the Butler, which will Close then when
	// it counters io.EOF.
	var (
		stdout, stderr io.ReadCloser
		streamWG       sync.WaitGroup
	)
	if cmd.attach {
		// STDOUT
		if cmd.stdout.Name == "" {
			// Forward directly.
			proc.Stdout = os.Stdout
		} else {
			// Connect to Butler.
			stdout, err = proc.StdoutPipe()
			if err != nil {
				log.WithError(err).Errorf(a, "Failed to get STDOUT pipe.")
				return runtimeErrorReturnCode
			}
			stdout = &callbackReadCloser{stdout, streamWG.Done}
			streamWG.Add(1)
		}

		// STDERR
		if cmd.stderr.Name == "" {
			// Forward directly.
			proc.Stderr = os.Stderr
		} else {
			// Connect to Butler.
			stderr, err = proc.StderrPipe()
			if err != nil {
				log.WithError(err).Errorf(a, "Failed to get STDERR pipe.")
				return runtimeErrorReturnCode
			}
			stderr = &callbackReadCloser{stderr, streamWG.Done}
			streamWG.Add(1)
		}
	}

	if log.IsLogging(a, log.Debug) {
		log.Fields{
			"commandPath": commandPath,
			"cwd":         cwd,
			"args":        args,
		}.Debugf(a, "Executing application.")
		for _, entry := range proc.Env {
			log.Debugf(a, "Environment variable: %s", entry)
		}
	}

	// Attach and run our Butler instance.
	var (
		executed   = false
		returnCode = runtimeErrorReturnCode
	)

	err = a.runWithButler(output, func(b *butler.Butler) error {
		// We want to kill our process early if our Butler run finishes.
		defer procCancelFunc()

		// If we have configured a stream server, add it.
		if streamServer != nil {
			b.AddStreamServer(streamServer)
			streamServerOwned = false
		}

		// Add our pipes as direct streams, if configured.
		if stdout != nil {
			if err := b.AddStream(stdout, cmd.stdout.properties()); err != nil {
				return errors.Annotate(err, "failed to attach STDOUT pipe stream").Err()
			}
		}
		if stderr != nil {
			if err := b.AddStream(stderr, cmd.stderr.properties()); err != nil {
				return errors.Annotate(err, "failed to attach STDERR pipe stream").Err()
			}
		}

		// Execute the command. The bootstrapped application will begin executing
		// in the background.
		if err := proc.Start(); err != nil {
			return errors.Annotate(err, "failed to start bootstrapped process").Err()
		}

		// Wait for the process's streams to finish. We must do this before Wait()
		// on the process itself.
		streamWG.Wait()

		// Reap the process.
		err := proc.Wait()
		if rc, ok := exitcode.Get(err); ok {
			if rc != 0 {
				log.Fields{
					"returnCode": rc,
				}.Errorf(a, "Command completed with non-zero return code.")
			}

			returnCode = rc
			executed = true
		} else {
			log.WithError(err).Errorf(a, "Command failed.")
		}

		// Wait for our Butler to finish.
		b.Activate()
		if err := b.Wait(); err != nil {
			if err == context.Canceled {
				return err
			}
			return errors.Annotate(err, "failed to Wait() for Butler").Err()
		}

		return nil
	})
	if err != nil {
		logAnnotatedErr(a, err, "Error running bootstrapped Butler process:")
	}

	if !executed {
		return runtimeErrorReturnCode
	}

	// Output our bootstrap result.
	br := bootstrapResult.Result{
		ReturnCode: returnCode,
		Command:    append([]string{commandPath}, args...),
	}
	if err := cmd.maybeWriteResult(a, &br); err != nil {
		logAnnotatedErr(a, err, "Failed to write bootstrap result:")
	}

	return returnCode
}

func (cmd *runCommandRun) maybeWriteResult(ctx context.Context, r *bootstrapResult.Result) error {
	if cmd.resultPath == "" {
		return nil
	}

	log.Fields{
		"path": cmd.resultPath,
	}.Debugf(ctx, "Writing bootstrap result.")
	if err := r.WriteJSON(cmd.resultPath); err != nil {
		return errors.Annotate(err, "failed to write JSON file").
			InternalReason("path(%s)", cmd.resultPath).Err()
	}
	return nil
}

func (cmd *runCommandRun) loadJSONArgs() ([]string, error) {
	fd, err := os.Open(cmd.jsonArgsPath)
	if err != nil {
		return nil, err
	}
	defer fd.Close()

	dec := json.NewDecoder(fd)
	args := []string(nil)
	if err := dec.Decode(&args); err != nil {
		return nil, err
	}
	return args, nil
}

// callbackReadCloser invokes a callback method when closed.
type callbackReadCloser struct {
	io.ReadCloser
	callback func()
}

func (c *callbackReadCloser) Close() error {
	defer c.callback()
	return c.ReadCloser.Close()
}


text:
table.nutrition_info {
    width : 320px;
    border : 1px solid black;
    border-collapse : collapse;
    padding: 1pt;
    background-color: white;
}

.nutrition_info th {
    font: bold 13pt "Arial Black", Gadget, sans-serif;
    text-align: justify;
    text-justify: auto;
}

.nutrition_info tr#servings td {
    text-align: center;
    font: 8pt Helvetica, sans-serif;
}

.nutrition_info tr#calories td {
    border-bottom : 3pt solid black;
}

.nutrition_info tr#minerals td {
    border-top : 7pt solid black;
}

.nutrition_info tr#bigbreak hr {
    margin: 0;
    height: 7pt;
    border: 0;
    background-color: black;
}

.nutrition_info td {
    padding : 3px;
    font-family : Arial, Helvetica, sans-serif;
    font-size : x-small;
    border-bottom : 1px solid black;
    text-align : left;
}

.nutrition_info td.noborder {
    border: 0;
}

.nutrition_info td#calories_from_fat{
    text-align : right;
}

.nutrition_info td.daily_value {
    font-weight : bold;
    text-align : right;
}

.nutrition_info span.nutrient_name {
    font-weight : bolder;
}

.nutrition_info td.sub {
    text-indent : 10px;
}

.nutrition_info td.disclaimer {
    font-size : xx-small;
}


text:
require 'ec2/amitools/parameters_base'
require 'ec2/amitools/region'
require 'ec2/platform/current'

#------------------------------------------------------------------------------#

class MigrateManifestParameters < ParametersBase
  include EC2::Platform::Current::Constants

  MANIFEST_DESCRIPTION = "The path to the manifest file."
  DIRECTORY_DESCRIPTION = ["The directory containing the bundled AMI parts to upload.",
                      "Defaults to the directory containing the manifest."]
  EC2_CERT_PATH_DESCRIPTION = ['The path to the EC2 X509 public key certificate bundled into the AMI.',
                               "Defaults to the certificate of the region (usually '#{Bundling::EC2_X509_CERT}')."]
  KERNEL_DESCRIPTION = "Kernel id to bundle into the AMI."
  RAMDISK_DESCRIPTION = "Ramdisk id to bundle into the AMI."
  USER_DESCRIPTION = "The user's AWS access key ID."
  PASS_DESCRIPTION = "The user's AWS secret access key."
  NO_MAPPING_DESCRIPTION = "Do not perform automatic mappings."
  REGION_DESCRIPTION = "Region to look up in the mapping file."

  attr_accessor :user_pk_path,
                :user_cert_path,
                :user,
                :pass,
                :ec2_cert_path,
                :manifest_path,
                :kernel_id,
                :ramdisk_id,
                :use_mapping,
                :region

  #----------------------------------------------------------------------------#

  def mandatory_params()
    on('-c', '--cert PATH', String, USER_CERT_PATH_DESCRIPTION) do |path|
      assert_file_exists(path, '--cert')
      @user_cert_path = path
    end

    on('-k', '--privatekey PATH', String, USER_PK_PATH_DESCRIPTION) do |path|
      assert_file_exists(path, '--privatekey')
      @user_pk_path = path
    end

    on('-m', '--manifest PATH', String, MANIFEST_DESCRIPTION) do |manifest|
      assert_file_exists(manifest, '--manifest')
      @manifest_path = manifest
    end
  end

  #----------------------------------------------------------------------------#

  def optional_params()
    on('-a', '--access-key USER', String, USER_DESCRIPTION) do |user|
      @user = user
    end

    on('-s', '--secret-key PASSWORD', String, PASS_DESCRIPTION) do |pass|
      @pass = pass
    end

    on('--ec2cert PATH', String, *EC2_CERT_PATH_DESCRIPTION) do |path|
      assert_file_exists(path, '--ec2cert')
      @ec2_cert_path = path
    end

    on('--kernel KERNEL_ID', String, KERNEL_DESCRIPTION) do |kernel_id|
      @kernel_id = kernel_id
    end

    on('--ramdisk RAMDISK_ID', String, RAMDISK_DESCRIPTION) do |ramdisk_id|
      @ramdisk_id = ramdisk_id
    end

    on('--no-mapping', String, NO_MAPPING_DESCRIPTION) do
      @use_mapping = false
    end

    on('--region REGION', String, REGION_DESCRIPTION) do |region|
      @region = region
    end
  end

  #----------------------------------------------------------------------------#

  def validate_params()
    raise MissingMandatory.new('--manifest') unless @manifest_path
    raise MissingMandatory.new('--cert') unless @user_cert_path
    raise MissingMandatory.new('--privatekey') unless @user_pk_path
    @use_mapping = true if @use_mapping.nil? # False is different.
    if @use_mapping
      raise ParameterExceptions::Error.new('If using automatic mapping, --region must be provided.') unless @region
      raise ParameterExceptions::Error.new('If using automatic mapping, --access-key must be provided.') unless @user
      raise ParameterExceptions::Error.new('If using automatic mapping, --secret-key must be provided.') unless @pass
    end
  end

  #----------------------------------------------------------------------------#

  def set_defaults()
    @ec2_cert_path ||= case
      when (@region=="us-gov-west-1") then Bundling::EC2_X509_GOV_CERT
      when (@region=="cn-north-1") then Bundling::EC2_X509_CN_NORTH_1_CERT
      else Bundling::EC2_X509_CERT
    end
  end
end


text:
A set of high-quality Web Components built using Polymer.

Learn more about [Vaadin Components.](https://vaadin.com/components/)

View the [live site](http://vaadin.github.io/components-examples/) to see the code examples side-by-side with its corresponding live example.

### Setting up the project for the first time

Skip this step if you already have this stuff locally.

- Either clone the project:
```shell
$ git clone https://github.com/vaadin/components-examples.git
```
- Or [download ZIP archive](https://github.com/vaadin/components-examples/archive/gh-pages.zip) and unzip it

### Serving the examples

- Go to the examples directory
```shell
$ cd components-examples
```
- Spin up a web server, for example [serve](https://www.npmjs.com/package/serve).
```shell
$ serve
```
- Access the examples through `http://localhost:3000/` or directly `http://localhost:3000/vaadin-grid`


text:
const Score = require('../../../lib/score');
const _ = require('lodash');
const scorePerCommit = 0.25;

module.exports = new Score ('push_event', {
  fn: (event, actor) => {
    const actorEmail = _.get(actor, 'sources.github.email');
    if (_.get(event, 'type') === 'PushEvent') {
      let score = 0;
      _.each(event.payload.commits, commit => {
        if (commit.author.email === actorEmail) score += scorePerCommit;
      });
      return score;
    }
  },
  color: '#98C261',
  toHTML: (event, actor) => {
    const sha = _.get(event._source, 'payload.head');
    const repoName = _.get(event._source, 'repo.name');
    return `Pushed ${event._source.relay_total_score / scorePerCommit} commits to <a href="https://github.com/${repoName}/commit/${sha}">${repoName}</a>`;
  }
});


text:
Pattern: Malformed padding for method parameter list

Issue: -

## Description

Checks the padding between the identifier of a method definition, constructor definition, method call, or constructor invocation; and the left parenthesis of the parameter list. That is, if the identifier and left parenthesis are on the same line, checks whether a space is required immediately after the identifier or such a space is forbidden. If they are not on the same line, reports an error, unless configured to allow line breaks.

To allow line breaks after the identifier, set property `allowLineBreaks` to `true`.

## Examples

To configure the check:

```xml
<module name="MethodParamPad"/>
```

To configure the check to require a space after the identifier of a method definition, except if the left parenthesis occurs on a new line:

```xml
<module name="MethodParamPad">
    <property name="tokens" value="METHOD_DEF"/>
    <property name="option" value="space"/>
    <property name="allowLineBreaks" value="true"/>
</module>
```

## Further Reading

* [checkstyle - MethodParamPad](http://checkstyle.sourceforge.net/config_whitespace.html#MethodParamPad)


text:
<?php
$client_id = WP_Auth0_Options::get('client_id');

if (trim($client_id) == "") return;

$wordpress_login_enabled = WP_Auth0_Options::get('wordpress_login_enabled') == 1;

$domain = WP_Auth0_Options::get('domain');
$cdn = WP_Auth0_Options::get('cdn_url');

$allow_signup = WP_Auth0_Options::is_wp_registration_enabled();

$extra_css = apply_filters( 'auth0_login_css', '');
$showAsModal = (isset($specialSettings['show_as_modal']) && $specialSettings['show_as_modal'] == 1);
$modalTriggerName = 'Login';
if (isset($specialSettings['modal_trigger_name']) && $specialSettings['modal_trigger_name'] != '')
{
    $modalTriggerName = $specialSettings['modal_trigger_name'];
}

if (isset($specialSettings['show_as_modal'])) unset($specialSettings['show_as_modal']);
if (isset($specialSettings['modal_trigger_namemodal_trigger_name'])) unset($specialSettings['modal_trigger_name']);

$form_desc = WP_Auth0_Options::get('form_desc');
if (isset($_GET['interim-login']) && $_GET['interim-login'] == 1) {
    $interim_login = true;
} else {
    $interim_login = false;
}

// Get title for login widget
if (empty($title)) {
    $title = "Sign In";
}

$stateObj = array("interim" => $interim_login, "uuid" =>uniqid());
if (isset($_GET['redirect_to'])) {
    $stateObj["redirect_to"] = $_GET['redirect_to'];
}

$state = json_encode($stateObj);

$options_obj = WP_Auth0::buildSettings(WP_Auth0_Options::get_options());

$options_obj = array_merge( array(
    "callbackURL"   =>  site_url('/index.php?auth0=1'),
    "authParams"    => array("state" => $state),
), $options_obj  );

if (isset($specialSettings)){
    $options_obj = array_merge( $options_obj , $specialSettings );
}

if (!$showAsModal){
    $options_obj['container'] = 'auth0-login-form';
}

if (!$allow_signup) {
    $options_obj['disableSignupAction'] = true;
}

$options = json_encode($options_obj);

if(empty($client_id) || empty($domain)){ ?>

<?php _e('Auth0 Integration has not yet been set up! Please visit your Wordpress Auth0 settings and fill in the required settings.', WPA0_LANG); ?>

<?php } else { ?>

    <?php if(isset($options_obj['custom_css'])) { ?>

    <?php } ?>

        <?php include 'error-msg.php'; ?>

            <?php if ($showAsModal) { ?>

                <button id="a0LoginButton" onclick="a0ShowLoginModal();" ><?php echo $modalTriggerName; ?></button>

            <?php } else { ?>

            <?php } ?>
            <?php if ($wordpress_login_enabled && $canShowLegacyLogin) { ?>

                    Login with WordPress username

            <?php } ?>

    <?php if (!empty($extra_css)) { ?>

    <?php } ?>

<?php
}
?>


text:
package com.wordtrellis.projecteuler

/**
  *  Problem 10
  *  The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
  *  Find the sum of all the primes below two million.
  *
  *  Solution:
  *  Sieve of Eratosthenes
  *  see: http://en.wikipedia.org/wiki/Sieve_of_eratosthenes
  *  1. Create a list of consecutive integers from two to n: (2, 3, 4, ..., n).
  *  2. Initially, let p equal 2, the first prime number.
  *   3. Strike from the list all multiples of p less than or equal to n.
  *   4. Find the first number remaining on the list greater than p
  *   (this number is the next prime); replace p with this number.
  *   5. Repeat steps 3 and 4 until p2 is greater than n.
  *   6. All the remaining numbers on the list are prime.
  *
  *  Or a better more modern version is the Sieve of SieveOfAtkin
  *  http://en.wikipedia.org/wiki/Sieve_of_Atkin
  *
  * First couple attempts are included, see problem_10Fails.scala
  *
  * @author : Todd Cook
  *
  */
object problem_10 {

  /**
    * constructed in seconds:  0.656
    * 164357 primes found
    * Sum of primes: 1.57514803718E11
    */
    def main(args: Array[String]) :Unit = {
    val start = java.lang.System.currentTimeMillis
    val atk   = new SieveOfAtkin(2000000)
    var end   = java.lang.System.currentTimeMillis
    println(s"constructed in seconds: ${ (end - start) / 1000D }")
    println( s"${atk.getPrimes.size} primes found")
    println(s"Sum of primes: ${sumBigList(atk.getPrimes)} ")
  }

  /**
    * This method is required because scala's List[T] method sum() = :T
    * so 2 million Int primes summed together will overflow an Int,
    * whereas List[Double] .sum() :Double
    */
  def sumBigList(bigList: List[Int]): Double = {
    //    var bd = 0d
    //    bigList.foreach(x => bd += x)
    //    bd
    // a foolproof implementation for the doubters
    var bi = new java.math.BigInteger("0")
    bigList.foreach(x => { bi = bi.add(new java.math.BigInteger(x.toString)) })
//    println(bi.toString)
    bi.doubleValue
  }
}


text:
package org.wso2.carbon.mediator.payloadfactory;

import org.apache.axiom.om.OMAttribute;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.util.AXIOMUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.config.xml.SynapseJsonPathFactory;
import org.apache.synapse.config.xml.SynapseXPathFactory;
import org.apache.synapse.config.xml.SynapseXPathSerializer;
import org.apache.synapse.config.xml.XMLConfigConstants;
import org.apache.synapse.util.xpath.SynapseJsonPath;
import org.apache.synapse.util.xpath.SynapseXPath;
import org.jaxen.JaxenException;
import org.wso2.carbon.mediator.service.MediatorException;
import org.wso2.carbon.mediator.service.ui.AbstractMediator;

import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class PayloadFactoryMediator extends AbstractMediator {

    private static Log log = LogFactory.getLog(PayloadFactoryMediator.class);

    private static final String PAYLOAD_FACTORY = "payloadFactory";
    private static final String FORMAT = "format";
    private static final String ARGS = "args";
    private static final String ARG = "arg";
    private static final String VALUE = "value";
    private static final String EXPRESSION = "expression";
    private static final String EVAL = "evaluator";
    private static final String TYPE = "media-type";

    private static final QName FORMAT_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "format");
    private static final QName ARGS_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "args");
    protected static final QName ATT_KEY = new QName("key");
    protected static final QName ATT_EVAL   = new QName("evaluator");
    protected static final QName ATT_MEDIA   = new QName("media-type");

    private final String JSON_TYPE="json";
    private final String XML_TYPE="xml";

    private String format = null;
    private String type = null;
    private boolean dynamic = false;
    private String formatKey = null;
    private List<Argument> argumentList = new ArrayList<Argument>();

    /// This the error private String evaluator = null;

    public OMElement serialize(OMElement parent) {

        OMElement payloadFactoryElem = fac.createOMElement(PAYLOAD_FACTORY, synNS);
        if(type!=null){
            payloadFactoryElem.addAttribute(fac.createOMAttribute(TYPE, nullNS,type));
        }
        saveTracingState(payloadFactoryElem, this);

        if (!dynamic) {
            if (format != null) {
                try {
                    OMElement formatElem = fac.createOMElement(FORMAT, synNS);
                    if(type!=null && type.contains(JSON_TYPE)){
                        formatElem.setText(format);
                    } else{
                        formatElem.addChild(AXIOMUtil.stringToOM(format));
                    }
                    payloadFactoryElem.addChild(formatElem);
                } catch (XMLStreamException e) {
                    handleException("Error while serializing payloadFactory mediator", e);
                }
            } else {
                handleException("Invalid payloadFactory mediator, format is required");
            }
        } else {
            if (formatKey != null) {
                OMElement formatElem = fac.createOMElement(FORMAT, synNS);
                formatElem.addAttribute(fac.createOMAttribute(
                        "key", nullNS, formatKey));
                payloadFactoryElem.addChild(formatElem);
            } else {
                handleException("Invalid payloadFactory mediator, format is required");
            }
        }

        if (argumentList != null && argumentList.size() > 0) {

            OMElement argumentsElem = fac.createOMElement(ARGS, synNS);

            for (Argument arg : argumentList) {

                OMElement argElem = fac.createOMElement(ARG, synNS);

                if (arg.getValue() != null) {
                    argElem.addAttribute(fac.createOMAttribute(VALUE, nullNS, arg.getValue()));
                } else if (arg.getExpression() != null) {
                        SynapseXPathSerializer.serializeXPath(arg.getExpression(), argElem, EXPRESSION);
                } else if(arg.getJsonPath()!=null){
                    argElem.addAttribute(fac.createOMAttribute(EXPRESSION, nullNS, arg.getJsonPath().getExpression()));
                }
                 //error happens somewhere here
                if (arg.getEvaluator() != null) {
                    argElem.addAttribute(fac.createOMAttribute(EVAL, nullNS, arg.getEvaluator()));
                }
                argumentsElem.addChild(argElem);

            }
            payloadFactoryElem.addChild(argumentsElem);
        }

        if (parent != null) {
            parent.addChild(payloadFactoryElem);
        }

        return payloadFactoryElem;
    }

    public void build(OMElement elem) {

        OMAttribute mediaType = elem.getAttribute(ATT_MEDIA);
        if(mediaType!=null){
            this.type=mediaType.getAttributeValue();
        }
        OMElement formatElem = elem.getFirstChildWithName(FORMAT_Q);

        if (formatElem != null) {
            OMAttribute n = formatElem.getAttribute(ATT_KEY);
            if (n == null) {
                if(type!=null && type.contains(JSON_TYPE)){
                    this.format = formatElem.getText();
                } else{
                    this.format = formatElem.getFirstElement().toString();
                }
            } else {
                this.formatKey = n.getAttributeValue();
                this.dynamic = true;
            }
        } else {
            handleException("format element of payloadFactoryMediator is required");
        }

        OMElement argumentsElem = elem.getFirstChildWithName(ARGS_Q);

        if (argumentsElem != null) {

            Iterator itr = argumentsElem.getChildElements();

            while (itr.hasNext()) {
                OMElement argElem = (OMElement) itr.next();
                Argument arg = new Argument();
                String attrValue;

                if ((attrValue = argElem.getAttributeValue(ATT_VALUE)) != null) {

                    arg.setValue(attrValue);
                    argumentList.add(arg);
                } else if ((attrValue = argElem.getAttributeValue(ATT_EXPRN)) != null) {
                    if (attrValue.trim().length() == 0) {
                        handleException("Attribute value for expression cannot be empty");
                    } else {
                        try {
                            String evaluator;

                            if((evaluator=argElem.getAttributeValue(ATT_EVAL))!=null && evaluator.contains(JSON_TYPE)){

                                arg.setEvaluator(evaluator);
                                arg.setJsonPath(SynapseJsonPathFactory.getSynapseJsonPath(attrValue));
                                argumentList.add(arg);

                            } else{

                                if(evaluator!=null && evaluator.equals(XML_TYPE)){
                                    arg.setEvaluator(XML_TYPE);
                                }
                                arg.setExpression(SynapseXPathFactory.getSynapseXPath(argElem, ATT_EXPRN));
                                argumentList.add(arg);
                            }

                        } catch (JaxenException e) {
                            handleException("Invalid XPath expression for attribute expression : " +
                                    attrValue, e);
                        }
                    }

                } else {
                    handleException("Unsupported arg type or expression attribute required");
                }

                  ///argumentList.add(arg); values and args all get added to this.
                // need to change this part of the cord.
            }
        }

        // set its common attributes such as tracing etc
        processAuditStatus(this, elem);
    }

    public boolean isDynamic() {
        return dynamic;
    }

    public void setDynamic(boolean dynamic) {
        this.dynamic = dynamic;
    }

    public String getFormatKey() {
        return formatKey;
    }

    public void setFormatKey(String formatKey) {
        this.formatKey = formatKey;
    }

    public String getFormat() {
        return format;
    }

    public String getType(){
        return type;
    }

    public void setType(String type){
        this.type=type;
    }

    public void addArgument(Argument arg) {
        argumentList.add(arg);
    }

    public List<Argument> getArgumentList() {
        return argumentList;
    }

    public String getTagLocalName() {
        return PAYLOAD_FACTORY;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    private void handleException(String msg) {
        log.error(msg);
        throw new MediatorException(msg);
    }

    private void handleException(String msg, Exception ex) {
        log.error(msg, ex);
        throw new MediatorException(msg + " Caused by " + ex.getMessage());
    }

    public static class Argument {

        private String value;
        private SynapseXPath expression;
        private SynapseJsonPath jsonPath;
        private String evaluator;

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        public SynapseXPath getExpression() {
            return expression;
        }

        public void setExpression(SynapseXPath expression) {
            this.expression = expression;
        }

        public SynapseJsonPath getJsonPath() {
            return jsonPath;
        }

        public void setJsonPath(SynapseJsonPath jsonPath) {
            this.jsonPath = jsonPath;
        }

        public String getEvaluator() {
            return evaluator;
        }

        public void setEvaluator(String evaluator) {
            this.evaluator = evaluator;
        }
    }
}


text:
<template name="tutorial.step_00.html">

           Improve this doc

 Previous

 Live Demo

 Code Diff

Next

Step 0 - Bootstrapping

    <do-nothing class="col-md-12">
    {{#markdown}}

You are now ready to build the Meteor-Angular socially app.

In this step, you will become familiar with the most important source code files,
learn how to start the Meteor server, connect an AngularJS FrontEnd to it and run the application in the browser.

First step - let's install Meteor!

Open your command line and paste this command:

    $ curl https://install.meteor.com/ | sh

Now let's create our app - write this in the command line:

    $ meteor create socially

Now let's see what we got. Go into the folder:

    $ cd socially

and run the app like so:

    $ meteor

    => Started proxy
    => Started MongoDB.
    => Started your app.
    >=> App running at: http://localhost:3000/

Now go to [http://localhost:3000/](http://localhost:3000/)
and look at the amazing app that's running on your computer!

So, as you can see, we have a full running app! which includes a server and a client.

The default Meteor app starts life with three files, one 'js', one 'html' and one 'css' file. Each named with the application name you used in the 'create' command above, in our case this is 'socially'. We're going to add our own files for this tutorial. So let's start by deleting the following files:

    socially.css	socially.html	socially.js

Now we can start building our app.
first let's create a new index.html file and place this code inside and run the app again:

__`index.html`:__

Nothing here

As you can see, there is no html tag, no head tag, very simple.

The reason for this is the way Meteor structures and serves files to the client.

Meteor scans all the HTML files in your application and concatenates them together.

It will create the HTML, HEAD and BODY tags by itself and place in there everything it needs to run the app.

Then it will search for all the HTML files containing HEAD or BODY tags and concatenate their content into the main file.

So in our case, Meteor found our index.html file, found the BODY tag inside and added it's content to the BODY tag of the main generated file.

(right-click -> inspect element on the page to see the generated file)

Now it's time to add AngularJS to our stack!

Now first things first, let's add the AngularJS package to Meteor (we will discuss more about Meteor packages later in this tutorial)

Back in the command line, launch this command:

    $ meteor add urigo:angular

This package takes care of including the latest AngularJS library code into our app.

That's it! now we can use the AngularJS power in our Meteor app.

To start simple, create a new file called index.ng.html under the main folder, this will be our main HTML template page.

* We are using the .ng.html file extension so that Blaze - Meteor's templating system won't compile and override our AngularJS expressions.

Then move the p tag into it:

__`index.ng.html`:__

Nothing here

Now let's include that file into our main index.html file:

__`index.html`:__

But if you load this in your browser, you won't see anything. That's because we still need to create the actual Angular app, which we'll do next.

* It's very important to note - the paths are always absolute, not relative!  so if 'index.ng.html' was inside a client folder, you would have to place the whole path from the route app, doesn't matter where you're calling the file from.

like this (e.g. if index.ng.html was in the 'client' folder):

# AngularJS app

AngularJS apps are actually individual modules. So to start with lets create our app module.

Create a new app.js file.  Now you can see another example of Meteor's power and simplicity - no need to include this file anywhere. Meteor will take care of it by going through all the files in the folder and including them automatically.

One of Meteor's goals is to break down the barrier between client and server, so the code you write can run everywhere! (more on that later).
But we need Angular's power only in the client side, so how can we do that?

There are a few ways to tell Meteor to run code only on the client/server/phone side, let's start with the simplest way - Meteor.isClient variable.

__`app.js`:__

    if (Meteor.isClient) {

    }

Now everything inside this 'if' statement will only run on the client side.

Let's continue defining our AngularJS application module, and give it the name "socially":

__`app.js`:__

    if (Meteor.isClient) {
      angular.module('socially',['angular-meteor']);
    }

And use the same application name in the ng-app directive in index.html:

What we did here is to declare a new angular module named 'socially' and make it dependant on the 'angular-meteor' module (that we included in the first step).

Now run the app.

Everything is the same, but now inside our index.ng.html let's use Angular:

Nothing here {{dstache}} 'yet' + '!' }}

# What is the code doing?
double curly braces binding with an expression:

    Nothing here {{dstache}}'yet' + '!'}}

This line demonstrates two core features of Angular's templating capabilities:

* A binding, denoted by double curly braces {{dstache}} }}
* a simple expression 'yet' + '!' used in this binding.

AngularJS finds the double curly braces, evaluates the expression and inserts the result into the DOM in place of the binding.
Rather than a one-time insert, as we'll see in the next steps, a binding will result in efficient continuous updates whenever the result of the expression evaluation changes.
Inside in the client side code, like a future smart browser would do.

> Why did we use the new file extension file.ng.html ?
>
> That's because the Meteor templating system uses double-curlies. If we use them in our AngularJS view HTML, Meteor will override Angular.
>
> Fortunately, we created a new file extension to stop Meteor overriding our Angular expression.
>
> If you still want to use HTML files without changing their extension, Angular (unlike Meteor...) gives us the [option to change the double-curlies to Double-square-brackets](http://stackoverflow.com/a/12923955/1426570)

# Experiments
Try adding a new expression to the index.ng.html that will do some math:

1 + 2 = {{dstache}} 1 + 2 }}

# Summary
Now let's go to [step 1](/tutorial/step_01) and add some content to the web app.

    {{/markdown}}
    </do-nothing>

 Previous

 Live Demo

 Code Diff

Next

</template>


text:
'use strict';

angular.module('myapp.global', [  ])
	.factory('globalErrorHandler', ['$q', '$log', function($q, $log) {

		return {
			response : function(response) {
				$log.debug('done ajax!');
				return response || $q.when(response);
		    },

			responseError: function(rejection) {
				console.log('bad things')
				console.error(rejection.status)

	            return $q.reject(rejection);
	        }
		};
	}])
	.config(['$httpProvider', function($httpProvider) {
		$httpProvider.interceptors.push('globalErrorHandler');
	}])
;


text:
#pragma once

#include <iosfwd>
#include <string>
#include <vector>

#include "yaml-cpp/dll.h"

namespace YAML {
class Node;

/**
 * Loads the input string as a single YAML document.
 *
 * @throws {@link ParserException} if it is malformed.
 */
YAML_CPP_API Node Load(const std::string& input);

/**
 * Loads the input string as a single YAML document.
 *
 * @throws {@link ParserException} if it is malformed.
 */
YAML_CPP_API Node Load(const char* input);

/**
 * Loads the input stream as a single YAML document.
 *
 * @throws {@link ParserException} if it is malformed.
 */
YAML_CPP_API Node Load(std::istream& input);

/**
 * Loads the input file as a single YAML document.
 *
 * @throws {@link ParserException} if it is malformed.
 * @throws {@link BadFile} if the file cannot be loaded.
 */
YAML_CPP_API Node LoadFile(const std::string& filename);

/**
 * Loads the input string as a list of YAML documents.
 *
 * @throws {@link ParserException} if it is malformed.
 */
YAML_CPP_API std::vector<Node> LoadAll(const std::string& input);

/**
 * Loads the input string as a list of YAML documents.
 *
 * @throws {@link ParserException} if it is malformed.
 */
YAML_CPP_API std::vector<Node> LoadAll(const char* input);

/**
 * Loads the input stream as a list of YAML documents.
 *
 * @throws {@link ParserException} if it is malformed.
 */
YAML_CPP_API std::vector<Node> LoadAll(std::istream& input);

/**
 * Loads the input file as a list of YAML documents.
 *
 * @throws {@link ParserException} if it is malformed.
 * @throws {@link BadFile} if the file cannot be loaded.
 */
YAML_CPP_API std::vector<Node> LoadAllFromFile(const std::string& filename);
}  // namespace YAML


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">

    <meta content="text/html; charset=ISO-8859-1"
          http-equiv="content-type">
    <title>ICEpdf 4.4.1 ReadMe.html</title>

Welcome to ICEpdf 4.4.1!

This bundle contains software source-code and executables for ICEpdf 4.4.1

All documentation related to ICEpdf 4.4 and the use of this bundle
can be found in the
ICEpdf Wiki.

Documentation Quick-links

        Release Notes

        ICEpdf 4.4 Documentation

Support

Please direct all inquiries regarding ICEpdf 4.4 to the ICEpdf
    forum.


text:
package com.ibm.iot.android.iotstarter.shared;

/**
 * Created by Ondrej Plevka on 6.4.2015.
 */
public class ClientPaths {
    public static final String START_MEASUREMENT = "/start";
    public static final String STOP_MEASUREMENT = "/stop";
}


text:
using UnityEngine;
using UnityEditor;

[CanEditMultipleObjects, CustomEditor(typeof(MegaModifyGroup))]
public class MegaModifyGroupEditor : Editor
{
	Texture image;
	//bool showhelp = false;
	bool showorder = false;
	bool showmulti = false;

	bool showtargets = false;

	public override void OnInspectorGUI()
	{
		MegaModifyGroup mod = (MegaModifyGroup)target;

		//EditorGUIUtility.LookLikeInspector();
		MegaModifiers.GlobalDisplay = EditorGUILayout.Toggle("GlobalDisplayGizmos", MegaModifiers.GlobalDisplay);
		mod.Enabled = EditorGUILayout.Toggle("Enabled", mod.Enabled);
		mod.recalcnorms = EditorGUILayout.Toggle("Recalc Normals", mod.recalcnorms);
		MegaNormalMethod method = mod.NormalMethod;
		mod.NormalMethod = (MegaNormalMethod)EditorGUILayout.EnumPopup("Normal Method", mod.NormalMethod);
		mod.recalcbounds = EditorGUILayout.Toggle("Recalc Bounds", mod.recalcbounds);
		mod.recalcCollider = EditorGUILayout.Toggle("Recalc Collider", mod.recalcCollider);
		mod.recalcTangents = EditorGUILayout.Toggle("Recalc Tangents", mod.recalcTangents);
		mod.DoLateUpdate = EditorGUILayout.Toggle("Do Late Update", mod.DoLateUpdate);
		//mod.GrabVerts = EditorGUILayout.Toggle("Grab Verts", mod.GrabVerts);
		mod.DrawGizmos = EditorGUILayout.Toggle("Draw Gizmos", mod.DrawGizmos);

		if ( mod.NormalMethod != method && mod.NormalMethod == MegaNormalMethod.Mega )
		{
			mod.BuildNormalMapping(mod.mesh, false);
		}

		if ( GUILayout.Button("Threading Options") )
			showmulti = !showmulti;

		if ( showmulti )
		{
			MegaModifiers.ThreadingOn = EditorGUILayout.Toggle("Threading Enabled", MegaModifiers.ThreadingOn);
			mod.UseThreading = EditorGUILayout.Toggle("Thread This Object", mod.UseThreading);
		}

#if !UNITY_5
		EditorGUIUtility.LookLikeControls();
#endif

		if ( GUI.changed )
			EditorUtility.SetDirty(target);

		showorder = EditorGUILayout.Foldout(showorder, "Modifier Order");

		if ( showorder && mod.mods != null )
		{
			for ( int i = 0; i < mod.mods.Length; i++ )
			{
				EditorGUILayout.LabelField("", i.ToString() + " - " + mod.mods[i].ModName() + " " + mod.mods[i].Order);
			}
		}

		if ( GUILayout.Button("Targets") )
			showtargets = !showtargets;

		if ( showtargets )
		{
			if ( GUILayout.Button("Add Target") )
			{
				MegaModifierTarget targ = new MegaModifierTarget();
				mod.targets.Add(targ);
			}

			for ( int i = 0; i < mod.targets.Count; i++ )
			{
				EditorGUILayout.BeginHorizontal();
				mod.targets[i].go = (GameObject)EditorGUILayout.ObjectField("Target " + i, mod.targets[i].go, typeof(GameObject), true);
				if ( GUILayout.Button("Del") )
				{
					mod.targets.Remove(mod.targets[i]);
					i--;
				}
				EditorGUILayout.EndHorizontal();
			}
		}
	}
}