text:
package org.jcodec.codecs.vpx.vp8.pointerhelper;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 *
 * @author The JCodec project
 *
 */public class FullAccessGenArrPointer<T> {
    ArrayList<T> arr;
    int pos;
    private int savedPos;

    public FullAccessGenArrPointer(int size) {
        arr = new ArrayList<T>(size);
        for (int i = 0; i < size; i++)
            arr.add(null);
    }

    public FullAccessGenArrPointer(final T[] data, final int pos) {
        this.arr = new ArrayList<T>();
        this.arr.addAll(Arrays.asList(data));
        this.pos = pos;
        savedPos = pos;
    }

    public FullAccessGenArrPointer(final FullAccessGenArrPointer<T> other) {
        this.arr = other.arr;
        this.pos = other.pos;
        this.savedPos = other.savedPos;
    }

    public T get() {
        return arr.get(pos);
    }

    public T getRel(int r) {
        return arr.get(pos + r);
    }

    public int size() {
        return arr.size();
    }

    public void dec() {
        pos--;
    }

    public T getAndInc() {
        return arr.get(pos++);
    }

    public void inc() {
        pos++;
    }

    public void incBy(int r) {
        pos += r;
    }

    public void rewind() {
        pos = 0;
    }

    public void rewindToSaved() {
        pos = savedPos;
    }

    public void savePos() {
        savedPos = pos;
    }

    public int getPos() {
        return pos;
    }

    public void setPos(int p) {
        pos = p;
    }

    public T set(T v) {
        arr.set(pos, v);
        return v;
    }

    public T setAndInc(T v) {
        arr.set(pos++, v);
        return v;
    }

    public T setRel(int r, T v) {
        arr.set(pos + r, v);
        return v;
    }

    public void memset(int rel, T v, int len) {
        final int start = pos + rel;
        final int stop = start + len;
        for (int i = start; i < stop; i++) {
            arr.set(i, v);
        }
    }

    public FullAccessGenArrPointer<T> shallowCopy() {
        return new FullAccessGenArrPointer<T>(this);
    }

    public FullAccessGenArrPointer<T> shallowCopyWithPosInc(int by) {
        FullAccessGenArrPointer<T> ret = shallowCopy();
        ret.incBy(by);
        return ret;
    }

    public int pointerDiff(FullAccessGenArrPointer<T> other) {
        return other.pos - this.pos;
    }

    @SuppressWarnings("unchecked")
    @Override
    public boolean equals(Object obj) {
        if (obj instanceof FullAccessGenArrPointer) {
            FullAccessGenArrPointer<T> other = ((FullAccessGenArrPointer<T>) obj);
            return other.arr == this.arr && other.pos == this.pos;
        }
        return false;
    }

}


text:
#include <folly/fibers/FiberManager.h>
#include <folly/fibers/FiberManagerMap.h>

#include <queue>

#include <folly/Benchmark.h>
#include <folly/fibers/SimpleLoopController.h>
#include <folly/init/Init.h>
#include <folly/io/async/EventBase.h>

using namespace folly::fibers;

static size_t sNumAwaits;

void runBenchmark(size_t numAwaits, size_t toSend) {
  sNumAwaits = numAwaits;

  FiberManager fiberManager(folly::make_unique<SimpleLoopController>());
  auto& loopController =
      dynamic_cast<SimpleLoopController&>(fiberManager.loopController());

  std::queue<Promise<int>> pendingRequests;
  static const size_t maxOutstanding = 5;

  auto loop = [&fiberManager, &loopController, &pendingRequests, &toSend]() {
    if (pendingRequests.size() == maxOutstanding || toSend == 0) {
      if (pendingRequests.empty()) {
        return;
      }
      pendingRequests.front().setValue(0);
      pendingRequests.pop();
    } else {
      fiberManager.addTask([&pendingRequests]() {
        for (size_t i = 0; i < sNumAwaits; ++i) {
          auto result = await([&pendingRequests](Promise<int> promise) {
            pendingRequests.push(std::move(promise));
          });
          DCHECK_EQ(result, 0);
        }
      });

      if (--toSend == 0) {
        loopController.stop();
      }
    }
  };

  loopController.loop(std::move(loop));
}

BENCHMARK(FiberManagerBasicOneAwait, iters) {
  runBenchmark(1, iters);
}

BENCHMARK(FiberManagerBasicFiveAwaits, iters) {
  runBenchmark(5, iters);
}

BENCHMARK(FiberManagerCreateDestroy, iters) {
  for (size_t i = 0; i < iters; ++i) {
    folly::EventBase evb;
    auto& fm = folly::fibers::getFiberManager(evb);
    fm.addTask([]() {});
    evb.loop();
  }
}

BENCHMARK(FiberManagerAllocateDeallocatePattern, iters) {
  static const size_t kNumAllocations = 10000;

  FiberManager::Options opts;
  opts.maxFibersPoolSize = 0;

  FiberManager fiberManager(folly::make_unique<SimpleLoopController>(), opts);

  for (size_t iter = 0; iter < iters; ++iter) {
    DCHECK_EQ(0, fiberManager.fibersPoolSize());

    size_t fibersRun = 0;

    for (size_t i = 0; i < kNumAllocations; ++i) {
      fiberManager.addTask([&fibersRun] { ++fibersRun; });
      fiberManager.loopUntilNoReady();
    }

    DCHECK_EQ(10000, fibersRun);
    DCHECK_EQ(0, fiberManager.fibersPoolSize());
  }
}

BENCHMARK(FiberManagerAllocateLargeChunk, iters) {
  static const size_t kNumAllocations = 10000;

  FiberManager::Options opts;
  opts.maxFibersPoolSize = 0;

  FiberManager fiberManager(folly::make_unique<SimpleLoopController>(), opts);

  for (size_t iter = 0; iter < iters; ++iter) {
    DCHECK_EQ(0, fiberManager.fibersPoolSize());

    size_t fibersRun = 0;

    for (size_t i = 0; i < kNumAllocations; ++i) {
      fiberManager.addTask([&fibersRun] { ++fibersRun; });
    }

    fiberManager.loopUntilNoReady();

    DCHECK_EQ(10000, fibersRun);
    DCHECK_EQ(0, fiberManager.fibersPoolSize());
  }
}

int main(int argc, char** argv) {
  folly::init(&argc, &argv, true);

  folly::runBenchmarks();
  return 0;
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- Translated using Transifex web application. For support, or if you would like to to help out, please visit your language team! -->
<!-- Slovenian language-Team URL: http://www.transifex.com/projects/p/xbmc-addons/language/sl/ -->
<!-- Report language file syntax bugs at: alanwww1@xbmc.org -->

<strings>
    <!-- Default strings -->
    <string id="30001">Stran</string>
    <string id="30101">Video</string>
    <string id="30201">Naslov</string>
</strings>


text:
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog
  xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
         http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
		<includeAll path="1/"/>
		<changeSet id="1" author="geiser">
			<tagDatabase tag="1"/>
		</changeSet>
		<includeAll path="2/"/>
		<changeSet id="2" author="geiser">
			<tagDatabase tag="2"/>
		</changeSet>
</databaseChangeLog>


text:
A Curb adapter for Faraday.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'faraday-curb'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install faraday-curb


text:
define([
  'dojo/_base/declare', 'dojo/_base/lang', 'dojo/_base/Deferred',
  'dojo/on', 'dojo/dom-class', 'dojo/dom-construct', 'dojo/aspect', 'dojo/request', 'dojo/topic',
  './PageGrid', './formatter', './GridSelector', '../store/PathwaySummaryMemoryStore'
], function (
  declare, lang, Deferred,
  on, domClass, domConstruct, aspect, request, Topic,
  Grid, formatter, selector, Store
) {
  return declare([Grid], {
    region: 'center',
    query: (this.query || ''),
    apiToken: window.App.authorizationToken,
    apiServer: window.App.dataServiceURL,
    store: null,
    dataModel: 'pathway_summary',
    primaryKey: 'pathway_id',
    selectionModel: 'extended',
    deselectOnRefresh: true,
    columns: {
      'Selection Checkboxes': selector({ unhidable: true }),
      pathway_summary_name: { label: 'Pathway Name', field: 'pathway_name' },
      genes_selected: { label: '# of Genes Selected', field: 'genes_selected' },
      genes_annotated: { label: '# of Genes Annotated', field: 'genes_annotated' },
      coverage: { label: '% Coverage', field: 'coverage' }
    },
    constructor: function (options) {
      // console.log("PathwaySummaryGrid Ctor: ", options);
      if (options && options.apiServer) {
        this.apiServer = options.apiServer;
      }
      this.queryOptions = {
        sort: [{ attribute: 'coverage', descending: true }]
      };
    },

    startup: function () {
      var _self = this;

      this.on('.dgrid-content .dgrid-row:dblclick', function (evt) {
        var row = _self.row(evt);
        // console.log("dblclick row:", row);
        on.emit(_self.domNode, 'ItemDblClick', {
          item_path: row.data.path,
          item: row.data,
          bubbles: true,
          cancelable: true
        });
        // console.log('after emit');
      });

      this.on('dgrid-select', function (evt) {
        // console.log('dgrid-select: ', evt);
        var newEvt = {
          rows: evt.rows,
          selected: evt.grid.selection,
          grid: _self,
          bubbles: true,
          cancelable: true
        };
        on.emit(_self.domNode, 'select', newEvt);
      });

      this.on('dgrid-deselect', function (evt) {
        // console.log("dgrid-deselect");
        var newEvt = {
          rows: evt.rows,
          selected: evt.grid.selection,
          grid: _self,
          bubbles: true,
          cancelable: true
        };
        on.emit(_self.domNode, 'deselect', newEvt);
      });

      aspect.before(_self, 'renderArray', function (results) {
        Deferred.when(results.total, function (x) {
          _self.set('totalRows', x);
        });
      });

      this.inherited(arguments);
      this._started = true;
    },

    state: null,
    postCreate: function () {
      this.inherited(arguments);
    },
    _setApiServer: function (server) {
      this.apiServer = server;
    },
    _setState: function (state) {
      if (!this.store) {
        this.set('store', this.createStore(this.apiServer, this.apiToken || window.App.authorizationToken, lang.mixin({}, state)));
      } else {
        this.store.set('state', state);
      }
      this.refresh();
    },
    _selectAll: function () {

      this._unloadedData = {};

      return Deferred.when(this.store.data.map(function (d) {
        this._unloadedData[d[this.primaryKey]] = d;
        return d[this.primaryKey];
      }, this));
    },
    createStore: function (server, token, state) {

      var store = new Store({
        token: token,
        apiServer: this.apiServer || window.App.dataServiceURL,
        state: state || this.state
      });
      store.watch('refresh', lang.hitch(this, 'refresh'));

      return store;
    }
  });
});


text:
package org.beansugar.oauth.o10a.builder.api;

import org.beansugar.oauth.o10a.model.Token10a;

public class TwitterApi extends DefaultApi10a {
	private static final String AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize?oauth_token=%s";
	private static final String REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token";
	private static final String ACCESS_TOKEN_URL = "https://api.twitter.com/oauth/access_token";

	@Override
	public String getAuthorizationUrl(Token10a requestToken) {
		return String.format(AUTHORIZE_URL, requestToken.getToken());
	}

	@Override
	public String getRequestTokenUrl() {
		return REQUEST_TOKEN_URL;
	}

	@Override
	public String getAccessTokenUrl() {
		return ACCESS_TOKEN_URL;
	}

}


text:
namespace Placement
{

std::vector<Label>
RandomizedLabelsArranger::getArrangement(const LabellerFrameData &frameData,
                                        std::shared_ptr<LabelsContainer> labels)
{
  auto vector = labels->getLabels();

  std::random_shuffle(vector.begin(), vector.end());

  return vector;
}

}  // namespace Placement


text:
'use strict';
var anObject = require('../internals/an-object');

// `RegExp.prototype.flags` getter implementation
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
  var that = anObject(this);
  var result = '';
  if (that.global) result += 'g';
  if (that.ignoreCase) result += 'i';
  if (that.multiline) result += 'm';
  if (that.unicode) result += 'u';
  if (that.sticky) result += 'y';
  return result;
};


text:
using UnityEngine;

namespace VARP.Timing
{
    /// <summary>
    /// The guard for calling function only once per frame
    /// </summary>
    /// <example>
    ///     OncePerFrame tick;
    ///     bool Tick()
    ///     {
    ///         if (tick.IsFirst())
    ///         {
    ///             ...
    ///         }
    ///     }
    /// </example>
    public struct OncePerFrame
    {
        private int frameCount;
        public OncePerFrame(int inFrameCount = -1)
        {
            frameCount = inFrameCount;
        }

        public bool IsOnce
        {
            get
            {
                if (frameCount == Time.frameCount) return true;
                frameCount = Time.frameCount;
                return false;
            }
        }

        public bool IsNotOnce { get { return !IsOnce; } }
    }
}


text:
import defs from '../data/defs.json';

import Component from './component';
import Field from './field';

export default class Segment {
  constructor(name, data={}) {
    this.name = name;
    this.fields = {};

    if (Array.isArray(data)) {
      this.setArray(data);
    } else {
      this.setObject(data);
    }
  }

  setObject(data) {
    // console.log("Segment.setObject data=%j", data);

    Object.getOwnPropertyNames(data).forEach(k => this.setByName(k, data[k]));

    return this;
  }

  setArray(data) {
    // console.log("Segment.setArray data=%j", data);

    data.forEach((v, i) => v && i && this.setByIndex(i, v));

    return this;
  }

  setByName(name, value) {
    // console.log("Segment.setByName name=%s value=%j", name, value);

    let segDef = defs.Segment[this.name][1];

    let fieldIdx = null;
    let fieldDef = null;
    for (let i=0;i<segDef.length;i++) {
      let f = defs.Field[segDef[i][0]];

      if (f && f[2].toLowerCase() === name.toLowerCase()) {
        fieldIdx = i+1;
        fieldDef = f;
      }
    }

    if (!fieldDef) {
      let options = segDef.map(s => defs.Field[s[0]][2].toLowerCase());
      throw new Error(`segment ${this.name} has no field ${name}; options are: ${options.join(', ')}`);
    }

    this.setByIndex(fieldIdx, value);
  }

  setByIndex(index, value) {
    // console.log("Segment.setByIndex index=%d value=%j", index, value);

    if (index === 0) {
      throw new Error("can't set the first field of a segment after creation");
    }

    if (this.fields[index]) {
      this.fields[index] = null;
    }

    this.addByIndex(index, value);
  }

  addByIndex(index, value) {
    // console.log("Segment.addByIndex index=%d value=%j", index, value);

    if (index === 0) {
      throw new Error("can't set the first field of a segment after creation");
    }

    if (typeof value === "object" && value.repeated) {
      value.repeated.forEach(this.addByIndex.bind(this, index));

      return;
    }

    let segProps = defs.Segment[this.name];
    if (!segProps) {
      return;
      throw new Error(`segment ${this.name} not found; available segments are ${Object.keys(defs.Segment).sort().join(", ")}`);
    }

    let segDef = defs.Segment[this.name][1];
    if (!segDef[index]) {
      let options = segDef.map(s => defs.Field[s[0]][2].toLowerCase());
      throw new Error(`segment ${this.name} only has ${segDef.length} fields (${options.join(", ")}), but you tried to set field ${index} to ${JSON.stringify(value)}`);
    }

    value = Field.load(segDef[index-1][0], value);

    if (!this.fields[index]) {
      this.fields[index] = [];
    }

    this.fields[index].push(value);
  }

  getField(index, repetition=0) {
    return this.fields[index][repetition];
  }

  build() {
    // console.log("Segment.build");

    let a = [this.name];

    for (let i=1;i<defs.Segment[this.name][1].length;i++) {
      if (Object.hasOwnProperty.call(this.fields, i)) {
        a.push(this.fields[i].map(e => e.build()));
      } else {
        a.push(null);
      }
    }

    return a;
  }

  buildObject() {
    let a = {};

    if (!defs.Segment[this.name]) {
      return null;
    }

    for (let i=0;i<defs.Segment[this.name][1].length;i++) {
      let [min, max] = defs.Segment[this.name][1][i][1];

      if (Object.hasOwnProperty.call(this.fields, i)) {
        let k = this.fields[i][0].name.toLowerCase();

        a[k] = this.fields[i].map(e => e.buildObject());

        if (max === 1) {
          a[k] = a[k][0];
        }
      }
    }

    return [this.name, a];
  }

  compile() {
    // console.log("Segment.compile");

    let a = [this.name];

    for (let i=1;i<defs.Segment[this.name][1].length;i++) {
      if (this.name === "MSH" && i === 1) {
        continue;
      }

      if (Object.hasOwnProperty.call(this.fields, i)) {
        a.push(this.fields[i].map(e => e.compile()).join("~"));
      } else {
        a.push("");
      }
    }

    while (true) {
      if (a[a.length-1] !== "") {
        break;
      }

      a = a.slice(0, a.length-1);
    }

    return a.join("|");
  }

  static load(input) {
    // console.log("Segment.load input=%j", input);

    if (typeof input !== "object" || !input.segment) {
      input = {segment: [input]};
    }

    return new Segment(input.segment[0]).setArray(input.segment);
  }
}


text:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="com.comp490.studybuddy.note.NoteActivity" >

    <item
        android:id="@+id/menuSoundPlay"
        android:icon="@drawable/ic_action_play"
        android:showAsAction="ifRoom"
        android:title="@string/action_play_sound"/>

    <item android:id="@+id/menuUnlockView"
          android:icon="@drawable/ic_action_not_secure"
          android:title="@string/action_unlock_view"
          android:showAsAction="ifRoom"/>

    <item android:id="@+id/menuDeleteView"
          android:icon="@drawable/ic_action_discard"
          android:title="@string/action_delete_view"
          android:showAsAction="ifRoom"/>

</menu>


text:
.class Lcom/google/android/gms/internal/cw$a;
.super Landroid/content/MutableContextWrapper;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/google/android/gms/internal/cw;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "a"
.end annotation

# instance fields
.field private iS:Landroid/app/Activity;

.field private iT:Landroid/content/Context;

# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    invoke-direct {p0, p1}, Landroid/content/MutableContextWrapper;-><init>(Landroid/content/Context;)V

    invoke-virtual {p0, p1}, Lcom/google/android/gms/internal/cw$a;->setBaseContext(Landroid/content/Context;)V

    return-void
.end method

# virtual methods
.method public setBaseContext(Landroid/content/Context;)V
    .locals 1

    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/google/android/gms/internal/cw$a;->iT:Landroid/content/Context;

    instance-of v0, p1, Landroid/app/Activity;

    if-eqz v0, :cond_0

    move-object v0, p1

    check-cast v0, Landroid/app/Activity;

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    iput-object v0, p0, Lcom/google/android/gms/internal/cw$a;->iS:Landroid/app/Activity;

    iget-object v0, p0, Lcom/google/android/gms/internal/cw$a;->iT:Landroid/content/Context;

    invoke-super {p0, v0}, Landroid/content/MutableContextWrapper;->setBaseContext(Landroid/content/Context;)V

    return-void
.end method

.method public startActivity(Landroid/content/Intent;)V
    .locals 1

    iget-object v0, p0, Lcom/google/android/gms/internal/cw$a;->iS:Landroid/app/Activity;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/google/android/gms/internal/cw$a;->iS:Landroid/app/Activity;

    invoke-virtual {v0, p1}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V

    return-void

    :cond_0
    const/high16 v0, 0x1000

    invoke-virtual {p1, v0}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    iget-object v0, p0, Lcom/google/android/gms/internal/cw$a;->iT:Landroid/content/Context;

    invoke-virtual {v0, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method


text:
package iht.controllers.application.assets.properties

import iht.config.AppConfig
import iht.controllers.application.ApplicationControllerTest
import iht.forms.ApplicationForms._
import iht.models.application.ApplicationDetails
import iht.testhelpers.{CommonBuilder, TestHelper}
import iht.utils.CommonHelper
import iht.views.html.application.asset.properties.property_address
import play.api.mvc.MessagesControllerComponents
import play.api.test.FakeHeaders
import play.api.test.Helpers._
import uk.gov.hmrc.http.HeaderCarrier
import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendController

/**
 * Created by james on 17/06/16.
 */
class PropertyAddressControllerTest extends ApplicationControllerTest {

  def setUpTests(applicationDetails: Option[ApplicationDetails] = None) = {
    createMocksForApplication(mockCachingConnector,
      mockIhtConnector,
      appDetails = applicationDetails,
      getAppDetails = true,
      saveAppDetails = true,
      storeAppDetailsInCache = true)
  }

  protected abstract class TestController extends FrontendController(mockControllerComponents) with PropertyAddressController {
    override val cc: MessagesControllerComponents = mockControllerComponents
    override implicit val appConfig: AppConfig = mockAppConfig
    override val propertyAddressView: property_address = app.injector.instanceOf[property_address]
  }

  def propertyAddressController = new TestController {
    override val cachingConnector = mockCachingConnector
    override val authConnector = mockAuthConnector
    override val ihtConnector = mockIhtConnector
  }

  def propertyAddressControllerNotAuthorised = new TestController {
    override val cachingConnector = mockCachingConnector
    override val authConnector = mockAuthConnector
    override val ihtConnector = mockIhtConnector

  }

  implicit val headerCarrier = FakeHeaders()
  implicit val hc = new HeaderCarrier

  "Property address controller" must {

   "redirect to ida login page on PageLoad if the user is not logged in" in {
      val result = propertyAddressControllerNotAuthorised.onPageLoad(createFakeRequest(isAuthorised = false))
      status(result) must be(SEE_OTHER)
      redirectLocation(result) must be (Some(loginUrl))
    }

    "redirect to ida login page on Submit if the user is not logged in" in {
      val result = propertyAddressControllerNotAuthorised.onSubmit(createFakeRequest(isAuthorised = false))
      status(result) must be(SEE_OTHER)
      redirectLocation(result) must be (Some(loginUrl))
    }

    "respond ok on page load" in {
      val result = propertyAddressController.onPageLoad(createFakeRequest(authRetrieveNino = false))
      status(result) must be (OK)
    }

    "display the correct title on page" in {
      val result = propertyAddressController.onPageLoad(createFakeRequest(authRetrieveNino = false))
      status(result) must be (OK)
      contentAsString(result) must include (messagesApi("iht.estateReport.assets.property.whatIsAddress.question"))
    }

    "display the correct title on page in edit mode" in {
      val applicationDetails = iht.testhelpers.CommonBuilder.buildApplicationDetails.
        copy(propertyList = List(CommonBuilder.property))

      setUpTests(Some(applicationDetails))

      val result = propertyAddressController.onEditPageLoad("1")(createFakeRequest())
      status(result) must be (OK)
      contentAsString(result) must include (messagesApi("iht.estateReport.assets.property.whatIsAddress.question"))
    }

    "respond with INTERNAL_SERVER_ERROR on page load in edit mode when application details could not be retrieved" in {
      setUpTests()

      val result = propertyAddressController.onEditPageLoad("1")(createFakeRequest())
      status(result) must be (INTERNAL_SERVER_ERROR)
    }

    "respond with RuntimeException on page load in edit mode when matched property is not found" in {
      val applicationDetails = iht.testhelpers.CommonBuilder.buildApplicationDetails.
        copy(propertyList = List(CommonBuilder.property.copy(id = Some("1"))))

      setUpTests(Some(applicationDetails))

      intercept[RuntimeException] {
        await(propertyAddressController.onEditPageLoad("2")(createFakeRequest()))
      }
    }

    "redirect to PropertyDetails overview page on submit" in {
      val applicationDetails = iht.testhelpers.CommonBuilder.buildApplicationDetails.
        copy(propertyList = List())

      val formFill = propertyAddressForm.fill(CommonBuilder.property)
      implicit val request = createFakeRequest().withFormUrlEncodedBody(formFill.data.toSeq: _*).withMethod("POST")

      setUpTests(Some(applicationDetails))

      val result = propertyAddressController.onSubmit()(request)
      status(result) must be (SEE_OTHER)
      redirectLocation(result) must be (Some(CommonHelper.addFragmentIdentifierToUrl(routes.PropertyDetailsOverviewController.onEditPageLoad("1").url, TestHelper.AssetsPropertiesPropertyAddressID)))
    }

    "redirect to PropertyDetails overview page on submit in edit mode" in {
      val propertyId = "1"

      val applicationDetails = iht.testhelpers.CommonBuilder.buildApplicationDetails.
        copy(propertyList = List(CommonBuilder.buildProperty.copy(id = Some(propertyId),
        address = CommonBuilder.property.address,
        value = Some(1234))))

      val formFill = propertyAddressForm.fill(CommonBuilder.property)
      implicit val request = createFakeRequest().withFormUrlEncodedBody(formFill.data.toSeq: _*).withMethod("POST")

      setUpTests(Some(applicationDetails))

      val result = propertyAddressController.onEditSubmit(propertyId)(request)
      status(result) must be (SEE_OTHER)
      redirectLocation(result) must be (Some(CommonHelper.addFragmentIdentifierToUrl(routes.PropertyDetailsOverviewController.onEditPageLoad(propertyId).url, TestHelper.AssetsPropertiesPropertyAddressID)))
    }

    "respond with BAD_REQUEST on submit when request is malformed" in {
      val applicationDetails = iht.testhelpers.CommonBuilder.buildApplicationDetails.
        copy(propertyList = List())

      val formFill = propertyAddressForm.fill(CommonBuilder.property.copy(address = None))
      implicit val request = createFakeRequest().withFormUrlEncodedBody(formFill.data.toSeq: _*).withMethod("POST")

      setUpTests(Some(applicationDetails))

      val result = propertyAddressController.onSubmit()(request)
      status(result) must be (BAD_REQUEST)
    }
  }
}


text:
<?php
namespace Scalr\Upgrade\Updates;

use Scalr\Upgrade\SequenceInterface;
use Scalr\Upgrade\AbstractUpdate;
use Scalr\Acl\Resource\Definition;
use Scalr\Acl\Acl;

class Update20140314081808 extends AbstractUpdate implements SequenceInterface
{
    protected $uuid = '684a8de5-af1c-41b4-8629-986f504fc715';

    protected $depends = array();

    protected $description = 'Creating Webhooks (environment level) ACL resource ';

    protected $ignoreChanges = true;

    /**
     * {@inheritdoc}
     * @see Scalr\Upgrade.SequenceInterface::getNumberStages()
     */
    public function getNumberStages()
    {
        return 1;
    }

    protected function isApplied1($stage)
    {
        return defined('Scalr\\Acl\\Acl::RESOURCE_ENVADMINISTRATION_WEBHOOKS') && $this->db->GetOne("
            SELECT `granted` FROM `acl_role_resources`
            WHERE `resource_id` = ? AND `role_id` = ?
            LIMIT 1
        ", array(
            Acl::RESOURCE_ENVADMINISTRATION_WEBHOOKS,
            Acl::ROLE_ID_FULL_ACCESS,
        )) == 1;
    }

    protected function validateBefore1($stage)
    {
        return defined('Scalr\\Acl\\Acl::RESOURCE_ENVADMINISTRATION_WEBHOOKS') &&
               Definition::has(Acl::RESOURCE_ENVADMINISTRATION_WEBHOOKS);
    }

    protected function run1($stage)
    {
        $this->console->out("Adding Webhooks ACL resource");
        $this->db->Execute("
            INSERT IGNORE `acl_role_resources` (`role_id`, `resource_id`, `granted`)
            VALUES (?, ?, 1)
        ", array(
            Acl::ROLE_ID_FULL_ACCESS,
            Acl::RESOURCE_ENVADMINISTRATION_WEBHOOKS
        ));
    }
}


text:
import numpy as np
import sympy

from laika.constants import EARTH_ROTATION_RATE, SPEED_OF_LIGHT
from laika.helpers import ConstellationId

def calc_pos_fix_gauss_newton(measurements, posfix_functions, x0=None, signal='C1C', min_measurements=6):
  '''
  Calculates gps fix using gauss newton method
  To solve the problem a minimal of 4 measurements are required.
    If Glonass is included 5 are required to solve for the additional free variable.
  returns:
  0 -> list with positions
  '''
  if x0 is None:
    x0 = [0, 0, 0, 0, 0]
  n = len(measurements)
  if n < min_measurements:
    return [], []

  Fx_pos = pr_residual(measurements, posfix_functions, signal=signal)
  x = gauss_newton(Fx_pos, x0)
  residual, _ = Fx_pos(x, weight=1.0)
  return x.tolist(), residual.tolist()

def pr_residual(measurements, posfix_functions, signal='C1C'):
  def Fx_pos(inp, weight=None):
    vals, gradients = [], []

    for meas in measurements:
      pr = meas.observables[signal]
      pr += meas.sat_clock_err * SPEED_OF_LIGHT

      w = (1 / meas.observables_std[signal]) if weight is None else weight

      val, *gradient = posfix_functions[meas.constellation_id](*inp, pr, *meas.sat_pos, w)
      vals.append(val)
      gradients.append(gradient)
    return np.asarray(vals), np.asarray(gradients)

  return Fx_pos

def gauss_newton(fun, b, xtol=1e-8, max_n=25):
  for _ in range(max_n):
    # Compute function and jacobian on current estimate
    r, J = fun(b)

    # Update estimate
    delta = np.linalg.pinv(J) @ r
    b -= delta

    # Check step size for stopping condition
    if np.linalg.norm(delta) < xtol:
      break
  return b

def get_posfix_sympy_fun(constellation):
  # Unknowns
  x, y, z = sympy.Symbol('x'), sympy.Symbol('y'), sympy.Symbol('z')
  bc = sympy.Symbol('bc')
  bg = sympy.Symbol('bg')
  var = [x, y, z, bc, bg]

  # Knowns
  pr = sympy.Symbol('pr')
  sat_x, sat_y, sat_z = sympy.Symbol('sat_x'), sympy.Symbol('sat_y'), sympy.Symbol('sat_z')
  weight = sympy.Symbol('weight')

  theta = EARTH_ROTATION_RATE * (pr - bc) / SPEED_OF_LIGHT
  val = sympy.sqrt(
    (sat_x * sympy.cos(theta) + sat_y * sympy.sin(theta) - x) ** 2 +
    (sat_y * sympy.cos(theta) - sat_x * sympy.sin(theta) - y) ** 2 +
    (sat_z - z) ** 2
  )

  if constellation == ConstellationId.GLONASS:
    res = weight * (val - (pr - bc - bg))
  elif constellation == ConstellationId.GPS:
    res = weight * (val - (pr - bc))
  else:
    raise NotImplementedError(f"Constellation {constellation} not supported")

  res = [res] + [sympy.diff(res, v) for v in var]

  return sympy.lambdify([x, y, z, bc, bg, pr, sat_x, sat_y, sat_z, weight], res, modules=["numpy"])


text:
"use strict";

const url = require('url');
const _request = require('request');
const BufferHelper = require('bufferhelper');
const packageInfo = require('../package.json');

/**
 * 发送请求
 * @param opt {Object}
 * @param retryTimes internal use
 * @return {Promise}
 */
export function request(opt, retryTimes = 0) {
  return new Promise((resolve, reject) => {
    const url = encodeURI(opt.url.replace(/%/g, '(precent)')).replace(/\(precent\)/g, '%');
    const ignoreBody = opt.method == 'HEAD' && opt.useFakeHead;
    const newOpt = Object.assign({}, opt, { url });

    if (ignoreBody) {
      newOpt.method = 'GET';
    }

    const buffer = new BufferHelper();
    let response;
    const req = _request(newOpt)
      .on('response', res => {
        response = res;
        if (ignoreBody) {
          req.abort();
          resolve(response);
        }
      })
      .on('error', reject);

    if (!ignoreBody) {
      req
        .on('data', data => {
          buffer.concat(data);
        })
        .on('end', () => {
          response.body = buffer.toBuffer().toString();
          resolve(response);
        });
    }
  }).catch(error => {
    if (['ECONNRESET', 'ESOCKETTIMEDOUT'].includes(error.code) &&
      retryTimes < opt.retryTimes) {
      return request(opt, retryTimes + 1);
    } else {
      throw error;
    }
  });
}

/**
 * 获取链接内容
 * @param link {String}
 * @param opt {Object}
 * @return {{
 *   host: String,
 *   href: String,
 *   body: String,
 *   headers: String[],
 *   statusCode: int,
 *   redirect: String[]
 * }}
 * @throws Error
 */
export async function fetch(link, opt = {}) {
  opt = Object.assign({
    timeout: 10000,
    retryTimes: 5,
    redirectTimes: 10,
    followRedirect: true,
    requestMethod: 'HEAD',
    useFakeHead: true,
    requestAcceptEncoding: 'gzip, deflate, sdch',
    requestAcceptLanguage: 'zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4',
    requestAccept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
    requestCacheControl: 'no-cache',
    requestConnection: 'keep-alive',
    requestUserAgent: `Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36 Huatuo/${packageInfo.version}`,
  }, opt);

  const requestOpt = {
    url: link,
    retryTimes: opt.retryTimes,
    method: opt.requestMethod.toUpperCase(),
    useFakeHead: opt.useFakeHead,
    timeout: opt.timeout,
    followRedirect: false,
    proxy: opt.proxy || process.env.http_proxy || process.env.HTTP_PROXY,
    gzip: opt.requestAcceptEncoding.toLowerCase().includes('gzip'),
    headers: {
      'Accept-Encoding': opt.requestAcceptEncoding,
      'Accept-Language': opt.requestAcceptLanguage,
      'User-Agent': opt.requestUserAgent,
      'Accept': opt.requestAccept,
      'Cache-Control': opt.requestCacheControl,
      'Connection': opt.requestConnection
    }
  };

  if (opt.requestReferer) {
    requestOpt.headers.Referer = opt.requestReferer;
  }

  if (opt.redirectTimes <= 0) {
    throw new Error('Redirect requests as the maximum number of redirects allowed.');
  }

  let response = await request({ ...requestOpt });

  if (response.statusCode == 405 && !opt.useFakeHead) {
    response = await request({ ...requestOpt, method: 'GET' });
  }

  if (opt.followRedirect && [301, 302, 307].includes(response.statusCode)) {
    const location = url.resolve(link, response.headers.location);
    return await fetch(location, Object.assign(opt, { redirectTimes: opt.redirectTimes - 1 }))
      .then(result => {
        result.href = response.request.href;
        result.redirect.unshift([response.statusCode, location]);
        return result;
      });
  }

  return {
    host: response.request.host,
    href: response.request.href,
    body: response.body,
    headers: response.headers,
    statusCode: response.statusCode,
    redirect: []
  };
}

/**
 * 链接标准化
 * @param link {String}
 * @param [baseUrl = null] {String}
 * @param [removeHash = null] {Boolean}
 * @return {String}
 */
export function normalizeLink(link, baseUrl = null, removeHash = true) {
  if (baseUrl === null) {
    baseUrl = link;
  }

  const info = url.parse(link);
  if (info.protocol && !['http:', 'https:'].includes(info.protocol)) {
    return baseUrl;
  }

  link = url.resolve(baseUrl, link);
  if (removeHash && link.includes('#')) {
    link = link.substr(0, link.indexOf('#'));
  }

  return link;
}

/**
 * 获取base.href
 * @param content {String}
 * @return {String|null}
 */
export function fetchBaseUrl(content) {
  try {
    const [, tag] = content.match(/<base ([^>]*?)>/);
    const [,, href] = tag.match(/href=(['"]?)([^'"]+)\1/);
    return href;
  } catch(e) {
    return null;
  }
}

/**
 * 提纯HTML,多虑多余标签
 * @param content {String}
 * @return {String}
 */
export function pureHTML(content) {
  content = content.replace(/<script[\s\S]+?<\/script>/g, '');
  return content;
}

/**
 * 从HTML中提取链接
 * @param content {String}
 * @param baseUrl {String}
 * @param regex {RegExp}
 * @param groupId {int}
 * @return {String[]}
 */
export function parseHTML(content, baseUrl, regex, groupId) {
  const links = new Set();
  let match;

  while(match = regex.exec(content)) {
    links.add(normalizeLink(match[groupId], baseUrl));
  }

  links.delete(normalizeLink(baseUrl));

  return [...links];
}

/**
 * 批量检查链接
 * @param links {String[]}
 * @param opt {Object}
 * @return {Promise.<{success: Map, failed: Map}>}
 */
export async function checkLinks(links, opt = {}) {
  let index = 0;

  if (!Array.isArray(links)) {
    throw new Error('the first argument should be a array');
  }

  const result = {
    success: new Map(),
    error: new Map()
  };

  opt = Object.assign({
    thread: 10,
    validators: []
  }, opt);

  const connect = () => {
    const link = links[index++];

    return link === undefined ?
      Promise.resolve() :
      fetch(link, opt)
        .then(response => {
          let success = false;
          for (let i=0; i<opt.validators.length && !success; i++) {
            opt.validators[i](
              response,
              () => success = true,
              error => { throw new Error(error) }
            );
          }
          if (!success && response.statusCode !== 200) {
            throw new Error('Http status code ' + response.statusCode);
          }
          return response;
        })
        .then(response => {
          const redirect = response.redirect.map(r => `${r[0]}=>${r[1]}`);
          result.success.set(link, [...redirect, response.statusCode].join('|'));
        }, error => {
          result.error.set(link, new Error(error.message));
        })
        .then(connect);
  };

  const connects = new Array(opt.thread).fill(0).map(_ => connect());

  return Promise.all(connects).then(() => result);
}

/**
 * 校验网页链接
 * @param url {String}
 * @param modules {String[]|Object[]|Array[]}
 * @param [opt = {}] {Object}
 * @return {Map}
 */
export async function check(url, modules, opt = {}) {

  // 兼容单个配置的情况
  if (typeof modules == 'object' && modules != null && modules.name){
    modules = [modules];
  } else if (!Array.isArray(modules) || modules.length == 0) {
    throw new Error('Module config is incorrect');
  } else if (modules.length == 2 &&
    typeof modules[0] == 'string' &&
    typeof modules[1] == 'object') {
    modules = [modules];
  }

  // 配置标准化
  const options = new Map(modules.map(item => {
    let name, config;

    if (Array.isArray(item) && item.length == 2) {// [ module_name, config ]
      [name, config] = item;
    } else if (typeof item == 'object' && item !== null && item.name) {// { name: module_name, ...other }
      [name, config] = [item.name, item];
    } else {
      throw new Error('Module is incorrect');
    }

    if (!name || typeof name !== 'string') {
      throw new Error('Module name is incorrect');
    }

    if (typeof config != 'object' || config === null) {
      throw new Error('You must set a config Object.');
    } else if (config.parser) {// 优先取parser
      if (typeof config.parser != 'function') {
        throw new Error('Parser must be a function!');
      }
      return [name, config];
    } else if (config.regex) {// 取不到parser则取regex
      let regex, groupId;
      if (config.regex instanceof RegExp) {
        regex = config.regex;
        groupId = 0;
      } else if (Array.isArray(config.regex)) {
        if (!config.regex[0] instanceof RegExp) {
          throw new Error('Regular expression is incorrect!');
        } else if (!Number.isInteger(config.regex[1])) {
          throw new Error('Regular expression group id is incorrect!');
        }
        [regex, groupId] = config.regex;
      } else {
        throw new Error('Regular expression is incorrect!');
      }

      config = Object.assign({
        parser: (html, baseUrl) => parseHTML(html, baseUrl, regex, groupId)
      }, opt, config);

      return [name, config];
    } else {
      throw new Error('Module argument is incorrect.');
    }
  }));

  // 获取页面
  const response = await fetch(url, { requestMethod: 'GET' });

  if (!response.body) {
    throw new Error('Page body is empty, Status Code ' + response.statusCode);
  }

  const html = pureHTML(response.body);
  const baseUrl = fetchBaseUrl(html) || url;

  const promises = Array.from(options)
    .map(([name, config]) => {
    return checkLinks(config.parser(html, baseUrl), config).then(result => [name ,result])
  });

  return await Promise.all(promises).then(result => new Map(result));
}


text:
"""
PyMF K-means clustering (unary-convex matrix factorization).
Copyright (C) Christian Thurau, 2010. GNU General Public License (GPL).
"""

import numpy as np

import dist
from nmf import NMF

__all__ = ["Cmeans"]

class Cmeans(NMF):
    """
    cmeans(data, num_bases=4)

    Fuzzy c-means soft clustering. Factorize a data matrix into two matrices s.t.
    F = | data - W*H | is minimal. H is restricted to convexity (columns
    sum to 1) W    is simply the weighted mean over the corresponding samples in
    data. Note that the objective function is based on distances (?), hence the
    Frobenius norm is probably not a good quality measure.

    Parameters
    ----------
    data : array_like, shape (_data_dimension, _num_samples)
        the input data
    num_bases: int, optional
        Number of bases to compute (column rank of W and row rank of H).
        4 (default)

    Attributes
    ----------
    W : "data_dimension x num_bases" matrix of basis vectors
    H : "num bases x num_samples" matrix of coefficients
    ferr : frobenius norm (after calling .factorize())

    Example
    -------
    Applying C-means to some rather stupid data set:

    >>> import numpy as np
    >>> from cmeans import Cmeans
    >>> data = np.array([[1.0, 0.0, 2.0], [0.0, 1.0, 1.0]])
    >>> cmeans_mdl = Cmeans(data, num_bases=2, niter=10)
    >>> cmeans_mdl.initialization()
    >>> cmeans_mdl.factorize()

    The basis vectors are now stored in cmeans_mdl.W, the coefficients in cmeans_mdl.H.
    To compute coefficients for an existing set of basis vectors simply    copy W
    to cmeans_mdl.W, and set compute_w to False:

    >>> data = np.array([[1.5], [1.2]])
    >>> W = [[1.0, 0.0], [0.0, 1.0]]
    >>> cmeans_mdl = Cmeans(data, num_bases=2)
    >>> cmeans_mdl.initialization()
    >>> cmeans_mdl.W = W
    >>> cmeans_mdl.factorize(compute_w=False, niter=50)

    The result is a set of coefficients kmeans_mdl.H, s.t. data = W * kmeans_mdl.H.
    """

    def update_h(self):
        # assign samples to best matching centres ...
        m = 1.75
        tmp_dist = dist.pdist(self.W, self.data, metric='l2') + self._EPS
        self.H[:,:] = 0.0

        for i in range(self._num_bases):
            for k in range(self._num_bases):
                self.H[i,:] += (tmp_dist[i,:]/tmp_dist[k,:])**(2.0/(m-1))

        self.H = np.where(self.H>0, 1.0/self.H, 0)

    def update_w(self):
        for i in range(self._num_bases):
            tmp = (self.H[i:i+1,:] * self.data).sum(axis=1)
            self.W[:,i] = tmp/(self.H[i,:].sum() + self._EPS)


text:
/*  Businesses and individuals that for commercial or other reasons cannot
    comply with the terms of the GPLv2 license may obtain a commercial license
    before incorporating Reliance Edge into proprietary software for
    distribution in any form.  Visit http://www.datalight.com/reliance-edge for
    more information.
*/
/** @file
    @brief Defines basic types used by Reliance Edge.

    The following types *must* be defined by this header, either directly (using
    typedef) or indirectly (by including other headers, such as the C99 headers
    stdint.h and stdbool.h):

    - bool: Boolean type, capable of storing true (1) or false (0)
    - uint8_t: Unsigned 8-bit integer
    - int8_t: Signed 8-bit integer
    - uint16_t: Unsigned 16-bit integer
    - int16_t: Signed 16-bit integer
    - uint32_t: Unsigned 32-bit integer
    - int32_t: Signed 32-bit integer
    - uint64_t: Unsigned 64-bit integer
    - int64_t: Signed 64-bit integer
    - uintptr_t: Unsigned integer capable of storing a pointer, preferably the
      same size as pointers themselves.

    These types deliberately use the same names as the standard C99 types, so
    that if the C99 headers stdint.h and stdbool.h are available, they may be
    included here.

    If the user application defines similar types, those may be reused.  For
    example, suppose there is an application header apptypes.h which defines
    types with a similar purpose but different names.  That header could be
    reused to define the types Reliance Edge needs:

    ~~~{.c}
    #include <apptypes.h>

    typedef BOOL bool;
    typedef BYTE uint8_t;
    typedef INT8 int8_t;
    // And so on...
    ~~~

    If there are neither C99 headers nor suitable types in application headers,
    this header should be populated with typedefs that define the required types
    in terms of the standard C types.  This requires knowledge of the size of
    the C types on the target hardware (e.g., how big is an "int" or a pointer).
    Below is an example which assumes the target has 8-bit chars, 16-bit shorts,
    32-bit ints, 32-bit pointers, and 64-bit long longs:

    ~~~{.c}
    typedef int bool;
    typedef unsigned char uint8_t;
    typedef signed char int8_t;
    typedef unsigned short uint16_t;
    typedef short int16_t;
    typedef unsigned int uint32_t;
    typedef int int32_t;
    typedef unsigned long long uint64_t;
    typedef long long int64_t;
    typedef uint32_t uintptr_t;
    ~~~
*/
#ifndef REDTYPES_H
#define REDTYPES_H

typedef int bool;                   /**< @brief Boolean type; either true or false. */

typedef unsigned __int8 uint8_t;    /**< @brief Unsigned 8-bit integer. */
typedef          __int8 int8_t;     /**< @brief Signed 8-bit integer. */

typedef unsigned __int16 uint16_t;  /**< @brief Unsigned 16-bit integer. */
typedef          __int16 int16_t;   /**< @brief Signed 16-bit integer. */

typedef unsigned __int32 uint32_t;  /**< @brief Unsigned 32-bit integer. */
typedef          __int32 int32_t;   /**< @brief Signed 32-bit integer. */

typedef unsigned __int64 uint64_t;  /**< @brief Unsigned 64-bit integer. */
typedef          __int64 int64_t;   /**< @brief Signed 64-bit integer. */

/** @brief Unsigned integer capable of storing a pointer.
*/
#ifdef _WIN64
typedef uint64_t uintptr_t;
#else
typedef uint32_t uintptr_t;
#endif

#endif


text:
title:  Un gând de încheiere
date:  31/05/2019
---

Mulţi suferă ca urmare a dependenţelor: şi-au pierdut banii, locul de muncă, sănătatea şi libertatea. Dar Isus a venit să ne aducă eliberarea de păcate şi de vicii şi, "dacă Fiul vă face slobozi, veţi fi cu adevărat slobozi" (Ioan 8:36). El a promis că va fi întotdeauna cu noi (Matei 28:20; Isaia 43:2), aşa că nu trebuie să purtăm singuri războiul acesta. Lupta este a Domnului (1 Samuel 17:47) şi El ne-a promis biruinţa (1 Petru 1:3-9). Astăzi putem să pornim pe drumul victoriei asupra oricărei dependenţe şi să primim libertatea pe care o dorim şi noi, şi Dumnezeu. Desigur, vom avea de luptat şi se va putea ca, uneori, chiar să cădem. Dar, atâta timp cât nu-L părăsim pe Domnul, nici El nu ne va părăsi. Şi nu este nimic greşit în a căuta ajutor profesionist. Aşa cum poate folosi un specialist în medicină ca să ne ajute în problemele de sănătate, Domnul poate folosi şi un consilier profesionist ca să ne ajute în cazul unei dependenţe.

"Când dificultăţile şi încercările ne înconjoară, trebuie să fugim la Dumnezeu şi să aşteptăm cu încredere ajutorul Aceluia care este puternic pentru a mântui şi a elibera. Dacă vrem să primim binecuvântarea lui Dumnezeu, trebuie să o cerem. Rugăciunea este o datorie şi o necesitate, dar oare nu neglijăm noi lauda? … Trebuie să cultivăm recunoştinţa. Ar trebui să contemplăm adesea bunătăţile lui Dumnezeu, să ne amintim de ele, să lăudăm şi să slăvim Numele Său sfânt, chiar şi atunci când trecem prin necazuri şi suferinţe." – Ellen G. White, Solii alese, cartea 2, p. 268

**Biblia şi cartea istoria mântuirii – studiu la rând**:

**Biblia: Judecătorii 7-13**

`1. Care sunt cele două cetăţi care au refuzat să le dea pâine lui Ghedeon şi oştenilor lui?`

`2. Câte sute de ani trecuseră de când se aşezaseră fiii lui Israel la Hesbon şi în Galaad?`

`3. Cine pe cine omora după criteriul pronunţării unui cuvânt?`

`4. Ce a spus îngerul Domnului referitor la Numele Său?`

**Istoria mântuirii, capitolul 66**

`5. Ce vor face cei nelegiuiţi, mânaţi de o furie ca a (cu furia) demonilor?`


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>RabbitPHP.org .::. PHP Rapid Web Application Development Framework - MVC, ORM, ezpdo, Smarty Templating, PHP On Rails</title>
    <link rel="stylesheet" type="text/css" href="/styles/utility.css" />
    <link rel="stylesheet" type="text/css" href="/styles/styles.css" />

A Rapid PHP Web Development Framework

User Guide

      				Installation

      				Quick Start

      				Controllers

      				Domain Objects

      				View

      				Data Validation

      				AJAX

      				Plugins

      				Mailing

      				Internationalization

Downloads

      				Latest Release

      	  			Nightly Build

      	  			Past Releases

Developers

      				Todo List

      				Subversion

      				PHPDocs

				<?php echo $view; ?>

<div class="clear"

Rabbitphp.org

			A Rapid PHP Web Application Development Framework

			license | todo | site map


text:
/**
 * @module Image
 * @submodule Image
 * @requires core
 * @requires constants
 * @requires filters
 */
define(function (require) {

  /**
   * This module defines the p5.Image class and P5 methods for
   * drawing images to the main display canvas.
   */

  'use strict';

  var p5 = require('core');
  var Filters = require('filters');

  /*
   * Class methods
   */

  /**
   * Creates a new p5.Image. A p5.Image is a canvas backed representation of an
   * image. p5 can display .gif, .jpg and .png images. Images may be displayed
   * in 2D and 3D space. Before an image is used, it must be loaded with the
   * loadImage() function. The p5.Image class contains fields for the width and
   * height of the image, as well as an array called pixels[] that contains the
   * values for every pixel in the image. The methods described below allow
   * easy access to the image's pixels and alpha channel and simplify the
   * process of compositing.
   *
   * Before using the pixels[] array, be sure to use the loadPixels() method on
   * the image to make sure that the pixel data is properly loaded.
   *
   * @class p5.Image
   * @constructor
   * @param {Number} width
   * @param {Number} height
   * @param {Object} pInst An instance of a p5 sketch.
   */
  p5.Image = function(width, height){
    /**
     * Image width.
     * @property width
     */
    this.width = width;
    /**
     * Image height.
     * @property height
     */
    this.height = height;
    this.canvas = document.createElement('canvas');
    this.canvas.width = this.width;
    this.canvas.height = this.height;
    this.drawingContext = this.canvas.getContext('2d');
    /**
     * Array containing the color of every pixel in the image.
     * These values are numbers. This array is the size of the display window
     * x 4, representing the R, G, B, A values in order for each pixel, moving
     * from left to right across each row, then down each column. For example,
     * if the image is 100x100 pixels, there will be 40000. The first four
     * values (indices 0-3) in the array will be the R, G, B, A values of the
     * pixel at  (0, 0). The second four values (indices 4-7) will contain the
     * R, G, B, A values of the pixel at (1, 0). More generally, to set values
     * for a pixel at (x, y):

     * pixels[y*width+x] = r;

     * pixels[y*width+x+1] = g;

     * pixels[y*width+x+2] = b;

     * pixels[y*width+x+3] = a;
     *

     * Before accessing this array, the data must loaded with the loadPixels()
     * function. After the array data has been modified, the updatePixels()
     * function must be run to update the changes.
     * @property pixels[]
     * @example
     *

     *
     * img = createImage(66, 66);
     * img.loadPixels();
     * for (i = 0; i < img.width; i++) {
     *   for (j = 0; j < img.height; j++) {
     *     img.set(i, j, color(0, 90, 102));
     *   }
     * }
     * img.updatePixels();
     * image(img, 17, 17);
     *
     *

     *

     *
     * var pink = color(255, 102, 204);
     * img = createImage(66, 66);
     * img.loadPixels();
     * for (var i = 0; i < 4*(width*height/2); i+=4) {
     *   img.pixels[i] = red(pink);
     *   img.pixels[i+1] = green(pink);
     *   img.pixels[i+2] = blue(pink);
     *   img.pixels[i+3] = alpha(pink);
     * }
     * img.updatePixels();
     * image(img, 17, 17);
     *
     *

     */
    this.pixels = [];
  };

  /**
   * Helper fxn for sharing pixel methods
   *
   */
  p5.Image.prototype._setProperty = function (prop, value) {
    this[prop] = value;
  };

  /**
   * Loads the pixels data for this image into the [pixels] attribute.
   *
   * @method loadPixels
   */
  p5.Image.prototype.loadPixels = function(){
    p5.prototype.loadPixels.call(this);
  };

  /**
   * Updates the backing canvas for this image with the contents of
   * the [pixels] array.
   *
   * @method updatePixels
   * @param {Integer|undefined} x x-offset of the target update area for the
   *                              underlying canvas
   * @param {Integer|undefined} y y-offset of the target update area for the
   *                              underlying canvas
   * @param {Integer|undefined} w height of the target update area for the
   *                              underlying canvas
   * @param {Integer|undefined} h height of the target update area for the
   *                              underlying canvas
   */
  p5.Image.prototype.updatePixels = function(x, y, w, h){
    p5.prototype.updatePixels.call(this, x, y, w, h);
  };

  /**
   * Get a region of pixels from an image.
   *
   * If no params are passed, those whole image is returned,
   * if x and y are the only params passed a single pixel is extracted
   * if all params are passed a rectangle region is extracted and a p5.Image
   * is returned.
   *
   * Returns undefined if the region is outside the bounds of the image
   *
   * @method get
   * @param  {Number}               [x] x-coordinate of the pixel
   * @param  {Number}               [y] y-coordinate of the pixel
   * @param  {Number}               [w] width
   * @param  {Number}               [h] height
   * @return {Array/Color | p5.Image}     color of pixel at x,y in array format
   *                                    [R, G, B, A] or p5.Image
   */
  p5.Image.prototype.get = function(x, y, w, h){
    return p5.prototype.get.call(this, x, y, w, h);
  };

  /**
   * Set the color of a single pixel or write an image into
   * this p5.Image.
   *
   * Note that for a large number of pixels this will
   * be slower than directly manipulating the pixels array
   * and then calling updatePixels().
   *
   * @method set
   * @param {Number}              x x-coordinate of the pixel
   * @param {Number}              y y-coordinate of the pixel
   * @param {Number|Array|Object}   a grayscale value | pixel array |
   *                                a p5.Color | image to copy
   * @example
   *

   *
   * img = createImage(66, 66);
   * img.loadPixels();
   * for (i = 0; i < img.width; i++) {
   *   for (j = 0; j < img.height; j++) {
   *     img.set(i, j, color(0, 90, 102, i % img.width * 2));
   *   }
   * }
   * img.updatePixels();
   * image(img, 17, 17);
   * image(img, 34, 34);
   *
   *

   */
  p5.Image.prototype.set = function(x, y, imgOrCol){
    p5.prototype.set.call(this, x, y, imgOrCol);
  };

  /**
   * Resize the image to a new width and height. To make the image scale
   * proportionally, use 0 as the value for the wide or high parameter.
   * For instance, to make the width of an image 150 pixels, and change
   * the height using the same proportion, use resize(150, 0).
   *
   * @method resize
   * @param {Number} width the resized image width
   * @param {Number} height the resized image height
   * @example
   *

   * var img;
   *
   * function setup() {
   *   img = loadImage("assets/rockies.jpg");
   * }

   * function draw() {
   *   image(img, 0, 0);
   * }
   *
   * function mousePressed() {
   *   img.resize(50, 100);
   * }
   *

   */
  p5.Image.prototype.resize = function(width, height){

    // Copy contents to a temporary canvas, resize the original
    // and then copy back.
    //
    // There is a faster approach that involves just one copy and swapping the
    // this.canvas reference. We could switch to that approach if (as i think
    // is the case) there an expectation that the user would not hold a
    // reference to the backing canvas of a p5.Image. But since we do not
    // enforce that at the moment, I am leaving in the slower, but safer
    // implementation.
    width = width || this.canvas.width;
    height = height || this.canvas.height;

    var tempCanvas = document.createElement('canvas');
    tempCanvas.width = width;
    tempCanvas.height = height;
    tempCanvas.getContext('2d').drawImage(this.canvas,
      0, 0, this.canvas.width, this.canvas.height,
      0, 0, tempCanvas.width, tempCanvas.height
    );

    // Resize the original canvas, which will clear its contents
    this.canvas.width = this.width = width;
    this.canvas.height = this.height = height;

    //Copy the image back

    this.drawingContext.drawImage(tempCanvas,
      0, 0, width, height,
      0, 0, width, height
    );

    if(this.pixels.length > 0){
      this.loadPixels();
    }
  };

  /**
   * Copies a region of pixels from one image to another. If no
   * srcImage is specified this is used as the source. If the source
   * and destination regions aren't the same size, it will
   * automatically resize source pixels to fit the specified
   * target region.
   *
   * @method copy
   * @param  {p5.Image|undefined} srcImage source image
   * @param  {Integer} sx X coordinate of the source's upper left corner
   * @param  {Integer} sy Y coordinate of the source's upper left corner
   * @param  {Integer} sw source image width
   * @param  {Integer} sh source image height
   * @param  {Integer} dx X coordinate of the destination's upper left corner
   * @param  {Integer} dy Y coordinate of the destination's upper left corner
   * @param  {Integer} dw destination image width
   * @param  {Integer} dh destination image height
   */
  p5.Image.prototype.copy = function() {
    p5.prototype.copy.apply(this, arguments);
  };

  /**
   * Masks part of an image from displaying by loading another
   * image and using it's alpha channel as an alpha channel for
   * this image.
   *
   * @method mask
   * @param {p5.Image|undefined} srcImage source image
   *
   * TODO: - Accept an array of alpha values.
   *       - Use other channels of an image. p5 uses the
   *       blue channel (which feels kind of arbitrary). Note: at the
   *       moment this method does not match native processings original
   *       functionality exactly.
   *
   * http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/
   *
   */
  p5.Image.prototype.mask = function(p5Image) {
    if(p5Image === undefined){
      p5Image = this;
    }
    var currBlend = this.drawingContext.globalCompositeOperation;

    var scaleFactor = 1;
    if (p5Image instanceof p5.Graphics) {
      scaleFactor = p5Image._pInst._pixelDensity;
    }

    var copyArgs = [
      p5Image,
      0,
      0,
      scaleFactor*p5Image.width,
      scaleFactor*p5Image.height,
      0,
      0,
      this.width,
      this.height
    ];

    this.drawingContext.globalCompositeOperation = 'destination-in';
    this.copy.apply(this, copyArgs);
    this.drawingContext.globalCompositeOperation = currBlend;
  };

  /**
   * Applies an image filter to a p5.Image
   *
   * @method filter
   * @param {String} operation one of threshold, gray, invert, posterize and
   *                           opaque see Filters.js for docs on each available
   *                           filter
   * @param {Number|undefined} value
   */
  p5.Image.prototype.filter = function(operation, value) {
    Filters.apply(this.canvas, Filters[operation.toLowerCase()], value);
  };

  /**
   * Copies a region of pixels from one image to another, using a specified
   * blend mode to do the operation.
   *
   * @method blend
   * @param  {p5.Image|undefined} srcImage source image
   * @param  {Integer} sx X coordinate of the source's upper left corner
   * @param  {Integer} sy Y coordinate of the source's upper left corner
   * @param  {Integer} sw source image width
   * @param  {Integer} sh source image height
   * @param  {Integer} dx X coordinate of the destination's upper left corner
   * @param  {Integer} dy Y coordinate of the destination's upper left corner
   * @param  {Integer} dw destination image width
   * @param  {Integer} dh destination image height
   * @param  {Integer} blendMode the blend mode
   *
   * Available blend modes are: normal | multiply | screen | overlay |
   *            darken | lighten | color-dodge | color-burn | hard-light |
   *            soft-light | difference | exclusion | hue | saturation |
   *            color | luminosity
   *
   *
   * http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/
   *
   */
  p5.Image.prototype.blend = function() {
    p5.prototype.blend.apply(this, arguments);
  };

  /**
   * Saves the image to a file and force the browser to download it.
   * Accepts two strings for filename and file extension
   * Supports png (default) and jpg.
   *
   * @method save
   * @param {String} filename give your file a name
   * @param  {String} extension 'png' or 'jpg'
   */
  p5.Image.prototype.save = function(filename, extension) {
    var mimeType;
    if (!extension) {
      extension = 'png';
      mimeType = 'image/png';
    }
    else {
      // en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support
      switch(extension.toLowerCase()){
      case 'png':
        mimeType = 'image/png';
        break;
      case 'jpeg':
        mimeType = 'image/jpeg';
        break;
      case 'jpg':
        mimeType = 'image/jpeg';
        break;
      default:
        mimeType = 'image/png';
        break;
      }
    }
    var downloadMime = 'image/octet-stream';
    var imageData = this.canvas.toDataURL(mimeType);
    imageData = imageData.replace(mimeType, downloadMime);

    //Make the browser download the file
    p5.prototype.downloadFile(imageData, filename, extension);
  };
  return p5.Image;
});


text:
@interface PodsDummy_Pods_FlickrSearchTests : NSObject
@end
@implementation PodsDummy_Pods_FlickrSearchTests
@end


text:
package org.apache.wicket.examples.signin;

import org.apache.wicket.PageParameters;
import org.apache.wicket.examples.WicketExamplePage;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.util.value.ValueMap;

/**
 * Simple example of a sign in page.
 *
 * @author Jonathan Locke
 */
public final class SignIn extends WicketExamplePage
{
	/**
	 * Constructor
	 */
	public SignIn()
	{
		this(null);
	}

	/**
	 * Constructor
	 *
	 * @param parameters
	 *            The page parameters
	 */
	public SignIn(final PageParameters parameters)
	{
		// Create feedback panel and add to page
		final FeedbackPanel feedback = new FeedbackPanel("feedback");

		add(feedback);

		// Add sign-in form to page, passing feedback panel as validation error
		// handler
		add(new SignInForm("signInForm"));
	}

	/**
	 * Sign in form
	 *
	 * @author Jonathan Locke
	 */
	public final class SignInForm extends Form
	{
		// El-cheapo model for form
		private final ValueMap properties = new ValueMap();

		/**
		 * Constructor
		 *
		 * @param id
		 *            id of the form component
		 */
		public SignInForm(final String id)
		{
			super(id);

			// Attach textfield components that edit properties map model
			add(new TextField<String>("username", new PropertyModel<String>(properties, "username")));
			add(new PasswordTextField("password", new PropertyModel<String>(properties, "password")));
		}

		/**
		 * @see org.apache.wicket.markup.html.form.Form#onSubmit()
		 */
		@Override
		public final void onSubmit()
		{
			// Get session info
			SignInSession session = (SignInSession)getSession();

			// Sign the user in
			if (session.authenticate(properties.getString("username"),
				properties.getString("password")))
			{
				if (!continueToOriginalDestination())
				{
					setResponsePage(getApplication().getHomePage());
				}
			}
			else
			{
				// Form method that will notify feedback panel
				// Try the component based localizer first. If not found try the
				// application localizer. Else use the default
				final String errmsg = getLocalizer().getString("loginError", this,
					"Unable to sign you in");
				error(errmsg);
			}
		}
	}
}


text:
namespace exec {

// Internal implementation detail -- do not call these.
void  protobuf_AddDesc_Coordination_2eproto();
void protobuf_AssignDesc_Coordination_2eproto();
void protobuf_ShutdownFile_Coordination_2eproto();

class DrillbitEndpoint;
class DrillServiceInstance;
class Roles;

enum DrillbitEndpoint_State {
  DrillbitEndpoint_State_STARTUP = 0,
  DrillbitEndpoint_State_ONLINE = 1,
  DrillbitEndpoint_State_QUIESCENT = 2,
  DrillbitEndpoint_State_OFFLINE = 3
};
bool DrillbitEndpoint_State_IsValid(int value);
const DrillbitEndpoint_State DrillbitEndpoint_State_State_MIN = DrillbitEndpoint_State_STARTUP;
const DrillbitEndpoint_State DrillbitEndpoint_State_State_MAX = DrillbitEndpoint_State_OFFLINE;
const int DrillbitEndpoint_State_State_ARRAYSIZE = DrillbitEndpoint_State_State_MAX + 1;

const ::google::protobuf::EnumDescriptor* DrillbitEndpoint_State_descriptor();
inline const ::std::string& DrillbitEndpoint_State_Name(DrillbitEndpoint_State value) {
  return ::google::protobuf::internal::NameOfEnum(
    DrillbitEndpoint_State_descriptor(), value);
}
inline bool DrillbitEndpoint_State_Parse(
    const ::std::string& name, DrillbitEndpoint_State* value) {
  return ::google::protobuf::internal::ParseNamedEnum<DrillbitEndpoint_State>(
    DrillbitEndpoint_State_descriptor(), name, value);
}
// ===================================================================

class DrillbitEndpoint : public ::google::protobuf::Message {
 public:
  DrillbitEndpoint();
  virtual ~DrillbitEndpoint();

  DrillbitEndpoint(const DrillbitEndpoint& from);

  inline DrillbitEndpoint& operator=(const DrillbitEndpoint& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const DrillbitEndpoint& default_instance();

  void Swap(DrillbitEndpoint* other);

  // implements Message ----------------------------------------------

  DrillbitEndpoint* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const DrillbitEndpoint& from);
  void MergeFrom(const DrillbitEndpoint& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:

  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  typedef DrillbitEndpoint_State State;
  static const State STARTUP = DrillbitEndpoint_State_STARTUP;
  static const State ONLINE = DrillbitEndpoint_State_ONLINE;
  static const State QUIESCENT = DrillbitEndpoint_State_QUIESCENT;
  static const State OFFLINE = DrillbitEndpoint_State_OFFLINE;
  static inline bool State_IsValid(int value) {
    return DrillbitEndpoint_State_IsValid(value);
  }
  static const State State_MIN =
    DrillbitEndpoint_State_State_MIN;
  static const State State_MAX =
    DrillbitEndpoint_State_State_MAX;
  static const int State_ARRAYSIZE =
    DrillbitEndpoint_State_State_ARRAYSIZE;
  static inline const ::google::protobuf::EnumDescriptor*
  State_descriptor() {
    return DrillbitEndpoint_State_descriptor();
  }
  static inline const ::std::string& State_Name(State value) {
    return DrillbitEndpoint_State_Name(value);
  }
  static inline bool State_Parse(const ::std::string& name,
      State* value) {
    return DrillbitEndpoint_State_Parse(name, value);
  }

  // accessors -------------------------------------------------------

  // optional string address = 1;
  inline bool has_address() const;
  inline void clear_address();
  static const int kAddressFieldNumber = 1;
  inline const ::std::string& address() const;
  inline void set_address(const ::std::string& value);
  inline void set_address(const char* value);
  inline void set_address(const char* value, size_t size);
  inline ::std::string* mutable_address();
  inline ::std::string* release_address();
  inline void set_allocated_address(::std::string* address);

  // optional int32 user_port = 2;
  inline bool has_user_port() const;
  inline void clear_user_port();
  static const int kUserPortFieldNumber = 2;
  inline ::google::protobuf::int32 user_port() const;
  inline void set_user_port(::google::protobuf::int32 value);

  // optional int32 control_port = 3;
  inline bool has_control_port() const;
  inline void clear_control_port();
  static const int kControlPortFieldNumber = 3;
  inline ::google::protobuf::int32 control_port() const;
  inline void set_control_port(::google::protobuf::int32 value);

  // optional int32 data_port = 4;
  inline bool has_data_port() const;
  inline void clear_data_port();
  static const int kDataPortFieldNumber = 4;
  inline ::google::protobuf::int32 data_port() const;
  inline void set_data_port(::google::protobuf::int32 value);

  // optional .exec.Roles roles = 5;
  inline bool has_roles() const;
  inline void clear_roles();
  static const int kRolesFieldNumber = 5;
  inline const ::exec::Roles& roles() const;
  inline ::exec::Roles* mutable_roles();
  inline ::exec::Roles* release_roles();
  inline void set_allocated_roles(::exec::Roles* roles);

  // optional string version = 6;
  inline bool has_version() const;
  inline void clear_version();
  static const int kVersionFieldNumber = 6;
  inline const ::std::string& version() const;
  inline void set_version(const ::std::string& value);
  inline void set_version(const char* value);
  inline void set_version(const char* value, size_t size);
  inline ::std::string* mutable_version();
  inline ::std::string* release_version();
  inline void set_allocated_version(::std::string* version);

  // optional .exec.DrillbitEndpoint.State state = 7;
  inline bool has_state() const;
  inline void clear_state();
  static const int kStateFieldNumber = 7;
  inline ::exec::DrillbitEndpoint_State state() const;
  inline void set_state(::exec::DrillbitEndpoint_State value);

  // optional int32 http_port = 8;
  inline bool has_http_port() const;
  inline void clear_http_port();
  static const int kHttpPortFieldNumber = 8;
  inline ::google::protobuf::int32 http_port() const;
  inline void set_http_port(::google::protobuf::int32 value);

  // @@protoc_insertion_point(class_scope:exec.DrillbitEndpoint)
 private:
  inline void set_has_address();
  inline void clear_has_address();
  inline void set_has_user_port();
  inline void clear_has_user_port();
  inline void set_has_control_port();
  inline void clear_has_control_port();
  inline void set_has_data_port();
  inline void clear_has_data_port();
  inline void set_has_roles();
  inline void clear_has_roles();
  inline void set_has_version();
  inline void clear_has_version();
  inline void set_has_state();
  inline void clear_has_state();
  inline void set_has_http_port();
  inline void clear_has_http_port();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::std::string* address_;
  ::google::protobuf::int32 user_port_;
  ::google::protobuf::int32 control_port_;
  ::exec::Roles* roles_;
  ::google::protobuf::int32 data_port_;
  int state_;
  ::std::string* version_;
  ::google::protobuf::int32 http_port_;

  mutable int _cached_size_;
  ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32];

  friend void  protobuf_AddDesc_Coordination_2eproto();
  friend void protobuf_AssignDesc_Coordination_2eproto();
  friend void protobuf_ShutdownFile_Coordination_2eproto();

  void InitAsDefaultInstance();
  static DrillbitEndpoint* default_instance_;
};
// -------------------------------------------------------------------

class DrillServiceInstance : public ::google::protobuf::Message {
 public:
  DrillServiceInstance();
  virtual ~DrillServiceInstance();

  DrillServiceInstance(const DrillServiceInstance& from);

  inline DrillServiceInstance& operator=(const DrillServiceInstance& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const DrillServiceInstance& default_instance();

  void Swap(DrillServiceInstance* other);

  // implements Message ----------------------------------------------

  DrillServiceInstance* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const DrillServiceInstance& from);
  void MergeFrom(const DrillServiceInstance& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:

  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional string id = 1;
  inline bool has_id() const;
  inline void clear_id();
  static const int kIdFieldNumber = 1;
  inline const ::std::string& id() const;
  inline void set_id(const ::std::string& value);
  inline void set_id(const char* value);
  inline void set_id(const char* value, size_t size);
  inline ::std::string* mutable_id();
  inline ::std::string* release_id();
  inline void set_allocated_id(::std::string* id);

  // optional int64 registrationTimeUTC = 2;
  inline bool has_registrationtimeutc() const;
  inline void clear_registrationtimeutc();
  static const int kRegistrationTimeUTCFieldNumber = 2;
  inline ::google::protobuf::int64 registrationtimeutc() const;
  inline void set_registrationtimeutc(::google::protobuf::int64 value);

  // optional .exec.DrillbitEndpoint endpoint = 3;
  inline bool has_endpoint() const;
  inline void clear_endpoint();
  static const int kEndpointFieldNumber = 3;
  inline const ::exec::DrillbitEndpoint& endpoint() const;
  inline ::exec::DrillbitEndpoint* mutable_endpoint();
  inline ::exec::DrillbitEndpoint* release_endpoint();
  inline void set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint);

  // @@protoc_insertion_point(class_scope:exec.DrillServiceInstance)
 private:
  inline void set_has_id();
  inline void clear_has_id();
  inline void set_has_registrationtimeutc();
  inline void clear_has_registrationtimeutc();
  inline void set_has_endpoint();
  inline void clear_has_endpoint();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  ::std::string* id_;
  ::google::protobuf::int64 registrationtimeutc_;
  ::exec::DrillbitEndpoint* endpoint_;

  mutable int _cached_size_;
  ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];

  friend void  protobuf_AddDesc_Coordination_2eproto();
  friend void protobuf_AssignDesc_Coordination_2eproto();
  friend void protobuf_ShutdownFile_Coordination_2eproto();

  void InitAsDefaultInstance();
  static DrillServiceInstance* default_instance_;
};
// -------------------------------------------------------------------

class Roles : public ::google::protobuf::Message {
 public:
  Roles();
  virtual ~Roles();

  Roles(const Roles& from);

  inline Roles& operator=(const Roles& from) {
    CopyFrom(from);
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
    return _unknown_fields_;
  }

  inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
    return &_unknown_fields_;
  }

  static const ::google::protobuf::Descriptor* descriptor();
  static const Roles& default_instance();

  void Swap(Roles* other);

  // implements Message ----------------------------------------------

  Roles* New() const;
  void CopyFrom(const ::google::protobuf::Message& from);
  void MergeFrom(const ::google::protobuf::Message& from);
  void CopyFrom(const Roles& from);
  void MergeFrom(const Roles& from);
  void Clear();
  bool IsInitialized() const;

  int ByteSize() const;
  bool MergePartialFromCodedStream(
      ::google::protobuf::io::CodedInputStream* input);
  void SerializeWithCachedSizes(
      ::google::protobuf::io::CodedOutputStream* output) const;
  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
  int GetCachedSize() const { return _cached_size_; }
  private:
  void SharedCtor();
  void SharedDtor();
  void SetCachedSize(int size) const;
  public:

  ::google::protobuf::Metadata GetMetadata() const;

  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------

  // optional bool sql_query = 1 [default = true];
  inline bool has_sql_query() const;
  inline void clear_sql_query();
  static const int kSqlQueryFieldNumber = 1;
  inline bool sql_query() const;
  inline void set_sql_query(bool value);

  // optional bool logical_plan = 2 [default = true];
  inline bool has_logical_plan() const;
  inline void clear_logical_plan();
  static const int kLogicalPlanFieldNumber = 2;
  inline bool logical_plan() const;
  inline void set_logical_plan(bool value);

  // optional bool physical_plan = 3 [default = true];
  inline bool has_physical_plan() const;
  inline void clear_physical_plan();
  static const int kPhysicalPlanFieldNumber = 3;
  inline bool physical_plan() const;
  inline void set_physical_plan(bool value);

  // optional bool java_executor = 4 [default = true];
  inline bool has_java_executor() const;
  inline void clear_java_executor();
  static const int kJavaExecutorFieldNumber = 4;
  inline bool java_executor() const;
  inline void set_java_executor(bool value);

  // optional bool distributed_cache = 5 [default = true];
  inline bool has_distributed_cache() const;
  inline void clear_distributed_cache();
  static const int kDistributedCacheFieldNumber = 5;
  inline bool distributed_cache() const;
  inline void set_distributed_cache(bool value);

  // @@protoc_insertion_point(class_scope:exec.Roles)
 private:
  inline void set_has_sql_query();
  inline void clear_has_sql_query();
  inline void set_has_logical_plan();
  inline void clear_has_logical_plan();
  inline void set_has_physical_plan();
  inline void clear_has_physical_plan();
  inline void set_has_java_executor();
  inline void clear_has_java_executor();
  inline void set_has_distributed_cache();
  inline void clear_has_distributed_cache();

  ::google::protobuf::UnknownFieldSet _unknown_fields_;

  bool sql_query_;
  bool logical_plan_;
  bool physical_plan_;
  bool java_executor_;
  bool distributed_cache_;

  mutable int _cached_size_;
  ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];

  friend void  protobuf_AddDesc_Coordination_2eproto();
  friend void protobuf_AssignDesc_Coordination_2eproto();
  friend void protobuf_ShutdownFile_Coordination_2eproto();

  void InitAsDefaultInstance();
  static Roles* default_instance_;
};
// ===================================================================

// ===================================================================

// DrillbitEndpoint

// optional string address = 1;
inline bool DrillbitEndpoint::has_address() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void DrillbitEndpoint::set_has_address() {
  _has_bits_[0] |= 0x00000001u;
}
inline void DrillbitEndpoint::clear_has_address() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void DrillbitEndpoint::clear_address() {
  if (address_ != &::google::protobuf::internal::kEmptyString) {
    address_->clear();
  }
  clear_has_address();
}
inline const ::std::string& DrillbitEndpoint::address() const {
  return *address_;
}
inline void DrillbitEndpoint::set_address(const ::std::string& value) {
  set_has_address();
  if (address_ == &::google::protobuf::internal::kEmptyString) {
    address_ = new ::std::string;
  }
  address_->assign(value);
}
inline void DrillbitEndpoint::set_address(const char* value) {
  set_has_address();
  if (address_ == &::google::protobuf::internal::kEmptyString) {
    address_ = new ::std::string;
  }
  address_->assign(value);
}
inline void DrillbitEndpoint::set_address(const char* value, size_t size) {
  set_has_address();
  if (address_ == &::google::protobuf::internal::kEmptyString) {
    address_ = new ::std::string;
  }
  address_->assign(reinterpret_cast<const char*>(value), size);
}
inline ::std::string* DrillbitEndpoint::mutable_address() {
  set_has_address();
  if (address_ == &::google::protobuf::internal::kEmptyString) {
    address_ = new ::std::string;
  }
  return address_;
}
inline ::std::string* DrillbitEndpoint::release_address() {
  clear_has_address();
  if (address_ == &::google::protobuf::internal::kEmptyString) {
    return NULL;
  } else {
    ::std::string* temp = address_;
    address_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
    return temp;
  }
}
inline void DrillbitEndpoint::set_allocated_address(::std::string* address) {
  if (address_ != &::google::protobuf::internal::kEmptyString) {
    delete address_;
  }
  if (address) {
    set_has_address();
    address_ = address;
  } else {
    clear_has_address();
    address_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  }
}

// optional int32 user_port = 2;
inline bool DrillbitEndpoint::has_user_port() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void DrillbitEndpoint::set_has_user_port() {
  _has_bits_[0] |= 0x00000002u;
}
inline void DrillbitEndpoint::clear_has_user_port() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void DrillbitEndpoint::clear_user_port() {
  user_port_ = 0;
  clear_has_user_port();
}
inline ::google::protobuf::int32 DrillbitEndpoint::user_port() const {
  return user_port_;
}
inline void DrillbitEndpoint::set_user_port(::google::protobuf::int32 value) {
  set_has_user_port();
  user_port_ = value;
}

// optional int32 control_port = 3;
inline bool DrillbitEndpoint::has_control_port() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void DrillbitEndpoint::set_has_control_port() {
  _has_bits_[0] |= 0x00000004u;
}
inline void DrillbitEndpoint::clear_has_control_port() {
  _has_bits_[0] &= ~0x00000004u;
}
inline void DrillbitEndpoint::clear_control_port() {
  control_port_ = 0;
  clear_has_control_port();
}
inline ::google::protobuf::int32 DrillbitEndpoint::control_port() const {
  return control_port_;
}
inline void DrillbitEndpoint::set_control_port(::google::protobuf::int32 value) {
  set_has_control_port();
  control_port_ = value;
}

// optional int32 data_port = 4;
inline bool DrillbitEndpoint::has_data_port() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void DrillbitEndpoint::set_has_data_port() {
  _has_bits_[0] |= 0x00000008u;
}
inline void DrillbitEndpoint::clear_has_data_port() {
  _has_bits_[0] &= ~0x00000008u;
}
inline void DrillbitEndpoint::clear_data_port() {
  data_port_ = 0;
  clear_has_data_port();
}
inline ::google::protobuf::int32 DrillbitEndpoint::data_port() const {
  return data_port_;
}
inline void DrillbitEndpoint::set_data_port(::google::protobuf::int32 value) {
  set_has_data_port();
  data_port_ = value;
}

// optional .exec.Roles roles = 5;
inline bool DrillbitEndpoint::has_roles() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void DrillbitEndpoint::set_has_roles() {
  _has_bits_[0] |= 0x00000010u;
}
inline void DrillbitEndpoint::clear_has_roles() {
  _has_bits_[0] &= ~0x00000010u;
}
inline void DrillbitEndpoint::clear_roles() {
  if (roles_ != NULL) roles_->::exec::Roles::Clear();
  clear_has_roles();
}
inline const ::exec::Roles& DrillbitEndpoint::roles() const {
  return roles_ != NULL ? *roles_ : *default_instance_->roles_;
}
inline ::exec::Roles* DrillbitEndpoint::mutable_roles() {
  set_has_roles();
  if (roles_ == NULL) roles_ = new ::exec::Roles;
  return roles_;
}
inline ::exec::Roles* DrillbitEndpoint::release_roles() {
  clear_has_roles();
  ::exec::Roles* temp = roles_;
  roles_ = NULL;
  return temp;
}
inline void DrillbitEndpoint::set_allocated_roles(::exec::Roles* roles) {
  delete roles_;
  roles_ = roles;
  if (roles) {
    set_has_roles();
  } else {
    clear_has_roles();
  }
}

// optional string version = 6;
inline bool DrillbitEndpoint::has_version() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
inline void DrillbitEndpoint::set_has_version() {
  _has_bits_[0] |= 0x00000020u;
}
inline void DrillbitEndpoint::clear_has_version() {
  _has_bits_[0] &= ~0x00000020u;
}
inline void DrillbitEndpoint::clear_version() {
  if (version_ != &::google::protobuf::internal::kEmptyString) {
    version_->clear();
  }
  clear_has_version();
}
inline const ::std::string& DrillbitEndpoint::version() const {
  return *version_;
}
inline void DrillbitEndpoint::set_version(const ::std::string& value) {
  set_has_version();
  if (version_ == &::google::protobuf::internal::kEmptyString) {
    version_ = new ::std::string;
  }
  version_->assign(value);
}
inline void DrillbitEndpoint::set_version(const char* value) {
  set_has_version();
  if (version_ == &::google::protobuf::internal::kEmptyString) {
    version_ = new ::std::string;
  }
  version_->assign(value);
}
inline void DrillbitEndpoint::set_version(const char* value, size_t size) {
  set_has_version();
  if (version_ == &::google::protobuf::internal::kEmptyString) {
    version_ = new ::std::string;
  }
  version_->assign(reinterpret_cast<const char*>(value), size);
}
inline ::std::string* DrillbitEndpoint::mutable_version() {
  set_has_version();
  if (version_ == &::google::protobuf::internal::kEmptyString) {
    version_ = new ::std::string;
  }
  return version_;
}
inline ::std::string* DrillbitEndpoint::release_version() {
  clear_has_version();
  if (version_ == &::google::protobuf::internal::kEmptyString) {
    return NULL;
  } else {
    ::std::string* temp = version_;
    version_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
    return temp;
  }
}
inline void DrillbitEndpoint::set_allocated_version(::std::string* version) {
  if (version_ != &::google::protobuf::internal::kEmptyString) {
    delete version_;
  }
  if (version) {
    set_has_version();
    version_ = version;
  } else {
    clear_has_version();
    version_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  }
}

// optional .exec.DrillbitEndpoint.State state = 7;
inline bool DrillbitEndpoint::has_state() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
inline void DrillbitEndpoint::set_has_state() {
  _has_bits_[0] |= 0x00000040u;
}
inline void DrillbitEndpoint::clear_has_state() {
  _has_bits_[0] &= ~0x00000040u;
}
inline void DrillbitEndpoint::clear_state() {
  state_ = 0;
  clear_has_state();
}
inline ::exec::DrillbitEndpoint_State DrillbitEndpoint::state() const {
  return static_cast< ::exec::DrillbitEndpoint_State >(state_);
}
inline void DrillbitEndpoint::set_state(::exec::DrillbitEndpoint_State value) {
  assert(::exec::DrillbitEndpoint_State_IsValid(value));
  set_has_state();
  state_ = value;
}

// optional int32 http_port = 8;
inline bool DrillbitEndpoint::has_http_port() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
inline void DrillbitEndpoint::set_has_http_port() {
  _has_bits_[0] |= 0x00000080u;
}
inline void DrillbitEndpoint::clear_has_http_port() {
  _has_bits_[0] &= ~0x00000080u;
}
inline void DrillbitEndpoint::clear_http_port() {
  http_port_ = 0;
  clear_has_http_port();
}
inline ::google::protobuf::int32 DrillbitEndpoint::http_port() const {
  return http_port_;
}
inline void DrillbitEndpoint::set_http_port(::google::protobuf::int32 value) {
  set_has_http_port();
  http_port_ = value;
}

// -------------------------------------------------------------------

// DrillServiceInstance

// optional string id = 1;
inline bool DrillServiceInstance::has_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void DrillServiceInstance::set_has_id() {
  _has_bits_[0] |= 0x00000001u;
}
inline void DrillServiceInstance::clear_has_id() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void DrillServiceInstance::clear_id() {
  if (id_ != &::google::protobuf::internal::kEmptyString) {
    id_->clear();
  }
  clear_has_id();
}
inline const ::std::string& DrillServiceInstance::id() const {
  return *id_;
}
inline void DrillServiceInstance::set_id(const ::std::string& value) {
  set_has_id();
  if (id_ == &::google::protobuf::internal::kEmptyString) {
    id_ = new ::std::string;
  }
  id_->assign(value);
}
inline void DrillServiceInstance::set_id(const char* value) {
  set_has_id();
  if (id_ == &::google::protobuf::internal::kEmptyString) {
    id_ = new ::std::string;
  }
  id_->assign(value);
}
inline void DrillServiceInstance::set_id(const char* value, size_t size) {
  set_has_id();
  if (id_ == &::google::protobuf::internal::kEmptyString) {
    id_ = new ::std::string;
  }
  id_->assign(reinterpret_cast<const char*>(value), size);
}
inline ::std::string* DrillServiceInstance::mutable_id() {
  set_has_id();
  if (id_ == &::google::protobuf::internal::kEmptyString) {
    id_ = new ::std::string;
  }
  return id_;
}
inline ::std::string* DrillServiceInstance::release_id() {
  clear_has_id();
  if (id_ == &::google::protobuf::internal::kEmptyString) {
    return NULL;
  } else {
    ::std::string* temp = id_;
    id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
    return temp;
  }
}
inline void DrillServiceInstance::set_allocated_id(::std::string* id) {
  if (id_ != &::google::protobuf::internal::kEmptyString) {
    delete id_;
  }
  if (id) {
    set_has_id();
    id_ = id;
  } else {
    clear_has_id();
    id_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  }
}

// optional int64 registrationTimeUTC = 2;
inline bool DrillServiceInstance::has_registrationtimeutc() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void DrillServiceInstance::set_has_registrationtimeutc() {
  _has_bits_[0] |= 0x00000002u;
}
inline void DrillServiceInstance::clear_has_registrationtimeutc() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void DrillServiceInstance::clear_registrationtimeutc() {
  registrationtimeutc_ = GOOGLE_LONGLONG(0);
  clear_has_registrationtimeutc();
}
inline ::google::protobuf::int64 DrillServiceInstance::registrationtimeutc() const {
  return registrationtimeutc_;
}
inline void DrillServiceInstance::set_registrationtimeutc(::google::protobuf::int64 value) {
  set_has_registrationtimeutc();
  registrationtimeutc_ = value;
}

// optional .exec.DrillbitEndpoint endpoint = 3;
inline bool DrillServiceInstance::has_endpoint() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void DrillServiceInstance::set_has_endpoint() {
  _has_bits_[0] |= 0x00000004u;
}
inline void DrillServiceInstance::clear_has_endpoint() {
  _has_bits_[0] &= ~0x00000004u;
}
inline void DrillServiceInstance::clear_endpoint() {
  if (endpoint_ != NULL) endpoint_->::exec::DrillbitEndpoint::Clear();
  clear_has_endpoint();
}
inline const ::exec::DrillbitEndpoint& DrillServiceInstance::endpoint() const {
  return endpoint_ != NULL ? *endpoint_ : *default_instance_->endpoint_;
}
inline ::exec::DrillbitEndpoint* DrillServiceInstance::mutable_endpoint() {
  set_has_endpoint();
  if (endpoint_ == NULL) endpoint_ = new ::exec::DrillbitEndpoint;
  return endpoint_;
}
inline ::exec::DrillbitEndpoint* DrillServiceInstance::release_endpoint() {
  clear_has_endpoint();
  ::exec::DrillbitEndpoint* temp = endpoint_;
  endpoint_ = NULL;
  return temp;
}
inline void DrillServiceInstance::set_allocated_endpoint(::exec::DrillbitEndpoint* endpoint) {
  delete endpoint_;
  endpoint_ = endpoint;
  if (endpoint) {
    set_has_endpoint();
  } else {
    clear_has_endpoint();
  }
}

// -------------------------------------------------------------------

// Roles

// optional bool sql_query = 1 [default = true];
inline bool Roles::has_sql_query() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void Roles::set_has_sql_query() {
  _has_bits_[0] |= 0x00000001u;
}
inline void Roles::clear_has_sql_query() {
  _has_bits_[0] &= ~0x00000001u;
}
inline void Roles::clear_sql_query() {
  sql_query_ = true;
  clear_has_sql_query();
}
inline bool Roles::sql_query() const {
  return sql_query_;
}
inline void Roles::set_sql_query(bool value) {
  set_has_sql_query();
  sql_query_ = value;
}

// optional bool logical_plan = 2 [default = true];
inline bool Roles::has_logical_plan() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void Roles::set_has_logical_plan() {
  _has_bits_[0] |= 0x00000002u;
}
inline void Roles::clear_has_logical_plan() {
  _has_bits_[0] &= ~0x00000002u;
}
inline void Roles::clear_logical_plan() {
  logical_plan_ = true;
  clear_has_logical_plan();
}
inline bool Roles::logical_plan() const {
  return logical_plan_;
}
inline void Roles::set_logical_plan(bool value) {
  set_has_logical_plan();
  logical_plan_ = value;
}

// optional bool physical_plan = 3 [default = true];
inline bool Roles::has_physical_plan() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void Roles::set_has_physical_plan() {
  _has_bits_[0] |= 0x00000004u;
}
inline void Roles::clear_has_physical_plan() {
  _has_bits_[0] &= ~0x00000004u;
}
inline void Roles::clear_physical_plan() {
  physical_plan_ = true;
  clear_has_physical_plan();
}
inline bool Roles::physical_plan() const {
  return physical_plan_;
}
inline void Roles::set_physical_plan(bool value) {
  set_has_physical_plan();
  physical_plan_ = value;
}

// optional bool java_executor = 4 [default = true];
inline bool Roles::has_java_executor() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void Roles::set_has_java_executor() {
  _has_bits_[0] |= 0x00000008u;
}
inline void Roles::clear_has_java_executor() {
  _has_bits_[0] &= ~0x00000008u;
}
inline void Roles::clear_java_executor() {
  java_executor_ = true;
  clear_has_java_executor();
}
inline bool Roles::java_executor() const {
  return java_executor_;
}
inline void Roles::set_java_executor(bool value) {
  set_has_java_executor();
  java_executor_ = value;
}

// optional bool distributed_cache = 5 [default = true];
inline bool Roles::has_distributed_cache() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
inline void Roles::set_has_distributed_cache() {
  _has_bits_[0] |= 0x00000010u;
}
inline void Roles::clear_has_distributed_cache() {
  _has_bits_[0] &= ~0x00000010u;
}
inline void Roles::clear_distributed_cache() {
  distributed_cache_ = true;
  clear_has_distributed_cache();
}
inline bool Roles::distributed_cache() const {
  return distributed_cache_;
}
inline void Roles::set_distributed_cache(bool value) {
  set_has_distributed_cache();
  distributed_cache_ = value;
}

// @@protoc_insertion_point(namespace_scope)

}  // namespace exec

#ifndef SWIG
namespace google {
namespace protobuf {

template <>
inline const EnumDescriptor* GetEnumDescriptor< ::exec::DrillbitEndpoint_State>() {
  return ::exec::DrillbitEndpoint_State_descriptor();
}

}  // namespace google
}  // namespace protobuf
#endif  // SWIG

// @@protoc_insertion_point(global_scope)

#endif  // PROTOBUF_Coordination_2eproto__INCLUDED