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

<meta http-equiv="content-type" content="text/html; charset=utf-8" >
<meta name="google-site-verification" content="GcrnbgZkRkwn51jQmX7QBaMKSymq1h-iG8G_xeILIkM" />
<title>Performances perpétuelles : Mesures et améliorations continues des performances</title>
<meta name="author" content="Henri Tremblay / Mikael Robert" >

<link rel="alternate" type="application/rss+xml" title="devopsdays RSS Feed" href="http://www.devopsdays.org/feed/" >

<link rel="stylesheet" href="/css/devops.min.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print">

<link href="/css/googlemaps.css" rel="stylesheet">

      Home

      Contact

      Events

      Presentations

      Blog

Performances perpétuelles : Mesures et améliorations continues des performances

This talk will be given in French
Cette présentation sera en Français

Abstract:

What happened:

You have launched a new project to build a web site. The architecture was just great. One year of development is planned. Production date right before Christmas. Iterative process. Small iterations. A clear roadmap maximizing the time to market. Life is good.

One month before production, confident, you enter performance testing. A disaster. During development, response time were OK. Nothing to worry about. And you were sure the production servers were so powerful that they could solve any unexpected slowness. What a mistake! A state of emergency is declared. Work spread over the week-end and during your shortened holidays. You manage to fix the issue. It's not great, but it's alright. Post mortem: Three months late, 40% over budget and decent performances. Your end of year bonus, a bit less decent.

Now, come to see how it could have been:

Controlled performances all along the project. Going live without issues. And, most importantly, Christmas holidays in Tahiti with a Daiquiri.

Résumé:

Comment ça s'est passé:

Vous avez lancé un projet de site internet. L'architecture est magnifique. Vous vous lancez dans un an de développement. Mise en production avant Noël! Approche itérative. De courtes itérations. Une roadmap claire vous promettant un time-to-market optimal.

Un mois avant la production, confiant, vous faites des tests de charge. Catastrophe. En développement, c'était raisonnablement rapide et ça ne vous a pas inquiété. Vous vous êtes dit que la puissance des machines de production va régler tout ça. Erreur! Dans l'urgence, le week-end, pendant des vacances de Noël écourtées, vous corrigez le tir. Bilan: trois mois de retard, 40% de dépassement de budget, performances acceptables. Votre prime de fin d'année, un peu moins.

Et maintenant, venez voir comment ça aurait pu se passer:

Performances maîtrisées tout au long du projet. Mise en production sans soucis. Vacances de Noël à Tahiti et Daiquiri.

Sceptiques? Alors venez.

Speaker:

Henri Tremblay, OCTO Technology

Henri Tremblay a étudié les sciences de l'informatique avec un penchant avoué pour l'algorithmie et les mathématiques. Il s'est ensuite épanoui depuis bientôt 14 ans en concevant des logiciels, souvent financiers, en Java. Plus que tout, il aime résoudre des problèmes complexes et l'informatique s'avère en être particulièrement bien nanti.

Ses centres d'intérêt sont l'optimisation et la productivité. Ceux-ci étant parfois plus liés qu'on ne pourrait le penser. Il est maintenant architecte senior et responsable de la recherche et développement traitant de la performance et du calcul parallèle chez OCTO Technology.

Très impliqué dans le monde de l'Open Source, il remplit le rôle de project leader au sein des projets open source EasyMock et Objenesis.

Mikael Robert, OCTO Technology

Mikael Robert est Architecte technique chez OCTO Technology qu'il a intégré il y a 3 ans. Il apporte une double expertise: Java et les infrastructures. Ses compétences le prédispose donc directement à travailler sur les problématiques de performance et sur les chantiers devops.

Il est l'un des deux gérants de l'infrastructure d'OCTO et le responsable d'un chantier de R&D orienté Devops: Software Factory 2.0.

Il a réalisé de nombreuses missions d'optimisations des performances, dans divers secteurs dont la banque et l'assurance.

Please enable JavaScript to view the comments powered by Disqus.
blog comments powered by Disqus

Tweets from devopsdays events

Past

      2009

      Ghent 2009

      2010

      Sydney 2010

      Mountain View 2010

      Hamburg 2010

      Sao Paulo 2010

      2011

      Boston 2011

      Mountain View 2011

      Melbourne 2011

      Bangalore 2011

      Göteborg 2011

      Manila 2011

      2012

      Austin 2012

      Tokyo 2012

      Delhi 2012

      Mountain View 2012

      Rome 2012

      New York 2012

      2013

      New Zealand 2013

      London 2013

      Paris 2013

      Austin 2013

      Berlin 2013

      Amsterdam 2013

      Silicon Valley 2013

      Downunder 2013

      Bangalore 2013

      London Autumn 2013

      Barcelona 2013

      Vancouver 2013

      Portland 2013

      New York 2013

      Atlanta 2013

      Tel Aviv 2013

      Tokyo 2013

      2014

      Nairobi 2014

      Ljubljana 2014

      Austin 2014

      Pittsburgh 2014

      Amsterdam 2014

      Silicon Valley 2014

      Minneapolis 2014

      Brisbane 2014

      Boston 2014

      Toronto 2014

      New York 2014

      Warsaw 2014

      Chicago 2014

      Berlin 2014

      Belgium 2014

      Helsinki 2014

      Vancouver 2014

      Tel Aviv 2014

      Bangalore 2014

      2015

      Ljubljana 2015

      Paris 2015

      Denver 2015

      New York 2015

      Austin 2015

      Toronto 2015

      Washington, DC 2015

      Amsterdam 2015

      Minneapolis 2015

      Melbourne 2015

      Pittsburgh 2015

      Chicago 2015

      Bangalore 2015

      Boston 2015

      Tel Aviv 2015

      Singapore 2015

      Berlin 2015

      Charlotte 2015

      Silicon Valley 2015

      Detroit 2015

      Ohio 2015

      Warsaw 2015

      2016

      Los Angeles (1 day)
      Vancouver

      London

      Denver

      Atlanta

Future

        2016

        Austin - May 2 & 3

        Kiel - May 12 & 13

        Seattle - May 12 & 13

        Toronto - May 26 & 27

        Istanbul - Jun 3 & 4

        Washington, DC - Jun 8 & 9

        Salt Lake City - Jun 14 & 15

        Silicon Valley - June 24 & 25

        Amsterdam - Jun 29, 30 & Jul 1

        Minneapolis - Jul 20 & 21

        Portland - Aug 9 & 10

        Boston - Aug 25 & 26

        Chicago - Aug 30 & 31

        Oslo - Sep 5 & 6

        Dallas - Sep 15 & 16

        New York - Sep 23 & 24

        Boise - Oct 7 & 8

        Singapore - Oct 8 & 9

        Detroit - Oct 12 & 13

        Kansas City - Oct 20 & 21

        Philadelphia - Oct 26 & 27

        2016, Dates TBD

        Ghent

        Raleigh

        New Zealand

        Ohio

        Nashville

        Madison

        Cape Town


text:
using System.Collections.Generic;

namespace OAI.Packets.Delays
{
    public abstract class OAIDelay
    {
        protected Dictionary<string, bool> Delays = new Dictionary<string, bool>();

        /**
         * Singleton design pattern
         */
        protected OAIDelay() { }

        public void Block(string key)
        {
            lock (Delays)
            {
                if (!Delays.ContainsKey(key))
                {
                    Delays.Add(key, true);
                }
            }
        }

        public bool Delayed(string key)
        {
            bool delay = false;

            if (null == key)
            {
                return delay;
            }

            lock (Delays)
            {
                delay = (Delays.ContainsKey(key) && Delays[key]);
            }

            return delay;
        }

        public void Release(string key)
        {
            lock (Delays)
            {
                if (Delays.ContainsKey(key))
                {
                    Delays.Remove(key);
                }
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
#pragma strict_types
#include "../def.h"
inherit MONSTER + "goblin";

void create_object(void);
void chat_func(void);

void create_object(void)
{
    int i;
    ::create_object();
    set_short("A whining goblin fetching water from the puddle");
    set_long("A small, whining goblin fetching water from the puddle. He " +
             "doesn't seem to be enjoying splashing around in the water. " +
             "He is shivering and complaining softly and looking like " +
             "he'd rather be anywhere but here.\n");
    set_name("whining goblin");

    load_chat(5,({ "#chat_func" }));

    load_a_chat(30,({
        "Whining goblin shouts: The others know where I am, they'll " +
        "come looking for me!\n",
        "Whining goblin shouts: Take the water, just leave me alone!\n",
        "Whining goblin tries to poke you in the eye!\n",
        "Whining goblin tires to knee you, without much effect.\n",
        "Whining goblin whines.\n",
    }));

    for(i = 0; i < 1 + random(2); ++i)
    {
        make(OBJECT + "waterbottle");
    }
}

/**
* Grovels before the hideous goblin (water_goblin1) and gives water
* bottles to him when he fills them, or chats generally if the hideous
* goblin is gone.
*/
void chat_func(void)
{
    int i = random(5);
    object bottle = present("waterbottle",TO);
    object goblin = present("hideous goblin",ENV(TO));

    if(goblin)
    {
        switch(i)
        {
            default:
                if(bottle && !transfer(bottle,goblin))
                {
                    tell_room(ENV(TO),"Whining goblin has filled one " +
                              "bottle.\n" +
                              "Whining goblin gives bottle to hideous " +
                              "goblin.\n");
                    if(!present("waterbottle",TO) && !transfer(bottle,TO))
                    {
                        // We want him to keep at least one bottle all
                        // the time
                        tell_room(ENV(TO),"Hideous goblin says: This " +
                            "bottle isn't completely full.\n" +
                            "Hideous goblin gives bottle to whining " +
                            "goblin.\n" +
                            "Whining goblin complains loudly.\n");
                    }
                }
              break;
            case 1: tell_room(ENV(TO),"Whining goblin fumbles and almost " +
                              "drops a bottle.\n" +
                              "Hideous goblin yells: Useless half elf!\n");
              break;
            case 2: tell_room(ENV(TO),"Whining goblin scurries too close " +
                              "to hideous goblin.\n" +
                              "Hideous goblin kicks whining goblin in the " +
                              "groin!\n");
              break;
            case 3: tell_room(ENV(TO),"Whining goblin looks dripping wet.\n" +
                              "Hideous goblin taunts: That bath you're " +
                              "getting is as thorough as if you were in " +
                              "Kordic bathhouse heh heh!\n");
              break;
            case 4: tell_room(ENV(TO),"Whining goblin grovels before " +
                              "hideous goblin.\n" +
                              "Hideous goblin throws his head back and " +
                              "cackles with glee!\n");
              break;
        }
    }
    else
    {
        switch(i)
        {
            case 0: tell_room(ENV(TO),"Whining goblin fills another water " +
                              "bottle from the puddle.\n");
              break;
            case 1: tell_room(ENV(TO),"Whining goblin spills all the water " +
                              "from one bottle and swears horribly.\n");
              break;
            case 2: tell_room(ENV(TO),"Whining goblin complains: He can " +
                              "come fetch water himself tomorrow.\n");
              break;
            case 3: tell_room(ENV(TO),"Whining goblin spits in one of the " +
                              "water bottles.\n");
              break;
            case 4: tell_room(ENV(TO),"Whining goblin whines: Why can't " +
                              "we get water from the pond instead of " +
                              "having to come all the way here to get it?\n");
              break;
        }
    }
}


text:
es-client-java
==============

In case the rest of this readme doesn't make it clear, this is a pre-release version of this project. I'm seeking input from the Elasticsearch devs (and anyone else who cares to comment). Feel free to send me GH Issues or comment on the original issue: https://github.com/elastic/elasticsearch/issues/7743.

This project is part proof of concept and part initial implementation of a REST+JSON elasticsearch client for Java.

Most Java projects use either the Node or Transport client or the Jest client. Each of these has some major drawbacks:

* The "native" ES clients use Java serialization, which is sensitive to changes in the JVM, sometimes from build to build. If you're using these clients, you should try to use
  exactly the same JVM on the client and the server.
* The Jest client does not implement the ```org.elasticsearch.client.Client``` interface, so you can't switch easily among Http, Transport, and Node clients.

The idea of this project is to address both of those concerns by implementing the Client interface and sending requests over HTTP.

See this issue for some background: https://github.com/elastic/elasticsearch/issues/7743

State and Goals
-----

[![build status](https://travis-ci.org/vvcephei/es-client-java.svg?branch=master)](https://travis-ci.org/vvcephei/es-client-java)

It will take a while to implement the whole ES api, so I'm publicising the project with just a few methods implemented. I'm hoping to accomplish two things:

1. Get some feedback on the approach and implementation. I've just hacked several things out to just get something working. Please give me your feedback on how to do things idiomatically (or even correctly, if I've really hosed it up).
2. Elicit some help in implementing the methods you care about. I feel that Get, Index, Deletes, and Search will cover the majority of use cases, so we should start with these, but if you need something else done, I'd love to help you do it.

I want to make sure that if a method is implemented, it is correct. So the stuff in org.elasticsearch.action should not make any awkward compromises.
Even if the whole client doesn't make it into the main ES repo, I think this stuff may belong there (alongside the actual REST endpoints).

Implemented:

* get
* index
* delete
* search (some minor parts of search objects are not serialized in the API and cannot be inferred, so they are not implemented. They are clearly marked in the code with FIXMEs, and I'll fix them later with PRs to ES. They really are minor, so I don't think you'll be bitten by them.)

|Version|Notes|
|-------|-----|
|0.1PRE1|Just an initial peek at the project. Get, Index, Delete, and Search (with the exception of aggregations) are implemented. The client is created just for a single node.|
|0.1PRE2|Search is fully implemented (including aggregations). The client is still a single-node client: See [Issue #4](https://github.com/vvcephei/es-client-java/issues/4).|
|0.1PRE3|

bugfix related to properly urlencoding the index,type, and id in requests

bugfix related to properly formatting exceptions recieved from the api

|
|0.1PRE4 (not yet released)|

bugfix related to setting the type in search requests

bugfix related to converting the _source map to a BytesReference

bugfix for npe in safe cast to list

|

### RestExecutor?
As far as the actual client goes, I feel that the ES client should not configure its own Http client. There are a lot of choices and configurations for Java HTTP clients,
and I don't want to make those choices for you. The core client defines an SPI that covers everything it needs to do over HTTP.

* ```com.bazaarvoice.elasticsearch.client.core.spi.RestExecutor``` is an abstraction of something that makes asynch REST requests.
* ```com.bazaarvoice.elasticsearch.client.core.spi.RestResponse``` is an abstraction of... REST responses.

Other modules can implement these however they please. I'm providing a Jersey implementation right now, just because it's easy to do a basic configuration.

### Thickness of the client

I'm aware that it's typical for the ES client to handle state management tasks like sniffing and round-robining. I didn't get into that because just
being able to make requests and get responses is priority #1.

This client is a thin client. You give it an executor, and it uses it to make requests and get responses. If you want to talk to two nodes, I'd guess you would make two clients
and round-robin yourself for now. That said, if you really want sniffing and whatnot done, feel free to take a crack at it. The only thing I care about is that it remain agnostic
to the actual transport-level http client.

### Dependencies

The core module depends only on elasticsearch. This is really important to maintain the broad usability of this project. This is another reason it's a good idea
to pull in the http client in a seperate module.

We don't want to put users in the position of trying to exclude undesired dependencies or versions. With this setup, anyone can quickly provide a custom implementation using
the http client that's already in their dependencies.

### Exports for ES

I've attached the Apache 2.0 licence, the same license that ES uses, and I've pulled the deserializations for InternalSomeObject out into InternalSomeObjectHelper classes, with the intention that ES can copy and paste the InternalSomeObjectHelper.fromXContent() method to live right next to the InternalSomeObject.toXContent() method.

Approach
--------

The approach I've been following is to consult the ES API endpoint corresponding to the method I'm implementing and essentially writing the inverse function for what it does.

So ```org.elasticsearch.action.get.GetRest#act``` is written by essentially doing the opposite of what ```org.elasticsearch.rest.action.get.RestGetAction.handleRequest``` does,
and ```org.elasticsearch.action.get.GetRest.getResponseFunction``` is the inverse of ```org.elasticsearch.index.get.GetResult.toXContent```.

The result is hopefully an idiomatic, performant, and correct implementation of the desired functions.


text:
<?php  defined('BASEPATH') OR exit('No direct script access allowed');
class UploadFileModel extends CI_Model {
    function addFile ($data,$n){
                if(!empty($data)){
                $config['upload_path'] = 'assets/upload/';
                $config['allowed_types'] = '*';
               // $config['file_name'] = $_FILES['photo']['name'];
                $config['file_name'] = $n;

                //Load upload library and initialize configuration
                $this->load->library('upload',$config);
                $this->upload->initialize($config);

                if($this->upload->do_upload('filename')){
                    $uploadData = $this->upload->data();
                    $photo = $uploadData['file_name'];
                }else{
                     $error = array('error' => $this->upload->display_errors());
                    print_r($error);
                   // return false;
                }
            }else{
                    echo "dataEmpty";
               // return false;
            }
        return true;
        }
}
?>


text:
[![N|Solid](https://cldup.com/dTxpPi9lDf.thumb.png)](https://nodesource.com/products/nsolid)

TicTacToe is a TicTacToe web app based on the React tutorial. It was optimized to scale with bigger boards.
### Features
* Ability to revert the board to previous moves.
* Scalable board.

### Installation

TicTacToe requires [Node.js](https://nodejs.org/) v4+ to run.

Install the dependencies and devDependencies and start the server.

```sh
$ cd TicTacToeReact
$ npm install -d
$ npm start
```

For production environments...

```sh
$ npm run build
```


text:
Spree::Core::Engine.routes.draw do
  # Add your extension routes here
  namespace :api, :defaults => { :format => 'json' } do
    resources :orders do
      member do
        put :gift_message
      end
    end
  end
end


text:
package cbauthimpl

import (
	"errors"
	"fmt"
	"runtime"
	"sync"
	"testing"
	"time"
)

var (
	readerConfigs = []int{10, 100, 1000, 10000}
)

func newSvc() *Svc {
	svc := NewSVC(time.Duration(0), errors.New("blah"))
	// Pretend that we have a fresh creds database.
	updateDB(svc)

	return svc
}

func updateDB(svc *Svc) {
	svc.UpdateDB(&Cache{}, nil)
}

func runReaders(svc *Svc, b *testing.B) {
	for _, desiredReaders := range readerConfigs {
		maxprocs := runtime.GOMAXPROCS(0)
		parallelism := 1 + (desiredReaders-1)/maxprocs
		readers := parallelism * maxprocs

		name := fmt.Sprintf("readers = %d", readers)
		b.Run(name, func(b *testing.B) {
			b.SetParallelism(parallelism)
			b.RunParallel(func(pb *testing.PB) {
				for pb.Next() {
					_ = fetchDB(svc)
				}
			})
		})
	}
}

func BenchmarkFetchDB_RO(b *testing.B) {
	runReaders(newSvc(), b)
}

func BenchmarkFetchDB_RWMeasureReaders(b *testing.B) {
	svc := newSvc()

	die := make(chan struct{})
	done := &sync.WaitGroup{}
	done.Add(1)

	go func() {
		defer done.Done()

		for {
			select {
			case <-die:
				return
			default:
				updateDB(svc)
			}
		}
	}()

	defer func() {
		close(die)
		done.Wait()
	}()

	runReaders(svc, b)
}

func BenchmarkFetchDB_RWMeasureWriter(b *testing.B) {
	svc := newSvc()

	for _, readers := range readerConfigs {
		name := fmt.Sprintf("readers = %d", readers)

		b.Run(name, func(b *testing.B) {
			// Stop the timer while we start the readers, so it's
			// not included in the measured time.
			b.StopTimer()

			die := make(chan struct{})

			started := &sync.WaitGroup{}
			started.Add(readers)

			done := &sync.WaitGroup{}
			done.Add(readers)

			for i := 0; i < readers; i++ {
				go func() {
					started.Done()
					defer done.Done()

					for {
						select {
						case <-die:
							return
						default:
							_ = fetchDB(svc)
						}
					}
				}()
			}

			defer func() {
				// Don't include readers termination into
				// measured time.
				b.StopTimer()

				close(die)
				done.Wait()
			}()

			// Make sure readers have started before turning the
			// timer back on.
			started.Wait()
			b.StartTimer()

			for i := 0; i < b.N; i++ {
				updateDB(svc)
			}
		})
	}
}


text:
#ifdef __cplusplus
extern          "C" {
#endif

int
_netsnmp_ioctl_ipaddress_container_load_v4(netsnmp_container *container,
                                                  int idx_offset);
int
_netsnmp_ioctl_ipaddress_set_v4(netsnmp_ipaddress_entry * entry);
int
_netsnmp_ioctl_ipaddress_remove_v4(netsnmp_ipaddress_entry * entry);

int
netsnmp_access_ipaddress_ioctl_get_interface_count(int sd, struct ifconf * ifc);

/*
 * struct ioctl for arch_data
 */
typedef struct _ioctl_extras {
   u_int            flags;
   u_char           name[IFNAMSIZ];
} _ioctl_extras;

_ioctl_extras *
netsnmp_ioctl_ipaddress_entry_init(netsnmp_ipaddress_entry *entry);
void
netsnmp_ioctl_ipaddress_entry_cleanup(netsnmp_ipaddress_entry *entry);
int
netsnmp_ioctl_ipaddress_entry_copy(netsnmp_ipaddress_entry *lhs,
                                   netsnmp_ipaddress_entry *rhs);

_ioctl_extras *
netsnmp_ioctl_ipaddress_extras_get(netsnmp_ipaddress_entry *entry);

int
_netsnmp_ioctl_ipaddress_delete_v4(netsnmp_ipaddress_entry * entry);

#ifdef __cplusplus
}
#endif


text:
import { Observable } from '../../Observable';
import { _do, DoSignature } from '../../operator/do';

Observable.prototype.do = _do;
Observable.prototype._do = _do;

declare module '../../Observable' {
  interface Observable<T> {
    do: DoSignature<T>;
    _do: DoSignature<T>;
  }
}


text: the sample datasets are used for testing purpose


text:
package org.unittested.cassandra.test.junit.rule;

import static org.mockito.Mockito.*;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.Description;
import org.junit.runners.model.Statement;
import org.unittested.cassandra.test.TestEnvironmentAdapter;
import org.unittested.cassandra.test.exception.CassandraTestException;

public class CassandraClassRuleTest {

    @Test
    public void apply() throws Exception {
        // given
        MyCassandraClassRule classRule = new MyCassandraClassRule();
        Description description = createDescription(CassandraClassRuleTest.class);

        // when
        Statement statement = classRule.apply(mock(Statement.class), description);

        // then
        assertThat(statement, notNullValue());
        verifyZeroInteractions(classRule.mockAdapter);
        assertThat(classRule.getAdapter(), nullValue());
    }

    @Test
    public void evaluate() throws Throwable {
        // given
        MyCassandraClassRule classRule = new MyCassandraClassRule();
        Description description = createDescription(CassandraClassRuleTest.class);
        Statement childStatement = mock(Statement.class);
        Statement statement = classRule.apply(childStatement, description);

        // when
        statement.evaluate();

        // then
        assertThat(classRule.getAdapter(), nullValue());
        verify(childStatement, times(1)).evaluate();
        verify(classRule.mockAdapter, times(1)).onBeforeClass(CassandraClassRuleTest.class);
        verify(classRule.mockAdapter, times(1)).onAfterClass(CassandraClassRuleTest.class);
    }

    @Test
    public void evaluateWithBeforeClassFailure() throws Throwable {
        // given
        MyCassandraClassRule classRule = new MyCassandraClassRule();
        Description description = createDescription(CassandraClassRuleTest.class);
        Statement childStatement = mock(Statement.class);
        Statement statement = classRule.apply(childStatement, description);

        doThrow(Exception.class).when(classRule.mockAdapter).onBeforeClass(CassandraClassRuleTest.class);

        try {
            // when
            statement.evaluate();
        } catch (Exception e) {
            // then
            assertThat(classRule.getAdapter(), nullValue());
            verifyZeroInteractions(childStatement);
            verify(classRule.mockAdapter, times(1)).onBeforeClass(CassandraClassRuleTest.class);
            verify(classRule.mockAdapter, times(0)).onAfterClass(CassandraClassRuleTest.class);

            return;
        }

        Assert.fail("Expected evaluate to throw an exception.");
    }

    @Test
    public void evaluateWithAfterClassFailure() throws Throwable {
        // given
        MyCassandraClassRule classRule = new MyCassandraClassRule();
        Description description = createDescription(CassandraClassRuleTest.class);
        Statement childStatement = mock(Statement.class);
        Statement statement = classRule.apply(childStatement, description);

        doThrow(Exception.class).when(classRule.mockAdapter).onAfterClass(CassandraClassRuleTest.class);

        try {
            // when
            statement.evaluate();
        } catch (Exception e) {
            // then
            assertThat(classRule.getAdapter(), nullValue());
            verify(childStatement, times(1)).evaluate();
            verify(classRule.mockAdapter, times(1)).onBeforeClass(CassandraClassRuleTest.class);
            verify(classRule.mockAdapter, times(1)).onAfterClass(CassandraClassRuleTest.class);

            return;
        }

        Assert.fail("Expected evaluate to throw an exception.");
    }

    @Test
    public void evaluateWithChildStatementFailure() throws Throwable {
        // given
        MyCassandraClassRule classRule = new MyCassandraClassRule();
        Description description = createDescription(CassandraClassRuleTest.class);
        Statement childStatement = mock(Statement.class);
        Statement statement = classRule.apply(childStatement, description);

        doThrow(Exception.class).when(childStatement).evaluate();

        try {
            // when
            statement.evaluate();
        } catch (Exception e) {
            // then
            assertThat(classRule.getAdapter(), nullValue());
            verify(childStatement, times(1)).evaluate();
            verify(classRule.mockAdapter, times(1)).onBeforeClass(CassandraClassRuleTest.class);
            verify(classRule.mockAdapter, times(1)).onAfterClass(CassandraClassRuleTest.class);

            return;
        }

        Assert.fail("Expected evaluate to throw an exception.");
    }

    @Test
    public void evaluateWithChildStatementFailureAndAfterClassFailure() throws Throwable {
        // given
        MyCassandraClassRule classRule = new MyCassandraClassRule();
        Description description = createDescription(CassandraClassRuleTest.class);
        Statement baseStatement = mock(Statement.class);
        Statement statement = classRule.apply(mock(Statement.class), description);

        doThrow(Exception.class).when(classRule.mockAdapter).onAfterClass(CassandraClassRuleTest.class);
        doThrow(Exception.class).when(baseStatement).evaluate();

        try {
            // when
            statement.evaluate();
        } catch (Exception e) {
            // then
            assertThat(classRule.getAdapter(), nullValue());
            verify(classRule.mockAdapter, times(1)).onBeforeClass(CassandraClassRuleTest.class);
            verify(classRule.mockAdapter, times(1)).onAfterClass(CassandraClassRuleTest.class);

            return;
        }

        Assert.fail("Expected evaluate to throw an exception.");
    }

    @Test(expected = CassandraTestException.class)
    public void evaluateWithNullAdapter() throws Throwable {
        // given
        MyCassandraClassRule classRule = new MyCassandraClassRule();
        Description description = createDescription(CassandraClassRuleTest.class);
        Statement statement = classRule.apply(mock(Statement.class), description);

        classRule.mockAdapter = null;

        // when
        statement.evaluate();

        // then
        // CassandraTestException
    }

    private Description createDescription(Class<?> testClass) {
        return Description.createTestDescription(testClass, testClass.getCanonicalName());
    }

    public static final class MyCassandraClassRule extends CassandraClassRule {

        TestEnvironmentAdapter mockAdapter = mock(TestEnvironmentAdapter.class);

        @Override
        protected TestEnvironmentAdapter createTestEnvironmentAdapter(Class<?> testClass) {
            return this.mockAdapter;
        }
    }
}


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

<title>Uses of Class org.apache.cassandra.thrift.AuthenticationException (apache-cassandra API)</title>
<meta name="date" content="2014-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
org.apache.cassandra.thrift.AuthenticationException

Packages that use AuthenticationException

Package
Description

org.apache.cassandra.thrift

Uses of AuthenticationException in org.apache.cassandra.thrift

Fields in org.apache.cassandra.thrift declared as AuthenticationException

Modifier and Type
Field and Description

AuthenticationException
Cassandra.login_result.authnx

Methods in org.apache.cassandra.thrift that return AuthenticationException

Modifier and Type
Method and Description

AuthenticationException
AuthenticationException.deepCopy()

AuthenticationException
Cassandra.login_result.getAuthnx()

AuthenticationException
AuthenticationException.setWhy(java.lang.String why)

static AuthenticationException
ThriftConversion.toThrift(AuthenticationException e)

Methods in org.apache.cassandra.thrift with parameters of type AuthenticationException

Modifier and Type
Method and Description

int
AuthenticationException.compareTo(AuthenticationException other)

boolean
AuthenticationException.equals(AuthenticationException that)

Cassandra.login_result
Cassandra.login_result.setAuthnx(AuthenticationException authnx)

Methods in org.apache.cassandra.thrift that throw AuthenticationException

Modifier and Type
Method and Description

void
Cassandra.AsyncClient.login_call.getResult()

void
CassandraServer.login(AuthenticationRequest auth_request)

void
Cassandra.Iface.login(AuthenticationRequest auth_request)

void
Cassandra.Client.login(AuthenticationRequest auth_request)

void
Cassandra.Client.recv_login()

Constructors in org.apache.cassandra.thrift with parameters of type AuthenticationException

Constructor and Description

AuthenticationException(AuthenticationException other)

Performs a deep copy on other.

Cassandra.login_result(AuthenticationException authnx,
                      AuthorizationException authzx)

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2014 The Apache Software Foundation


text:
    Identifier
    Quality
    File Name
    Type
    Checksums

      <pnc-artifact-link artifact="artifact"></pnc-artifact-link>
      <pnc-artifact-quality-label artifact="artifact"></pnc-artifact-quality-label>

        {{ artifact.filename }}

        {{ artifact.targetRepository.repositoryType }}

          {{ artifact.md5 }}

          {{ artifact.sha1 }}

          {{ artifact.sha256 }}

          <button class="btn btn-default dropdown-toggle"
                  type="button"
                  id="dropdownKebab"
                  data-toggle="dropdown"
                  aria-haspopup="true"
                  aria-expanded="true">

          </button>

Download

Change Quality

Quality Revisions


text:
//! @file
//! @author Alexis Royer
//! @brief Object consistency insurance.

#ifndef _CLI_CONSTRAINTS_H_
#define _CLI_CONSTRAINTS_H_

#include "cli/namespace.h"

CLI_NS_BEGIN(cli)

    // General.

    //! Maximum length of resource strings, for each language.
    #ifndef CLI_MAX_RESOURCE_LENGTH
    static const unsigned int MAX_RESOURCE_LENGTH = 256;
    #else
    static const unsigned int MAX_RESOURCE_LENGTH = CLI_MAX_RESOURCE_LENGTH;
    #endif

    //! Maximum file path length.
    #ifndef CLI_MAX_FILE_PATH_LENGTH
    static const unsigned int MAX_FILE_PATH_LENGTH = 256;
    #else
    static const unsigned int MAX_FILE_PATH_LENGTH = CLI_MAX_FILE_PATH_LENGTH;
    #endif

    // CLI structures.

    //! Maximum number of menus per cli.
    #ifndef CLI_MAX_MENU_PER_CLI
    static const unsigned int MAX_MENU_PER_CLI = 50;
    #else
    static const unsigned int MAX_MENU_PER_CLI = CLI_MAX_MENU_PER_CLI;
    #endif

    //! Maximum number of words per syntax node.
    #ifndef CLI_MAX_WORDS_PER_NODE
    static const unsigned int MAX_WORDS_PER_NODE = 256;
    #else
    static const unsigned int MAX_WORDS_PER_NODE = CLI_MAX_WORDS_PER_NODE;
    #endif

    // Command lines.

    //! Maximum string length for command lines.
    #ifndef CLI_MAX_CMD_LINE_LENGTH
    static const unsigned int MAX_CMD_LINE_LENGTH = 2048;
    #else
    static const unsigned int MAX_CMD_LINE_LENGTH = CLI_MAX_CMD_LINE_LENGTH;
    #endif

    //! Maximum number of words in a command line.
    #ifndef CLI_MAX_CMD_LINE_WORD_COUNT
    static const unsigned int MAX_CMD_LINE_WORD_COUNT = 256;
    #else
    static const unsigned int MAX_CMD_LINE_WORD_COUNT = CLI_MAX_CMD_LINE_WORD_COUNT;
    #endif

    //! Maximum length for each word in a command line.
    #ifndef CLI_MAX_WORD_LENGTH
    static const unsigned int MAX_WORD_LENGTH = 256;
    #else
    static const unsigned int MAX_WORD_LENGTH = CLI_MAX_WORD_LENGTH;
    #endif

    // Traces / debug.

    //! Maximum number of devices that the traces system can stack.
    #ifndef CLI_MAX_TRACE_DEVICE_COUNT
    static const unsigned int MAX_TRACE_DEVICE_COUNT = 128;
    #else
    static const unsigned int MAX_TRACE_DEVICE_COUNT = CLI_MAX_TRACE_DEVICE_COUNT;
    #endif

    //! Maximum number of trace classes that the traces system manages.
    #ifndef CLI_MAX_TRACE_CLASS_COUNT
    static const unsigned int MAX_TRACE_CLASS_COUNT = 1024;
    #else
    static const unsigned int MAX_TRACE_CLASS_COUNT = CLI_MAX_TRACE_CLASS_COUNT;
    #endif

    //! Maximum length of a trace class name.
    #ifndef CLI_MAX_TRACE_CLASS_NAME_LENGTH
    static const unsigned int MAX_TRACE_CLASS_NAME_LENGTH = MAX_WORD_LENGTH;
    #else
    static const unsigned int MAX_TRACE_CLASS_NAME_LENGTH = CLI_MAX_TRACE_CLASS_NAME_LENGTH;
    #endif

    //! Maximum length of a device name (for debug purpose).
    #ifndef CLI_MAX_DEVICE_NAME_LENGTH
    static const unsigned int MAX_DEVICE_NAME_LENGTH = 256;
    #else
    static const unsigned int MAX_DEVICE_NAME_LENGTH = CLI_MAX_DEVICE_NAME_LENGTH;
    #endif

    // Misc

    //! Maximum number of cli instances that the cli registry manages.
    #ifndef CLI_MAX_CLI_REGISTRY_COUNT
    static const unsigned int MAX_CLI_REGISTRY_COUNT = 10;
    #else
    static const unsigned int MAX_CLI_REGISTRY_COUNT = MAX_CLI_CLI_REGISTRY_COUNT;
    #endif

    //! Maximum number of input devices that an IOMux instance manages.
    #ifndef CLI_MAX_IO_MUX_INPUTS
    static const unsigned int MAX_IO_MUX_INPUTS = 100;
    #else
    static const unsigned int MAX_IO_MUX_INPUTS = CLI_MAX_IO_MUX_INPUTS;
    #endif

    //! Maximum number of execution contexts.
    #ifndef CLI_MAX_EXECUTION_CONTEXTS
    static const unsigned int MAX_EXECUTION_CONTEXTS = 10;
    #else
    static const unsigned int MAX_EXECUTION_CONTEXTS = CLI_MAX_EXECUTION_CONTEXTS;
    #endif

CLI_NS_END(cli)

#endif // _CLI_CONSTRAINTS_H_


text:
package com.jetbrains.python.sdk.flavors;

import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.SystemProperties;
import com.jetbrains.python.sdk.PythonSdkType;
import icons.PythonIcons;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * User : catherine
 */
public class VirtualEnvSdkFlavor extends CPythonSdkFlavor {
  private VirtualEnvSdkFlavor() {
  }

  private final static String[] NAMES = new String[]{"python", "jython", "pypy", "python.exe", "jython.bat", "pypy.exe"};

  public static VirtualEnvSdkFlavor INSTANCE = new VirtualEnvSdkFlavor();

  @Override
  public Collection<String> suggestHomePaths() {
    final Project project = CommonDataKeys.PROJECT.getData(DataManager.getInstance().getDataContext());
    List<String> candidates = new ArrayList<String>();
    if (project != null) {
      VirtualFile rootDir = project.getBaseDir();
      if (rootDir != null)
        candidates.addAll(findInDirectory(rootDir));
    }

    final VirtualFile path = getDefaultLocation();
    if (path != null)
      candidates.addAll(findInDirectory(path));

    return candidates;
  }

  @Nullable
  public static VirtualFile getDefaultLocation() {
    final String path = System.getenv().get("WORKON_HOME");
    if (!StringUtil.isEmpty(path)) {
      return LocalFileSystem.getInstance().findFileByPath(FileUtil.expandUserHome(path).replace('\\','/'));
    }

    final VirtualFile userHome = LocalFileSystem.getInstance().findFileByPath(SystemProperties.getUserHome().replace('\\','/'));
    if (userHome != null) {
      final VirtualFile predefinedFolder = userHome.findChild(".virtualenvs");
      if (predefinedFolder == null)
        return userHome;
      return predefinedFolder;
    }
    return null;
  }

  public static Collection<String> findInDirectory(VirtualFile rootDir) {
    List<String> candidates = new ArrayList<String>();
    if (rootDir != null) {
      rootDir.refresh(false, false);
      VirtualFile[] suspects = rootDir.getChildren();
      for (VirtualFile child : suspects) {
        if (child.isDirectory()) {
          final VirtualFile bin = child.findChild("bin");
          final VirtualFile scripts = child.findChild("Scripts");
          if (bin != null) {
            final String interpreter = findInterpreter(bin);
            if (interpreter != null) candidates.add(interpreter);
          }
          if (scripts != null) {
            final String interpreter = findInterpreter(scripts);
            if (interpreter != null) candidates.add(interpreter);
          }
        }
      }
    }
    return candidates;
  }

  @Nullable
  private static String findInterpreter(VirtualFile dir) {
    for (VirtualFile child : dir.getChildren()) {
      if (!child.isDirectory()) {
        final String childName = child.getName();
        for (String name : NAMES) {
          if (SystemInfo.isWindows) {
            if (childName.equals(name)) {
              return child.getPath();
            }
          }
          else {
            if (childName.startsWith(name)) {
              if (!childName.endsWith("-config")) {
                return child.getPath();
              }
            }
          }
        }
      }
    }
    return null;
  }

  @Override
  public boolean isValidSdkPath(@NotNull File file) {
    if (!super.isValidSdkPath(file)) return false;
    return PythonSdkType.getVirtualEnvRoot(file.getPath()) != null;
  }

  @Override
  public Icon getIcon() {
    return PythonIcons.Python.Virtualenv;
  }
}


text:
import sublime, sublime_plugin, binascii, re, math, os
import subprocess
import threading
import ast, json

class RunAsync(threading.Thread):
    def __init__(self, cb):
        self.cb = cb
        threading.Thread.__init__(self)

    def run(self):
        self.cb()

def run_async(cb):
    res = RunAsync(cb)
    res.start()
    return res

class Player():
    url = None
    popen = None
    _enabled = False
    last_view = None

    def __init__(self, url=None):
        self.url = url

    def setTrack( self, start, duration ):
        self.start = start
        self.duration = duration

    def _play(self):
        self.popen = subprocess.Popen(["ffplay", "-ss", str( self.start ),  "-t", str( self.duration ), "-nodisp", "-autoexit", self.url], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
        out, err = self.popen.communicate()

    def play(self ):
        if self.url is None:
            return
        self._enabled = True
        # self.load_to_view(sublime.active_window().active_view())
        run_async(self._play)

    def stop(self):
        if self._enabled:
            self._enabled = False
            self.unload_view()
            self.popen.kill()
            self.popen = None

    def set_url(self, url):
        was_enabled = self._enabled
        self.stop()
        self.url = url
        if was_enabled:
            self.play()

    def enabled(self):
        return self._enabled

    def unload_view(self):
        if self.last_view is not None:
            self.last_view.erase_status("SublimePlayer")
            self.last_view = None

    def load_to_view(self, view):
        self.unload_view()
        if not self._enabled:
            return
        view.set_status("SublimePlayer", "Playing: %s" % (self.url))
        self.last_view = view

player = Player()

class PlaySpriteSound(sublime_plugin.TextCommand):
    def run(self, edit):
        spriteMap = self.view.substr( sublime.Region( 0, self.view.size() ))
        spriteMap = spriteMap[ spriteMap.index('return') + len('return '): spriteMap.index('})')].replace("'", "\"")
        fileName = spriteMap[ spriteMap.index('resources: [ \"') + len('resources: [ \"') : spriteMap.index('.mp3') + len( '.mp3' )]
        audioFile = os.sep.join(self.view.file_name().split(os.sep)[0:-1]) + os.sep + fileName
        player.set_url( audioFile )

        soundParts = self.view.substr( self.view.sel()[0] ).split()
        start = 0
        end = 0
        for i in range( 0, len( soundParts ) ):
            if 'start' in soundParts[i]:
                start = float( soundParts[i + 1][0: -1] )
            if 'end' in soundParts[i]:
                end = float( soundParts[i + 1][0: -1] )

        player.setTrack( start, end - start )
        player.play()


text:
import React  from "react";
import Config from "./config";

function findReact(dom) {
  for (var key in dom) {
    if (key.startsWith("__reactInternalInstance$")) {
      const compInternals = dom[key]._currentElement;
      const compWrapper   = compInternals._owner;
      const comp          = compWrapper._instance;
      return comp;
    }
  }
  return null;
}

function isArray(o) {
  const types = 'Array Object String Date Function Boolean Number Null Undefined'.split(' ');

  const type = function() {
    return Object.prototype.toString.call(this).slice(8, -1);
  }

  return types[0] === type.call(o);
}

function isDate(o) {
  return this.hasValue(o.year)       &&
         this.hasValue(o.month)      &&
         this.hasValue(o.dayOfMonth) &&
         this.hasValue(o.hourOfDay)  &&
         this.hasValue(o.minute)     &&
         this.hasValue(o.second);
}

function hasValue(o) {
  return o !== undefined && o !== null;
}

function isType(c, o) {
  if (c === o) {
    return true;
  }
  if (c === React.Component) {
    return false;
  }

  return this.isType(c.__proto__, o);
}

let count = 0;

function getID() {
  return "mrisk-" + ++count;
}

export default {
  findReact: findReact,
  isArray:   isArray,
  isDate:    isDate,
  hasValue:  hasValue,
  isType:    isType,
  getID:     getID
}


text:
FROM openjdk:8-jre-alpine

MAINTAINER Maxime Wojtczak <maxime.wojtczak@zenika.com>

ENV PROJECT healthcheck
ENV VERSION 0.2.1

COPY target/$PROJECT-$VERSION.jar /healthcheck.jar

EXPOSE 8080

ENTRYPOINT ["java"]
CMD ["-jar", "/healthcheck.jar"]


text:
import os
import socket
import subprocess
import sys
from string import Formatter

from config import PACKAGE_DIR
from config import python2_exec
from config import python3_exec

from clsMail import MailCls

from config import SPECS

def get_executable():
    PYTHON_VERSION = sys.version_info[0]

    if PYTHON_VERSION == 2:
        python_exec = python2_exec
    else:
        python_exec = python3_exec

    return python_exec

def strfdelta(tdelta, fmt):
    """ Get a string from a timedelta.
    """
    f, d = Formatter(), {}
    l = {'D': 86400, 'H': 3600, 'M': 60, 'S': 1}
    k = list(map(lambda x: x[1], list(f.parse(fmt))))
    rem = int(tdelta.total_seconds())
    for i in ('D', 'H', 'M', 'S'):
        if i in k and i in l.keys():
            d[i], rem = divmod(rem, l[i])
    return f.format(fmt, **d)

def cleanup():
    os.system('git clean -d -f')

def compile_package(is_debug=False):
    """ Compile the package for use.
    """
    python_exec = get_executable()
    cwd = os.getcwd()
    os.chdir(PACKAGE_DIR + '/respy')
    subprocess.check_call(python_exec + ' waf distclean', shell=True)
    if not is_debug:
        subprocess.check_call(python_exec + ' waf configure build', shell=True)
    else:
        subprocess.check_call(python_exec + ' waf configure build --debug',
                              shell=True)

    os.chdir(cwd)

def send_notification(which, **kwargs):
    """ Finishing up a run of the testing battery.
    """

    # This allows to run the scripts even when no notification can be send.
    if not os.path.exists(os.environ['HOME'] + '/.credentials'):
        return

    hours, is_failed, num_tests, seed = None, None, None, None

    # Distribute keyword arguments
    if 'is_failed' in kwargs.keys():
        is_failed = kwargs['is_failed']

    if 'hours' in kwargs.keys():
        hours = kwargs['hours']

    if 'num_tests' in kwargs.keys():
        num_tests = kwargs['num_tests']

    if 'seed' in kwargs.keys():
        seed = kwargs['seed']

    hostname = socket.gethostname()

    if which == 'scalability':
        subject = ' RESPY: Scalability Testing'
        message = ' Scalability testing is completed on @' + hostname + '.'
    elif which == 'regression':
        subject = ' RESPY: Regression Testing'
        message = ' Regression testing is completed on @' + hostname + '.'
    elif which == 'reliability':
        subject = ' RESPY: Reliability Testing'
        message = ' Reliability testing is completed on @' + hostname + '.'
    elif which == 'property':
        subject = ' RESPY: Property Testing'
        message = ' A ' + str(hours) + ' hour run of the testing battery on @' + \
                  hostname + ' is completed.'

    elif which == 'release':
        subject = ' RESPY: Release Testing'
        if is_failed:
            message = ' Failure during release testing with seeed ' + str(seed) + '.'
        else:
            message = ' Release testing completed successfully after ' + str(
                hours) + ' hours. We ran a total of ' + str(num_tests) + \
                      ' tests.'
    else:
        raise AssertionError

    mail_obj = MailCls()
    mail_obj.set_attr('subject', subject)
    mail_obj.set_attr('message', message)

    if which == 'property':
        mail_obj.set_attr('attachment', 'property.respy.info')
    elif which == 'scalability':
        mail_obj.set_attr('attachment', 'scalability.respy.info')
    elif which == 'reliability':
        mail_obj.set_attr('attachment', 'reliability.respy.info')

    mail_obj.lock()

    mail_obj.send()

def aggregate_information(which):

    if which == 'scalability':
        fname_info = 'scalability.respy.info'
    elif which == 'reliability':
        fname_info = 'reliability.respy.info'
    else:
        raise AssertionError

    dirnames =SPECS

    with open(fname_info, 'w') as outfile:
        outfile.write('\n')
        for dirname in dirnames:

            if not os.path.exists(dirname):
                continue

            outfile.write(' ' + dirname + '\n')
            os.chdir(dirname)
            with open(fname_info, 'r') as infile:
                outfile.write(infile.read())
            os.chdir('../')
            outfile.write('\n\n')


text:
package com.github.rvesse.airline.parser.resources;

import java.io.File;
import java.nio.file.Paths;

/**
 * A user alias locator that allows the {@code ./} or {@code .\} alias
 * (depending on your platforms file separator) to be used to refer to the
 * current working directory
 *
 * @author rvesse
 *
 */
public class WorkingDirectoryLocator extends FileLocator {

    @Override
    protected String resolve(String searchLocation) {
        // Apply parent resolve() first as this strips off any file:// prefix
        searchLocation = super.resolve(searchLocation);

        // Find the working directory since we will also potentially use this to
        // resolve the special ./ alias
        File workingDir = Paths.get("").toAbsolutePath().toFile();

        // Can't resolve if no working directory available
        if (workingDir == null)
            return searchLocation;

        // Expand ./ or .\ alias (platform dependent)
        if (searchLocation.startsWith("." + File.separator)) {
            // Remember we need to ensure there is a separator between the
            // working directory and the rest of the path
            searchLocation = workingDir.getAbsolutePath()
                    + searchLocation.substring(workingDir.getAbsolutePath().endsWith(File.separator) ? 2 : 1);
        }

        return searchLocation;
    }
}


text: Rails.application.config.assets.precompile += ['flat-ui/**/*']


text: <?php require './load.php';


text: module.exports = { "default": require("core-js/library/fn/array/concat"), __esModule: true };


text:
class PackageInformation
{
public:
    virtual ~PackageInformation() = default;

    virtual DAVA::String GetPath() const = 0;
    virtual DAVA::int32 GetVersion() const = 0;

    virtual void VisitImportedPackages(const DAVA::Function<void(const PackageInformation*)>& visitor) const = 0;
    virtual void VisitControls(const DAVA::Function<void(const ControlInformation*)>& visitor) const = 0;
    virtual void VisitPrototypes(const DAVA::Function<void(const ControlInformation*)>& visitor) const = 0;
};


text:
package com.consol.citrus.functions;

import com.consol.citrus.annotations.CitrusXmlTest;
import com.consol.citrus.testng.AbstractTestNGCitrusTest;
import org.testng.annotations.Test;

/**
 * @author Christoph Deppisch
 * @since 2008
 */
public class CustomFunctionIT extends AbstractTestNGCitrusTest {
    @Test
    @CitrusXmlTest
    public void CustomFunctionIT() {}
}