text:
4.0.1 (unreleased)
------------------

4.0.0 (2022-07-31)
------------------
- Add SFTP support
- Improve `run` command
- New `tree` command
- New `--case` argument for better handling of ambigous files that only differ
  in the name's casing
- New `--create-folder` argument to allow creation of missing remote folders
- New `--report-problems` argument to return exit code 10 on skipped files
  like unresolved conflicts or copy errors
- New `--no-dry-run` argument to `run` command to override a default dry_run
  configuration (alias: `--execute`)
- New `--debug classify` argument helps with analysis of synchronization problems
- `--migrate` now always removes outdated metadata files (before, this was only
  done when a file inside that directory was touched)
- Copy errors (e.g. due to encoding problems) are skipped (see also `--report-problems`)
- Fix #26: Crash when not setting verbose option
- Use [Yabs](https://github.com/mar10/yabs) as release tool
- Available on Windows Package Manager
- **Breaking Changes:**
  - Drop support for Python 2.x (end-of-life: 2020-01-01)
  - Rename `.pyftpsync.yaml` to `pyftpsync.yaml`
  - Rename FtpTarget => FTPTarget

3.1.1+
------
See branch `maintain_3.x`.

3.1.0 (2019-12-26)
------------------
- Drop support for Python 3.4 (end-of-life: 2019-03-18)
- Add support for Python 3.8
- Fix #38 Remove trailing '/' before checking PWD response

3.0.0 (2019-04-20)
------------------
- This release addresses some known **encoding-related issues**:

  - The internal path format are now native strings (i.e. unicode on Python 3
    or UTF-8 bytes on Python 2)
  - FTP targets are now assumed to support UTF-8.
  - #30: Fallback to CP-1252 encoding when FTP server returns non-UTF-8
  - Local filesystem targets now consider the OS encoding.
  - Modified format of `.pyftpsync-meta.json`: File names are now stored as UTF-8
    (was the unmodified binary format of the target platform before).
  - See also the 'encoding' section in the
    [spec](https://github.com/mar10/pyftpsync/blob/master/docs/sphinx/pyftpsync-spec.pdf).

- **New `run` command** reads and executes settings from a configuration file
  `.pyftpsync.yaml`
- Remove trailing garbage from output lines

**Breaking Changes:**
  - Modified format of `.pyftpsync-meta.json`.
    Pass `--migrate` option to convert from a prvious version (note that this
    cannot be undone)

2.1.0 (2018-08-25)
------------------
- Allow `-v` with `--version` option.
- Fix #26: Crash when not setting verbose option.
- Print SYST and FEAT when -vv is passed
- Accept list type options for `exclude` argument in CLI mode
- Apply and enforce Black formatter
- Fix #27: Download- and UploadSynchronizer honor `--delete` flag for all
  conditions.

  **NOTE:** default settings will no longer delete files for up- and downloads.

2.0.0 (2018-01-01)
------------------
**Note**: the command line options have changed:
**Be careful with existing shell scripts after updating from v1.x!**

**New Features:**
- New `scan` command to list, purge, etc. remote targets.
- Add FTPS (TLS) support.
- Support Active FTP.
- Support for `.netrc` files.
- CLI returns defined error codes.
- Use configurable logger for output when not in CLI mode.
- Release as Wheel.

**Breaking Changes:**

- Write mode is now on by default.
  The `-x`, `--execute` option was removed, use `--dry-run` instead.
- `-f`, `--include-files` option was renamed to `-m`, `--match`.

  `-o`, `--omit` option was renamed to `-x`, `--exclude`.
- Modified format of `.pyftpsync-meta.json`.
- Dropped support for Python 2.6 and 3.3.

**Fixes and Improvements:**
- Remove lock file on Ctrl-C.
- Refactored and split into more modules.
- Improved test framework and documentation.
- Enforce PEP8, use flake8.

1.0.4 (unreleased)
------------------
- Add FTPS (TLS) support on Python 2.7/3.2+

1.0.3 (2015-06-28)
------------------
- Add conflict handling to upload and download commands
- Move documentation to Read The Docs
- Use tox for tests

1.0.2 (2015-05-17)
------------------
- Bi-directional synchronization
- Detect conflicts if both targets are modified since last sync
- Optional resolve strategy (e.g. always use local)
- Distinguish whether a resource was added on local or removed on remote
- Optionally prompt for username/password
- Optionally store credentials in keyring
- Custom password file (~/pyftpsync.pw) is no longer supported
- Colored output
- Interactive mode
- Renamed _pyftpsync-meta.json to .pyftpsync-meta.json
- MSI installer for MS Windows

0.2.1 (2013-05-07)
------------------
- Fixes for py3

0.2.0 (2013-05-06)
------------------
- Improved progress info
- Added `--progress` option

0.1.0 (2013-05-04)
------------------
First release


text:
'use strict';

var join = require( 'path' ).join;
var mkdirp = require( 'mkdirp' ).sync;
var writeFile = require( '@stdlib/fs/write-file' ).sync;
var bundle = require( './../../lib' );

var names = [
	'@stdlib/math/base/special/erf',
	'@stdlib/math/base/special/gamma'
];

var bopts = {
	'namespace': 'none'
};

var dir = join( __dirname, 'build' );
bundle( names, bopts, onBundle );

function onBundle( error, bundle ) {
	var fpath;
	if ( error ) {
		throw error;
	}
	mkdirp( dir );
	fpath = join( dir, 'bundle.js' );
	writeFile( fpath, bundle );
}

redpajama_set_name: RedPajamaGithub


text:
@extends('admin.layouts.base')

@section('content')

                <button class="btn btn-default">New Category</button>

                        Name
                        Actions

                        @foreach ($categories as $category)

                                {{$category->name}}

                                    id])}}" class="btn btn-primary">Edit

                                    {!! Form::open(['url'=>"admin/categories/$category->id", 'method'=>'delete', 'style'=>'display: inline; margin-left: 5px;']) !!}
                                        {{Form::submit('Delete', ['class'=>'btn btn-danger'])}}
                                    {!! Form::close() !!}

                        @endforeach

                {{$categories->links()}}

@endsection


text:
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLFontElement
       (js_setColor, setColor, js_getColor, getColor, js_setFace, setFace,
        js_getFace, getFace, js_setSize, setSize, js_getSize, getSize,
        HTMLFontElement, castToHTMLFontElement, gTypeHTMLFontElement)
       where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, Show, Read, Eq, Ord)
import Data.Typeable (Typeable)
import GHCJS.Types (JSRef(..), JSString, castRef)
import GHCJS.Foreign (jsNull)
import GHCJS.Foreign.Callback (syncCallback, asyncCallback, syncCallback1, asyncCallback1, syncCallback2, asyncCallback2, OnBlocked(..))
import GHCJS.Marshal (ToJSRef(..), FromJSRef(..))
import GHCJS.Marshal.Pure (PToJSRef(..), PFromJSRef(..))
import Control.Monad.IO.Class (MonadIO(..))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import GHCJS.DOM.Types
import Control.Applicative ((<$>))
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName)
import GHCJS.DOM.Enums

foreign import javascript unsafe "$1[\"color\"] = $2;" js_setColor
        :: JSRef HTMLFontElement -> JSString -> IO ()

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFontElement.color Mozilla HTMLFontElement.color documentation>
setColor ::
         (MonadIO m, ToJSString val) => HTMLFontElement -> val -> m ()
setColor self val
  = liftIO (js_setColor (unHTMLFontElement self) (toJSString val))

foreign import javascript unsafe "$1[\"color\"]" js_getColor ::
        JSRef HTMLFontElement -> IO JSString

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFontElement.color Mozilla HTMLFontElement.color documentation>
getColor ::
         (MonadIO m, FromJSString result) => HTMLFontElement -> m result
getColor self
  = liftIO (fromJSString <$> (js_getColor (unHTMLFontElement self)))

foreign import javascript unsafe "$1[\"face\"] = $2;" js_setFace ::
        JSRef HTMLFontElement -> JSString -> IO ()

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFontElement.face Mozilla HTMLFontElement.face documentation>
setFace ::
        (MonadIO m, ToJSString val) => HTMLFontElement -> val -> m ()
setFace self val
  = liftIO (js_setFace (unHTMLFontElement self) (toJSString val))

foreign import javascript unsafe "$1[\"face\"]" js_getFace ::
        JSRef HTMLFontElement -> IO JSString

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFontElement.face Mozilla HTMLFontElement.face documentation>
getFace ::
        (MonadIO m, FromJSString result) => HTMLFontElement -> m result
getFace self
  = liftIO (fromJSString <$> (js_getFace (unHTMLFontElement self)))

foreign import javascript unsafe "$1[\"size\"] = $2;" js_setSize ::
        JSRef HTMLFontElement -> JSString -> IO ()

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFontElement.size Mozilla HTMLFontElement.size documentation>
setSize ::
        (MonadIO m, ToJSString val) => HTMLFontElement -> val -> m ()
setSize self val
  = liftIO (js_setSize (unHTMLFontElement self) (toJSString val))

foreign import javascript unsafe "$1[\"size\"]" js_getSize ::
        JSRef HTMLFontElement -> IO JSString

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFontElement.size Mozilla HTMLFontElement.size documentation>
getSize ::
        (MonadIO m, FromJSString result) => HTMLFontElement -> m result
getSize self
  = liftIO (fromJSString <$> (js_getSize (unHTMLFontElement self)))


text:
import os

gettext = lambda s: s
PROJECT_PATH = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0]

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    ('Dairon Medina', 'info@gydsystems.com'),
)

MANAGERS = ADMINS

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'cigars.db', # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': '',
        'PASSWORD': '',
        'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': '', # Set to empty string for default.
    }
}

# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = []

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/Chicago'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'

LANGUAGES = [
    ('en', 'English'),
    ('fr', 'French')
]

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True

# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True

# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/var/www/example.com/media/"
MEDIA_ROOT = os.path.join(PROJECT_PATH, "media")

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL = '/media/'

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = os.path.join(PROJECT_PATH, "static_server")

# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'

# Additional locations of static files
STATICFILES_DIRS = (
    os.path.join(PROJECT_PATH, "static"),
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'i@y0*^e*^vdb7zm+d&k6wh^mh5zqvrxs%)#4oxa^7q6hvuwsg8'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
    #     'django.template.loaders.eggs.Loader',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.i18n',
    'django.core.context_processors.request',
    'django.core.context_processors.media',
    'django.core.context_processors.static',
    'cms.context_processors.media',
    'sekizai.context_processors.sekizai',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    # Uncomment the next line for simple clickjacking protection:
    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'cms.middleware.page.CurrentPageMiddleware',
    'cms.middleware.user.CurrentUserMiddleware',
    'cms.middleware.toolbar.ToolbarMiddleware',
    'cms.middleware.language.LanguageCookieMiddleware',
)

ROOT_URLCONF = 'ecigar_shop.urls'

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'ecigar_shop.wsgi.application'

TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
    os.path.join(PROJECT_PATH, "templates"),
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # Uncomment the next line to enable the admin:
    'djangocms_admin_style',
    'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    'django.contrib.admindocs',
    #CMS
    'cms',
    'mptt',
    'menus',
    'south',
    'sekizai',
    #Plugins
    'cms.plugins.file',
    'cms.plugins.picture',
    'cms.plugins.text',
    'polymorphic',
    'shop',
    'shop.addressmodel',
    'shop_simplevariations',
    'apps.products',
    'apps.contact',
    #'paypal.standard.ipn',
    #'shop_paypal'

)

# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'filters': {
        'require_debug_false': {
            '()': 'django.utils.log.RequireDebugFalse'
        }
    },
    'handlers': {
        'mail_admins': {
            'level': 'ERROR',
            'filters': ['require_debug_false'],
            'class': 'django.utils.log.AdminEmailHandler'
        }
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
    }
}

CMS_TEMPLATES = (
    ('home.html', 'HomePage Template'),
   # ('product.html', 'Product Page Template'),
    #('contact.html', 'Contact Us Template'),
   # ('internal.html', 'Internal Content Template'),
)

SHOP_CART_MODIFIERS = [
    'shop_simplevariations.cart_modifier.ProductOptionsModifier',
    'shop_simplevariations.cart_modifier.TextOptionsModifier',
]

SHOP_SHIPPING_BACKENDS = ['shop.shipping.backends.flat_rate.FlatRateShipping']

SHOP_SHIPPING_FLAT_RATE = '10'  # That's just for the flat rate shipping backend

#Payment stuff
PAYPAL_RECEIVER_EMAIL = 'dairon.medina@gmail.com'
PAYPAL_CURRENCY_CODE = 'USD'


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

public class ReplaceSeriesOfIdenticalLetters
{
    internal static void Main()
    {
        string input = "aaaabbbcddddddeeffffffff               gggggfffhhhhh hhhhhf";

        Console.WriteLine(input);

        // v.1
        //var symbol = input[0];
        //StringBuilder sb = new StringBuilder(input);

        //for (int i = 1; i < sb.Length; i++)
        //{
        //    if (sb[i] == symbol)
        //    {
        //        sb.Remove(i, 1);
        //        i--;
        //    }
        //    else
        //    {
        //        symbol = sb[i];
        //    }
        //}

        //Console.WriteLine(sb.ToString());

        // v.2
        //string regex = @"(?<symbol>.|\s)\1+";
        string regex = @"(.|\s)\1+";
        //var output = Regex.Replace(input, regex, m => m.Groups["symbol"].Value, RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
        var output = Regex.Replace(input, regex, m => m.Groups[1].Value);

        Console.WriteLine(output);
    }
}


text:
import passport from 'passport'
import { facebook } from 'server/env'
import { Strategy as LocalStrategy } from 'passport-local'
import { Strategy as FacebookStrategy } from 'passport-facebook'
import userRepo from 'server/repositories/UserRepository'

passport.use(new LocalStrategy({
	usernameField: 'email'
}, authenticate))

passport.use(new FacebookStrategy({
    clientID: facebook.FACEBOOK_APP_ID,
    clientSecret: facebook.FACEBOOK_APP_SECRET,
    callbackURL: 'http://localhost:3000/auth/facebook/callback',
    profileFields: ['id', 'emails', 'name']

}, facebookAuthenticate))

function authenticate(email, password, done) {
	userRepo.login({email, password}).then((user) => {
		if (user) {
			done(null, user)
		}
		else {
			done(null, false, {message: 'Invalid credentials'})
		}
	}, done)
}

function facebookAuthenticate(accessToken, refreshToken, profile, done) {
	const { id, email, first_name, last_name } = profile._json

	userRepo.facebookLogin({ id, email, first_name, last_name }).then((user) => {
		if (user) {
			done(null, user)
		}
		else {
			done(null, false, {message: 'Invalid credentials'})
		}
	}, done)
}

passport.serializeUser((user, done) => {
	done(null, user.get('id'))
})

passport.deserializeUser((id, done) => {
	userRepo.getById(id).then((user) => {
		done(null, user)
	}, done)
})

export default passport


text:
<?php

namespace App\Model\TaskOutput;

class HtmlTextFileMessage extends TextFileMessage
{
    /**
     * @var int
     */
    private $columnNumber;

    /**
     * @param int $columnNumber
     */
    public function setColumnNumber($columnNumber)
    {
        $this->columnNumber = $columnNumber;
    }

    /**
     * @return int
     */
    public function getColumnNumber()
    {
        return $this->columnNumber;
    }
}


text:
package org.purl.template.accessor;

import org.ten60.netkernel.layer1.nkf.INKFConvenienceHelper;
import org.ten60.netkernel.layer1.nkf.INKFRequestReadOnly;
import org.ten60.netkernel.layer1.nkf.INKFResponse;
import org.ten60.netkernel.layer1.nkf.impl.NKFAccessorImpl;

import com.ten60.netkernel.container.Container;
import com.ten60.netkernel.module.ModuleDefinition;
import com.ten60.netkernel.urii.aspect.StringAspect;
import com.ten60.netkernel.util.NetKernelException;

public class TemplateAccessor extends NKFAccessorImpl {

	public TemplateAccessor() {
		super(SAFE_FOR_CONCURRENT_USE, INKFRequestReadOnly.RQT_SOURCE);
	}

	public void initialise(Container container, ModuleDefinition moduledef) {
		try {
			super.initialise(container, moduledef);
			System.out.println("Performing initialization");
		} catch(NetKernelException nkfe) {
			nkfe.printStackTrace();
		}
	}

	public void processRequest(INKFConvenienceHelper context) throws Exception {
		String path=context.getThisRequest().getArgument("path");
		INKFResponse resp = null;

		String[] parts=path.split("/");
		for(int i = 0; i < parts.length; i++) {
			System.out.println(parts[i]);
		}

		if(parts[parts.length-1].equals("initialize")) {
			resp = context.createResponseFrom(new StringAspect("<initialized/>"));
			context.setResponse(resp);
			return;
		}

		switch(parts.length) {
		case 3:
			// Expecting ffcpl:/template/<something>
			resp = context.createResponseFrom(new StringAspect("<hello>template</hello>"));
			//resp = context.createResponseFrom(new TemplateAspect(new Template(3)));
			resp.setCacheable();
			resp.setMimeType("text/xml");
			break;
		default :
			resp = generateError(context, "Expecting path of ffcpl:/template/something");
		}

		context.setResponse(resp);
	}

	private INKFResponse generateError(INKFConvenienceHelper context,String message) {
		INKFResponse retValue = context.createResponseFrom( new StringAspect("<error message=\"" + message + "\"/>"));
		retValue.setMimeType("text/xml");
		return retValue;
	}
}


text:
package com.otiasj.rockmore;

/**
 * Created by juliensaito on 4/12/16.
 */
public interface SensorListener {
    void onSensorChanged(final int typeMagneticField, final float value);
}


text:
package me.hatter.tools.filesync.main;

public class Server {

    public static void main(String[] args) {

    }
}


text:
from ctypes import POINTER, Structure, Union, byref, c_ulong, create_unicode_buffer, sizeof, windll
from ctypes.wintypes import BOOL, DWORD, FILETIME, LPVOID, WCHAR

from azure.cli.command_modules.acs.proxy import Proxy

LPWSTR = POINTER(WCHAR)
HINTERNET = LPVOID

# TODO: this file is deprecated, will remove this after container service commands (acs) are removed during
# the next breaking change window.

class WinProxy(Proxy):
    INTERNET_PER_CONN_PROXY_SERVER = 2
    INTERNET_OPTION_REFRESH = 37
    INTERNET_OPTION_SETTINGS_CHANGED = 39
    INTERNET_OPTION_PER_CONNECTION_OPTION = 75
    INTERNET_PER_CONN_PROXY_BYPASS = 3
    INTERNET_PER_CONN_FLAGS = 1

    def set_http_proxy(self, host, port):
        """
        Sets the HTTP proxy on Windows
        """
        setting = create_unicode_buffer(host + ':' + str(port))
        self._set_internet_options(setting)

    def disable_http_proxy(self):
        """
        Disables the HTTP proxy on Windows
        """
        self._set_internet_options(None, False)

    def _set_internet_options(self, setting, on=True):
        """
        Sets internet options with the wininet API
        """
        internet_set_option = windll.wininet.InternetSetOptionW
        internet_set_option.argtypes = [LPVOID, DWORD, LPVOID, DWORD]
        internet_set_option.restype = BOOL

        option_list = InternetPerConnOptionList()
        option = (InternetPerConnOption * 3)()
        size = c_ulong(sizeof(InternetPerConnOptionList))

        option[0].dwOption = self.INTERNET_PER_CONN_FLAGS
        option[0].Value.dwValue = (2 if on else 1)
        option[1].dwOption = self.INTERNET_PER_CONN_PROXY_SERVER
        option[1].Value.pszValue = setting
        option[2].dwOption = self.INTERNET_PER_CONN_PROXY_BYPASS
        option[2].Value.pszValue = create_unicode_buffer('<-loopback>')

        option_list.dwSize = sizeof(InternetPerConnOptionList)
        option_list.pszConnection = None
        option_list.dwOptionCount = 3
        option_list.dwOptionError = 0
        option_list.pOptions = option

        internet_set_option(None, self.INTERNET_OPTION_PER_CONNECTION_OPTION, byref(option_list), size)
        internet_set_option(None, self.INTERNET_OPTION_SETTINGS_CHANGED, None, 0)
        internet_set_option(None, self.INTERNET_OPTION_REFRESH, None, 0)

# pylint: disable=too-few-public-methods
class InternetPerConnOption(Structure):
    class Value(Union):
        _fields_ = [
            ('dwValue', DWORD),
            ('pszValue', LPWSTR),
            ('ftValue', FILETIME),
        ]

    _fields_ = [
        ('dwOption', DWORD),
        ('Value', Value),
    ]

class InternetPerConnOptionList(Structure):
    _fields_ = [
        ('dwSize', DWORD),
        ('pszConnection', LPWSTR),
        ('dwOptionCount', DWORD),
        ('dwOptionError', DWORD),
        ('pOptions', POINTER(InternetPerConnOption)),
    ]

    dwSize = None
    pszConnection = None
    dwOptionCount = None
    dwOptionError = None
    pOptions = None


text:
include $(POCO_BASE)/build/rules/global

objects = SMTPLogger

target         = SMTPLogger
target_version = 1
target_libs    = PocoNet PocoFoundation

include $(POCO_BASE)/build/rules/exec

ifdef POCO_UNBUNDLED
        SYSLIBS += -lz
endif


text:
package org.hawkular.agent.monitor.storage;

import org.hawkular.agent.monitor.api.MetricDataPayloadBuilder;
import org.hawkular.metrics.client.common.MetricType;

/**
 * Allows one to build up a payload request to send to Hawkular by adding
 * data points one by one.
 */
public class HawkularMetricDataPayloadBuilder implements MetricDataPayloadBuilder {

    private MetricsOnlyMetricDataPayloadBuilder metricsOnlyMetricPayloadBuilder =
            new MetricsOnlyMetricDataPayloadBuilder();

    @Override
    public void addDataPoint(String key, long timestamp, double value, MetricType metricType) {
        metricsOnlyMetricPayloadBuilder.addDataPoint(key, timestamp, value, metricType);
    }

    @Override
    public int getNumberDataPoints() {
        return metricsOnlyMetricPayloadBuilder.getNumberDataPoints();
    }

    @Override
    public String toPayload() {
        return metricsOnlyMetricPayloadBuilder.toPayload();
    }
}


text:
layout: post
title: guitar music target
date: 2015-04-05
comments: false
categories:
 - music
---
Love to be loved by you!


text:
@echo off

call mvn dependency:copy-dependencies
call java -cp "target\dependency\*;target\classes" org.neo4j.index.impl.lucene.DumpLogicalLog %*


text:
import benchmarkRunner from '@fontoxml/fonto-benchmark-runner';
import { Document } from 'slimdom';
import { domFacade, evaluateXPath } from '../src/index';

let document: Document;

function setup() {
	document = new Document();
}

benchmarkRunner.addBenchmark(
	'evaluateXPath',
	() => {
		evaluateXPath('true()', document, domFacade);
	},
	setup
);


text:
using Microsoft.AspNet.SignalR;
using Mobet.Dependency;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mobet.Web.SignalR
{
    public class SignalRDependencyResolver : DefaultDependencyResolver
    {

        public override object GetService(Type serviceType)
        {

            return IocManager.Instance.IsRegistered(serviceType)
                ? IocManager.Instance.Resolve(serviceType)
                : base.GetService(serviceType);
        }
    }
}


text:
import lombok.NonNull;

/**
 * @author Erich Eichinger
 * @since 21/03/2016
 */
enum JCurlEngineType {
    URL(new UrlEngine()),
    HC(new HCEngine()),
    HCNIO(new HCNIOEngine()),
    NNIO(new NNIOEngine()),
    OKHTTP(new OkHttpEngine()),
    JETTY(new JettyEngine());

    private final Engine engine;

    public Engine getEngine() {
        return engine;
    }

    JCurlEngineType(@NonNull Engine engine) {
        this.engine = engine;
    }
}


text:
% Counts the number of multiple edges in the graph.
%
% INPUT: adjacency matrix, nxn
% OUTPUT: integer, number of multiple edges
%
% Examples: multiEdges([0 2; 2 0])=1, and multiEdges([0 0 1; 2 0 0; 0 1 0])=1
%
% Note 1: The definition of number of multi-arcs/edges (node pairs
% that have multiple edges across them) here is: mA = length(find(adj>1))
% (normalized by 2 depending on whether the graph is directed).
% Note 2: This creates a natural difference in counting for
% undirected and directed graphs.
%
% Other routines used: isSymmetric.m
% GB: last updated, Sep 26 2014

function mE=multiEdges(adj)

if isSymmetric(adj) % here use "is symmetric" as surrogate for "is directed"
  mE=length(find(adj>1))/2;
else
  mE=length(find(adj>1));
end


text:
function [Sigma,Alpsup,w0,pos,nbsv,SigmaH,obj] = mklmulticlass(K,yapp,C,nbclass,option,verbose)

% USAGE [Sigma,Alpsup,w0,pos,Time,SigmaH,obj] = mkladapt(K,yapp,C,option,verbose)
%
% Input
% K         : NxNxD matrix containing all the Gram Matrix
% yapp      : training labels
% C         : SVM hyperparameter
% nbclass   : nb of classes in the problem
% verbose   : verbosity of algorithm
% option    : mkl algorithm hyperparameter
%
%       option.nbitermax : maximal number of iterations (default 1000)
%       option.algo      : selecting algorithm svmclass (default) or svmreg
%       option.seuil     : threshold for zeroing kernel coefficients
%                          (default 1e-12)
%       option.sigmainit  : initial kernel coefficient (default average)
%       option.alphainit : initial Lagrangian coefficient
%

[n] = length(yapp);
if ~isempty(K)
    if size(K,3)>1
        nbkernel=size(K,3);
        if option.efficientkernel==1
            K = build_efficientK(K);
        end;
    elseif option.efficientkernel==1 & isstruct(K);
        nbkernel=K.nbkernel;
    end;
else
    error('No kernels defined ...');
end;

if ~isfield(option,'nbitermax');
    nloopmax=1000;
else
    nloopmax=option.nbitermax;
end;
if ~isfield(option,'algo');
    option.algo='oneagainstall';
end;
if ~isfield(option,'seuil');
    seuil=1e-12;
else
    seuil=option.seuil;
end
if ~isfield(option,'lambdareg');
    lambdareg=1e-10;
    option.lambdareg=1e-10;
else
    lambdareg=option.lambdareg;
end

if ~isfield(option,'verbosesvm');
    verbosesvm=0;
    option.verbosesvm=0;
else
    verbosesvm=option.verbosesvm;
end

if ~isfield(option,'sigmainit');
    Sigma=ones(1,nbkernel)/nbkernel;
else
    Sigma=option.sigmainit ;
    ind=find(Sigma==0);
end;

if isfield(option,'alphainit');
    alphainit=option.alphainit;
else
    alphainit=[];
end;
%--------------------------------------------------------------------------------
% Options used in subroutines
%--------------------------------------------------------------------------------
if ~isfield(option,'goldensearch_deltmax');
    option.goldensearch_deltmax=1e-1;
end
if ~isfield(option,'goldensearchmax');
    optiongoldensearchmax=1e-8;
end;
if ~isfield(option,'firstbasevariable');
    option.firstbasevariable='first';
end;

%------------------------------------------------------------------------------%
% Initialize
%------------------------------------------------------------------------------%

kernel       = 'numerical';
span         = 1;
nloop = 0;
loop = 1;
goldensearch_deltmaxinit= option.goldensearch_deltmax;

% if option.efficientkernel==1
%     K = build_efficientK(K);
% end;

if nargout>=8,
    SigmaH = zeros(nloopmax,d);
end;

% Initializing SVM
t = cputime ;
SumSigma=sum(Sigma);
if ~isempty(K)
    kerneloption.matrix=sumKbeta(K,Sigma);
end;

switch option.algo
    case 'oneagainstall'

        [xsup,Alpsup,w0,nbsv,pos,obj]=svmmulticlassoneagainstall([],yapp,nbclass,C,lambdareg,kernel,kerneloption,verbosesvm);
     [grad] = gradsvmoneagainstall(K,pos,Alpsup,yapp,nbsv,option);

    case 'oneagainstone'
        [xsup,Alpsup,w0,nbsv,aux,pos,obj]=svmmulticlassoneagainstone([],yapp,nbclass,C,lambdareg,kernel,kerneloption,verbosesvm);
[grad] = gradsvmoneagainstone(K,pos,Alpsup,yapp,nbsv,option);

end;

Sigmaold  = Sigma ;
Alpsupold = Alpsup ;
w0old     = w0;
posold    = pos ;
history.obj=[];
history.sigma=[];
history.KKTconstraint=[1];
history.dualitygap=[];

%------------------------------------------------------------------------------%
% Update loop
%------------------------------------------------------------------------------%
if nloopmax==0
    SigmaH=[];
    return
end;
while loop ; nloop = nloop+1;

    SigmaH(nloop,:) = Sigma;
    history.sigma= [history.sigma;Sigma];
    history.obj=[history.obj obj];

    %---------------------------------------------
    % Update Sigma
    %---------------------------------------------
    t = cputime ;
    [Sigma,Alpsup,w0,pos,nbsv,obj] = mklmulticlassupdate(K,Sigma,pos,Alpsup,w0,C,yapp,nbclass,nbsv,grad,obj,option) ;
    %-----------------------------------------
    % Thresholding
    %-----------------------------------------

    if seuil ~=0 & max(Sigma)>seuil & nloop < option.seuilitermax
        Sigma=(Sigma.*(Sigma>seuil))*SumSigma/sum(Sigma.*(Sigma>seuil));
    end;

    %-------------------------------
    % Numerical cleaning
    %-------------------------------
    Sigma(find(abs(Sigma<option.numericalprecision)))=0;
    Sigma=Sigma/sum(Sigma);
    %-----------------------------------------------------------
    % Enhance accuracy of line search if necessary
    %-----------------------------------------------------------
    if max(abs(Sigma-Sigmaold))<option.numericalprecision & option.goldensearch_deltmax > optiongoldensearchmax
        option.goldensearch_deltmax=option.goldensearch_deltmax/10;
    elseif option.goldensearch_deltmax~=goldensearch_deltmaxinit
        option.goldensearch_deltmax*10;
    end;
    %-----------------------------------------------------------
    % Enhance accuracy of line search if necessary
    %-----------------------------------------------------------
    if max(abs(Sigma-Sigmaold))==0 & option.goldensearch_deltmax > 1e-12
        option.goldensearch_deltmax=option.goldensearch_deltmax/10;
    elseif option.goldensearch_deltmax~=goldensearch_deltmaxinit
        option.goldensearch_deltmax*10;
    end;

    %----------------------------------------------------
    % process approximate KKT conditions
    %----------------------------------------------------
    switch option.algo
        case 'oneagainstall'
    [grad] = gradsvmoneagainstall(K,pos,Alpsup,yapp,nbsv,option);
        case 'oneagainstone';
                [grad] = gradsvmoneagainstone(K,pos,Alpsup,yapp,nbsv,option);

    end;

    indpos=find(Sigma>option.numericalprecision);
    indzero=find(abs(Sigma<=option.numericalprecision));

    KKTconstraint=abs ((min(grad(indpos))-max(grad(indpos)))/min(grad(indpos))) ;
    KKTconstraintZero=  ( min(grad(indzero))>  max(grad(indpos)) );

    history.KKTconstraint=[history.KKTconstraint KKTconstraint];

    %----------------------------------------------------
    % process duality gap
    %----------------------------------------------------
    normek=-2*grad ; % Alpsup'*K(pos,pos,i)*Alpsup;
    dualitygap=1; %(obj +  0.5* max(normek) - sum(abs(Alpsup)))/obj;
    history.dualitygap=[history.dualitygap dualitygap];

    %------------------------------------------
    %  verbosity
    %------------------------------------------
    if verbose
        if nloop == 1 || rem(nloop,10)==0
            fprintf('--------------------------------------\n');
            fprintf('Iter | Obj.    | DiffBetas | KKT C    |\n');
            fprintf('---------------------------------------\n');
        end;
        fprintf('%d   | %8.4f | %6.4f   | %6.4f |\n',[nloop obj   max(abs(Sigma-Sigmaold)) KKTconstraint]);
    end

    %----------------------------------------------------
    % check variation of Sigma conditions
    %----------------------------------------------------
    if  option.stopvariation==1 & option.stopKKT== 0 & max(abs(Sigma - Sigmaold))<option.seuildiffsigma;
        loop = 0;
        fprintf(1,'variation convergence criteria reached \n');
        history.sigma= [history.sigma;Sigma];
        history.obj=[history.obj obj];
    end;
    %----------------------------------------------------
    % check approximate KKT conditions
    %----------------------------------------------------
    if  option.stopKKT==1 &  option.stopvariation== 0 & ( KKTconstraint < option.seuildiffconstraint & KKTconstraintZero  )
        loop = 0;
        fprintf(1,'KKT convergence criteria reached \n');
        history.sigma= [history.sigma;Sigma];
        history.obj=[history.obj obj];
    end;

    %----------------------------------------------------
    % check KKT and variation of Sigma conditions
    %----------------------------------------------------
    if  option.stopKKT== 1 & option.stopvariation== 1 & max(abs(Sigma - Sigmaold))<option.seuildiffsigma &  ( KKTconstraint < option.seuildiffconstraint & KKTconstraintZero  )
        loop = 0;
        fprintf(1,'variation and KKT convergence criteria reached \n');

        history.sigma= [history.sigma;Sigma];
        history.obj=[history.obj obj];
    end;

    %----------------------------------------------------
    % check duality gap
    %----------------------------------------------------
    if  option.stopdualitygap== 1 & dualitygap < option.seuildualitygap
        loop = 0;
        fprintf(1,'Duality gap criteria reached \n');

        history.sigma= [history.sigma;Sigma];
        history.obj=[history.obj obj];
    end;

    %----------------------------------------------------
    % check for premature convergence
    %----------------------------------------------------

    if  max(abs(Sigma-Sigmaold))<option.numericalprecision & (length(indpos)==1 | abs(max(Sigma(indpos))-1) < option.numericalprecision) ...
            & option.goldensearch_deltmax <=optiongoldensearchmax
        loop=0;
        history.sigma= [history.sigma;Sigma];
        history.obj=[history.obj obj];
        status=1;
        fprintf(1,'Premature Convergence KKT- Duality Gap Not Satisfied\n');
    end;

    %-----------------------------------------------------
    % check nbiteration conditions
    %----------------------------------------------------
    if nloop>=nloopmax ,
        loop = 0;
        history.sigma= [history.sigma;Sigma];
        history.obj=[history.obj obj];
        status=2;
        fprintf(1,'maximum number of iterations reached\n')
    end;
    if nloop < option.miniter & loop==0
        loop=1;
    end;

    %-----------------------------------------------------
    % Updating Variables
    %----------------------------------------------------

    Sigmaold  = Sigma ;
    Alpsupold = Alpsup ;
    w0old     = w0;
    posold    = pos ;

end;


text:
package com.gs.collections.api.multimap.list;

import com.gs.collections.api.list.MutableList;
import com.gs.collections.api.multimap.MutableMultimap;

/**
 * @since 1.0
 */
public interface MutableListMultimap<K, V>
        extends ListMultimap<K, V>, MutableMultimap<K, V>
{
    MutableList<V> replaceValues(K key, Iterable<? extends V> values);

    MutableList<V> removeAll(Object key);

    MutableListMultimap<K, V> newEmpty();

    MutableList<V> get(K key);

    MutableListMultimap<K, V> toMutable();

    ImmutableListMultimap<K, V> toImmutable();
}


text:
package org.apache.accumulo.server.rpc;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.apache.accumulo.core.conf.Property;
import org.junit.jupiter.api.Test;

public class ThriftServerTypeTest {

  @Test
  public void testDefaultServer() {
    assertEquals(ThriftServerType.CUSTOM_HS_HA,
        ThriftServerType.get(Property.GENERAL_RPC_SERVER_TYPE.getDefaultValue()));
  }

  @Test
  public void testSpecialServer() {
    assertEquals(ThriftServerType.THREADPOOL, ThriftServerType.get("threadpool"));
  }

}


text:
package org.apache.druid.query.groupby.epinephelinae.vector;

import com.google.common.base.Preconditions;
import org.apache.druid.segment.VectorColumnProcessorFactory;
import org.apache.druid.segment.column.ColumnCapabilities;
import org.apache.druid.segment.column.ValueType;
import org.apache.druid.segment.vector.MultiValueDimensionVectorSelector;
import org.apache.druid.segment.vector.SingleValueDimensionVectorSelector;
import org.apache.druid.segment.vector.VectorValueSelector;

public class GroupByVectorColumnProcessorFactory implements VectorColumnProcessorFactory<GroupByVectorColumnSelector>
{
  private static final GroupByVectorColumnProcessorFactory INSTANCE = new GroupByVectorColumnProcessorFactory();

  private GroupByVectorColumnProcessorFactory()
  {
    // Singleton.
  }

  public static GroupByVectorColumnProcessorFactory instance()
  {
    return INSTANCE;
  }

  @Override
  public GroupByVectorColumnSelector makeSingleValueDimensionProcessor(
      final ColumnCapabilities capabilities,
      final SingleValueDimensionVectorSelector selector
  )
  {
    Preconditions.checkArgument(
        ValueType.STRING == capabilities.getType(),
        "groupBy dimension processors must be STRING typed"
    );
    return new SingleValueStringGroupByVectorColumnSelector(selector);
  }

  @Override
  public GroupByVectorColumnSelector makeMultiValueDimensionProcessor(
      final ColumnCapabilities capabilities,
      final MultiValueDimensionVectorSelector selector
  )
  {
    Preconditions.checkArgument(
        ValueType.STRING == capabilities.getType(),
        "groupBy dimension processors must be STRING typed"
    );
    throw new UnsupportedOperationException("Multi-value dimensions not yet implemented for vectorized groupBys");
  }

  @Override
  public GroupByVectorColumnSelector makeFloatProcessor(
      final ColumnCapabilities capabilities,
      final VectorValueSelector selector
  )
  {
    if (capabilities.hasNulls().isFalse()) {
      return new FloatGroupByVectorColumnSelector(selector);
    }
    return new NullableFloatGroupByVectorColumnSelector(selector);
  }

  @Override
  public GroupByVectorColumnSelector makeDoubleProcessor(
      final ColumnCapabilities capabilities,
      final VectorValueSelector selector
  )
  {
    if (capabilities.hasNulls().isFalse()) {
      return new DoubleGroupByVectorColumnSelector(selector);
    }
    return new NullableDoubleGroupByVectorColumnSelector(selector);
  }

  @Override
  public GroupByVectorColumnSelector makeLongProcessor(
      final ColumnCapabilities capabilities,
      final VectorValueSelector selector
  )
  {
    if (capabilities.hasNulls().isFalse()) {
      return new LongGroupByVectorColumnSelector(selector);
    }
    return new NullableLongGroupByVectorColumnSelector(selector);
  }
}


text:
//
//  PACPelvisSideViewController.m
//  Pilates Postural Analysis Checklist
//
//  Created by Paul Hoffman on 10/23/14.
//  Copyright (c) 2014 Paul Hoffman. All rights reserved.
//

#import "PACPelvisSideViewController.h"
#import "PACGlobal.h"

enum {
	tagContentView = 100
	, tagTableView
};

enum {
	tableViewRowLeftPelvis = 0
	, tableViewRowRightPelvis = 1
	, tableViewRowCount
};
static NSString* cell_identifier = @"pelvis-side-cell";

@interface PACPelvisSideViewController ()
-(void) segmentvaluechanged:(id)sender;
@end

@implementation PACPelvisSideViewController

- (void)viewDidLoad {
	[super viewDidLoad];
	// Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
	[super didReceiveMemoryWarning];
	// Dispose of any resources that can be recreated.
}

/*
   #pragma mark - Navigation

   // In a storyboard-based application, you will often want to do a little preparation before navigation
   - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
   }
 */

-(void) loadView
{
	[super loadView];

	self.navigationItem.title = @"Pelvis - Side";

	CGRect frame = self.view.frame;
	float fy = 5.0f;
	float fgutter = 5.0f;

	UIScrollView* content_view = [[UIScrollView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, frame.size.width, frame.size.height)];
	content_view.tag = tagContentView;
	content_view.backgroundColor = [UIColor whiteColor];

	UIImage* image = [UIImage imageNamed:@"pelvisside_detail.gif"];

	UIImageView* image_view = [[UIImageView alloc] initWithFrame:CGRectMake( (frame.size.width / 2.0f) - (image.size.width / 2.0f), fy, image.size.width, image.size.height)];
	image_view.image = image;
	[content_view addSubview:image_view];

	fy = fy + image.size.height + fgutter;

	UIImage* look = [UIImage imageNamed:@"look.jpg"];
	UIImageView* look_view = [[UIImageView alloc] initWithFrame:CGRectMake( 5.0f, fy, look.size.width, look.size.height )];
	look_view.image = look;
	[content_view addSubview:look_view];

	UIImage* touch = [UIImage imageNamed:@"touch.jpg"];
	UIImageView* touch_view = [[UIImageView alloc] initWithFrame:CGRectMake( 7.0f + look.size.width, fy, touch.size.width, touch.size.height )];
	touch_view.image = touch;
	[content_view addSubview:touch_view];

	fy = fy + look.size.height + fgutter;

	UITableView* tableView = [[UITableView alloc] initWithFrame:CGRectMake(3.0f, fy + 30.0f, frame.size.width - 3.0f, 220.0f) style:UITableViewStyleGrouped];
	tableView.tag = tagTableView;
	tableView.dataSource = self;
	tableView.delegate = self;
	tableView.scrollEnabled = NO;
	[content_view addSubview:tableView];

	[tableView registerClass:[UITableViewCell class ] forCellReuseIdentifier:cell_identifier];

	fy = fy + 220.0f + 30.0f + fgutter;

	[self.view addSubview:content_view];

}
#pragma mark -
#pragma mark UITableViewDataSource
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
	UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cell_identifier forIndexPath:indexPath];

	if (cell == nil) {
		cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 /*UITableViewCellStyleDefault*/ reuseIdentifier:cell_identifier];
		cell.accessoryView = nil;
	}

	if(!cell.accessoryView) {
		UISegmentedControl *segment = [[UISegmentedControl alloc] init];
		segment.frame = CGRectMake(0,0,200,30);
		segment.tag   = indexPath.row;
		[segment insertSegmentWithTitle:@"Neutral" atIndex:0 animated:NO];
		[segment insertSegmentWithTitle:@"Ant Tilt" atIndex:1 animated:NO];
		[segment insertSegmentWithTitle:@"Post Tilt"  atIndex:2 animated:NO];
		[segment addTarget:self action:@selector(segmentvaluechanged:) forControlEvents:UIControlEventValueChanged];

		cell.accessoryView = segment;
	}

	[cell setSelectionStyle:UITableViewCellSelectionStyleNone];

	switch(indexPath.row) {
	case tableViewRowLeftPelvis:
		cell.textLabel.text = @"Left";
		((UISegmentedControl*)cell.accessoryView).selectedSegmentIndex = PACPelvisSideAlignmentLeft;
		break;
	case tableViewRowRightPelvis:
		cell.textLabel.text = @"Right";
		((UISegmentedControl*)cell.accessoryView).selectedSegmentIndex = PACPelvisSideAlignmentRight;
		break;
	}

	return cell;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
	return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
	return tableViewRowCount;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
	UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0f, tableView.frame.size.width, 42.0f)];
	label.backgroundColor = [UIColor clearColor];
	label.textColor = [UIColor blackColor];
	label.font = [UIFont boldSystemFontOfSize:16.0];
	label.text = NSLocalizedString(@"●Palpate ASIS and PSIS and compare to horizontal plane", @"");
	label.numberOfLines = 0;
	label.lineBreakMode = NSLineBreakByWordWrapping;
	return label;

}
-(CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section
{
	return 44.0f;
}
#pragma mark -
#pragma mark UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
}
#pragma mark -
-(void) segmentvaluechanged:(id)sender
{
	UISegmentedControl *segment = (UISegmentedControl*)sender;

	switch(segment.tag) {
	case tableViewRowLeftPelvis:
		PACPelvisSideAlignmentLeft = (int)segment.selectedSegmentIndex;
		break;
	case tableViewRowRightPelvis:
		PACPelvisSideAlignmentRight = (int)segment.selectedSegmentIndex;
		break;
	}

	if(PACPelvisSideAlignmentRight > -1 && PACPelvisSideAlignmentLeft > -1) {
		if(!((PACChecklistSideView & sideViewCheckListPelvis) == sideViewCheckListPelvis)) {
			PACChecklistSideView |= sideViewCheckListPelvis;
			[[NSNotificationCenter defaultCenter] postNotificationName:[NSString stringWithUTF8String:PACCheckListSideViewDidChange] object:nil];
		}
	} else {
		if((PACChecklistSideView & sideViewCheckListPelvis) == sideViewCheckListPelvis) {
			PACChecklistSideView &= ~sideViewCheckListPelvis;
			[[NSNotificationCenter defaultCenter] postNotificationName:[NSString stringWithUTF8String:PACCheckListSideViewDidChange] object:nil];
		}

	}
}
@end


text:
package ca.uhn.fhir.parser.i391;

import ca.uhn.fhir.model.api.IValueSetEnumBinder;

class OutcomeBinder implements IValueSetEnumBinder<OutcomeEnum> {

    @Override
    public OutcomeEnum fromCodeString(String theCodeString) {
        if (theCodeString.equals("item1")) {
            return OutcomeEnum.ITEM1;
        } else {
            return OutcomeEnum.ITEM2;
        }
    }

    @Override
    public String toCodeString(OutcomeEnum theEnum) {
        if (theEnum.equals(OutcomeEnum.ITEM1)){
            return "item1";
        }else{
            return "item2";
        }
    }

    @Override
    public String toSystemString(OutcomeEnum theEnum) {
        return "system";
    }

    @Override
    public OutcomeEnum fromCodeString(String theCodeString, String theSystemString) {
        return fromCodeString(theCodeString);
    }
}


text:
/*
 * CompilerFactory.cpp
 *
 * Implementation file
 *
 * Author: Elad Raz <e@eladraz.com>
 */
#include "compiler/stdafx.h"
#include "compiler/CompilerFactory.h"
#include "compiler/OptimizerCompilerInterface.h"
#include "compiler/OptimizerOperationCompilerInterface.h"
#include "compiler/processors/arm/ARMCompilerInterface.h"
#include "compiler/processors/arm/THUMBCompilerInterface.h"
#include "compiler/processors/ia32/IA32CompilerInterface.h"
#include "compiler/processors/c/32C.h"

class IA32MemoryLayout : public MemoryLayoutInterface
{
    virtual uint pointerWidth() const
    {
        return sizeof(uint32);
    }

    virtual uint align(uint size) const
    {
        return size;
    }
};

class ARMMemoryLayout : public MemoryLayoutInterface
{
    virtual uint pointerWidth() const
    {
        return sizeof(uint32);
    }

    virtual uint align(uint size) const
    {
        return Alignment::alignUpToDword(size);
    }
};

CompilerInterfacePtr CompilerFactory::getCompiler(CompilerType type, const FrameworkMethods& framework, const CompilerParameters& params /* = CompilerInterface::defaultParameters */)
{
    CompilerInterface* pCompiler = NULL;
    switch(type)
    {
    case COMPILER_IA32:
        pCompiler = new IA32CompilerInterface(framework, params);
        break;
    case COMPILER_32C:
        pCompiler = new c32CCompilerInterface(framework, params);
        break;
    case COMPILER_ARM:
        pCompiler = new ARMCompilerInterface(framework, params);
        break;
    case COMPILER_THUMB:
        pCompiler = new THUMBCompilerInterface(framework, params);
        break;
    default:
        CHECK_FAIL();
    }

    if (params.m_bEnableOptimizations)
    {
        // Wrap the real arch-compiler with an optimizer compiler
        OptimizerOperationCompilerInterface* pOptimizee = dynamic_cast<OptimizerOperationCompilerInterface*>(pCompiler);

        // If the dynamic cast failed, then this arch does not support optimizations...
        if (pOptimizee == NULL)
            XSTL_THROW(ClrRuntimeException, XSTL_STRING("This architecture-compiler does not support optimizations"));

        return CompilerInterfacePtr(new OptimizerCompilerInterface(OptimizerOperationCompilerInterfacePtr(pOptimizee)));
    }

    // return the real arch-compiler
    return CompilerInterfacePtr(pCompiler);
}

MemoryLayoutInterfacePtr CompilerFactory::getMemoryLayout(CompilerType type)
{
    switch(type)
    {
    case COMPILER_IA32:
        return MemoryLayoutInterfacePtr(new IA32MemoryLayout());
    case COMPILER_32C:
        return MemoryLayoutInterfacePtr(new IA32MemoryLayout());
    case COMPILER_ARM:
        return MemoryLayoutInterfacePtr(new ARMMemoryLayout());
    case COMPILER_THUMB:
        return MemoryLayoutInterfacePtr(new ARMMemoryLayout());
    default:
        CHECK_FAIL();
        break;
    }
    return MemoryLayoutInterfacePtr(NULL);
}


text:
namespace Xenon
{

	namespace GPU
	{

		class GeometryShader : public IShader, public Red::Util :: RefCounted
		{
		public:

			GeometryShader ( const std :: string & Source, const std :: string & Name = "GeometryShader_Undefined" );

			~GeometryShader ();

			void GPUResourceAlloc ();
			void GPUResourceFree ();

			bool GPUResourceAllocated ();

			const std :: string & GetName ();

			bool Compile ( bool StoreCompilationLog = false, bool FreeSource = true );

			const std :: string & GetCompilationLog ();
			void FreeCompilationLog ();

		private:

			GLuint GetSHandle ();

			std :: string ShaderCode;

			GLuint SHandle;

			bool Allocated;
			bool Compiled;

			std :: string CompileLog;

			const std :: string Name;

		};

	}

}

#endif


text:
namespace ash {

namespace {

// The maximum number of children that a folder is allowed to have. The
// restriction was a result of UI restrictions for paged folder views, with a
// goal to reduce size taken by the page switcher within the folder UI. While
// this is not relevant concern when the folder items grid is scrollabe, the
// restriction is kept to reduce risk of creating overflown folders via sync on
// devices that do not yet use scrollable folder UI.
constexpr int kMaxFolderChildren = 48;

}  // namespace

AppListItem::AppListItem(const std::string& id)
    : metadata_(std::make_unique<AppListItemMetadata>()) {
  metadata_->id = id;
}

AppListItem::~AppListItem() {
  for (auto& observer : observers_)
    observer.ItemBeingDestroyed();
}

void AppListItem::SetIcon(AppListConfigType config_type,
                          const gfx::ImageSkia& icon) {
  per_config_icons_[config_type] = icon;

  for (auto& observer : observers_)
    observer.ItemIconChanged(config_type);
}

const gfx::ImageSkia& AppListItem::GetIcon(
    AppListConfigType config_type) const {
  const auto& it = per_config_icons_.find(config_type);
  if (it != per_config_icons_.end())
    return it->second;

  // If icon for requested config cannt be found, default to the shared config
  // icon.
  return metadata_->icon;
}

void AppListItem::SetDefaultIconAndColor(const gfx::ImageSkia& icon,
                                         const IconColor& color) {
  metadata_->icon = icon;
  metadata_->icon_color = color;

  // If the item does not have a config specific icon, it will be represented by
  // the (possibly scaled) default icon, which means that changing the default
  // icon will also change item icons for configs that don't have a designated
  // icon.
  for (auto config_type :
       AppListConfigProvider::Get().GetAvailableConfigTypes()) {
    if (per_config_icons_.find(config_type) == per_config_icons_.end()) {
      for (auto& observer : observers_)
        observer.ItemIconChanged(config_type);
    }
  }
}

const gfx::ImageSkia& AppListItem::GetDefaultIcon() const {
  return metadata_->icon;
}

const IconColor& AppListItem::GetDefaultIconColor() const {
  return metadata_->icon_color;
}

void AppListItem::SetIconVersion(int icon_version) {
  if (metadata_->icon_version == icon_version)
    return;

  // Clears last set icon if any. AppIconLoadHelper use that to decide
  // whether to trigger an icon load when it is created with UI.
  metadata_->icon = gfx::ImageSkia();

  metadata_->icon_version = icon_version;
  for (auto& observer : observers_) {
    observer.ItemIconVersionChanged();
  }
}

void AppListItem::SetNotificationBadgeColor(const SkColor color) {
  metadata_->badge_color = color;
  for (auto& observer : observers_) {
    observer.ItemBadgeColorChanged();
  }
}

void AppListItem::AddObserver(AppListItemObserver* observer) {
  observers_.AddObserver(observer);
}

void AppListItem::RemoveObserver(AppListItemObserver* observer) {
  observers_.RemoveObserver(observer);
}

const char* AppListItem::GetItemType() const {
  static const char* app_type = "";
  return app_type;
}

AppListItem* AppListItem::FindChildItem(const std::string& id) {
  return nullptr;
}

AppListItem* AppListItem::GetChildItemAt(size_t index) {
  return nullptr;
}

size_t AppListItem::ChildItemCount() const {
  return 0;
}

bool AppListItem::IsFolderFull() const {
  return is_folder() && ChildItemCount() >= kMaxFolderChildren;
}

std::string AppListItem::ToDebugString() const {
  return id().substr(0, 8) + " '" + (is_page_break() ? "page_break" : name()) +
         "'" + " [" + position().ToDebugString() + "]";
}

// Protected methods

void AppListItem::SetName(const std::string& name) {
  if (metadata_->name == name && (short_name_.empty() || short_name_ == name))
    return;
  metadata_->name = name;
  short_name_.clear();
  for (auto& observer : observers_)
    observer.ItemNameChanged();
}

void AppListItem::SetNameAndShortName(const std::string& name,
                                      const std::string& short_name) {
  if (metadata_->name == name && short_name_ == short_name)
    return;
  metadata_->name = name;
  short_name_ = short_name;
  for (auto& observer : observers_)
    observer.ItemNameChanged();
}

void AppListItem::UpdateNotificationBadge(bool has_badge) {
  if (has_notification_badge_ == has_badge)
    return;

  has_notification_badge_ = has_badge;
  for (auto& observer : observers_) {
    observer.ItemBadgeVisibilityChanged();
  }
}

void AppListItem::SetIsNewInstall(bool is_new_install) {
  if (metadata_->is_new_install == is_new_install)
    return;

  metadata_->is_new_install = is_new_install;
  for (auto& observer : observers_) {
    observer.ItemIsNewInstallChanged();
  }
}
}  // namespace ash


text:
The nutella command line interface is used to create, run and interact with nutella projects. The general syntax to do this is: `nutella <command> <parameters>`. In this page we are going to provide a detailed description of all available commands available in nutella.

## Commands
- [new](#new)
- [install](#install)
- [dependencies](#dependencies)
- [compile](#compile)
- [start](#start)
- [runs](#runs)
- [stop](#stop)
- [help](#help)
- [checkup](#checkup)
- [broker](#broker)
- [template](#template)

***

#### new
This command is used to create new projects.
```
nutella new <project_name>
```
Creates a new folder `project_name` in the current directory and initializes it with all the files necessary for you to get started.

#### install
This command is used to install templates into the current project.
[Templates](Templates) are boilerplate code which simplifies the creation of new bots and interfaces. (see the [nutella glossary page](Nutella-glossary) for more details) What this command really does is simply to "copy" the template into the proper folder, inside the `bots` or `interfaces` folders, in the current project.

```
nutella install <template_name> [<destination_folder>]
```
Installs a template from the [nutella templates database](Templates#templates-database). Simply specify the name of the template. If the destination folder is specified the template will be copied inside that folder. Examples: `nutella install basic-ruby-bot` or, with destination folder, `nutella install basic-ruby-bot my-awesome-bot`

```
nutella install <template_folder> [<destination_folder>]
```
Installs a template from a local file. Specify the absolute path of the template. If the destination folder is specified the template will be copied inside that folder. Example: `nutella install /Users/tebemis/code/basic-ruby-bot`
```
nutella install <template_git_repo_url> [<destination_folder>]
```
Installs a template from a remote git repository. Specify the URL of the git repo. If the destination folder is specified the template will be copied inside that folder. Example: `nutella install https://github.com/nutella-framework/basic-ruby-bot.git`.

Note: the `<destination_folder>` option is useful whenever you want to have multiple copies of a certain template in your project. This becomes handy if, for instance, we are trying to create two different bots from the same template. Example: `nutella install basic-ruby-bot my-awesome-bot` and `nutella install basic-ruby-bot my-awesome-bot-2`.

#### dependencies
This command is used to download and install all the dependencies for all the actors (bots and interfaces) in the project.
```
nutella dependencies
```
This command simply executes the `dependencies` scripts for all the actors (bots and interfaces) in the current project.

#### compile
This command is used to compile all the actors (bots and interfaces) in the project
```
nutella compile
```
This command simply executes the `compile` scripts for all the actors (bots and interfaces) in the current project.

#### start
This command is used to start an instance of the current project.
```
nutella start [<run_id>] [<options>]
```
Creates and starts an instance of the current project. If `run_id` is not specified it will be set to the project name. Once an instance of the current project has been created and started you can monitor it using [tmux](http://tmux.sourceforge.net/) simply doing `tmux attach -t <run_id>` (as indicated by the command output). This will launch the tmux session associated with this particular running instance of the project. You can also access all the interfaces by pointing your browsers to `http://localhost:57880/<run_id>` (as indicated by the command output).

##### Options: including and excluding bots
Sometimes you don't want to start all the components of a single application but only some. Vice versa, some other times you want to start all the components but exclude only a couple.
```
nutella start --with=botX,botY,botZ
nutella start -w=botX,botY,botZ
```
This option allows you to select the bots that you want to start. ONLY the bots in the option list will be started.
```
nutella start --without=botA,botB,botC
nutella start -wo=botA,botB,botC
```
This option allows you to select the bots that you do NOT want to start. nutella will start all the bots EXCEPT the ones specified in the option list.

Note that you can only use `--with / -w` and `--without / -wo` exclusively.

##### Options: sharing bots across runs
Sometimes you need to have a bot running across all runs of a particular project. These bots are called _project bots_. To start a bot as a project bot you need to add it to the `project_bots` array in the `nutella.json` file inside the project. Your `nutella.json` file should look something like this:
```json
{
  "name": "my_project",
  "version": "0.1.0",
  "nutella_version": "0.3.0",
  "type": "project",
  "description": "A quick description of your project",
  "app_bots": ["botA", "botB"]
}
```
This will tell nutella to start `botA` and `botB` only once for all instances (runs) of a certain project. You can monitor these special bots by doing `tmux attach-session -t <project_name>-project-bots` as indicated by the command output. Project bots are not affected by the `--with / -w` and `--without / -wo` options.

#### runs
This command lists all the running instances of a certain project.
```
nutella runs
```
Shows the list of all the running instances (i.e. runs) for the current project.

```
nutella runs --all
nutella runs -a
```
Shows the list of all instances of _all projects_ associated with nutella.

#### stop
This command is used to stop an instance of the current project.
```
nutella stop [<run_id>]
```
Creates and starts an instance of the current project. If `run_id` is not specified it will be set to the project name. The command will terminate all the bots in the project, the internal broker (if not in use by any other project) and destroy the tmux session associated with this particular project instance.

## Additional commands
In addition to commands used to interact with projects, nutella provides a set of additional commands that allow to interact with nutella itself.

#### help
Displays a list of all commands and a brief description of their purpose.

#### checkup
Used to verify that all the dependencies required by nutella have been installed.
- `nutella checkup` will show you all the missing/installed dependencies with their version. In the future this command will also take care of installing missing dependencies but for now this is it.

#### broker
This command allows to interact with the [MQTT broker](http://en.wikipedia.org/wiki/MQTT) that nutella uses for all its communications.
- `nutella broker` will print out the name of the broker being used at the moment. `localhost` means that nutella is using the internal broker that ships with the framework. `[running]` means that the broker is (surprise!) running and `[stopped] means that the broker is (surprise again!) stopped.
- `nutella broker set <broker hostname>` Sets the hostname of the broker to be used by nutella. Setting the hostname to `localhost` will trigger the use of the internal broker shipping with nutella.

#### template
This command is used to generate and validate templates.
```
nutella template create <your_template_name>
```
Will prompt you with a series of choices that will guide you through the generation of a nutella template.
```
nutella template validate <your_template_dir>
```
It will validate a template contained in a certain folder.


text:
import LoginFormContainer from './LoginFormContainer'

const routes = [
  {
    path: '/',
    routes: [
      {
        path: '/',
        exact: true,
        redirectTo: '/auth/login',
      },
      {
        path: '/login',
        component: LoginFormContainer,
        name: 'login',
      },
    ],
  },
]

export default routes


text:
package com.fly.bmark2.base;

import android.content.Intent;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.internal.widget.ScrollingTabContainerView.TabView;
import com.fly.bmark2.R;
import com.fly.bmark2.utils.App;

public class BaseFragmentActivity extends SherlockFragmentActivity {

    public com.fly.bmark2.base.AQuery aq;
    TabView tabsView;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        aq = new com.fly.bmark2.base.AQuery(this);

        try
        {
            ActionBar actionBar = getSupportActionBar();
            actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
           // actionBar.setElevation(0);
            //actionBar.setBackgroundDrawable(null);
           // tabsView = new ScrollingTabContainerView(actionBar.getThemedContext());
             actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
            actionBar.setCustomView(R.layout.actionbar);
            View actionBarView = actionBar.getCustomView();
            aq.recycle(actionBarView);
            aq.id(R.id.title).typeface(Typeface.createFromAsset(getAssets(), App.FONT_HELVETICA_NEUE)).textSize(22).textColor(Color.WHITE);
           // if(Utils.getDeviceType(this) == "1")
            //{
             //   aq.id(R.id.tabContainerTablet).visible();
                //display tab here
           // }
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }

   /* public void tabSearch(View v)
    {
        Intent intent = new Intent(BaseFragmentActivity.this, GlobalSearchView.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        BaseFragmentActivity.this.startActivity(intent);
    }

    public void tabWish(View v)
    {
        Intent intent = new Intent(BaseFragmentActivity.this, MyWishListList.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        BaseFragmentActivity.this.startActivity(intent);
    }

    public void tabCart(View v)
    {
        Intent intent = new Intent(BaseFragmentActivity.this, CartsView.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        BaseFragmentActivity.this.startActivity(intent);
    }*/

    @Override
    public void setTitle(CharSequence title)
    {
        super.setTitle(title);
        View actionBarView = getSupportActionBar().getCustomView();
        aq.recycle(actionBarView);
        aq.id(R.id.title).text(title);
    }

    public void hideTitle()
    {
        View actionBarView = getSupportActionBar().getCustomView();
        aq.recycle(actionBarView);
        aq.id(R.id.title).visibility(View.GONE);
    }

    public void setLogOutButton()
    {
        View actionBarView = getSupportActionBar().getCustomView();
        aq.recycle(actionBarView);
        aq.id(R.id.btnLogOut).visible();
    }

    public void setARButton()
    {
        View actionBarView = getSupportActionBar().getCustomView();
        aq.recycle(actionBarView);
        aq.id(R.id.btnAR).visible();
    }

    public void setBackButton()
    {
        View actionBarView = getSupportActionBar().getCustomView();
        aq.recycle(actionBarView);
        aq.id(R.id.backbutton).visible();
        aq.id(R.id.backbutton).clicked(new OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    public void setGlobalSearchButton()
    {
        View actionBarView = getSupportActionBar().getCustomView();
        aq.recycle(actionBarView);
        aq.id(R.id.globalSearchBoxTablet).visible();
        aq.id(R.id.tabMySearch1).gone();
        aq.id(R.id.centerPart).gone();

        /*RelativeLayout leftPart = (RelativeLayout) actionBarView.findViewById(R.id.leftPart);
        RelativeLayout.LayoutParams lp = new RelativeLayout().LayoutParams(0,1);
        lp.weight = 0.05f;
        leftPart.setLayoutParams(lp);*/

        /*aq.id(R.id.tabBackButton).clicked(new OnClickListener() {
            @Override
            public void onClick(View v)
            {
                finish();
            }
        });*/
    }

    public void setTabBackButton()
    {
        View actionBarView = getSupportActionBar().getCustomView();
        aq.recycle(actionBarView);
        aq.id(R.id.tabBackButton).visible();
        aq.id(R.id.tabBackButton).clicked(new OnClickListener() {
            @Override
            public void onClick(View v)
            {
                finish();
            }
        });
    }

    @Override
    public void setTitle(int titleId)
    {
        super.setTitle(titleId);
    }

    public void setTitleImage(String imageUrl)
    {
        View actionBarView = getSupportActionBar().getCustomView();
        aq.recycle(actionBarView);
        aq.id(R.id.icon).image(imageUrl);
    }

    public void setTitleImage(int imageId)
    {
        View actionBarView = getSupportActionBar().getCustomView();
        aq.recycle(actionBarView);
        aq.id(R.id.icon).image(imageId);
    }

    @Override
    public void startActivity(Intent intent)
    {
        super.startActivity(intent);
        overridePendingTransition(0, 0);
    }

    @Override
    public void finish()
    {
        super.finish();
        overridePendingTransition(0, 0);
    }

    @Override
    public void onBackPressed()
    {
        super.onBackPressed();
        overridePendingTransition(0, 0);
        setResult(RESULT_CANCELED);
    }

    @Override
    public void onPause()
    {
        super.onPause();
    }
}


text:
package org.apache.xmlbeans.samples.template;

/**
 * A class with which to test the SampleTemplate sample.
 */
public class SampleTemplateTest
{
    /**
     * Tests the SampleTemplate sample.
     */
    public static void main(String[] args)
        throws org.apache.xmlbeans.XmlException, java.io.IOException
    {
        // all we're checking for is that the sample doesn't throw anything.
        // a real sample test might assert something more interesting.
        SampleTemplate sample = new SampleTemplate();
        sample.start(args);
    }
}


text:
package org.sorincos.mytumble;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = VertxBootApplication.class)
@ConfigurationProperties(prefix = "database")
public class VertxBootApplicationTests {

    private String name;

    @Test
    public void contextLoads() {
        Assert.assertNotNull(name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}


text:
request=KeyPair.req
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
fipstest ecdsa keypair $request > $response

request=PKV.req
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
fipstest ecdsa pkv $request > $response

request=SigGen.req
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
fipstest ecdsa siggen $request > $response

request=SigVer.req
response=`echo $request | sed -e "s/req/rsp/"`
echo $request $response
fipstest ecdsa sigver $request > $response


text:
package pl.combosolutions.backup.psm.repositories

import org.specs2.mock.Mockito
import org.specs2.mutable.Specification
import pl.combosolutions.backup.test.Tags.UnitTest

class RepositorySpec extends Specification with Mockito {

  "AptRepository" should {

    "serialize correctly" in {
      // given
      val repository1 = AptRepository(true, "test-url", "test-branch", List("area1", "area2"), List("32", "64"))
      val repository2 = AptRepository(false, "test-url", "test-branch", List(), List())

      // when
      val result1 = repository1.toString
      val result2 = repository2.toString

      // then
      result1 mustEqual "deb-src [arch=32,64] test-url test-branch area1 area2"
      result2 mustEqual "deb test-url test-branch"
    } tag UnitTest
  }
}


text:
package com.intellij.util.text;

import com.intellij.CommonBundle;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

public class DateFormatUtil {
  public static final long SECOND = 1000;
  public static final long MINUTE = SECOND * 60;
  public static final long HOUR = MINUTE * 60;
  public static final long DAY = HOUR * 24;
  public static final long WEEK = DAY * 7;
  public static final long MONTH = DAY * 30;
  public static final long YEAR = DAY * 365;

  public static final long[] DELIMS = new long[] {YEAR, MONTH, WEEK, DAY, HOUR, MINUTE};

  private DateFormatUtil() {
  }

  enum Period {
    YEAR, MONTH, WEEK, DAY, HOUR, MINUTE
  }

  private static final Period[] PERIOD = new Period[] {Period.YEAR, Period.MONTH, Period.WEEK, Period.DAY, Period.HOUR, Period.MINUTE};

  public static String formatDuration(long delta) {
    StringBuffer buf = new StringBuffer();
    for (int i = 0; i < DELIMS.length; i++) {
      long delim = DELIMS[i];
      int n = (int)(delta / delim);
      if (n != 0) {
        buf.append(composeDurationMessage(PERIOD[i], n));
        buf.append(' ');
        delta = delta % delim;
      }
    }

    if (buf.length() == 0) return CommonBundle.message("date.format.less.than.a.minute");
    return buf.toString().trim();
  }

  private static String composeDurationMessage(final Period period, final int n) {
    switch(period) {
      case DAY: return CommonBundle.message("date.format.n.days", n);
      case MINUTE:return CommonBundle.message("date.format.n.minutes", n);
      case HOUR:return CommonBundle.message("date.format.n.hours", n);
      case MONTH:return CommonBundle.message("date.format.n.months", n);
      case WEEK:return CommonBundle.message("date.format.n.weeks", n);
      default:return CommonBundle.message("date.format.n.years", n);
    }
  }

  public static String formatBetweenDates(long d1, long d2) {
    long delta = Math.abs(d1 - d2);
    if (delta == 0) return CommonBundle.message("date.format.right.now");

    int n = -1;
    int i;
    for (i = 0; i < DELIMS.length; i++) {
      long delim = DELIMS[i];
      if (delta >= delim) {
        n = (int)(delta / delim);
        break;
      }
    }

    if (d2 > d1) {
      if (n <= 0) {
        return CommonBundle.message("date.format.a.few.moments.ago");
      } else {
        return someTimeAgoMessage(PERIOD[i], n);
      }
    }
    else if (d2 < d1) {
      if (n <= 0) {
        return CommonBundle.message("date.format.in.a.few.moments");
      } else {
        return composeInSomeTimeMessage(PERIOD[i], n);
      }

    }

    return "";
  }

  private static String composeInSomeTimeMessage(final Period period, final int n) {
    switch(period) {
      case DAY: return CommonBundle.message("date.format.in.n.days", n);
      case MINUTE:return CommonBundle.message("date.format.in.n.minutes", n);
      case HOUR:return CommonBundle.message("date.format.in.n.hours", n);
      case MONTH:return CommonBundle.message("date.format.in.n.months", n);
      case WEEK:return CommonBundle.message("date.format.in.n.weeks", n);
      default:return CommonBundle.message("date.format.in.n.years", n);
    }
  }

  private static String someTimeAgoMessage(final Period period, final int n) {
    switch(period) {
      case DAY: return CommonBundle.message("date.format.n.days.ago", n);
      case MINUTE:return CommonBundle.message("date.format.n.minutes.ago", n);
      case HOUR:return CommonBundle.message("date.format.n.hours.ago", n);
      case MONTH:return CommonBundle.message("date.format.n.months.ago", n);
      case WEEK:return CommonBundle.message("date.format.n.weeks.ago", n);
      default:return CommonBundle.message("date.format.n.years.ago", n);
    }

  }

  public static String formatDate(Date today, Date date, Locale locale) {
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(today);

    int todayYear = calendar.get(Calendar.YEAR);
    int todayDayOfYear = calendar.get(Calendar.DAY_OF_YEAR);

    calendar.setTime(date);

    int year = calendar.get(Calendar.YEAR);
    int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR);

    DateFormat defaultDateFormat = SimpleDateFormat.getDateTimeInstance(SimpleDateFormat.SHORT,
                                                                        SimpleDateFormat.SHORT,
                                                                        locale);

    DateFormat timeDefaultFormat = DateFormat.getTimeInstance(SimpleDateFormat.SHORT, locale);

    boolean isYesterdayOnPreviousYear = (todayYear == year + 1) && todayDayOfYear == 1 && dayOfYear == calendar.getActualMaximum(Calendar.DAY_OF_YEAR);

    boolean isYesterday = isYesterdayOnPreviousYear || (todayYear == year && todayDayOfYear == dayOfYear + 1);

    if (isYesterday) {
      return CommonBundle.message("date.format.yesterday") + " " + timeDefaultFormat.format(date);
    } else if (year != todayYear) {
      return defaultDateFormat.format(date);
    } else if (todayDayOfYear == dayOfYear) {
      return CommonBundle.message("date.format.today") + " " + timeDefaultFormat.format(date);
    } else {
      return defaultDateFormat.format(date);
    }
  }

  public static String formatDate(Date current_date, Date date) {
    return formatDate(current_date, date, Locale.getDefault());
  }

  public static String formatFrequency(final long tm) {
    return CommonBundle.message("date.frequency", formatBetweenDates(tm, 0));
  }
}


text:
/**
 *
 */
package com.github.jerryxia.devhelper.event;

public class NopValueWrapperEventProducer implements ValueWrapperEventProducer {

    @Override
    public void publish(Object record) {
        // ignore
    }

    @Override
    public void tryPublish(Object record) {
        // ignore
    }

}


text:
export DEBIAN_FRONTEND="noninteractive"

# update apt-get
apt-get update

# install basics
apt-get -q install -y build-essential daemon

## Install MongoDB
echo "INFO: Installing MongoDB..."

# install
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" \
	| tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
apt-get update
apt-get install -y mongodb-org=3.2.9 2>&1
service mongod restart

# configure Mongo
# INSECURE!!!
# default mongodb database location is /var/lib/mongodb
cp /vagrant/mongo/mongod.conf /etc/mongod.conf
cp /vagrant/mongo/ceramictest.json /etc/ceramictest.json
mongoimport --jsonArray -d sheparddb -c ceramic --file /etc/ceramictest.json
service mongod restart

## Install Postgres
echo "INFO: Installing Postgres..."

# install
echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" > \
	/etc/apt/sources.list.d/postgres.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
	apt-key add -
apt-get update
apt-get install -y postgresql-9.5 postgresql-client-9.5 \
	postgresql-contrib-9.5 2>&1

# configure Postgres
# INSECURE!!!
cp /vagrant/psql/postgresql.conf /etc/postgresql/9.5/main/postgresql.conf
cp /vagrant/psql/pg_hba.conf /etc/postgresql/9.5/main/pg_hba.conf
service postgresql restart

# rebuild the database
echo "INFO: Setting up the database..."
# INSECURE!!!
su - postgres -c "psql -c \"ALTER USER postgres with encrypted password 'postgres';\""
su - postgres -c "psql -f /vagrant/psql/db_reset.sql"
service postgresql restart

## Install nginx
echo "INFO: Installing nginx..."

# add the nginx apt-get repo
echo "deb http://nginx.org/packages/ubuntu/ trusty nginx" > \
	/etc/apt/sources.list.d/nginx.list
wget -q -O - http://nginx.org/keys/nginx_signing.key | \
	apt-key add -
apt-get update

# install
apt-get -q install -y nginx=1.10.0*
service nginx restart

# setup logs folder
mkdir -p /var/log/nginx/
chown -R www-data:www-data /var/log/nginx/

# copy over configs, restart
# INSECURE!!!
cp -R /vagrant/nginx/* /etc/nginx/
service nginx restart 2>&1

## Install Python
echo "INFO: Installing Python..."

# install, upgrade pip
apt-get -q install -y python=2.7.5* python-dev python-pip \
	libpq-dev python-gi libxml2-dev libxslt-dev libffi-dev libssl-dev
pip install pip requests --upgrade
pip install requests['security']

# install code quality tools
pip install -qqq pylint 2>&1
pip install --quiet mock coverage nose nosexcover clonedigger

# install requirements
pip install -r /vagrant/pip_requirements.txt 2>&1

## Install uWSGI
echo "INFO: Installing uWSGI..."

# install
apt-get -q install -y uwsgi uwsgi-plugin-python
service uwsgi restart 2>&1

# init logs
mkdir -p /var/log/sheparddb/
touch /var/log/sheparddb/info.log
chown -R www-data:www-data /var/log/sheparddb
chmod 0777 /var/log/sheparddb/info.log # INSECURE!!!

mkdir -p /var/log/uwsgi/app
chown -R www-data:www-data /var/log/uwsgi/app

# config www-data user shell
chsh -s /bin/bash www-data

# copy over configs, restart
cp /vagrant/uwsgi/* /etc/uwsgi/apps-enabled/
service uwsgi restart 2>&1

# update file location database
updatedb

exit;


text:
<?php

namespace QATools\QATools\HtmlElements\Element;

use QATools\QATools\HtmlElements\Exception\SelectException;
use Behat\Mink\Element\NodeElement;
use QATools\QATools\PageObject\How;

/**
 * Represents web page select control.
 */
class Select extends AbstractTypifiedElement implements ISimpleSetter
{

	/**
	 * Indicates whether this select element support selecting multiple options at the same time.
	 *
	 * @return boolean
	 */
	public function isMultiple()
	{
		return $this->hasAttribute('multiple');
	}

	/**
	 * Returns all options belonging to this select tag.
	 *
	 * @return SelectOption[]
	 */
	public function getOptions()
	{
		return $this->wrapOptions($this->getWrappedElement()->findAll('se', array(How::TAG_NAME => 'option')));
	}

	/**
	 * Returns all options having given value.
	 *
	 * @param mixed $value Value of option to selected.
	 *
	 * @return SelectOption[]
	 */
	public function getOptionsByValue($value)
	{
		$selectors_handler = $this->getSelectorsHandler();
		$xpath = 'descendant-or-self::option[@value = ' . $selectors_handler->xpathLiteral($value) . ']';

		return $this->wrapOptions($this->getWrappedElement()->findAll('xpath', $xpath));
	}

	/**
	 * Returns all options that display text matching the argument.
	 *
	 * @param string  $text        Text of the option to be selected.
	 * @param boolean $exact_match Search for exact text.
	 *
	 * @return SelectOption[]
	 */
	public function getOptionsByText($text, $exact_match = true)
	{
		$selectors_handler = $this->getSelectorsHandler();

		if ( $exact_match ) {
			$xpath = 'descendant-or-self::option[normalize-space(.) = ' . $selectors_handler->xpathLiteral($text) . ']';
		}
		else {
			$xpath = 'descendant-or-self::option[contains(., ' . $selectors_handler->xpathLiteral($text) . ')]';
		}

		return $this->wrapOptions($this->getWrappedElement()->findAll('xpath', $xpath));
	}

	/**
	 * Returns all selected options belonging to this select tag.
	 *
	 * @return SelectOption[]
	 */
	public function getSelectedOptions()
	{
		$ret = array();

		foreach ( $this->getOptions() as $option ) {
			if ( $option->isSelected() ) {
				$ret[] = $option;
			}
		}

		return $ret;
	}

	/**
	 * The first selected option in this select tag (or the currently selected option in a normal select).
	 *
	 * @return SelectOption
	 * @throws SelectException When no options were selected.
	 */
	public function getFirstSelectedOption()
	{
		foreach ( $this->getOptions() as $option ) {
			if ( $option->isSelected() ) {
				return $option;
			}
		}

		throw new SelectException('No options are selected', SelectException::TYPE_NOT_SELECTED);
	}

	/**
	 * Select all options that display text matching the argument.
	 *
	 * @param string  $text        The visible text to match against.
	 * @param boolean $exact_match Search for exact text.
	 *
	 * @return self
	 * @throws SelectException No options were found by given text.
	 */
	public function selectByText($text, $exact_match = true)
	{
		$options = $this->getOptionsByText($text, $exact_match);

		if ( !$options ) {
			throw new SelectException('Cannot locate option with text: ' . $text, SelectException::TYPE_NOT_FOUND);
		}

		return $this->selectOptions($options, !$this->isMultiple());
	}

	/**
	 * Deselect all options that display text matching the argument.
	 *
	 * @param string  $text        The visible text to match against.
	 * @param boolean $exact_match Search for exact text.
	 *
	 * @return self
	 */
	public function deselectByText($text, $exact_match = true)
	{
		foreach ( $this->getOptionsByText($text, $exact_match) as $option ) {
			$option->deselect();
		}

		return $this;
	}

	/**
	 * Select all options that have a value matching the argument.
	 *
	 * @param mixed $value The value to match against.
	 *
	 * @return self
	 * @throws SelectException When option with given value can't be found.
	 */
	public function selectByValue($value)
	{
		$options = $this->getOptionsByValue($value);

		if ( !$options ) {
			throw new SelectException('Cannot locate option with value: ' . $value, SelectException::TYPE_NOT_FOUND);
		}

		return $this->selectOptions($options, !$this->isMultiple());
	}

	/**
	 * Deselect all options that have a value matching the argument.
	 *
	 * @param mixed $value Value of an option be be deselected.
	 *
	 * @return self
	 */
	public function deselectByValue($value)
	{
		foreach ( $this->getOptionsByValue($value) as $option ) {
			$option->deselect();
		}

		return $this;
	}

	/**
	 * Selects all options.
	 *
	 * @return self
	 */
	public function selectAll()
	{
		$this->assertMultiSelect();

		return $this->selectOptions($this->getOptions());
	}

	/**
	 * Replaces current selection with given one.
	 *
	 * @param array $values Values of options to select.
	 *
	 * @return self
	 */
	public function setSelected(array $values)
	{
		$this->assertMultiSelect();

		$candidates = array();
		/* @var $candidates SelectOption[] */

		foreach ( $this->getOptions() as $option ) {
			if ( in_array($option->getValue(), $values) ) {
				$candidates[] = $option;
			}
		}

		return $this->selectOptions($candidates);
	}

	/**
	 * Deselects all options.
	 *
	 * @return self
	 */
	public function deselectAll()
	{
		$this->assertMultiSelect();

		foreach ( $this->getSelectedOptions() as $option ) {
			$option->deselect();
		}

		return $this;
	}

	/**
	 * Sets value to the element.
	 *
	 * @param mixed $value New value.
	 *
	 * @return self
	 */
	public function setValue($value)
	{
		if ( is_array($value) ) {
			return $this->setSelected($value);
		}

		return $this->selectByValue((string)$value);
	}

	/**
	 * Select given options.
	 *
	 * @param array|SelectOption[] $options    Options to be selected.
	 * @param boolean              $first_only Select only first option.
	 *
	 * @return self
	 */
	protected function selectOptions(array $options, $first_only = false)
	{
		foreach ( $options as $index => $option ) {
			$option->select($index > 0);

			if ( $first_only ) {
				return $this;
			}
		}

		return $this;
	}

	/**
	 * Wraps each of NodeElement in array with a SelectOption class.
	 *
	 * @param array|NodeElement[] $nodes Nodes.
	 *
	 * @return SelectOption[]
	 */
	protected function wrapOptions(array $nodes)
	{
		$ret = array();

		foreach ( $nodes as $node_element ) {
			/** @var SelectOption $option */
			$option = SelectOption::fromNodeElement($node_element);
			$ret[] = $option->setSelect($this);
		}

		return $ret;
	}

	/**
	 * Throws an exception when it's not a multiselect.
	 *
	 * @return void
	 * @throws SelectException If the SELECT does not support multiple selections.
	 */
	protected function assertMultiSelect()
	{
		if ( !$this->isMultiple() ) {
			throw new SelectException(
				'You may only deselect all options of a multi-select',
				SelectException::TYPE_NOT_MULTISELECT
			);
		}
	}

}


text:
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.rt.junit;

import com.intellij.rt.execution.junit.RepeatCount;

import java.io.*;
import java.net.InetAddress;
import java.net.Socket;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Before rename or move
 *
 * @noinspection HardCodedStringLiteral
 * @see com.intellij.execution.junit.JUnitConfiguration#JUNIT_START_CLASS
 */
public final class JUnitStarter {
  public static final int VERSION = 5;
  public static final String IDE_VERSION = "-ideVersion";

  public static final String JUNIT3_PARAMETER = "-junit3";
  public static final String JUNIT4_PARAMETER = "-junit4";
  public static final String JUNIT5_PARAMETER = "-junit5";
  private static final String JUNIT5_KEY = "idea.is.junit5";

  private static final String SOCKET = "-socket";
  private static final String JUNIT3_RUNNER_NAME = "com.intellij.junit3.JUnit3IdeaTestRunner";
  private static final String JUNIT4_RUNNER_NAME = "com.intellij.junit4.JUnit4IdeaTestRunner";
  private static final String JUNIT5_RUNNER_NAME = "com.intellij.junit5.JUnit5IdeaTestRunner";
  private static String ourForkMode;
  private static String ourCommandFileName;
  private static String ourWorkingDirs;
  protected static int ourCount = 1;
  public static String ourRepeatCount;

  public static void main(String[] args) {
    List<String> argList = new ArrayList<String>(Arrays.asList(args));

    final ArrayList<String> listeners = new ArrayList<String>();
    final String[] name = new String[1];

    String agentName = processParameters(argList, listeners, name);

    if (!JUNIT5_RUNNER_NAME.equals(agentName) && !canWorkWithJUnitVersion(System.err, agentName)) {
      System.exit(-3);
    }
    if (!checkVersion(args, System.err)) {
      System.exit(-3);
    }

    String[] array = argList.toArray(new String[0]);
    int exitCode = prepareStreamsAndStart(array, agentName, listeners, name[0]);
    System.exit(exitCode);
  }

  private static String processParameters(List<String> args, final List<? super String> listeners, String[] params) {
    String agentName = isJUnit5Preferred() ? JUNIT5_RUNNER_NAME : JUNIT4_RUNNER_NAME;
    List<String> result = new ArrayList<String>(args.size());
    for (String arg : args) {
      if (arg.startsWith(IDE_VERSION)) {
        //ignore
      }
      else if (arg.equals(JUNIT3_PARAMETER)) {
        agentName = JUNIT3_RUNNER_NAME;
      }
      else if (arg.equals(JUNIT4_PARAMETER)) {
        agentName = JUNIT4_RUNNER_NAME;
      }
      else if (arg.equals(JUNIT5_PARAMETER)) {
        agentName = JUNIT5_RUNNER_NAME;
      }
      else {
        if (arg.startsWith("@name")) {
          params[0] = arg.substring("@name".length());
          continue;
        }
        else if (arg.startsWith("@w@")) {
          ourWorkingDirs = arg.substring(3);
          continue;
        }
        else if (arg.startsWith("@@@")) {
          final int pos = arg.indexOf(',');
          ourForkMode = arg.substring(3, pos);
          ourCommandFileName = arg.substring(pos + 1);
          continue;
        }
        else if (arg.startsWith("@@")) {
          if (new File(arg.substring(2)).exists()) {
            try {
              final BufferedReader reader = new BufferedReader(new FileReader(arg.substring(2)));
              String line;
              while ((line = reader.readLine()) != null) {
                listeners.add(line);
              }
            }
            catch (Exception e) {
              e.printStackTrace();
            }
          }
          continue;
        }
        else if (arg.startsWith(SOCKET)) {
          final int port = Integer.parseInt(arg.substring(SOCKET.length()));
          try {
            final Socket socket = new Socket(InetAddress.getByName("127.0.0.1"), port);  //start collecting tests
            final DataInputStream os = new DataInputStream(socket.getInputStream());
            try {
              os.readBoolean();//wait for ready flag
            }
            finally {
              os.close();
            }
          }
          catch (IOException e) {
            e.printStackTrace();
          }

          continue;
        }

        final int count = RepeatCount.getCount(arg);
        if (count != 0) {
          ourRepeatCount = arg;
          ourCount = count;
          continue;
        }

        result.add(arg);
      }
    }
    args.clear();
    args.addAll(result);
    if (JUNIT3_RUNNER_NAME.equals(agentName)) {
      try {
        Class.forName("org.junit.runner.Computer");
        agentName = JUNIT4_RUNNER_NAME;
      }
      catch (ClassNotFoundException e) {
        return JUNIT3_RUNNER_NAME;
      }
    }

    if (JUNIT4_RUNNER_NAME.equals(agentName)) {
      try {
        Class.forName("org.junit.Test");
      }
      catch (ClassNotFoundException e) {
        return JUNIT3_RUNNER_NAME;
      }
    }

    try {
      final String forceJUnit3 = System.getProperty("idea.force.junit3");
      if (Boolean.parseBoolean(forceJUnit3)) return JUNIT3_RUNNER_NAME;
    }
    catch (SecurityException ignored) {
    }
    return agentName;
  }

  private static boolean isJUnit5Preferred() {
    return Boolean.parseBoolean(System.getProperty(JUNIT5_KEY));
  }

  public static boolean checkVersion(String[] args, PrintStream printStream) {
    for (String arg : args) {
      if (arg.startsWith(IDE_VERSION)) {
        int ideVersion = Integer.parseInt(arg.substring(IDE_VERSION.length()));
        if (ideVersion != VERSION) {
          printStream.println("Wrong agent version: " + VERSION + ". IDE expects version: " + ideVersion);
          printStream.flush();
          return false;
        }
        return true;
      }
    }
    return false;
  }

  private static boolean canWorkWithJUnitVersion(PrintStream printStream, String agentName) {
    try {
      junitVersionChecks(agentName);
    }
    catch (Throwable e) {
      printStream.println("!!! JUnit version 3.8 or later expected:");
      printStream.println();
      e.printStackTrace(printStream);
      printStream.flush();
      return false;
    }
    finally {
      printStream.flush();
    }
    return true;
  }

  private static void junitVersionChecks(String agentName) throws ClassNotFoundException {
    Class.forName("junit.framework.ComparisonFailure");
    getAgentClass(agentName);
    //noinspection UnnecessaryFullyQualifiedName
    new junit.textui.TestRunner().setPrinter(null);
  }

  private static int prepareStreamsAndStart(String[] args,
                                            final String agentName,
                                            ArrayList<String> listeners,
                                            String name) {
    try {
      IdeaTestRunner<?> testRunner = (IdeaTestRunner<?>)getAgentClass(agentName).newInstance();
      if (ourCommandFileName != null) {
        if (!"none".equals(ourForkMode) || ourWorkingDirs != null && new File(ourWorkingDirs).length() > 0) {
          final List<String> newArgs = new ArrayList<String>();
          newArgs.add(agentName);
          newArgs.addAll(listeners);
          return new JUnitForkedSplitter(ourWorkingDirs, ourForkMode, newArgs)
            .startSplitting(args, name, ourCommandFileName, ourRepeatCount);
        }
      }
      return IdeaTestRunner.Repeater.startRunnerWithArgs(testRunner, args, listeners, name, ourCount, true);
    }
    catch (Exception e) {
      e.printStackTrace(System.err);
      return -2;
    }
  }

  static Class<?> getAgentClass(String agentName) throws ClassNotFoundException {
    return Class.forName(agentName);
  }

  public static void printClassesList(List<String> classNames, String packageName, String category, String filters, File tempFile)
    throws IOException {
    final PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(tempFile), "UTF-8"));

    try {
      writer.println(packageName); //package name
      writer.println(category); //category
      writer.println(filters); //patterns
      for (String name : classNames) {
        writer.println(name);
      }
    }
    finally {
      writer.close();
    }
  }
}


text:
package grails.plugin.multitenant.core;

/**
 * Interface used to store and retrieve the current tenant
 */
public interface CurrentTenant {
    public Integer get();

    public void set(Integer tenantId);

    /**
     * The 'loaded cache' contains all the tenants that this application has encountered.
     * Resetting the cache will erase that list, causing the app to reload data for tenants
     * as they are re-encountered.
     */
    public void resetLoadedCache();
}