text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="rustdoc">
    <meta name="description" content="API documentation for the Rust `Graphemes` struct in crate `unicode`.">
    <meta name="keywords" content="rust, rustlang, rust-lang, Graphemes">

    <title>unicode::str::Graphemes - Rust</title>

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

    <link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">

unicode::<wbr>str

        <form class="search-form js-only">

                <input class="search-input" name="search"
                       autocomplete="off"
                       placeholder="Click or press 'S' to search, '?' for more options..."
                       type="search">

        </form>

Struct unicode::<wbr>str::<wbr>Graphemes<wbr>Unstable
            [-] [+]
        [src]

pub struct Graphemes<'a> {
    // some fields omitted
}

External iterator for a string's
grapheme clusters.

Trait Implementations

impl<'a> Iterator for Graphemes<'a>

type Item = &'a str

fn size_hint(&self) -> (usize, Option<usize>)

fn next(&mut self) -> Option<&'a str>

impl<'a> DoubleEndedIterator for Graphemes<'a>

fn next_back(&mut self) -> Option<&'a str>

Derived Implementations

impl<'a> Clone for Graphemes<'a>

fn clone(&self) -> Graphemes<'a>

fn clone_from(&mut self, source: &Self)

Keyboard shortcuts

?

Show this help dialog

S

Focus the search field

⇤

Move up in search results

⇥

Move down in search results

⏎

Go to active search result

Search tricks

                Prefix searches with a type followed by a colon (e.g.
                fn:) to restrict the search to a given type.

                Accepted types are: fn, mod,
                struct, enum,
                trait, typedef (or
                tdef).


text:
<?php
namespace CmsIr\Users\Controller;

use CmsIr\Authentication\Model\Authentication;
use CmsIr\Users\Form\ChangePasswordFilter;
use CmsIr\Users\Form\ChangePasswordForm;
use CmsIr\Users\Model\Users;
use Zend\Authentication\AuthenticationService;
use Zend\Authentication\Result;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Zend\Json\Json;
use Zend\Db\Sql\Predicate;
use CmsIr\Users\Form\UserForm;
use CmsIr\Users\Form\UserFormFilter;
use CmsIr\Users\Form\UsereditFormFilter;
use Zend\Mime\Message as MimeMessage;
use Zend\Mime\Part as MimePart;
use Zend\Authentication\Adapter\DbTable\CredentialTreatmentAdapter as AuthAdapter;

use Zend\Mail\Message;

class UsersController extends AbstractActionController
{
    protected $usersTable;
    protected $authUsersTable;
    protected $uploadDir = 'public/files/users/';
    protected $appName = 'CMS';

    public function usersListAction()
    {
        $request = $this->getRequest();
        if ($request->isPost()) {

            $data = $this->getRequest()->getPost();
            $columns = array('id', 'name', 'surname', 'email', 'id');

            $listData = $this->getUsersTable()->getDatatables($columns,$data);
            $output = array(
                "sEcho" => $this->getRequest()->getPost('sEcho'),
                "iTotalRecords" => $listData['iTotalRecords'],
                "iTotalDisplayRecords" => $listData['iTotalDisplayRecords'],
                "aaData" => $listData['aaData']
            );

            $jsonObject = Json::encode($output, true);
            echo $jsonObject;
            return $this->response;
        }
		return new ViewModel();
	}

    public function previewAction()
    {
        $id = $this->params()->fromRoute('id');

        $user = $this->getUsersTable()->getUser($id);

        if(!$user) {
            return $this->redirect()->toRoute('users');
        }

        $form = new UserForm();

        $config = $this->getServiceLocator()->get('Config');
        $aclRoles = $config['acl']['roles'];

        $tmpArrayRoles = array();
        $i = 1;

        foreach ($aclRoles as $keyRole => $role) {
            if($user->getRole() == $i) {
                $tmp = array(
                    'value' => $i,
                    'label' => ucfirst($keyRole),
                    'selected' => true
                );
            } else {
                $tmp = array(
                    'value' => $i,
                    'label' => ucfirst($keyRole),
                );
            }
            array_push($tmpArrayRoles, $tmp);
            $i++;
        }
        $form->get('role')->setValueOptions($tmpArrayRoles);
        $form->bind($user);

        $config = $this->getServiceLocator()->get('config');
        $extraFields = $config['extra_fields'];

        $fields = array();

        if($extraFields['users']) {
            $fields = $extraFields['users'];
        }

        $extra = $user->getExtra();

        if(!is_null($extra)) {
            $extraAsArray = unserialize($extra);
            $extraAsArrayKeys = array_keys($extraAsArray);

            $tmp = array();
            foreach($fields as $field)
            {
                $attributes = $field['attributes'];
                $name = $attributes['name'];

                switch($field['type'])
                {
                    case 'text':
                        if(in_array($name, $extraAsArrayKeys))
                        {
                            $field['options']['value'] = $extraAsArray[$name];
                        }
                        break;
                    case 'textarea':
                        if(in_array($name, $extraAsArrayKeys))
                        {
                            $field['options']['value'] = $extraAsArray[$name];
                        }
                        break;
                }
                $tmp[] = $field;
            }
            $fields = $tmp;
        }

        $viewParams = array();
        $viewParams['form'] = $form;
        $viewParams['extraFields'] = $fields;
        return new ViewModel($viewParams);
    }

    public function createAction()
    {
        $form = new UserForm();

        $config = $this->getServiceLocator()->get('Config');
        $aclRoles = $config['acl']['roles'];

        $tmpArrayRoles = array();
        $i = 1;
        foreach ($aclRoles as $keyRole => $role) {
            $tmp = array(
                'value' => $i,
                'label' => ucfirst($keyRole)
            );
            array_push($tmpArrayRoles, $tmp);
            $i++;
        }
        $form->get('role')->setValueOptions($tmpArrayRoles);

        $request = $this->getRequest();

        if ($request->isPost()) {

            $form->setInputFilter(new UserFormFilter($this->getServiceLocator()));
            $form->setData($request->getPost());

            if ($form->isValid()) {
                $extraResult = $this->checkExtraFields($request->getPost(), $form->getData());
                $data = $form->getData();
                $data = $this->prepareData($data);

                $user = new Users();
                $user->exchangeArray($data[0]);

                if(!empty($extraResult)) {
                    $serializedExtraResult = serialize($extraResult);
                    $user->setExtra($serializedExtraResult);
                }

                $this->getUsersTable()->saveUser($user);
                $this->sendConfirmationEmail($user, $data[1]);
                $this->flashMessenger()->addMessage('Użytkownik został dodany poprawnie.');

                return $this->redirect()->toRoute('users');
            }
        }

        $config = $this->getServiceLocator()->get('config');
//        $extraFields = $config['extra_fields'];

//        $fields = array();
//
//        if($extraFields['users']) {
//            $fields = $extraFields['users'];
//        }

        $viewParams = array();
        $viewParams['form'] = $form;
//        $viewParams['extraFields'] = $fields;
        return new ViewModel($viewParams);
    }

    public function editAction()
    {
        $id = $this->params()->fromRoute('id');

        /* @var $user Users */
        $user = $this->getUsersTable()->getUser($id);

        if(!$user) {
            return $this->redirect()->toRoute('users');
        }

        $form = new UserForm();

        $config = $this->getServiceLocator()->get('Config');
        $aclRoles = $config['acl']['roles'];

        $tmpArrayRoles = array();
        $i = 1;

        foreach ($aclRoles as $keyRole => $role) {
            if($user->getRole() == $i) {
                $tmp = array(
                    'value' => $i,
                    'label' => ucfirst($keyRole),
                    'selected' => true
                );
            } else {
                $tmp = array(
                    'value' => $i,
                    'label' => ucfirst($keyRole),
                );
            }
            array_push($tmpArrayRoles, $tmp);
            $i++;
        }
        $form->get('role')->setValueOptions($tmpArrayRoles);
        $form->bind($user);

        $request = $this->getRequest();

        if ($request->isPost()) {

            $form->setInputFilter(new UsereditFormFilter($this->getServiceLocator()));
            $form->setData($request->getPost());

            if ($form->isValid()) {
                $extraResult = $this->checkExtraFields($request->getPost(), $form->getData());

                if(!empty($extraResult)) {
                    $serializedExtraResult = serialize($extraResult);
                    $user->setExtra($serializedExtraResult);
                }

                $this->getUsersTable()->saveUser($user);

                $this->flashMessenger()->addMessage('Użytkownik został zedytowany poprawnie.');
                return $this->redirect()->toRoute('users');
            }
        }

//        $config = $this->getServiceLocator()->get('config');
//        $extraFields = $config['extra_fields'];
//
//        $fields = array();
//        if($extraFields['users']) {
//            $fields = $extraFields['users'];
//        }
//
//        $extra = $user->getExtra();
//        if(!is_null($extra)) {
//            $extraAsArray = unserialize($extra);
//            $extraAsArrayKeys = array_keys($extraAsArray);
//
//            $tmp = array();
//            foreach($fields as $field) {
//                $attributes = $field['attributes'];
//                $name = $attributes['name'];
//
//                switch($field['type']) {
//                    case 'text':
//                        if(in_array($name, $extraAsArrayKeys)) {
//                            $field['options']['value'] = $extraAsArray[$name];
//                        }
//                        break;
//                    case 'textarea':
//                        if(in_array($name, $extraAsArrayKeys)) {
//                            $field['options']['value'] = $extraAsArray[$name];
//                        }
//                        break;
//                }
//                $tmp[] = $field;
//            }
//            $fields = $tmp;
//        }

        $viewParams = array();
        $viewParams['form'] = $form;
//        $viewParams['extraFields'] = $fields;
        return new ViewModel($viewParams);
    }

    public function deleteAction()
    {
        $request = $this->getRequest();
        $id = (int) $this->params()->fromRoute('id', 0);

        if (!$id) {
            return $this->redirect()->toRoute('users');
        }

        if ($request->isPost()) {
            $del = $request->getPost('del', 'Anuluj');

            if ($del == 'Tak') {
                $id = $request->getPost('id');
                $this->getUsersTable()->deleteUser($id);
                $this->flashMessenger()->addMessage('Użytkownik został usunięty poprawnie.');
                $modal = $request->getPost('modal', false);

                if($modal == true) {
                    $jsonObject = Json::encode($params['status'] = $id, true);
                    echo $jsonObject;
                    return $this->response;
                }
            }

            return $this->redirect()->toRoute('users');
        }

        return array(
            'id'    => $id,
            'user' => $this->getUsersTable()->getUser($id)
        );
    }

    public function uploadAction ()
    {
        if (!empty($_FILES)) {
            $tempFile   = $_FILES['Filedata']['tmp_name'];
            $targetFile = $_FILES['Filedata']['name'];

            $file = explode('.', $targetFile);
            $fileName = $file[0];
            $fileExt = $file[1];

            $uniqidFilename = $fileName.'-'.uniqid();
            $targetFile = $uniqidFilename.'.'.$fileExt;

            if(move_uploaded_file($tempFile,$this->uploadDir.$targetFile)) {
                echo $targetFile;
            } else {
                echo 0;
            }

        }
        return $this->response;
    }

    private function checkExtraFields($obj, $arr)
    {
        if(!is_array($arr)) {
            $arr = (array) $arr;
            $formKeys = array_keys($arr);
            $tmp = array();
            foreach($formKeys as $key => $field) {
                $tmp[] = substr($field, 3, strlen($field));
            }
            $formKeys = $tmp;
        } else {
            $formKeys = array_keys($arr);
        }

        $result = array();
        foreach($obj as $key => $field) {
            if(!in_array($key, $formKeys)) {
                $result[$key] = $field;
            }
        }

        return $result;
    }

    public function generatePassword($l = 8, $c = 0, $n = 0, $s = 0)
    {
        // get count of all required minimum special chars
        $count = $c + $n + $s;
        $out = '';
        // sanitize inputs; should be self-explanatory
        if(!is_int($l) || !is_int($c) || !is_int($n) || !is_int($s)) {
            trigger_error('Argument(s) not an integer', E_USER_WARNING);
            return false;
        }
        elseif($l < 0 || $l > 20 || $c < 0 || $n < 0 || $s < 0) {
            trigger_error('Argument(s) out of range', E_USER_WARNING);
            return false;
        }
        elseif($c > $l) {
            trigger_error('Number of password capitals required exceeds password length', E_USER_WARNING);
            return false;
        }
        elseif($n > $l) {
            trigger_error('Number of password numerals exceeds password length', E_USER_WARNING);
            return false;
        }
        elseif($s > $l) {
            trigger_error('Number of password capitals exceeds password length', E_USER_WARNING);
            return false;
        }
        elseif($count > $l) {
            trigger_error('Number of password special characters exceeds specified password length', E_USER_WARNING);
            return false;
        }

        // all inputs clean, proceed to build password

        // change these strings if you want to include or exclude possible password characters
        $chars = "abcdefghijklmnopqrstuvwxyz";
        $caps = strtoupper($chars);
        $nums = "0123456789";
        $syms = "!@#$%^&*()-+?";

        // build the base password of all lower-case letters
        for($i = 0; $i < $l; $i++) {
            $out .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
        }

        // create arrays if special character(s) required
        if($count) {
            // split base password to array; create special chars array
            $tmp1 = str_split($out);
            $tmp2 = array();

            // add required special character(s) to second array
            for($i = 0; $i < $c; $i++) {
                array_push($tmp2, substr($caps, mt_rand(0, strlen($caps) - 1), 1));
            }
            for($i = 0; $i < $n; $i++) {
                array_push($tmp2, substr($nums, mt_rand(0, strlen($nums) - 1), 1));
            }
            for($i = 0; $i < $s; $i++) {
                array_push($tmp2, substr($syms, mt_rand(0, strlen($syms) - 1), 1));
            }

            // hack off a chunk of the base password array that's as big as the special chars array
            $tmp1 = array_slice($tmp1, 0, $l - $count);
            // merge special character(s) array with base password array
            $tmp1 = array_merge($tmp1, $tmp2);
            // mix the characters up
            shuffle($tmp1);
            // convert to string for output
            $out = implode('', $tmp1);
        }

        return $out;
    }

    public function prepareData($data)
    {
        $randomPassword = uniqid();
        $data['active'] = 1;
        $data['password_salt'] = $this->generateDynamicSalt();
        $data['password'] = $this->encriptPassword(
            $this->getStaticSalt(),
            $randomPassword,
            $data['password_salt']
        );
        $data['registration_date'] = date('Y-m-d H:i:s');
        $date = new \DateTime();
        $data['registration_date'] = $date->format('Y-m-d H:i:s');
        $data['registration_token'] = md5(uniqid(mt_rand(), true));
        $data['email_confirmed'] = 1;
        return array($data, $randomPassword);
    }

    public function encriptPassword($staticSalt, $password, $dynamicSalt)
    {
        return $password = md5($staticSalt . $password . $dynamicSalt);
    }

    public function getStaticSalt()
    {
        $staticSalt = '';
        $config = $this->getServiceLocator()->get('Config');
        $staticSalt = $config['static_salt'];
        return $staticSalt;
    }

    public function generateDynamicSalt()
    {
        $dynamicSalt = '';
        for ($i = 0; $i < 50; $i++) {
            $dynamicSalt .= chr(rand(35, 126));
        }
        return $dynamicSalt;
    }

    public function sendConfirmationEmail(Users $user, $password)
    {
        $transport = $this->getServiceLocator()->get('mail.transport')->findMailConfig();
        $from = $this->getServiceLocator()->get('mail.transport')->findFromMail();

        $content = "Utworzono konto dla ciebie w serwisie " . $this->appName . "<br> Twoje hasło to: " .  $password;

        $html = new MimePart($content);
        $html->type = "text/html";
        $body = new MimeMessage();
        $body->setParts(array($html,));

        $message = new Message();
        $this->getRequest()->getServer();
        $message->addTo($user->getEmail())
            ->addFrom($from)
            ->setSubject('Rejestracja w serwisie: ' . $this->appName)
            ->setBody($body);
        $message->setEncoding('utf-8');
        $transport->send($message);
    }

    public function changePasswordAction()
    {
        $form = new ChangePasswordForm();

        $request = $this->getRequest();

        if ($request->isPost()) {

            $form->setInputFilter(new ChangePasswordFilter());
            $form->setData($request->getPost());

            if ($form->isValid()) {
                $data = $request->getPost()->toArray();

                $sm = $this->getServiceLocator();
                $dbAdapter = $sm->get('Zend\Db\Adapter\Adapter');

                $config = $this->getServiceLocator()->get('Config');
                $staticSalt = $config['static_salt'];

                $user = $this->identity();

                $authAdapter = new AuthAdapter($dbAdapter, 'cms_users', 'email', 'password', "MD5(CONCAT('$staticSalt', ?, password_salt)) AND active = 1" );
                $authAdapter
                    ->setIdentity($user->email)
                    ->setCredential($data['password_last']);

                $result = $authAdapter->authenticate();

                if ($result->getCode() == Result::FAILURE_CREDENTIAL_INVALID) {
                    $message = 'Błędne hasło';

                    $viewParams = array();
                    $viewParams['form'] = $form;
                    $viewParams['message'] = $message;
                    return new ViewModel($viewParams);
                } else {

                    $data = $this->prepareUser($data, $user);

                    $authUser = new Authentication();
                    $authUser->exchangeArray($data);
                    $this->getAuthUsersTable()->saveUser($authUser);

                    $this->flashMessenger()->addMessage('Poprawnie zmieniono hasło.');
                    return $this->redirect()->toRoute('users');
                }
            }
        }

        $viewParams = array();
        $viewParams['form'] = $form;
        return new ViewModel($viewParams);
    }

    public function prepareUser($data, $user)
    {
        $data['password_salt'] = $this->generateDynamicSalt();
        $data['password'] = $this->encriptPassword(
            $this->getStaticSalt(),
            $data['password_new'],
            $data['password_salt']
        );
        $data['id'] = $user->id;
        $data['name'] = $user->name;
        $data['surname'] = $user->surname;
        $data['email'] = $user->email;
        $data['email_confirmed'] = 1;
        $data['role'] = $user->role;
        $data['filename'] = $user->filename;
        $data['registration_date'] = $user->registration_date;
        $data['registration_token'] = $user->registration_token;
        $data['extra'] = $user->extra;
        $data['active'] = 1;

        return $data;
    }

    /**
     * @return \CmsIr\Users\Model\UsersTable
     */
    public function getUsersTable()
    {
        if (!$this->usersTable) {
            $sm = $this->getServiceLocator();
            $this->usersTable = $sm->get('CmsIr\Users\Model\UsersTable');
        }
        return $this->usersTable;
    }

    /**
     * @return \CmsIr\Authentication\Model\UsersTable
     */
    public function getAuthUsersTable()
    {
        if (!$this->authUsersTable) {
            $sm = $this->getServiceLocator();
            $this->authUsersTable = $sm->get('CmsIr\Authentication\Model\UsersTable');
        }
        return $this->authUsersTable;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package types

import (
	"bufio"
	"io"
	"net"

	"github.com/docker/engine-api/types/container"
	"github.com/docker/engine-api/types/filters"
	"github.com/docker/go-units"
)

// ContainerAttachOptions holds parameters to attach to a container.
type ContainerAttachOptions struct {
	Stream     bool
	Stdin      bool
	Stdout     bool
	Stderr     bool
	DetachKeys string
}

// ContainerCommitOptions holds parameters to commit changes into a container.
type ContainerCommitOptions struct {
	Reference string
	Comment   string
	Author    string
	Changes   []string
	Pause     bool
	Config    *container.Config
}

// ContainerExecInspect holds information returned by exec inspect.
type ContainerExecInspect struct {
	ExecID      string
	ContainerID string
	Running     bool
	ExitCode    int
}

// ContainerListOptions holds parameters to list containers with.
type ContainerListOptions struct {
	Quiet  bool
	Size   bool
	All    bool
	Latest bool
	Since  string
	Before string
	Limit  int
	Filter filters.Args
}

// ContainerLogsOptions holds parameters to filter logs with.
type ContainerLogsOptions struct {
	ShowStdout bool
	ShowStderr bool
	Since      string
	Timestamps bool
	Follow     bool
	Tail       string
}

// ContainerRemoveOptions holds parameters to remove containers.
type ContainerRemoveOptions struct {
	RemoveVolumes bool
	RemoveLinks   bool
	Force         bool
}

// CopyToContainerOptions holds information
// about files to copy into a container
type CopyToContainerOptions struct {
	AllowOverwriteDirWithFile bool
}

// EventsOptions hold parameters to filter events with.
type EventsOptions struct {
	Since   string
	Until   string
	Filters filters.Args
}

// NetworkListOptions holds parameters to filter the list of networks with.
type NetworkListOptions struct {
	Filters filters.Args
}

// HijackedResponse holds connection information for a hijacked request.
type HijackedResponse struct {
	Conn   net.Conn
	Reader *bufio.Reader
}

// Close closes the hijacked connection and reader.
func (h *HijackedResponse) Close() {
	h.Conn.Close()
}

// CloseWriter is an interface that implements structs
// that close input streams to prevent from writing.
type CloseWriter interface {
	CloseWrite() error
}

// CloseWrite closes a readWriter for writing.
func (h *HijackedResponse) CloseWrite() error {
	if conn, ok := h.Conn.(CloseWriter); ok {
		return conn.CloseWrite()
	}
	return nil
}

// ImageBuildOptions holds the information
// necessary to build images.
type ImageBuildOptions struct {
	Tags           []string
	SuppressOutput bool
	RemoteContext  string
	NoCache        bool
	Remove         bool
	ForceRemove    bool
	PullParent     bool
	Isolation      container.Isolation
	CPUSetCPUs     string
	CPUSetMems     string
	CPUShares      int64
	CPUQuota       int64
	CPUPeriod      int64
	Memory         int64
	MemorySwap     int64
	CgroupParent   string
	ShmSize        int64
	Dockerfile     string
	Ulimits        []*units.Ulimit
	BuildArgs      map[string]string
	AuthConfigs    map[string]AuthConfig
	Context        io.Reader
	Labels         map[string]string
}

// ImageBuildResponse holds information
// returned by a server after building
// an image.
type ImageBuildResponse struct {
	Body   io.ReadCloser
	OSType string
}

// ImageCreateOptions holds information to create images.
type ImageCreateOptions struct {
	RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry
}

// ImageImportSource holds source information for ImageImport
type ImageImportSource struct {
	Source     io.Reader // Source is the data to send to the server to create this image from (mutually exclusive with SourceName)
	SourceName string    // SourceName is the name of the image to pull (mutually exclusive with Source)
}

// ImageImportOptions holds information to import images from the client host.
type ImageImportOptions struct {
	Tag     string   // Tag is the name to tag this image with. This attribute is deprecated.
	Message string   // Message is the message to tag the image with
	Changes []string // Changes are the raw changes to apply to this image
}

// ImageListOptions holds parameters to filter the list of images with.
type ImageListOptions struct {
	MatchName string
	All       bool
	Filters   filters.Args
}

// ImageLoadResponse returns information to the client about a load process.
type ImageLoadResponse struct {
	Body io.ReadCloser
	JSON bool
}

// ImagePullOptions holds information to pull images.
type ImagePullOptions struct {
	All           bool
	RegistryAuth  string // RegistryAuth is the base64 encoded credentials for the registry
	PrivilegeFunc RequestPrivilegeFunc
}

// RequestPrivilegeFunc is a function interface that
// clients can supply to retry operations after
// getting an authorization error.
// This function returns the registry authentication
// header value in base 64 format, or an error
// if the privilege request fails.
type RequestPrivilegeFunc func() (string, error)

//ImagePushOptions holds information to push images.
type ImagePushOptions ImagePullOptions

// ImageRemoveOptions holds parameters to remove images.
type ImageRemoveOptions struct {
	Force         bool
	PruneChildren bool
}

// ImageSearchOptions holds parameters to search images with.
type ImageSearchOptions struct {
	RegistryAuth  string
	PrivilegeFunc RequestPrivilegeFunc
}

// ImageTagOptions holds parameters to tag an image
type ImageTagOptions struct {
	Force bool
}

// ResizeOptions holds parameters to resize a tty.
// It can be used to resize container ttys and
// exec process ttys too.
type ResizeOptions struct {
	Height int
	Width  int
}

// VersionResponse holds version information for the client and the server
type VersionResponse struct {
	Client *Version
	Server *Version
}

// ServerOK returns true when the client could connect to the docker server
// and parse the information received. It returns false otherwise.
func (v VersionResponse) ServerOK() bool {
	return v.Server != nil
}


text:
'use strict';
var config = require('./config');
//var path = require('path');
var cluster = require('cluster');
// Always use at least 1 master and 2 workers
var numCores = Math.max(2, require('os').cpus().length);
var numWorkers = 0;
var sqlClient;

function spawnWorkers() {
  // Fork workers
  while (numWorkers < numCores) {
    cluster.fork();
    numWorkers += 1;
  }
}

function createClient() {
  var sqlite3 = require('sqlite3-cluster');
  var wrap = require('./lib/dbwrap');
  var dir = [
    { tablename: 'devices'
    , idname: 'name'
    , indices: ['ip']
    }
  , { tablename: 'domains'
    , idname: 'domain'
    //, relations: [{ tablename: 'devices', id: 'hashid', fk: 'devices.device' }]
    , indices: ['device']
    //, immutable: false
    }
  ];

  var promise = sqlite3.create({
      filename: config.sqlcipher.filename
    , verbose: true

    , standalone: (1 === numCores)
    , serve: cluster.isMaster
    //, serve: (numCores > 1) && cluster.isMaster
    , connect: cluster.isWorker
    //, connect: (numCores > 1) && cluster.isWorker

    , bits: config.sqlcipher.bits
  });

  return promise.then(function (db) {
    return db.init({
      key: config.sqlcipher.key
    , bits: config.sqlcipher.bits
    });
  }).then(function (db) {
    return wrap.wrap(db, dir);
  });
}

function serve(devdb) {
  var http = require('http');
  // TODO
  //var https = require('https');
  var server = http.createServer();

  server.on('request', require('./app').create({ devstore: devdb }));

  server.listen(5080, '10.8.0.1', function () {
    console.log(server.address());
  });
}

if (cluster.isMaster) {
  console.log('[MASTER]', require('os').cpus(), 'cpus');

  spawnWorkers();

  cluster.on('exit', function(worker, code, signal) {
    numWorkers -= 1;
    console.log('worker ' + worker.process.pid + ' died with ' + code + ':' + signal);
    spawnWorkers();
  });

  var restartHaproxyPath = '/usr/local/bin/restart-haproxy';
  require('child_process').exec(restartHaproxyPath, function (err, stdout, stderr) {
    console.log('[Log] haproxy restarted');
    console.error('[Error]', err, stdout, stderr);
  });
}

sqlClient = createClient();

if (cluster.isWorker) {
  console.log('cluster.worker.id', cluster.worker.id);

  sqlClient.then(function (devdb) {
    serve(devdb);
  });
}

// The native Promise implementation ignores errors because... dumbness???
process.on('unhandledPromiseRejection', function (err) {
  console.error('Unhandled Promise Rejection');
  console.error(err);
  console.error(err.stack);

  process.exit(1);
});


text:
#ifndef FORMAT_H
#define FORMAT_H

#include <stdarg.h>

/* Error code returned when problem with format specification */

#define EXBADFORMAT             (-1)

/**
    Interpret format specification passing formatted text to consumer function.

    Executes the printf-compatible format specification @a fmt, referring to
    optional arguments @a ap.  Any output text is passed to caller-provided
    consumer function @a cons, which also takes caller-provided opaque pointer
    @a arg.

    @param cons         Pointer to caller-provided consumer function.
    @param arg          Opaque pointer passed through to @a cons.
    @param fmt          printf-compatible format specifier.
    @param ap           List of optional format string arguments

    @returns            Number of characters sent to @a cons, or EXBADFORMAT.
**/
extern int format( void * (* /* cons */) (void *, const char *, size_t),
             void *          /* arg  */,
             const char *    /* fmt  */,
             va_list         /* ap   */
);

/*    The Consumer Function
 *
 * The consumer function 'cons' must have the following type:
 *
 *   void * cons ( void * arg, const char * s, size_t n )
 *
 * You may give your function any valid C name.
 *
 * It takes an opaque pointer argument, which may be modified by the call.
 * The second and third arguments specify the source string and the number of
 *  characters to take from the string.
 * If the call is successful then a new value of the opaque pointer is returned,
 *  which will be passed on the next time the function is called.
 * In case of an error, the function returns NULL.
 */

#endif


text:
angular.module('app')
	.service('infoService', ['$uibModal',
		function ($uibModal) {

		var defaults = {
			backdrop: true,
			keyboard: true,
			modalFade: true,
			templateUrl: '/app/shared/modals/info.html'
		};

		var options = {
			title: '',
			content: '',
			type: null,
			typeList: null
		};

		this.showModal = function (customDefaults, customOptions) {
			if (!customDefaults) customDefaults = {};
			customDefaults.backdrop = 'static';
			return this.show(customDefaults, customOptions);
		};

		this.show = function (customDefaults, customOptions) {
			var tempDefaults = {};
			var tempOptions = {};

			angular.extend(tempDefaults, defaults, customDefaults);
			angular.extend(tempOptions, options, customOptions);

			if (!tempDefaults.controller) {
				tempDefaults.controller = function ($scope, $uibModalInstance) {
					$scope.options = tempOptions;
					$scope.options.close = function (result) {
						$uibModalInstance.close();
					};
				}
			}

			return $uibModal.open(tempDefaults).result;
        };

    }]);


text:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://xfire.codehaus.org/MTOMService" xmlns:ns1="http://entity.ids.rock.com" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://xfire.codehaus.org/MTOMService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xfire.codehaus.org/MTOMService">
<xsd:element name="userAuthenticSrv">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="in1" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="userAuthenticSrvResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns1:AuthBean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getUserCountSrv">
<xsd:complexType/>
</xsd:element>
<xsd:element name="getUserCountSrvResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getIsUserLogin">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getIsUserLoginResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getIdsGroupLog">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getIdsGroupLogResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns1:ArrayOfIdsGroupLog"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getUserByIDSrv">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getUserByIDSrvResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns1:AccountInfo"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getNewUsersSrv">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getNewUsersSrvResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns1:ArrayOfNewAccount"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getUserByTokenSrv">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getUserByTokenSrvResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns1:AccountInfo"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getGroupByDate">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getGroupByDateResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns1:ArrayOfGroupBean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getAllGroup">
<xsd:complexType/>
</xsd:element>
<xsd:element name="getAllGroupResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns1:ArrayOfGroupBean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getLogout">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getLogoutResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getUserAccountsSrv">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="in1" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getUserAccountsSrvResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="ns1:ArrayOfAccount"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://entity.ids.rock.com">
<xsd:complexType name="AuthBean">
<xsd:sequence>
<xsd:element minOccurs="0" name="errcode" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="message" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="success" type="xsd:int"/>
<xsd:element minOccurs="0" name="token" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfIdsGroupLog">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="IdsGroupLog" nillable="true" type="ns1:IdsGroupLog"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="IdsGroupLog">
<xsd:sequence>
<xsd:element minOccurs="0" name="displayname" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="groupname" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="grpid" nillable="true" type="xsd:int"/>
<xsd:element minOccurs="0" name="parentname" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="ts" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="AccountInfo">
<xsd:sequence>
<xsd:element minOccurs="0" name="account" nillable="true" type="ns1:Account"/>
<xsd:element minOccurs="0" name="errcode" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="message" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="success" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Account">
<xsd:sequence>
<xsd:element minOccurs="0" name="creatDate" type="xsd:dateTime"/>
<xsd:element minOccurs="0" name="dcode" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="dr" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="groupName" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="name" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="password" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="personId" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="sex" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="state" type="xsd:int"/>
<xsd:element minOccurs="0" name="ts" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="ucode" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="userId" type="xsd:int"/>
<xsd:element minOccurs="0" name="username" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfNewAccount">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="NewAccount" nillable="true" type="ns1:NewAccount"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="NewAccount">
<xsd:sequence>
<xsd:element minOccurs="0" name="actived" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="groupName" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="idsfld_idsext_deptcode" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="idsfld_idsext_dr" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="idsfld_idsext_personid" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="idsfld_idsext_pkcorp" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="idsfld_idsext_sex" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="idsfld_idsext_ts" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="reversiblepasswd" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="truename" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="userId" type="xsd:int"/>
<xsd:element minOccurs="0" name="username" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfGroupBean">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="GroupBean" nillable="true" type="ns1:GroupBean"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="GroupBean">
<xsd:sequence>
<xsd:element minOccurs="0" name="IDSFLD_IDSEXT_TS" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="IDSFLD_IDSEXT_UNITCODE" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="displayName" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="displayorder" nillable="true" type="xsd:int"/>
<xsd:element minOccurs="0" name="errcode" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="grpCode" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="grpDesc" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="grpId" type="xsd:int"/>
<xsd:element minOccurs="0" name="grpName" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="message" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="parentName" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="success" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfAccount">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="Account" nillable="true" type="ns1:Account"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
  </wsdl:types>
  <wsdl:message name="getUserAccountsSrvRequest">
    <wsdl:part name="parameters" element="tns:getUserAccountsSrv">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getUserByTokenSrvRequest">
    <wsdl:part name="parameters" element="tns:getUserByTokenSrv">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getGroupByDateResponse">
    <wsdl:part name="parameters" element="tns:getGroupByDateResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getGroupByDateRequest">
    <wsdl:part name="parameters" element="tns:getGroupByDate">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="userAuthenticSrvResponse">
    <wsdl:part name="parameters" element="tns:userAuthenticSrvResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getIdsGroupLogResponse">
    <wsdl:part name="parameters" element="tns:getIdsGroupLogResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getAllGroupRequest">
    <wsdl:part name="parameters" element="tns:getAllGroup">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getIdsGroupLogRequest">
    <wsdl:part name="parameters" element="tns:getIdsGroupLog">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getAllGroupResponse">
    <wsdl:part name="parameters" element="tns:getAllGroupResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getUserCountSrvResponse">
    <wsdl:part name="parameters" element="tns:getUserCountSrvResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getIsUserLoginResponse">
    <wsdl:part name="parameters" element="tns:getIsUserLoginResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getUserByIDSrvRequest">
    <wsdl:part name="parameters" element="tns:getUserByIDSrv">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getNewUsersSrvResponse">
    <wsdl:part name="parameters" element="tns:getNewUsersSrvResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getIsUserLoginRequest">
    <wsdl:part name="parameters" element="tns:getIsUserLogin">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getLogoutRequest">
    <wsdl:part name="parameters" element="tns:getLogout">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getUserAccountsSrvResponse">
    <wsdl:part name="parameters" element="tns:getUserAccountsSrvResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getUserByIDSrvResponse">
    <wsdl:part name="parameters" element="tns:getUserByIDSrvResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getLogoutResponse">
    <wsdl:part name="parameters" element="tns:getLogoutResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getUserCountSrvRequest">
    <wsdl:part name="parameters" element="tns:getUserCountSrv">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getUserByTokenSrvResponse">
    <wsdl:part name="parameters" element="tns:getUserByTokenSrvResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getNewUsersSrvRequest">
    <wsdl:part name="parameters" element="tns:getNewUsersSrv">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="userAuthenticSrvRequest">
    <wsdl:part name="parameters" element="tns:userAuthenticSrv">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="IdsUserServicePortType">
    <wsdl:operation name="userAuthenticSrv">
      <wsdl:input name="userAuthenticSrvRequest" message="tns:userAuthenticSrvRequest">
    </wsdl:input>
      <wsdl:output name="userAuthenticSrvResponse" message="tns:userAuthenticSrvResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getUserCountSrv">
      <wsdl:input name="getUserCountSrvRequest" message="tns:getUserCountSrvRequest">
    </wsdl:input>
      <wsdl:output name="getUserCountSrvResponse" message="tns:getUserCountSrvResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getIsUserLogin">
      <wsdl:input name="getIsUserLoginRequest" message="tns:getIsUserLoginRequest">
    </wsdl:input>
      <wsdl:output name="getIsUserLoginResponse" message="tns:getIsUserLoginResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getIdsGroupLog">
      <wsdl:input name="getIdsGroupLogRequest" message="tns:getIdsGroupLogRequest">
    </wsdl:input>
      <wsdl:output name="getIdsGroupLogResponse" message="tns:getIdsGroupLogResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getUserByIDSrv">
      <wsdl:input name="getUserByIDSrvRequest" message="tns:getUserByIDSrvRequest">
    </wsdl:input>
      <wsdl:output name="getUserByIDSrvResponse" message="tns:getUserByIDSrvResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getNewUsersSrv">
      <wsdl:input name="getNewUsersSrvRequest" message="tns:getNewUsersSrvRequest">
    </wsdl:input>
      <wsdl:output name="getNewUsersSrvResponse" message="tns:getNewUsersSrvResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getUserByTokenSrv">
      <wsdl:input name="getUserByTokenSrvRequest" message="tns:getUserByTokenSrvRequest">
    </wsdl:input>
      <wsdl:output name="getUserByTokenSrvResponse" message="tns:getUserByTokenSrvResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getGroupByDate">
      <wsdl:input name="getGroupByDateRequest" message="tns:getGroupByDateRequest">
    </wsdl:input>
      <wsdl:output name="getGroupByDateResponse" message="tns:getGroupByDateResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getAllGroup">
      <wsdl:input name="getAllGroupRequest" message="tns:getAllGroupRequest">
    </wsdl:input>
      <wsdl:output name="getAllGroupResponse" message="tns:getAllGroupResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getLogout">
      <wsdl:input name="getLogoutRequest" message="tns:getLogoutRequest">
    </wsdl:input>
      <wsdl:output name="getLogoutResponse" message="tns:getLogoutResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getUserAccountsSrv">
      <wsdl:input name="getUserAccountsSrvRequest" message="tns:getUserAccountsSrvRequest">
    </wsdl:input>
      <wsdl:output name="getUserAccountsSrvResponse" message="tns:getUserAccountsSrvResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="IdsUserServiceHttpBinding" type="tns:IdsUserServicePortType">
    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="userAuthenticSrv">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="userAuthenticSrvRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="userAuthenticSrvResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getUserCountSrv">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getUserCountSrvRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getUserCountSrvResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getIsUserLogin">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getIsUserLoginRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getIsUserLoginResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getIdsGroupLog">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getIdsGroupLogRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getIdsGroupLogResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getUserByIDSrv">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getUserByIDSrvRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getUserByIDSrvResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getNewUsersSrv">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getNewUsersSrvRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getNewUsersSrvResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getUserByTokenSrv">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getUserByTokenSrvRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getUserByTokenSrvResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getGroupByDate">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getGroupByDateRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getGroupByDateResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getAllGroup">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getAllGroupRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getAllGroupResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getLogout">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getLogoutRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getLogoutResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getUserAccountsSrv">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getUserAccountsSrvRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getUserAccountsSrvResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="IdsUserService">
    <wsdl:port name="IdsUserServiceHttpPort" binding="tns:IdsUserServiceHttpBinding">
      <wsdlsoap:address location="http://10.0.1.6/services/IdsUserService"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


text:
create table person(id INT PRIMARY KEY, name VARCHAR(255), age INT);

insert into person (id, name, age) values (1, 'Doe', 25);
insert into person (id, name, age) values (2, 'Dupont', 34);

create table birth(id INT PRIMARY KEY, name VARCHAR(255), birthdate DATE, person_id INT);


text:
/*---------------------------------------------------------------
	APPLICATION: mrpt_ros bridge
	FILE: imu.cpp
	AUTHOR: Raghavender Sahdev <raghavendersahdev@gmail.com>
  ---------------------------------------------------------------*/

#include <mrpt/ros1bridge/imu.h>

bool mrpt::ros1bridge::fromROS(
	const sensor_msgs::Imu& msg, mrpt::obs::CObservationIMU& obj)
{
	using namespace mrpt::obs;

	if (msg.orientation_covariance.at(0) >= 0)
	{
		obj.set(IMU_ORI_QUAT_X, msg.orientation.x);
		obj.set(IMU_ORI_QUAT_Y, msg.orientation.y);
		obj.set(IMU_ORI_QUAT_Z, msg.orientation.z);
		obj.set(IMU_ORI_QUAT_W, msg.orientation.w);
	}

	if (msg.linear_acceleration_covariance.at(0) >= 0)
	{
		obj.set(IMU_X_ACC, msg.linear_acceleration.x);
		obj.set(IMU_Y_ACC, msg.linear_acceleration.y);
		obj.set(IMU_Z_ACC, msg.linear_acceleration.z);
	}

	if (msg.angular_velocity_covariance.at(0) >= 0)
	{
		obj.set(IMU_WX, msg.angular_velocity.x);
		obj.set(IMU_WY, msg.angular_velocity.y);
		obj.set(IMU_WZ, msg.angular_velocity.z);
	}

	return true;
}

bool mrpt::ros1bridge::toROS(
	const mrpt::obs::CObservationIMU& obj, const std_msgs::Header& msg_header,
	sensor_msgs::Imu& msg)
{
	using namespace mrpt::obs;

	msg.header = msg_header;

	const auto& m = obj.rawMeasurements;
	if (obj.has(IMU_ORI_QUAT_X))
	{
		msg.orientation.x = m.at(IMU_ORI_QUAT_X);
		msg.orientation.y = m.at(IMU_ORI_QUAT_Y);
		msg.orientation.z = m.at(IMU_ORI_QUAT_Z);
		msg.orientation.w = m.at(IMU_ORI_QUAT_W);

		msg.orientation_covariance.fill(0.01);
	}
	else
	{
		msg.orientation_covariance.fill(-1);
	}

	if (obj.has(IMU_X_ACC))
	{
		msg.linear_acceleration.x = m.at(IMU_X_ACC);
		msg.linear_acceleration.y = m.at(IMU_Y_ACC);
		msg.linear_acceleration.z = m.at(IMU_Z_ACC);

		msg.linear_acceleration_covariance.fill(0.01);
	}
	else
	{
		msg.linear_acceleration_covariance.fill(-1);
	}

	if (obj.has(IMU_WX))
	{
		msg.angular_velocity.x = m.at(IMU_WX);
		msg.angular_velocity.y = m.at(IMU_WY);
		msg.angular_velocity.z = m.at(IMU_WZ);

		msg.angular_velocity_covariance.fill(0.01);
	}
	else
	{
		msg.angular_velocity_covariance.fill(-1);
	}

	return true;
}

/*
std_msgs/Header header
geometry_msgs/Quaternion orientation
float64[9] orientation_covariance
geometry_msgs/Vector3 angular_velocity
float64[9] angular_velocity_covariance
geometry_msgs/Vector3 linear_acceleration
float64[9] linear_acceleration_covariance
 */


text:
package org.thymeleaf.standard.processor;

import java.util.Map;

import org.thymeleaf.context.ITemplateContext;
import org.thymeleaf.engine.AttributeName;
import org.thymeleaf.model.IProcessableElementTag;
import org.thymeleaf.processor.element.AbstractAttributeTagProcessor;
import org.thymeleaf.processor.element.IElementTagStructureHandler;
import org.thymeleaf.standard.expression.IStandardExpression;
import org.thymeleaf.standard.expression.IStandardExpressionParser;
import org.thymeleaf.standard.expression.StandardExpressions;
import org.thymeleaf.templatemode.TemplateMode;

/**
 *
 * @author Daniel Fernández
 *
 * @since 3.0.0
 *
 */
public abstract class AbstractStandardTargetSelectionTagProcessor extends AbstractAttributeTagProcessor {

    protected AbstractStandardTargetSelectionTagProcessor(
            final TemplateMode templateMode, final String dialectPrefix, final String attrName, final int precedence) {
        super(templateMode, dialectPrefix, null, false, attrName, true, precedence, true);
    }

    @Override
    protected final void doProcess(
            final ITemplateContext context,
            final IProcessableElementTag tag,
            final AttributeName attributeName, final String attributeValue,
            final IElementTagStructureHandler structureHandler) {

        final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(context.getConfiguration());

        final IStandardExpression expression =
                expressionParser.parseExpression(context, attributeValue);

        validateSelectionValue(context, tag, attributeName, attributeValue, expression);

        final Object newSelectionTarget = expression.execute(context);

        final Map<String,Object> additionalLocalVariables =
                computeAdditionalLocalVariables(context, tag, attributeName, attributeValue, expression);
        if (additionalLocalVariables != null && additionalLocalVariables.size() > 0) {
            for (final Map.Entry<String,Object> variableEntry : additionalLocalVariables.entrySet()) {
                structureHandler.setLocalVariable(variableEntry.getKey(), variableEntry.getValue());
            }
        }

        structureHandler.setSelectionTarget(newSelectionTarget);

    }

    protected void validateSelectionValue(
            final ITemplateContext context,
            final IProcessableElementTag tag,
            final AttributeName attributeName, final String attributeValue,
            final IStandardExpression expression) {
        // Meant for being overridden. Nothing to be done in default implementation.
    }

    protected Map<String,Object> computeAdditionalLocalVariables(
            final ITemplateContext context,
            final IProcessableElementTag tag,
            final AttributeName attributeName, final String attributeValue,
            final IStandardExpression expression) {
        // This method is meant to be overriden. By default, no local variables
        // will be set.
        return null;
    }

}


text:
<?php
if (!defined("WIKINI_VERSION"))
{
  die ("acceso directo prohibido");
}

$GLOBALS['translations'] = array_merge($GLOBALS['translations'], array(

// Action translation
'LANG_DESTINATION_REQUIRED' => 'Falta el parámetro destinación (idioma destinación) obligatorio.',
'LANG_FLAG_FILE_MISSING' => 'Falta la bandera para este país'

));

?>


text:
Liaison is a fancier sounding name for a [Middleman][middleman]; it is also a
heavily opinionated [Middleman][middleman] project, which is setup with
[HAML][haml] and [Sass][sass] (instead of [ERB][erb] & [Less][less]), and
preconfigured with the [Bootstrap][bootstrap] framework,
[Font-Awesome][fontawesome] and [GitHub Octicons][octicons] for icons,
[Kramdown][kramdown] for rendering markdown content, and
[Rouge syntax highlighting][rouge] for all of your code highlighting needs.

If you agree with this collection of tools for building websites, the Liaison
project is intended to make it really easy to jumpstart new middleman projects.

## Getting started

Clone the repo, then:

``` bash
cd liaison
bundle install
bundle exec middleman
```

Now go visit `http://localhost:4567` from your browser. If you see a message
that says "MIDDLEMAN IS WATCHING" you're all set! Click the "Example
Documentation" button to view rendered Markdown content.

## License(s)

Please refer to the corresponding project licenses for the latest information
regarding their licensing requirements. For reference, here is a summary of
all licenses used in teh Liaison project:

* The Liaison project (like [Middleman][middleman]) is released under the
  [MIT License](mit).
* [Bootstrap][bootstrap] is released under the [Apache 2.0 license][apache-2.0].
* [FontAwesome][fontawesome]
  * Fonts are released under [SIL OFL 1.1][ofl] (Open Font License).
  * CSS, LESS and SASS files are released under the [MIT License][mit].
  * Documentation is released under the [Creative Commons BY 3.0 License][cc-by]
* [GitHub Octicons][octicons]
  * Fonts are released under [SIL OFL 1.1][ofl] (Open Font License).
  * Code is released under the [MIT License][mit].

[haml]:        http://haml.info/
[sass]:        http://sass-lang.com/
[erb]:         http://ruby-doc.org/stdlib-2.1.3/libdoc/erb/rdoc/ERB.html
[less]:        http://lesscss.org/#
[middleman]:   http://middlemanapp.com
[bootstrap]:   http://getbootstrap.com
[fontawesome]: http://fontawesome.io
[octicons]:    https://octicons.github.com/
[kramdown]:    http://kramdown.gettalong.org/
[rouge]:       https://github.com/jneen/rouge
[mit]:         http://opensource.org/licenses/MIT
[apache-2.0]:  http://www.apache.org/licenses/LICENSE-2.0.html
[ofl]:         http://scripts.sil.org/OFL
[cc-by]:       http://creativecommons.org/licenses/by/3.0/


text:
/**
  @file         add_const.h
  @brief        adds const qualifier to any type.
  @author       HRYKY
  @version      $Id: add_const.h 324 2014-02-09 04:38:38Z hryky.private@gmail.com $
  @addtogroup   generic_programming
  @{
 */
#ifndef TYPE_ADD_CONST_H_20120226152038305
#define TYPE_ADD_CONST_H_20120226152038305
//------------------------------------------------------------------------------
// defines macros
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// declares types
//------------------------------------------------------------------------------
namespace hryky
{
	/// add const qualifier.
	template < typename ValueT >
	class AddConst;

}
//------------------------------------------------------------------------------
// declares classes
//------------------------------------------------------------------------------
/**
  @brief    add const qualifier.

 */
template < typename ValueT >
class hryky::AddConst
{
public :
	/// represents the type qualified by "const".
	typedef ValueT const    type;
};
//------------------------------------------------------------------------------
// specializes classes
//------------------------------------------------------------------------------
namespace hryky
{
/**
  @internal
  @brief        add const qualifier.
  @note
  - specializes AddConst for constant parameter
  @endinternal
 */
template < typename ValueT >
class AddConst<ValueT const>
{
public :
	typedef ValueT const    type;
};
/**
  @internal
  @brief        add const qualifier.
  @note
  - specializes AddConst for reference parameter
  @endinternal
 */
template < typename ValueT >
class AddConst<ValueT &>
{
public :
	typedef ValueT &        type;
};
} // namespace hryky
//------------------------------------------------------------------------------
// defines public member functions
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// defines protected member functions
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// defines private member functions
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// declares global functions
//------------------------------------------------------------------------------
namespace hryky
{
} /// namespace hry;y
//------------------------------------------------------------------------------
// defines global functions
//------------------------------------------------------------------------------
#endif // TYPE_ADD_CONST_H_20120226152038305
/// @}
// end of file


text:
using System;
using System.Web.Http;

namespace Darjeel.Web.Http.Extensions
{
    public static class ApiControllerExtensions
    {
        public static AcceptedResult Accepted(this ApiController controller)
        {
            if (controller == null) throw new ArgumentNullException(nameof(controller));

            return new AcceptedResult(controller);
        }
    }
}


text:
import lldb
import commands

def __lldb_init_module(debugger, internal_dict):
    debugger.HandleCommand('command script add -f lldbassignchecker.cocoasanitizer_activate_assignchecker_impl cocoasanitizer_assignchecker')

def cocoasanitizer_activate_assignchecker_impl(debugger, command, result, internal_dict):
	debugger.HandleCommand('expr (void*) dlopen("/usr/local/lib/cocoasanitizer/AssignChecker.dylib", 0x2)')
	debugger.HandleCommand('expr (void) [BMPAssignChecker start]')


text:
    module.exports =  header: 'Solr Start', handler: ->
      @service.start
        name: 'solr'


text:
$reportPortalUri = if ($env:PesterPortalUrl -eq $null) { 'http://localhost/reports' } else { $env:PesterPortalUrl }
$reportServerUri = if ($env:PesterServerUrl -eq $null) { 'http://localhost/reportserver' } else { $env:PesterServerUrl }

function VerifyFileWasDownloaded()
{
    param(
        [Parameter(Mandatory = $True)]
        [string]
        $folderPath,

        [Parameter(Mandatory = $True)]
        [string]
        $fileName
    )
    # Test if the report was downloaded
    $localReportDownloaded = Get-ChildItem  $folderPath | Where-Object { $_.Name -eq $fileName }
    $localReportDownloaded | Should Not BeNullOrEmpty
}

Describe "Out-RsRestFolderContent" {
    $rsFolderPath = ""
    $destinationPath = ""

    BeforeEach {
        $session = New-RsRestSession -ReportPortalUri $reportPortalUri

        # Create a folder on Report Server to upload some files to
        $folderName = 'SUT_OutRsRestCatalogItem_' + [guid]::NewGuid()
        $rsFolderPath = "/$folderName"
        New-RsRestFolder -WebSession $session -RsFolder "/" -FolderName $folderName

        # Upload the catalog items that are going to be downloaded
        $localResourcesPath =   (Get-Item -Path ".\").FullName  + '\Tests\CatalogItems\testResources'
        Write-RsRestFolderContent -WebSession $session -RsFolder $rsFolderPath -Path $localResourcesPath -Recurse

        # Create a local folder to download the catalog items
        $localFolderName = 'SutOutRsRestFolderContentTest' + [guid]::NewGuid()
        $currentLocalPath = (Get-Item -Path ".\" ).FullName
        $destinationPath = $currentLocalPath + '\' + $localFolderName
        New-Item -Path $destinationPath -type "directory"
    }

    AfterEach {
        Remove-RsCatalogItem -ReportServerUri $reportServerUri -RsFolder $rsFolderPath -Confirm:$false
        if ($destinationPath -ne $null -and $destinationPath.Length -ne 0 -and (Test-Path $destinationPath))
        {
            Remove-Item -Path $destinationPath -Recurse
        }
    }

    Context "ReportPortalUri parameter" {
        It "Downloads all resources from a folder" {
            Out-RsRestFolderContent -ReportPortalUri $reportPortalUri -RsFolder $rsFolderPath -Destination $destinationPath -Verbose
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "emptyFile.txt"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "emptyReport.rdl"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "NewExcelWorkbook.xlsx"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "NewKPI.kpi"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "OldExcelWorkbook.xls"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SimpleMobileReport.rsmobile"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SimplePowerBIReport.pbix"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SqlPowerBIReport.pbix"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SutWriteRsFolderContent_DataSource.rsds"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "UnDataset.rsd"
        }

        It "Downloads all resources from subfolders of a folder" {
            Out-RsRestFolderContent -ReportPortalUri $reportPortalUri -RsFolder $rsFolderPath -Destination $destinationPath -Recurse -Verbose
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "emptyFile.txt"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "emptyReport.rdl"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "NewExcelWorkbook.xlsx"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "NewKPI.kpi"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "OldExcelWorkbook.xls"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SimpleMobileReport.rsmobile"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SimplePowerBIReport.pbix"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SqlPowerBIReport.pbix"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SutWriteRsFolderContent_DataSource.rsds"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "UnDataset.rsd"
            VerifyFileWasDownloaded -folderPath "$destinationPath\testResources2" -fileName "emptyReport2.rdl"
        }
    }

    Context "WebSession parameter" {
        $webSession = $null

        BeforeEach {
            $webSession = New-RsRestSession -ReportPortalUri $reportPortalUri
        }

        It "Downloads all resources from a folder" {
            Out-RsRestFolderContent -WebSession $webSession -RsFolder $rsFolderPath -Destination $destinationPath -Verbose
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "emptyFile.txt"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "emptyReport.rdl"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "NewExcelWorkbook.xlsx"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "NewKPI.kpi"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "OldExcelWorkbook.xls"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SimpleMobileReport.rsmobile"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SimplePowerBIReport.pbix"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SqlPowerBIReport.pbix"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SutWriteRsFolderContent_DataSource.rsds"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "UnDataset.rsd"
        }

        It "Downloads all resources from subfolders of a folder" {
            Out-RsRestFolderContent -WebSession $webSession -RsFolder $rsFolderPath -Destination $destinationPath -Recurse -Verbose
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "emptyFile.txt"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "emptyReport.rdl"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "NewExcelWorkbook.xlsx"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "NewKPI.kpi"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "OldExcelWorkbook.xls"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SimpleMobileReport.rsmobile"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SimplePowerBIReport.pbix"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SqlPowerBIReport.pbix"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "SutWriteRsFolderContent_DataSource.rsds"
            VerifyFileWasDownloaded -folderPath $destinationPath -fileName "UnDataset.rsd"
            VerifyFileWasDownloaded -folderPath "$destinationPath\testResources2" -fileName "emptyReport2.rdl"
        }
    }
}


text:
using System.Collections;
namespace System
{
#if !COREINTERNAL
    /// <summary>
    /// IStructuralComparable
    /// </summary>
    public
#endif
 interface IStructuralComparable
    {
        /// <summary>
        /// Compares to.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <param name="comparer">The comparer.</param>
        /// <returns></returns>
        int CompareTo(object other, IComparer comparer);
    }
}
#endif


text:
package org.kohsuke.github;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.io.FileNotFoundException;
import java.io.IOException;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.nullValue;

/**
 * @author Gunnar Skjold
 */
public class GHProjectColumnTest extends AbstractGitHubWireMockTest {
    private GHProject project;
    private GHProjectColumn column;

    @Before
    public void setUp() throws Exception {
        project = gitHub.getOrganization(GITHUB_API_TEST_ORG).createProject("test-project", "This is a test project");
        column = project.createColumn("column-one");
    }

    @Test
    public void testCreatedColumn() {
        assertThat(column.getName(), equalTo("column-one"));
    }

    @Test
    public void testEditColumnName() throws IOException {
        column.setName("new-name");
        column = gitHub.getProjectColumn(column.getId());
        assertThat(column.getName(), equalTo("new-name"));
    }

    @Test
    public void testDeleteColumn() throws IOException {
        column.delete();
        try {
            column = gitHub.getProjectColumn(column.getId());
            assertThat(column, nullValue());
        } catch (FileNotFoundException e) {
            column = null;
        }
    }

    @After
    public void after() throws IOException {
        if (mockGitHub.isUseProxy()) {
            if (column != null) {
                column = getNonRecordingGitHub().getProjectColumn(column.getId());
                try {
                    column.delete();
                    column = null;
                } catch (FileNotFoundException e) {
                    column = null;
                }
            }
            if (project != null) {
                project = getNonRecordingGitHub().getProject(project.getId());
                try {
                    project.delete();
                    project = null;
                } catch (FileNotFoundException e) {
                    project = null;
                }
            }
        }
    }
}


text:
package org.semanticweb.elk.reasoner;

import java.util.HashSet;
import java.util.Set;

import org.semanticweb.elk.owl.interfaces.ElkEntity;
import org.semanticweb.elk.reasoner.taxonomy.model.Node;
import org.semanticweb.elk.reasoner.taxonomy.model.TaxonomyNode;

public class TaxonomyNodeEntailment<M extends ElkEntity, N extends TaxonomyNode<M>>
		extends NodeEntailment<M, N> {

	public TaxonomyNodeEntailment(N node) {
		super(node);
	}

	public boolean containsDirectSubsumersOf(N other) {
		Set<M> otherDirectSubsumers = getDirectSubsumers(other);
		return getDirectSubsumers(getNode()).containsAll(otherDirectSubsumers)
				|| getAllSubsumers(getNode()).containsAll(otherDirectSubsumers);
	}

	public void reportMissingDirectSubsumersOf(N other, Listener<M> listener) {
		Set<M> allSubsumers = getAllSubsumers(getNode());
		Set<M> otherDirectSubsumers = getDirectSubsumers(other);
		for (M otherDirect : otherDirectSubsumers) {
			if (!allSubsumers.contains(otherDirect)) {
				listener.reportMissingDirectSubsumer(otherDirect);
			}
		}
	}

	static <M extends ElkEntity> Set<M> getDirectSubsumers(
			TaxonomyNode<M> node) {
		Set<? extends Node<M>> directSubsumers = node.getDirectSuperNodes();
		Set<M> result = new HashSet<M>(directSubsumers.size());
		for (Node<M> directSubsumer : directSubsumers) {
			result.add(directSubsumer.getCanonicalMember());
		}
		return result;
	}

	static <M extends ElkEntity> Set<M> getAllSubsumers(TaxonomyNode<M> node) {
		Set<? extends Node<M>> superNodes = node.getAllSuperNodes();
		Set<M> result = new HashSet<M>(node.size() + superNodes.size());
		for (M member : node) {
			result.add(member);
		}
		for (Node<M> superNode : superNodes) {
			for (M member : superNode) {
				result.add(member);
			}
		}
		return result;
	}

	public interface Listener<M extends ElkEntity>
			extends NodeEntailment.Listener<M> {

		public void reportMissingDirectSubsumer(M subsumer);

	}

}


text:
package org.apache.phoenix.compile;
import static org.apache.phoenix.query.QueryConstants.VALUE_COLUMN_FAMILY;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.apache.phoenix.parse.AliasedNode;
import org.apache.phoenix.parse.ColumnParseNode;
import org.apache.phoenix.parse.FamilyWildcardParseNode;
import org.apache.phoenix.parse.OrderByNode;
import org.apache.phoenix.parse.ParseNode;
import org.apache.phoenix.parse.ParseNodeFactory;
import org.apache.phoenix.parse.SelectStatement;
import org.apache.phoenix.parse.StatelessTraverseAllParseNodeVisitor;
import org.apache.phoenix.parse.TableName;
import org.apache.phoenix.parse.WildcardParseNode;
import org.apache.phoenix.schema.ColumnFamilyNotFoundException;
import org.apache.phoenix.schema.ColumnNotFoundException;
import org.apache.phoenix.schema.ColumnRef;
import org.apache.phoenix.schema.LocalIndexDataColumnRef;
import org.apache.phoenix.schema.PColumn;
import org.apache.phoenix.schema.PName;
import org.apache.phoenix.schema.PNameFactory;
import org.apache.phoenix.schema.PTable;
import org.apache.phoenix.schema.PTable.EncodedCQCounter;
import org.apache.phoenix.schema.PTable.IndexType;
import org.apache.phoenix.schema.PTableImpl;
import org.apache.phoenix.schema.PTableType;
import org.apache.phoenix.schema.ProjectedColumn;
import org.apache.phoenix.schema.TableRef;
import org.apache.phoenix.util.EncodedColumnsUtil;
import org.apache.phoenix.util.IndexUtil;
import org.apache.phoenix.util.SchemaUtil;

import com.google.common.base.Preconditions;

public class TupleProjectionCompiler {
    public static final PName PROJECTED_TABLE_SCHEMA = PNameFactory.newName(".");
    private static final ParseNodeFactory NODE_FACTORY = new ParseNodeFactory();

    public static PTable createProjectedTable(SelectStatement select, StatementContext context) throws SQLException {
        Preconditions.checkArgument(!select.isJoin());
        // Non-group-by or group-by aggregations will create its own projected result.
        if (select.getInnerSelectStatement() != null
                || select.getFrom() == null
                || select.isAggregate()
                || select.isDistinct()
                || (context.getResolver().getTables().get(0).getTable().getType() != PTableType.TABLE
                && context.getResolver().getTables().get(0).getTable().getType() != PTableType.INDEX && context.getResolver().getTables().get(0).getTable().getType() != PTableType.VIEW))
            return null;

        List<PColumn> projectedColumns = new ArrayList<PColumn>();
        boolean isWildcard = false;
        Set<String> families = new HashSet<String>();
        ColumnRefVisitor visitor = new ColumnRefVisitor(context);
        TableRef tableRef = context.getCurrentTable();
        PTable table = tableRef.getTable();

        for (AliasedNode aliasedNode : select.getSelect()) {
            ParseNode node = aliasedNode.getNode();
            if (node instanceof WildcardParseNode) {
                if (((WildcardParseNode) node).isRewrite()) {
                    TableRef parentTableRef = FromCompiler.getResolver(
                            NODE_FACTORY.namedTable(null, TableName.create(table.getSchemaName().getString(),
                                    table.getParentTableName().getString())), context.getConnection()).resolveTable(
                            table.getSchemaName().getString(),
                            table.getParentTableName().getString());
                    for (PColumn column : parentTableRef.getTable().getColumns()) {
                        NODE_FACTORY.column(null, '"' + IndexUtil.getIndexColumnName(column) + '"', null).accept(visitor);
                    }
                }
                isWildcard = true;
            } else if (node instanceof FamilyWildcardParseNode) {
                FamilyWildcardParseNode familyWildcardNode = (FamilyWildcardParseNode) node;
                String familyName = familyWildcardNode.getName();
                if (familyWildcardNode.isRewrite()) {
                    TableRef parentTableRef = FromCompiler.getResolver(
                            NODE_FACTORY.namedTable(null, TableName.create(table.getSchemaName().getString(),
                                    table.getParentTableName().getString())), context.getConnection()).resolveTable(
                            table.getSchemaName().getString(),
                            table.getParentTableName().getString());
                    for (PColumn column : parentTableRef.getTable().getColumnFamily(familyName).getColumns()) {
                        NODE_FACTORY.column(null, '"' + IndexUtil.getIndexColumnName(column) + '"', null).accept(visitor);
                    }
                }
                families.add(familyName);
            } else {
                node.accept(visitor);
            }
        }
        if (!isWildcard) {
            for (OrderByNode orderBy : select.getOrderBy()) {
                orderBy.getNode().accept(visitor);
            }
        }

        boolean hasSaltingColumn = table.getBucketNum() != null;
        int position = hasSaltingColumn ? 1 : 0;
        // Always project PK columns first in case there are some PK columns added by alter table.
        for (int i = position; i < table.getPKColumns().size(); i++) {
            PColumn sourceColumn = table.getPKColumns().get(i);
            ColumnRef sourceColumnRef = new ColumnRef(tableRef, sourceColumn.getPosition());
            PColumn column = new ProjectedColumn(sourceColumn.getName(), sourceColumn.getFamilyName(),
                    position++, sourceColumn.isNullable(), sourceColumnRef, null);
            projectedColumns.add(column);
        }
        for (PColumn sourceColumn : table.getColumns()) {
            if (SchemaUtil.isPKColumn(sourceColumn))
                continue;
            ColumnRef sourceColumnRef = new ColumnRef(tableRef, sourceColumn.getPosition());
            if (!isWildcard
                    && !visitor.columnRefSet.contains(sourceColumnRef)
                    && !families.contains(sourceColumn.getFamilyName().getString()))
                continue;
            PColumn column = new ProjectedColumn(sourceColumn.getName(), sourceColumn.getFamilyName(),
                    position++, sourceColumn.isNullable(), sourceColumnRef, sourceColumn.getColumnQualifierBytes());
            projectedColumns.add(column);
            // Wildcard or FamilyWildcard will be handled by ProjectionCompiler.
            if (!isWildcard && !families.contains(sourceColumn.getFamilyName())) {
            	EncodedColumnsUtil.setColumns(column, table, context.getScan());
            }
        }
        // add LocalIndexDataColumnRef
        for (LocalIndexDataColumnRef sourceColumnRef : visitor.localIndexColumnRefSet) {
            PColumn column = new ProjectedColumn(sourceColumnRef.getColumn().getName(),
                    sourceColumnRef.getColumn().getFamilyName(), position++,
                    sourceColumnRef.getColumn().isNullable(), sourceColumnRef, sourceColumnRef.getColumn().getColumnQualifierBytes());
            projectedColumns.add(column);
        }

        return PTableImpl.makePTable(table.getTenantId(), table.getSchemaName(), table.getTableName(),
                PTableType.PROJECTED, table.getIndexState(), table.getTimeStamp(), table.getSequenceNumber(),
                table.getPKName(), table.getBucketNum(), projectedColumns, table.getParentSchemaName(),
                table.getParentTableName(), table.getIndexes(), table.isImmutableRows(), Collections.<PName> emptyList(),
                null, null, table.isWALDisabled(), table.isMultiTenant(), table.getStoreNulls(), table.getViewType(),
                table.getViewIndexId(),
                table.getIndexType(), table.rowKeyOrderOptimizable(), table.isTransactional(), table.getUpdateCacheFrequency(),
                table.getIndexDisableTimestamp(), table.isNamespaceMapped(), table.getAutoPartitionSeqName(), table.isAppendOnlySchema(), table.getImmutableStorageScheme(), table.getEncodingScheme(), table.getEncodedCQCounter(), table.useStatsForParallelization());
    }

    public static PTable createProjectedTable(TableRef tableRef, List<ColumnRef> sourceColumnRefs, boolean retainPKColumns) throws SQLException {
        PTable table = tableRef.getTable();
        boolean hasSaltingColumn = retainPKColumns && table.getBucketNum() != null;
        List<PColumn> projectedColumns = new ArrayList<PColumn>();
        int position = hasSaltingColumn ? 1 : 0;
        for (int i = position; i < sourceColumnRefs.size(); i++) {
            ColumnRef sourceColumnRef = sourceColumnRefs.get(i);
            PColumn sourceColumn = sourceColumnRef.getColumn();
            String colName = sourceColumn.getName().getString();
            String aliasedName = tableRef.getTableAlias() == null ?
                      SchemaUtil.getColumnName(table.getName().getString(), colName)
                    : SchemaUtil.getColumnName(tableRef.getTableAlias(), colName);
            PName familyName =  SchemaUtil.isPKColumn(sourceColumn) ? (retainPKColumns ? null : PNameFactory.newName(VALUE_COLUMN_FAMILY)) : sourceColumn.getFamilyName();
            PColumn column = new ProjectedColumn(PNameFactory.newName(aliasedName), familyName,
                    position++, sourceColumn.isNullable(), sourceColumnRef, sourceColumn.getColumnQualifierBytes());
            projectedColumns.add(column);
        }
        EncodedCQCounter cqCounter = EncodedCQCounter.NULL_COUNTER;
        if (EncodedColumnsUtil.usesEncodedColumnNames(table)) {
            cqCounter = EncodedCQCounter.copy(table.getEncodedCQCounter());
        }

        return PTableImpl.makePTable(table.getTenantId(), PROJECTED_TABLE_SCHEMA, table.getName(), PTableType.PROJECTED,
                null, table.getTimeStamp(), table.getSequenceNumber(), table.getPKName(),
                retainPKColumns ? table.getBucketNum() : null, projectedColumns, null, null,
                Collections.<PTable> emptyList(), table.isImmutableRows(), Collections.<PName> emptyList(), null, null,
                table.isWALDisabled(), table.isMultiTenant(), table.getStoreNulls(), table.getViewType(),
                table.getViewIndexId(), null, table.rowKeyOrderOptimizable(), table.isTransactional(),
                table.getUpdateCacheFrequency(), table.getIndexDisableTimestamp(), table.isNamespaceMapped(), table.getAutoPartitionSeqName(), table.isAppendOnlySchema(), table.getImmutableStorageScheme(), table.getEncodingScheme(), cqCounter, table.useStatsForParallelization());
    }

    // For extracting column references from single select statement
    private static class ColumnRefVisitor extends StatelessTraverseAllParseNodeVisitor {
        private final StatementContext context;
        private final Set<ColumnRef> columnRefSet;
        private final Set<LocalIndexDataColumnRef> localIndexColumnRefSet;

        private ColumnRefVisitor(StatementContext context) {
            this.context = context;
            this.columnRefSet = new HashSet<ColumnRef>();
            this.localIndexColumnRefSet = new HashSet<LocalIndexDataColumnRef>();
        }

        @Override
        public Void visit(ColumnParseNode node) throws SQLException {
            try {
                columnRefSet.add(context.getResolver().resolveColumn(node.getSchemaName(), node.getTableName(), node.getName()));
            } catch (ColumnNotFoundException e) {
                if (context.getCurrentTable().getTable().getIndexType() == IndexType.LOCAL) {
                    try {
                        localIndexColumnRefSet.add(new LocalIndexDataColumnRef(context, node.getName()));
                    } catch (ColumnFamilyNotFoundException c) {
                        throw e;
                    }
                } else {
                    throw e;
                }
            }
            return null;
        }
    }
}


text:
using OneIndiaInfo.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace OneIndiaInfo.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            var model = new HomePageViewModel() { SelectedPostOfficeDetail = new PostOfficeDetail() };
            return View(model);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}


text:
var gulp = require('gulp');
var gutil = require('gulp-util');
var minifyHTML = require('gulp-minify-html');
var webpack = require('webpack');
var webpackDevMiddleware = require('webpack-dev-middleware');
var webpackHotMiddleware = require('webpack-hot-middleware');
var webpackConfig = require('./webpack.config.js');
var browserSync = require("browser-sync");

gulp.task("default", ["dev-server"]);
gulp.task('build-dev', ['webpack:build-dev', 'html:minify'], function () {
  gulp.watch(["src/**/*"], ['webpack:build-dev', 'html:minify']);
});
gulp.task('build', ['webpack:build', 'html:minify']);

gulp.task('html:minify', function() {
  return gulp.src('./assets/*.html')
    .pipe(minifyHTML({empty: true}))
    .pipe(gulp.dest('build'));
});

gulp.task('webpack:build', function (callback) {
  // modify some webpack config options
  var myConfig = Object.create(webpackConfig);
  myConfig.plugins = myConfig.plugins.concat(
  	new webpack.optimize.DedupePlugin(),
  	new webpack.optimize.UglifyJsPlugin()
  );

  // run webpack
  webpack(myConfig, function(err, stats) {
  	if(err) throw new gutil.PluginError("webpack:build", err);
  	gutil.log("[webpack:build]", stats.toString({
  		colors: true
  	}));
  	callback();
  });
});

// modify some webpack config options
var myDevConfig = Object.create(webpackConfig);
myDevConfig.devtool = "sourcemap";
myDevConfig.debug = true;

// create a single instance of the compiler to allow caching
var devCompiler = webpack(myDevConfig);

gulp.task("webpack:build-dev", function(callback) {
 	// run webpack
 	devCompiler.run(function(err, stats) {
 		if(err) throw new gutil.PluginError("webpack:build-dev", err);
 		gutil.log("[webpack:build-dev]", stats.toString({
 			colors: true
 		}));
    callback();
  });
});

gulp.task("dev-server", function(callback) {
  var myConfig = Object.create(webpackConfig);
  var compiler = webpack(myConfig);
  browserSync({
    notify: false,
    startPath: './index.html',
    server: {
      //baseDir: myConfig.output.publicPath,
      baseDir: "build",
      middleware: [
        webpackDevMiddleware(compiler, {
          publicPath: webpackConfig.output.publicPath,
          stats: { colors: true }
        }),
        webpackHotMiddleware(compiler)
      ]
    }
  });
});


text:
package eu.dnetlib.iis.wf.importer.content;

import static eu.dnetlib.iis.common.spark.SparkSessionSupport.runWithHiveEnabledSparkSession;
import static org.apache.spark.sql.functions.col;
import static org.apache.spark.sql.functions.concat;
import static org.apache.spark.sql.functions.lit;

import org.apache.commons.lang3.StringUtils;
import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Encoders;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;

import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import com.google.common.collect.Lists;

import eu.dnetlib.iis.common.InfoSpaceConstants;
import eu.dnetlib.iis.common.java.io.HdfsUtils;
import eu.dnetlib.iis.common.report.ReportEntryFactory;
import eu.dnetlib.iis.common.schemas.ReportEntry;
import eu.dnetlib.iis.common.spark.SparkConfHelper;
import eu.dnetlib.iis.common.spark.avro.AvroDataFrameSupport;
import eu.dnetlib.iis.importer.auxiliary.schemas.DocumentContentUrl;
import pl.edu.icm.sparkutils.avro.SparkAvroSaver;

/**
 * {@link DocumentContentUrl} importer reading data from hive table being a part of pdf aggregation subsystem.
 *
 * @author mhorst
 *
 */
public class HiveBasedDocumentContentUrlImporterJob {

    private static SparkAvroSaver avroSaver = new SparkAvroSaver();

    private static final String COUNTER_IMPORTED_RECORDS_TOTAL = "import.content.urls.fromAggregator";

    public static void main(String[] args) throws Exception {

        HiveBasedDocumentContentUrlImporterJobParameters params = new HiveBasedDocumentContentUrlImporterJobParameters();
        JCommander jcommander = new JCommander(params);
        jcommander.parse(args);

        SparkConf conf = SparkConfHelper.withKryo(new SparkConf());
        if (!StringUtils.isEmpty(params.hiveMetastoreUris)) {
            conf.set("hive.metastore.uris", params.hiveMetastoreUris);
        }

        runWithHiveEnabledSparkSession(conf, params.isSparkSessionShared, sparkSession -> {

            HdfsUtils.remove(sparkSession.sparkContext().hadoopConfiguration(), params.outputPath);
            HdfsUtils.remove(sparkSession.sparkContext().hadoopConfiguration(), params.outputReportPath);

            Dataset<Row> result = sparkSession.sql("select id, location, mimetype, size, hash from "
                    + params.inputTableName + " where location is not null");

            JavaRDD<DocumentContentUrl> documentContentUrl = buildOutputRecord(result, sparkSession);
            documentContentUrl.cache();

            JavaRDD<ReportEntry> reports = generateReportEntries(sparkSession, documentContentUrl.count());

            avroSaver.saveJavaRDD(documentContentUrl, DocumentContentUrl.SCHEMA$, params.outputPath);
            avroSaver.saveJavaRDD(reports, ReportEntry.SCHEMA$, params.outputReportPath);
        });
    }

    private static JavaRDD<ReportEntry> generateReportEntries(SparkSession sparkSession, long recordsCount) {
        return sparkSession.createDataset(
                Lists.newArrayList(
                        ReportEntryFactory.createCounterReportEntry(COUNTER_IMPORTED_RECORDS_TOTAL, recordsCount)),
                Encoders.kryo(ReportEntry.class)).javaRDD();
    }

    private static JavaRDD<DocumentContentUrl> buildOutputRecord(Dataset<Row> source, SparkSession spark) {
        Dataset<Row> resultDs = source.select(
                concat(lit(InfoSpaceConstants.ROW_PREFIX_RESULT), col("id")).as("id"),
                col("location").as("url"),
                col("mimetype").as("mimeType"),
                col("size").cast("long").divide(1024).as("contentSizeKB"),
                col("hash").as("contentChecksum")
                );
        return new AvroDataFrameSupport(spark).toDS(resultDs, DocumentContentUrl.class).toJavaRDD();
    }

    @Parameters(separators = "=")
    private static class HiveBasedDocumentContentUrlImporterJobParameters {

        @Parameter(names = "-sharedSparkSession")
        private Boolean isSparkSessionShared = Boolean.FALSE;

        @Parameter(names = "-inputTableName", required = true)
        private String inputTableName;

        @Parameter(names = "-hiveMetastoreUris", required = true)
        private String hiveMetastoreUris;

        @Parameter(names = "-outputPath", required = true)
        private String outputPath;

        @Parameter(names = "-outputReportPath", required = true)
        private String outputReportPath;
    }

}


text:
// run

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

func main() {
	x := 0
	x = ^x // unary ^ not yet implemented
	if x != ^0 {
		println(x, " ", ^0)
		panic("fail")
	}
}

/*
uetli:~/Source/go/test/bugs gri$ 6g bug082.go
bug082.go:7: fatal error: optoas: no entry COM-<int32>INT32
*/


text:
<?php

namespace Antares\Extension\Model;

class Operation {

    /**
     * @var string
     */
    protected $message;

    /**
     * Operation constructor.
     * @param string $message
     */
    public function __construct(string $message) {
        $this->message = $message;
    }

    /**
     * @return string
     */
    public function getMessage() : string {
        return $this->message;
    }

}