text:
This is the `tapper-autoreport` bash utility -- a bash include file
that you include ("source") at the end of your own bash script.

It then magically turns your bash script into a Tapper test suite.

It collects meta information from system, reports test results via
network and uploads files.

It also allows your bash script to be used with the `prove` command,
a tool to run test scripts that produce TAP output (Test Anything
Protocol).

## SYNOPSIS

### most simple usage

* script:

```bash
#! /bin/bash
# your own stuff here ...
. /tapper-autoreport
```

* explanation:

    * TAP
    * filename gets name
    * run itself is already a success
    * meta information
    * report grouping heuristics
    * self-report to Tapper
    * upload files
    * print out Tapper report URL

### using environment variables and params

* script:

```bash
#! /bin/bash
append_tap "ok - affe loewe tiger"
append_tap "ok - some other description"
append_tap "not ok - yet another test description"
append_tapdata "timecpb: 12.345"
append_tapdata "timenocpb: 23.456"
SUITENAME="CPUID-ON"
SUITEVERSION="2.007"
OSNAME="Gentoo 10.1"
CHANGESET="98765"
HOSTNAME="J-F-Sebastian"
TICKETURL='https://osrc.amd.com/bugs/show_bug.cgi?id=901'
WIKIURL=https://osrc.amd.com/wiki/Pharaoh_hound_c-state_boost_evaluation
PLANNINGID=osrc.hv.xen.multicore
TAPPER_REPORT_SERVER="tapper-devel"
NOSEND=1
uname -a | grep -q Linux  # example for exit code
. /tapper-autoreport nok /tmp/results.log $?
```

* explanation:

    * define additional TAP lines
    * define additional YAML data lines
    * overwrite suite name
    * overwrite suite version
    * overwrite OS name
    * overwrite changeset, usually kernel
    * overwrite hostname
    * specify relevant URL in used ticket system (like Bugzilla, RT, ...)
    * specify relevant URL in used wiki
    * specify relevant task planning id (like MS Project, TaskJuggler, ...)
    * use different report server (e.g. "tapper-devel" for experiments)
    * set NOSEND=1 to suppress sending to reports server completely
    * param "nok" say "something was not ok"
    * param of filename /tmp/my_ow_results.txt means upload the file
    * param of integer ($? is last exit code, 0 means ok, else not ok)

### use with prove

* cmd line and output:

```bash
$ prove ./trivial-example-1.sh
./trivial-example-1.sh .. ok
All tests successful.
Files=1, Tests=5, 20 wallclock secs
Result: PASS
```

* explanation:

    * "prove" is an existing standard tool
    * it prints success statistics
    * no report sending happens
    * is meant for manual developing/testing

### use without prove

* cmd line and output:

```bash
$ ./trivial-example-1.sh
# http://perlformance.net/tapper/reports/id/1
# - upload ./trivial-example-1.sh ...
# - upload /boot/config-2.6.32-22-generic ...
# - upload /proc/cpuinfo ...
# - upload /proc/devices ...
# - upload /proc/version ...
```

* explanation:

    * execute script
    * report output to Tapper server
    * upload files
    * prints out Tapper report URL
    * is meant for final reporting

## INFLUENCING BEHAVIOUR

* use environment variables to provide more content
* define hooks (functions) to be called
* provide params that "Do What I Mean"
* call script with "prove" utility to test directly without upload

### Environment Variables

* `TAP[*]`                - Array of TAP lines
* `TAPDATA[*]`            - Array of YAML lines that contain data in TAP
* `HEADERS[*]`            - Array of Tapper headers
* `OUTPUT[*]`             - Array of additional output lines
* `SUITENAME`             - alternative suite name instead of $0
* `SUITEVERSION`          - alternative suite version
* `KEYWORDS`              - space separated keywords to influence suite name
* `OSNAME`                - alternative OS description
* `CHANGESET`             - alternative changeset
* `HOSTNAME`              - alternative hostname
* `TAPPER_REPORT_SERVER`  - alternative report server
* `TICKETURL`             - relevant URL in used ticket system (Bugzilla)
* `WIKIURL`               - relevant URL in used wiki
* `PLANNINGID`            - relevant task planning id (MS Project, TaskJuggler)
* `NOSEND`                - if "1" no sending to Tapper happens
* `NOUPLOAD`              - if "1" no uploading of default files happens

### Utility functions

Import utility functions at the beginning of the script via

```bash
. ./tapper-autoreport --import-utils
```

Then you have the following functions available

* `require_cpufeature "cpb"`

Checks that the string "cpb" in /proc/cpuinfo and exits in a TAP
conform way otherwise.

* `require_program "bc"`

Checks that the program "bc" is available and exits in a TAP conform
way otherwise.

* `require_root`

Checks that the user executing the script is root (UID 0).

* `ok ARG1 "some description"`

Evaluates the first argument with Shell boolean semantics (0 is true)
and appends a corresponding TAP line.

* `negate_ok ARG1 "some description"`

Evaluates the first argument with Shell inverse boolean semantics (0
is false) and appends a corresponding TAP line.

* `append_tap "ok - some description"`

Appends a complete TAP line where you have taken care for the
"`ok`"/"`not ok`" at the beginning.

* `append_tapdata "key: value"`

Appends a key:value line at the tapdata YAML block. The key must start
with letter and consist of only alphanum an underscore.

### Command Line Arguments

* --version               - print version number and exit
* nok                     - declare something was not ok
* [integer]               - exit code of a program, 0 == ok, else not (Hint: use '$?' to refer to last program)
* [filename]              - upload the file

### Function Hooks

* `main_after_hook()`

    * optional shell function to be executed at the end of autoreport's main()
    * all stdout will be part of the report

## RESULT URLS

They look like this: http://tapper/tapper/reports/id/129218

## WHAT IT REPORTS

### Tapper information

* report group
* testrun
* suite name
* suite version
* machine name
* reporter name (owner)

### System information

* uname
* OS name
* kernel version
* changeset
* kernel flags
* cpuinfo
* ram
* execution time
* bogomips

### File uploads

* itself
* /proc/cpuinfo
* /proc/devices
* /proc/version


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

<title>E-Index</title>
<meta name="date" content="2016-11-18">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E F G H I L M O P R S T U V W

E

equals(Object) - Method in class com.eyro.cubeacon.CBBeacon

Two detected beacons are considered equal if they share the same MAC Address,
 proximityUUID, major & minor, regardless of their accuracy or RSSI.

equals(Object) - Method in class com.eyro.cubeacon.CBRegion

A B C D E F G H I L M O P R S T U V W

Skip navigation links

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

redpajama_set_name: RedPajamaGithub


text:
package net.letscarpool.web;

import java.util.LinkedHashMap;
import java.util.Map;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HomeController {

	@RequestMapping(value = { "/", "/about" }, method = RequestMethod.GET)
	public Map<String, String> about() {
		// TODO: get version and build date from Gradle-generated
		// version.properties file
		Map<String, String> aboutMap = new LinkedHashMap<String, String>();
		aboutMap.put("name", "Let's Carpool REST API");
		aboutMap.put("version", "0.1-SNAPSHOT");
		aboutMap.put("author", "Ross Coleman");
		aboutMap.put("date", "2015-01-09");
		return aboutMap;
	}

	@RequestMapping(value = "/secured", method = RequestMethod.GET)
	public String securedInfo() {
		return "pretend this is sensitive information";
	}

}


text:
import { Component, OnInit } from '@angular/core';
import { Hero } from './hero';
import { HeroDetailComponent } from './hero-detail.component';
import { HeroService } from './hero.service';
import { Router} from '@angular/router';

@Component({
  selector: 'my-heroes',
  templateUrl:'app/heroes.component.html',
  styleUrls: ['app/heroes.component.css'],
  directives: [HeroDetailComponent]
})

export class HeroesComponent implements OnInit {
  heroes: Hero[];
  selectedHero: Hero;
  addingHero = false;
  error: any;

  constructor(
    private router: Router,
    private heroService: HeroService) { }

  getHeroes() {
    this.heroService.getHeroes().then(heroes => this.heroes = heroes);
  }

  addHero() {
    this.addingHero = true;
    this.selectedHero = null;
  }

  deleteHero(hero: Hero, event: any) {
    event.stopPropagation();
    this.heroService
        .delete(hero)
        .then(res => {
          this.heroes = this.heroes.filter(h => h !== hero);
          if (this.selectedHero === hero) { this.selectedHero = null; }
        })
        .catch(error => this.error = error);
  }

  close(savedHero: Hero) {
    this.addingHero = false;
    if (savedHero) { this.getHeroes(); }
  }

  ngOnInit() {
    this.getHeroes();
  }

  onSelect(hero: Hero) { this.selectedHero = hero; }

  gotoDetail() {
    this.router.navigate(['/detail', this.selectedHero.id]);
  }
}


text:
#import "CCBTextFieldCell.h"
#import "cocos2d.h"

@interface SequencerStructureCell : CCBTextFieldCell
{
    CCNode* __weak node;

    BOOL imagesLoaded;
    NSImage* imgRowBgChannel;
}

@property (nonatomic,weak) CCNode* node;
@property (nonatomic) BOOL drawHardLine;

@end


text:
using System;
using System.Collections;
using System.Data.SqlClient;
using System.Windows.Forms;
using BLToolkit.Data;
using DevExpress.Utils;
using DevExpress.Utils.Win;
using DevExpress.XtraBars.Forms;
using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraBars.Ribbon.Helpers;
using DevExpress.XtraEditors.Popup;
using bv.common.Resources;
using bv.winclient.BasePanel;
using bv.winclient.Core;
using bv.winclient.Layout;
using eidss.gis.Tools.ToolForms;
using eidss.model.Core;
using eidss.model.Core.Security;
using eidss.model.Resources;

namespace eidss.main.Autolock
{
    public partial class AutoLockForm
    {
        private bool m_AllowToClose;

        public void btOk_Click(Object sender, EventArgs e)
        {
            int res;
            //If (Me.tbConfPass.Text.Trim() <> EIDSSUser.Current.Password) Then
            try
            {
                var sm = new EidssSecurityManager();
                EidssUser user = EidssUserContext.User;
                res = sm.LogIn(user.Organization, user.LoginName, tbConfPass.Text);
            }
            catch (Exception ex)
            {
                string errMessage;
                if (SqlExceptionHandler.Handle(ex))
                    return;
                if (ex is SqlException)
                {
                    errMessage = SecurityMessages.GetDBErrorMessage(((SqlException)ex).Number, null, null);
                }
                else
                {
                    errMessage = SecurityMessages.GetDBErrorMessage(0, null, null);
                }
                ErrorForm.ShowErrorDirect(errMessage, ex);

                return;
            }

            if (res != 0 && res != 9)
            {
                ShowError(res);
            }
            else
            {
                UnlockProgram();
            }
        }

        public void AutoLockForm_Load(Object sender, EventArgs e)
        {
            PlaceCenterWindow();
            ShowWindows(false);
        }

        public void ShowError(int res)
        {
            string err = SecurityMessages.GetLoginErrorMessage(res);
            MessageForm.Show(err, BvMessages.Get("Warning"), MessageBoxButtons.OK);
            tbConfPass.Text = "";
            tbConfPass.Focus();
        }

        public void UnlockProgram()
        {
            ShowWindows(true);

            DialogResult = DialogResult.OK;

            m_AllowToClose = true;
            Close();
        }

        public void sbLogout_Click(Object sender, EventArgs e)
        {
            CloseAllWindows();
            DialogResult = DialogResult.Cancel;
            m_AllowToClose = true;
            Close();
        }

        public void ShowWindows(bool bShow)
        {
            var formList = new ArrayList(Application.OpenForms);

            foreach (Form frm in formList)
            {
                if (frm is PopupBaseForm
                    || frm is GalleryItemImagePopupForm
                    || frm is SuperToolTipWindow
                    || frm is ToolTipControllerWindow
                    || frm is AppMenuForm
                    || frm is SubMenuControlForm
                    || frm is KeyTipForm
                    // commented because of bugN 5600
                    //  || frm is DevExpress.XtraPivotGrid.Customization.CustomizationForm
                    || frm is InfoForm)
                {
                    if (frm.Visible)
                    {
                        frm.Hide();
                    }
                    continue;
                }

                frm.Visible = bShow;
            }
        }

        public void PlaceCenterWindow()
        {
            Left = (Screen.PrimaryScreen.Bounds.Width - Width) / 2;
            Top = (Screen.PrimaryScreen.Bounds.Height - Height) / 2;
        }

        public void CloseAllWindows()
        {
            //   Close all Detail forms first

            for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
            {
                Form frm = Application.OpenForms[i];
                if (frm == null)
                {
                    continue;
                }

                if (frm.Controls.Count == 0)
                {
                    continue;
                }

                IApplicationForm ctrl = BaseFormManager.FindChildIApplicationForm(frm);

                if (ctrl != null)
                {
                    BaseFormManager.Close(ctrl);
                }
            }
            Application.DoEvents();
            BaseFormManager.CloseAll(false);
            Application.DoEvents();
        }

        public void AutoLockForm_FormClosing(Object sender, FormClosingEventArgs e)
        {
            e.Cancel = Convert.ToBoolean(!m_AllowToClose);
        }

        public AutoLockForm()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            Icon = BaseFormManager.MainForm.Icon;
            LayoutCorrector.ApplySystemFont(this);
            lLockMessage.Text = String.Format(EidssMessages.Get("lLockMessage"), EidssUserContext.User.Name);
        }
    }
}


text:
import * as React from 'react';
import { IconBaseProps } from 'react-icon-base';
export default class IoAndroidFavorite extends React.Component<IconBaseProps, any> { }


text:
import BaseHelper from './-format-base';

export default BaseHelper.extend({
  format(value, options) {
    return this.intl.formatNumber(value, options);
  }
});


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Usnea steineri var. tincta Zahlbr.

### Remarks
null


text:
package home.api;

import org.springframework.beans.propertyeditors.StringArrayPropertyEditor;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class ServletInitializer extends AbstractAnnotationConfigDispatcherServletInitializer{

	@Override
	protected Class<?>[] getRootConfigClasses() {
		return new Class[] {WebConfig.class, JPAConfig.class,SwaggerConfig.class} ;
	}

	@Override
	protected Class<?>[] getServletConfigClasses() {
		return null;
	}

	@Override
	protected String[] getServletMappings() {
		return new String[] {"/api/*"};
	}

}


text:
package main

import (
	"io/ioutil"
	"os"
	"path/filepath"
	"testing"
)

const broadband = `###
### Delivered by puppet
###
# Defines the filter to be used for picking.
detecFilter = "FILTER"

# The time correction applied to a detected pick.
timeCorr = -0.15

# Defines whether or not the streams are picked or not
detecEnable = true
`

func TestAutoPick(t *testing.T) {

	picks := map[string]struct {
		pick    AutoPick
		content string
	}{
		"scautopick/profile_broadband": {
			pick: AutoPick{
				Style:      "broadband",
				Filter:     "FILTER",
				Correction: -0.15,
			},
			content: broadband,
		},
		"scautopick/profile_weak": {
			pick: AutoPick{
				Style:      "weak",
				Filter:     "FILTER",
				Correction: -0.15,
			},
			content: broadband,
		},
	}

	for k, p := range picks {
		t.Run("check "+k, func(t *testing.T) {
			d, err := ioutil.TempDir(os.TempDir(), "test")
			if err != nil {
				t.Fatal(err)
			}
			defer os.RemoveAll(d)

			if err := Store(p.pick, d); err != nil {
				t.Fatalf("unable to store key output %s: %v", k, err)
			}

			key, err := ioutil.ReadFile(filepath.Join(d, k))
			if err != nil {
				t.Fatalf("unable to read temp key file %s: %v", d, err)
			}
			if string(key) != p.content {
				t.Errorf("contents mismatch %s", k)
			}
		})
	}
}


text:
package org.broadinstitute.hellbender.tools.walkers.annotator;

import com.google.common.annotations.VisibleForTesting;
import htsjdk.variant.variantcontext.Allele;
import htsjdk.variant.variantcontext.Genotype;
import htsjdk.variant.variantcontext.GenotypesContext;
import htsjdk.variant.variantcontext.VariantContext;
import htsjdk.variant.vcf.VCFInfoHeaderLine;
import org.broadinstitute.barclay.help.DocumentedFeature;
import org.broadinstitute.hellbender.engine.ReferenceContext;
import org.broadinstitute.hellbender.utils.MathUtils;
import org.broadinstitute.hellbender.utils.Utils;
import org.broadinstitute.hellbender.utils.genotyper.ReadLikelihoods;
import org.broadinstitute.hellbender.utils.help.HelpConstants;
import org.broadinstitute.hellbender.utils.variant.GATKVCFConstants;
import org.broadinstitute.hellbender.utils.variant.GATKVCFHeaderLines;

import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * Variant confidence normalized by unfiltered depth of variant samples
 *
 *
This annotation puts the variant confidence QUAL score into perspective by normalizing for the amount of coverage available. Because each read contributes a little to the QUAL score, variants in regions with deep coverage can have artificially inflated QUAL scores, giving the impression that the call is supported by more evidence than it really is. To compensate for this, we normalize the variant confidence by depth, which gives us a more objective picture of how well supported the call is.

 *
 *
Statistical notes

 *
The QD is the QUAL score normalized by allele depth (AD) for a variant. For a single sample, the HaplotypeCaller calculates the QD by taking QUAL/AD. For multiple samples, HaplotypeCaller and GenotypeGVCFs calculate the QD by taking QUAL/AD of samples with a non hom-ref genotype call. The reason we leave out the samples with a hom-ref call is to not penalize the QUAL for the other samples with the variant call.

 *
Here is a single sample example:

 *
2	37629	.	C	G	1063.77	.	AC=2;AF=1.00;AN=2;DP=31;FS=0.000;MLEAC=2;MLEAF=1.00;MQ=58.50;QD=34.32;SOR=2.376	GT:AD:DP:GQ:PL:QSS	1/1:0,31:31:93:1092,93,0:0,960

QUAL/AD = 1063.77/31 = 34.32 = QD

 *
Here is a multi-sample example:

 *
10	8046	.	C	T	4107.13	.	AC=1;AF=0.167;AN=6;BaseQRankSum=-3.717;DP=1063;FS=1.616;MLEAC=1;MLEAF=0.167;QD=11.54
   GT:AD:DP:GQ:PL:QSS	0/0:369,4:373:99:0,1007,12207:10548,98	    0/0:331,1:332:99:0,967,11125:9576,27	    0/1:192,164:356:99:4138,0,5291:5501,4505

 *
QUAL/AD = 4107.13/356 = 11.54 = QD

 *
 *
Caveat

 *
This annotation can only be calculated for sites for which at least one sample was genotyped as carrying a variant allele.

 *
 *
Related annotations

 *

 *
Coverage gives the filtered depth of coverage for each sample and the unfiltered depth across all samples.

 *
DepthPerAlleleBySample calculates depth of coverage for each allele per sample (AD).

 *

 */
@DocumentedFeature(groupName=HelpConstants.DOC_CAT_ANNOTATORS, groupSummary=HelpConstants.DOC_CAT_ANNOTATORS_SUMMARY, summary="Variant confidence normalized by unfiltered depth of variant samples (QD)")
public final class QualByDepth extends InfoFieldAnnotation implements StandardAnnotation {

    @VisibleForTesting
    static final double MAX_QD_BEFORE_FIXING = 35;

    @VisibleForTesting
    static final double IDEAL_HIGH_QD = 30;
    private static final double JITTER_SIGMA = 3;

    @Override
    public Map<String, Object> annotate(final ReferenceContext ref,
                                        final VariantContext vc,
                                        final ReadLikelihoods<Allele> likelihoods) {
        Utils.nonNull(vc);
        if ( !vc.hasLog10PError() ) {
            return Collections.emptyMap();
        }

        final GenotypesContext genotypes = vc.getGenotypes();
        if ( genotypes == null || genotypes.isEmpty() ) {
            return Collections.emptyMap();
        }

        int depth = 0;
        int ADrestrictedDepth = 0;

        for ( final Genotype genotype : genotypes ) {
            // we care only about variant calls with likelihoods
            if ( !genotype.isHet() && !genotype.isHomVar() ) {
                continue;
            }

            // if we have the AD values for this sample, let's make sure that the variant depth is greater than 1!
            if ( genotype.hasAD() ) {
                final int[] AD = genotype.getAD();
                final int totalADdepth = (int) MathUtils.sum(AD);
                if ( totalADdepth != 0 ) {
                    if (totalADdepth - AD[0] > 1) {
                        ADrestrictedDepth += totalADdepth;
                    }
                    depth += totalADdepth;
                    continue;
                }
            }
            // if there is no AD value or it is a dummy value, we want to look to other means to get the depth
            if (likelihoods != null) {
                depth += likelihoods.sampleReadCount(likelihoods.indexOfSample(genotype.getSampleName()));
            } else if ( genotype.hasDP() ) {
                depth += genotype.getDP();
            }
        }

        // if the AD-restricted depth is a usable value (i.e. not zero), then we should use that one going forward
        if ( ADrestrictedDepth > 0 ) {
            depth = ADrestrictedDepth;
        }

        if ( depth == 0 ) {
            return Collections.emptyMap();
        }

        final double qual = -10.0 * vc.getLog10PError();
        double QD = qual / depth;

        // Hack: see note in the fixTooHighQD method below
        QD = fixTooHighQD(QD);

        return Collections.singletonMap(getKeyNames().get(0), String.format("%.2f", QD));
    }

    /**
     * The haplotype caller generates very high quality scores when multiple events are on the
     * same haplotype.  This causes some very good variants to have unusually high QD values,
     * and VQSR will filter these out.  This code looks at the QD value, and if it is above
     * threshold we map it down to the mean high QD value, with some jittering
     *
     * @param QD the raw QD score
     * @return a QD value
     */
    public static double fixTooHighQD(final double QD) {
        if ( QD < MAX_QD_BEFORE_FIXING ) {
            return QD;
        } else {
            return IDEAL_HIGH_QD + Utils.getRandomGenerator().nextGaussian() * JITTER_SIGMA;
        }
    }

    @Override
    public List<String> getKeyNames() { return Collections.singletonList(GATKVCFConstants.QUAL_BY_DEPTH_KEY); }
}


text:
package client

import (
	"context"
	"fmt"
	"reflect"

	"k8s.io/apimachinery/pkg/api/meta"
	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/apimachinery/pkg/runtime/serializer"
	"k8s.io/client-go/dynamic"
	"k8s.io/client-go/kubernetes/scheme"
	"k8s.io/client-go/rest"
	"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
)

// Options are creation options for a Client
type Options struct {
	// Scheme, if provided, will be used to map go structs to GroupVersionKinds
	Scheme *runtime.Scheme

	// Mapper, if provided, will be used to map GroupVersionKinds to Resources
	Mapper meta.RESTMapper
}

// New returns a new Client using the provided config and Options.
// The returned client reads *and* writes directly from the server
// (it doesn't use object caches).  It understands how to work with
// normal types (both custom resources and aggregated/built-in resources),
// as well as unstructured types.
//
// In the case of normal types, the scheme will be used to look up the
// corresponding group, version, and kind for the given type.  In the
// case of unstructured types, the group, version, and kind will be extracted
// from the corresponding fields on the object.
func New(config *rest.Config, options Options) (Client, error) {
	if config == nil {
		return nil, fmt.Errorf("must provide non-nil rest.Config to client.New")
	}

	// Init a scheme if none provided
	if options.Scheme == nil {
		options.Scheme = scheme.Scheme
	}

	// Init a Mapper if none provided
	if options.Mapper == nil {
		var err error
		options.Mapper, err = apiutil.NewDiscoveryRESTMapper(config)
		if err != nil {
			return nil, err
		}
	}

	dynamicClient, err := dynamic.NewForConfig(config)
	if err != nil {
		return nil, err
	}

	c := &client{
		typedClient: typedClient{
			cache: clientCache{
				config:         config,
				scheme:         options.Scheme,
				mapper:         options.Mapper,
				codecs:         serializer.NewCodecFactory(options.Scheme),
				resourceByType: make(map[reflect.Type]*resourceMeta),
			},
			paramCodec: runtime.NewParameterCodec(options.Scheme),
		},
		unstructuredClient: unstructuredClient{
			client:     dynamicClient,
			restMapper: options.Mapper,
		},
	}

	return c, nil
}

var _ Client = &client{}

// client is a client.Client that reads and writes directly from/to an API server.  It lazily initializes
// new clients at the time they are used, and caches the client.
type client struct {
	typedClient        typedClient
	unstructuredClient unstructuredClient
}

// resetGroupVersionKind is a helper function to restore and preserve GroupVersionKind on an object.
// TODO(vincepri): Remove this function and its calls once    controller-runtime dependencies are upgraded to 1.15.
func (c *client) resetGroupVersionKind(obj runtime.Object, gvk schema.GroupVersionKind) {
	if gvk != schema.EmptyObjectKind.GroupVersionKind() {
		if v, ok := obj.(schema.ObjectKind); ok {
			v.SetGroupVersionKind(gvk)
		}
	}
}

// Create implements client.Client
func (c *client) Create(ctx context.Context, obj runtime.Object, opts ...CreateOption) error {
	_, ok := obj.(*unstructured.Unstructured)
	if ok {
		return c.unstructuredClient.Create(ctx, obj, opts...)
	}
	return c.typedClient.Create(ctx, obj, opts...)
}

// Update implements client.Client
func (c *client) Update(ctx context.Context, obj runtime.Object, opts ...UpdateOption) error {
	defer c.resetGroupVersionKind(obj, obj.GetObjectKind().GroupVersionKind())
	_, ok := obj.(*unstructured.Unstructured)
	if ok {
		return c.unstructuredClient.Update(ctx, obj, opts...)
	}
	return c.typedClient.Update(ctx, obj, opts...)
}

// Delete implements client.Client
func (c *client) Delete(ctx context.Context, obj runtime.Object, opts ...DeleteOption) error {
	_, ok := obj.(*unstructured.Unstructured)
	if ok {
		return c.unstructuredClient.Delete(ctx, obj, opts...)
	}
	return c.typedClient.Delete(ctx, obj, opts...)
}

// DeleteAllOf implements client.Client
func (c *client) DeleteAllOf(ctx context.Context, obj runtime.Object, opts ...DeleteAllOfOption) error {
	_, ok := obj.(*unstructured.Unstructured)
	if ok {
		return c.unstructuredClient.DeleteAllOf(ctx, obj, opts...)
	}
	return c.typedClient.DeleteAllOf(ctx, obj, opts...)
}

// Patch implements client.Client
func (c *client) Patch(ctx context.Context, obj runtime.Object, patch Patch, opts ...PatchOption) error {
	defer c.resetGroupVersionKind(obj, obj.GetObjectKind().GroupVersionKind())
	_, ok := obj.(*unstructured.Unstructured)
	if ok {
		return c.unstructuredClient.Patch(ctx, obj, patch, opts...)
	}
	return c.typedClient.Patch(ctx, obj, patch, opts...)
}

// Get implements client.Client
func (c *client) Get(ctx context.Context, key ObjectKey, obj runtime.Object) error {
	_, ok := obj.(*unstructured.Unstructured)
	if ok {
		return c.unstructuredClient.Get(ctx, key, obj)
	}
	return c.typedClient.Get(ctx, key, obj)
}

// List implements client.Client
func (c *client) List(ctx context.Context, obj runtime.Object, opts ...ListOption) error {
	_, ok := obj.(*unstructured.UnstructuredList)
	if ok {
		return c.unstructuredClient.List(ctx, obj, opts...)
	}
	return c.typedClient.List(ctx, obj, opts...)
}

// Status implements client.StatusClient
func (c *client) Status() StatusWriter {
	return &statusWriter{client: c}
}

// statusWriter is client.StatusWriter that writes status subresource
type statusWriter struct {
	client *client
}

// ensure statusWriter implements client.StatusWriter
var _ StatusWriter = &statusWriter{}

// Update implements client.StatusWriter
func (sw *statusWriter) Update(ctx context.Context, obj runtime.Object, opts ...UpdateOption) error {
	defer sw.client.resetGroupVersionKind(obj, obj.GetObjectKind().GroupVersionKind())
	_, ok := obj.(*unstructured.Unstructured)
	if ok {
		return sw.client.unstructuredClient.UpdateStatus(ctx, obj, opts...)
	}
	return sw.client.typedClient.UpdateStatus(ctx, obj, opts...)
}

// Patch implements client.Client
func (sw *statusWriter) Patch(ctx context.Context, obj runtime.Object, patch Patch, opts ...PatchOption) error {
	defer sw.client.resetGroupVersionKind(obj, obj.GetObjectKind().GroupVersionKind())
	_, ok := obj.(*unstructured.Unstructured)
	if ok {
		return sw.client.unstructuredClient.PatchStatus(ctx, obj, patch, opts...)
	}
	return sw.client.typedClient.PatchStatus(ctx, obj, patch, opts...)
}


text:
---
uid: SolidEdgeAssembly.Paths
summary:
remarks:
example: [*content]
---
[!code-vb[Main](..\snippets\SolidEdgeAssembly.Paths.vb]
[!code-csharp[Main](..\snippets\SolidEdgeAssembly.Paths.cs]


text:
package im.AfriChat.core.modules.internal.messages;

import java.util.ArrayList;
import java.util.List;

import im.AfriChat.core.entity.Avatar;
import im.AfriChat.core.entity.ContentDescription;
import im.AfriChat.core.entity.ContentType;
import im.AfriChat.core.entity.Dialog;
import im.AfriChat.core.entity.DialogBuilder;
import im.AfriChat.core.entity.Group;
import im.AfriChat.core.entity.Message;
import im.AfriChat.core.entity.MessageState;
import im.AfriChat.core.entity.Peer;
import im.AfriChat.core.entity.User;
import im.AfriChat.core.entity.content.AbsContent;
import im.AfriChat.core.modules.ModuleContext;
import im.AfriChat.core.modules.internal.messages.entity.DialogHistory;
import im.AfriChat.core.modules.utils.ModuleActor;
import im.AfriChat.runtime.Log;
import im.AfriChat.runtime.Runtime;
import im.AfriChat.runtime.annotations.Verified;
import im.AfriChat.runtime.storage.ListEngine;

import static im.AfriChat.core.util.JavaUtil.equalsE;

public class DialogsActor extends ModuleActor {

    private ListEngine<Dialog> dialogs;
    private Boolean isEmpty;
    private Boolean emptyNotified;

    public DialogsActor(ModuleContext context) {
        super(context);
    }

    @Override
    public void preStart() {
        super.preStart();
        this.dialogs = context().getMessagesModule().getDialogsEngine();
        notifyState(true);
    }

    @Verified
    private void onMessage(Peer peer, Message message, boolean forceWrite, int counter) {
        long start = im.AfriChat.runtime.Runtime.getCurrentTime();
        PeerDesc peerDesc = buildPeerDesc(peer);
        if (peerDesc == null) {
            Log.d("DialogsActor", "unknown peer desk");
            return;
        }

        if (message == null) {
            // Ignore empty message if not forcing write
            if (!forceWrite) {
                Log.d("DialogsActor", "not force");
                return;
            }

            // Else perform chat clear
            onChatClear(peer);
        } else {
            Dialog dialog = dialogs.getValue(peer.getUnuqueId());

            ContentDescription contentDescription = ContentDescription.fromContent(message.getContent());

            DialogBuilder builder = new DialogBuilder()
                    .setRid(message.getRid())
                    .setTime(message.getDate())
                    .setMessageType(contentDescription.getContentType())
                    .setText(contentDescription.getText())
                    .setRelatedUid(contentDescription.getRelatedUser())
                    .setStatus(message.getMessageState())
                    .setSenderId(message.getSenderId())
                    .setUnreadCount(counter);

            boolean forceUpdate = false;

            if (dialog != null) {
                // Ignore old messages if no force
                if (!forceWrite && dialog.getSortDate() > message.getSortDate()) {
                    Log.d("DialogsActor", "too old");
                    return;
                }

                builder.setPeer(dialog.getPeer())
                        .setDialogTitle(dialog.getDialogTitle())
                        .setDialogAvatar(dialog.getDialogAvatar())
                        .setSortKey(dialog.getSortDate());

                // Do not push up dialogs for silent messages
                if (!contentDescription.isSilent()) {
                    builder.setSortKey(message.getSortDate());
                }

            } else {
                // Do not create dialogs for silent messages
                if (contentDescription.isSilent()) {
                    Log.d("DialogsActor", "is silent in");
                    return;
                }

                builder.setPeer(peer)
                        .setDialogTitle(peerDesc.getTitle())
                        .setDialogAvatar(peerDesc.getAvatar())
                        .setSortKey(message.getSortDate());

                forceUpdate = true;
            }

            addOrUpdateItem(builder.createDialog());
            notifyState(forceUpdate);
        }

        Log.d("DialogsActor", "onMessage in " + (Runtime.getCurrentTime() - start) + " ms");
    }

    @Verified
    private void onUserChanged(User user) {
        Dialog dialog = dialogs.getValue(user.peer().getUnuqueId());
        if (dialog != null) {
            // Ignore if nothing changed
            if (dialog.getDialogTitle().equals(user.getName())
                    && equalsE(dialog.getDialogAvatar(), user.getAvatar())) {
                return;
            }

            // Update dialog peer info
            Dialog updated = dialog.editPeerInfo(user.getName(), user.getAvatar());
            addOrUpdateItem(updated);
            updateSearch(updated);
        }
    }

    @Verified
    private void onGroupChanged(Group group) {
        Dialog dialog = dialogs.getValue(group.peer().getUnuqueId());
        if (dialog != null) {
            // Ignore if nothing changed
            if (dialog.getDialogTitle().equals(group.getTitle())
                    && equalsE(dialog.getDialogAvatar(), group.getAvatar())) {
                return;
            }

            // Update dialog peer info
            Dialog updated = dialog.editPeerInfo(group.getTitle(), group.getAvatar());
            addOrUpdateItem(updated);
            updateSearch(updated);
        }
    }

    @Verified
    private void onChatDeleted(Peer peer) {
        // Removing dialog
        dialogs.removeItem(peer.getUnuqueId());

        notifyState(true);
    }

    @Verified
    private void onChatClear(Peer peer) {
        Dialog dialog = dialogs.getValue(peer.getUnuqueId());

        // If we have dialog for this peer
        if (dialog != null) {

            // Update dialog
            addOrUpdateItem(new DialogBuilder(dialog)
                    .setMessageType(ContentType.EMPTY)
                    .setText("")
                    .setTime(0)
                    .setUnreadCount(0)
                    .setRid(0)
                    .setSenderId(0)
                    .setStatus(MessageState.UNKNOWN)
                    .createDialog());
        }
    }

    @Verified
    private void onMessageStatusChanged(Peer peer, long rid, MessageState state) {
        Dialog dialog = dialogs.getValue(peer.getUnuqueId());

        // If message is on top
        if (dialog != null && dialog.getRid() == rid) {

            // Update dialog
            addOrUpdateItem(new DialogBuilder(dialog)
                    .setStatus(state)
                    .createDialog());
        }
    }

    @Verified
    private void onMessageContentChanged(Peer peer, long rid, AbsContent content) {
        Dialog dialog = dialogs.getValue(peer.getUnuqueId());

        // If message is on top
        if (dialog != null && dialog.getRid() == rid) {

            // Update dialog
            ContentDescription description = ContentDescription.fromContent(content);
            addOrUpdateItem(new DialogBuilder(dialog)
                    .setText(description.getText())
                    .setRelatedUid(description.getRelatedUser())
                    .setMessageType(description.getContentType())
                    .createDialog());
        }
    }

    @Verified
    private void onCounterChanged(Peer peer, int count) {
        Dialog dialog = dialogs.getValue(peer.getUnuqueId());

        // If we have dialog for this peer
        if (dialog != null) {

            // Counter not actually changed
            if (dialog.getUnreadCount() == count) {
                return;
            }

            // Update dialog
            addOrUpdateItem(new DialogBuilder(dialog)
                    .setUnreadCount(count)
                    .createDialog());
        }
    }

    @Verified
    private void onHistoryLoaded(List<DialogHistory> history) {
        ArrayList<Dialog> updated = new ArrayList<Dialog>();
        for (DialogHistory dialogHistory : history) {
            // Ignore already available dialogs
            if (dialogs.getValue(dialogHistory.getPeer().getUnuqueId()) != null) {
                continue;
            }

            PeerDesc peerDesc = buildPeerDesc(dialogHistory.getPeer());
            if (peerDesc == null) {
                continue;
            }

            ContentDescription description = ContentDescription.fromContent(dialogHistory.getContent());

            updated.add(new Dialog(dialogHistory.getPeer(),
                    dialogHistory.getSortDate(), peerDesc.getTitle(), peerDesc.getAvatar(),
                    dialogHistory.getUnreadCount(),
                    dialogHistory.getRid(), description.getContentType(), description.getText(), dialogHistory.getStatus(),
                    dialogHistory.getSenderId(), dialogHistory.getDate(), description.getRelatedUser()));
        }
        addOrUpdateItems(updated);
        updateSearch(updated);
        context().getAppStateModule().onDialogsLoaded();
        notifyState(true);
    }

    // Utils

    private void addOrUpdateItems(List<Dialog> updated) {
        dialogs.addOrUpdateItems(updated);
    }

    private void addOrUpdateItem(Dialog dialog) {
        dialogs.addOrUpdateItem(dialog);
    }

    private void updateSearch(Dialog dialog) {
        ArrayList<Dialog> d = new ArrayList<Dialog>();
        d.add(dialog);
        context().getSearchModule().onDialogsChanged(d);
    }

    private void updateSearch(List<Dialog> updated) {
        context().getSearchModule().onDialogsChanged(updated);
    }

    private void notifyState(boolean force) {
        if (isEmpty == null || force) {
            isEmpty = this.dialogs.isEmpty();
        }

        if (!isEmpty.equals(emptyNotified)) {
            emptyNotified = isEmpty;
            context().getAppStateModule().onDialogsUpdate(isEmpty);
        }
    }

    @Verified
    private PeerDesc buildPeerDesc(Peer peer) {
        switch (peer.getPeerType()) {
            case PRIVATE:
                User u = getUser(peer.getPeerId());
                return new PeerDesc(u.getName(), u.getAvatar());
            case GROUP:
                Group g = getGroup(peer.getPeerId());
                return new PeerDesc(g.getTitle(), g.getAvatar());
            default:
                return null;
        }
    }

    private class PeerDesc {

        private String title;
        private Avatar avatar;

        private PeerDesc(String title, Avatar avatar) {
            this.title = title;
            this.avatar = avatar;
        }

        public String getTitle() {
            return title;
        }

        public Avatar getAvatar() {
            return avatar;
        }
    }

    // Messages

    @Override
    public void onReceive(Object message) {
        if (message instanceof InMessage) {
            InMessage inMessage = (InMessage) message;
            onMessage(inMessage.getPeer(), inMessage.getMessage(), false, inMessage.getCounter());
        } else if (message instanceof UserChanged) {
            UserChanged userChanged = (UserChanged) message;
            onUserChanged(userChanged.getUser());
        } else if (message instanceof ChatClear) {
            onChatClear(((ChatClear) message).getPeer());
        } else if (message instanceof ChatDelete) {
            onChatDeleted(((ChatDelete) message).getPeer());
        } else if (message instanceof MessageStateChanged) {
            MessageStateChanged messageStateChanged = (MessageStateChanged) message;
            onMessageStatusChanged(messageStateChanged.getPeer(), messageStateChanged.getRid(),
                    messageStateChanged.getState());
        } else if (message instanceof MessageDeleted) {
            MessageDeleted deleted = (MessageDeleted) message;
            onMessage(deleted.getPeer(), deleted.getTopMessage(), true, -1);
        } else if (message instanceof HistoryLoaded) {
            HistoryLoaded historyLoaded = (HistoryLoaded) message;
            onHistoryLoaded(historyLoaded.getHistory());
        } else if (message instanceof GroupChanged) {
            GroupChanged groupChanged = (GroupChanged) message;
            onGroupChanged(groupChanged.getGroup());
        } else if (message instanceof MessageContentChanged) {
            MessageContentChanged contentChanged = (MessageContentChanged) message;
            onMessageContentChanged(contentChanged.getPeer(), contentChanged.getRid(),
                    contentChanged.getContent());
        } else if (message instanceof CounterChanged) {
            CounterChanged counterChanged = (CounterChanged) message;
            onCounterChanged(counterChanged.getPeer(), counterChanged.getCounter());
        } else {
            drop(message);
        }
    }

    public static class InMessage {
        private Peer peer;
        private Message message;
        private int counter;

        public InMessage(Peer peer, Message message, int counter) {
            this.peer = peer;
            this.message = message;
            this.counter = counter;
        }

        public Peer getPeer() {
            return peer;
        }

        public Message getMessage() {
            return message;
        }

        public int getCounter() {
            return counter;
        }
    }

    public static class CounterChanged {
        private Peer peer;
        private int counter;

        public CounterChanged(Peer peer, int counter) {
            this.peer = peer;
            this.counter = counter;
        }

        public Peer getPeer() {
            return peer;
        }

        public int getCounter() {
            return counter;
        }
    }

    public static class UserChanged {
        private User user;

        public UserChanged(User user) {
            this.user = user;
        }

        public User getUser() {
            return user;
        }
    }

    public static class GroupChanged {
        private Group group;

        public GroupChanged(Group group) {
            this.group = group;
        }

        public Group getGroup() {
            return group;
        }
    }

    public static class ChatClear {
        private Peer peer;

        public ChatClear(Peer peer) {
            this.peer = peer;
        }

        public Peer getPeer() {
            return peer;
        }
    }

    public static class ChatDelete {
        private Peer peer;

        public ChatDelete(Peer peer) {
            this.peer = peer;
        }

        public Peer getPeer() {
            return peer;
        }
    }

    public static class MessageStateChanged {
        private Peer peer;
        private long rid;
        private MessageState state;

        public MessageStateChanged(Peer peer, long rid, MessageState state) {
            this.peer = peer;
            this.rid = rid;
            this.state = state;
        }

        public Peer getPeer() {
            return peer;
        }

        public long getRid() {
            return rid;
        }

        public MessageState getState() {
            return state;
        }
    }

    public static class MessageContentChanged {
        private Peer peer;
        private long rid;
        private AbsContent content;

        public MessageContentChanged(Peer peer, long rid, AbsContent content) {
            this.peer = peer;
            this.rid = rid;
            this.content = content;
        }

        public Peer getPeer() {
            return peer;
        }

        public long getRid() {
            return rid;
        }

        public AbsContent getContent() {
            return content;
        }
    }

    public static class MessageDeleted {
        private Peer peer;
        private Message topMessage;

        public MessageDeleted(Peer peer, Message topMessage) {
            this.peer = peer;
            this.topMessage = topMessage;
        }

        public Peer getPeer() {
            return peer;
        }

        public Message getTopMessage() {
            return topMessage;
        }
    }

    public static class HistoryLoaded {
        private List<DialogHistory> history;

        public HistoryLoaded(List<DialogHistory> history) {
            this.history = history;
        }

        public List<DialogHistory> getHistory() {
            return history;
        }
    }
}


text:
package org.tbax.baxshops.internal.serialization;

import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.jetbrains.annotations.NotNull;
import org.tbax.baxshops.serialization.SafeMap;
import org.tbax.baxshops.serialization.SerializationException;

import java.util.Map;

public interface UpgradeableSerializable extends ConfigurationSerializable
{
    @Deprecated
    default void upgrade00300(@NotNull SafeMap map)
    {
        SerializationException.throwVersionException();
    }

    @Deprecated
    default void upgrade00400(@NotNull SafeMap map)
    {
        upgrade00300(map);
    }

    @Deprecated
    default void upgrade00410(@NotNull SafeMap map)
    {
        upgrade00400(map);
    }

    @Deprecated
    default void upgrade00411(@NotNull SafeMap map)
    {
        upgrade00410(map);
    }

    @Deprecated
    default void upgrade00420(@NotNull SafeMap map)
    {
        upgrade00411(map);
    }

    @Deprecated
    default void upgrade00421(@NotNull SafeMap map)
    {
        UpgradeableSerialization.deserialize(this, map);
    }

    @Deprecated
    default void upgrade00422(@NotNull SafeMap map)
    {
        UpgradeableSerialization.deserialize(this, map);
    }

    @Deprecated
    default void upgrade00450(@NotNull SafeMap map)
    {
        UpgradeableSerialization.deserialize(this, map);
    }

    @Deprecated
    default void upgrade00451(@NotNull SafeMap map)
    {
        UpgradeableSerialization.deserialize(this, map);
    }

    @Deprecated
    default void upgrade00452(@NotNull SafeMap map)
    {
        UpgradeableSerialization.deserialize(this, map);
    }

    @Deprecated
    default void upgrade00460(@NotNull SafeMap map)
    {
        UpgradeableSerialization.deserialize(this, map);
    }

    @Deprecated
    default void upgrade00470(@NotNull SafeMap map)
    {
        UpgradeableSerialization.deserialize(this, map);
    }

    @Deprecated
    default void upgrade00480(@NotNull SafeMap map)
    {
        UpgradeableSerialization.deserialize(this, map);
    }

    default void upgrade00481(@NotNull SafeMap map)
    {
        UpgradeableSerialization.deserialize(this, map);
    }

    @Override
    default @NotNull Map<String, Object> serialize()
    {
        return UpgradeableSerialization.serialize(this);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESRI.ArcGIS.Client;
using ESRI.ArcGIS.Client.Geometry;
using ESRI.ArcGIS.Client.Symbols;
using System.Windows.Controls;

namespace ESRI.ArcLogistics.App.Symbols
{
    /// <summary>
    /// ZoneSymbol class
    /// </summary>
    class ZoneSymbol: TemplateMarkerSymbol
    {
        public ZoneSymbol()
        {
            ControlTemplate = _template;
        }

        static ControlTemplate _template = _LoadTemplateFromResource("ESRI.ArcLogistics.App.Symbols.ZoneSymbol.xaml");
    }
}


text:
package org.apache.cassandra.io.util;

import java.io.File;

import org.apache.cassandra.io.sstable.Descriptor;

public class ChecksummedSequentialWriter extends SequentialWriter
{
    private final SequentialWriter crcWriter;
    private final DataIntegrityMetadata.ChecksumWriter crcMetadata;

    public ChecksummedSequentialWriter(File file, int bufferSize, File crcPath)
    {
        super(file, bufferSize);
        crcWriter = new SequentialWriter(crcPath, 8 * 1024);
        crcMetadata = new DataIntegrityMetadata.ChecksumWriter(crcWriter.stream);
        crcMetadata.writeChunkSize(buffer.length);
    }

    protected void flushData()
    {
        super.flushData();
        crcMetadata.append(buffer, 0, validBufferBytes);
    }

    public void writeFullChecksum(Descriptor descriptor)
    {
        crcMetadata.writeFullChecksum(descriptor);
    }

    public void close()
    {
        super.close();
        crcWriter.close();
    }
}


text:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.selectspecs.eyeshealth" version="0.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
    <preference name="loglevel" value="DEBUG" />
    <feature name="Battery">
        <param name="android-package" value="org.apache.cordova.batterystatus.BatteryListener" />
    </feature>
    <feature name="Camera">
        <param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
    </feature>
    <feature name="File">
        <param name="android-package" value="org.apache.cordova.file.FileUtils" />
        <param name="onload" value="true" />
    </feature>
    <feature name="Capture">
        <param name="android-package" value="org.apache.cordova.mediacapture.Capture" />
    </feature>
    <feature name="Contacts">
        <param name="android-package" value="org.apache.cordova.contacts.ContactManager" />
    </feature>
    <feature name="Device">
        <param name="android-package" value="org.apache.cordova.device.Device" />
    </feature>
    <feature name="Accelerometer">
        <param name="android-package" value="org.apache.cordova.devicemotion.AccelListener" />
    </feature>
    <feature name="Compass">
        <param name="android-package" value="org.apache.cordova.deviceorientation.CompassListener" />
    </feature>
    <feature name="Notification">
        <param name="android-package" value="org.apache.cordova.dialogs.Notification" />
    </feature>
    <feature name="FileTransfer">
        <param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" />
    </feature>
    <feature name="Geolocation">
        <param name="android-package" value="org.apache.cordova.geolocation.Geolocation" />
    </feature>
    <feature name="Globalization">
        <param name="android-package" value="org.apache.cordova.globalization.Globalization" />
    </feature>
    <feature name="InAppBrowser">
        <param name="android-package" value="org.apache.cordova.inappbrowser.InAppBrowser" />
    </feature>
    <feature name="Media">
        <param name="android-package" value="org.apache.cordova.media.AudioHandler" />
    </feature>
    <feature name="NetworkStatus">
        <param name="android-package" value="org.apache.cordova.networkinformation.NetworkManager" />
    </feature>
    <feature name="SplashScreen">
        <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" />
        <param name="onload" value="true" />
    </feature>
    <feature name="StatusBar">
        <param name="android-package" value="org.apache.cordova.statusbar.StatusBar" />
        <param name="onload" value="true" />
    </feature>
    <feature name="Vibration">
        <param name="android-package" value="org.apache.cordova.vibration.Vibration" />
    </feature>
    <feature name="Whitelist">
        <param name="android-package" value="org.apache.cordova.whitelist.WhitelistPlugin" />
        <param name="onload" value="true" />
    </feature>
    <icon density="ldpi" src="www/res/icon/android/drawable-ldpi-icon.png" />
    <icon density="mdpi" src="www/res/icon/android/drawable-mdpi-icon.png" />
    <icon density="hdpi" src="www/res/icon/android/drawable-hdpi-icon.png" />
    <icon density="xhdpi" src="www/res/icon/android/drawable-xhdpi-icon.png" />
    <icon density="xxhdpi" src="www/res/icon/android/drawable-xxhdpi-icon.png" />
    <icon density="xxxhdpi" src="www/res/icon/android/drawable-xxxhdpi-icon.png" />
    <splash density="land-ldpi" src="www/res/screen/android/drawable-land-ldpi-screen.png" />
    <splash density="land-mdpi" src="www/res/screen/android/drawable-land-mdpi-screen.png" />
    <splash density="land-hdpi" src="www/res/screen/android/drawable-land-hdpi-screen.png" />
    <splash density="land-xhdpi" src="www/res/screen/android/drawable-land-xhdpi-screen.png" />
    <splash density="land-xxhdpi" src="www/res/screen/android/drawable-land-xxhdpi-screen.png" />
    <splash density="land-xxxhdpi" src="www/res/screen/android/drawable-land-xxxhdpi-screen.png" />
    <splash density="port-ldpi" src="www/res/screen/android/drawable-port-ldpi-screen.png" />
    <splash density="port-mdpi" src="www/res/screen/android/drawable-port-mdpi-screen.png" />
    <splash density="port-hdpi" src="www/res/screen/android/drawable-port-hdpi-screen.png" />
    <splash density="port-xhdpi" src="www/res/screen/android/drawable-port-xhdpi-screen.png" />
    <splash density="port-xxhdpi" src="www/res/screen/android/drawable-port-xxhdpi-screen.png" />
    <splash density="port-xxxhdpi" src="www/res/screen/android/drawable-port-xxxhdpi-screen.png" />
    <allow-intent href="market:*" />
    <name>Eyes Health</name>
    <description>
        Eyes Health application for mobile devices, what helps your eyes be more healthly.
    </description>
    <author email="mlpitelik@gmail.com" href="http://selectspecs.com">
        Maxim Yudin
    </author>
    <content src="index.html" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="14" />
    <icon src="icon.png" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
</widget>


text:
/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */

#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>

#include "vtkUnstructuredGridVolumeMapperWrap.h"
#include "vtkProjectedTetrahedraMapperWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkVisibilitySortWrap.h"
#include "vtkDataArrayWrap.h"
#include "vtkVolumePropertyWrap.h"
#include "vtkPointsWrap.h"
#include "vtkFloatArrayWrap.h"
#include "vtkRenderWindowWrap.h"
#include "../../plus/plus.h"

using namespace v8;

extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap;
Nan::Persistent<v8::FunctionTemplate> VtkProjectedTetrahedraMapperWrap::ptpl;

VtkProjectedTetrahedraMapperWrap::VtkProjectedTetrahedraMapperWrap()
{ }

VtkProjectedTetrahedraMapperWrap::VtkProjectedTetrahedraMapperWrap(vtkSmartPointer<vtkProjectedTetrahedraMapper> _native)
{ native = _native; }

VtkProjectedTetrahedraMapperWrap::~VtkProjectedTetrahedraMapperWrap()
{ }

void VtkProjectedTetrahedraMapperWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkProjectedTetrahedraMapper").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("ProjectedTetrahedraMapper").ToLocalChecked(), ConstructorGetter);
}

void VtkProjectedTetrahedraMapperWrap::ConstructorGetter(
	v8::Local<v8::String> property,
	const Nan::PropertyCallbackInfo<v8::Value>& info)
{
	InitPtpl();
	info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction());
}

void VtkProjectedTetrahedraMapperWrap::InitPtpl()
{
	if (!ptpl.IsEmpty()) return;
	v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
	VtkUnstructuredGridVolumeMapperWrap::InitPtpl( );
	tpl->Inherit(Nan::New<FunctionTemplate>(VtkUnstructuredGridVolumeMapperWrap::ptpl));
	tpl->SetClassName(Nan::New("VtkProjectedTetrahedraMapperWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

	Nan::SetPrototypeMethod(tpl, "GetVisibilitySort", GetVisibilitySort);
	Nan::SetPrototypeMethod(tpl, "getVisibilitySort", GetVisibilitySort);

	Nan::SetPrototypeMethod(tpl, "IsSupported", IsSupported);
	Nan::SetPrototypeMethod(tpl, "isSupported", IsSupported);

	Nan::SetPrototypeMethod(tpl, "MapScalarsToColors", MapScalarsToColors);
	Nan::SetPrototypeMethod(tpl, "mapScalarsToColors", MapScalarsToColors);

	Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance);
	Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance);

	Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast);
	Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast);

	Nan::SetPrototypeMethod(tpl, "SetVisibilitySort", SetVisibilitySort);
	Nan::SetPrototypeMethod(tpl, "setVisibilitySort", SetVisibilitySort);

	Nan::SetPrototypeMethod(tpl, "TransformPoints", TransformPoints);
	Nan::SetPrototypeMethod(tpl, "transformPoints", TransformPoints);

#ifdef VTK_NODE_PLUS_VTKPROJECTEDTETRAHEDRAMAPPERWRAP_INITPTPL
	VTK_NODE_PLUS_VTKPROJECTEDTETRAHEDRAMAPPERWRAP_INITPTPL
#endif
	ptpl.Reset( tpl );
}

void VtkProjectedTetrahedraMapperWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	if(!info.IsConstructCall())
	{
		Nan::ThrowError("Constructor not called in a construct call.");
		return;
	}

	if(info.Length() == 0)
	{
		vtkSmartPointer<vtkProjectedTetrahedraMapper> native = vtkSmartPointer<vtkProjectedTetrahedraMapper>::New();
		VtkProjectedTetrahedraMapperWrap* obj = new VtkProjectedTetrahedraMapperWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

	info.GetReturnValue().Set(info.This());
}

void VtkProjectedTetrahedraMapperWrap::GetVisibilitySort(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkProjectedTetrahedraMapperWrap *wrapper = ObjectWrap::Unwrap<VtkProjectedTetrahedraMapperWrap>(info.Holder());
	vtkProjectedTetrahedraMapper *native = (vtkProjectedTetrahedraMapper *)wrapper->native.GetPointer();
	vtkVisibilitySort * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetVisibilitySort();
	VtkVisibilitySortWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkVisibilitySortWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkVisibilitySortWrap *w = new VtkVisibilitySortWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkProjectedTetrahedraMapperWrap::IsSupported(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkProjectedTetrahedraMapperWrap *wrapper = ObjectWrap::Unwrap<VtkProjectedTetrahedraMapperWrap>(info.Holder());
	vtkProjectedTetrahedraMapper *native = (vtkProjectedTetrahedraMapper *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkRenderWindowWrap::ptpl))->HasInstance(info[0]))
	{
		VtkRenderWindowWrap *a0 = ObjectWrap::Unwrap<VtkRenderWindowWrap>(info[0]->ToObject());
		bool r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->IsSupported(
			(vtkRenderWindow *) a0->native.GetPointer()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkProjectedTetrahedraMapperWrap::MapScalarsToColors(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkProjectedTetrahedraMapperWrap *wrapper = ObjectWrap::Unwrap<VtkProjectedTetrahedraMapperWrap>(info.Holder());
	vtkProjectedTetrahedraMapper *native = (vtkProjectedTetrahedraMapper *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkDataArrayWrap::ptpl))->HasInstance(info[0]))
	{
		VtkDataArrayWrap *a0 = ObjectWrap::Unwrap<VtkDataArrayWrap>(info[0]->ToObject());
		if(info.Length() > 1 && info[1]->IsObject() && (Nan::New(VtkVolumePropertyWrap::ptpl))->HasInstance(info[1]))
		{
			VtkVolumePropertyWrap *a1 = ObjectWrap::Unwrap<VtkVolumePropertyWrap>(info[1]->ToObject());
			if(info.Length() > 2 && info[2]->IsObject() && (Nan::New(VtkDataArrayWrap::ptpl))->HasInstance(info[2]))
			{
				VtkDataArrayWrap *a2 = ObjectWrap::Unwrap<VtkDataArrayWrap>(info[2]->ToObject());
								if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				native->MapScalarsToColors(
					(vtkDataArray *) a0->native.GetPointer(),
					(vtkVolumeProperty *) a1->native.GetPointer(),
					(vtkDataArray *) a2->native.GetPointer()
				);
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkProjectedTetrahedraMapperWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkProjectedTetrahedraMapperWrap *wrapper = ObjectWrap::Unwrap<VtkProjectedTetrahedraMapperWrap>(info.Holder());
	vtkProjectedTetrahedraMapper *native = (vtkProjectedTetrahedraMapper *)wrapper->native.GetPointer();
	vtkProjectedTetrahedraMapper * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->NewInstance();
	VtkProjectedTetrahedraMapperWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkProjectedTetrahedraMapperWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkProjectedTetrahedraMapperWrap *w = new VtkProjectedTetrahedraMapperWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkProjectedTetrahedraMapperWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkProjectedTetrahedraMapperWrap *wrapper = ObjectWrap::Unwrap<VtkProjectedTetrahedraMapperWrap>(info.Holder());
	vtkProjectedTetrahedraMapper *native = (vtkProjectedTetrahedraMapper *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0]))
	{
		VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject());
		vtkProjectedTetrahedraMapper * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->SafeDownCast(
			(vtkObjectBase *) a0->native.GetPointer()
		);
		VtkProjectedTetrahedraMapperWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkProjectedTetrahedraMapperWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkProjectedTetrahedraMapperWrap *w = new VtkProjectedTetrahedraMapperWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkProjectedTetrahedraMapperWrap::SetVisibilitySort(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkProjectedTetrahedraMapperWrap *wrapper = ObjectWrap::Unwrap<VtkProjectedTetrahedraMapperWrap>(info.Holder());
	vtkProjectedTetrahedraMapper *native = (vtkProjectedTetrahedraMapper *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkVisibilitySortWrap::ptpl))->HasInstance(info[0]))
	{
		VtkVisibilitySortWrap *a0 = ObjectWrap::Unwrap<VtkVisibilitySortWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetVisibilitySort(
			(vtkVisibilitySort *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkProjectedTetrahedraMapperWrap::TransformPoints(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkProjectedTetrahedraMapperWrap *wrapper = ObjectWrap::Unwrap<VtkProjectedTetrahedraMapperWrap>(info.Holder());
	vtkProjectedTetrahedraMapper *native = (vtkProjectedTetrahedraMapper *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkPointsWrap::ptpl))->HasInstance(info[0]))
	{
		VtkPointsWrap *a0 = ObjectWrap::Unwrap<VtkPointsWrap>(info[0]->ToObject());
		if(info.Length() > 1 && info[1]->IsFloat32Array())
		{
			v8::Local<v8::Float32Array>a1(v8::Local<v8::Float32Array>::Cast(info[1]->ToObject()));
			if( a1->Length() < 16 )
			{
				Nan::ThrowError("Array too short.");
				return;
			}

			if(info.Length() > 2 && info[2]->IsFloat32Array())
			{
				v8::Local<v8::Float32Array>a2(v8::Local<v8::Float32Array>::Cast(info[2]->ToObject()));
				if( a2->Length() < 16 )
				{
					Nan::ThrowError("Array too short.");
					return;
				}

				if(info.Length() > 3 && info[3]->IsObject() && (Nan::New(VtkFloatArrayWrap::ptpl))->HasInstance(info[3]))
				{
					VtkFloatArrayWrap *a3 = ObjectWrap::Unwrap<VtkFloatArrayWrap>(info[3]->ToObject());
										if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					native->TransformPoints(
						(vtkPoints *) a0->native.GetPointer(),
						(float *)(a1->Buffer()->GetContents().Data()),
						(float *)(a2->Buffer()->GetContents().Data()),
						(vtkFloatArray *) a3->native.GetPointer()
					);
					return;
				}
			}
			else if(info.Length() > 2 && info[2]->IsArray())
			{
				v8::Local<v8::Array>a2(v8::Local<v8::Array>::Cast(info[2]->ToObject()));
				float b2[16];
				if( a2->Length() < 16 )
				{
					Nan::ThrowError("Array too short.");
					return;
				}

				for( i = 0; i < 16; i++ )
				{
					if( !a2->Get(i)->IsNumber() )
					{
						Nan::ThrowError("Array contents invalid.");
						return;
					}
					b2[i] = a2->Get(i)->NumberValue();
				}
				if(info.Length() > 3 && info[3]->IsObject() && (Nan::New(VtkFloatArrayWrap::ptpl))->HasInstance(info[3]))
				{
					VtkFloatArrayWrap *a3 = ObjectWrap::Unwrap<VtkFloatArrayWrap>(info[3]->ToObject());
										if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					native->TransformPoints(
						(vtkPoints *) a0->native.GetPointer(),
						(float *)(a1->Buffer()->GetContents().Data()),
						b2,
						(vtkFloatArray *) a3->native.GetPointer()
					);
					return;
				}
			}
		}
		else if(info.Length() > 1 && info[1]->IsArray())
		{
			v8::Local<v8::Array>a1(v8::Local<v8::Array>::Cast(info[1]->ToObject()));
			float b1[16];
			if( a1->Length() < 16 )
			{
				Nan::ThrowError("Array too short.");
				return;
			}

			for( i = 0; i < 16; i++ )
			{
				if( !a1->Get(i)->IsNumber() )
				{
					Nan::ThrowError("Array contents invalid.");
					return;
				}
				b1[i] = a1->Get(i)->NumberValue();
			}
			if(info.Length() > 2 && info[2]->IsArray())
			{
				v8::Local<v8::Array>a2(v8::Local<v8::Array>::Cast(info[2]->ToObject()));
				float b2[16];
				if( a2->Length() < 16 )
				{
					Nan::ThrowError("Array too short.");
					return;
				}

				for( i = 0; i < 16; i++ )
				{
					if( !a2->Get(i)->IsNumber() )
					{
						Nan::ThrowError("Array contents invalid.");
						return;
					}
					b2[i] = a2->Get(i)->NumberValue();
				}
				if(info.Length() > 3 && info[3]->IsObject() && (Nan::New(VtkFloatArrayWrap::ptpl))->HasInstance(info[3]))
				{
					VtkFloatArrayWrap *a3 = ObjectWrap::Unwrap<VtkFloatArrayWrap>(info[3]->ToObject());
										if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					native->TransformPoints(
						(vtkPoints *) a0->native.GetPointer(),
						b1,
						b2,
						(vtkFloatArray *) a3->native.GetPointer()
					);
					return;
				}
			}
			else if(info.Length() > 2 && info[2]->IsFloat32Array())
			{
				v8::Local<v8::Float32Array>a2(v8::Local<v8::Float32Array>::Cast(info[2]->ToObject()));
				if( a2->Length() < 16 )
				{
					Nan::ThrowError("Array too short.");
					return;
				}

				if(info.Length() > 3 && info[3]->IsObject() && (Nan::New(VtkFloatArrayWrap::ptpl))->HasInstance(info[3]))
				{
					VtkFloatArrayWrap *a3 = ObjectWrap::Unwrap<VtkFloatArrayWrap>(info[3]->ToObject());
										if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					native->TransformPoints(
						(vtkPoints *) a0->native.GetPointer(),
						b1,
						(float *)(a2->Buffer()->GetContents().Data()),
						(vtkFloatArray *) a3->native.GetPointer()
					);
					return;
				}
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}


text:
@protocol AppConnectDelegate;
@class WPUserPoints;

enum WPConnectionType {
    WP_CONNECT_TYPE_CONNECT = 0,
    WP_CONNECT_TYPE_ALT_CONNECT,
    WP_CONNECT_TYPE_USER_ID,
    WP_CONNECT_TYPE_SDK_LESS,
    WP_CONNECT_TYPE_SDK_TASK,
    WP_CONNECT_TYPE_SCHEME_INFO,
};

@interface AppConnect : NSObject {

@private
    NSString *appID_;
    NSString *userID_;
    NSString *plugin_;
    NSMutableData *data_;
    int connectAttempts_;
    BOOL isInitialConnect_;
    BOOL isAutoGetPoints_;
    int responseCode_;
    NSURLConnection *connectConnection_;
    NSURLConnection *userIDConnection_;
    NSURLConnection *SDKLessConnection_;
    NSString *appChannel_;
    NSString *appCount_;
    NSString *appleID_;
}

@property(nonatomic, copy) NSString *appID;
@property(nonatomic, copy) NSString *appChannel;
@property(nonatomic, copy) NSString *userID;
@property(nonatomic, copy) NSString *plugin;
@property(nonatomic, copy) NSMutableDictionary *configItems;
@property(nonatomic, copy) NSString *appCount;
@property(nonatomic, copy) NSString *appleID;
@property(assign) BOOL isInitialConnect;
@property(assign) BOOL isAutoGetPoints;
@property(nonatomic, retain) id <AppConnectDelegate> delegate;

+ (AppConnect *)getConnect:(NSString *)appID;

+ (AppConnect *)getConnect:(NSString *)appID pid:(NSString *)appChannel;

+ (AppConnect *)getConnect:(NSString *)appID pid:(NSString *)appChannel userID:(NSString *)theUserID;

+ (AppConnect *)actionComplete:(NSString *)actionID;

+ (AppConnect *)sharedAppConnect;

+ (void)deviceNotificationReceived;

+ (NSString *)getAppID;

+ (void)setUserID:(NSString *)theUserID;

+ (NSString *)getUserID;

+ (NSMutableDictionary *)getConfigItems;

- (void)connectWithType:(int)connectionType withParams:(NSDictionary *)params;

- (NSString *)getURLStringWithConnectionType:(int)connectionType;

- (void)initiateConnectionWithConnectionType:(int)connectionType requestString:(NSString *)requestString;

- (BOOL)isJailBroken;

+ (NSString *)isJailBrokenStr;

- (NSMutableDictionary *)genericParameters;

- (NSString *)createQueryStringFromDict:(NSDictionary *)paramDict;

+ (NSString *)createQueryStringFromDict:(NSDictionary *)paramDict;

- (NSString *)createQueryStringFromString:(NSString *)string;

+ (NSString *)createQueryStringFromString:(NSString *)string;

+ (void)clearCache;

+ (NSString *)getOpenID;

+ (NSString *)getIDFA;

+ (NSString *)getIDFV;

+ (NSString *)getMACAddress;

+ (NSString *)getMACID;

+ (NSString *)getUniqueIdentifier;

+ (NSString *)getTimeStamp;

+ (void)autoGetPoints:(BOOL)isAuto;

@end

@protocol AppConnectDelegate
@required

- (void)onWPConnectSuccess;

- (void)onWPConnectFailed;

- (void)onWPUpdatePoints:(WPUserPoints *)userPoints;

- (void)onWPGetPointsSuccess:(WPUserPoints *)userPoints;

- (void)onWPGetPointsFailed:(NSString *)error;

- (void)onWPAwardPointsSuccess:(int)awardPoint;

- (void)onWPAwardPointsFailed:(NSString *)error;

- (void)onWPSpendPointsSuccess:(int)spendPoint;

- (void)onWPSpendPointsFailed:(NSString *)error;

- (void)onWPListClose;

- (void)onWPBannerShow;

- (void)onWPBannerShowFailed;

- (void)onWPBannerClick;

- (void)onWPBannerClose;

- (void)onWPPopInitSuccess;

- (void)onWPPopInitFailed:(NSString *)error;

- (void)onWPPopInitNull:(NSString *)error;

- (void)onWPPopShowSuccess;

- (void)onWPPopShowFailed:(NSString *)error;

- (void)onWPPopClose;

- (void)onWPPopClick;

@end

#import "AppConnectConstants.h"


text:
category: event
title: PhillyETE
logo: /resources/img/phillyete2014.png
location: Philadelphia
description: ""
start: 07 April 2014
end: 08 April 2014
link-out: http://phillyemergingtech.com
---


text:
package net.hydromatic.optiq.jdbc;

import net.hydromatic.avatica.*;

import net.hydromatic.linq4j.Queryable;

import net.hydromatic.optiq.server.OptiqServerStatement;

/**
 * Implementation of {@link java.sql.Statement}
 * for the Optiq engine.
 */
public abstract class OptiqStatement
    extends AvaticaStatement
    implements OptiqServerStatement {
  OptiqStatement(
      OptiqConnectionImpl connection,
      int resultSetType,
      int resultSetConcurrency,
      int resultSetHoldability) {
    super(connection, resultSetType, resultSetConcurrency,
        resultSetHoldability);
  }

  // implement Statement

  @Override public OptiqConnectionImpl getConnection() {
    return (OptiqConnectionImpl) connection;
  }

  public OptiqConnectionImpl.ContextImpl createPrepareContext() {
    return new OptiqConnectionImpl.ContextImpl(getConnection());
  }

  protected <T> OptiqPrepare.PrepareResult<T> prepare(Queryable<T> queryable) {
    final OptiqPrepare prepare = getConnection().prepareFactory.apply();
    return prepare.prepareQueryable(createPrepareContext(), queryable);
  }

  @Override
  protected void close_() {
    if (!closed) {
      closed = true;
      final OptiqConnectionImpl connection1 = (OptiqConnectionImpl) connection;
      connection1.server.removeStatement(this);
      if (openResultSet != null) {
        AvaticaResultSet c = openResultSet;
        openResultSet = null;
        c.close();
      }
      // If onStatementClose throws, this method will throw an exception (later
      // converted to SQLException), but this statement still gets closed.
      connection1.getDriver().handler.onStatementClose(this);
    }
  }
}

// End OptiqStatement.java


text:
package com.jkoolcloud.tnt4j.stream.jmx.vm;

import java.util.Collection;

/**
 * Base interface for classes capable to resolve JVMs running JMX servers using defined VM descriptor.
 *
 * @param <T>
 *            the type of resolved VM reference: descriptor or URL
 *
 * @version $Revision: 1 $
 *
 * @see com.jkoolcloud.tnt4j.stream.jmx.vm.VMResolverFactory
 */
public interface VMResolver<T> {

	/**
	 * Resolves VM references list for JVMs matching defined VM descriptor.
	 *
	 * @param vmDescrParams
	 *            VM descriptor: display name fragment, pid, registry (e.g. ZooKeeper) URI, etc.
	 * @return collection of resolved JVM references
	 * @throws Exception
	 *             if JVM connection addresses resolution fails
	 */
	Collection<VMParams<T>> getVMConnAddresses(VMParams<String> vmDescrParams) throws Exception;

	/**
	 * Returns handled VM descriptor prefix.
	 *
	 * @return handled VM descriptor prefix.
	 */
	String getPrefix();

	/**
	 * Checks if provided VM descriptor is handled by this resolver.
	 *
	 * @param vmDescr
	 *            VM descriptor: display name fragment, pid, registry (e.g. ZooKeeper) URI, etc.
	 * @return {@code true} if this resolver handles provided VM descriptor, {@code false} - otherwise
	 */
	boolean isHandlingVMDescriptor(String vmDescr);
}


text:
(function(angular) {
    'use strict';
    angular.module('gitlabKBApp.board').factory('BoardService', [
        '$http',
        '$q',
        '$sce',
        'LabelService',
        'WebsocketService',
        'Board',
        'UserService',
        'MilestoneService',
        'AuthService',
        function($http, $q, $sce, LabelService, WebsocketService, Board, UserService, MilestoneService, AuthService) {
            var service = {
                current: {},
                boards: {},
                boardIdIndex: {},
                boardPathIndex: {},
                boardsList: {},
                boardConnectedIndex: {},
                boardConnected: {},
                get: function(path) {
                    if (_.isEmpty(this.boards[path]) || this.boards[path].stale) {
                        var withCache = true;
                        if (!_.isEmpty(this.boards[path])) {
                            withCache = !this.boards[path].stale;
                        }
                        this.boards[path] = $http.get('/api/boards/'+ path ).then(function(project) {
                            project = project.data.data;
                            this.boards[path] = $q.all([
                                LabelService.list(project.path_with_namespace, withCache),
                                $http.get('/api/boards/' + project.path_with_namespace + "/cards")
                            ]).then(function(results) {
                                var board = new Board(results[0], results[1].data.data, project);
                                this.boards[path] = board;
                                this.boardIdIndex[board.project.id] = board.project.path_with_namespace;
                                this.boardPathIndex[board.project.path_with_namespace] = board.project.id;

                                return this.boards[path];
                            }.bind(this));

                            return this.boards[path];
                        }.bind(this));
                    }

                    return $q.when(this.boards[path]);
                },
                listConnected: function(id, path_with_namespace) {
                    if (_.isEmpty(this.boardConnected[id])) {
                        this.boardConnected[id] = $http.get('/api/boards/' + path_with_namespace + '/connect', {
                        }).then(function(result){
                            angular.forEach(result.data.data, function(item){
                                if (! this.boardConnectedIndex[item.id]) {
                                    this.boardConnectedIndex[item.id] = [];
                                }
                                this.boardConnectedIndex[item.id].push(id);
                                this.boardConnectedIndex[item.id] = _.uniq(this.boardConnectedIndex[item.id]);
                            }, this);

                            return result.data.data;
                        }.bind(this));
                    }
                    return $q.when(this.boardConnected[id]);
                },
                connectBoard: function(project, boardId, connectBoardId) {
                    return $http.post('/api/boards/' + project.path_with_namespace + '/connect', {
                        project_id: connectBoardId,
						source_id : boardId,
						target_id : connectBoardId
                    });
                },
                deleteConnected: function(project, boardId, connectBoardId) {
                    return $http.delete('/api/boards/' + project.path_with_namespace + '/connect', {
                        params: {
                            board_id: connectBoardId,
							source_id : boardId,
							target_id : connectBoardId
                        }
                    });
                },
                getBoardById: function(id) {
                    var path = this.boardIdIndex[id];

                    return this.get(path);
                },
                getCard: function(boardId, path_with_namespace, cardId) {
                    var project_path = path_with_namespace || boardId;
                    return this.get(boardId).then(function(result) {
                        return _.find(result.issues, function(card) {
                            return card.iid == cardId && card.path_with_namespace == project_path;
                        });
                    });
                },
                createCard: function(board, data) {
                    return $http.post('/api/card/' + board.project.id, data).then(function(newCard) {});
                },
                sanitize: function(json) {
                    for (var key in json) {
                            if (json.hasOwnProperty(key) && json[key] === null ) {
                                delete json[key];
                            }
                    }
                    return json;
                },
                updateCard: function(board, card) {
                    return $http.put('/api/card/' + board.project.id, this.sanitize({
                        issue_id: card.id,
                        project_id: card.project_id,
                        assignee_id: card.assignee ? card.assignee.id : null,
                        milestone_id: card.milestone ? card.milestone.id : null,
                        title: card.title,
                        labels: card.labels.join(', '),
                        todo: card.todo,
                        description: card.description,
                        properties: card.properties,
                        due_date: card.due_date
                    })).then(function(result) {});
                },
                removeCard: function(board, card) {
                    return $http.delete('/api/card/' + board.project.id, {
                        data: {
                            issue_id: card.id,
                            project_id: card.project_id,
                            assignee_id: card.assignee ? card.assignee.id : null,
                            milestone_id: card.milestone ? card.milestone.id : null,
                            title: card.title,
                            labels: card.labels.join(', '),
                            todo: card.todo,
                            description: card.description,
                            properties: card.properties,
                            closed: 1,
                            due_date: card.due_date
                        },
                        headers: {
                            'Content-Type': 'application/json'
                        }
                    });
                },
                moveCard: function(board, card, oldStage, newStage) {
                    return $http.put('/api/boards/' + board.project.path_with_namespace + '/move', this.sanitize({
                        project_id: card.project_id,
                        issue_id: card.id,
                        assignee_id: card.assignee ? card.assignee.id : null,
                        milestone_id: card.milestone ? card.milestone.id : null,
                        title: card.title,
                        labels: card.labels.join(', '),
                        todo: card.todo,
                        description: card.description,
                        properties: card.properties,
                        stage: {
                            source: oldStage,
                            dest: newStage
                        }
                    }));
                },
                changeProject: function(board, card, project) {
                    return LabelService.getStageByName(project.path_with_namespace, card.stage.viewName).then(function(stage){
                        card.labels = _.filter(card.labels, function(label) {
                           // return !stage_regexp.test(label);
                            return label.group != 'stage';
                        });
                        if (stage) {
                            card.labels.push(stage.name);
                        }

                        return $http.post('/api/card/' + board.project.id + '/move/' + project.path_with_namespace, this.sanitize({
                            issue_id: card.id,
                            project_id: card.project_id,
                            assignee_id: card.assignee ? card.assignee.id : null,
                            milestone_id: card.milestone ? card.milestone.id : null,
                            title: card.title,
                            labels: card.labels.join(', '),
                            todo: card.todo,
                            description: card.description,
                            properties: card.properties
                        })).then(function(result) {
                            this.addCardToBoard(result.data.data);
                            return result.data.data;
                        }.bind(this));
                    }.bind(this));
                },
                getBoards: function() {
                    var _this = this;
                    if (_.isEmpty(_this.boardsList)) {
                        _this.boardsList = $http.get('/api/boards').then(function(result) {
                            _this.boardsList = _.keyBy(result.data.data, 'id');
                            return _this.boardsList;
                        }, function(result) {
                            _this.boardsList = {};
                            return $q.reject(result);
                        });
                    }

                    return $q.when(_this.boardsList);
                },
                getStarredBoards: function() {
                    return $http.get('/api/boards/starred').then(function(result) {
                            return result.data.data;
                        }, function(result) {
                            return $q.reject(result);
                        });
                },
                addCardToBoard: function(card) {
                    var _this = this;
                    var ids = this.boardConnectedIndex[card.project_id];

                    if (!_.isEmpty(ids)) {
                        angular.forEach(ids, function(id){
                            _this.getBoardById(id).then(function(board) {
                                board.add(card);
                            });
                        });
                    } else {
                        _this.getBoardById(card.project_id).then(function(board) {
                            board.add(card);
                        });
                    }
                },
                removeCardFromBoard: function(card) {
                    var _this = this;
                    var ids = this.boardConnectedIndex[card.project_id];

                    if (!_.isEmpty(ids)) {
                        angular.forEach(ids, function(id){
                            _this.getBoardById(id).then(function(board) {
                                board.remove(card);
                            });
                        });
                    } else {
                        _this.getBoardById(card.project_id).then(function(board) {
                            board.remove(card);
                        });
                    }
                },
                updateCardOnBoard: function(card) {
                    var _this = this;
                    var ids = this.boardConnectedIndex[card.project_id];

                    if (!_.isEmpty(ids)) {
                        angular.forEach(ids, function(id){
                            _this.getBoardById(id).then(function(board) {
                                board.update(card);
                            });
                        });
                    } else {
                        _this.getBoardById(card.project_id).then(function(board) {
                            board.update(card);
                        });
                    }
                },
                dragControlListeners: function(grouped, board) {
                    var _this = this;
                    return {
                        longTouch: true,
                        accept: function() {
                        	return true;
                        },
                        dragEnd: function(event) {
                            var id = event.source.itemScope.card.id,
								path_with_namespace = event.source.itemScope.card.path_with_namespace,
                                card = board.getCardById(id),
                                oldLabel = "",
                                newLabel = "",
                                oldGroup = event.source.sortableScope.$parent.$parent.group,
                                newGroup = event.dest.sortableScope.$parent.$parent.group,
                                oldStage = null,
                                newStage = null;

                            LabelService.getStageByName(
								path_with_namespace,
                                event.source.sortableScope.$parent.stageName
                            ).then(function(res) {
                                oldStage = res;
                                if (oldStage) {
                                    oldLabel = oldStage.name;
                                }
                                return LabelService.getStageByName(
                                    path_with_namespace,
                                    event.dest.sortableScope.$parent.stageName
                                );
                            }).then(function(res) {
                                newStage = res;
                                if (newStage) {
                                    newLabel = newStage.name;
                                }

                                card.labels = _.filter(card.labels, function(label) {
                                   // return !stage_regexp.test(label);
                                    return label.group != 'stage';
                                });

                                if (newLabel == "") {
                                    card.stage = null;
                                } else {
                                    card.labels.push(newLabel);
                                    card.stage = newStage;
                                }
                                card.properties.andon = 'none';

                                if (oldGroup != newGroup && card.stage != null) {
                                    if (grouped == 'milestone') {
                                        card.milestone_id = newGroup.id === undefined ? 0 : newGroup.id;
                                        card.milestone = newGroup;
                                    } else if (grouped == 'user') {
                                        card.assignee_id = newGroup.id === undefined ? 0 : newGroup.id;
                                        card.assignee = newGroup;
                                    } else if (grouped == 'priority') {
                                        var index = card.labels.indexOf(oldGroup.name);
                                        if (index !== -1) {
                                            card.labels.splice(index, 1);
                                        }
                                        if (!_.isEmpty(newGroup.name)) {
                                            card.priority = newGroup;
                                            card.labels.push(newGroup.name);
                                        }
                                    } else if (grouped == 'project') {
                                        return _this.changeProject(board, card, newGroup);
                                    }

                                    return _this.moveCard(board, card, oldLabel, newLabel);
                                } else {
                                    return _this.moveCard(board, card, oldLabel, newLabel);
                                }
                            });
                        },
                        containment: '#board'
                    }
                }
            };

            WebsocketService.on('card.create', function(data) {
                return service.addCardToBoard(data);
            });

            WebsocketService.on('card.move', function(data) {
            	//console.log('card.move');
                return service.updateCardOnBoard(data);
            });

            WebsocketService.on('card.delete', function(data) {
                return service.removeCardFromBoard(data);
            });

            WebsocketService.on('card.update', function(data) {
                return service.updateCardOnBoard(data);
            });

            return service;
        }
    ]);
})(window.angular);


text:
module Users::EventsHelper
end


text:
package main

import (
	"flag"
	"fmt"
	"io/ioutil"
	"os"
	"strings"
)

const (
	unixHiddenFilePrefix = "."
	currentDir           = "."
)

type option struct {
	all bool
	rec bool
}

func newOption() option {
	opt := option{}

	flag.BoolVar(&opt.all, "A", false, "list all entries except for . and ..")
	flag.BoolVar(&opt.rec, "R", false, "recursively list subdirectories encountered")

	flag.Parse()

	return opt
}

func main() {
	opt := newOption()

	paths := flag.Args()
	if len(paths) == 0 {
		paths = []string{currentDir}
	}

	for _, path := range paths {
		doLs(path, opt)
	}
}

func doLs(path string, opt option) {
	fis, err := ioutil.ReadDir(path)
	if err != nil {
		perror(err)
		return
	}

	for _, fi := range fis {
		name := fi.Name()

		// skip the following process if not to display hidden files
		skip := !opt.all && isHidden(name)
		if skip {
			continue
		}

		fmt.Println(name)

		// run recursively
		isRec := opt.rec && fi.IsDir()
		if isRec {
			name = path + "/" + name
			doLs(name, opt)
		}
	}
}

func isHidden(path string) bool {
	return strings.HasPrefix(path, unixHiddenFilePrefix)
}

func perror(err error) {
	fmt.Fprintf(os.Stderr, "[error] %v\n", err)
}


text:
using AutoMapper;
using BookReviews.AccountsManager.DTO;
using BookReviews.Infrastructure.Commands.GroupsManagment.UpdateGroupClaims;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BookReviews.UI.ViewModels.GroupsManagment.UpdateGroupClaims
{
    public class UpdateGroupClaimsViewModel
    {
        public UpdateGroupClaimsViewModel() { }

        public long GroupID { get; set; }
        public IList<GroupClaimItem> GroupClaims { get; set; }
    }
}


text:
"""
=======================================================
Check congruency of aligned reads in terms of COG
annotations
=======================================================

:Author: Nick Ilott
:Release: $Id$
:Date: |today|
:Tags: Python

"""

# load modules
from ruffus import *

import CGAT.Experiment as E
import logging as L
import CGAT.Database as Database
import CGAT.CSV as CSV

import sys
import os
import re
import shutil
import itertools
import math
import glob
import time
import gzip
import collections
import random

import numpy
import sqlite3
import CGAT.IOTools as IOTools
from rpy2.robjects import r as R

###################################################
###################################################
###################################################
# Pipeline configuration
###################################################

# load options from the config file
import CGATPipelines.Pipeline as P
P.getParameters(
    ["pipeline.ini"])

PARAMS = P.PARAMS

###################################################
###################################################
###################################################

@follows(mkdir("congruency.dir"))
@transform("*.tsv.gz",
           regex("(\S+).tsv.gz"),
           add_inputs(PARAMS.get("annotations_gene2cog")),
           r"congruency.dir/\1.congruency.tsv.gz")
def buildCongruency(infiles, outfile):
    '''
    build a table of reads with the % congruent with
    the best hit. We take the top n alignments as representing
    a random sample
    '''
    n = PARAMS.get("sample_sample")
    alignments, annotations = infiles
    temp = P.getTempFilename(".")
    statement = '''zcat %(alignments)s | cut -f1 | uniq | head -n %(n)i > %(temp)s;
                   python %(scriptsdir)s/best_hit_congruency.py
                   -a %(alignments)s
                   -m %(annotations)s
                   -r %(temp)s
                   --log=%(outfile)s.log
                   | gzip > %(outfile)s;
                   rm -rf %(temp)s'''
    P.run()

#########################################
#########################################
#########################################

@jobs_limit(1, "R")
@transform(buildCongruency, suffix(".tsv.gz"), ".pdf")
def plotCongruency(infile, outfile):
    '''
    histogram congruency
    '''
    R('''library(ggplot2)''')
    R('''dat <- read.csv("%s", header = T, stringsAsFactors = F, se = "\t")''' % infile)
    R('''congruent_over_50 <- (length(dat$pcongruent[dat$pcongruent >= 50])/nrow(dat))*100''')

    R('''ggplot(dat, aes(x = pcongruent)) + geom_histogram() + labs(title = congruent_over_50)''')
    R('''ggsave("%s")''' % outfile)

#########################################
#########################################
#########################################

@follows(plotCongruency)
def full():
    pass

#########################################
#########################################
#########################################
if __name__ == "__main__":
    sys.exit(P.main(sys.argv))


text:
module.exports = {
  description: "",
  ns: "react-material-ui",
  type: "ReactNode",
  dependencies: {
    npm: {
      "material-ui/svg-icons/action/info-outline": require('material-ui/svg-icons/action/info-outline')
    }
  },
  name: "ActionInfoOutline",
  ports: {
    input: {},
    output: {
      component: {
        title: "ActionInfoOutline",
        type: "Component"
      }
    }
  }
}