text:
using base::Time;
using base::TimeDelta;
using content::BrowserThread;
using content::ResourceRequestInfo;

// The list of filtered headers that are removed from requests sent via
// StartAsync(). These must be lower case.
static const char* const kFilteredHeaderStrings[] = {
  "connection",
  "cookie",
  "expect",
  "max-forwards",
  "proxy-authorization",
  "referer",
  "te",
  "upgrade",
  "via"
};

int URLRequestAutomationJob::instance_count_ = 0;
bool URLRequestAutomationJob::is_protocol_factory_registered_ = false;

net::URLRequest::ProtocolFactory* URLRequestAutomationJob::old_http_factory_
    = NULL;
net::URLRequest::ProtocolFactory* URLRequestAutomationJob::old_https_factory_
    = NULL;

URLRequestAutomationJob::URLRequestAutomationJob(
    net::URLRequest* request,
    net::NetworkDelegate* network_delegate,
    const net::HttpUserAgentSettings* http_user_agent_settings,
    int tab,
    int request_id,
    AutomationResourceMessageFilter* filter,
    bool is_pending)
    : net::URLRequestJob(request, network_delegate),
      http_user_agent_settings_(http_user_agent_settings),
      id_(0),
      tab_(tab),
      message_filter_(filter),
      pending_buf_size_(0),
      redirect_status_(0),
      request_id_(request_id),
      is_pending_(is_pending),
      upload_size_(0),
      ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
  DVLOG(1) << "URLRequestAutomationJob create. Count: " << ++instance_count_;
  DCHECK(message_filter_ != NULL);

  if (message_filter_) {
    id_ = message_filter_->NewAutomationRequestId();
    DCHECK_NE(id_, 0);
  }
}

URLRequestAutomationJob::~URLRequestAutomationJob() {
  DVLOG(1) << "URLRequestAutomationJob delete. Count: " << --instance_count_;
  Cleanup();
}

void URLRequestAutomationJob::EnsureProtocolFactoryRegistered() {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));

  if (!is_protocol_factory_registered_) {
    old_http_factory_ =
        net::URLRequest::Deprecated::RegisterProtocolFactory(
            "http", &URLRequestAutomationJob::Factory);
    old_https_factory_ =
        net::URLRequest::Deprecated::RegisterProtocolFactory(
            "https", &URLRequestAutomationJob::Factory);
    is_protocol_factory_registered_ = true;
  }
}

net::URLRequestJob* URLRequestAutomationJob::Factory(
    net::URLRequest* request,
    net::NetworkDelegate* network_delegate,
    const std::string& scheme) {
  bool scheme_is_http = request->url().SchemeIs("http");
  bool scheme_is_https = request->url().SchemeIs("https");

  // Returning null here just means that the built-in handler will be used.
  if (scheme_is_http || scheme_is_https) {
    const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
    if (info) {
      int child_id = info->GetChildID();
      int route_id = info->GetRouteID();
      AutomationResourceMessageFilter::AutomationDetails details;
      if (AutomationResourceMessageFilter::LookupRegisteredRenderView(
              child_id, route_id, &details)) {
        URLRequestAutomationJob* job = new URLRequestAutomationJob(
            request, network_delegate,
            request->context()->http_user_agent_settings(),
            details.tab_handle, info->GetRequestID(), details.filter,
            details.is_pending_render_view);
        return job;
      }
    }

    if (scheme_is_http && old_http_factory_)
      return old_http_factory_(request, network_delegate, scheme);
    else if (scheme_is_https && old_https_factory_)
      return old_https_factory_(request, network_delegate, scheme);
  }
  return NULL;
}

// net::URLRequestJob Implementation.
void URLRequestAutomationJob::Start() {
  if (!is_pending()) {
    // Start reading asynchronously so that all error reporting and data
    // callbacks happen as they would for network requests.
    MessageLoop::current()->PostTask(
        FROM_HERE,
        base::Bind(&URLRequestAutomationJob::StartAsync,
                   weak_factory_.GetWeakPtr()));
  } else {
    // If this is a pending job, then register it immediately with the message
    // filter so it can be serviced later when we receive a request from the
    // external host to connect to the corresponding external tab.
    message_filter_->RegisterRequest(this);
  }
}

void URLRequestAutomationJob::Kill() {
  if (message_filter_.get()) {
    if (!is_pending()) {
      message_filter_->Send(new AutomationMsg_RequestEnd(tab_, id_,
          net::URLRequestStatus(net::URLRequestStatus::CANCELED,
                                net::ERR_ABORTED)));
    }
  }
  DisconnectFromMessageFilter();
  net::URLRequestJob::Kill();
}

bool URLRequestAutomationJob::ReadRawData(
    net::IOBuffer* buf, int buf_size, int* bytes_read) {
  DVLOG(1) << "URLRequestAutomationJob: " << request_->url().spec()
           << " - read pending: " << buf_size;

  // We should not receive a read request for a pending job.
  DCHECK(!is_pending());

  pending_buf_ = buf;
  pending_buf_size_ = buf_size;

  if (message_filter_) {
    message_filter_->Send(new AutomationMsg_RequestRead(tab_, id_, buf_size));
    SetStatus(net::URLRequestStatus(net::URLRequestStatus::IO_PENDING, 0));
  } else {
    MessageLoop::current()->PostTask(
        FROM_HERE,
        base::Bind(&URLRequestAutomationJob::NotifyJobCompletionTask,
                   weak_factory_.GetWeakPtr()));
  }
  return false;
}

bool URLRequestAutomationJob::GetMimeType(std::string* mime_type) const {
  if (!mime_type_.empty()) {
    *mime_type = mime_type_;
  } else if (headers_) {
    headers_->GetMimeType(mime_type);
  }

  return (!mime_type->empty());
}

bool URLRequestAutomationJob::GetCharset(std::string* charset) {
  if (headers_)
    return headers_->GetCharset(charset);
  return false;
}

void URLRequestAutomationJob::GetResponseInfo(net::HttpResponseInfo* info) {
  if (headers_)
    info->headers = headers_;
  if (request_->url().SchemeIsSecure()) {
    // Make up a fake certificate for this response since we don't have
    // access to the real SSL info.
    const char* kCertIssuer = "Chrome Internal";
    const int kLifetimeDays = 100;

    info->ssl_info.cert =
        new net::X509Certificate(request_->url().GetWithEmptyPath().spec(),
                                 kCertIssuer,
                                 Time::Now(),
                                 Time::Now() +
                                     TimeDelta::FromDays(kLifetimeDays));
    info->ssl_info.cert_status = 0;
    info->ssl_info.security_bits = -1;
  }
}

int URLRequestAutomationJob::GetResponseCode() const {
  if (headers_)
    return headers_->response_code();

  static const int kDefaultResponseCode = 200;
  return kDefaultResponseCode;
}

bool URLRequestAutomationJob::IsRedirectResponse(
    GURL* location, int* http_status_code) {
  if (!net::HttpResponseHeaders::IsRedirectResponseCode(redirect_status_))
    return false;

  *http_status_code = redirect_status_;
  *location = GURL(redirect_url_);
  return true;
}

net::UploadProgress URLRequestAutomationJob::GetUploadProgress() const {
  uint64 progress = 0;
  if (request_ && request_->status().is_success()) {
    // We don't support incremental progress notifications in ChromeFrame. When
    // we receive a response for the POST request from Chromeframe, it means
    // that the upload is fully complete.
    progress = upload_size_;
  }
  return net::UploadProgress(progress, upload_size_);
}

net::HostPortPair URLRequestAutomationJob::GetSocketAddress() const {
  return socket_address_;
}

bool URLRequestAutomationJob::MayFilterMessage(const IPC::Message& message,
                                               int* request_id) {
  switch (message.type()) {
    case AutomationMsg_RequestStarted::ID:
    case AutomationMsg_RequestData::ID:
    case AutomationMsg_RequestEnd::ID: {
      PickleIterator iter(message);
      if (message.ReadInt(&iter, request_id))
        return true;
      break;
    }
  }

  return false;
}

void URLRequestAutomationJob::OnMessage(const IPC::Message& message) {
  if (!request_) {
    NOTREACHED() << __FUNCTION__
                 << ": Unexpected request received for job:"
                 << id();
    return;
  }

  bool deserialize_success = false;
  IPC_BEGIN_MESSAGE_MAP_EX(URLRequestAutomationJob,
                           message,
                           deserialize_success)
    IPC_MESSAGE_HANDLER(AutomationMsg_RequestStarted, OnRequestStarted)
    IPC_MESSAGE_HANDLER(AutomationMsg_RequestData, OnDataAvailable)
    IPC_MESSAGE_HANDLER(AutomationMsg_RequestEnd, OnRequestEnd)
  IPC_END_MESSAGE_MAP_EX()

  if (!deserialize_success) {
    LOG(ERROR) << "Failed to deserialize IPC message.";
  }
}

void URLRequestAutomationJob::OnRequestStarted(
    int id, const AutomationURLResponse& response) {
  DVLOG(1) << "URLRequestAutomationJob: " << request_->url().spec()
           << " - response started.";
  set_expected_content_size(response.content_length);
  mime_type_ = response.mime_type;

  redirect_url_ = response.redirect_url;
  redirect_status_ = response.redirect_status;
  DCHECK(redirect_status_ == 0 || redirect_status_ == 200 ||
         (redirect_status_ >= 300 && redirect_status_ < 400));

  if (!response.headers.empty()) {
    headers_ = new net::HttpResponseHeaders(
        net::HttpUtil::AssembleRawHeaders(response.headers.data(),
                                          response.headers.size()));
  }
  socket_address_ = response.socket_address;
  upload_size_ = response.upload_size;
  NotifyHeadersComplete();
}

void URLRequestAutomationJob::OnDataAvailable(
    int id, const std::string& bytes) {
  DVLOG(1) << "URLRequestAutomationJob: " << request_->url().spec()
           << " - data available, Size: " << bytes.size();
  DCHECK(!bytes.empty());

  // The request completed, and we have all the data.
  // Clear any IO pending status.
  SetStatus(net::URLRequestStatus());

  if (pending_buf_ && pending_buf_->data()) {
    DCHECK_GE(pending_buf_size_, bytes.size());
    const int bytes_to_copy = std::min(bytes.size(), pending_buf_size_);
    memcpy(pending_buf_->data(), &bytes[0], bytes_to_copy);

    pending_buf_ = NULL;
    pending_buf_size_ = 0;

    NotifyReadComplete(bytes_to_copy);
  } else {
    NOTREACHED() << "Received unexpected data of length:" << bytes.size();
  }
}

void URLRequestAutomationJob::OnRequestEnd(
    int id, const net::URLRequestStatus& status) {
#ifndef NDEBUG
  std::string url;
  if (request_)
    url = request_->url().spec();
  DVLOG(1) << "URLRequestAutomationJob: " << url << " - request end. Status: "
           << status.status();
#endif

  // TODO(tommi): When we hit certificate errors, notify the delegate via
  // OnSSLCertificateError().  Right now we don't have the certificate
  // so we don't.  We could possibly call OnSSLCertificateError with a NULL
  // certificate, but I'm not sure if all implementations expect it.
  // if (status.status() == net::URLRequestStatus::FAILED &&
  //    net::IsCertificateError(status.error()) && request_->delegate()) {
  //  request_->delegate()->OnSSLCertificateError(request_, status.error());
  // }

  DisconnectFromMessageFilter();
  // NotifyDone may have been called on the job if the original request was
  // redirected.
  if (!is_done()) {
    // We can complete the job if we have a valid response or a pending read.
    // An end request can be received in the following cases
    // 1. We failed to connect to the server, in which case we did not receive
    //    a valid response.
    // 2. In response to a read request.
    if (!has_response_started()) {
      NotifyStartError(status);
    } else if (pending_buf_) {
      pending_buf_ = NULL;
      pending_buf_size_ = 0;
      NotifyDone(status);
      NotifyReadComplete(0);
    } else {
      // Wait for the http stack to issue a Read request where we will notify
      // that the job has completed.
      request_status_ = status;
    }
  }
  // Note
  // The job could have been destroyed above. Please don't attempt to access
  // member variables here.
}

void URLRequestAutomationJob::Cleanup() {
  headers_ = NULL;
  mime_type_.erase();

  id_ = 0;
  tab_ = 0;

  DCHECK(!message_filter_);
  DisconnectFromMessageFilter();

  pending_buf_ = NULL;
  pending_buf_size_ = 0;
}

void URLRequestAutomationJob::StartAsync() {
  DVLOG(1) << "URLRequestAutomationJob: start request: "
           << (request_ ? request_->url().spec() : "NULL request");

  // If the job is cancelled before we got a chance to start it
  // we have nothing much to do here.
  if (is_done())
    return;

  // We should not receive a Start request for a pending job.
  DCHECK(!is_pending());

  if (!request_) {
    NotifyStartError(net::URLRequestStatus(net::URLRequestStatus::FAILED,
                                           net::ERR_FAILED));
    return;
  }

  // Register this request with automation message filter.
  message_filter_->RegisterRequest(this);

  // Strip unwanted headers.
  net::HttpRequestHeaders new_request_headers;
  new_request_headers.MergeFrom(request_->extra_request_headers());
  for (size_t i = 0; i < arraysize(kFilteredHeaderStrings); ++i)
    new_request_headers.RemoveHeader(kFilteredHeaderStrings[i]);

  // Only add default Accept-Language and Accept-Charset if the request
  // didn't have them specified.
  if (!new_request_headers.HasHeader(
      net::HttpRequestHeaders::kAcceptLanguage) &&
      http_user_agent_settings_) {
    std::string accept_language =
        http_user_agent_settings_->GetAcceptLanguage();
    if (!accept_language.empty()) {
      new_request_headers.SetHeader(net::HttpRequestHeaders::kAcceptLanguage,
                                    accept_language);
    }
  }
  if (!new_request_headers.HasHeader(
      net::HttpRequestHeaders::kAcceptCharset) &&
      http_user_agent_settings_) {
    std::string accept_charset = http_user_agent_settings_->GetAcceptCharset();
    if (!accept_charset.empty()) {
      new_request_headers.SetHeader(net::HttpRequestHeaders::kAcceptCharset,
                                    accept_charset);
    }
  }

  // Ensure that we do not send username and password fields in the referrer.
  GURL referrer(request_->GetSanitizedReferrer());

  // The referrer header must be suppressed if the preceding URL was
  // a secure one and the new one is not.
  if (referrer.SchemeIsSecure() && !request_->url().SchemeIsSecure()) {
    DVLOG(1) << "Suppressing referrer header since going from secure to "
                "non-secure";
    referrer = GURL();
  }

  // Get the resource type (main_frame/script/image/stylesheet etc.
  const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request_);
  ResourceType::Type resource_type = ResourceType::MAIN_FRAME;
  if (info) {
    resource_type = info->GetResourceType();
  }

  // Ask automation to start this request.
  AutomationURLRequest automation_request;
  automation_request.url = request_->url().spec();
  automation_request.method = request_->method();
  automation_request.referrer = referrer.spec();
  automation_request.extra_request_headers = new_request_headers.ToString();
  automation_request.upload_data = request_->get_upload_mutable();
  automation_request.resource_type = resource_type;
  automation_request.load_flags = request_->load_flags();

  DCHECK(message_filter_);
  message_filter_->Send(new AutomationMsg_RequestStart(
      tab_, id_, automation_request));
}

void URLRequestAutomationJob::DisconnectFromMessageFilter() {
  if (message_filter_) {
    message_filter_->UnRegisterRequest(this);
    message_filter_ = NULL;
  }
}

void URLRequestAutomationJob::StartPendingJob(
    int new_tab_handle,
    AutomationResourceMessageFilter* new_filter) {
  DCHECK(new_filter != NULL);
  tab_ = new_tab_handle;
  message_filter_ = new_filter;
  is_pending_ = false;
  Start();
}

void URLRequestAutomationJob::NotifyJobCompletionTask() {
  if (!is_done()) {
    NotifyDone(request_status_);
  }
  // Reset any pending reads.
  if (pending_buf_) {
    pending_buf_ = NULL;
    pending_buf_size_ = 0;
    NotifyReadComplete(0);
  }
}


text:
#if UNITY_5 || UNITY_4 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_5_3_OR_NEWER
using System;
using UnityEngine;

// ReSharper disable once CheckNamespace
namespace GameDevWare.Serialization.Serializers
{
	public sealed class Vector4Serializer : TypeSerializer
	{
		public override Type SerializedType { get { return typeof(Vector4); } }

		public override object Deserialize(IJsonReader reader)
		{
			if (reader == null) throw new ArgumentNullException("reader");

			if (reader.Token == JsonToken.Null)
				return null;

			var value = new Vector4();
			reader.ReadObjectBegin();
			while (reader.Token != JsonToken.EndOfObject)
			{
				var memberName = reader.ReadMember();
				switch (memberName)
				{
					case "x": value.x = reader.ReadSingle(); break;
					case "y": value.y = reader.ReadSingle(); break;
					case "z": value.z = reader.ReadSingle(); break;
					case "w": value.w = reader.ReadSingle(); break;
					default: reader.ReadValue(typeof(object)); break;
				}
			}
			reader.ReadObjectEnd(nextToken: false);
			return value;
		}
		public override void Serialize(IJsonWriter writer, object value)
		{
			if (writer == null) throw new ArgumentNullException("writer");
			if (value == null) throw new ArgumentNullException("value");

			var vector4 = (Vector4)value;
			writer.WriteObjectBegin(4);
			writer.WriteMember("x");
			writer.Write(vector4.x);
			writer.WriteMember("y");
			writer.Write(vector4.y);
			writer.WriteMember("z");
			writer.Write(vector4.z);
			writer.WriteMember("w");
			writer.Write(vector4.w);
			writer.WriteObjectEnd();
		}
	}
}
#endif

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata;
using PhilosophicalMonkey;
using Xunit;

namespace WireUp.Test
{
    public class SchematicProviderTests
    {
        private static SchematicProvider Sut()
        {
            var type = typeof(TestHttpSchematic);
            var a = Reflect.OnTypes.GetAssembly(type);
            return SchematicProvider.Create(new Assembly[] { a });
        }

        private static SchematicProvider EmptySut()
        {
            return SchematicProvider.Create(new Assembly[] { });
        }

        [Fact]
        public void Add_TypeNotSchematic_ThrowsInvalidOperationException()
        {
            var sut = EmptySut();
            Assert.Throws<InvalidOperationException>(() => sut.Add("test", typeof(object)));
        }

        [Fact]
        public void Add_TypeToEmptyProvider_IsInKeys()
        {
            var sut = EmptySut();
            var t = typeof(TestHttpSchematic);
            sut.Add("test", t);
            Assert.Contains("test", sut.Keys);
        }

        [Fact]
        public void Get_WithEmptyProvider_ReturnsEmptyList()
        {
            var sut = EmptySut();
            Assert.Empty(sut.Get("Does_not_exist"));
        }

        [Fact]
        public void Get_WithNonEmptyProvider_ReturnsList()
        {
            var sut = Sut();
            Assert.NotEmpty(sut.Get("HTTP"));
        }

        [Fact]
        public void Add_TypeToEmptyProvider_ContainsType()
        {
            var sut = EmptySut();
            var t = typeof(TestHttpSchematic);
            sut.Add("test", t);
            Assert.Contains(t, sut.Get("test"));
        }

        [Fact]
        public void Create_AssemblyContainsOneSchematic_ProviderHasOneSchematic()
        {
            var sut = Sut();
            Assert.Equal(1, sut.Get("HTTP").Count());
        }

        [Fact]
        public void Add_TypeTwice_IsIgnored()
        {
            var sut = Sut();
            var t = typeof(TestHttpSchematic);
            sut.Add("HTTP", t);
            Assert.Equal(1, sut.Get("HTTP").Count());
        }

    }
}


text:
#include <editor/MouseLook.h>

// internal
#include <lfant/Game.h>
#include <lfant/Input.h>
#include <lfant/Transform.h>
#include <lfant/Renderer.h>
#include <lfant/Time.h>
#include <lfant/Window.h>

// external

namespace lfant {
namespace editor {

IMPLEMENT_TYPE(Component, editor::MouseLook)

void MouseLook::Serialize(Properties* prop)
{
	Component::Serialize(prop);

	prop->Value("lookSpeed", &lookSpeed);
}

void MouseLook::Init()
{
	Component::Init();

//	ConnectEvent(SENDER(game->input, MouseMove), RECEIVER(this, OnSetMousePos));
	ConnectEvent(SENDER(owner, Look), RECEIVER(this, Look));
}

void MouseLook::Look(vec3 axis, float value)
{
/*	if(owner->GetParent())
	{
		owner->transform->Rotate(vec3(0,0,rot.z) * lookSpeed * game->time->deltaTime);
		owner->transform->Rotate(vec3(rot.x,rot.y,0) * lookSpeed * game->time->deltaTime);

	//	Log("Parent rot: ", lexical_cast<string>(owner->GetParent()->transform->GetWorldRotation()));
	//	Log("Camera rot: ", lexical_cast<string>(owner->transform->GetWorldRotation()));
	}
	else*/
	{
		owner->transform->Rotate(axis, value * lookSpeed * GetGame()->time->deltaTime);
	}

}

void MouseLook::OnSetMousePos(ivec2 pos)
{
	ivec2 mousePos = pos-lastMouse;
	ivec2 screenCenter = GetGame()->window->GetSize()/2;
	Look({1,0,0}, mousePos.y);
	Look({0,0,1}, -mousePos.x);
//	Look(vec3(mousePos.y, -mousePos.x, 0));
//	if(pos.x )
#if !ANDROID
	GetGame()->input->SetMousePos(screenCenter);
#endif
//	lastMouse = pos;
	lastMouse = screenCenter;
}

}
}


text:
@interface YMACscView () <UITableViewDelegate, UITableViewDataSource>

@property(nonatomic, strong) UITableView *tableView;
@property(nonatomic, strong) UITextField *cscTextField;
@property(nonatomic, strong) UILabel *cscLabel;
@property(nonatomic, assign) BOOL isEnabled;
@property(nonatomic, strong) UIView *footer;
@property(nonatomic, strong) NSArray *waitBarButton;
@property(nonatomic, strong) UIBarButtonItem *backBarButton;

@end

@implementation YMACscView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];

    if (self) {
        _isEnabled = YES;
        [self setupControls];
    }

    return self;
}

- (void)setupControls {
    self.backgroundColor = [YMAUIConstants defaultBackgroundColor];

    self.tableView.delegate = self;
    self.tableView.dataSource = self;

    UIImageView *ymLogoView = [[UIImageView alloc] initWithImage:YMALocalizedImage(@"ym", nil)];
    CGRect logoRect = ymLogoView.frame;

    logoRect.origin.y = self.frame.size.height - 110;
    logoRect.origin.x = (self.frame.size.width - logoRect.size.width) / 2;
    ymLogoView.frame = logoRect;

    [self addSubview:ymLogoView];
    [self addSubview:self.tableView];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [self setupDefaultNavigationBar];
}

- (void)setupDefaultNavigationBar {
    self.backBarButton.tintColor = [YMAUIConstants accentTextColor];
    self.backBarButton.enabled = YES;

    UIBarButtonItem *rightBarButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"NBBPayment", nil) style:UIBarButtonItemStylePlain target:self action:@selector(startPayment)];
    rightBarButton.tintColor = [YMAUIConstants accentTextColor];

    [self.delegate updateNavigationBarTitle:@"" leftButtons:@[self.backBarButton] rightButtons:@[rightBarButton]];
}

- (void)startPayment {
    [self.delegate disableError];
    [self.delegate startPaymentWithCsc:self.cscTextField.text];
    self.isEnabled = NO;
    self.cscTextField.enabled = NO;
    [self.tableView reloadData];

    self.backBarButton.tintColor = [YMAUIConstants commentColor];
    self.backBarButton.enabled = NO;

    [self.delegate updateNavigationBarTitle:@"" leftButtons:@[self.backBarButton] rightButtons:self.waitBarButton];
}

- (void)stopPaymentWithError:(NSError *)error {
    self.isEnabled = YES;
    self.cscTextField.enabled = YES;
    [self.tableView reloadData];
    [self.delegate showError:error target:nil withAction:NULL];
    [self setupDefaultNavigationBar];
}

- (void)removeFromSuperview {
    self.backBarButton.tintColor = [YMAUIConstants accentTextColor];
    self.backBarButton.enabled = YES;

    [self.delegate updateNavigationBarTitle:@"" leftButtons:@[self.backBarButton] rightButtons:self.waitBarButton];

    [super removeFromSuperview];
}

#pragma mark -
#pragma mark *** TableView  delegate ***
#pragma mark -

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 1;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return kControlHeightWithTextField;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return (section == 0) ? kControlHeightDefault : 0;
}

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
    return (section == 0) ? self.footer : nil;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *cellID = @"cscCellID";

    UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:cellID];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellID];
    }

    self.cscLabel.textColor = self.isEnabled ? [YMAUIConstants accentTextColor] : [YMAUIConstants commentColor];

    [cell.contentView addSubview:self.cscLabel];
    [cell.contentView addSubview:self.cscTextField];

    if (self.isEnabled)
        [self.cscTextField becomeFirstResponder];
    else
        [self.cscTextField resignFirstResponder];

    return cell;
}

#pragma mark -
#pragma mark *** Getters and setters ***
#pragma mark -

- (NSArray *)waitBarButton {
    if (!_waitBarButton) {
        UIActivityIndicatorView *activity = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
        [activity startAnimating];
        UIBarButtonItem *activityButton = [[UIBarButtonItem alloc] initWithCustomView:activity];
        UIBarButtonItem *rightBarButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"NBBWait", nil) style:UIBarButtonItemStylePlain target:nil action:NULL];
        rightBarButton.tintColor = [YMAUIConstants commentColor];
        rightBarButton.enabled = NO;
        _waitBarButton = @[rightBarButton, activityButton];
    }

    return _waitBarButton;
}

- (UIBarButtonItem *)backBarButton {
    if (!_backBarButton) {
        _backBarButton = [[UIBarButtonItem alloc] initWithImage:YMALocalizedImage(@"back", nil) style:UIBarButtonItemStylePlain target:self.delegate action:@selector(showMoneySource)];
    }

    return _backBarButton;
}

- (UITableView *)tableView {
    if (!_tableView) {
        _tableView = [[UITableView alloc] initWithFrame:self.frame style:UITableViewStyleGrouped];
        _tableView.backgroundColor = [UIColor clearColor];
        _tableView.scrollEnabled = NO;
    }

    return _tableView;
}

- (UITextField *)cscTextField {
    if (!_cscTextField) {
        _cscTextField = [[UITextField alloc] initWithFrame:CGRectMake(15, 20, self.frame.size.width - 10, 44)];
        _cscTextField.placeholder = NSLocalizedString(@"TPRequired", nil);
        _cscTextField.secureTextEntry = YES;
        _cscTextField.keyboardType = UIKeyboardTypeNumberPad;
    }

    return _cscTextField;
}

- (UILabel *)cscLabel {
    if (!_cscLabel) {
        _cscLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 8, self.frame.size.width - 20, 20)];
        _cscLabel.font = [YMAUIConstants commentFont];
        _cscLabel.text = NSLocalizedString(@"CTCsc", nil);
    }

    return _cscLabel;
}

- (UIView *)footer {
    if (!_footer) {
        _footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, kControlHeightDefault)];
        _footer.backgroundColor = [YMAUIConstants defaultBackgroundColor];

        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, self.frame.size.width - 30, kControlHeightDefault)];
        label.textColor = [YMAUIConstants commentColor];
        label.numberOfLines = 2;
        label.font = [YMAUIConstants commentFont];
        label.text = NSLocalizedString(@"TFCVVCode", nil);

        [_footer addSubview:label];
    }

    return _footer;
}

@end


text:
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { DejaColorSelectorModule } from '@deja-js/component/color-selector';
import { DejaOverlayModule } from '@deja-js/component/overlay';

import { DejaColorPickerComponent } from './color-picker.component';

@NgModule({
    declarations: [DejaColorPickerComponent],
    exports: [DejaColorPickerComponent],
    imports: [
        CommonModule,
        DejaColorSelectorModule,
        DejaOverlayModule,
        FormsModule,
        MatButtonModule
    ]
})
export class DejaColorPickerModule { }

export * from './color-picker.component';


text:
USING_NS_CC;

bool ModelViewer::init()
{
    if ( !Scene::init() )
        return false;

	initCamera();
	_vm = ViewMode::create(*this, *(_camera.get()), ViewModeType::Normal);

	auto animFileData = DataHandler::deserializeFromFile("config.json");
	if (animFileData != nullptr)
	{
		//ui layer
		_uiPage = UiPage::create(*this);
		addChild(_uiPage);

		//3d model layer
		_modelLayer = Layer::create();
		addChild(_modelLayer);

		//TODO: Should not init model data by viewer
		loadModel(*animFileData);
	}

	initInput();

    return true;
}

void ModelViewer::initInput()
{
	auto listenertouch = EventListenerTouchAllAtOnce::create();
	listenertouch->onTouchesMoved = CC_CALLBACK_2(ModelViewer::onTouchsMove, this);
	_eventDispatcher->addEventListenerWithSceneGraphPriority(listenertouch, this);

	auto listenermouse = EventListenerMouse::create();
	listenermouse->onMouseScroll = CC_CALLBACK_1(ModelViewer::onMouseScroll, this);
	listenermouse->onMouseMove = CC_CALLBACK_1(ModelViewer::onMouseMove, this);
	listenermouse->onMouseDown = CC_CALLBACK_1(ModelViewer::onMouseDown, this);
	listenermouse->onMouseUp = CC_CALLBACK_1(ModelViewer::onMouseUp, this);
	_eventDispatcher->addEventListenerWithSceneGraphPriority(listenermouse, this);

	auto listenerkeyboard = EventListenerKeyboard::create();
	listenerkeyboard->onKeyPressed = CC_CALLBACK_2(ModelViewer::onKeyPressed, this);
	listenerkeyboard->onKeyReleased = CC_CALLBACK_2(ModelViewer::onKeyReleased, this);
	_eventDispatcher->addEventListenerWithSceneGraphPriority(listenerkeyboard, this);
}

void ModelViewer::loadModel(ResourceDataList& animFileList)
{
	FileUtils::getInstance()->addSearchPath("data");

	for (auto spr = animFileList.begin(); spr != animFileList.end(); ++spr)
	{
		//TODO: construct filename with path, no need to add to search path.
		FileUtils::getInstance()->addSearchPath(spr->name);
		FileUtils::getInstance()->addSearchPath("data/" + spr->name);

		auto target = Entity::create(*spr);
		if (target != nullptr)
		{
			addViewTarget(target);
		}
	}

	_currViewTargetIdx = 0;
	changeViewTarget(0);
}

ModelViewer::ModelViewer()
    : _camera(nullptr)
    , _modelLayer(nullptr)
	, _debugDraw(false)
	, _currViewTargetIdx(0)
	, _vm(nullptr)
	, _nextViewMode(0)
{

}

ModelViewer::~ModelViewer()
{
}

void ModelViewer::onTouchsMove( const std::vector<Touch*> &touchs, Event *event )
{
	if (touchs.size() == 1)
	{
		_vm->onTouchsMove(touchs, event);
	}
}

void ModelViewer::onMouseScroll( Event* event )
{
	_vm->onMouseScroll(event);
}

void ModelViewer::onMouseDown(Event* event)
{
	_vm->onMouseButtonEvent(event, true);
}

void ModelViewer::onMouseUp(Event* event)
{
	_vm->onMouseButtonEvent(event, false);
}

void ModelViewer::onMouseMove( Event* event )
{
	_vm->onMouseMove(event);
}

void ModelViewer::onKeyPressed(EventKeyboard::KeyCode keycode, Event *event)
{
	_vm->onKeyPressed(keycode, event);
}

void ModelViewer::onKeyReleased(EventKeyboard::KeyCode keycode, Event *event)
{
	_vm->onKeyReleased(keycode, event);

	if (keycode == EventKeyboard::KeyCode::KEY_F11)
	{
		_nextViewMode = ((int)_vm->getType() + 1 ) % (int)ViewModeType::Count;
		if (_nextViewMode == 0)
			_nextViewMode += 1;
	}
}

void ModelViewer::initCamera()
{
	const Size& visibleSize = Director::getInstance()->getVisibleSize();
	_camera = Camera::createPerspective(60.0f, (GLfloat)visibleSize.width / visibleSize.height, 1.0f, 5000.f);

	addChild(_camera);

	_camera->setCameraFlag(CameraFlag::USER1);
	_camera->setCameraMask((unsigned short)CameraFlag::USER1);

	_camera->setPosition3D(Vec3(0.0f, 0.0f, 10.0f));
	_camera->lookAt(Vec3::ZERO, Vec3::UNIT_Y);
}

void ModelViewer::changeViewTarget(int stepLength)
{
	if (_viewTargetList.size() <= 1)
		return;

	_uiPage->clearAnimViewList();

	_viewTargetList.at(_currViewTargetIdx)->getSprite3d()->removeFromParentAndCleanup(false);

	stepLength %= _viewTargetList.size();
	_currViewTargetIdx += stepLength;
	if (_currViewTargetIdx >= _viewTargetList.size())
	{
		_currViewTargetIdx %= _viewTargetList.size();
	}
	else if (_currViewTargetIdx < 0){
		_currViewTargetIdx += _viewTargetList.size();
	}

	auto spr = _viewTargetList.at(_currViewTargetIdx)->getSprite3d();
	addChild(spr);
	_vm->updateCameraSet(spr);

	updateUiAnimList();
}

void ModelViewer::changeViewTarget(const std::string& targetName)
{
	if (_viewTargetList.size() <= 1)
		return;

	for (int i = 0; i < _viewTargetList.size(); ++i){
		if (_viewTargetList.at(i)->getFriendlyName() == targetName){
			_viewTargetList.at(_currViewTargetIdx)->getSprite3d()->removeFromParentAndCleanup(false);

			_uiPage->clearAnimViewList();
			_currViewTargetIdx = i;

			auto spr = _viewTargetList.at(_currViewTargetIdx)->getSprite3d();
			addChild(spr);
			_vm->updateCameraSet(spr);

			updateUiAnimList();
			break;
		}
	}
}

void ModelViewer::changeAnim(int step)
{
	Entity* ent = _viewTargetList.at(_currViewTargetIdx);
	ent->switchAnim(step);

	//TODO: process of default animation
	auto animTarget = DataHandler::findAnim(ent->getFriendlyName(), ent->getCurrAnimName());
	if (animTarget != nullptr)
		_uiPage->setAnimData(ent->getCurrAnimName(), animTarget->start, animTarget->end);
}

void ModelViewer::changeAnim(const std::string& animName)
{
	_viewTargetList.at(_currViewTargetIdx)->switchAnim(animName);

	//TODO: default animation

	auto animTarget = DataHandler::findAnim(_name, animName);
	if (animTarget != nullptr)
		_uiPage->setAnimData(animName, animTarget->start, animTarget->end);
}

void ModelViewer::modifyAnim(int start, int end)
{
	_viewTargetList.at(_currViewTargetIdx)->recreateCurrentAnim(start, end);
}

bool ModelViewer::deleteAnim(const std::string& targetName,const std::string& animName)
{
	//TODO: Delete item from data source
	auto viewData = DataHandler::findViewDate(targetName);
	for (auto itr = viewData->animList.begin(); itr != viewData->animList.end(); ++itr){
		if (itr->name == animName){
			viewData->animList.erase(itr);
			break;
		}
	}

	return  _viewTargetList.at(_currViewTargetIdx)->removeCurrentAnim();
}

bool ModelViewer::addViewTarget(const string& modelFilePath, const string& animFilePath, const string& texFilePath)
{
	assert(false);
// 		auto newTarget = Entity::create(uiInfo->_info, uiInfo->_info, uiInfo->_info2);
// 		if (newTarget != nullptr)
// 			addViewTarget(newTarget);
	return false;
}

bool ModelViewer::deleteViewTarget(const string& targetName)
{
	if (_viewTargetList.size() <= 1){
		return false;
//		_uiPage->showUserMsg("The only model left here, please don't kill me. >_<");
	}
	else{

		//Delete the data source
		for (auto itr = DataHandler::s_AnimFileData.begin(); itr != DataHandler::s_AnimFileData.end(); ++itr){
			if (itr->name == targetName){
				DataHandler::s_AnimFileData.erase(itr);
				break;
			}
		}

		for (auto itr = _viewTargetList.begin(); itr != _viewTargetList.end(); ++itr){
			if ((*itr)->getFriendlyName() == targetName){
				(*itr)->getSprite3d()->removeFromParent();
				_viewTargetList.erase(itr);
				break;
			}
		}

		_currViewTargetIdx = 0;
		auto spr = _viewTargetList.at(_currViewTargetIdx)->getSprite3d();
		addChild(spr);
		_vm->updateCameraSet(spr);

		updateUiAnimList();
	}

	return true;
}

void ModelViewer::addViewTarget(Entity* newTarget)
{
	_viewTargetList.pushBack(newTarget);
	_uiPage->addModelToViewList(newTarget->getFriendlyName());
}

void ModelViewer::addNewAnim(const string& newAnimName)
{
	_viewTargetList.at(_currViewTargetIdx)->addNewAnimSection(newAnimName);
}

void ModelViewer::updateUiAnimList()
{
	_uiPage->setFriendlyName(_viewTargetList.at(_currViewTargetIdx)->getFriendlyName());
	_uiPage->setModelName(_viewTargetList.at(_currViewTargetIdx)->getModelName());

	auto animMap = _viewTargetList.at(_currViewTargetIdx)->getAnimMap();
	for (auto itr = animMap.begin(); itr != animMap.end();	++itr){
		_uiPage->addAnimToViewList(itr->first);
	}

	changeAnim(DataHandler::s_DefaultAnim);
	_uiPage->setAnimData(DataHandler::s_DefaultAnim, 0, _viewTargetList.at(_currViewTargetIdx)->getFramesCount());
}

void ModelViewer::update(float dt)
{
	if (_currViewTargetIdx >=0 && _currViewTargetIdx < _viewTargetList.size())
	{
		_viewTargetList.at(_currViewTargetIdx)->update(dt);
	}

	_vm->update(dt);

	if (_nextViewMode > 0)
	{
		if ((int)_vm->getType() !=  _nextViewMode)
		{
			_vm = ViewMode::create(*this, *_camera, ViewModeType(_nextViewMode));
		}

		_nextViewMode = 0;
	}
}

void ModelViewer::onEnter()
{
	Scene::onEnter();

	scheduleUpdate();
}

void ModelViewer::onExit()
{
	Scene::onExit();

	unscheduleUpdate();
}

void ModelViewer::toggleDebugDraw()
{
	if (_currViewTargetIdx >= 0 && _currViewTargetIdx < _viewTargetList.size())
	{
		_debugDraw = !_debugDraw;
		_viewTargetList.at(_currViewTargetIdx)->setDrawingBoundingBox(_debugDraw);
	}
}

bool ModelViewer::saveAll()
{
	return DataHandler::serializeToFile();
}

bool ModelViewer::checkTargetNameLegal(const string& modelName)
{
	bool result = true;
	for (auto& items : DataHandler::s_AnimFileData){
		string newName = modelName;
		string oldName(items.name);
		std::transform(newName.begin(), newName.end(), newName.begin(), tolower);
		std::transform(oldName.begin(), oldName.end(), oldName.begin(), tolower);

		if (oldName == newName){
			result = false;
			break;
		}

	}

	return result;
}

bool ModelViewer::checkAnimNameLegal(const string& animName)
{
	bool result = true;
	for (auto& items : DataHandler::s_AnimFileData){
		if (items.name == animName)	{
			for (auto& anim : items.animList){
				string newName = animName;
				string oldName(anim.name);
				std::transform(newName.begin(), newName.end(), newName.begin(), tolower);
				std::transform(oldName.begin(), oldName.end(), oldName.begin(), tolower);
				if (oldName == newName){
					result = false;
					break;
				}
			}
		}
	}

	return result;
}

Entity* ModelViewer::getTarget()
{
	if (_currViewTargetIdx >= 0 && _currViewTargetIdx < _viewTargetList.size())
	{
		return _viewTargetList.at(_currViewTargetIdx);
	}

	return nullptr;
}


text:
privacyguide.github.com
=======================


text:
"""
Modified from 'The Python Standard Library'
13.1. csv — CSV File Reading and Writing
http://docs.python.org/2/library/csv.html
"""

import csv, codecs
from io import StringIO

class UTF8Recoder:
    """
    Iterator that reads an encoded stream and reencodes the input to UTF-8
    """
    def __init__(self, f, encoding):
        self.reader = codecs.getreader(encoding)(f)

    def __iter__(self):
        return self

    def next(self):
        return self.reader.next().encode("utf-8")

class UnicodeReader:
    """
    A CSV reader which will iterate over lines in the CSV file "f",
    which is encoded in the given encoding.
    """

    def __init__(self, f, dialect=csv.excel, encoding="utf-8", delimiter="\t", **kwds):
        f = UTF8Recoder(f, encoding)
        self.reader = csv.reader(f, dialect=dialect, delimiter=delimiter, **kwds)

    def next(self):
        row = self.reader.next()
        return [unicode(s, "utf-8") for s in row]

    def __iter__(self):
        return self

class UnicodeWriter:
    """
    A CSV writer which will write rows to CSV file "f",
    which is encoded in the given encoding.
    """

    def __init__(self, f, dialect=csv.excel, encoding="utf-8", delimiter="\t", **kwds):
        # Redirect output to a queue
        self.queue = StringIO()
        self.writer = csv.writer(self.queue, dialect=dialect, delimiter=delimiter, **kwds)
        self.stream = f
        self.encoder = codecs.getincrementalencoder(encoding)()

    def writerow(self, row):
        self.writer.writerow([s.encode("utf-8") for s in row])
        # Fetch UTF-8 output from the queue ...
        data = self.queue.getvalue()
        # data = data.encode("utf-8", "ignore")
        # ... and reencode it into the target encoding
        # data = self.encoder.encode(data)
        # write to the target stream
        self.stream.write(data)
        # empty queue
        self.queue.truncate(0)

    def writerows(self, rows):
        for row in rows:
            self.writerow(row)


text:
"""
These are data input download and prep scripts. They download and massage the data for the UBM calculations (calc.py)

"""
from __future__ import absolute_import, division, print_function, unicode_literals
import time
import urllib
try:
    # For Python 3.0 and later
    import urllib.request
except ImportError:
    # Fall back to Python 2's urllib2
    import urllib2

import re
import glob
import os
import arcpy
from arcpy.sa import *

def get_modis(tiles, save_path, months='', years=''):
    """The following script automatically retrieves monthly MODIS16 hdf file from the ntsg website.

    :param tiles: Tile number in format h##v##; based on grid from https://modis-land.gsfc.nasa.gov/MODLAND_grid.html
    :param save_path: name of output file name
    :param months: months of interest; defaults to [1,12]
    :param years: years of interest; defaults to [2000,2015]
    :return: saves files in outpath
    """

    from bs4 import BeautifulSoup
    if months == '':
        months = [1, 12]
    if years == '':
        years = [2000, 2015]

    mons = [str(i).zfill(2) for i in range(months[0], months[1] + 1)]
    yrs = [str(i) for i in range(years[0], years[1] + 1)]

    for tile in tiles:
        for yr in yrs:
            for m in mons:
                base_url = "http://files.ntsg.umt.edu/data/NTSG_Products/MOD16/MOD16A2_MONTHLY.MERRA_GMAO_1kmALB/"

                dir_path = "Y{:}/M{:}/".format(yr, m)
                url = base_url + dir_path
                soup = BeautifulSoup(urllib2.urlopen(url), "lxml")
                hdf_name = soup.find_all('', {
                    'href': re.compile('MOD16A2.A{:}M{:}.{:}.105'.format(yr, m, tile), re.IGNORECASE)})
                files = urllib.urlretrieve(url + hdf_name[0].text, save_path + hdf_name[0].text)
                print(save_path + hdf_name[0].text)
                time.sleep(0.5)

def get_file_list(save_path, wld='*.105*.hdf'):
    """

    Args:
        save_path: path to folder where raw MODIS files are
        wld: common wildcard in all of the raw MODIS files

    Returns:
        list of files to analyze in the raw folder

    """
    return glob.glob(os.path.join(save_path, wld))

def reproject_modis(files, save_path, data_type, eight_day=True, proj=102003):
    """Iterates through MODIS files in a folder reprojecting them.

    Takes the crazy MODIS sinusoidal projection to a user defined projection.

    Args:
        files: list of file paths of MODIS hdf files; created using files = glob.glob(os.path.join(save_path, '*.105*.hdf'))
        save_path: folder to store the reprojected files
        data_type: type of MODIS16 data being reprojected; options are 'ET','PET','LE', and 'PLE'
        eight_day: time span of modis file; Bool where default is true (input 8-day rasters)
        proj: projection of output data by epsg number; default is nad83 zone 12
    Returns:
        Reprojected MODIS files

    ..notes:
    The EPSG code for NAD83 Zone 12 is 26912.
    The EPSG code for Albers Equal Area is 102003
    http://files.ntsg.umt.edu/data/NTSG_Products/MOD16/MOD16_global_evapotranspiration_description.pdf
    https://modis-land.gsfc.nasa.gov/MODLAND_grid.html
    https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/mod16a2_v006<
    https://search.earthdata.nasa.gov/search/granules?p=C1000000524-LPDAAC_ECS&m=36.87890625!-114.50390625!5!1!0!0%2C2&tl=1503517150!4!!&q=MOD16A2+V006&sb=-114.29296875%2C36.80859375%2C-109.96875%2C42.2578125
    """
    import pymodis
    # dictionary to designate a directory
    datadir = {'ET': '/ET/', 'PET': '/PET/', 'LE': '/LE/', 'PLE': '/PLE/'}
    # dictionary to select layer from hdf file that contains the datatype
    matrdir = {'ET': [1, 0, 0, 0], 'LE': [0, 1, 0, 0], 'PET': [0, 0, 1, 0], 'PLE': [0, 0, 0, 1]}

    # check for file folder and make it if it doesn't exist
    if not os.path.exists(save_path + datadir[data_type]):
        os.makedirs(save_path + datadir[data_type])
        print('created {:}'.format(save_path + datadir[data_type]))

    for f in files:
        year = f.split('\\')[1].split('.')[1][1:5]

        v = f.split('\\')[1].split('.')[2][-2:]  # parse v (cell coordinate) from hdf filename
        h = f.split('\\')[1].split('.')[2][1:3]  # parse h (cell coordinate) from hdf filename

        # names file based on time span of input rasters; 8-day by default
        if eight_day:
            doy = f.split('\\')[1].split('.')[1][-3:]  # parse day of year from hdf filename
            fname = 'A' + year + 'D' + doy + 'h' + h + 'v' + v
            pref = os.path.join(save_path + datadir[data_type] + fname)
        else:
            month = f.split('\\')[1].split('.')[1][-2:]  # parse month from hdf filename
            fname = 'A' + year + 'M' + month + 'h' + h + 'v' + v
            pref = os.path.join(save_path + datadir[data_type] + fname)

        convertsingle = pymodis.convertmodis_gdal.convertModisGDAL(hdfname=f, prefix=pref,
                                                                   subset=matrdir[data_type],
                                                                   res=1000, epsg=proj)
        # [ET,LE,PET,PLE]
        try:
            convertsingle.run()
        except:
            print(fname + ' failed!')
            pass

def clip_and_fix(path, outpath, data_type, area=''):
    """Clips raster to Utah's Watersheds and makes exception values null.

    Args:
        path: folder of the reprojected MODIS files
        outpath: ESRI gdb to store the clipped files
        data_type: type of MODIS16 data being reprojected; options are 'ET','PET','LE', and 'PLE'
        area: path to polygon used to clip tiles

    """
    # Check out the ArcGIS Spatial Analyst extension license
    arcpy.CheckOutExtension("Spatial")

    arcpy.env.workspace = path
    arcpy.env.overwriteOutput = True

    if area == '':
        area = 'H:/GIS/Calc.gdb/WBD_UT'

    arcpy.env.mask = area
    arcpy.CheckOutExtension("spatial")
    for rast in arcpy.ListRasters():
        calc = SetNull(arcpy.Raster(rast) > 32700, arcpy.Raster(rast))
        calc.save(outpath + data_type + rast[1:5] + rast[6:8] + 'h' + rast[10:11] + 'v' + rast[13:14])
        print(outpath + data_type + rast[1:5] + rast[6:8] + 'h' + rast[10:11] + 'v' + rast[13:14])

def merge_rasts(path, data_type='ET', monthRange='', yearRange='', outpath=''):
    """Mosaics (merges) different MODIS cells into one layer.

    """
    if monthRange == '':
        monthRange = [1, 12]
    if yearRange == '':
        yearRange = [2000, 2015]
    if outpath == '':
        outpath = path

    arcpy.env.workspace = path
    outCS = arcpy.SpatialReference('NAD 1983 UTM Zone 12N')
    for y in range(yearRange[0], yearRange[-1] + 1):  # set years converted here
        for m in range(monthRange[0], monthRange[-1] + 1):  # set months converted here
            nm = data_type + str(y) + str(m).zfill(2)
            rlist = []
            for rast in arcpy.ListRasters(nm + '*'):
                rlist.append(rast)
            try:
                arcpy.MosaicToNewRaster_management(rlist, outpath, nm + 'c', outCS, \
                                                   "16_BIT_UNSIGNED", "1000", "1", "LAST", "LAST")

                print(path + nm + 'c')
            except:
                print(nm + ' failed!')
                pass

def scale_modis(path, out_path, scaleby=10000.0, data_type='ET', monthRange=[1, 12], yearRange=[2000, 2014]):
    """

    :param path: directory to unconverted modis tiles
    :param out_path: directory to put output in
    :param scaleby: scaling factor for MODIS data; default converts to meters/month
    :param data_type: type of MODIS16 data being scaled; used for file name; options are 'ET','PET','LE', and 'PLE'
    :param monthRange: range of months to process data
    :param yearRange: range of years to process data
    :return:
    """
    arcpy.CheckOutExtension("spatial")

    for y in range(yearRange[0], yearRange[-1] + 1):  # set years converted here
        for m in range(monthRange[0], monthRange[-1] + 1):  # set months converted here
            nm = data_type + str(y) + str(m).zfill(2)
            calc = Divide(nm + 'c', scaleby)
            calc.save(out_path + nm)

def untar(filepath, outfoldername='.', compression='r', deletesource=False):
    """
    Given an input tar archive filepath, extracts the files.
    Required: filepath -- the path to the tar archive
    Optional: outfoldername -- the output directory for the files; DEFAULT is directory with tar archive
              compression -- the type of compression used in the archive; DEFAULT is 'r'; use "r:gz" for gzipped archives
              deletesource -- a boolean argument determining whether to remove the archive after extraction; DEFAULT is false
    Output:   filelist -- the list of all extract files
    """
    import tarfile

    with tarfile.open(filepath, compression) as tfile:
        filelist = tfile.getnames()
        tfile.extractall(path=outfoldername)

    if deletesource:
        try:
            os.remove(filepath)
        except:
            raise Exception("Could not delete tar archive {0}.".format(filepath))

    return filelist

def ungz(filepath, compression='rb', deletesource=False):
    """
    Given an input gz archive filepath, extracts the files.
    Required: filepath -- the path to the tar archive
    Optional: outfoldername -- the output directory for the files; DEFAULT is directory with tar archive
              compression -- the type of compression used in the archive; DEFAULT is 'r'; use "r:gz" for gzipped archives
              deletesource -- a boolean argument determining whether to remove the archive after extraction; DEFAULT is false
    Output:   filelist -- the list of all extract files
    """

    import gzip

    with gzip.open(filepath, compression) as f:
        outF = open(filepath[:-3], 'wb')
        outF.write(f.read())
        f.close()
        outF.close()
    if deletesource:
        try:
            os.remove(filepath)
        except:
            raise Exception("Could not delete gz archive {0}.".format(filepath))

    return filepath[:-3]

def replace_hdr_file(hdrfile):
    """
    Replace the .hdr file for a .bil raster with the correct data for Arc processing
    Required: hdrfile -- filepath for .hdr file to replace/create
    Output:   None
    """
    # hdr file replacment string
    HDRFILE_STRING = "byteorder M\nlayout bil\nnbands 1\nnbits 16\nncols 6935\nnrows 3351\n\
    ulxmap -124.729583333331703\nulymap 52.871249516804028\nxdim 0.00833333333\nydim 0.00833333333\n"
    with open(hdrfile, 'w') as o:
        o.write(HDRFILE_STRING)

def get_snodas(out_dir, months='', years=''):
    """Downloads daily SNODAS data from ftp.  This is slow.

    :param out_dir: directory to store downloaded SNODAS zip files
    :param months: months desired for download
    :param years: years desired for download
    :return: saved zip files in out_dir

    .. note:
    Use polaris: http://nsidc.org/data/polaris/
    """
    import ftplib

    if months == '':
        months = [1, 12]
    if years == '':
        years = [2000, 2015]

    monnames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    mons = [str(i).zfill(2) + "_" + monnames[i - 1] for i in range(months[0], months[1] + 1)]

    yrs = [str(i) for i in range(years[0], years[1] + 1)]

    for yr in yrs:
        for m in mons:
            ftp_addr = "sidads.colorado.edu"
            ftp = ftplib.FTP(ftp_addr)
            ftp.login()

            dir_path = "pub/DATASETS/NOAA/G02158/masked/" + yr + "/" + m + "/"
            ftp.cwd(dir_path)
            files = ftp.nlst()

            for f in files:
                if len(f) > 4:
                    save_file = open(out_dir + "/" + f, 'wb')
                    ftp.retrbinary("RETR " + f, save_file.write)
                    save_file.close()
                    print(f)
            ftp.close()

def rename_polaris_snodas(path):
    prodcode = {'us_ssmv11038wS__A': 'SPAT', 'us_ssmv11044bS__T': 'SNML', 'us_ssmv11050lL00T': 'SPSB',
                'us_ssmv11034tS__T': 'SWEQ', 'us_ssmv01025SlL00': 'RAIN', 'us_ssmv01025SlL01': 'SNOW',
                'us_ssmv11036tS__T': 'SNOD', 'us_ssmv11039lL00T': 'BSSB'}

    for filename in os.listdir(path):
        if filename.startswith("us_ssmv"):
            code = prodcode[filename[0:17]]
            yrsrt = filename.find('TNATS') + 5
            yr = filename[yrsrt:yrsrt + 4]
            mo = filename[yrsrt + 4:yrsrt + 6]
            dy = filename[yrsrt + 6:yrsrt + 8]
            try:
                os.rename(os.path.join(path, filename), os.path.join(path, code + yr + mo + dy + filename[-4:]))
            except:
                pass

def snow_summary(code, scalingFactor, statistics="SUM", outcellsize='1000', monthRange='', yearRange='',
                 path="H:/GIS/SNODAS/SNWDS/", outpath="H:/GIS/SNODAS.gdb/", area=''):
    """
    summarizes daily SNODAS data to monthly values

    INPUT
    -----
    code = text; prefix of dataset to use; choices are 'RAIN','SWEQ','SNOD','SPAT','BSSB','SNML', or 'SPSB'
    scalingFactor = float; table 1 at http://nsidc.org/data/docs/noaa/g02158_snodas_snow_cover_model/
    statistics = text; from arcpy sa CellStatistics; choices are MEAN, MAJORITY, MAXIMUM, MEDIAN, MINIMUM, MINORITY,
                    RANGE, STD, SUM, or VARIETY
    monthRange = len 2 list; begin and end month of data you wish to analyze
    yearRange = len 2 list; bengin and end year of data you wish to analyze
    path = directory where raw geoTiffs are located
    outpath = directory where final data will be stored

    OUTPUT
    ------
    projected and scaled monthly rasters

    """
    if monthRange == '':
        months = [1, 12]
    if yearRange == '':
        years = [2000, 2015]

    g = {}
    arcpy.env.workspace = path
    arcpy.env.overwriteOutput = True
    if area == '':
        area = 'H:/GIS/Calc.gdb/WBD_UT'
    # arcpy.env.mask = area

    statstype = {'MEAN': 'AVG', 'MAJORITY': 'MAJ', 'MAXIMUM': 'MAX', 'MEDIAN': 'MED', 'MINIMUM': 'MIN',
                 'MINORITY': 'MNR',
                 'RANGE': 'RNG', 'STD': 'STD', 'SUM': 'SUM', 'VARIETY': 'VAR'}

    for y in range(yearRange[0], yearRange[1] + 1):  # set years converted here
        for m in range(monthRange[0], monthRange[1] + 1):  # set months converted here
            g[code + str(y) + str(m).zfill(2)] = []  # this defines the dictionary key based on data type month and year
            for name in sorted(
                    glob.glob(path + code + '*.tif')):  # pick all tiff files from raw data folder of a data type
                rast = os.path.basename(name)
                if rast[0:4] == code and int(rast[4:8]) == y and int(rast[8:10]) == m:
                    g[code + str(y) + str(m).zfill(2)].append(rast)  # create a list of rasters for each month
                else:
                    pass
            if len(g[code + str(y) + str(m).zfill(2)]) > 0:
                # print(g[code+str(y)+str(m).zfill(2)])
                # ifnull = 'in_memory/ifnull'
                # arcpy sa functions that summarize the daily data to monthly data
                cellstats = CellStatistics(g[code + str(y) + str(m).zfill(2)], statistics_type=statistics,
                                           ignore_nodata="DATA")
                div = Divide(cellstats, scalingFactor)  # scale factor, converts to kg/m2 10 then to m 0.001
                calc = Con(div < 0.0, 0.0, div)  # remove negative and null values
                ifnull = Con(IsNull(calc), 0, calc)  # remove null
                # WKID 102039
                outCS = arcpy.SpatialReference(102039)  # change coordinate units to m for spatial analysis
                # define save path for file
                outnm = outpath + rast[0:4] + str(y).zfill(2) + str(m).zfill(2) + statstype[statistics]
                memoryFeature = "in_memory/myMemoryFeature"
                # memoryFeature = outnm
                arcpy.ProjectRaster_management(ifnull, memoryFeature, outCS, 'BILINEAR', outcellsize,
                                               'WGS_1984_(ITRF00)_To_NAD_1983', '#', '#')
                # Execute ExtractByMask to clip snodas data to Utah watersheds
                extrc = arcpy.sa.ExtractByMask(memoryFeature, area)
                extrc.save(outnm)
                print(outnm)
                arcpy.Delete_management("in_memory")

def totalavg(code, statistics="MEAN", monthRange=[1, 12], yearRange=[2003, 2016],
             path="H:/GIS/SNODAS/SNODASproj.gdb/", outpath="H:/GIS/SNODAS/SNODASproj.gdb/"):
    """Summarizes daily raster data into monthly data.

    INPUT
    -----
        code = string with four letters represting data type to summarize (example 'BSSB')
        statistics = how data will be summarized; defaults to monthly averages; options are
            ['MEAN','MAJORITY','MAXIMUM','MEDIAN','MINIMUM','MINORITY','RANGE','STD','SUM','VARIETY']
            Most common are 'MEAN','MEDIAN', and 'SUM'
            These are inputs that will be used in the ArcPy CellStatistics function.
            See http://pro.arcgis.com/en/pro-app/tool-reference/spatial-analyst/cell-statistics.htm for documentation
        monthRange = beginning and end months of summary statistics
        yearRange = beginning and end years of summary statistics
        path = location of geodatabase of data to summarize
        outpath = location of geodatabase where output data should be stored
    OUTPUT
    ------
        summary raster(s) stored in outpath

    """
    g = {}
    statstype = {'MEAN': 'AVG', 'MAJORITY': 'MAJ', 'MAXIMUM': 'MAX', 'MEDIAN': 'MED', 'MINIMUM': 'MIN',
                 'MINORITY': 'MNR',
                 'RANGE': 'RNG', 'STD': 'STD', 'SUM': 'SUM', 'VARIETY': 'VAR'}
    arcpy.env.workspace = path
    arcpy.env.overwriteOutput = True

    # iterate over month range set here; default is 1 to 12 (Jan to Dec)
    for m in range(monthRange[0], monthRange[1] + 1):

        # this defines the dictionary key based on data type, month, and year
        g[code + '0000' + str(m).zfill(2)] = []

        # pick all tiff files from raw data folder of a data type
        for rast in arcpy.ListRasters():
            yrrng = range(yearRange[0], yearRange[1] + 1)  # set years converted here

            # create a list of rasters with the right code and month and year
            if rast[0:4] == code and int(rast[4:8]) in yrrng and int(rast[8:10]) == m:
                g[code + '0000' + str(m).zfill(2)].append(rast)  # create a list of rasters for each month
            else:
                pass
        if len(g[code + '0000' + str(m).zfill(2)]) > 0:
            # arcpy sa functions that summarize the daily data to monthly data
            calc = CellStatistics(g[code + '0000' + str(m).zfill(2)], statistics_type=statistics, ignore_nodata="DATA")
            calc.save(code + '0000' + str(m).zfill(2) + statstype[statistics])
            print(code + '0000' + str(m).zfill(2) + statstype[statistics])

if __name__ == '__main__':
    main()


text:
layout: default
title: "Earl of Home"
house: lords

---

        {% include members/earl-of-home.html %}

What is Earl of Home interested in?

Earl of Home hasn't said he is interested in anything! Why not write to them and ask?

Party

Earl of Home is part of the Conservative party.

What is a party?


text:
using LandSky.Components;
using LandSky.DotNetExt;
using LandSky.Screen;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace LandSky.Game.Cns
{
    public class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Enter Seed");
            var seed = Console.ReadLine();
            var Map = new SandboxMap(0, 0);
            var Engine = new Engine("MyEngine");
            var Me = new Player("Branimir");
            var InfPlain = new InfinitePlane(seed, "MyPlayn");

            Engine.Connect("localhost:52062");
            Engine.PushNewScreenOnTop(Map);
            Engine.PushNewComponentOnActiveScreen(Me);
            Engine.PushNewComponentOnActiveScreen(InfPlain);

            Task.Factory.StartNew(() =>
            {
                while (true)
                {
                    var a = System.Console.ReadKey(true);
                    Engine.InputNextCommand(new MyConsoleKeyInfo(a.KeyChar), "Branimir");
                }
            });

            try
            {
                Console.CursorVisible = false;
            }
            catch { }
            Console.Clear();
            Task.Factory.StartNew(() =>
            {
                while (true)
                {
                    Engine.SetActiveComponent(Me, Console.WindowWidth - 10, Console.WindowHeight - 10);

                    var threadSafely = Engine.RenderAroundComponent();
                    System.Console.Clear();
                    System.Console.Write(threadSafely);
                    Thread.Sleep(100);
                }
            });
            Thread.Sleep(int.MaxValue);
        }
    }
}


text:
use aws::request::ApiClient;
use aws::credentials::Credentials;
// use std::io::Read;
use rustc_serialize::json::{Json, Parser};

use rusqlite;
use rusqlite::SqliteConnection;
use std::path::{Path};

use std::io::Read;

pub fn list_vaults_for_user(access_key: &str, secret_key: &str) -> Option<Vec<Json>> {
  let cred = Credentials::create(access_key, secret_key);
  let region = "us-east-1";
  let service = "glacier";

  let client = ApiClient::new(cred, region, service);
  let res = client.get("vaults");
  let mut output: String = String::new();
  res.unwrap().read_to_string(&mut output);

  let data = Json::from_str(&output).unwrap();

  let obj = data.as_object().unwrap();
  println!("vault.list: {:?}", obj.get("VaultList").unwrap().as_array().unwrap());
  Some(obj.get("VaultList").unwrap().as_array().unwrap().clone())
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 317663 $ -->

<refentry xml:id="solrparams.unserialize" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>SolrParams::unserialize</refname>
  <refpurpose>Used for custom serialization</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>final</modifier> <modifier>public</modifier> <type>void</type><methodname>SolrParams::unserialize</methodname>
   <methodparam><type>string</type><parameter>serialized</parameter></methodparam>
  </methodsynopsis>
  <para>
   Used for custom serialization
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>serialized</parameter></term>
     <listitem>
      <para>
      The serialized representation of the object
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
  None
  </para>
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->


text:
taskName = "Format with placeholders";

function Main(bufferElement) {
// Input
    var text = "My name is #{name} and I am #{age}-years-old'?", // Change value to TEST
        options = { name: 'John', age: 13 };
    // Solution
    String.prototype.format = function stringFormat(str) {
        if (str.age === undefined) {
            return this.replace(/#{name}/g, str.name);
        }

        return this.replace(/#{name}/g, str.name).replace(/#{age}/g, str.age);
    };
    // Output
    WriteLine(text + "  " + JSON.stringify(options));
    WriteLine();
    WriteLine(text.format(options));
}


text:
using System;
using JetBrains.Annotations;
using LessGravity.Core.Logging;
using LessGravity.Engine.Game;
using LessGravity.Engine.Game.Settings;
using SharpDX.Direct3D;
using SharpDX.Direct3D11;
using SharpDX.DXGI;
using Device = SharpDX.Direct3D11.Device;

namespace LessGravity.Engine
{
    [UsedImplicitly]
    public class DeviceFactory : IDeviceFactory
    {
        private readonly ILogger _logger;
        private readonly IGameSettings _gameSettings;
        private SwapChain _swapChain;

        public SwapChain SwapChain
        {
            get
            {
                if (_swapChain == null)
                {
                    throw new NullReferenceException(nameof(SwapChain));
                }
                return _swapChain;
            }
        }

        public DeviceFactory(ILogger logger, IGameSettings gameSettings)
        {
            _logger = logger;
            _gameSettings = gameSettings;
        }

        private Device CreateDevice(IntPtr windowHandle, bool isDebug, bool createSoftwareDevice)
        {
            var label = $"{(createSoftwareDevice ? "Software" : "Hardware")}{(isDebug ? "Debug" : "")}Device";
            _logger.Debug($"Creating {label}...", "Device Factory");
            var backBufferWidth = _gameSettings.Video.WindowWidth;
            var backBufferHeight = _gameSettings.Video.WindowHeight;
            var isWindowed = _gameSettings.Video.DisplayMode == DisplayMode.Windowed;

            var swapChainDescription = new SwapChainDescription
            {
                BufferCount = 1,
                ModeDescription = new ModeDescription
                {
                    Format = Format.R8G8B8A8_UNorm_SRgb,
                    Height = backBufferHeight,
                    RefreshRate = new Rational
                    {
                        Denominator = 1,
                        Numerator = 60
                    },
                    Width = backBufferWidth
                },
                IsWindowed = isWindowed,
                OutputHandle = windowHandle,
                Flags = SwapChainFlags.AllowModeSwitch,
                SampleDescription = new SampleDescription
                {
                    Count = 1,
                    Quality = 0
                },
                SwapEffect = SwapEffect.Discard,
                Usage = Usage.RenderTargetOutput
            };
            var deviceCreationFlags = DeviceCreationFlags.BgraSupport;
            if (isDebug)
            {
                deviceCreationFlags |= DeviceCreationFlags.Debug;
            }

            var driverType = createSoftwareDevice
                ? DriverType.Software
                : DriverType.Hardware;

            Device.CreateWithSwapChain(driverType, deviceCreationFlags, swapChainDescription, out var device, out var swapChain);

            _swapChain = swapChain;
            _logger.Debug($"Creating {label}...Done", "Device Factory");
            return device;
        }

        public Device CreateHardwareDevice(IntPtr windowHandle)
        {
            return CreateDevice(windowHandle, false, false);
        }

        public Device CreateHardwareDebugDevice(IntPtr windowHandle)
        {
            return CreateDevice(windowHandle, true, false);
        }

        public Device CreateSoftwareDevice(IntPtr windowHandle)
        {
            return CreateDevice(windowHandle, false, true);
        }

        public Device CreateSoftwareDebugDevice(IntPtr windowHandle)
        {
            return CreateDevice(windowHandle, true, true);
        }
    }
}


text:
/*#if NODE*/var QFindOne=/*#/if*/
includeCore('base/Model.QFindOne');

/*#ifelse BROWSER*/(var QFindValue||module.exports)/*#/if*/=QFindOne.extend({
	fetch:function(callback,callbackFailed){
		return this._fetch(function(result){
			callback(result ? result[this.options.fields[0]] : undefined);
		}.bind(this),callbackFailed);
	}
});


text:
namespace Algorithms.Core.Graphs
{
    ///
    /// The <tt>KosarajuSharirSCC</tt> class represents a data type for
    /// determining the strong components in a digraph.
    /// The id operation determines in which strong component
    /// a given vertex lies; the areStronglyConnected operation
    /// determines whether two vertices are in the same strong component;
    /// and the count operation determines the number of strong
    /// components.
    /// The component identifier of a component is one of the
    /// vertices in the strong component: two vertices have the same component
    /// identifier if and only if they are in the same strong component.
    ///

    /// This implementation uses the Kosaraju-Sharir algorithm.
    /// The constructor takes time proportional to V + E
    /// (in the worst case),
    /// where V is the number of vertices and E is the number of edges.
    /// Afterwards, the id, count, and areStronglyConnected
    /// operations take constant time.
    /// For alternate implementations of the same API, see
    /// {@link TarjanSCC} and {@link GabowSCC}.
    ///

    ///
    public class KosarajuSharirSCC
    {
        private readonly bool[] _marked;     // marked[v] = has vertex v been visited?
        private readonly int[] _id;             // id[v] = id of strong component containing v
        private readonly int _count;            // number of strongly-connected components

        ///
        /// Computes the strong components of the digraph <tt>G</tt>.
        ///
        /// <param name="g">g the digraph</param>
        public KosarajuSharirSCC(Digraph g)
        {

            // compute reverse postorder of reverse graph
            var dfs = new DepthFirstOrder(g.Reverse());

            // run DFS on G, using reverse postorder to guide calculation
            _marked = new bool[g.V];
            _id = new int[g.V];
            foreach (int v in dfs.ReversePost())
            {
                if (!_marked[v])
                {
                    Dfs(g, v);
                    _count++;
                }
            }

            // check that id[] gives strong components
            //assert check(G);
        }

        ///
        /// DFS on graph G
        ///
        /// <param name="g"></param>
        /// <param name="v"></param>
        private void Dfs(Digraph g, int v)
        {
            _marked[v] = true;
            _id[v] = _count;
            foreach (int w in g.Adj(v))
            {
                if (!_marked[w]) Dfs(g, w);
            }
        }

        ///
        /// Returns the number of strong components.
        ///
        /// <returns>the number of strong components</returns>
        public int Count()
        {
            return _count;
        }

        ///
        /// Are vertices <tt>v</tt> and <tt>w</tt> in the same strong component?
        ///
        /// <param name="v">v one vertex</param>
        /// <param name="w">w the other vertex</param>
        /// <returns><tt>true</tt> if vertices <tt>v</tt> and <tt>w</tt> are in the same strong component, and <tt>false</tt> otherwise</returns>
        public bool StronglyConnected(int v, int w)
        {
            return _id[v] == _id[w];
        }

        ///
        /// Returns the component id of the strong component containing vertex <tt>v</tt>.
        ///
        /// <param name="v">v the vertex</param>
        /// <returns>the component id of the strong component containing vertex <tt>v</tt></returns>
        public int Id(int v)
        {
            return _id[v];
        }

        ///
        /// does the id[] array contain the strongly connected components?
        ///
        /// <param name="g"></param>
        /// <returns></returns>
        public bool Check(Digraph g)
        {
            var tc = new TransitiveClosure(g);
            for (var v = 0; v < g.V; v++)
            {
                for (var w = 0; w < g.V; w++)
                {
                    if (StronglyConnected(v, w) != (tc.Reachable(v, w) && tc.Reachable(w, v)))
                        return false;
                }
            }
            return true;
        }

    }
}


text:
package net.mgsx.game.examples.platformer.animations;

import com.badlogic.ashley.core.Component;
import com.badlogic.ashley.core.ComponentMapper;

import net.mgsx.game.core.annotations.Editable;
import net.mgsx.game.core.annotations.EditableComponent;
import net.mgsx.game.core.annotations.EnumType;
import net.mgsx.game.core.annotations.Storable;

@Storable("demo.platformer.character")
@EditableComponent(autoClone=true)
public class Character2D implements Component
{

	public final static ComponentMapper<Character2D> components = ComponentMapper.getFor(Character2D.class);

	/** character orientation. 2D character maybe be rotated in 2D plan
	 * but it can be mirrored in some way to reflect its direction. */
	@Editable public boolean rightToLeft;

	/**
	 * degree per seconds
	 */
	@Editable(type=EnumType.UNIT)
	public float angularSpeed = 10f;

	/**
	 * fake 3D rotation with a bias
	 */
	@Editable(type=EnumType.UNIT)
	public float angleRange = 75f; // angle

	public float angle;

	@Editable
	public boolean facing = false;
}


text:
RSpec.describe ThreeScaleToolbox::Commands::ServiceCommand::CopyCommand::CopyActiveDocsTask do
  context '#call' do
    let(:source_service_id) { 10 }
    let(:target_service_id) { 20 }
    let(:source) { instance_double(ThreeScaleToolbox::Entities::Service, 'source') }
    let(:target) { instance_double(ThreeScaleToolbox::Entities::Service, 'target') }
    let(:remote) { instance_double(ThreeScale::API::Client, 'remote') }
    let(:activedocs_class) { class_double(ThreeScaleToolbox::Entities::ActiveDocs).as_stubbed_const }
    let(:activedocs0) { instance_double(ThreeScaleToolbox::Entities::ActiveDocs, 'activedocs0') }
    let(:activedocs0_attrs) do
      {
        'id' => 1, 'name' => 'ad_0', 'system_name' => 'ad_0', 'service_id' => source_service_id
      }
    end
    let(:target_ad_service_id) { target_service_id }
    let(:tgt_activedocs) { instance_double(ThreeScaleToolbox::Entities::ActiveDocs, 'tgt_activedocs') }
    let(:tgt_activedocs_attrs) do
      activedocs0_attrs.merge('id' => 2, 'service_id' => target_ad_service_id)
    end
    let(:activedocs) { [activedocs0] }
    let(:task_context) { { source: source, target: target, logger: Logger.new('/dev/null') } }

    subject { described_class.new(task_context) }

    before :example do
      expect(source).to receive(:activedocs).and_return(activedocs)
      allow(target).to receive(:remote).and_return(remote)
      allow(target).to receive(:id).and_return(target_service_id)
      allow(activedocs0).to receive(:system_name).and_return(activedocs0_attrs.fetch('system_name'))
      allow(activedocs0).to receive(:attrs).and_return(activedocs0_attrs)
      allow(activedocs0).to receive(:id).and_return(1)
      allow(tgt_activedocs).to receive(:system_name).and_return(tgt_activedocs_attrs.fetch('system_name'))
      allow(tgt_activedocs).to receive(:attrs).and_return(tgt_activedocs_attrs)
      allow(tgt_activedocs).to receive(:id).and_return(2)
    end

    context 'target activedocs not found' do
      let(:expected_create_attrs) do
        { 'name' => 'ad_0', 'system_name' => 'ad_0', 'service_id' => target_service_id }
      end

      before :example do
        expect(activedocs_class).to receive(:find_by_system_name).with(remote: remote, system_name: 'ad_0')
          .and_return(nil)
      end

      it 'activedocs created' do
        expect(activedocs_class).to receive(:create).with(remote: remote,
                                                          attrs: expected_create_attrs)
                                                    .and_return(tgt_activedocs)
        subject.call
      end
    end

    context 'target activedocs found' do

      before :example do
        expect(activedocs_class).to receive(:find_by_system_name).with(remote: remote, system_name: 'ad_0')
          .and_return(tgt_activedocs)
      end

      context 'activedocs owned by target service' do

        let(:expected_update_attrs) do
          { 'name' => 'ad_0', 'system_name' => 'ad_0', 'service_id' => target_service_id }
        end

        it 'activedocs updated' do
          expect(tgt_activedocs).to receive(:update).with(expected_update_attrs)

          subject.call
        end
      end

      context 'activedocs not owned by target service' do
        let(:new_tgt_activedocs) { instance_double(ThreeScaleToolbox::Entities::ActiveDocs, 'new_tgt_activedocs') }
        let(:target_ad_service_id) { target_service_id + 10 }

        let(:expected_create_attrs) do
          { 'name' => 'ad_0', 'system_name' => "ad_0#{target_service_id}", 'service_id' => target_service_id }
        end

        before :example do
          allow(new_tgt_activedocs).to receive(:system_name).and_return(tgt_activedocs_attrs.fetch('system_name'))
          allow(new_tgt_activedocs).to receive(:attrs).and_return(tgt_activedocs_attrs)
          allow(new_tgt_activedocs).to receive(:id).and_return(3)
        end

        it 'activedocs created' do
          expect(activedocs_class).to receive(:create).with(remote: remote,
                                                            attrs: expected_create_attrs)
                                                      .and_return(new_tgt_activedocs)
          subject.call
        end
      end
    end
  end
end


text:
describe('unspiderfy', function () {
	/////////////////////////////
	// SETUP FOR EACH TEST
	/////////////////////////////
	var div, map, group, clock;

	beforeEach(function () {
		clock = sinon.useFakeTimers();

		div = document.createElement('div');
		div.style.width = '200px';
		div.style.height = '200px';
		document.body.appendChild(div);

		map = L.map(div, { maxZoom: 18, trackResize: false });

		// Corresponds to zoom level 8 for the above div dimensions.
		map.fitBounds(new L.LatLngBounds([
			[1, 1],
			[2, 2]
		]));
	});

	afterEach(function () {
		if (group instanceof L.MarkerClusterGroup) {
			group.removeLayers(group.getLayers());
			map.removeLayer(group);
		}
		map.remove();
		div.remove();

		clock.restore();

		div = map = group = clock = null;
	});

	/////////////////////////////
	// TESTS
	/////////////////////////////
	it('Unspiderfies 2 Markers', function () {

		group = new L.MarkerClusterGroup();

		var marker = new L.Marker([1.5, 1.5]);
		var marker2 = new L.Marker([1.5, 1.5]);

		group.addLayer(marker);
		group.addLayer(marker2);
		map.addLayer(group);

		marker.__parent.spiderfy();

		clock.tick(1000);

		group.unspiderfy();

		clock.tick(1000);

		expect(map.hasLayer(marker)).to.be(false);
		expect(map.hasLayer(marker2)).to.be(false);
	});

	it('Unspiderfies 2 CircleMarkers', function () {

		group = new L.MarkerClusterGroup();

		var marker = new L.CircleMarker([1.5, 1.5]);
		var marker2 = new L.CircleMarker([1.5, 1.5]);

		group.addLayer(marker);
		group.addLayer(marker2);
		map.addLayer(group);

		marker.__parent.spiderfy();

		clock.tick(1000);

		group.unspiderfy();

		clock.tick(1000);

		expect(map.hasLayer(marker)).to.be(false);
		expect(map.hasLayer(marker2)).to.be(false);
	});

	it('Unspiderfies 2 Circles', function () {

		group = new L.MarkerClusterGroup();

		var marker = new L.Circle([1.5, 1.5], 10);
		var marker2 = new L.Circle([1.5, 1.5], 10);

		group.addLayer(marker);
		group.addLayer(marker2);
		map.addLayer(group);

		marker.__parent.spiderfy();

		clock.tick(1000);

		group.unspiderfy();

		clock.tick(1000);

		expect(map.hasLayer(marker)).to.be(false);
		expect(map.hasLayer(marker2)).to.be(false);
	});

	it('fires unspiderfied event on unspiderfy', function (done) {

		group = new L.MarkerClusterGroup();

		var marker = new L.Marker([1.5, 1.5]);
		var marker2 = new L.Marker([1.5, 1.5]);

		group.addLayers([marker, marker2]);
		map.addLayer(group);

		marker.__parent.spiderfy();

		clock.tick(1000);

		// Add event listener
		group.on('unspiderfied', function (event) {
			expect(event.target).to.be(group);
			expect(event.cluster).to.be.a(L.Marker);
			expect(event.markers[1]).to.be(marker);
			expect(event.markers[0]).to.be(marker2);

			done();
		});

		group.unspiderfy();

		clock.tick(1000);

	});

});


text:
CXXFLAGS += -std=c++11 -Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wno-ctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wno-float-equal
CPPFLAGS += -I ../single_include -I . -I thirdparty/catch -I thirdparty/fifo_map -DCATCH_CONFIG_FAST_COMPILE

SOURCES = src/unit.cpp \
          src/unit-algorithms.cpp \
          src/unit-allocator.cpp \
          src/unit-alt-string.cpp \
          src/unit-capacity.cpp \
          src/unit-cbor.cpp \
          src/unit-class_const_iterator.cpp \
          src/unit-class_iterator.cpp \
          src/unit-class_lexer.cpp \
          src/unit-class_parser.cpp \
          src/unit-comparison.cpp \
          src/unit-concepts.cpp \
          src/unit-constructor1.cpp \
          src/unit-constructor2.cpp \
          src/unit-convenience.cpp \
          src/unit-conversions.cpp \
          src/unit-deserialization.cpp \
          src/unit-element_access1.cpp \
          src/unit-element_access2.cpp \
          src/unit-inspection.cpp \
          src/unit-items.cpp \
          src/unit-iterators1.cpp \
          src/unit-iterators2.cpp \
          src/unit-merge_patch.cpp \
          src/unit-json_patch.cpp \
          src/unit-json_pointer.cpp \
          src/unit-meta.cpp \
          src/unit-modifiers.cpp \
          src/unit-msgpack.cpp \
          src/unit-pointer_access.cpp \
          src/unit-readme.cpp \
          src/unit-reference_access.cpp \
          src/unit-regression.cpp \
          src/unit-serialization.cpp \
          src/unit-testsuites.cpp \
          src/unit-ubjson.cpp \
          src/unit-unicode.cpp \
          src/unit-wstring.cpp

OBJECTS = $(SOURCES:.cpp=.o)

TESTCASES = $(patsubst src/unit-%.cpp,test-%,$(wildcard src/unit-*.cpp))

##############################################################################
# main rules
##############################################################################

all: $(TESTCASES)

clean:
	rm -fr json_unit $(OBJECTS) $(SOURCES:.cpp=.gcno) $(SOURCES:.cpp=.gcda) $(TESTCASES) $(FUZZERS)

##############################################################################
# single test file
##############################################################################

json_unit: $(OBJECTS) ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
	@echo "[CXXLD] $@"
	@$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@

%.o: %.cpp ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
	@echo "[CXX]   $@"
	@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@

##############################################################################
# individual test cases
##############################################################################

test-%: src/unit-%.o src/unit.o ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
	@echo "[CXXLD] $@"
	@$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $< src/unit.o -o $@

TEST_PATTERN ?= "*"
TEST_PREFIX = ""
check: $(OBJECTS) $(TESTCASES)
	@cd .. ; for testcase in $(TESTCASES); do echo "Executing $$testcase..."; $(TEST_PREFIX)test/$$testcase $(TEST_PATTERN) || exit 1; done

##############################################################################
# fuzzer
##############################################################################

FUZZER_ENGINE = src/fuzzer-driver_afl.cpp
FUZZERS = parse_afl_fuzzer parse_cbor_fuzzer parse_msgpack_fuzzer parse_ubjson_fuzzer
fuzzers: $(FUZZERS)

parse_afl_fuzzer:
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_json.cpp -o $@

parse_cbor_fuzzer:
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_cbor.cpp -o $@

parse_msgpack_fuzzer:
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_msgpack.cpp -o $@

parse_ubjson_fuzzer:
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_ubjson.cpp -o $@


text:
<?php

namespace app\models;

use Yii;
use yii\base\NotSupportedException;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\web\IdentityInterface;

/**
 * This is the model class for table "{{%users}}".
 *
 * @property integer $id
 * @property string $email
 * @property string $firstname
 * @property string $lastname
 * @property string $mobile
 * @property string $authkey
 * @property string $password
 * @property string $password_reset_token
 * @property string $usertype
 * @property integer $is_active
 * @property integer $is_verified
 * @property integer $is_blocked
 * @property string $remarks
 * @property string $confirmation_token
 * @property integer $password_requested_at
 * @property integer $created_at
 * @property integer $updated_at
 * @property integer $last_logged_at
 *
 * @property ClientsDetails[] $clientsDetails
 *
 */
class User extends ActiveRecord implements IdentityInterface {
	public $_fullname;
	const STATUS_NO = 0;
	const STATUS_YES = 1;
	const ADMIN = 1;
	const FIRM = 2;
	const CLIENT = 3;

	/**
	 * @inheritdoc
	 */
	public static function tableName() {
		return '{{%users}}';
	}

	/**
	 * @inheritdoc
	 */
	public function behaviors() {
		return [
				TimestampBehavior::className ()
		];
	}

	/**
	 * @inheritdoc
	 */
	public function rules() {
		return [
				[
						[
								'email',
								'firstname',
								'lastname',
								'authkey',
								'password',
								'usertype'
						],
						'required'
				],
				[
						[
								'usertype'
						],
						'string'
				],
				[
						[
								'is_active',
								'is_verified',
								'is_blocked',
								'password_requested_at',
								'created_at',
								'updated_at',
								'last_logged_at'
						],
						'integer'
				],
				[
						[
								'email'
						],
						'string',
						'max' => 100
				],
				[
						[
								'firstname',
								'lastname',
								'mobile'
						],
						'string',
						'max' => 20
				],
				[
						[
								'authkey'
						],
						'string',
						'max' => 32
				],
				[
						[
								'password',
								'password_reset_token',
								'remarks'
						],
						'string',
						'max' => 255
				],
				[
						[
								'confirmation_token'
						],
						'string',
						'max' => 250
				],
				[
						[
								'email'
						],
						'unique'
				],
				[
						[
								'password_reset_token'
						],
						'unique'
				],

				[
						[
								'is_active'
						],
						'default',
						'value' => self::STATUS_YES
				],
				[
						[
								'is_verified',
								'is_blocked'
						],
						'default',
						'value' => self::STATUS_NO
				],
				[
						[
								'is_active',
								'is_verified',
								'is_blocked'
						],
						'in',
						'range' => [
								self::STATUS_YES,
								self::STATUS_NO
						]
				]
		];
	}

	/**
	 * @inheritdoc
	 */
	public function attributeLabels() {
		return [
				'id' => 'ID',
				'email' => 'Email',
				'firstname' => 'Firstname',
				'lastname' => 'Lastname',
				'mobile' => 'Mobile',
				'authkey' => 'Auth Key',
				'password' => 'Password',
				'password_reset_token' => 'Password Reset Token',
				'usertype' => 'Usertype',
				'is_active' => 'Is Active',
				'is_verified' => 'Is Verified',
				'is_blocked' => 'Is Blocked',
				'remarks' => 'Remarks',
				'confirmation_token' => 'Confirmation Token',
				'password_requested_at' => 'Password Requested At',
				'created_at' => 'Created At',
				'updated_at' => 'Updated At',
				'last_logged_at' => 'Last Logged At'
		];
	}

	/**
	 *
	 * @return \yii\db\ActiveQuery
	 */
	/*
	 * public function getProfile() { return $this->hasOne(Profiles::className(), ['user_id' => 'id']); }
	 */

	// Other code goes here...
	/*
	 * public function getFullname() { $profile = Profiles::find()->where(['user_id'=>$this->id])->one(); if ($profile !==null) return $profile->firstname.' '.$profile->lastname; return false; }
	 */

	/**
	 * @inheritdoc
	 */
   /* public function getFullname()
    {
    	return $this->firstname.' '.$this->lastname;
    }
    	*/
    public function getUsertype() {
		return $this->usertype;
	}
	/**
	 * @inheritdoc
	 */
	public static function findIdentity($id) {
		return static::findOne ( [
				'user_id' => $id
		] );
	}

	/**
	 * @inheritdoc
	 */
	public static function findIdentityByAccessToken($token, $type = null) {
		throw new NotSupportedException ( '"findIdentityByAccessToken" is not implemented.' );
	}

	/**
	 * Finds user by username
	 *
	 * @param string $username
	 * @return static null
	 */
	public static function findByUsername($username) {
		return static::findOne ( [
				'username' => $username
		] );
	}

	/**
	 * Finds user by email
	 *
	 * @param string $email
	 * @return static null
	 */
	public static function findByEmail($email) {
		return static::findOne ( [
				'email' => $email
		] );
	}

	/**
	 * Finds user by password reset token
	 *
	 * @param string $token
	 *        	password reset token
	 * @return static null
	 */
	public static function findByPasswordResetToken($token) {
		if (! static::isPasswordResetTokenValid ( $token )) {
			return null;
		}

		return static::findOne ( [
				'password_reset_token' => $token,
				'is_active' => self::STATUS_YES
		] );
	}

	/**
	 * Finds out if password reset token is valid
	 *
	 * @param string $token
	 *        	password reset token
	 * @return bool
	 */
	public static function isPasswordResetTokenValid($token) {
		if (empty ( $token )) {
			return false;
		}

		$timestamp = ( int ) substr ( $token, strrpos ( $token, '_' ) + 1 );
		$expire = Yii::$app->params ['user.passwordResetTokenExpire'];
		return $timestamp + $expire >= time ();
	}

	/**
	 * @inheritdoc
	 */
	public function getId() {
		return $this->getPrimaryKey ();
	}

	/**
	 * @inheritdoc
	 */
	public function getAuthKey() {
		return $this->authkey;
	}

	/**
	 * @inheritdoc
	 */
	public function validateAuthKey($authKey) {
		return $this->getAuthKey () === $authKey;
	}

	/**
	 * Validates password
	 *
	 * @param string $password
	 *        	password to validate
	 * @return bool if password provided is valid for current user
	 */
	public function validatePassword($password) {
		return Yii::$app->security->validatePassword ( $password, $this->password );
	}

	/**
	 * Generates password hash from password and sets it to the model
	 *
	 * @param string $password
	 */
	public function setPassword($password) {
		$this->password = Yii::$app->security->generatePasswordHash ( $password );
	}

	/**
	 * Generates "remember me" authentication key
	 */
	public function generateAuthKey() {
		$this->authkey = Yii::$app->security->generateRandomString ();
	}

	/**
	 * Generates new password reset token
	 */
	public function generatePasswordResetToken() {
		$this->password_reset_token = Yii::$app->security->generateRandomString () . '_' . time ();
	}

	/**
	 * Removes password reset token
	 */
	public function removePasswordResetToken() {
		$this->password_reset_token = null;
	}
}


text:
layout: api
title: API
---


text:
@interface TCSSinglePageWebViewController : UIViewController <UIWebViewDelegate>

// Open a single page from a URL on the internet
- (id)initWithRemoteURLString:(NSString *)remoteURL;

// Open a single html file from the app bundle. File name should NOT include ".html".
- (id)initWithLocalHTMLFileName:(NSString *)htmlFileNameWithoutExtension;

@end


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Acarospora almquistii H. Magn.

### Remarks
null


text:
This project was created to study https://insight.bitpay.com/.

To install and run, simply clone this repo and run:

~~~
$ yarn install # or, npm install
$ yarn start   # or, npm start
~~~

It is by no mean to be comprehensive. It is only meant for studying bitpay and using
new set of UI technologies.

## What's implemented:
* Homepage
* Block and its detailed information page
* Next/Previous block navigation
* Search
* Somewhat responsive to resolution/mobile platform
* BTC to USD change rate

## What is missing from the original site:
* WebSocket implementation to get transactions (XDM prevents socket listening)
* Transaction detail page.
* Blocks filtered by date
* Block detail page with sticky header and transaction details
* Localization (I don't have translated text)
* QR Code scan
* Status page
* Verify message and Broadcast transaction

## What technologies:
* Boilerplate by create-react-app. So, of course, react is the main tech.
* Redux (First time for me. It's a good exercise to get to know Redux)
* Fetch API
* Time formatting using react-moment
* react-router
* web-pack build with code-splitting

## What needs to be done:
* Unit Tests
* Convert more "legacy" css to use flex-box
* Error handling


text:
layout: page
title: Gilbert Tone Air Dinner
date: 2016-05-24
author: Nathan Jacobson
tags: weekly links, java
status: published
summary: Proin ornare suscipit odio. Fusce malesuada nisl nec tincidunt ultricies.
banner: images/banner/leisure-03.jpg
booking:
  startDate: 05/12/2016
  endDate: 05/13/2016
  ctyhocn: CDJMXHX
  groupCode: GTAD
published: true
---
Vivamus velit enim, vestibulum in ex id, consectetur consectetur diam. Praesent rhoncus, mi sit amet convallis venenatis, sem ipsum sollicitudin risus, sed auctor lacus purus ut nulla. Donec ullamcorper gravida ex in imperdiet. Vivamus molestie id sapien ut tempus. Praesent gravida lorem eget blandit faucibus. Mauris condimentum viverra consequat. Mauris non mi sapien. Suspendisse ullamcorper magna in elementum tristique. In non turpis dictum, volutpat neque in, vehicula libero. Praesent pharetra, eros quis semper scelerisque, massa turpis efficitur ex, quis venenatis magna ligula ac eros. Fusce sapien nulla, maximus id semper at, vestibulum at magna.

1 Nullam eu dolor sed metus mattis finibus non sed orci
1 Fusce euismod eros a dictum tempor
1 Donec consequat arcu vel massa blandit, eu laoreet felis fermentum.

Vestibulum vel dignissim urna. Ut nec commodo odio. Suspendisse ultricies tincidunt quam sed bibendum. Vivamus mattis viverra augue sodales aliquet. Duis a quam vel quam ultrices imperdiet et ac lectus. In vitae tortor massa. Pellentesque sollicitudin elit sed justo auctor suscipit. Nullam eu turpis commodo, placerat odio quis, tempor justo. Nunc et pulvinar ex. Mauris tincidunt feugiat tellus a mollis. Curabitur elementum ipsum non sapien faucibus, posuere egestas eros efficitur. Aenean nec metus dapibus, gravida libero vel, posuere enim. Nulla semper arcu in dictum gravida. Proin ornare sem sed mattis suscipit. Quisque vestibulum consequat lectus eu suscipit.
Fusce vehicula massa vel felis auctor ornare. Nunc eros elit, mattis ac efficitur non, facilisis ut magna. In viverra mauris lorem. Integer mollis diam nisl, sed sodales orci fringilla eget. Morbi ex odio, varius ut commodo sed, congue a dolor. Proin finibus, leo sit amet feugiat pulvinar, odio ex pellentesque nisi, eget aliquam quam libero eu purus. Suspendisse potenti.