text:
(function (undefined) {

var promiseMethods = "then done fail isResolved isRejected promise".split(" ");

function getType(obj) {
  return obj == null ? String(obj) : class2type[Object.prototype.toString.call(obj)] || "object";
}

var class2type = {};

// Populate the class2type map
var classNames = "Boolean Number String Function Array Date RegExp Object".split(" ");

for (var i in classNames) {
  var name = classNames[i];
	class2type[ "[object " + name + "]" ] = name.toLowerCase();
}

function isFunction(obj) {
  return getType(obj) === "function";
}

function isArray(obj) {
  return getType(obj) === "array";
}

function isPlainObject(obj) {
  // Must be an Object.
  // Because of IE, we also have to check the presence of the constructor property.
  if (!obj || getType(obj) !== "object") return false;

  // Own properties are enumerated firstly, so to speed up,
  // if last one is own, then all properties are own.
  var key;
  for (key in obj) {}

  return key === undefined || Object.prototype.hasOwnProperty.call(obj, key);
}

function extend() {
  var options, name, src, copy, copyIsArray, clone,
    target = arguments[0] || {},
    i = 1,
    length = arguments.length,
    deep = false;

  // Handle a deep copy situation
  if (typeof target === "boolean") {
    deep = target;
    target = arguments[1] || {};
    // skip the boolean and the target
    i = 2;
  }

  // Handle case when target is a string or something (possible in deep copy)
  if (typeof target !== "object" && !isFunction(target)) target = {};

  // extend itself if only one argument is passed
  if (length === i) {
    target = this;
    --i;
  }

  for (; i < length; i++) {
    // Only deal with non-null/undefined values
    if ((options = arguments[i]) != null) {
      // Extend the base object
      for (name in options) {
        src = target[name];
        copy = options[name];

        // Prevent never-ending loop
        if (target === copy) continue;

        // Recurse if we're merging plain objects or arrays
        if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
          if (copyIsArray) {
            copyIsArray = false;
            clone = src && isArray(src) ? src : [];

          } else {
            clone = src && isPlainObject(src) ? src : {};
          }

          // Never move original objects, clone them
          target[name] = extend(deep, clone, copy);

        // Don't bring in undefined values
        } else if (copy !== undefined) {
          target[name] = copy;
        }
      }
    }
  }

  // Return the modified object
  return target;
}

// Create a simple deferred (one callbacks list)
function SimpleDeferred() {

  // callbacks list
  var callbacks = [];

  // stored [context , args]
  var fired;

  // to avoid firing when already doing so
  var firing;

  // flag to know if the deferred has been cancelled
  var cancelled;

  // the deferred itself
  var deferred  = {

    // done(f1, f2, ...)
    done: function () {
      if (!cancelled) {
        var args = arguments, i, length, elem, type, _fired;
        if (fired) {
          _fired = fired;
          fired = 0;
        }
        for (i = 0, length = args.length; i < length; i++) {
          elem = args[i];
          type = getType(elem);
          if (type === "array") {
            deferred.done.apply(deferred, elem);
          }
          else if (type === "function") {
            callbacks.push(elem);
          }
        }
        if (_fired) {
          deferred.resolveWith(_fired[0], _fired[1]);
        }
      }
      return this;
    },

    // resolve with given context and args
    resolveWith: function (context, args) {
      if (!cancelled && !fired && !firing) {
        firing = 1;
        try {
          while (callbacks[0]) {
            callbacks.shift().apply(context, args);
          }
        }
        finally {
          fired = [context, args];
          firing = 0;
        }
      }
      return this;
    },

    // resolve with this as context and given arguments
    resolve: function() {
      deferred.resolveWith(isFunction(this.promise) ? this.promise() : this, arguments);
      return this;
    },

    // Has this deferred been resolved?
    isResolved: function() {
      return !!(firing || fired);
    },

    // Cancel
    cancel: function() {
      cancelled = 1;
      callbacks = [];
      return this;
    }
  };

  return deferred;
}

// Full fledged deferred (two callbacks list)
this.Deferred = function(func) {
  var deferred = SimpleDeferred(),
    failDeferred = SimpleDeferred(),
    promise;

  // Add errorDeferred methods, then and promise
  extend(deferred, {
    then: function (doneCallbacks, failCallbacks) {
      deferred.done(doneCallbacks).fail(failCallbacks);
      return this;
    },
    fail: failDeferred.done,
    rejectWith: failDeferred.resolveWith,
    reject: failDeferred.resolve,
    isRejected: failDeferred.isResolved,

    // Get a promise for this deferred
    // If obj is provided, the promise aspect is added to the object
    promise: function (obj) {
      if (obj == null) {
        if (promise) return promise;
        promise = obj = {};
      }
      var i = promiseMethods.length;
      while (i--)  obj[promiseMethods[i]] = deferred[promiseMethods[i]];
      return obj;
    }
  });

  // Make sure only one callback list will be used
  deferred.done(failDeferred.cancel).fail(deferred.cancel);

  // Unexpose cancel
  delete deferred.cancel;

  // Call given func if any
  if (func) func.call(deferred, deferred);

  return deferred;
}

// Deferred helper
this.when = function (object) {
  var lastIndex = arguments.length,
    deferred = lastIndex <= 1 && object && isFunction(object.promise) ? object : Deferred(),
    promise = deferred.promise();

  if (lastIndex > 1) {
    var array = Array.prototype.slice.call(arguments, 0),
      count = lastIndex,
      iCallback = function (index) {
        return function (value) {
          array[index] = arguments.length > 1 ? Array.prototype.slice.call(arguments, 0) : value;
          if (!(--count)) deferred.resolveWith(promise, array);
        }
      };

    while ((lastIndex--)) {
      object = array[lastIndex];
      if (object && isFunction(object.promise))
        object.promise().then(iCallback(lastIndex), deferred.reject);
      else
        --count;
    }

    if (!count) deferred.resolveWith(promise, array);
  }
  else if (deferred !== object) {
    deferred.resolve(object);
  }
  return promise;
}

})();


text:
title: How to Measure Open Data
author: joy_bonaguro
image:
  thumb: /measure-open-data/datasf_in_progress.PNG
  feature: /measure-open-data/datasf_in_progress.PNG
description: "One of the most frequent questions I get about open data is - why? Most folks understand the need for transparency and openness in government, but some question the need to invest the effort in a comprehensive open data effort."
---

One of the most frequent questions I get about open data is - why? Most folks understand the need for transparency and openness in government, but some question the need to invest the effort in a comprehensive open data effort.

And to be perfectly fair - very few folks have measured the impact of open data. Since we love being data-driven, we decided to attempt measuring open data. This blog post summarizes what we're doing and we want to hear your thoughts and feedback so we can learn together.

Learn more below or dive into [DataSF in Progress](http://datasf.org/progress/) - where you can track our metrics in real time! Or read our [evaluation and performance plan available here](https://datasf.org/resources/open-data-metrics/).

## Number of datasets is a bad success measure

Early on, it became clear - we cannot measure open data by counting the number of datasets. A couple problems with this:

 - **It incents the wrong behavior.** If we publish every year as a different dataset, our N goes up but data usability goes down. If we publish low value data, our N goes up but no one wants to use it. While it's important to track - # of datasets shouldn't be a key performance indicator (KPI).
 - **It diverts focus from quality.** Publishing to increase your N distracts from ensuring high quality publishing - data that is documented, updated regularly and of value.

## Limited guidance and a focus on case studies
Our [research review](https://drive.google.com/open?id=1HH-zjZep36L-hBf39RQm5D5KNGOjt7opM-9_bum4AAo) revealed that there was not a bunch of guidance on how to measure open data and many of the benefits to open data relied on example case studies. Case studies are important but hard to quantify.

One of the most frequently cited estimates of the impact of open data is a [2013 McKinsey report](http://www.mckinsey.com/insights/business_technology/open_data_unlocking_innovation_and_performance_with_liquid_information) that estimates open data will create $3-5 trillion in value. Unfortunately, the report doesn't offer a methodology that can be replicated.

## Our framework: Logic Model + Measures
Our approach relies on a logic model that provides a theoretical framework plus a set of measures for tracking our performance.

### Logic Model: Our theoretical framework
Our logic model provides a framework for linking our activities to the ultimate outcomes we hope for, namely:

 - A robust and innovative economy
 - Quality outcomes for residents, businesses, and visitors using City services
 - Increased engagement and empowerment
 - Ultimately - excellent quality of life and work in the City

These are lofty outcomes - how do we relate the Open Data program to them? Our logic model provides the theoretical linkages (though we haven't figured out a good way to measure them).

[View the full logic model](https://drive.google.com/open?id=0B6av1JsL3xAncE5NUFZZMjVvRnc).

### Measures for Activity, Quality and Impact
Since our ultimate outcomes are hard to track, we rely on a variety of indirect measures - starting from how much we publish to what's being done with it. Our metrics fall into 3 groups:

 - How much did we do? (activity metrics)
 - How well did we do it? (quality metrics)
 - Is anyone better off as a result? (impact metrics)

(You may notice these look suspiciously like the [Results Based Accountability](http://raguide.org/), RBA, approach...that's because we are using it ;-)

### Publishing Activity
Our publishing activity measures progress on our dataset inventory ([learn about this process](http://datasf.org/blog/5-ways-to-scale-mountain-of-data/)) and publishing plans ([view plans](http://datasf.org/publishing/plans/)). Both of these are mandated by our open data legislation.

We also track publishing activity by department, priority level and classification as percentages. Percents allow us to compare performance without distorting incentives.

### Publishing Quality

Our quality metrics track how well we publish when we publish:

 - **Performance against target.** Every six months, we identify the number of datasets to publish. These measures track how we are performing against those targets.
 - **Timeliness of publishing.** Fresh data is better than old data. Data should be updated per our commitment captured in the metadata for each dataset.
 - **Documentation and Usability.** Data that isn't documented puts extra burden on the user and results in unnecessary question loops. Native hosting allows our users to fully leverage our open data services.

We have now added all of our quality metrics to [DataSF in Progress](http://datasf.org/progress/) - where you can track them real time! Couple notes on how we've built this:

 - We track all the needed variables in a handful of public datasets (data inventory, metadata, and published views)
 - We use our open data API to populate our dashboard

### Publishing Impact

If we publish a bunch of data in a quality manner, it doesn't matter if no one uses it. This is where our impact measures come into play. They are the hardest to measure and require deliberate data collection. At this time, our impact measures focus on internal metrics. While we've attempted external surveys, our "n" has been too low to infer anything from the data. In lieu of this, we are exploring "net promoter" scores and other methods. Welcome thoughts on this one.

Until then, we will collect the following data via annual surveys and will add to our dashboard as we have multiple years.

 - Respondents indicating that SF OpenData has made their analytical work easier, faster or more accurate
 - Respondents indicating a reduction in medium or major barriers to use of data
 - Respondents indicating sufficient access to data produced or collected by other departments

We'll also try to capture additional impact via:

 - Case studies or stories of uses of open data
 - Focus groups or workshops
 - Counts of apps or websites "Made with Open Data" as part of our new showcase. This may include some basic impact questions like "how important was open data to creating your service".

Read our entire [Evaluation and Performance Plan for Open Data](https://drive.google.com/open?id=1O_M0m35ydqLyYb4YLr35YiJPPcCUnm68g-gu6-hQJvc), which provides details on our approach, including desired trends, etc. Drop us a note if you think we are missing something key!

redpajama_set_name: RedPajamaGithub


text:
export { Provider } from 'react-redux';
export { combineReducers } from 'redux';
export { configureStore } from './configureStore';


text:
<?php

namespace EdRush\Extbaser\VO\ExtensionBuilderConfiguration;

/**
 * @author weberius
 */
class Log
{
    /**
     * @var string
     */
    public $extension_builder_version = '6.2.0';

    /**
     * @var string
     */
    public $last_modified = '';

    public function getExtensionBuilderVersion()
    {
        return $this->extension_builder_version;
    }
    public function setExtensionBuilderVersion($extension_builder_version)
    {
        $this->extension_builder_version = $extension_builder_version;

        return $this;
    }
    public function getLastModified()
    {
        return $this->last_modified;
    }
    public function setLastModified($last_modified)
    {
        $this->last_modified = $last_modified;

        return $this;
    }
}


text:
class SampleResource : public HttpResource
{
public:
	void onGet(const HttpRequest& request, HttpResponse& response) override;
};

#endif // _SAMPLE_RESOURCE_HPP_


text:
export interface IPropertyButton {
    title: string;
    callback?: () => void;
    className?: string;
}


text:
config({
    'gallery/hp-scroll/index': {alias: ['gallery/hp-scroll/1.0/index']}
});


text:
from __future__ import unicode_literals

# Django
from django.views.generic.base import TemplateView

class DummyView(TemplateView):
    template_name = "Landing Page"


text:
module ShouldFail where

f [] = 1
f True = 2


text:
#include "ext_mongo.h"
#include "contrib/encode.h"

namespace HPHP {

static mongoc_collection_t *get_collection(Object obj) {
  mongoc_collection_t *collection;

  auto db = obj->o_realProp("db", ObjectData::RealPropUnchecked, "MongoCollection")->toObject();
  auto client = db->o_realProp("client", ObjectData::RealPropUnchecked, "MongoDB")->toObject();
  String db_name = db->o_realProp("db_name", ObjectData::RealPropUnchecked, "MongoDB")->toString();
  String collection_name = obj->o_realProp("name", ObjectData::RealPropUnchecked, "MongoCollection")->toString();

  collection = mongoc_client_get_collection (get_client(client)->get(), db_name.c_str(), collection_name.c_str());
  return collection;
}

////////////////////////////////////////////////////////////////////////////////
// class MongoCollection

 /**
   * Inserts a document into the collection
   *
   * @param array|object $a - a    An array or object. If an object is
   *   used, it may not have protected or private properties.    If the
   *   parameter does not have an _id key or property, a new MongoId
   *   instance will be created and assigned to it.
   * @param array $options - options    Options for the insert.
   *
   * @return bool|array - Returns an array containing the status of the
   *   insertion if the "w" option is set. Otherwise, returns TRUE if the
   *   inserted array is not empty (a MongoException will be thrown if the
   *   inserted array is empty).
   */
//public function insert(mixed $a, array $options = array()): mixed;
static Variant HHVM_METHOD(MongoCollection, insert, Variant a, Array options) {
  mongoc_collection_t *collection;
  bson_t doc;
  bson_error_t error;

  collection = get_collection(this_);

  Array doc_array = a.toArray();
  doc = encodeToBSON(doc_array);
  // bson_init(&doc);
  // bson_oid_init_from_string(&oid, doc_array[String("_id")].toString().c_str());
  // bson_append_oid(&doc, "_id", 3, &oid);
  // //Supporting only "name" key
  // bson_append_utf8(&doc, "name", 4, doc_array[String("name")].toString().c_str(), doc_array[String("name")].toString().length());

  bool ret = mongoc_collection_insert(collection, MONGOC_INSERT_NONE, &doc, NULL, &error);

  mongoc_collection_destroy (collection);
  bson_destroy(&doc);

  return ret;
  /*
  bool mongoc_collection_insert (mongoc_collection_t           *collection,
                                mongoc_insert_flags_t          flags,
                                const bson_t                  *document,
                                const mongoc_write_concern_t  *write_concern,
                                bson_error_t                  *error);
  */

}

/**
   * Remove records from this collection
   *
   * @param array $criteria - criteria    Description of records to
   *   remove.
   * @param array $options - options    Options for remove.    "justOne"
   *    Remove at most one record matching this criteria.
   *
   * @return bool|array - Returns an array containing the status of the
   *   removal if the "w" option is set. Otherwise, returns TRUE.
   */
//public function remove(array $criteria = array(), array $options = array()): mixed;
static Variant HHVM_METHOD(MongoCollection, remove, Array criteria, Array options) {
  mongoc_collection_t *collection;
  bson_t criteria_b;
  bson_error_t error;

  collection = get_collection(this_);

  criteria_b = encodeToBSON(criteria);

  //Supporting only "name" key
  //bson_append_utf8(&criteria_b, "name", 4, criteria[String("name")].toString().c_str(), criteria[String("name")].toString().length());

  bool ret = mongoc_collection_delete(collection, MONGOC_DELETE_NONE, &criteria_b, NULL, &error);

  mongoc_collection_destroy (collection);
  bson_destroy(&criteria_b);

  return ret;
  /*
  bool mongoc_collection_delete (mongoc_collection_t           *collection,
                                mongoc_delete_flags_t          flags,
                                const bson_t                  *selector,
                                const mongoc_write_concern_t  *write_concern,
                                bson_error_t                  *error);
  */
}

/*
public function update(array $criteria,
                         array $new_object,
                         array $options = array()): mixed;
*/
static Variant HHVM_METHOD(MongoCollection, update, Array criteria, Array new_object, Array options) {
  mongoc_collection_t *collection;
  bson_t selector; //selector is the criteria (which document to update)
  bson_t update;  //update is the new_object containing the new data
  bson_error_t error;

  collection = get_collection(this_);

  selector = encodeToBSON(criteria);
  update = encodeToBSON(new_object);

  //Read oid and name from criteria array
  // bson_init(&selector);
  // bson_oid_init_from_string(&oid, criteria[String("_id")].toString().c_str());
  // bson_append_oid(&selector, "_id", 3, &oid);
  // bson_append_utf8(&selector, "name", 4, criteria[String("name")].toString().c_str(), criteria[String("name")].toString().length());

  //Convert new_object to bson
  //Hard coded test for now
  // bson_init(&update);
  // BSON_APPEND_INT32 (&update, "abcd", 1);
  // BSON_APPEND_INT32 (&update, "$hi", 1);

  bool ret = mongoc_collection_update(collection, MONGOC_UPDATE_NONE, &selector, &update, NULL, &error);

  mongoc_collection_destroy (collection);

  bson_destroy(&update);
  bson_destroy(&selector);

  return ret;

/*
bool
mongoc_collection_update (mongoc_collection_t          *collection,
                          mongoc_update_flags_t         flags,
                          const bson_t                 *selector,
                          const bson_t                 *update,
                          const mongoc_write_concern_t *write_concern,
                          bson_error_t                 *error)
*/
}

////////////////////////////////////////////////////////////////////////////////

void mongoExtension::_initMongoCollectionClass() {
    HHVM_ME(MongoCollection, insert);
    HHVM_ME(MongoCollection, remove);
    HHVM_ME(MongoCollection, update);
}

} // namespace HPHP


text:
<!DOCTYPE html>

{% include head.html %}

    {% include nav.html %}

            {{ content }}

            {% include footer.html %}


text:
file "/etc/profile.d/omnibus-embedded.sh" do
  content "export PATH=\"/opt/chef-server/embedded/bin:$PATH\""
  action :create
end

# setup knife for vagrant

directory "/home/vagrant/.chef" do
  owner "vagrant"
  group "vagrant"
  mode 0700
  action :create
end

%w{admin chef-validator}.each do |user|
  execute "copy #{user}.pem" do
    command "/bin/cp /etc/chef-server/#{user}.pem /home/vagrant/.chef"
    creates "/home/vagrant/.chef/#{user}.pem"
    action :run
  end
  file "/home/vagrant/.chef/#{user}.pem" do
    mode "0600"
    owner "vagrant"
    group "vagrant"
  end
end

template "/home/vagrant/.chef/knife.rb" do
  mode "0755"
  owner "vagrant"
  group "vagrant"
end


text:
package org.odata4j.consumer;

import java.io.InputStream;
import java.sql.Blob;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.core4j.Enumerable;
import org.core4j.Predicate1;
import org.odata4j.core.ODataConstants.Headers;
import org.odata4j.core.ODataVersion;
import org.odata4j.core.OEntity;
import org.odata4j.core.OEntityKey;
import org.odata4j.core.OModifyRequest;
import org.odata4j.core.OProperty;
import org.odata4j.edm.EdmDataServices;
import org.odata4j.edm.EdmEntitySet;
import org.odata4j.edm.EdmSimpleType;
import org.odata4j.exceptions.ODataProducerException;
import org.odata4j.format.Entry;
import org.odata4j.format.FormatType;
import org.odata4j.internal.EntitySegment;

/**
 * Modification-request implementation.
 */
public class ConsumerEntityModificationRequest<T> extends AbstractConsumerEntityPayloadRequest implements OModifyRequest<T> {

  private final T updateRoot;
  private final ODataClient client;

  private final List<EntitySegment> segments = new ArrayList<EntitySegment>();

  private EdmEntitySet entitySet;
  private String ifMatch;

  public ConsumerEntityModificationRequest(T updateRoot, ODataClient client, String serviceRootUri, EdmDataServices metadata,
      String entitySetName, OEntityKey key, String ifMatch) {
    super(entitySetName, serviceRootUri, metadata);
    this.updateRoot = updateRoot;
    this.client = client;
    this.ifMatch = ifMatch;

    segments.add(new EntitySegment(entitySetName, key));
    this.entitySet = metadata.getEdmEntitySet(entitySetName);
  }

  @Override
  public OModifyRequest<T> nav(String navProperty, OEntityKey key) {
    segments.add(new EntitySegment(navProperty, key));
    entitySet = metadata.getEdmEntitySet(entitySet.getType().findNavigationProperty(navProperty).getToRole().getType());
    return this;
  }

  @Override
  public void execute() throws ODataProducerException {

    ODataClientRequest request = null;
    if (updateRoot != null) {
      OEntity entity = (OEntity) updateRoot;
      // if mediaStream is set, then first send put request for updating only media link;
      if (Boolean.TRUE.equals(entitySet.getType().getHasStream()) && isMediaStreamSet(entity)) {
        String path = Enumerable.create(segments).join("/");
        request = new ODataClientRequest("PUT", serviceRootUri + path, null, null, entity.getMediaLinkStream());
        client.updateEntity(request);
      }
    }
    // send regular merge/put request for updating non-stream properties
    request = getRequest();

    client.updateEntity(request);
  }

  @Override
  public OModifyRequest<T> properties(OProperty<?>... props) {
    return super.properties(this, props);
  }

  @Override
  public OModifyRequest<T> properties(Iterable<OProperty<?>> props) {
    return super.properties(this, props);
  }

  @Override
  public OModifyRequest<T> link(String navProperty, OEntity target) {
    return super.link(this, navProperty, target);
  }

  @Override
  public OModifyRequest<T> link(String navProperty, OEntityKey targetKey) {
    return super.link(this, navProperty, targetKey);
  }

  @Override
  public OModifyRequest<T> ifMatch(String precondition) {
    ifMatch = precondition;
    return this;
  }

  private ODataClientRequest getRequest() {
    List<OProperty<?>> requestProps = props;
    if (updateRoot != null) {
      OEntity updateRootEntity = (OEntity) updateRoot;
      requestProps = Enumerable.create(updateRootEntity.getProperties()).toList();
      for (final OProperty<?> prop : props) {
        OProperty<?> requestProp = Enumerable.create(requestProps).firstOrNull(new Predicate1<OProperty<?>>() {
          public boolean apply(OProperty<?> input) {
            return input.getName().equals(prop.getName());
          }
        });
        requestProps.remove(requestProp);
        requestProps.add(prop);
      }
    }

    OEntityKey entityKey = Enumerable.create(segments).last().key;
    Entry entry = client.createRequestEntry(entitySet, entityKey, requestProps, links);

    String path = Enumerable.create(segments).join("/");

    ODataClientRequest request = updateRoot != null ?
        ODataClientRequest.put(serviceRootUri + path, entry) :
        ODataClientRequest.merge(serviceRootUri + path, entry);

    // if this is update request (w/o stream) then send it as merge
    if (Boolean.TRUE.equals(entitySet.getType().getHasStream())) {
      request = ODataClientRequest.merge(serviceRootUri + path, entry);
    }
    if (ifMatch != null)
      request.header(Headers.IF_MATCH, ifMatch);

    return request;
  }

  /**
   * Checks if media stream is set.
   * Iterates through Oproperties and set mediaLinkStream property in OEntity.
   * @param entity the entity
   * @return the boolean
   */
  private Boolean isMediaStreamSet(OEntity entity) {
    // unset MediaLink first
    entity.setMediaLinkStream(null);
    // check whether the stream has been set using Oproperties
    for (OProperty<?> property : props) {
      if (property.getType().equals(EdmSimpleType.STREAM) && property.getValue() != null) {
        // media stream property is set, so set it in oentity.
    	  try {
			  if(property.getValue() instanceof  Blob) {
				  entity.setMediaLinkStream(((Blob) property.getValue()).getBinaryStream());
			  } else {
				  entity.setMediaLinkStream((InputStream) property.getValue());
			  }
    	  }catch (SQLException e) {
			  throw new RuntimeException(e);
		  }
        // remove it from props to prevent sending it.
        props.remove(property);
        return true;
      }
    }
    return false;
  }

  @Override
  public String formatRequest(FormatType formatType) {
    ODataClientRequest request = getRequest();
    return ConsumerBatchRequestHelper.formatSingleRequest(request, formatType);
  }

  @Override
  public Object getResult(ODataVersion version, Object payload, FormatType formatType) {
    return null;
  }

}


text:
all: check_dependencies test

filename=dominic-`python -c 'import dominic;print dominic.version'`.tar.gz

export PYTHONPATH:=  ${PYTHONPATH}:${PWD}

check_dependencies:
	@echo "Checking for dependencies to run tests ..."
	@python -c "import sure" 2>/dev/null || (echo "You must install sure in order to run dominic's tests" && exit 3)
	@python -c "import xpath" 2>/dev/null || (echo "You must install py-dom-xpath in order to run dominic's tests" && exit 3)

test: clean
	@echo "Running dominic tests ..."
	@nosetests -s --verbosity=2 --with-coverage --cover-erase --cover-inclusive ./tests/ --cover-package=dominic

doctest: clean
	@cd docs && make doctest

documentation:
	@cd docs && make html

clean:
	@printf "Cleaning up files that are already in .gitignore... "
	@for pattern in `cat .gitignore`; do rm -rf $$pattern; find . -name "$$pattern" -exec rm -rf {} \;; done
	@echo "OK!"

release: clean
	@printf "Exporting to $(filename)... "
	@tar czf $(filename) dominic setup.py README.md COPYING
	@echo "DONE!"


text:
import {isEmpty, fill, clone, includes, has} from 'lodash';
import {ITableBodyRowModel, ITableModel} from './details.interfaces';

const ANALYTICS_MODEL = {
    'year': 'y',
    'bankAccount': 'b',
    'cash': 'm',
    'complaintAmount': 'w',
    'complainsAmount': 'j',
    'income': 'i',
    'carAmount': 'c',
    'flatArea': 'k',
    'flatAmount': 'ka',
    'houseArea': 'h',
    'houseAmount': 'ha',
    'landArea': 'l',
    'landAmount': 'la',
    'familyIncome': 'fi',
    'familyCarAmount': 'fc',
    'familyFlatArea': 'ff',
    'familyFlatAmount': 'ffa',
    'familyHouseArea': 'fh',
    'familyHouseAmount': 'fha',
    'familyLandArea': 'fl',
    'familyLandAmount': 'fla'
};

const TABLE_MODEL: ITableModel = {
    head: {
        title: '',
        years: []
    },
    body: []
};

export class DetailsController {
    $scope: angular.IScope;
    isShown: boolean;
    data: any = {};
    renderedData: any;
    incomeShown: boolean;
    estateShown: boolean;
    avatar: string;

    private _api: any;

    /** @ngInject */
    constructor($state: any, Api: any, $scope: angular.IScope) {
        this._api = Api;
        this.getDetails($state.params.key);
        this.$scope = $scope;
        this.isShown = false;
    }

    /** @ngInject */
    getDetails(key: string) {
        return this._api.getOne(key).then((data: any) => {
            const photoKey: string = 'Фото';
            this.data = data;
            this.incomeShown = this.hasIncomes();
            this.estateShown = this.toShowEstate();
            this.avatar = this.data[photoKey] || '../../assets/images/profile_photo_3.png';
            this.$scope.$apply();
            console.log(data);
        });
    }

    countInComes() {
        const tableModel = angular.copy(TABLE_MODEL);
        const ownIncomes: ITableBodyRowModel = {
            title: 'Дохід',
            valueByYears: []
        };
        const familyIncomes: ITableBodyRowModel = {
            title: 'Дохід сім\'ї',
            valueByYears: []
        };

        this.data.analytics.forEach((item: any) => {
            const _familyIncomes =
                has(item, ANALYTICS_MODEL.familyIncome) ? item[ANALYTICS_MODEL.familyIncome] + ' ₴' : '-';
            const _ownIncomes =
                has(item, ANALYTICS_MODEL.income) ? item[ANALYTICS_MODEL.income] + ' ₴' : '-';

            familyIncomes.valueByYears.push(_familyIncomes);
            ownIncomes.valueByYears.push(_ownIncomes);

            tableModel.head.title = 'Доходи';
            tableModel.head.years.push(item[ANALYTICS_MODEL.year]);
        }, []);

        tableModel.body.push(ownIncomes);
        tableModel.body.push(familyIncomes);

        return tableModel;
    }

    countRealEstate() {
        const tableModel = angular.copy(TABLE_MODEL);
        const flats: ITableBodyRowModel = {
            title: 'Загальна площа квартир',
            valueByYears: []
        };
        const flatsFamily: ITableBodyRowModel = {
            title: 'Загальна площа квартир',
            valueByYears: []
        };
        const cottages: ITableBodyRowModel = {
            title: 'Загальна площа житлових будинків',
            valueByYears: []
        };
        const cottagesFamily: ITableBodyRowModel = {
            title: 'Загальна площа житлових будинків',
            valueByYears: []
        };
        const parcels: ITableBodyRowModel = {
            title: 'Земельні ділянки',
            valueByYears: []
        };
        const parcelsFamily: ITableBodyRowModel = {
            title: 'Земельні ділянки',
            valueByYears: []
        };

        this.data.analytics.forEach((item: any) => {
            const totalOwnFlats =
                has(item, ANALYTICS_MODEL.flatArea) ? item[ANALYTICS_MODEL.flatArea] + ' м²' : '-';
            const totalFamilyFlats =
                has(item, ANALYTICS_MODEL.familyFlatArea) ? item[ANALYTICS_MODEL.familyFlatArea] + ' м²' : '-';
            const totalCottages =
                has(item, ANALYTICS_MODEL.houseArea) ? item[ANALYTICS_MODEL.houseArea] + ' м²' : '-';
            const totalFamilyCottages =
                has(item, ANALYTICS_MODEL.familyHouseArea) ? item[ANALYTICS_MODEL.familyHouseArea] + ' м²' : '-';
            const totalParcel =
                has(item, ANALYTICS_MODEL.landArea) ? item[ANALYTICS_MODEL.landArea] + ' м²' : '-';
            const totalFamilyParcels =
                has(item, ANALYTICS_MODEL.familyLandArea) ? item[ANALYTICS_MODEL.familyLandArea] + ' м²' : '-';

            flats.valueByYears.push(totalOwnFlats);
            flatsFamily.valueByYears.push(totalFamilyFlats);
            cottages.valueByYears.push(totalCottages);
            cottagesFamily.valueByYears.push(totalFamilyCottages);
            parcels.valueByYears.push(totalParcel);
            parcelsFamily.valueByYears.push(totalFamilyParcels);

            tableModel.head.title = 'Майно';
            tableModel.head.years.push(item[ANALYTICS_MODEL.year]);
        }, []);

        if (!isEmpty(flats.valueByYears) || !isEmpty(cottages.valueByYears) || !isEmpty(parcels.valueByYears)) {
            tableModel.body.push({
                title: 'Власні:',
                valueByYears: fill(clone(flats.valueByYears), ' ')
            });
        }
        if (!isEmpty(flats.valueByYears)) {
            tableModel.body.push(flats);
        }
        if (!isEmpty(cottages.valueByYears)) {
            tableModel.body.push(cottages);
        }
        if (!isEmpty(parcels.valueByYears)) {
            tableModel.body.push(parcels);
        }
        if (!isEmpty(flatsFamily.valueByYears) || !isEmpty(cottagesFamily.valueByYears) || !isEmpty(parcelsFamily.valueByYears)) {
            tableModel.body.push({
                title: 'Родини:',
                valueByYears: fill(clone(flats.valueByYears), ' ')
            });
        }
        if (!isEmpty(flatsFamily.valueByYears)) {
            tableModel.body.push(flatsFamily);
        }
        if (!isEmpty(cottagesFamily.valueByYears)) {
            tableModel.body.push(cottagesFamily);
        }
        if (!isEmpty(parcelsFamily.valueByYears)) {
            tableModel.body.push(parcelsFamily);
        }

        return tableModel;
    }

    countSues() {
        const tableModel = angular.copy(TABLE_MODEL);
        const allSues: ITableBodyRowModel = {
            title: 'Загальна кількість справ',
            valueByYears: []
        };
        const appelationCount: ITableBodyRowModel = {
            title: 'Кількість скарг',
            valueByYears: []
        };
        const appealed: ITableBodyRowModel = {
            title: 'Оскаржені справи',
            valueByYears: []
        };
        const disciplinFears: ITableBodyRowModel = {
            title: 'Кількість дисциплінарних стягнень',
            valueByYears: []
        };

        allSues.valueByYears.push(this.data['Кількість справ']);
        appelationCount.valueByYears.push(this.data['Кількість скарг']);
        appealed.valueByYears.push(this.data['Оскаржені']);
        disciplinFears.valueByYears.push(this.data['Кількість дисциплінарних стягнень']);

        if (!isEmpty(allSues.valueByYears)) {
            tableModel.body.push(allSues);
        }
        if (!isEmpty(appelationCount.valueByYears)) {
            tableModel.body.push(appelationCount);
        }
        if (!isEmpty(appealed.valueByYears)) {
            tableModel.body.push(appealed);
        }
        if (!isEmpty(disciplinFears.valueByYears)) {
            tableModel.body.push(disciplinFears);
        }

        tableModel.head.title = 'Професійні показники';

        return tableModel;
    }

    filterData(key: any) {
        let _this = this,
            map = {
                'income': () => {
                    return _this.countInComes();
                },
                'estate': () => {
                    return _this.countRealEstate();
                },
                'sues': () => {
                    return _this.countSues();
                }
            };

        this.toRenderData(map[key]());
    }

    toRenderData(renderData: any) {
        this.isShown = true;
        this.renderedData = renderData;
    }

    hasIncomes() {
        return !!this.data.analytics;
    }

    toShowEstate() {
        return !!this.data.analytics;
    }

    showAntiMaydanStigma() {
        return includes('' + this.data['Клейма'], '1');
    }

    showPoliticalPrisonersStigma() {
        return includes('' + this.data['Клейма'], '2');
    }

    showRetiredStigma() {
        return includes('' + this.data['Клейма'], '3');
    }

    showDecampStigma() {
        return includes('' + this.data['Клейма'], '4');
    }

    showGotTheBootStigma() {
        return includes('' + this.data['Клейма'], '5');
    }
}


text:
Server part of pbl deployment tool. You need to install it on the server.

# Install

```bash
npm install --global pbls
```

To work with you need to init pbls with domain name.

```bash
pbls init --domain {your domain}
# example: pbls init --domain localhost
```

to clean outdated containers run (as a recommendation in cron)

```bash
pbls clean --days {X}
```

# Work

`pbls` is considered to work with `pbl` tool, for now it run command `run` but not intended do that
`pbls` supports args `name`, `dockerFile` and `dir` for now
* `dir` is required and is a path of build folder
* `dockerFile` name of Dockerfile, default `Dockerfile`
* `name` name of running container, will be available at `${name}.${domain}`, if not set equal to
random, and will be provided to user
* any additional arguments will be provided as is to `docker build` command, so you can pass
`--build-arg` and other params

examples:

```bash
pbls run --name hello --dir ../../example --build-arg HELLO=WORLD
# or without name
pbls run --dir ../../example --build-arg HELLO=WORLD
# or in attached mode
pbls run --attached true --dir ../../example --build-arg HELLO=WORLD
```

# Additional

You can execute any process as a web-socket server with terminal,
as an example `docker stats` command. (to make it work you need to run once `pbls init`)

```bash
npm install --global pty64
pty64 --base64 -- docker stats | docker run -a STDIN -a STDOUT -i --rm -e VIRTUAL_HOST="stats.${YOUR_DOMAIN}" --name stats 'stdind' ./index.js --realtime
# or in detached mode
screen -S stats -dm /bin/bash -c 'pty64 --base64 -- docker stats | docker run -a STDIN -a STDOUT -i --rm -e VIRTUAL_HOST="stats.ui.revue.io" --name stats "stdind" ./index.js --realtime > /dev/null'
```

# Clear:

```bash
docker rmi -f $(docker images --filter "label=pbl" -q)
```


text:
'use strict';

window.moj.Modules.GtmTrackTimestamps = {
  hompage: function() {
    moj.Modules.Cookies.set('homepage_visited_timestamp', Date.now());
  },

  getTimestamps: function() {
    var homepage_timestamp = parseInt(moj.Modules.Cookies.get('homepage_visited_timestamp'), 10);
    var current_page_timestamp = Date.now();
    var transition_time_in_ms = current_page_timestamp - homepage_timestamp;

    return {
      'homepage': homepage_timestamp,
      'currentPage': current_page_timestamp,
      'transitionTimeInMs': transition_time_in_ms
    }
  },

  processedApplication: function() {
    var timestamps = this.getTimestamps()

    dataLayer.push({
      'event': 'Processed_Application_Timestamp',
      'hompageTimestamp': timestamps.homepage,
      'processedApplicationTimestamp': timestamps.currentPage,
      'transitionTimeInMs': timestamps.transitionTimeInMs
    });
  },

  deletedApplication: function() {
    var timestamps = this.getTimestamps()

    dataLayer.push({
      'event': 'Deleted_Application_Timestamp',
      'hompageTimestamp': timestamps.homepage,
      'deletedApplicationTimestamp': timestamps.currentPage,
      'transitionTimeInMs': timestamps.transitionTimeInMs
    });
  },

  evidenceApplication: function() {
    var timestamps = this.getTimestamps()

    dataLayer.push({
      'event': 'Evidence_Application_Timestamp',
      'hompageTimestamp': timestamps.homepage,
      'evidenceApplicationTimestamp': timestamps.currentPage,
      'transitionTimeInMs': timestamps.transitionTimeInMs
    });
  },

  partPaymentApplication: function() {
    var timestamps = this.getTimestamps()

    dataLayer.push({
      'event': 'Part_Payment_Application_Timestamp',
      'hompageTimestamp': timestamps.homepage,
      'partPaymentApplicationTimestamp': timestamps.currentPage,
      'transitionTimeInMs': timestamps.transitionTimeInMs
    });
  },

  evidence: function() {
    var timestamps = this.getTimestamps()

    dataLayer.push({
      'event': 'Evidence_Timestamp',
      'hompageTimestamp': timestamps.homepage,
      'evidenceTimestamp': timestamps.currentPage,
      'transitionTimeInMs': timestamps.transitionTimeInMs
    });
  },

  partPayment: function() {
    var timestamps = this.getTimestamps()

    dataLayer.push({
      'event': 'Part_Payment_Timestamp',
      'hompageTimestamp': timestamps.homepage,
      'partPaymentTimestamp': timestamps.currentPage,
      'transitionTimeInMs': timestamps.transitionTimeInMs
    });
  },

  yourLastApplication: function() {
    var timestamps = this.getTimestamps()

    dataLayer.push({
      'event': 'Yourlastapp_Timestamp',
      'hompageTimestamp': timestamps.homepage,
      'lastAppTimestamp': timestamps.currentPage,
      'transitionTimeInMs': timestamps.transitionTimeInMs
    });
  },

  serchPerformed: function(search_result) {
    var results = $('table.search-results').length;
    var search_query = $('#completed_search_reference').val();

    if(search_query.length == 0){
      search_query = '(Blank)';
    }

    if(results > 0){
      search_result = 'Success';
    }

    dataLayer.push({
      'event': 'SearchPerformed',
      'searchResult': search_result,
      'searchQuery': search_query
    });
  },

  searchResultClick: function() {
    var timestamps = this.getTimestamps()

    dataLayer.push({
      'event': 'Searchresult_Timestamp',
      'hompageTimestamp': timestamps.homepage,
      'searchResultClickTimestamp': timestamps.currentPage,
      'transitionTimeInMs': timestamps.transitionTimeInMs
    });
  },

  sectionLinkClick: function(section_name) {
    var timestamps = this.getTimestamps()

    dataLayer.push({
      'event': section_name,
      'hompageTimestamp': timestamps.homepage
    });
  },

  trackLinksClicked: function() {
    $('a.waiting-for-evidence').on('click', function(){
      moj.Modules.GtmTrackTimestamps.sectionLinkClick('waiting-for-evidence-section');
    });

    $('a.waiting-for-part_payment').on('click', function(){
      moj.Modules.GtmTrackTimestamps.sectionLinkClick('waiting-for-part-payment-section');
    });

    $('a.processed-applications').on('click', function(){
      moj.Modules.GtmTrackTimestamps.sectionLinkClick('processed-applications-section');
    });

    $('a.deleted-applications').on('click', function(){
      moj.Modules.GtmTrackTimestamps.sectionLinkClick('deleted-applications-section');
    });

    $('.updated_applications a').on('click', function(){
      moj.Modules.GtmTrackTimestamps.yourLastApplication();
      moj.Modules.GtmTrackTimestamps.sectionLinkClick('your-last-applications-section');
    });

    $('table.search-results a').on('click', function(){
      moj.Modules.GtmTrackTimestamps.searchResultClick();
      moj.Modules.GtmTrackTimestamps.sectionLinkClick('search-results-section')
    });
  },

  bindHomepageEvents: function() {
    moj.Modules.GtmTrackTimestamps.trackLinksClicked();

    if($('#completed_search_reference').val().length > 0){
      moj.Modules.GtmTrackTimestamps.serchPerformed('Failure');
    }

    $('.search-button').on('click', function(){
      moj.Modules.GtmTrackTimestamps.serchPerformed('');
    });
  },

  trackErrorMessage:  function() {
    var error_messages = moj.Modules.GtmTrackTimestamps.readErrorMessages()
    if(error_messages.length > 0) {
      dataLayer.push({
        'event': 'ErrorMessage',
        'errorMessageText': error_messages
      });
    }
  },

  readErrorMessages: function(){
    var val = []
    var error_messages = '';

    if($('.govuk-error-summary__body').length > 0){
      error_messages = $('.govuk-error-summary__body').text()
    } else if($('label.error').length > 0) {
      $('label.error').each(function() {
        val.push($( this ).text());
      });
      error_messages = val.join(', ');
    }

    return error_messages;
  }
};


text:
Qt 5 / qtwayland based toy 3D compositor

Showcases the use of qtwayland's compositor API for creating a 3D wayland compositor.

![Screenshot of mazecompositor](http://github.com/capisce/mazecompositor/raw/master/screenshot.png)

Attributions:

boiler_plate.jpg and boiler_plate_rust.jpg are from http://www.grsites.com/

The soldier images are from the Wolfenstein 3D Texture Library, http://www.areyep.com/RIPandMCS-TextureLibrary.html


text:
/*
 * Application entry file
 * Contains route definition
 * The coding and best practices are heavily infulenced from
 * JHON PAPA's excellent angular coding style guide
 * https://github.com/johnpapa/angular-styleguide
 */

// Wrap everything in an Immediately Invoked Function Expression (IIFE)
// As per JP's guide
(function(){

	 'use strict';

	/*
	 * Again injecting the dependancies using angular's $inject
	 * As per JP's guid
	 */

	var routeConfig = function( $routeProvider, $locationProvider ){

		 $routeProvider
                .when('/',{

			 					templateUrl: 'mycal/calendar/calendar.html',

			 					controller: 'CalCtrl',

								controllerAs: 'cal'
		 				  })

                 .otherwise({ redirectTo: '/' });

		$locationProvider.hashPrefix('!');

	};

	/*Namming the app as mycal */

	angular
	 		.module('mycal', [ 'ngRoute', 'ui.bootstrap' ])
	 		.config(routeConfig);

	routeConfig.$inject = [ '$routeProvider', '$locationProvider' ];

})();


text:
import pytest
import sys
if '-nogui' not in sys.argv:
    sys.argv.append('-nogui')

pkg = 'examples/saving/'

@pytest.fixture()
def pkg_setup():
    sys.path.append(pkg)
    yield True
    sys.path.remove(pkg)

class Test_saving():
    def test_init(self, pkg_setup):
        import init


text:
<?php

namespace App\Http\Controllers\Akademik\Jadwal;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

use App\Jadwal;
use App\Http\Requests\JadwalRequest;
use PDF;

class JadwalController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index(Request $request)
    {
        $jadwals = Jadwal::join('dosen','dosen.nip','=','jadwal.nip')
                        ->join('jurusan','jurusan.kode_jurusan','=','jadwal.kode_jurusan')
                        ->join('ruang','ruang.kode_ruang','=','jadwal.kode_ruang')
                        ->join('kelas','kelas.kode_kelas','=','jadwal.kode_kelas')
                        ->join('mata_kuliah','mata_kuliah.kode_mk','=','jadwal.kode_mk')
                        ->join('hari','hari.kode_hari','=','jadwal.kode_hari')
                        ->join('jam','jam.kode_jam','=','jadwal.kode_jam')
                        ->select('*','jadwal.id as jadwal_id','kelas.id as kelas_id')
                        ->sortable()
                        ->paginate(10);
        return view('Akademik.Jadwal.jadwalIndex',compact('jadwals'))->with('no',($request->input('page',1)-1)*10);
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        $dsn = \App\Dosen::select('nip','nama_dosen')->get();
        $jrsn = \App\Jurusan::select('kode_jurusan','nama_jurusan')->get();
        $ruang = \App\Ruang::select('kode_ruang','nama_ruang')->get();
        $kls = \App\Kelas::select('kode_kelas','nama_kelas')->get();
        $mk = \App\Matakuliah::select('kode_mk','makul')->get();
        $hr = \App\Hari::select('kode_hari','nama_hari')->get();
        $jam = \App\Jam::select('kode_jam','waktu_mulai','waktu_selesai')->get();

        return view('Akademik.Jadwal.jadwalInsert',compact('dsn','jrsn','ruang','kls','mk','hr','jam'));
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(JadwalRequest $request)
    {
        $insert = new Jadwal([
            'kode_jadwal' => $request->input('kode_jadwal'),
            'nip' => $request->input('nip'),
            'kode_jurusan' => $request->input('kode_jurusan'),
            'kode_kelas' => $request->input('kode_kelas'),
            'kode_ruang' => $request->input('kode_ruang'),
            'kode_mk' => $request->input('kode_mk'),
            'kode_hari' => $request->input('kode_hari'),
            'kode_jam' => $request->input('kode_jam')
        ]);

        if ($insert->save()) {
            session()->flash('status','done_all');
            session()->flash('pesan','Data berhasil disimpan');
        }else{
            session()->flash('status','clear');
            session()->flash('pesan','Data gagal disimpan');
        }

        return redirect('Akademik/Jadwal/create');
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        $dec = decrypt($id);
        $sort = \App\Kelas::find($dec);
        $keterangan = Jadwal::join('jurusan','jurusan.kode_jurusan','=','jadwal.kode_jurusan')
                            ->join('kelas','kelas.kode_kelas','=','jadwal.kode_kelas')
                            ->select('jurusan.nama_jurusan','kelas.tahun','kelas.nama_kelas','jadwal.id as jadwal_id','kelas.id as kelas_id')
                            ->where('kelas.id',$sort->id)
                            ->first();

        $jadwals = Jadwal::join('dosen','dosen.nip','=','jadwal.nip')
                        ->join('jurusan','jurusan.kode_jurusan','=','jadwal.kode_jurusan')
                        ->join('ruang','ruang.kode_ruang','=','jadwal.kode_ruang')
                        ->join('kelas','kelas.kode_kelas','=','jadwal.kode_kelas')
                        ->join('mata_kuliah','mata_kuliah.kode_mk','=','jadwal.kode_mk')
                        ->join('hari','hari.kode_hari','=','jadwal.kode_hari')
                        ->join('jam','jam.kode_jam','=','jadwal.kode_jam')
                        ->select('*','jadwal.id as jadwal_id','kelas.id as kelas_id')
                        ->where('kelas.nama_kelas',$sort->nama_kelas)
                        ->orderBy('jam.waktu_mulai','Asc')
                        ->get();

        return view('Akademik.Jadwal.jadwalDetail',compact('jadwals','keterangan'));
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        $dec = decrypt($id);
        $data = Jadwal::find($dec);
        $dsn = \App\Dosen::select('nip','nama_dosen')->get();
        $jrsn = \App\Jurusan::select('kode_jurusan','nama_jurusan')->get();
        $ruang = \App\Ruang::select('kode_ruang','nama_ruang')->get();
        $kls = \App\Kelas::select('kode_kelas','nama_kelas')->get();
        $mk = \App\Matakuliah::select('kode_mk','makul')->get();
        $hr = \App\Hari::select('kode_hari','nama_hari')->get();
        $jam = \App\Jam::select('kode_jam','waktu_mulai','waktu_selesai')->get();

        return view('Akademik.Jadwal.jadwalEdit',compact('data','dsn','jrsn','ruang','kls','mk','hr','jam'));
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, $id)
    {
        $dec = decrypt($id);
        $update = Jadwal::find($dec);
        $update->kode_jadwal = $request->input('kode_jadwal');
        $update->nip = $request->input('nip');
        $update->kode_jurusan = $request->input('kode_jurusan');
        $update->kode_ruang = $request->input('kode_ruang');
        $update->kode_kelas = $request->input('kode_kelas');
        $update->kode_hari = $request->input('kode_hari');
        $update->kode_jam = $request->input('kode_jam');

        if ($update->save()) {
            session()->flash('status','done_all');
            session()->flash('pesan','Data berhasil diubah');
        }else{
            session()->flash('status','clear');
            session()->flash('pesan','Data gagal diubah');
        }

        return redirect('Akademik/Jadwal');
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        $dec = decrypt($id);
        $hapus = Jadwal::find($dec);

        if ($hapus->delete()) {
            session()->flash('status','done_all');
            session()->flash('pesan','Data berhasil dihapus');
        }else{
            session()->flash('status','clear');
            session()->flash('pesan','Data gagal dihapus');
        }

        return redirect('Akademik/Jadwal');
    }

    public function search(Request $request){
        $cari = $request->input('cari');
        $jadwals = Jadwal::where('kode_jadwal','LIKE','%'.$cari.'%')->sortable()->paginate(10);

        return view('Akademik.Jadwal.jadwalIndex',compact('jadwals'))->with('no',($request->input('page',1)-1)*10);
    }

    public function pdf(Request $request,$id){
        $dec = decrypt($id);
        $sort = \App\Kelas::find($dec);
        $keterangan = Jadwal::join('jurusan','jurusan.kode_jurusan','=','jadwal.kode_jurusan')
                            ->join('kelas','kelas.kode_kelas','=','jadwal.kode_kelas')
                            ->select('jurusan.nama_jurusan','kelas.tahun','kelas.nama_kelas','jadwal.id as jadwal_id')
                            ->where('kelas.id',$sort->id)
                            ->first();

        $jadwals = Jadwal::join('dosen','dosen.nip','=','jadwal.nip')
                        ->join('jurusan','jurusan.kode_jurusan','=','jadwal.kode_jurusan')
                        ->join('ruang','ruang.kode_ruang','=','jadwal.kode_ruang')
                        ->join('kelas','kelas.kode_kelas','=','jadwal.kode_kelas')
                        ->join('mata_kuliah','mata_kuliah.kode_mk','=','jadwal.kode_mk')
                        ->join('hari','hari.kode_hari','=','jadwal.kode_hari')
                        ->join('jam','jam.kode_jam','=','jadwal.kode_jam')
                        ->select('*','jadwal.id as jadwal_id','kelas.id as kelas_id')
                        ->where('kelas.nama_kelas',$sort->nama_kelas)
                        ->orderBy('jam.waktu_mulai','Asc')
                        ->get();
        view()->share(['jadwals'=>$jadwals,'keterangan'=>$keterangan]);

        if ($request->has('download')) {
            $pdf = PDF::loadview('Akademik/Jadwal/jadwalPdf');
            return $pdf->download('jadwalPdf.pdf');
        }else{
            $pdf= PDF::loadview('Akademik/Jadwal/jadwalPdf');
            return $pdf->stream('jadwalPdf.pdf');
        }
    }
}


text:
#include <boost/assign.hpp>
#include "drill/userProperties.hpp"

namespace Drill{

//Using boost assign to initialize maps.
const std::map<std::string, uint32_t>  DrillUserProperties::USER_PROPERTIES=boost::assign::map_list_of
    ( USERPROP_USERNAME,    USERPROP_FLAGS_SERVERPROP|USERPROP_FLAGS_USERNAME|USERPROP_FLAGS_STRING )
    ( USERPROP_PASSWORD,    USERPROP_FLAGS_SERVERPROP|USERPROP_FLAGS_PASSWORD)
    ( USERPROP_SCHEMA,      USERPROP_FLAGS_SERVERPROP|USERPROP_FLAGS_STRING)
    ( USERPROP_IMPERSONATION_TARGET,   USERPROP_FLAGS_SERVERPROP|USERPROP_FLAGS_STRING)
    ( USERPROP_AUTH_MECHANISM,         USERPROP_FLAGS_STRING)
    ( USERPROP_SERVICE_NAME,           USERPROP_FLAGS_STRING)
    ( USERPROP_SERVICE_HOST,           USERPROP_FLAGS_STRING)
    ( USERPROP_USESSL,      USERPROP_FLAGS_BOOLEAN|USERPROP_FLAGS_SSLPROP)
    ( USERPROP_TLSPROTOCOL,      USERPROP_FLAGS_STRING|USERPROP_FLAGS_SSLPROP)
    ( USERPROP_CERTFILEPATH,    USERPROP_FLAGS_STRING|USERPROP_FLAGS_SSLPROP|USERPROP_FLAGS_FILEPATH)
    ( USERPROP_DISABLE_HOSTVERIFICATION,    USERPROP_FLAGS_BOOLEAN|USERPROP_FLAGS_SSLPROP)
    ( USERPROP_DISABLE_CERTVERIFICATION,    USERPROP_FLAGS_BOOLEAN|USERPROP_FLAGS_SSLPROP)
    ( USERPROP_USESYSTEMTRUSTSTORE,    USERPROP_FLAGS_BOOLEAN|USERPROP_FLAGS_SSLPROP)
    ( USERPROP_CUSTOM_SSLCTXOPTIONS,   USERPROP_FLAGS_STRING|USERPROP_FLAGS_SSLPROP)
    ( USERPROP_SASL_ENCRYPT,  USERPROP_FLAGS_STRING)
;

bool DrillUserProperties::validate(std::string& err){
    bool ret=true;
    //We can add additional validation for any params here
    return ret;
}

} // namespace Drill


text:
/*************************************************
*      Perl-Compatible Regular Expressions       *
*************************************************/

/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.

                       Written by Philip Hazel
            This module by Zoltan Herczeg and Sebastian Pop
     Original API code Copyright (c) 1997-2012 University of Cambridge
          New API code Copyright (c) 2016-2019 University of Cambridge

-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

    * Neither the name of the University of Cambridge nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/

# if defined(FFCS)
#  if defined(FF_UTF)
#   define FF_FUN ffcs_utf
#  else
#   define FF_FUN ffcs
#  endif

# elif defined(FFCS_2)
#  if defined(FF_UTF)
#   define FF_FUN ffcs_2_utf
#  else
#   define FF_FUN ffcs_2
#  endif

# elif defined(FFCS_MASK)
#  if defined(FF_UTF)
#   define FF_FUN ffcs_mask_utf
#  else
#   define FF_FUN ffcs_mask
#  endif

# elif defined(FFCPS_0)
#  if defined (FF_UTF)
#   define FF_FUN ffcps_0_utf
#  else
#   define FF_FUN ffcps_0
#  endif

# elif defined (FFCPS_1)
#  if defined (FF_UTF)
#   define FF_FUN ffcps_1_utf
#  else
#   define FF_FUN ffcps_1
#  endif

# elif defined (FFCPS_DEFAULT)
#  if defined (FF_UTF)
#   define FF_FUN ffcps_default_utf
#  else
#   define FF_FUN ffcps_default
#  endif
# endif

static sljit_u8* SLJIT_FUNC FF_FUN(sljit_u8 *str_end, sljit_u8 *str_ptr, sljit_uw offs1, sljit_uw offs2, sljit_uw chars)
#undef FF_FUN
{
quad_word qw;
int_char ic;
ic.x = chars;

#if defined(FFCS)
sljit_u8 c1 = ic.c.c1;
vect_t vc1 = VDUPQ(c1);

#elif defined(FFCS_2)
sljit_u8 c1 = ic.c.c1;
vect_t vc1 = VDUPQ(c1);
sljit_u8 c2 = ic.c.c2;
vect_t vc2 = VDUPQ(c2);

#elif defined(FFCS_MASK)
sljit_u8 c1 = ic.c.c1;
vect_t vc1 = VDUPQ(c1);
sljit_u8 mask = ic.c.c2;
vect_t vmask = VDUPQ(mask);
#endif

#if defined(FFCPS)
compare_type compare1_type = compare_match1;
compare_type compare2_type = compare_match1;
vect_t cmp1a, cmp1b, cmp2a, cmp2b;
const sljit_u32 diff = IN_UCHARS(offs1 - offs2);
PCRE2_UCHAR char1a = ic.c.c1;
PCRE2_UCHAR char2a = ic.c.c3;

# ifdef FFCPS_CHAR1A2A
cmp1a = VDUPQ(char1a);
cmp2a = VDUPQ(char2a);
# else
PCRE2_UCHAR char1b = ic.c.c2;
PCRE2_UCHAR char2b = ic.c.c4;
if (char1a == char1b)
  cmp1a = VDUPQ(char1a);
else
  {
  sljit_u32 bit1 = char1a ^ char1b;
  if (is_powerof2(bit1))
    {
    compare1_type = compare_match1i;
    cmp1a = VDUPQ(char1a | bit1);
    cmp1b = VDUPQ(bit1);
    }
  else
    {
    compare1_type = compare_match2;
    cmp1a = VDUPQ(char1a);
    cmp1b = VDUPQ(char1b);
    }
  }

if (char2a == char2b)
  cmp2a = VDUPQ(char2a);
else
  {
  sljit_u32 bit2 = char2a ^ char2b;
  if (is_powerof2(bit2))
    {
    compare2_type = compare_match1i;
    cmp2a = VDUPQ(char2a | bit2);
    cmp2b = VDUPQ(bit2);
    }
  else
    {
    compare2_type = compare_match2;
    cmp2a = VDUPQ(char2a);
    cmp2b = VDUPQ(char2b);
    }
  }
# endif

str_ptr += IN_UCHARS(offs1);
#endif

#if PCRE2_CODE_UNIT_WIDTH != 8
vect_t char_mask = VDUPQ(0xff);
#endif

#if defined(FF_UTF)
restart:;
#endif

#if defined(FFCPS)
sljit_u8 *p1 = str_ptr - diff;
#endif
sljit_s32 align_offset = ((uint64_t)str_ptr & 0xf);
str_ptr = (sljit_u8 *) ((uint64_t)str_ptr & ~0xf);
vect_t data = VLD1Q(str_ptr);
#if PCRE2_CODE_UNIT_WIDTH != 8
data = VANDQ(data, char_mask);
#endif

#if defined(FFCS)
vect_t eq = VCEQQ(data, vc1);

#elif defined(FFCS_2)
vect_t eq1 = VCEQQ(data, vc1);
vect_t eq2 = VCEQQ(data, vc2);
vect_t eq = VORRQ(eq1, eq2);

#elif defined(FFCS_MASK)
vect_t eq = VORRQ(data, vmask);
eq = VCEQQ(eq, vc1);

#elif defined(FFCPS)
# if defined(FFCPS_DIFF1)
vect_t prev_data = data;
# endif

vect_t data2;
if (p1 < str_ptr)
  {
  data2 = VLD1Q(str_ptr - diff);
#if PCRE2_CODE_UNIT_WIDTH != 8
  data2 = VANDQ(data2, char_mask);
#endif
  }
else
  data2 = shift_left_n_lanes(data, offs1 - offs2);

data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b);
data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b);
vect_t eq = VANDQ(data, data2);
#endif

VST1Q(qw.mem, eq);
/* Ignore matches before the first STR_PTR. */
if (align_offset < 8)
  {
  qw.dw[0] >>= align_offset * 8;
  if (qw.dw[0])
    {
    str_ptr += align_offset + __builtin_ctzll(qw.dw[0]) / 8;
    goto match;
    }
  if (qw.dw[1])
    {
    str_ptr += 8 + __builtin_ctzll(qw.dw[1]) / 8;
    goto match;
    }
  }
else
  {
  qw.dw[1] >>= (align_offset - 8) * 8;
  if (qw.dw[1])
    {
    str_ptr += align_offset + __builtin_ctzll(qw.dw[1]) / 8;
    goto match;
    }
  }
str_ptr += 16;

while (str_ptr < str_end)
  {
  vect_t orig_data = VLD1Q(str_ptr);
#if PCRE2_CODE_UNIT_WIDTH != 8
  orig_data = VANDQ(orig_data, char_mask);
#endif
  data = orig_data;

#if defined(FFCS)
  eq = VCEQQ(data, vc1);

#elif defined(FFCS_2)
  eq1 = VCEQQ(data, vc1);
  eq2 = VCEQQ(data, vc2);
  eq = VORRQ(eq1, eq2);

#elif defined(FFCS_MASK)
  eq = VORRQ(data, vmask);
  eq = VCEQQ(eq, vc1);
#endif

#if defined(FFCPS)
# if defined (FFCPS_DIFF1)
  data2 = VEXTQ(prev_data, data, VECTOR_FACTOR - 1);
# else
  data2 = VLD1Q(str_ptr - diff);
#  if PCRE2_CODE_UNIT_WIDTH != 8
  data2 = VANDQ(data2, char_mask);
#  endif
# endif

# ifdef FFCPS_CHAR1A2A
  data = VCEQQ(data, cmp1a);
  data2 = VCEQQ(data2, cmp2a);
# else
  data = fast_forward_char_pair_compare(compare1_type, data, cmp1a, cmp1b);
  data2 = fast_forward_char_pair_compare(compare2_type, data2, cmp2a, cmp2b);
# endif

  eq = VANDQ(data, data2);
#endif

  VST1Q(qw.mem, eq);
  if (qw.dw[0])
    str_ptr += __builtin_ctzll(qw.dw[0]) / 8;
  else if (qw.dw[1])
    str_ptr += 8 + __builtin_ctzll(qw.dw[1]) / 8;
  else {
    str_ptr += 16;
#if defined (FFCPS_DIFF1)
    prev_data = orig_data;
#endif
    continue;
  }

match:;
  if (str_ptr >= str_end)
    /* Failed match. */
    return NULL;

#if defined(FF_UTF)
  if (utf_continue(str_ptr + IN_UCHARS(-offs1)))
    {
    /* Not a match. */
    str_ptr += IN_UCHARS(1);
    goto restart;
    }
#endif

  /* Match. */
#if defined (FFCPS)
  str_ptr -= IN_UCHARS(offs1);
#endif
  return str_ptr;
  }

/* Failed match. */
return NULL;
}


text:
.baraci-logo {
    width: 100px;
    height: 100px;
}

.boxedcontainer     {   max-width: 1170px; margin:auto; padding:0px 30px;}

/*********************************************
    -   SETTINGS FOR BANNER CONTAINERS  -
**********************************************/

.tp-banner-container{
    width:100%;
    position:relative;
    padding:0;

}

.tp-banner{
    width:100%;
    position:relative;
}

.tp-banner-fullscreen-container {
        width:100%;
        position:relative;
        padding:0;
}

/*******************************************************************/
.toolpad * {
     -moz-user-select: none;
        -khtml-user-select: none;
        -webkit-user-select: none;
        -o-user-select: none;
}

/***********************
    -   BASICS  -
***********************/
 h2             {   color:#000; font-size:17px; font-weight:700; margin-bottom:20px;}
 h2.redtitle    {   padding:9px 20px; width:100%; background:#e33a0c; color:#fff;  box-sizing:border-box;-moz-box-sizing:border-box; -webkit-box-sizing:border-box;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;
                    margin-bottom:40px;
 }

 h2.nobottommargin  {   margin-bottom:0px;}
 .container     {   max-width:1170px;margin:auto;   }
 .clear         {   clear:both;}
 .float-left    {   float:left;}
 .float-right   {   float:right;}
 .divide40      {   width:100%; height:40px;}
 .mb30          {   margin-bottom:30px;}
 .mlb30         {   margin-left:30px; margin-bottom:30px;}
 .mrb30         {   margin-right:30px; margin-bottom:30px;}

 .table         {   display:table; padding-bottom:35px;}
 .table.nbp     {   padding-bottom:0px;}
 .table-cell    {   display: table-cell; vertical-align: top; }
 .table-cell img{   width: 220px; }

 .lp30          {   padding-left:30px;}
 .rp30          {   padding-right:30px;}

 hr             {   border:none; border-top:2px solid #eee; margin:0px 0px 40px;}
 .boxed-content hr {    border:none; border-top:2px solid #eee; margin:0px -40px 40px;}
 hr.nohormargin {   margin: -1px -1px 40px 0px}
 .one_third     {   width:32%; margin-right:1%; float:left;}
 .one_third.last{   margin-right:0;}

 /*a,a:visited  {   color:#e33a0c}*/
 a:hover        {   text-decoration: none;}

.prevnext       {   width:615px;height:23px;position: fixed; left:50%; margin-left:-272px;top:-2px;z-index:1000;

}

.prevnext a     {   background:#e33a0c;font-size:10px; text-decoration: none !important;  color:#fff !important;
                    margin-right:2px;padding:3px 8px; border-radius:0px 0px 5px 5px; -moz-border-radius:0px 0px 5px 5px;-webkit-border-radius:0px 0px 5px 5px;
                    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
                    filter: alpha(opacity=50);
                    -moz-opacity: 0.5;
                    -khtml-opacity: 0.5;
                    opacity: 0.5;
}
.prevnext a.active,
.prevnext a:hover,
.prevnext a:hover * {   color:#fff !important;
                        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
                      filter: alpha(opacity=100);
                      -moz-opacity: 1;
                      -khtml-opacity: 1;
                      opacity: 1;
                     }

input[type="button"] { background-color:#3498db; border:none; color:#fff; padding:7px 10px; cursor:pointer; display: inline-block; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; }
input[type="button"]:hover  { background-color:#2980b9; border:none; color:#fff; padding:7px 10px;}

h2.changecolor  {   color:#E33A0C;}

h2.results      {   -webkit-transition: all 0.2s ease-out;
                    -moz-transition: all 0.2s ease-out;
                    -o-transition: all 0.2s ease-out;
                    -ms-transition: all 0.2s ease-out; }
/******************************
    -   HEADER  -
********************************/

  /*header      {   width:100%; padding:20px 0px 17px 0px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;}*/
  .content      {   width:100%; padding:0px 30px 0px 30px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;}

 .logo-container    {   float:left; width:50%;}
 .logo              {   background:url(../images/logo.png); background-size:100%; background-position: center center; background-repeat:no-repeat;max-width:406px; min-width:340px;height:60px; }

  .button-holder .button,
  .button-holder .button:hover,
  .button-holder .button:visited {
    float: right;
    background-color: #E33A0C;
    color: #FFF;
    text-decoration: none;
    font-weight: 300;
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    }

/******************************
    -   CONTAINER   -
********************************/
/*.container        {   max-width:1170px; padding:30px;}*/
/******************************
    -   PRE -
********************************/

pre             {   font-size:12px; font-family: 'Open Sans', sans-serif; color:#888; line-height:16px; background:url(../editor/assets/prebg.png) repeat; padding:16px; padding-bottom:15px;}
pre .linedark   {   background:#888}
pre span        {   font-weight:700}
pre strong      {   color:#555;font-weight:800}

h3              {   font-size:14px; color:#e33a0c; line-height:20px;}
/***********************************************************************************************************************************************************************************************************/
.tp-bannertimer {
    background:#777 !important;
    background:rgba(0,0,0,0.1) !important;
    height:5px !important;
  }

.tp-bullets.simplebullets.navbar {

    height: 35px;
    padding: 0px 0px;

}
.tp-bullets.simplebullets .bullet {
    cursor: pointer;
    position: relative !important;
    background: rgba(0, 0, 0, 0.5) !important;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    width: 6px !important;
    height: 6px !important;
    border: 5px solid rgba(0, 0, 0, 0) !important;
    display: inline-block;
    margin-right: 2px !important;
    margin-bottom: 14px !important;
    -webkit-transition: background-color 0.2s, border-color 0.2s;
    -moz-transition: background-color 0.2s, border-color 0.2s;
    -o-transition: background-color 0.2s, border-color 0.2s;
    -ms-transition: background-color 0.2s, border-color 0.2s;
    transition: background-color 0.2s, border-color 0.2s;
    float:none !important;
}
.tp-bullets.simplebullets .bullet.last {
    margin-right: 0px
}
.tp-bullets.simplebullets .bullet:hover,
.tp-bullets.simplebullets .bullet.selected {
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 1) !important;
    width: 6px !important;
    height: 6px !important;
    border: 5px solid rgba(0, 0, 0, 1) !important;
}

.tparrows:before {
    font-family: 'revicons';
    color: #fff;
    font-style: normal;
    font-weight: normal;
    speak: none;
    display: inline-block;
    text-decoration: inherit;
    margin-right: 0;
    margin-top: 9px;
    text-align: center;
    width: 40px;
    font-size: 20px;
}
.tparrows {

    cursor: pointer;

    background: rgba(0, 0, 0, 0.5) !important;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    width: 40px !important;
    height: 40px !important;

}
.tparrows:hover {
    color: #fff;
}
.tp-leftarrow:before {
    content: '\e824';
}
.tp-rightarrow:before {
    content: '\e825';
}
.tparrows.tp-rightarrow:before {
    margin-left: 1px;
}
.tparrows:hover {
    background: rgba(0, 0, 0, 1) !important;
}

/******************************
    -   SLIDER NAV STYLE DEMOS  -
********************************/

#slider4container .tparrows:before,
#slider4container .tparrows:hover,
#slider4container .tparrows {
    color: #000 !important;
}

#slider4container .tparrows {
    background:#fff !important;
    background:rgba(255,255,255,0.5) !important;
}

#slider4container .tparrows:hover   {
    background:#fff !important
}
.parallax-container {
    height: 300px;
}
        /****Map****/
.map {
    overflow: hidden;
    padding-top: 1px;
}
.map figure {
    position: relative;
    display: block;
    width: 90%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
box-sizing: border-box;
}
.map figure iframe {
    width: 100%;
    height: 399px;
    max-width: 100%;
}
.sobre-parallax {
    position: absolute;
    left: 40%;
    top: 10%;
    z-index: 1300;
}
.parallax-container  h2 {
    color: #f57c00;
}

/**** Cambio de colores para los wabes *******/
.waves-effect.waves-brown .waves-ripple {
/* The alpha value allows the text and background color
of the button to still show through. */
    background-color: rgba(0, 0, 0, 0.65);
}
.waves-effect {
    color: #000 !important;
}

/* Estilo para el mapa de google maps */
.map figure iframe {
    width: 100%;
    height: 399px;
    max-width: 100%;
}

blockquote {
    border-left-color: #00695c !important;
}

.responsive-gallery {
    max-width: 100%;
    max-height: 100%;
    height: 100px;
}


text:
package cni

import (
	"os/exec"
	"path"

	"github.com/golang/glog"
)

// we are using "ip netns" command instead of cni/pkg/ns because usage
// of later will lead to file descriptor leakages
// also we could be affected by https://github.com/containernetworking/cni/issues/262

const (
	netnsBasePath = "/var/run/netns"
)

// CreateNetNS creates new network namespace using provided name.
func CreateNetNS(name string) error {
	return callIPNetns("add", name)
}

// DestroyNetNS deletes the network namespace pointed by provided name.
func DestroyNetNS(name string) error {
	return callIPNetns("del", name)
}

func callIPNetns(command, name string) error {
	cmd := exec.Command("ip", "netns", command, name)
	output, err := cmd.CombinedOutput()
	if err != nil {
		glog.Errorf("\"ip netns %s %s\" failed with output: %s", command, name, string(output))
	}
	return err
}

// PodNetNSPath converts netns name to its path in host filesystem.
func PodNetNSPath(name string) string {
	return path.Join(netnsBasePath, name)
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <!-- Parent -->
  <parent>
    <groupId>org.jboss.arquillian</groupId>
    <artifactId>arquillian-build</artifactId>
    <version>1.7.0.Final-SNAPSHOT</version>
    <relativePath>../../build/pom.xml</relativePath>
  </parent>

  <!-- Model Version -->
  <modelVersion>4.0.0</modelVersion>

  <!-- Artifact Configuration -->
  <groupId>org.jboss.arquillian.container</groupId>
  <artifactId>arquillian-container-impl-base</artifactId>
  <name>Arquillian Container Implementation Base</name>
  <description>Implementation for the container extension.</description>

  <!-- Properties -->
  <properties>

    <!-- Versioning -->

  </properties>

  <!-- Dependencies -->
  <dependencies>

    <!-- org.jboss.arquillian -->
    <dependency>
      <groupId>org.jboss.arquillian.core</groupId>
      <artifactId>arquillian-core-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.core</groupId>
      <artifactId>arquillian-core-spi</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.config</groupId>
      <artifactId>arquillian-config-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.config</groupId>
      <artifactId>arquillian-config-impl-base</artifactId> <!-- ILEGAL DEPENDENCY, resolved with new Config API -->
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.container</groupId>
      <artifactId>arquillian-container-spi</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.jboss.shrinkwrap.descriptors</groupId>
      <artifactId>shrinkwrap-descriptors-spi</artifactId>
      <scope>compile</scope>
    </dependency>

    <!-- Test -->
    <dependency>
      <groupId>org.jboss.arquillian.core</groupId>
      <artifactId>arquillian-core-impl-base</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.core</groupId>
      <artifactId>arquillian-core-impl-base</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.shrinkwrap</groupId>
      <artifactId>shrinkwrap-impl-base</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.shrinkwrap.descriptors</groupId>
      <artifactId>shrinkwrap-descriptors-api-javaee</artifactId>
      <scope>test</scope> <!-- ARQ-514, OK in test scope -->
    </dependency>
    <dependency>
      <groupId>org.jboss.shrinkwrap.descriptors</groupId>
      <artifactId>shrinkwrap-descriptors-impl-javaee</artifactId>
      <scope>test</scope> <!-- ARQ-514, OK in test scope -->
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>
</project>


text:
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Unit = PrtgAPI.Tests.UnitTests.ObjectData.Query;

namespace PrtgAPI.Tests.IntegrationTests.ObjectData.Query
{
    [TestClass]
    public class SelectTests : BaseQueryTest
    {
        #region Overload

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_Overload_TSourceTResult_SingleProperty()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select(s => s.Name), s => AssertEx.AreEqualLists(names, s, "Lists were not equal"));
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_Overload_TSourceIntTResult_SelectIndex()
        {
            Execute(q => q.Select((s, i) => i), s =>
            {
                for (var i = 0; i < Settings.SensorsInTestServer; i++)
                    Assert.AreEqual(i, s[i]);
            });
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_Overload_TSourceIntTResult_SelectIndexAndProperty()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select((s, i) => new
            {
                Fake1 = s.Name,
                Fake2 = i
            }), s =>
            {
                for(var i = 0; i < s.Count; i++)
                {
                    Assert.AreEqual(names[i], s[i].Fake1);
                    Assert.AreEqual(i, s[i].Fake2);
                }
            });
        }

        #endregion
        #region Illegal Predecessors

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_FromUnsupported()
        {
            var names = client.GetSensors().Select(s => s.Name).Skip(1).ToList();

            Execute(
                q => q.SkipWhile((s, i) => i == 0).Select(s => s.Name),
                s => AssertEx.AreEqualLists(s, names, "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_FromUnsupported_FromSupported()
        {
            var names = client.GetSensors().Where(s => s.Active).Select(s => s.Name).Skip(1).ToList();

            Execute(
                q => q.Where(s => s.Active).SkipWhile((s, i) => i == 0).Select(s => s.Name),
                s => AssertEx.AreEqualLists(s, names, "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_ToUnsupported()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).Skip(1).ToList();

            Execute(
                q => q.Select(s => s.Name).SkipWhile((s, i) => i == 0),
                s => AssertEx.AreEqualLists(s, names, "Lists were not equal")
            );
        }

        #endregion
        #region Anonymous Type

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(
                q => q.Select(s => new
                {
                    CustomName = s.Name,
                    Type = s.BaseType
                }),
                s =>
                {
                    AssertEx.AreEqualLists(names, s.Select(v => v.CustomName).ToList(), "List of names were not equal");
                    Assert.IsTrue(s.All(v => v.Type == BaseType.Sensor));
                }
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_Where()
        {
            var sensor = client.GetSensor(Settings.UpSensor);

            Execute(q => q.Select(s => new
            {
                CustomName = s.Name,
                Type = s.BaseType
            }).Where(s1 => s1.CustomName == sensor.Name),
            s =>
            {
                Assert.AreEqual(1, s.Count);
                Assert.AreEqual(sensor.Name, s.Single().CustomName);
            });
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_WithPropertyMember_ToWhere()
        {
            Execute(q => q.Select(s => new
            {
                CustomName = s.Name,
                Intermediate = new
                {
                    First = s.NotificationTypes.ChangeTriggers,
                    Second = s.Active
                }
            }).Where(a => a.Intermediate.First == 0),
            s =>
            {
                Assert.AreEqual(Settings.SensorsInTestServer, s.Count);
                Assert.IsTrue(s.All(v => v.Intermediate.First == 0));
            });
        }

        #endregion
        #region Type Constraints

        [TestMethod]
        [IntegrationTest]
        public void Data_Select_TypeConstraints_CastType_ToSelect()
        {
            Execute(q => q.Select(s => (ITableObject)s).Select(v => v.Tags), s => Assert.AreEqual(Settings.SensorsInTestServer, s.Count));
        }

        #endregion

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_PropertyMember_ToWhere()
        {
            Execute(q => q.Select(s => s.NotificationTypes.ChangeTriggers).Where(a => a == 0),
            s =>
            {
                Assert.AreEqual(Settings.SensorsInTestServer, s.Count);
                Assert.IsTrue(s.All(v => v == 0));
            }
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousLiteral_ToWhere()
        {
            Execute(
                q => q.Select(s => new
                {
                    First = 3
                }).Where(f => f.First == 3),
                s =>
                {
                    Assert.AreEqual(Settings.SensorsInTestServer, s.Count);
                    Assert.IsTrue(s.All(e => e.First == 3));
                }
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_Anonymous_Where_ToAnonymous()
        {
            Execute(q => q.Select(s => new
            {
                First = s.Id
            }).Where(a => a.First == Settings.UpSensor).Select(a => a.First), s => Assert.AreEqual(Settings.UpSensor, s.Single()));
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnotherQuery()
        {
            ExecuteClient(
                c => c.QuerySensors().Select(s => c.QueryDevices()).SelectMany(s => s).ToList(),
                d => Assert.AreEqual(Settings.DevicesInTestServer * Settings.SensorsInTestServer, d.Count)
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnotherQuery_InAnAnonymousType()
        {
            ExecuteClient(
                c => c.QuerySensors().Select(s => new
                {
                    First = s.Name,
                    Devices = c.QueryDevices().Any(d => d.Active)
                }).ToList(),
                d => Assert.AreEqual(Settings.SensorsInTestServer, d.Count)
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnotherSelectQuery()
        {
            ExecuteClient(
                c => c.QuerySensors().Select(s => c.QueryDevices().Select(d => d.Favorite)).SelectMany(s => s).ToList(),
                d => Assert.AreEqual(Settings.DevicesInTestServer * Settings.SensorsInTestServer, d.Count)
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_From_AnonymousType()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select(s => new
            {
                CustomName = s.Name,
                Type = s.BaseType
            }).Select(a => new
            {
                Val = a.CustomName
            }),
            s => AssertEx.AreEqualLists(names, s.Select(v => v.Val).ToList(), "Lists were not equal"));
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_FromRealTypeViaProperty()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select(s =>
                    new Unit.RealTypeProperty
                    {
                        RealName = s.Name,
                        RealBaseType = s.BaseType
                    }
                ).Select(a => new
                {
                    Val = a.RealName
                }),
                s => AssertEx.AreEqualLists(names, s.Select(v => v.Val).ToList(), "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_FromRealTypeViaConstructor()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select(s => new Unit.RealTypeConstructor(s.Name, s.BaseType)
                ).Select(a => new
                {
                    Val = a.RealName
                }),
                s => AssertEx.AreEqualLists(names, s.Select(v => v.Val).ToList(), "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_FromRealTypeViaConstructorGetOnly()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select(s =>
                    new Unit.RealTypeConstructorGetOnly(s.Name, s.BaseType)
                ).Select(a => new
                {
                    Val = a.RealName
                }),
                s => AssertEx.AreEqualLists(names, s.Select(v => v.Val).ToList(), "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_FromRealTypeViaConstructorAndProperty()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select(s =>
                    new Unit.RealTypeHybrid(s.Name, s.BaseType)
                    {
                        RealActive = s.Active
                    }
                ).Select(a => new
                {
                    Val = a.RealName
                }),
                s => AssertEx.AreEqualLists(names, s.Select(v => v.Val).ToList(), "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_ArrayOfAnonymousType_From_ArrayOfAnonymousType()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select(s => new[] {new
                {
                    CustomName = s.Name,
                    Type = s.BaseType
                }}).Select(a => new[] { new
                {
                    Val = a[0].CustomName
                }}),
                s => AssertEx.AreEqualLists(names, s.SelectMany(v => v.Select(v1 => v1.Val)).ToList(), "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_ListOfAnonymousType_From_ListOfAnonymousType()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select(s => new[] {new
                {
                    CustomName = s.Name,
                    Type = s.BaseType
                }}.ToList()).Select(a => new[] { new
                {
                    Val = a[0].CustomName
                }}.ToList()),
                s => AssertEx.AreEqualLists(names, s.SelectMany(v => v.Select(v1 => v1.Val)).ToList(), "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_From_AnonymousType_WithLiteral()
        {
            var names = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(
                q => q.Select(s => new
                {
                    CustomName = s.Name,
                    Type = 3
                }).Select(a => new
                {
                    Val1 = a.CustomName,
                    Val2 = a.Type
                }),
                s => AssertEx.AreEqualLists(names, s.Select(v => v.Val1).ToList(), "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_From_AnonymousTypeWithTwoLevels()
        {
            var ids = client.GetSensors().Select(s => s.Id).ToList();

            Execute(
                q => q.Select(s => new
                {
                    CustomName = s.Name,
                    Intermediate = new
                    {
                        First = s.Id,
                        Second = s.Active
                    }
                }).Select(a => new
                {
                    Val = a.Intermediate.First
                }),
                s => AssertEx.AreEqualLists(ids, s.Select(v => v.Val).ToList(), "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_AnonymousType_From_AnonymousType_IncludingGetOnlyProperty()
        {
            var triggers = client.GetSensors().Select(s => s.NotificationTypes.ToString()).OrderBy(v => v).ToList();

            Execute(q => q.Select(s => new
            {
                CustomName = s.Name,
                Intermediate = new
                {
                    First = s.NotificationTypes,
                    Second = s.Active
                }
            }).Select(a => new
            {
                Val = a.Intermediate.First
            }),
            s =>
            {
                var list = s.Select(v => v.Val.ToString()).OrderBy(o => o).ToList();

                AssertEx.AreEqualLists(list, triggers, "Lists were not equal");
            });
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_IncludeAllPropertyExpressions()
        {
            var upSensor = client.GetSensor(Settings.UpSensor);

            Execute(
                q => q.Where(s => s.Name == upSensor.Name).Select(s => s.Device),
                s => Assert.AreEqual(upSensor.Device, s.Single())
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_ToWhere()
        {
            var count = client.GetSensors().Count(s => s.Name.Contains("Pi"));

            Execute(q => q.Select(s => s.Name).Where(n => n.Contains("Pi")), s => Assert.AreEqual(count, s.Count));
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_SubMemberCondition()
        {
            Execute(q => q.Select(s => s.LastUp != null && s.LastUp.Value.Day == 32), s => Assert.IsTrue(s.All(v => v == false)));
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_NewSensor_FromSource()
        {
            var sensors = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(q => q.Select(s => new Sensor { Message = s.Name }), s =>
            {
                Assert.AreEqual(Settings.SensorsInTestServer, s.Count);
                Assert.IsTrue(s.All(v => v.Name == null));
                AssertEx.AreEqualLists(sensors, s.Select(v => v.Message).ToList(), "Lists were not equal");
            });
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_NewSensorProperty_FromSource()
        {
            var sensors = client.GetSensors().Select(s => s.Name).OrderBy(n => n).ToList();

            Execute(
                q => q.Select(s => new Sensor { Message = s.Name }.Message),
                s => AssertEx.AreEqualLists(sensors, s, "Lists were not equal")
            );
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_Anonymous_FromNewSensor_FromAnonymous_FromSource()
        {
            Execute(q => q.Select(s => new
            {
                Fake1 = s.Id,
                Fake2 = s.Name
            }).Select(a => new Sensor
            {
                Message = a.Fake2
            }).Select(s => new
            {
                Fake3 = s.ParentId,
                Fake4 = s.Message
            }), s => s.ToList());
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_NewSensor_Where_FromSource()
        {
            ExecuteClient(c => c.QuerySensors().Select(s => new Sensor
            {
                Id = s.ParentId,
                Message = s.Name
            }.Message).Where(v => v == "test"), s => s.ToList());
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_NewSensor_WhereInternalProperty_FromSource()
        {
            ExecuteClient(c => c.QuerySensors().Select(s => new Sensor
            {
                Id = s.ParentId,
                Message = s.Name
            }.Message).Where(v => v == "test"), s => s.ToList());
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_NewSensor_Where_FromNothing()
        {
            ExecuteClient(c => c.QuerySensors().Select(s => new Sensor
            {
                Id = s.ParentId,
                Message = "hello"
            }.Message).Where(v => v == "test"), s => s.ToList());
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_Query_Select_NewSensor_Where_FromOperation()
        {
            ExecuteClient(c => c.QuerySensors().Select(s => new Sensor
            {
                Id = s.ParentId,
                Message = s.Name + s.Type
            }.Message).Where(v => v == "test"), s => s.ToList());
        }

        [TestMethod]
        [IntegrationTest]
        public void Data_SelectTests_HasAllTests()
        {
            HasAllTests(typeof(Unit.SelectTests));
        }
    }
}


text:
This is a simple lock library backed by Google Cloud Datastore.

Github bots can have multiple instances and sometimes those instances
are modifying the same target (issue, pull request, etc). This simple
library allows the bot to acquire a lock on sth.

## Usage

### Install

```bash
npm i @google-automations/datastore-lock
```

### Usage

```typescript
import {DatastoreLock} from '@google-automations/datastore-lock';

// Most of the cases, you can just pass `lockId` and `target`.
// `lockId` is usually the bot name.
// `target` is the target for the lock.

const lockId = 'blunderbuss';
const target = context.payload.pull_request.url;

const lock = new DatastoreLock(lockId, target);
// await lock.peek(); // was there already a lock perhaps?
const result = await lock.acquire();
if (!result) {
	// failure
}
// Do your stuff, and release the lock after you've done.
result = await lock.release();
// The lock will become stale after 20 seconds.
// You can pass the 3rd argument for longer expiry, up to 60 seconds.
const lock2 = new DatastoreLock(lockId, target, 60 * 1000);
```


text:
AvitarCharterz
==============

AvitarCharterz :About AvitarProjects/GlobalMission:>insert our delightfull intro here asap...