text:
package org.usfirst.frc2084.dslibrary;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.util.Timer;
import java.util.TimerTask;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.event.EventListenerList;

public class RobotCommunication {

    public static final int OUTBOUND_PORT = 1110;
    public static final int INBOUND_PORT = 1150;
    public static final int DISCONNECTION_TIMEOUT = 100;

    private static final Logger logger = Logger.getLogger(RobotCommunication.class.getName());

    private final EventListenerList listeners = new EventListenerList();

    private final Robot robot;
    private final DriverStation driverStation;

    private InetAddress robotAddress;
    private volatile boolean connected;

    private final byte[] robotData = new byte[Robot.Data.PACKET_LENGTH];
    private final DatagramSocket outboundSocket;
    private final DatagramPacket outboundPacket;
    private final Timer dataSendThread;

    private final byte[] driverStationData = new byte[DriverStation.Data.PACKET_LENGTH];
    private final DatagramSocket inboundSocket;
    private final DatagramPacket inboundPacket;
    private final Thread dataReceiveThread;

    public RobotCommunication(Robot robot, DriverStation driverStation, InetAddress robotAddress) throws SocketException {
        this.robot = robot;
        this.robotAddress = robotAddress;
        this.driverStation = driverStation;

        outboundSocket = new DatagramSocket();
        outboundPacket = new DatagramPacket(robotData, robotData.length, robotAddress, OUTBOUND_PORT);
        dataSendThread = new Timer("Data Send Thread", true);

        inboundSocket = new DatagramSocket(INBOUND_PORT);
        inboundSocket.setSoTimeout(DISCONNECTION_TIMEOUT);
        inboundPacket = new DatagramPacket(driverStationData, driverStationData.length);
        dataReceiveThread = new Thread(new DataReceiveTask(), "Data Recieve Thread");
        dataReceiveThread.setDaemon(true);
    }

    private class DataSendTask extends TimerTask {

        @Override
        public void run() {
            firePreSend();
            robot.prepareData();
            robot.getData(robotData);

            try {
                outboundSocket.send(outboundPacket);
            } catch (IOException ex) {
                logger.log(Level.WARNING, "Unable to send data to robot:", ex);
            }
            firePostSend();
        }
    }

    private class DataReceiveTask extends Thread {

        @Override
        public void run() {
            for (;;) {
                try {
                    inboundSocket.receive(inboundPacket);
                    if (!connected) {
                        connected = true;
                        fireRobotConnected();
                    }
                    firePreReceive();
                    driverStation.setData(driverStationData);
                    firePostReceive();
                } catch (SocketTimeoutException ex) {
                    if (connected) {
                        connected = false;
                        fireRobotDisconnected();
                    }
                } catch (SocketException ex) {
                    if (inboundSocket.isClosed()) {
                        break;
                    } else {
                        logger.log(Level.WARNING, "Unable to receive data from robot:", ex);
                    }
                } catch (IOException ex) {
                    logger.log(Level.WARNING, "Unable to receive data from robot:", ex);
                }
            }
        }

    }

    public InetAddress getRobotAddress() {
        return robotAddress;
    }

    public void setRobotAddress(InetAddress robotAddress) {
        this.robotAddress = robotAddress;
        outboundPacket.setAddress(robotAddress);
    }

    public DriverStation getDriverStation() {
        return driverStation;
    }

    public boolean isConnected() {
        return connected;
    }

    public void start() {
        dataReceiveThread.start();
        dataSendThread.schedule(new DataSendTask(), 0, 20);
    }

    public void stop() {
        dataSendThread.cancel();
        outboundSocket.close();

        inboundSocket.close();
    }

    public void addCommunicationListener(CommunicationListener cl) {
        listeners.add(CommunicationListener.class, cl);
    }

    public void removeCommunicationListener(CommunicationListener cl) {
        listeners.remove(CommunicationListener.class, cl);
    }

    private void firePreSend() {
        for (CommunicationListener cl : listeners.getListeners(CommunicationListener.class)) {
            try {
                cl.preSend();
            } catch (Exception ex) {
                logger.log(Level.WARNING, "Communication listener threw exception:", ex);
            }
        }
    }

    private void firePostSend() {
        for (CommunicationListener cl : listeners.getListeners(CommunicationListener.class)) {
            try {
                cl.postSend();
            } catch (Exception ex) {
                logger.log(Level.WARNING, "Communication listener threw exception:", ex);
            }
        }
    }

    private void firePreReceive() {
        for (CommunicationListener cl : listeners.getListeners(CommunicationListener.class)) {
            try {
                cl.preReceive();
            } catch (Exception ex) {
                logger.log(Level.WARNING, "Communication listener threw exception:", ex);
            }
        }
    }

    private void firePostReceive() {
        for (CommunicationListener cl : listeners.getListeners(CommunicationListener.class)) {
            try {
                cl.postReceive();
            } catch (Exception ex) {
                logger.log(Level.WARNING, "Communication listener threw exception:", ex);
            }
        }
    }

    public void addConnectionListener(ConnectionListener cl) {
        listeners.add(ConnectionListener.class, cl);
    }

    public void removeConnectionListener(ConnectionListener cl) {
        listeners.add(ConnectionListener.class, cl);
    }

    private void fireRobotConnected() {
        for (ConnectionListener cl : listeners.getListeners(ConnectionListener.class)) {
            try {
                cl.robotConnected();
            } catch (Exception ex) {
                logger.log(Level.WARNING, "Connection listener threw exception:", ex);
            }
        }
    }

    private void fireRobotDisconnected() {
        for (ConnectionListener cl : listeners.getListeners(ConnectionListener.class)) {
            try {
                cl.robotDisconnected();
            } catch (Exception ex) {
                logger.log(Level.WARNING, "Connection listener threw exception:", ex);
            }
        }
    }
}


text:
@implementation ObjectBrowserView

@end

redpajama_set_name: RedPajamaGithub


text:
/*global ut */

/// Class: CanvasRenderer
/// Renders the <Viewport> into an HTML5 <canvas> element.
///
/// *Note:* This is an internal class used by <Viewport>
ut.CanvasRenderer = function(view) {
	"use strict";
	this.view = view;
	this.canvas = document.createElement("canvas");
	if (!this.canvas.getContext) throw("Canvas not supported");
	this.ctx2 = this.canvas.getContext("2d");
	if (!this.ctx2 || !this.ctx2.fillText) throw("Canvas not supported");
	view.elem.appendChild(this.canvas);

	// Create an offscreen canvas for rendering
	this.offscreen = document.createElement("canvas");
	this.ctx = this.offscreen.getContext("2d");
	this.updateStyle();
	this.canvas.width = (view.squarify ? this.th : this.tw) * view.w;
	this.canvas.height = this.th * view.h;
	this.offscreen.width = this.canvas.width;
	this.offscreen.height = this.canvas.height;
	// Doing this again since setting canvas w/h resets the state
	this.updateStyle();
};

ut.CanvasRenderer.prototype.updateStyle = function(s) {
	"use strict";
	s = s || window.getComputedStyle(this.view.elem, null);
	this.ctx.font = s.fontSize + "/" + s.lineHeight + " " + s.fontFamily;
	this.ctx.textBaseline = "middle";
	this.tw = this.ctx.measureText("M").width;
	this.th = parseInt(s.fontSize, 10);
	this.gap = this.view.squarify ? (this.th - this.tw) : 0;
	if (this.view.squarify) this.tw = this.th;
};

ut.CanvasRenderer.prototype.clear = function() { /* No op */ };

ut.CanvasRenderer.prototype.render = function() {
	"use strict";
	var tile, ch, fg, bg, x, y;
	var view = this.view, buffer = this.view.buffer;
	var w = view.w, h = view.h;
	var hth = 0.5 * this.th;
	var hgap = 0.5 * this.gap; // Squarification
	// Clearing with one big rect is much faster than with individual char rects
	this.ctx.fillStyle = view.defaultBackground;
	this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);
	y = hth; // half because textBaseline is middle
	for (var j = 0; j < h; ++j) {
		x = 0;
		for (var i = 0; i < w; ++i) {
			tile = buffer[j][i];
			ch = tile.ch;
			fg = tile.getColorRGB();
			bg = tile.getBackgroundRGB();
			// Only render background if the color is non-default
			if (bg.length && bg !== view.defaultBackground) {
				this.ctx.fillStyle = bg;
				this.ctx.fillRect(x, y-hth, this.tw, this.th);
			}
			// Do not attempt to render empty char
			if (ch.length) {
				if (!fg.length) fg = view.defaultColor;
				this.ctx.fillStyle = fg;
				this.ctx.fillText(ch, x+hgap, y);
			}
			x += this.tw;
		}
		y += this.th;
	}
	this.ctx2.drawImage(this.offscreen, 0, 0);
};


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="3dp">

    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardUseCompatPadding="true">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="5dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="48dp"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/product_img"
                    android:layout_width="90dp"
                    android:layout_height="90dp"
                    android:contentDescription="@string/image_text"
                    android:src="@drawable/cam1" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:padding="3dp">

                    <TextView
                        android:id="@+id/product_title_tv"
                        style="?attr/TextView.Heading"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content" />

                    <ScrollView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">

                        <LinearLayout
                            android:id="@+id/product_options_layout"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="vertical"
                            android:paddingLeft="@dimen/activity_horizontal_margin"
                            android:paddingRight="@dimen/activity_horizontal_margin">

                        </LinearLayout>
                    </ScrollView>

                </LinearLayout>

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom">

                <ImageButton
                    android:id="@+id/update_cart_ibtn_plus"
                    android:layout_width="36dp"
                    android:layout_height="36dp"
                    android:background="@color/colorPrimaryDark"
                    app:srcCompat="@drawable/ic_add_circle_outline" />

                <TextView
                    android:id="@+id/product_qty_tv"
                    android:layout_width="54dp"
                    android:layout_height="36dp"
                    android:gravity="center"
                    android:text="1" />

                <ImageButton
                    android:id="@+id/update_cart_ibtn_minus"
                    android:layout_width="36dp"
                    android:layout_height="36dp"
                    android:background="@color/colorAccent3"
                    app:srcCompat="@drawable/ic_remove_circle_outline" />

                <TextView
                    android:id="@+id/product_price_tv"
                    style="?attr/TextView.Heading"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:padding="5dp"
                    android:textColor="@color/colorPrimaryDark" />

                <ImageView
                    android:id="@+id/remove_cart_iv"
                    android:layout_width="36dp"
                    android:layout_height="36dp"
                    app:srcCompat="@drawable/ic_delete_forever" />

            </LinearLayout>

        </FrameLayout>

    </android.support.v7.widget.CardView>

</LinearLayout>


text:
function random(){
	var allvids = ["https://www.youtube.com/embed/j6gf8r6e3Kc",
					"https://www.youtube.com/embed/cRuWfPdeGhQ",
					"https://www.youtube.com/embed/g01HAvJNSIg",
					"https://www.youtube.com/embed/HR8EmC5eiEI",
					"https://www.youtube.com/embed/7I-c-yw5ZrQ?list=PLSCcAGyv98ieU4iS1nGOuhyyjG3RyLhTF",
					"https://www.youtube.com/embed/7J9RA6mfONE",
					"https://www.youtube.com/embed/SBHA1iEHRko",
					"https://www.youtube.com/embed/Kwp-axDkiVo"] //add new videos HERE

	var numbervid = allvids.length; //how many videos
	var numberfeatured = 4; //number of videos displayed
	var	randomold = []; //new array with nothing, length of 0

	for (i = 0; i < numberfeatured; i++){ //loop through to fill the displayed videos
		var random = Math.floor(Math.random() * numbervid); //choose random number within 0-amount of videos
		var postvid = document.getElementById("Video" + i); //get content of video0...video1...video2...
		var used = randomold.length; //how many videos used
		var r = 0; //counter
		while (r < used){ //loop through all of the used
			if (random == randomold[r]){ //check if number is in the used
				random = Math.floor(Math.random() * numbervid); //changes to a random number
				r = 0; //restart loop
			}else{ //continue
				r++;
			}
		}
		var link = allvids[random]; //get the link
		postvid.src = link; //change the
		randomold.push(random); //stores numbers (index number)
	}
}


text:
cellarise-mocha-reporters
=========================

Custom mocha reporters.  json-bamboo is a mocha reporter for outputting test results in a format compatible with Atlassian Bamboo.


text:
"""
Knowledge templatetags
"""
from coffin import template
from anaf.core.rendering import render_to_string
from jinja2 import contextfunction, Markup
from django.template import RequestContext

register = template.Library()

@contextfunction
def knowledge_item_list(context, items, skip_group=False):
    """Print a list of items"""
    request = context['request']

    response_format = 'html'
    if 'response_format' in context:
        response_format = context['response_format']

    return Markup(render_to_string('knowledge/tags/item_list',
                                   {'items': items, 'skip_group': skip_group},
                                   context_instance=RequestContext(request),
                                   response_format=response_format))

register.object(knowledge_item_list)

@contextfunction
def knowledge_folder_list(context, subfolders, skip_group=False):
    "Print a list of types"
    request = context['request']

    response_format = 'html'
    if 'response_format' in context:
        response_format = context['response_format']

    return Markup(render_to_string('knowledge/tags/folder_list',
                                   {'subfolders': subfolders,
                                       'skip_group': skip_group},
                                   context_instance=RequestContext(request),
                                   response_format=response_format))

register.object(knowledge_folder_list)


text:
fw_depends rvm rbx-2.4

sed -i 's|  host:.*|  host: '"${DBHOST}"'|g' config/database.yml

rvm rbx-$RBX_VERSION do bundle install --jobs=4 --gemfile=$TROOT/Gemfile --path=vendor/bundle

rvm rbx-$RBX_VERSION do bundle exec puma -b tcp://0.0.0.0:8080 -e production &


text: Dir.glob(File.expand_path('step_definitions/*.rb', __dir__)).each { |step_file| require step_file }


text:
module Utils

using Printf
using Distributed
using SparseArrays
using LinearAlgebra

	include("sparseUtils.jl")
	include("testing.jl")
	include("expandPolygon.jl")
	include("sortpermFast.jl")
	include("uniqueidx.jl")
	include("initRemoteChannel.jl")
	include("variousUtils.jl")

  import Distributed.clear!
	export clear!

	# function Base.sub2ind(n::Array{Int64,1},ii::Array{Int64,1},jj::Array{Int64,1},kk::Array{Int64,1})
	# 	return Base.sub2ind((n[1],n[2],n[3]),ii,jj,kk)
	# end
	#
	# function Base.sub2ind(n::Array{Int64,1},ii::Int64,jj::Int64,kk::Int64)
	# 	return Base.sub2ind((n[1],n[2],n[3]),ii,jj,kk)
	# end

	function clear!(R::RemoteChannel)
		p = take!(R)
		p = clear!(p)
		put!(R,p);
		return R;
	end

	function clear!(F::Future)
		p = fetch(F)
		p = clear!(p)
		put!(F,p);
		return F;
	end

	function clear!(PF::Array{RemoteChannel})
		@sync begin
			for p=workers()
				@async begin
					for i=1:length(PF)
						if p==PF[i].where
							PF[i] = initRemoteChannel(clear!, p, PF[i])
						end
					end
				end
			end
		end
	end

	function clear!(PF::Array{Future})
		@sync begin
			for p=workers()
				@async begin
					for i=1:length(PF)
						if p==PF[i].where
							PF[i] = remotecall(clear!, p, PF[i])
						end
					end
				end
			end
		end
	end

	function clear!(x::Array{T,N}) where {T,N}
		return Array{T,N}(undef,ntuple((i)->0, N))
	end

	# function clear!{T}(x::Vector{T})
		# return Array(T,0)
	# end

	function clear!(A::SparseMatrixCSC{T}) where {T}
		return spzeros(0,0);
	end

	export getWorkerIds
	function getWorkerIds(A::Array{RemoteChannel})
		Ids = []
		for k=1:length(A)
			push!(Ids,A[k].where)
		end
		return unique(Ids)
	end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- From: file:/C:/Users/Zacck/Downloads/8.1/Instagram/ZacckStagram/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/res/values-w480dp/values-w480dp.xml -->
    <eat-comment/>
    <bool name="abc_action_bar_embed_tabs_pre_jb">true</bool>
    <bool name="abc_config_allowActionMenuItemTextWithIcon">true</bool>
</resources>


text:
package dev.sgp.rest;

import java.util.List;

import javax.inject.Inject;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import dev.sgp.entite.Collaborateur;
import dev.sgp.service.CollaborateurService;

@Path("/collaborateurs")
public class CollaborateurResource {
@Inject private CollaborateurService collabService;

	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public List<Collaborateur> get(@DefaultValue("-1") @QueryParam("departement") int id_departement) {
		if(id_departement>=0){
			return getCollabWhithIdDep(id_departement);
		} else {
			return list();
		}
	}

	public List<Collaborateur> list() {
		return collabService.listerCollaborateurs();
	}

	public List<Collaborateur> getCollabWhithIdDep(@DefaultValue("1") @PathParam("id_departement") Integer id_departement){
		return collabService.getCollabWhithIdDep(id_departement);
	}

	@Path("/{matricule}")
	@Produces(MediaType.APPLICATION_JSON)
	public Collaborateur getCollabById(@DefaultValue("1") @PathParam("matricule") Integer matricule){
		return collabService.getCollabById(matricule);
	}

}


text:
package net.recommenders.rival.examples.movielens100k;

import net.recommenders.rival.core.DataModelIF;
import net.recommenders.rival.core.DataModelUtils;
import net.recommenders.rival.core.Parser;
import net.recommenders.rival.core.SimpleParser;
import net.recommenders.rival.evaluation.metric.ranking.NDCG;
import net.recommenders.rival.evaluation.metric.ranking.Precision;
import net.recommenders.rival.evaluation.strategy.EvaluationStrategy;
import net.recommenders.rival.examples.DataDownloader;
import net.recommenders.rival.recommend.frameworks.RecommenderIO;
import net.recommenders.rival.recommend.frameworks.mahout.GenericRecommenderBuilder;
import net.recommenders.rival.recommend.frameworks.exceptions.RecommenderException;
import net.recommenders.rival.split.parser.MovielensParser;
import net.recommenders.rival.split.splitter.CrossValidationSplitter;
import org.apache.mahout.cf.taste.common.TasteException;
import org.apache.mahout.cf.taste.impl.common.LongPrimitiveIterator;
import org.apache.mahout.cf.taste.impl.model.file.FileDataModel;
import org.apache.mahout.cf.taste.recommender.RecommendedItem;
import org.apache.mahout.cf.taste.recommender.Recommender;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import net.recommenders.rival.core.DataModelFactory;
import net.recommenders.rival.evaluation.metric.error.RMSE;

/**
 * RiVal Movielens100k Mahout Example, using 5-fold cross validation.
 *
 * @author Alan
 */
public final class CrossValidatedMahoutKNNRecommenderEvaluator {

    /**
     * Default number of folds.
     */
    public static final int N_FOLDS = 5;
    /**
     * Default neighbohood size.
     */
    public static final int NEIGH_SIZE = 50;
    /**
     * Default cutoff for evaluation metrics.
     */
    public static final int AT = 10;
    /**
     * Default relevance threshold.
     */
    public static final double REL_TH = 3.0;
    /**
     * Default seed.
     */
    public static final long SEED = 2048L;

    /**
     * Utility classes should not have a public or default constructor.
     */
    private CrossValidatedMahoutKNNRecommenderEvaluator() {
    }

    /**
     * Main method. Parameter is not used.
     *
     * @param args the arguments (not used)
     */
    public static void main(final String[] args) {
        String url = "http://files.grouplens.org/datasets/movielens/ml-100k.zip";
        String folder = "data/ml-100k";
        String modelPath = "data/ml-100k/model/";
        String recPath = "data/ml-100k/recommendations/";
        String dataFile = "data/ml-100k/ml-100k/u.data";
        int nFolds = N_FOLDS;
        prepareSplits(url, nFolds, dataFile, folder, modelPath);
        recommend(nFolds, modelPath, recPath);
        // the strategy files are (currently) being ignored
        prepareStrategy(nFolds, modelPath, recPath, modelPath);
        evaluate(nFolds, modelPath, recPath);
    }

    /**
     * Downloads a dataset and stores the splits generated from it.
     *
     * @param url url where dataset can be downloaded from
     * @param nFolds number of folds
     * @param inFile file to be used once the dataset has been downloaded
     * @param folder folder where dataset will be stored
     * @param outPath path where the splits will be stored
     */
    public static void prepareSplits(final String url, final int nFolds, final String inFile, final String folder, final String outPath) {
        DataDownloader dd = new DataDownloader(url, folder);
        dd.downloadAndUnzip();

        boolean perUser = true;
        long seed = SEED;
        Parser<Long, Long> parser = new MovielensParser();

        DataModelIF<Long, Long> data = null;
        try {
            data = parser.parseData(new File(inFile));
        } catch (IOException e) {
            e.printStackTrace();
        }

        DataModelIF<Long, Long>[] splits = new CrossValidationSplitter<Long, Long>(nFolds, perUser, seed).split(data);
        File dir = new File(outPath);
        if (!dir.exists()) {
            if (!dir.mkdir()) {
                System.err.println("Directory " + dir + " could not be created");
                return;
            }
        }
        for (int i = 0; i < splits.length / 2; i++) {
            DataModelIF<Long, Long> training = splits[2 * i];
            DataModelIF<Long, Long> test = splits[2 * i + 1];
            String trainingFile = outPath + "train_" + i + ".csv";
            String testFile = outPath + "test_" + i + ".csv";
            System.out.println("train: " + trainingFile);
            System.out.println("test: " + testFile);
            boolean overwrite = true;
            try {
                DataModelUtils.saveDataModel(training, trainingFile, overwrite, "\t");
                DataModelUtils.saveDataModel(test, testFile, overwrite, "\t");
            } catch (FileNotFoundException | UnsupportedEncodingException e) {
                e.printStackTrace();
            }
        }
    }

    /**
     * Recommends using an UB algorithm.
     *
     * @param nFolds number of folds
     * @param inPath path where training and test models have been stored
     * @param outPath path where recommendation files will be stored
     */
    public static void recommend(final int nFolds, final String inPath, final String outPath) {
        for (int i = 0; i < nFolds; i++) {
            org.apache.mahout.cf.taste.model.DataModel trainModel;
            org.apache.mahout.cf.taste.model.DataModel testModel;
            try {
                trainModel = new FileDataModel(new File(inPath + "train_" + i + ".csv"));
                testModel = new FileDataModel(new File(inPath + "test_" + i + ".csv"));
            } catch (IOException e) {
                e.printStackTrace();
                return;
            }

            GenericRecommenderBuilder grb = new GenericRecommenderBuilder();
            String recommenderClass = "org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender";
            String similarityClass = "org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity";
            int neighborhoodSize = NEIGH_SIZE;
            Recommender recommender = null;
            try {
                recommender = grb.buildRecommender(trainModel, recommenderClass, similarityClass, neighborhoodSize);
            } catch (RecommenderException e) {
                e.printStackTrace();
            }

            String fileName = "recs_" + i + ".csv";

            LongPrimitiveIterator users;
            try {
                users = testModel.getUserIDs();
                boolean createFile = true;
                while (users.hasNext()) {
                    long u = users.nextLong();
                    assert recommender != null;
                    List<RecommendedItem> items = recommender.recommend(u, trainModel.getNumItems());
                    //
                    List<RecommenderIO.Preference<Long, Long>> prefs = new ArrayList<>();
                    for (RecommendedItem ri : items) {
                        prefs.add(new RecommenderIO.Preference<>(u, ri.getItemID(), ri.getValue()));
                    }
                    //
                    RecommenderIO.writeData(u, prefs, outPath, fileName, !createFile, null);
                    createFile = false;
                }
            } catch (TasteException e) {
                e.printStackTrace();
            }
        }
    }

    /**
     * Prepares the strategies to be evaluated with the recommenders already
     * generated.
     *
     * @param nFolds number of folds
     * @param splitPath path where splits have been stored
     * @param recPath path where recommendation files have been stored
     * @param outPath path where the filtered recommendations will be stored
     */
    @SuppressWarnings("unchecked")
    public static void prepareStrategy(final int nFolds, final String splitPath, final String recPath, final String outPath) {
        for (int i = 0; i < nFolds; i++) {
            File trainingFile = new File(splitPath + "train_" + i + ".csv");
            File testFile = new File(splitPath + "test_" + i + ".csv");
            File recFile = new File(recPath + "recs_" + i + ".csv");
            DataModelIF<Long, Long> trainingModel;
            DataModelIF<Long, Long> testModel;
            DataModelIF<Long, Long> recModel;
            try {
                trainingModel = new SimpleParser().parseData(trainingFile);
                testModel = new SimpleParser().parseData(testFile);
                recModel = new SimpleParser().parseData(recFile);
            } catch (IOException e) {
                e.printStackTrace();
                return;
            }

            Double threshold = REL_TH;
            String strategyClassName = "net.recommenders.rival.evaluation.strategy.UserTest";
            EvaluationStrategy<Long, Long> strategy = null;
            try {
                strategy = (EvaluationStrategy<Long, Long>) (Class.forName(strategyClassName)).getConstructor(DataModelIF.class, DataModelIF.class, double.class).
                        newInstance(trainingModel, testModel, threshold);
            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | ClassNotFoundException | InvocationTargetException e) {
                e.printStackTrace();
            }

            DataModelIF<Long, Long> modelToEval = DataModelFactory.getDefaultModel();
            for (Long user : recModel.getUsers()) {
                assert strategy != null;
                for (Long item : strategy.getCandidateItemsToRank(user)) {
                    if (!Double.isNaN(recModel.getUserItemPreference(user, item))) {
                        modelToEval.addPreference(user, item, recModel.getUserItemPreference(user, item));
                    }
                }
            }
            try {
                DataModelUtils.saveDataModel(modelToEval, outPath + "strategymodel_" + i + ".csv", true, "\t");
            } catch (FileNotFoundException | UnsupportedEncodingException e) {
                e.printStackTrace();
            }
        }
    }

    /**
     * Evaluates the recommendations generated in previous steps.
     *
     * @param nFolds number of folds
     * @param splitPath path where splits have been stored
     * @param recPath path where recommendation files have been stored
     */
    public static void evaluate(final int nFolds, final String splitPath, final String recPath) {
        double ndcgRes = 0.0;
        double precisionRes = 0.0;
        double rmseRes = 0.0;
        for (int i = 0; i < nFolds; i++) {
            File testFile = new File(splitPath + "test_" + i + ".csv");
            File recFile = new File(recPath + "recs_" + i + ".csv");
            DataModelIF<Long, Long> testModel = null;
            DataModelIF<Long, Long> recModel = null;
            try {
                testModel = new SimpleParser().parseData(testFile);
                recModel = new SimpleParser().parseData(recFile);
            } catch (IOException e) {
                e.printStackTrace();
            }
            NDCG<Long, Long> ndcg = new NDCG<>(recModel, testModel, new int[]{AT});
            ndcg.compute();
            ndcgRes += ndcg.getValueAt(AT);

            RMSE<Long, Long> rmse = new RMSE<>(recModel, testModel);
            rmse.compute();
            rmseRes += rmse.getValue();

            Precision<Long, Long> precision = new Precision<>(recModel, testModel, REL_TH, new int[]{AT});
            precision.compute();
            precisionRes += precision.getValueAt(AT);
        }
        System.out.println("NDCG@" + AT + ": " + ndcgRes / nFolds);
        System.out.println("RMSE: " + rmseRes / nFolds);
        System.out.println("P@" + AT + ": " + precisionRes / nFolds);

    }
}


text:
<title>TestNG:  Graph</title>
<link href="../testng.css" rel="stylesheet" type="text/css" />
<link href="../my-testng.css" rel="stylesheet" type="text/css" />

Graph

Tests passed/Failed/Skipped:	0/9/5

Started on:	Wed Feb 01 13:09:36 CET 2012

Total time:	0 seconds (15 ms)

Included groups:

Excluded groups:

(Hover the method name to see the test class name)

FAILED TESTS

Test method
Instance
Time (seconds)
Exception

populate
Test class:Graph
com.orientechnologies.orient.test.database.auto.GraphDatabaseTest@2424c672	0

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.populate(GraphDatabaseTest.java:61)
... Removed 25 stack frames

Click to show all stack frames

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.populate(GraphDatabaseTest.java:61)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:609)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:532)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:686)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1018)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:912)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
	at org.testng.TestNG.run(TestNG.java:784)
	at org.testng.TestNG.privateMain(TestNG.java:949)
	at org.testng.TestNG.main(TestNG.java:922)

populate
Test class:Graph
com.orientechnologies.orient.test.database.auto.GraphTest@f29df8a	0

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.ODatabaseGraphTx.open(ODatabaseGraphTx.java:51)
	at com.orientechnologies.orient.test.database.auto.GraphTest.populate(GraphTest.java:42)
... Removed 25 stack frames

Click to show all stack frames

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.ODatabaseGraphTx.open(ODatabaseGraphTx.java:51)
	at com.orientechnologies.orient.test.database.auto.GraphTest.populate(GraphTest.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:609)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:532)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:686)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1018)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:912)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
	at org.testng.TestNG.run(TestNG.java:784)
	at org.testng.TestNG.privateMain(TestNG.java:949)
	at org.testng.TestNG.main(TestNG.java:922)

populate
Test class:Graph
com.orientechnologies.orient.test.database.auto.GraphTestFixedDensity@612e4cd	0

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.ODatabaseGraphTx.open(ODatabaseGraphTx.java:51)
	at com.orientechnologies.orient.test.database.auto.GraphTestFixedDensity.populate(GraphTestFixedDensity.java:44)
... Removed 25 stack frames

Click to show all stack frames

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.ODatabaseGraphTx.open(ODatabaseGraphTx.java:51)
	at com.orientechnologies.orient.test.database.auto.GraphTestFixedDensity.populate(GraphTestFixedDensity.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:609)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:532)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:686)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1018)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:912)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
	at org.testng.TestNG.run(TestNG.java:784)
	at org.testng.TestNG.privateMain(TestNG.java:949)
	at org.testng.TestNG.main(TestNG.java:922)

testAutoEdge
Test class:Graph
com.orientechnologies.orient.test.database.auto.GraphDatabaseTest@2424c672	0

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testAutoEdge(GraphDatabaseTest.java:230)
... Removed 25 stack frames

Click to show all stack frames

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testAutoEdge(GraphDatabaseTest.java:230)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:609)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:532)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:686)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1018)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:912)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
	at org.testng.TestNG.run(TestNG.java:784)
	at org.testng.TestNG.privateMain(TestNG.java:949)
	at org.testng.TestNG.main(TestNG.java:922)

testDictionary
Test class:Graph
com.orientechnologies.orient.test.database.auto.GraphDatabaseTest@2424c672	0

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testDictionary(GraphDatabaseTest.java:150)
... Removed 25 stack frames

Click to show all stack frames

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testDictionary(GraphDatabaseTest.java:150)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:609)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:532)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:686)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1018)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:912)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
	at org.testng.TestNG.run(TestNG.java:784)
	at org.testng.TestNG.privateMain(TestNG.java:949)
	at org.testng.TestNG.main(TestNG.java:922)

testNotDuplicatedIndexTxChanges
Test class:Graph
com.orientechnologies.orient.test.database.auto.GraphDatabaseTest@2424c672	0

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testNotDuplicatedIndexTxChanges(GraphDatabaseTest.java:200)
... Removed 25 stack frames

Click to show all stack frames

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testNotDuplicatedIndexTxChanges(GraphDatabaseTest.java:200)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:609)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:532)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:686)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1018)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:912)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
	at org.testng.TestNG.run(TestNG.java:784)
	at org.testng.TestNG.privateMain(TestNG.java:949)
	at org.testng.TestNG.main(TestNG.java:922)

testPool
Test class:Graph
com.orientechnologies.orient.test.database.auto.GraphDatabaseTest@2424c672	0

com.orientechnologies.common.concur.lock.OLockException: Error on creation of the new resource in the pool
	at com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:70)
	at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:70)
	at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:52)
	at com.orientechnologies.orient.core.db.ODatabasePoolBase.acquire(ODatabasePoolBase.java:39)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testPool(GraphDatabaseTest.java:53)
Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabasePooled.<init>(OGraphDatabasePooled.java:40)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabasePool$1.createNewResource(OGraphDatabasePool.java:38)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabasePool$1.createNewResource(OGraphDatabasePool.java:1)
	at com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:65)
	... 26 more
... Removed 25 stack frames

Click to show all stack frames

com.orientechnologies.common.concur.lock.OLockException: Error on creation of the new resource in the pool
	at com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:70)
	at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:70)
	at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire(ODatabasePoolAbstract.java:52)
	at com.orientechnologies.orient.core.db.ODatabasePoolBase.acquire(ODatabasePoolBase.java:39)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testPool(GraphDatabaseTest.java:53)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:609)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:532)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:686)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1018)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:912)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
	at org.testng.TestNG.run(TestNG.java:784)
	at org.testng.TestNG.privateMain(TestNG.java:949)
	at org.testng.TestNG.main(TestNG.java:922)
Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabasePooled.<init>(OGraphDatabasePooled.java:40)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabasePool$1.createNewResource(OGraphDatabasePool.java:38)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabasePool$1.createNewResource(OGraphDatabasePool.java:1)
	at com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:65)
	... 26 more

testSubVertexQuery
Test class:Graph
com.orientechnologies.orient.test.database.auto.GraphDatabaseTest@2424c672	0

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testSubVertexQuery(GraphDatabaseTest.java:169)
... Removed 25 stack frames

Click to show all stack frames

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testSubVertexQuery(GraphDatabaseTest.java:169)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:609)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:532)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:686)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1018)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:912)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
	at org.testng.TestNG.run(TestNG.java:784)
	at org.testng.TestNG.privateMain(TestNG.java:949)
	at org.testng.TestNG.main(TestNG.java:922)

testTxField
Test class:Graph
com.orientechnologies.orient.test.database.auto.GraphDatabaseTest@2424c672	0

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testTxField(GraphDatabaseTest.java:272)
... Removed 25 stack frames

Click to show all stack frames

com.orientechnologies.orient.core.exception.OConfigurationException: Database 'demo' is not configured on server
	at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException(OChannelBinary.java:385)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus(OChannelBinary.java:338)
	at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse(OChannelBinaryAsynch.java:112)
	at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1396)
	at com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1149)
	at com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:158)
	at com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:63)
	at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open(ODatabaseRaw.java:83)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:97)
	at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47)
	at com.orientechnologies.orient.core.db.graph.OGraphDatabase.open(OGraphDatabase.java:76)
	at com.orientechnologies.orient.test.database.auto.GraphDatabaseTest.testTxField(GraphDatabaseTest.java:272)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:609)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:532)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:686)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1018)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:128)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:912)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:876)
	at org.testng.TestNG.run(TestNG.java:784)
	at org.testng.TestNG.privateMain(TestNG.java:949)
	at org.testng.TestNG.main(TestNG.java:922)

SKIPPED TESTS

Test method
Instance
Time (seconds)
Exception

checkPopulation
Test class:Graph
null	0

testMultiEdgeWithSameVertex
Test class:Graph
null	0

testSQLAgainstGraph
Test class:Graph
null	0

testTraverseDirectly
Test class:Graph
null	0

testTraverseThroughEdges
Test class:Graph
null	0


text: A menu controlling different page


text:
<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 8/5/2015
 * Time: 4:21 PM
 */

namespace common\helpers\pelexif;

use lsolesen\pel\PelEntryAscii;
use lsolesen\pel\PelEntryByte;
use lsolesen\pel\PelEntryRational;
use lsolesen\pel\PelEntryUserComment;
use lsolesen\pel\PelExif;
use lsolesen\pel\PelIfd;
use lsolesen\pel\PelJpeg;
use lsolesen\pel\PelTag;
use lsolesen\pel\PelTiff;

class Gps {
    /**
     * Convert a decimal degree into degrees, minutes, and seconds.
     *
     * @param
     *            int the degree in the form 123.456. Must be in the interval
     *            [-180, 180].
     *
     * @return array a triple with the degrees, minutes, and seconds. Each
     *         value is an array itself, suitable for passing to a
     *         PelEntryRational. If the degree is outside the allowed interval,
     *         null is returned instead.
     */
    public static function convertDecimalToDMS($degree)
    {
        if ($degree > 180 || $degree < - 180) {
            return null;
        }

        $degree = abs($degree); // make sure number is positive
        // (no distinction here for N/S
        // or W/E).

        $seconds = $degree * 3600; // Total number of seconds.

        $degrees = floor($degree); // Number of whole degrees.
        $seconds -= $degrees * 3600; // Subtract the number of seconds
        // taken by the degrees.

        $minutes = floor($seconds / 60); // Number of whole minutes.
        $seconds -= $minutes * 60; // Subtract the number of seconds
        // taken by the minutes.

        $seconds = round($seconds * 100, 0); // Round seconds with a 1/100th
        // second precision.

        return array(
            array(
                $degrees,
                1
            ),
            array(
                $minutes,
                1
            ),
            array(
                $seconds,
                100
            )
        );
    }

    /**
     * Add GPS information to an image basic metadata.
     * Any old Exif data
     * is discarded.
     *
     * @param
     *            string the input filename.
     *
     * @param
     *            string the output filename. An updated copy of the input
     *            image is saved here.
     *
     * @param
     *            string image description.
     *
     * @param
     *            string user comment.
     *
     * @param
     *            string camera model.
     *
     * @param
     *            float longitude expressed as a fractional number of degrees,
     *            e.g. 12.345�. Negative values denotes degrees west of Greenwich.
     *
     * @param
     *            float latitude expressed as for longitude. Negative values
     *            denote degrees south of equator.
     *
     * @param
     *            float the altitude, negative values express an altitude
     *            below sea level.
     *
     * @param
     *            string the date and time.
     */
    public static function addGpsInfo($input, $output, $description, $comment, $model, $longitude, $latitude, $altitude, $date_time)
    {
        /* Load the given image into a PelJpeg object */
        $jpeg = new PelJpeg($input);

        /*
         * Create and add empty Exif data to the image (this throws away any
         * old Exif data in the image).
         */
        $exif = new PelExif();
        $jpeg->setExif($exif);

        /*
         * Create and add TIFF data to the Exif data (Exif data is actually
         * stored in a TIFF format).
         */
        $tiff = new PelTiff();
        $exif->setTiff($tiff);

        /*
         * Create first Image File Directory and associate it with the TIFF
         * data.
         */
        $ifd0 = new PelIfd(PelIfd::IFD0);
        $tiff->setIfd($ifd0);

        /*
         * Create a sub-IFD for holding GPS information. GPS data must be
         * below the first IFD.
         */
        $gps_ifd = new PelIfd(PelIfd::GPS);
        $ifd0->addSubIfd($gps_ifd);

        /*
         * The USER_COMMENT tag must be put in a Exif sub-IFD under the
         * first IFD.
         */
        $exif_ifd = new PelIfd(PelIfd::EXIF);
        $exif_ifd->addEntry(new PelEntryUserComment($comment));
        $ifd0->addSubIfd($exif_ifd);

        $inter_ifd = new PelIfd(PelIfd::INTEROPERABILITY);
        $ifd0->addSubIfd($inter_ifd);

        $ifd0->addEntry(new PelEntryAscii(PelTag::MODEL, $model));
        $ifd0->addEntry(new PelEntryAscii(PelTag::DATE_TIME, $date_time));
        $ifd0->addEntry(new PelEntryAscii(PelTag::IMAGE_DESCRIPTION, $description));

        $gps_ifd->addEntry(new PelEntryByte(PelTag::GPS_VERSION_ID, 2, 2, 0, 0));

        /*
         * Use the convertDecimalToDMS function to convert the latitude from
         * something like 12.34� to 12� 20' 42"
         */
        list ($hours, $minutes, $seconds) = self::convertDecimalToDMS($latitude);

        /* We interpret a negative latitude as being south. */
        $latitude_ref = ($latitude < 0) ? 'S' : 'N';

        $gps_ifd->addEntry(new PelEntryAscii(PelTag::GPS_LATITUDE_REF, $latitude_ref));
        $gps_ifd->addEntry(new PelEntryRational(PelTag::GPS_LATITUDE, $hours, $minutes, $seconds));

        /* The longitude works like the latitude. */
        list ($hours, $minutes, $seconds) = self::convertDecimalToDMS($longitude);
        $longitude_ref = ($longitude < 0) ? 'W' : 'E';

        $gps_ifd->addEntry(new PelEntryAscii(PelTag::GPS_LONGITUDE_REF, $longitude_ref));
        $gps_ifd->addEntry(new PelEntryRational(PelTag::GPS_LONGITUDE, $hours, $minutes, $seconds));

        /*
         * Add the altitude. The absolute value is stored here, the sign is
         * stored in the GPS_ALTITUDE_REF tag below.
         */
        $gps_ifd->addEntry(new PelEntryRational(PelTag::GPS_ALTITUDE, array(
            abs($altitude),
            1
        )));
        /*
         * The reference is set to 1 (true) if the altitude is below sea
         * level, or 0 (false) otherwise.
         */
        $gps_ifd->addEntry(new PelEntryByte(PelTag::GPS_ALTITUDE_REF, (int) ($altitude < 0)));

        /* Finally we store the data in the output file. */
        file_put_contents($output, $jpeg->getBytes());
    }

}


text:
namespace TRan.CinemaUniverse.Data.Migrations
{
    using System.Data.Entity.Migrations;

    public partial class ChangeProjection_ChangeMovie : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.Projections", "LecturerId", "dbo.AspNetUsers");
            DropIndex("dbo.Movies", new[] { "Genre_Id" });
            DropIndex("dbo.Projections", new[] { "LecturerId" });
            DropIndex("dbo.Projections", new[] { "Movie_Id" });
            DropColumn("dbo.Movies", "GenreId");
            DropColumn("dbo.Projections", "MovieId");
            RenameColumn(table: "dbo.Movies", name: "Genre_Id", newName: "GenreId");
            RenameColumn(table: "dbo.Projections", name: "Movie_Id", newName: "MovieId");
            AddColumn("dbo.Projections", "Lecturer_Id", c => c.String(maxLength: 128));
            AlterColumn("dbo.Movies", "GenreId", c => c.Guid());
            AlterColumn("dbo.Projections", "MovieId", c => c.Guid());
            AlterColumn("dbo.Projections", "LecturerId", c => c.Guid());
            CreateIndex("dbo.Movies", "Title", unique: true);
            CreateIndex("dbo.Movies", "GenreId");
            CreateIndex("dbo.Projections", "MovieId");
            CreateIndex("dbo.Projections", "Lecturer_Id");
            AddForeignKey("dbo.Projections", "Lecturer_Id", "dbo.AspNetUsers", "Id");
        }

        public override void Down()
        {
            DropForeignKey("dbo.Projections", "Lecturer_Id", "dbo.AspNetUsers");
            DropIndex("dbo.Projections", new[] { "Lecturer_Id" });
            DropIndex("dbo.Projections", new[] { "MovieId" });
            DropIndex("dbo.Movies", new[] { "GenreId" });
            DropIndex("dbo.Movies", new[] { "Title" });
            AlterColumn("dbo.Projections", "LecturerId", c => c.String(maxLength: 128));
            AlterColumn("dbo.Projections", "MovieId", c => c.String());
            AlterColumn("dbo.Movies", "GenreId", c => c.String());
            DropColumn("dbo.Projections", "Lecturer_Id");
            RenameColumn(table: "dbo.Projections", name: "MovieId", newName: "Movie_Id");
            RenameColumn(table: "dbo.Movies", name: "GenreId", newName: "Genre_Id");
            AddColumn("dbo.Projections", "MovieId", c => c.String());
            AddColumn("dbo.Movies", "GenreId", c => c.String());
            CreateIndex("dbo.Projections", "Movie_Id");
            CreateIndex("dbo.Projections", "LecturerId");
            CreateIndex("dbo.Movies", "Genre_Id");
            AddForeignKey("dbo.Projections", "LecturerId", "dbo.AspNetUsers", "Id");
        }
    }
}


text:
SELECT
  /*%expand*/*
FROM
  t_campaign
WHERE
  campaign_id = /*campaignId*/0
FOR UPDATE


text:
@import url(http://fonts.googleapis.com/css?family=Raleway:300);
@import url(http://fonts.googleapis.com/css?family=Lato:400,700);
/*CONTAINS HEADER, FOOTER AND STUFF WHICH IS ALL THE SAME FOR ALL THE SITE*/

#container {position: relative;}

a {text-decoration: none;}

body {
	background-color: #f5f5f5;
	height: 100%;
	margin: 0;
	padding: 0;
  padding-top: 60px; /* == header.height */
  box-sizing: border-box;
}

/** HEADER **/
header {
  z-index: 1099;
	height: 60px;
	width: 100%;
	background-color: #006d41;
	position: fixed;
	top: 0;
  padding: 0;
  box-sizing: border-box;
  padding-left: 10px;
  padding-right: 10px;
  font-family: Raleway, Helvetica;
}

header > * {
  display: inline-block;
  vertical-align: middle;
}

#logo {height: 60px;}
select > option {text-transform: capitalize;}

body > header  input{
  font-family: Raleway, Helvetica;
	height: 25px;
	width: 300px;
	margin-left: 10px;
  font-size: 16px;
  text-transform: capitalize;
}

.options_wrapper {
  display: inline-block;
  position: absolute;
  right: 10px;
  height: 34px;
  margin:0;
  padding:0;
  margin-top:15px;
  margin-right: 20px;
}

header i {  /* icons */
	font-size: 30px;
	margin-left: 5px;
	color: black;
  vertical-align: middle;
}

/* flags */
i.en { background-image: url('../img/en.png'); }
i.it { background-image: url('../img/it.png'); }
i.flag {
  height: 30px;
  width: 30px;
  border: 1px solid #333;
  border-radius: 100%;
  background-size: 100% 100%;
  display: inline-block;
  vertical-align: middle;
}

i.fb {
  height: 30px;
  width: 150px;
  background-size: 100% 100%;
  background-image: url('../img/facebook.png');
  display: inline-block;
  vertical-align: middle;
}

/* logged in user */
header .user {font-size: 18px;}
header .logout {font-size: 16px;}

/***FOOTER***/
footer{
  vertical-align: middle;
  font-family: Raleway, Helvetica;
	height: 20px;
	width: 100%;
	background-color: #006d41;
	text-align: center;
  padding-top: 5px;
  padding-bottom: 5px;
  position: relative;
  z-index: 1099;
}


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Threading;
using Oracle.DataAccess.Client;

namespace AspNet.Identity.Oracle
{
     /// <summary>
     /// Class that encapsulates a Oracle Database connections
     /// and CRUD operations
     /// </summary>
    public class OracleDatabase : IDisposable
    {
        private OracleConnection connection;

        /// <summary>
        /// Default constructor which uses the "DefaultConnection" connectionString
        /// </summary>
        public OracleDatabase()
            : this("DefaultConnection")
        {
        }

        /// <summary>
        /// Constructor which takes the connection string name
        /// </summary>
        /// <param name="connectionStringName"></param>
        public OracleDatabase(string connectionStringName)
        {
            var connectionString = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString;
            connection = new OracleConnection(connectionString);
        }

        /// <summary>
        /// Executes a non-query Oracle statement
        /// </summary>
        /// <param name="commandText">The Oracle query to execute</param>
        /// <param name="parameters">Optional parameters to pass to the query</param>
        /// <returns>The count of records affected by the Oracle statement</returns>
        public int Execute(string commandText, IEnumerable parameters)
        {
            int result;

            if (String.IsNullOrEmpty(commandText))
            {
                throw new ArgumentException("Command text cannot be null or empty.");
            }

            try
            {
                ensureConnectionOpen();
                var command = createCommand(commandText, parameters);
                result = command.ExecuteNonQuery();
            }
            finally
            {
                connection.Close();
            }

            return result;
        }

        /// <summary>
        /// Executes a Oracle query that returns a single scalar value as the result.
        /// </summary>
        /// <param name="commandText">The Oracle query to execute</param>
        /// <param name="parameters">Optional parameters to pass to the query</param>
        /// <returns></returns>
        public object QueryValue(string commandText, IEnumerable parameters)
        {
            object result;

            if (String.IsNullOrEmpty(commandText))
            {
                throw new ArgumentException("Command text cannot be null or empty.");
            }

            try
            {
                ensureConnectionOpen();
                var command = createCommand(commandText, parameters);
                result = command.ExecuteScalar();
            }
            finally
            {
                ensureConnectionClosed();
            }

            return result;
        }

        /// <summary>
        /// Executes a SQL query that returns a list of rows as the result.
        /// </summary>
        /// <param name="commandText">The Oracle query to execute</param>
        /// <param name="parameters">Parameters to pass to the Oracle query</param>
        /// <returns>A list of a Dictionary of Key, values pairs representing the
        /// ColumnName and corresponding value</returns>
        public List<Dictionary<string, string>> Query(string commandText, IEnumerable parameters)
        {
            List<Dictionary<string, string>> rows;
            if (String.IsNullOrEmpty(commandText))
            {
                throw new ArgumentException("Command text cannot be null or empty.");
            }

            try
            {
                ensureConnectionOpen();
                var command = createCommand(commandText, parameters);
                using (var reader = command.ExecuteReader())
                {
                    rows = new List<Dictionary<string, string>>();
                    while (reader.Read())
                    {
                        var row = new Dictionary<string, string>();
                        for (var i = 0; i < reader.FieldCount; i++)
                        {
                            var columnName = reader.GetName(i);
                            var columnValue = reader.IsDBNull(i) ? null : reader.GetValue(i).ToString();
                            row.Add(columnName, columnValue);
                        }
                        rows.Add(row);
                    }
                }
            }
            finally
            {
                ensureConnectionClosed();
            }

            return rows;
        }

        /// <summary>
        /// Opens a connection if not open
        /// </summary>
        private void ensureConnectionOpen()
        {
            var retries = 3;
            if (connection.State == ConnectionState.Open)
            {
                return;
            }
            while (retries >= 0 && connection.State != ConnectionState.Open)
            {
                connection.Open();
                retries--;
                Thread.Sleep(30);
            }
        }

        /// <summary>
        /// Closes a connection if open
        /// </summary>
        private void ensureConnectionClosed()
        {
            if (connection.State == ConnectionState.Open)
            {
                connection.Close();
            }
        }

        /// <summary>
        /// Creates a OracleCommand with the given parameters
        /// </summary>
        /// <param name="commandText">The Oracle query to execute</param>
        /// <param name="parameters">Parameters to pass to the Oracle query</param>
        /// <returns></returns>
        private OracleCommand createCommand(string commandText, IEnumerable parameters)
        {
            var command = connection.CreateCommand();
            command.BindByName = true;
            command.CommandText = commandText;
            addParameters(command, parameters);

            return command;
        }

        /// <summary>
        /// Adds the parameters to a Oracle command
        /// </summary>
        /// <param name="command">The Oracle query to execute</param>
        /// <param name="parameters">Parameters to pass to the Oracle query</param>
        private static void addParameters(OracleCommand command, IEnumerable parameters)
        {
            if (parameters == null) return;

            foreach (var parameter in parameters)
            {
                command.Parameters.Add(parameter);
            }
        }

        /// <summary>
        /// Helper method to return query a string value
        /// </summary>
        /// <param name="commandText">The Oracle query to execute</param>
        /// <param name="parameters">Parameters to pass to the Oracle query</param>
        /// <returns>The string value resulting from the query</returns>
        public string GetStrValue(string commandText, IEnumerable parameters)
        {
            var value = QueryValue(commandText, parameters) as string;
            return value;
        }

        public void Dispose()
        {
            if (connection == null) return;

            connection.Dispose();
            connection = null;
        }
    }
}


text:
//
// HighObstacleSide.cs
// MSAGL class for ObstacleSides with the higher scanline-parallel coordinates for Rectilinear Edge Routing.
//
// Copyright Microsoft Corporation.
using Microsoft.Msagl;
using Microsoft.Msagl.Core.Geometry.Curves;

namespace Microsoft.Msagl.Routing.Rectilinear {
    /// <summary>
    /// HighObstacleSide is a side of the obstacle that is between LowestVertex and HighestVertex
    /// to the higher scanline-parallel coordinate-value side; i.e. to the right (higher X-coordinate)
    /// for horizontal scan (vertical sweep), and to the left (due to Cartesian coordinates) for Y.
    /// This is different from RightObstacleSide, which refers to the traversal direction being opposite
    /// the clockwise polyline direction; HighObstacleSide uses the ctor arg traverseClockwise to manage that.
    /// </summary>
    internal class HighObstacleSide : BasicObstacleSide {
        internal HighObstacleSide(Obstacle obstacle, PolylinePoint startVertex, ScanDirection scanDir)
            : base(obstacle, startVertex, scanDir, scanDir.IsVertical /*traverseClockwise*/)
        {
        }
    }
}


text:
'use strict';

const minimist = require('minimist');

/**
 * Take a config object and make the theme specific configuration available.
 *
 * @class configParser
 */
class configParser {

  /**
   * Creates an instance of configParser.
   *
   * @param {object} config A config object.
   *
   * @memberOf configParser
   */
  constructor(config) {
    this.config = config;
    this.args = minimist(process.argv.slice(2), require('./cliOptions'));
  }

  /**
   * The active theme from configuration or command line.
   *
   * @readonly
   *
   * @memberOf configParser
   */
  get activeTheme() {
    return this.args.theme || this.config.defaultTheme;
  }

  /**
   * Theme configuration for the active theme.
   *
   * @readonly
   *
   * @memberOf configParser
   */
  get themeConfig() {
    return this.config.themes[this.activeTheme];
  }

  /**
   * Whether or not production mode is enabled.
   *
   * @readonly
   *
   * @memberOf configParser
   */
  get productionMode() {
    return this.args.production || process.env.NODE_ENV === 'production';
  }

}

module.exports = configParser;


text:
package org.jbpm.workbench.cm.backend.server;

import java.util.function.Function;

import org.jbpm.workbench.cm.model.CaseActionSummary;
import org.jbpm.workbench.cm.util.CaseActionStatus;
import org.kie.server.api.model.instance.NodeInstance;

public class CaseActionNodeInstanceMapper implements Function<NodeInstance, CaseActionSummary> {

    private String actualOwner;
    private CaseActionStatus actionStatus;

    public CaseActionNodeInstanceMapper(String actualOwner,
                                        CaseActionStatus actionStatus) {
        this.actualOwner = actualOwner;
        this.actionStatus = actionStatus;
    }

    @Override
    public CaseActionSummary apply(NodeInstance nodeInstance) {
        if (nodeInstance == null) {
            return null;
        }
        return CaseActionSummary.builder()
                .id(nodeInstance.getId())
                .name(nodeInstance.getName())
                .type(nodeInstance.getNodeType())
                .createdOn(nodeInstance.getDate())
                .actualOwner(actualOwner)
                .actionStatus(actionStatus)
                .build();
    }
}